Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V2 2/8] populate_sdk_ext.bbclass: install multilib SDKs
From: Robert Yang @ 2016-12-14  7:24 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481700149.git.liezhi.yang@windriver.com>

Fixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
IMAGE_CLASSES += "testimage"

$ bitbake core-image-minimal -cpopulate_sdk_ext
$ bitbake core-image-minimal -ctestsdkext
[snip]
Testing /buildarea/lyang1/test_po/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testsdkext//tc/environment-setup-x86-pokymllib32-linux
test_cvs (oeqa.sdk.buildcvs.BuildCvsTest) ... FAIL
[snip]

It was failed because no lib32 toolchains.

These fixes include:
* Set SDK_TARGETS correctly
* Return multilib depends in get_ext_sdk_depends()
* Write information to all environment-setup-* scripts.

[YOCTO #10647]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/populate_sdk_ext.bbclass | 49 ++++++++++++++++++++---------------
 1 file changed, 28 insertions(+), 21 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index adef96d..840e04d 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -39,7 +39,7 @@ SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
 SDK_UPDATE_URL ?= ""
 
-SDK_TARGETS ?= "${PN}"
+SDK_TARGETS ?= "${@multilib_pkg_extend(d, d.getVar('BPN', True))}"
 
 def get_sdk_install_targets(d, images_only=False):
     sdk_install_targets = ''
@@ -566,12 +566,14 @@ SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
 sdk_ext_postinst() {
 	printf "\nExtracting buildtools...\n"
 	cd $target_sdk_dir
-	env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
+	env_setup_scripts="`ls $target_sdk_dir/environment-setup-*`"
 	./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
 	if [ $? -ne 0 ]; then
 		printf 'ERROR: buildtools installation failed:\n'
 		cat buildtools.log
-		echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
+		for e in $env_setup_scripts; do
+			echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $e
+		done
 		exit 1
 	fi
 
@@ -580,23 +582,25 @@ sdk_ext_postinst() {
 	# We don't need the log either since it succeeded
 	rm -f buildtools.log
 
-	# Make sure when the user sets up the environment, they also get
-	# the buildtools-tarball tools in their path.
-	echo ". $target_sdk_dir/buildtools/environment-setup*" >> $env_setup_script
+	for e in $env_setup_scripts; do
+		# Make sure when the user sets up the environment, they also get
+		# the buildtools-tarball tools in their path.
+		echo ". $target_sdk_dir/buildtools/environment-setup*" >> $e
+		# Allow bitbake environment setup to be ran as part of this sdk.
+		echo "export OE_SKIP_SDK_CHECK=1" >> $e
 
-	# Allow bitbake environment setup to be ran as part of this sdk.
-	echo "export OE_SKIP_SDK_CHECK=1" >> $env_setup_script
+		# A bit of another hack, but we need this in the path only for devtool
+		# so put it at the end of $PATH.
+		echo "export PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $e
 
-	# A bit of another hack, but we need this in the path only for devtool
-	# so put it at the end of $PATH.
-	echo "export PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $env_setup_script
+		echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $e
 
-	echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script
+		# Warn if trying to use external bitbake and the ext SDK together
+		echo "(which bitbake > /dev/null 2>&1 && \
+			echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \
+			true" >> $e
+	done
 
-	# Warn if trying to use external bitbake and the ext SDK together
-	echo "(which bitbake > /dev/null 2>&1 && \
-		echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || \
-		true" >> $env_setup_script
 
 	if [ "$prepare_buildsystem" != "no" ]; then
 		printf "Preparing build system...\n"
@@ -610,7 +614,9 @@ sdk_ext_postinst() {
 			. $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && \
 			python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}'"
 		if [ $? -ne ]; then
-			echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script
+			for e in $env_setup_scripts; do
+				echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $e
+			done
 			exit 1
 			rm $target_sdk_dir/ext-sdk-prepare.py
 		fi
@@ -641,10 +647,11 @@ fakeroot python do_populate_sdk_ext() {
 def get_ext_sdk_depends(d):
     # Note: the deps varflag is a list not a string, so we need to specify expand=False
     deps = d.getVarFlag('do_image_complete', 'deps', False)
-    pn = d.getVar('PN', True)
-    deplist = ['%s:%s' % (pn, dep) for dep in deps]
-    for task in ['do_image_complete', 'do_rootfs', 'do_build']:
-        deplist.extend((d.getVarFlag(task, 'depends', True) or '').split())
+    deplist = []
+    for pn in multilib_pkg_extend(d, d.getVar('BPN', True)).split():
+        deplist += ['%s:%s' % (pn, dep) for dep in deps]
+        for task in ['do_image_complete', 'do_rootfs', 'do_build']:
+            deplist.extend((d.getVarFlag(task, 'depends', True) or '').split())
     return ' '.join(deplist)
 
 python do_sdk_depends() {
-- 
2.10.2



^ permalink raw reply related

* [PATCH v2] libxkbcommon: 0.6.1 -> 0.7.0
From: Huang Qiyu @ 2016-12-14 13:04 UTC (permalink / raw)
  To: openembedded-core

1)Upgrade libxkbcommon from 0.6.1 to 0.7.0.
2)License checksum changed,since the copyright years were updated.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
---
 .../xorg-lib/{libxkbcommon_0.6.1.bb => libxkbcommon_0.7.0.bb}       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-graphics/xorg-lib/{libxkbcommon_0.6.1.bb => libxkbcommon_0.7.0.bb} (74%)

diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
similarity index 74%
rename from meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
rename to meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
index fc08109..a6836d8 100644
--- a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
+++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
@@ -2,15 +2,15 @@ SUMMARY = "Generic XKB keymap library"
 DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
 processes a reduced subset of keymaps as defined by the XKB specification."
 HOMEPAGE = "http://www.xkbcommon.org"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=09457b156e3155972abebcaaaa0cb434"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e525ed9809e1f8a07cf4bce8b09e8b87"
 LICENSE = "MIT & MIT-style"
 
 DEPENDS = "util-macros flex-native bison-native"
 
 SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
 
-SRC_URI[md5sum] = "67a8f322b5fa32352272e811bb90dd73"
-SRC_URI[sha256sum] = "5b0887b080b42169096a61106661f8d35bae783f8b6c58f97ebcd3af83ea8760"
+SRC_URI[md5sum] = "61ba550fc529ea4d6f9faa2cad62c95f"
+SRC_URI[sha256sum] = "09351592312d67b438655f54da5b67853026662c4a57e6be4d225f04a9989798"
 
 UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
 
-- 
2.7.4





^ permalink raw reply related

* Re: [PATCH] libxkbcommon: 0.6.1 -> 0.7.0
From: Robert Yang @ 2016-12-14  3:46 UTC (permalink / raw)
  To: Huang Qiyu, openembedded-core
In-Reply-To: <1481715249-1985-1-git-send-email-huangqy.fnst@cn.fujitsu.com>



On 12/14/2016 07:34 PM, Huang Qiyu wrote:
> 1)Upgrade libxkbcommon from 0.6.1 to 0.7.0.
> 2)License checksum changes are not related to license changes.

You need add what is changed, for example, year or space ?

// Robert

>
> Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
> ---
>  .../xorg-lib/{libxkbcommon_0.6.1.bb => libxkbcommon_0.7.0.bb}       | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>  rename meta/recipes-graphics/xorg-lib/{libxkbcommon_0.6.1.bb => libxkbcommon_0.7.0.bb} (74%)
>
> diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
> similarity index 74%
> rename from meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
> rename to meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
> index fc08109..a6836d8 100644
> --- a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
> +++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
> @@ -2,15 +2,15 @@ SUMMARY = "Generic XKB keymap library"
>  DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
>  processes a reduced subset of keymaps as defined by the XKB specification."
>  HOMEPAGE = "http://www.xkbcommon.org"
> -LIC_FILES_CHKSUM = "file://LICENSE;md5=09457b156e3155972abebcaaaa0cb434"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=e525ed9809e1f8a07cf4bce8b09e8b87"
>  LICENSE = "MIT & MIT-style"
>
>  DEPENDS = "util-macros flex-native bison-native"
>
>  SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
>
> -SRC_URI[md5sum] = "67a8f322b5fa32352272e811bb90dd73"
> -SRC_URI[sha256sum] = "5b0887b080b42169096a61106661f8d35bae783f8b6c58f97ebcd3af83ea8760"
> +SRC_URI[md5sum] = "61ba550fc529ea4d6f9faa2cad62c95f"
> +SRC_URI[sha256sum] = "09351592312d67b438655f54da5b67853026662c4a57e6be4d225f04a9989798"
>
>  UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
>
>


^ permalink raw reply

* [PATCH] libxkbcommon: 0.6.1 -> 0.7.0
From: Huang Qiyu @ 2016-12-14 11:34 UTC (permalink / raw)
  To: openembedded-core

1)Upgrade libxkbcommon from 0.6.1 to 0.7.0.
2)License checksum changes are not related to license changes.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
---
 .../xorg-lib/{libxkbcommon_0.6.1.bb => libxkbcommon_0.7.0.bb}       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-graphics/xorg-lib/{libxkbcommon_0.6.1.bb => libxkbcommon_0.7.0.bb} (74%)

diff --git a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
similarity index 74%
rename from meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
rename to meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
index fc08109..a6836d8 100644
--- a/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
+++ b/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.0.bb
@@ -2,15 +2,15 @@ SUMMARY = "Generic XKB keymap library"
 DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
 processes a reduced subset of keymaps as defined by the XKB specification."
 HOMEPAGE = "http://www.xkbcommon.org"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=09457b156e3155972abebcaaaa0cb434"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e525ed9809e1f8a07cf4bce8b09e8b87"
 LICENSE = "MIT & MIT-style"
 
 DEPENDS = "util-macros flex-native bison-native"
 
 SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
 
-SRC_URI[md5sum] = "67a8f322b5fa32352272e811bb90dd73"
-SRC_URI[sha256sum] = "5b0887b080b42169096a61106661f8d35bae783f8b6c58f97ebcd3af83ea8760"
+SRC_URI[md5sum] = "61ba550fc529ea4d6f9faa2cad62c95f"
+SRC_URI[sha256sum] = "09351592312d67b438655f54da5b67853026662c4a57e6be4d225f04a9989798"
 
 UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
 
-- 
2.7.4





^ permalink raw reply related

* Re: [PATCH] glibc: add -fno-builtin-strlen when not using -O2
From: Huang, Jie (Jackie) @ 2016-12-14  2:38 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CAJ86T=Xw9JAQDE+qPKX3T00VYHP0Kt7s47Yh3cNxzpZpc5Pp0w@mail.gmail.com>



> -----Original Message-----
> From: Andre McCurdy [mailto:armccurdy@gmail.com]
> Sent: Tuesday, December 13, 2016 5:17 PM
> To: Huang, Jie (Jackie)
> Cc: Khem Raj; Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH] glibc: add -fno-builtin-strlen when not using -O2
> 
> On Mon, Dec 12, 2016 at 9:14 PM, Huang, Jie (Jackie)
> <Jackie.Huang@windriver.com> wrote:
> >> From: Andre McCurdy [mailto:armccurdy@gmail.com]
> >> For reference, here's the patch I've been using. It's a slightly more
> >> generic fix than the one in the KDE bug report.
> >
> > Thanks, It's a better patch and I will take it and send as v2 of this issue if you're
> > not going to send it yourself, is it fine for you and could you provide extra info
> > for the patch header like, upstream-status, written by or Signed-off-by?
> 
> Sure. I forget why I didn't submit this at the time. The full patch is:

Thanks, I rebased the patch since valgrind updated  and sent v2 for this issue:

[OE-core] [v2][PATCH] valgrind: make ld-XXX.so strlen intercept optional

Thanks,
Jackie


> 
> From d34e2a50ca5493f5a0ce9ccad83a36ac33689266 Mon Sep 17 00:00:00 2001
> From: Andre McCurdy <armccurdy@gmail.com>
> Date: Fri, 12 Feb 2016 18:22:12 -0800
> Subject: [PATCH] make ld-XXX.so strlen intercept optional
> 
> Hack: Depending on how glibc was compiled (e.g. optimised for size or
> built with _FORTIFY_SOURCE enabled) the strlen symbol might not be
> found in ld-XXX.so. Therefore although we should still try to
> intercept it, don't make it mandatory to do so.
> 
> Upstream-Status: Inappropriate
> 
> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> ---
>  coregrind/m_redir.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c
> index 7e4df8d..640a346 100644
> --- a/coregrind/m_redir.c
> +++ b/coregrind/m_redir.c
> @@ -1220,7 +1220,18 @@ static void add_hardwired_spec (const  HChar*
> sopatt, const HChar* fnpatt,
>     spec->from_fnpatt = CONST_CAST(HChar *,fnpatt);
>     spec->to_addr     = to_addr;
>     spec->isWrap      = False;
> -   spec->mandatory   = mandatory;
> +
> +   /* Hack: Depending on how glibc was compiled (e.g. optimised for size or
> +      built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found.
> +      Therefore although we should still try to intercept it, don't make it
> +      mandatory to do so. We over-ride "mandatory" here to avoid the need to
> +      patch the many different architecture specific callers to
> +      add_hardwired_spec(). */
> +   if (0==VG_(strcmp)("strlen", fnpatt))
> +      spec->mandatory = NULL;
> +   else
> +      spec->mandatory = mandatory;
> +
>     /* VARIABLE PARTS */
>     spec->mark        = False; /* not significant */
>     spec->done        = False; /* not significant */
> --
> 1.9.1

^ permalink raw reply

* Re: [PATCH 1/8] populate_sdk_ext.bbclass: install multilib targets as populate_sdk does
From: Paul Eggleton @ 2016-12-14  2:34 UTC (permalink / raw)
  To: Robert Yang; +Cc: openembedded-core
In-Reply-To: <78c1e5e2-2f42-97e3-fd2b-f4f72123e6b6@windriver.com>

On Wed, 14 Dec 2016 10:25:36 Robert Yang wrote:
> After I looked into the code again, these changes are related,
> so that I can't split them into 2, please see my comments inline.

I've replied inline.
 
> On 12/13/2016 12:55 PM, Paul Eggleton wrote:
> > There are a bunch of changes in here that don't relate to the multilib fix
> > - details below.
> > 
> > On Wed, 16 Nov 2016 22:19:30 Robert Yang wrote:
> >> Fixed:
> >> MACHINE = "qemux86-64"
> >> require conf/multilib.conf
> >> MULTILIBS = "multilib:lib32"
> >> DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
> >> 
> >> $ bitbake core-image-minimal -cpopulate_sdk_ext
> >> [snip]
> >> Testing
> >> /buildarea/lyang1/test_po/tmp/work/qemux86_64-poky-linux/core-image-minim
> >> al
> >> /1.0-r0/testsdkext//tc/environment-setup-x86-pokymllib32-linux test_cvs
> >> (oeqa.sdk.buildcvs.BuildCvsTest) ... FAIL
> >> [snip]
> >> 
> >> It was failed because no lib32 toolchains.
> >> 
> >> The fixes include:
> >> * Set SDK_TARGETS correctly
> >> * Return multilib depends in get_ext_sdk_depends()
> >> * Write information to all environment-setup-* scripts.
> >> 
> >> [YOCTO #10647]
> >> 
> >> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> >> ---
> >> 
> >>  meta/classes/populate_sdk_ext.bbclass | 61
> >> 
> >> ++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 23
> >> deletions(-)
> >> 
> >> diff --git a/meta/classes/populate_sdk_ext.bbclass
> >> b/meta/classes/populate_sdk_ext.bbclass index 26b5ca6..ce9c40a 100644
> >> --- a/meta/classes/populate_sdk_ext.bbclass
> >> +++ b/meta/classes/populate_sdk_ext.bbclass
> >> @@ -39,7 +39,7 @@ SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
> >> 
> >>  SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
> >>  SDK_UPDATE_URL ?= ""
> >> 
> >> -SDK_TARGETS ?= "${PN}"
> >> +SDK_TARGETS ?= "${@multilib_pkg_extend(d, d.getVar('BPN', True))}"
> >> 
> >>  def get_sdk_install_targets(d, images_only=False):
> >>      sdk_install_targets = ''
> >> 
> >> @@ -562,38 +562,52 @@ SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext =
> >> "${sdk_ext_preinst}" sdk_ext_postinst() {
> >> 
> >>  	printf "\nExtracting buildtools...\n"
> >>  	cd $target_sdk_dir
> >> 
> >> -	env_setup_script="$target_sdk_dir/environment-
> > 
> > setup-${REAL_MULTIMACH_TARGE
> > 
> >> T_SYS}" 
> >> -	printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} >
> >> buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ;
> >> cat buildtools.log ; echo "printf 'ERROR: this SDK was not fully
> >> installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
> >> +	env_setup_scripts="`ls $target_sdk_dir/environment-setup-*`"
> >> +	./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
> >> +	if [ $? -ne 0 ]; then
> >> +		echo 'ERROR: buildtools installation failed:'
> >> +		cat buildtools.log
> >> +		for e in $env_setup_scripts; do
> >> +			echo "echo 'ERROR: this SDK was not fully installed and needs
> >> reinstalling'" >> $e +		done
> >> +		exit 1
> >> +	fi
> > 
> > This change isn't entirely related to the multilib changes.
> 
> The old code only considers one env_setup_script, but there are multiple
> ones now, so they are related.

Yes, I understand that. What I meant was, you've unrolled the single line 
*and* added handling for multiple env setup scripts - both are good changes 
but I'd like to see them in separate patches so that it's clear what's being 
done.

> >>  		# dash which is /bin/sh on Ubuntu will not preserve the
> >>  		# current working directory when first ran, nor will it set $1
> >>  		when
> >>  		# sourcing a script. That is why this has to look so ugly.
> >>  		LOGFILE="$target_sdk_dir/preparing_build_system.log"
> >> 
> >> -		sh -c ". buildtools/environment-setup* > $LOGFILE && cd
> >> $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set
> >> $target_sdk_dir
> >> && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >>
> >> $LOGFILE
> >> && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE
> >> '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not
> >> fully
> >> installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
> >> -		rm $target_sdk_dir/ext-sdk-prepare.py
> >> +		sh -c ". buildtools/environment-setup* > $LOGFILE && cd
> >> $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set
> >> $target_sdk_dir
> >> && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >>
> >> $LOGFILE
> >> && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE
> >> '${SDK_INSTALL_TARGETS}'" +		if [ $? -ne 0 ]; then
> >> +			for e in $env_setup_scripts; do
> >> +				echo "echo 'ERROR: this SDK was not fully installed and
> >> needs reinstalling'" >> $e +			done
> >> +			exit 1
> >> +		fi
> >> +		rm -f $target_sdk_dir/ext-sdk-prepare.py
> > 
> > That last line is also unrelated.
> 
> The old code only considers one env_setup_script, but there are multiple
> ones now, so they are related.

Specifically in the last line you are doing rm -f. That is a change from rm 
previously. Again, there's nothing wrong with that, but it's not related to 
the multilib handling.

Thanks,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply

* [v2][PATCH] valgrind: make ld-XXX.so strlen intercept optional
From: jackie.huang @ 2016-12-14  2:26 UTC (permalink / raw)
  To: openembedded-core

From: Jackie Huang <jackie.huang@windriver.com>

Hack: Depending on how glibc was compiled (e.g. optimised
for size or built with _FORTIFY_SOURCE enabled) the strlen
symbol might not be found in ld-XXX.so. Therefore although
we should still try to intercept it, don't make it mandatory
to do so.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 ...-make-ld-XXX.so-strlen-intercept-optional.patch | 45 ++++++++++++++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.12.0.bb  |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch

diff --git a/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch b/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch
new file mode 100644
index 0000000..d04297d
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch
@@ -0,0 +1,45 @@
+From 005bd11809a1ce65e9f2c28e884354a4741650b9 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 13 Dec 2016 11:29:55 +0800
+Subject: [PATCH] make ld-XXX.so strlen intercept optional
+
+Hack: Depending on how glibc was compiled (e.g. optimised for size or
+built with _FORTIFY_SOURCE enabled) the strlen symbol might not be
+found in ld-XXX.so. Therefore although we should still try to
+intercept it, don't make it mandatory to do so.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ coregrind/m_redir.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c
+index ff35009..d7d6816 100644
+--- a/coregrind/m_redir.c
++++ b/coregrind/m_redir.c
+@@ -1275,7 +1275,18 @@ static void add_hardwired_spec (const  HChar* sopatt, const HChar* fnpatt,
+    spec->to_addr     = to_addr;
+    spec->isWrap      = False;
+    spec->isGlobal    = False;
+-   spec->mandatory   = mandatory;
++
++   /* Hack: Depending on how glibc was compiled (e.g. optimised for size or
++      built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found.
++      Therefore although we should still try to intercept it, don't make it
++      mandatory to do so. We over-ride "mandatory" here to avoid the need to
++      patch the many different architecture specific callers to
++      add_hardwired_spec(). */
++   if (0==VG_(strcmp)("strlen", fnpatt))
++      spec->mandatory = NULL;
++   else
++      spec->mandatory = mandatory;
++
+    /* VARIABLE PARTS */
+    spec->mark        = False; /* not significant */
+    spec->done        = False; /* not significant */
+-- 
+1.9.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
index 233ff47..5c3002f 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
@@ -22,6 +22,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
            file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
            file://avoid-neon-for-targets-which-don-t-support-it.patch \
+           file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \
 "
 SRC_URI_append_libc-musl = "\
            file://0001-fix-build-for-musl-targets.patch \
-- 
2.8.3



^ permalink raw reply related

* Re: [PATCH 1/8] populate_sdk_ext.bbclass: install multilib targets as populate_sdk does
From: Robert Yang @ 2016-12-14  2:25 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core
In-Reply-To: <7337875.m9BQhVBZV7@peggleto-mobl.ger.corp.intel.com>


Hi Paul,

After I looked into the code again, these changes are related,
so that I can't split them into 2, please see my comments inline.

On 12/13/2016 12:55 PM, Paul Eggleton wrote:
> Hi Robert,
>
> There are a bunch of changes in here that don't relate to the multilib fix -
> details below.
>
> On Wed, 16 Nov 2016 22:19:30 Robert Yang wrote:
>> Fixed:
>> MACHINE = "qemux86-64"
>> require conf/multilib.conf
>> MULTILIBS = "multilib:lib32"
>> DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
>>
>> $ bitbake core-image-minimal -cpopulate_sdk_ext
>> [snip]
>> Testing
>> /buildarea/lyang1/test_po/tmp/work/qemux86_64-poky-linux/core-image-minimal
>> /1.0-r0/testsdkext//tc/environment-setup-x86-pokymllib32-linux test_cvs
>> (oeqa.sdk.buildcvs.BuildCvsTest) ... FAIL
>> [snip]
>>
>> It was failed because no lib32 toolchains.
>>
>> The fixes include:
>> * Set SDK_TARGETS correctly
>> * Return multilib depends in get_ext_sdk_depends()
>> * Write information to all environment-setup-* scripts.
>>
>> [YOCTO #10647]
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>  meta/classes/populate_sdk_ext.bbclass | 61
>> ++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 23
>> deletions(-)
>>
>> diff --git a/meta/classes/populate_sdk_ext.bbclass
>> b/meta/classes/populate_sdk_ext.bbclass index 26b5ca6..ce9c40a 100644
>> --- a/meta/classes/populate_sdk_ext.bbclass
>> +++ b/meta/classes/populate_sdk_ext.bbclass
>> @@ -39,7 +39,7 @@ SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
>>  SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
>>  SDK_UPDATE_URL ?= ""
>>
>> -SDK_TARGETS ?= "${PN}"
>> +SDK_TARGETS ?= "${@multilib_pkg_extend(d, d.getVar('BPN', True))}"
>>
>>  def get_sdk_install_targets(d, images_only=False):
>>      sdk_install_targets = ''
>> @@ -562,38 +562,52 @@ SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext =
>> "${sdk_ext_preinst}" sdk_ext_postinst() {
>>  	printf "\nExtracting buildtools...\n"
>>  	cd $target_sdk_dir
>> -	env_setup_script="$target_sdk_dir/environment-
> setup-${REAL_MULTIMACH_TARGE
>> T_SYS}" -	printf "buildtools\ny" | ./${SDK_BUILDTOOLS_INSTALLER} >
>> buildtools.log || { printf 'ERROR: buildtools installation failed:\n' ; cat
>> buildtools.log ; echo "printf 'ERROR: this SDK was not fully installed and
>> needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
>> +	env_setup_scripts="`ls $target_sdk_dir/environment-setup-*`"
>> +	./${SDK_BUILDTOOLS_INSTALLER} -d buildtools -y > buildtools.log
>> +	if [ $? -ne 0 ]; then
>> +		echo 'ERROR: buildtools installation failed:'
>> +		cat buildtools.log
>> +		for e in $env_setup_scripts; do
>> +			echo "echo 'ERROR: this SDK was not fully installed and needs
>> reinstalling'" >> $e +		done
>> +		exit 1
>> +	fi
>>
>
> This change isn't entirely related to the multilib changes.

The old code only considers one env_setup_script, but there are multiple
ones now, so they are related.

>
>>  	# Delete the buildtools tar file since it won't be used again
>>  	rm -f ./${SDK_BUILDTOOLS_INSTALLER}
>>  	# We don't need the log either since it succeeded
>>  	rm -f buildtools.log
>>
>> -	# Make sure when the user sets up the environment, they also get
>> -	# the buildtools-tarball tools in their path.
>> -	echo ". $target_sdk_dir/buildtools/environment-setup*" >>
>> $env_setup_script -
>> -	# Allow bitbake environment setup to be ran as part of this sdk.
>> -	echo "export OE_SKIP_SDK_CHECK=1" >> $env_setup_script
>> +	for e in $env_setup_scripts; do
>> +		# Make sure when the user sets up the environment, they also get
>> +		# the buildtools-tarball tools in their path.
>> +		echo ". $target_sdk_dir/buildtools/environment-setup*" >> $e
>>
>> -	# A bit of another hack, but we need this in the path only for devtool
>> -	# so put it at the end of $PATH.
>> -	echo "export
>> PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >>
>> $env_setup_script +		# Allow bitbake environment setup to be ran as part
> of
>> this sdk. +		echo "export OE_SKIP_SDK_CHECK=1" >> $e
>>
>> -	echo "printf 'SDK environment now set up; additionally you may now run
>> devtool to perform development tasks.\nRun devtool --help for further
>> details.\n'" >> $env_setup_script -
>> -	# Warn if trying to use external bitbake and the ext SDK together
>> -	echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use
>> the extensible SDK in an environment set up to run bitbake - this may lead
>> to unexpected results. Please source this script in a new shell session
>> instead.') || true" >> $env_setup_script +		# A bit of another hack, but
> we
>> need this in the path only for devtool +		# so put it at the end of
> $PATH.
>> +		echo "export
>> PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $e
>> +		echo "printf 'SDK environment now set up; additionally you may now
> run
>> devtool to perform development tasks.\nRun devtool --help for further
>> details.\n'" >> $e +		# Warn if trying to use external bitbake and the
> ext
>> SDK together +		echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING:
>> attempting to use the extensible SDK in an environment set up to run
>> bitbake - this may lead to unexpected results. Please source this script in
>> a new shell session instead.') || true" >> $e +	done
>>
>>  	if [ "$prepare_buildsystem" != "no" ]; then
>> -		printf "Preparing build system...\n"
>> +		echo "Preparing build system..."
>
> Why did you change this?

Will drop this in V2.


>
>>  		# dash which is /bin/sh on Ubuntu will not preserve the
>>  		# current working directory when first ran, nor will it set $1 when
>>  		# sourcing a script. That is why this has to look so ugly.
>>  		LOGFILE="$target_sdk_dir/preparing_build_system.log"
>> -		sh -c ". buildtools/environment-setup* > $LOGFILE && cd
>> $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir
>> && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE
>> && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE
>> '${SDK_INSTALL_TARGETS}'" || { echo "printf 'ERROR: this SDK was not fully
>> installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
>> -		rm $target_sdk_dir/ext-sdk-prepare.py
>> +		sh -c ". buildtools/environment-setup* > $LOGFILE && cd
>> $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir
>> && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE
>> && python $target_sdk_dir/ext-sdk-prepare.py $LOGFILE
>> '${SDK_INSTALL_TARGETS}'" +		if [ $? -ne 0 ]; then
>> +			for e in $env_setup_scripts; do
>> +				echo "echo 'ERROR: this SDK was not fully installed and needs
>> reinstalling'" >> $e +			done
>> +			exit 1
>> +		fi
>> +		rm -f $target_sdk_dir/ext-sdk-prepare.py
>
> That last line is also unrelated.

The old code only considers one env_setup_script, but there are multiple
ones now, so they are related.

// Robert

>
> Cheers,
> Paul
>


^ permalink raw reply

* Re: [PATCH] selftest/wic: extending test coverage for WIC script options
From: Jair Gonzalez @ 2016-12-14  0:24 UTC (permalink / raw)
  To: ed.bartosh; +Cc: openembedded-core
In-Reply-To: <20161213201722.GA6557@linux.intel.com>

Hi Ed,

Thank you for your response and suggestions. Below are my comments.

> -----Original Message-----
> From: Ed Bartosh [mailto:ed.bartosh@linux.intel.com]
> Sent: Tuesday, December 13, 2016 2:17 PM
> To: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] selftest/wic: extending test coverage for
WIC
> script options
> 
> Hi Jair,
> 
> Thank you for the patch! My comments are below.
> 
> On Tue, Dec 13, 2016 at 09:53:27AM -0600, Jair Gonzalez wrote:
> > The previous WIC script selftest didn't cover all of its command line
> > options. The following test cases were added to complete covering
> > them:
> >
> > 1552 Test wic --version
> > 1553 Test wic help create
> > 1554 Test wic help list
> > 1555 Test wic list images
> > 1556 Test wic list source-plugins
> > 1557 Test wic listed images help
> > 1558 Test wic debug, skip-build-check and build_rootfs
> > 1559 Test image vars directory selection
> > 1562 Test alternate output directory
> 
> > In addition, the following test cases were assigned an ID number on
> > Testopia:
> >
> > 1560 Test creation of systemd-bootdisk image
> > 1561 Test creation of sdimage-bootpart image
> >
> > Finally, part of the test methods were rearranged to group them by
> > functionality, and some cleanup was made to improve the code's
> > compliance with PEP8 style guide.
> 
> I'd suggest to split this patch to at least 3 patches:
> - new testcases (fix for YOCTO 10594)
> - assigning id numbers
> - removing WKS_FILE = "wic-image-minimal" from config
> - code cleanup
Agreed. I'll split it and submit the new patches.
> 
> > Fixes [YOCTO 10594]
> >
> > Signed-off-by: Jair Gonzalez
> > <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
> > ---
> >  meta/lib/oeqa/selftest/wic.py | 246
> > +++++++++++++++++++++++++++++-------------
> >  1 file changed, 174 insertions(+), 72 deletions(-)
> >
> > diff --git a/meta/lib/oeqa/selftest/wic.py
> > b/meta/lib/oeqa/selftest/wic.py index e652fad..46bfb94 100644
> > --- a/meta/lib/oeqa/selftest/wic.py
> > +++ b/meta/lib/oeqa/selftest/wic.py
> > @@ -37,13 +37,13 @@ class Wic(oeSelfTest):
> >      """Wic test class."""
> >
> >      resultdir = "/var/tmp/wic/build/"
> > +    alternate_resultdir = "/var/tmp/wic/build/alt/"
> >      image_is_ready = False
> >
> >      def setUpLocal(self):
> >          """This code is executed before each test method."""
> >          self.write_config('IMAGE_FSTYPES += " hddimg"\n'
> > -                          'MACHINE_FEATURES_append = " efi"\n'
> > -                          'WKS_FILE = "wic-image-minimal"\n')
> I like the change, but it should be also in a separate patch.
Agreed.
> 
> > +                          'MACHINE_FEATURES_append = " efi"\n')
> >
> >          # Do this here instead of in setUpClass as the base setUp does
some
> >          # clean up which can result in the native tools built earlier
> > in @@ -56,10 +56,16 @@ class Wic(oeSelfTest):
> >
> >          rmtree(self.resultdir, ignore_errors=True)
> >
> > +    @testcase(1552)
> > +    def test_version(self):
> > +        """Test wic --version"""
> > +        self.assertEqual(0, runCmd('wic --version').status)
> > +
> >      @testcase(1208)
> >      def test_help(self):
> > -        """Test wic --help"""
> > +        """Test wic --help and wic -h"""
> >          self.assertEqual(0, runCmd('wic --help').status)
> > +        self.assertEqual(0, runCmd('wic -h').status)
> >      @testcase(1209)
> >      def test_createhelp(self):
> > @@ -71,19 +77,74 @@ class Wic(oeSelfTest):
> >          """Test wic list --help"""
> >          self.assertEqual(0, runCmd('wic list --help').status)
> >
> > +    @testcase(1553)
> > +    def test_help_create(self):
> > +        """Test wic help create"""
> > +        self.assertEqual(0, runCmd('wic help create').status)
> > +
> > +    @testcase(1554)
> > +    def test_help_list(self):
> > +        """Test wic help list"""
> > +        self.assertEqual(0, runCmd('wic help list').status)
> > +
> > +    @testcase(1215)
> > +    def test_help_overview(self):
> > +        """Test wic help overview"""
> > +        self.assertEqual(0, runCmd('wic help overview').status)
> > +
> > +    @testcase(1216)
> > +    def test_help_plugins(self):
> > +        """Test wic help plugins"""
> > +        self.assertEqual(0, runCmd('wic help plugins').status)
> > +
> > +    @testcase(1217)
> > +    def test_help_kickstart(self):
> > +        """Test wic help kickstart"""
> > +        self.assertEqual(0, runCmd('wic help kickstart').status)
> > +
> > +    @testcase(1555)
> > +    def test_list_images(self):
> > +        """Test wic list images"""
> > +        self.assertEqual(0, runCmd('wic list images').status)
> > +
> > +    @testcase(1556)
> > +    def test_list_source_plugins(self):
> > +        """Test wic list source-plugins"""
> > +        self.assertEqual(0, runCmd('wic list source-plugins').status)
> > +
> > +    @testcase(1557)
> > +    def test_listed_images_help(self):
> > +        """Test wic listed images help"""
> > +        output = runCmd('wic list images').output
> > +        imageDetails = [line.split() for line in output.split('\n')]
> > +        imageList = [row[0] for row in imageDetails]
> How about replacing two last lines with this?
> imagelist = [line.split()[0] for line in output.split('\n')]
I agree. What about this?
imagelist = [line.split()[0] for line in output.splitlines()]
> 
> > +        for image in imageList:
> > +            self.assertEqual(0, runCmd('wic list %s help' %
> > + image).status)
> > +
> > +    @testcase(1213)
> > +    def test_unsupported_subcommand(self):
> > +        """Test unsupported subcommand"""
> > +        self.assertEqual(1, runCmd('wic unsupported',
> > +                                   ignore_status=True).status)
> > +
> > +    @testcase(1214)
> > +    def test_no_command(self):
> > +        """Test wic without command"""
> > +        self.assertEqual(1, runCmd('wic', ignore_status=True).status)
> > +
> >      @testcase(1211)
> >      def test_build_image_name(self):
> >          """Test wic create directdisk --image-name
core-image-minimal"""
> >          self.assertEqual(0, runCmd("wic create directdisk "
> > -                                   "--image-name
core-image-minimal").status)
> > +
> > + "--image-name=core-image-minimal").status)
> Is '=' mandatory here?
On wic's help it appears as mandatory, but on practice, it can be used both
ways. I decided to use both ways along the module to test both usages and
increase coverage, but not to dedicate specific test cases to each
combination.
> 
> >          self.assertEqual(1, len(glob(self.resultdir +
> > "directdisk-*.direct")))
> >
> >      @testcase(1212)
> >      def test_build_artifacts(self):
> >          """Test wic create directdisk providing all artifacts."""
> > -        bbvars = dict((var.lower(), get_bb_var(var,
'core-image-minimal')) \
> > -                        for var in ('STAGING_DATADIR',
'DEPLOY_DIR_IMAGE',
> > -                                    'STAGING_DIR_NATIVE',
'IMAGE_ROOTFS'))
> > +        bbvars = dict((var.lower(), get_bb_var(var,
'core-image-minimal'))
> > +                      for var in ('STAGING_DATADIR',
'DEPLOY_DIR_IMAGE',
> > +                                  'STAGING_DIR_NATIVE',
> > + 'IMAGE_ROOTFS'))
> >          status = runCmd("wic create directdisk "
> >                          "-b %(staging_datadir)s "
> >                          "-k %(deploy_dir_image)s "
> > @@ -96,113 +157,110 @@ class Wic(oeSelfTest):
> >      def test_gpt_image(self):
> >          """Test creation of core-image-minimal with gpt table and UUID
> boot"""
> >          self.assertEqual(0, runCmd("wic create directdisk-gpt "
> > -                                   "--image-name
core-image-minimal").status)
> > +                                   "--image-name core-image-minimal "
> > +                                   ).status)
> What does this fix?
It's to conform to PEP8 with equal or less than 79 chars per line.
> 
> >          self.assertEqual(1, len(glob(self.resultdir +
> > "directdisk-*.direct")))
> >
> > -    @testcase(1213)
> > -    def test_unsupported_subcommand(self):
> > -        """Test unsupported subcommand"""
> > -        self.assertEqual(1, runCmd('wic unsupported',
> > -                                   ignore_status=True).status)
> > -
> > -    @testcase(1214)
> > -    def test_no_command(self):
> > -        """Test wic without command"""
> > -        self.assertEqual(1, runCmd('wic', ignore_status=True).status)
> > -
> > -    @testcase(1215)
> > -    def test_help_overview(self):
> > -        """Test wic help overview"""
> > -        self.assertEqual(0, runCmd('wic help overview').status)
> > -
> > -    @testcase(1216)
> > -    def test_help_plugins(self):
> > -        """Test wic help plugins"""
> > -        self.assertEqual(0, runCmd('wic help plugins').status)
> > -
> > -    @testcase(1217)
> > -    def test_help_kickstart(self):
> > -        """Test wic help kickstart"""
> > -        self.assertEqual(0, runCmd('wic help kickstart').status)
> > -
> >      @testcase(1264)
> >      def test_compress_gzip(self):
> >          """Test compressing an image with gzip"""
> >          self.assertEqual(0, runCmd("wic create directdisk "
> > -                                   "--image-name core-image-minimal "
> > +                                   "-e core-image-minimal "
> --image-name is more readable than -e from my point of view.
Similarly to the '=' to define long option names' arguments, I used both
forms of each option along the module to increase coverage.
> 
> >                                     "-c gzip").status)
> > -        self.assertEqual(1, len(glob(self.resultdir + \
> > -                                         "directdisk-*.direct.gz")))
> > +        self.assertEqual(1, len(glob(self.resultdir +
> > +                                     "directdisk-*.direct.gz")))
> >
> >      @testcase(1265)
> >      def test_compress_bzip2(self):
> >          """Test compressing an image with bzip2"""
> >          self.assertEqual(0, runCmd("wic create directdisk "
> > -                                   "--image-name core-image-minimal "
> > +                                   "--image-name=core-image-minimal "
> >                                     "-c bzip2").status)
> > -        self.assertEqual(1, len(glob(self.resultdir + \
> > -                                         "directdisk-*.direct.bz2")))
> > +        self.assertEqual(1, len(glob(self.resultdir +
> > +                                     "directdisk-*.direct.bz2")))
> >
> >      @testcase(1266)
> >      def test_compress_xz(self):
> >          """Test compressing an image with xz"""
> >          self.assertEqual(0, runCmd("wic create directdisk "
> > -                                   "--image-name core-image-minimal "
> > -                                   "-c xz").status)
> > -        self.assertEqual(1, len(glob(self.resultdir + \
> > -                                         "directdisk-*.direct.xz")))
> > +                                   "--image-name=core-image-minimal "
> > +                                   "--compress-with=xz").status)
> > +        self.assertEqual(1, len(glob(self.resultdir +
> > +                                     "directdisk-*.direct.xz")))
> >
> >      @testcase(1267)
> >      def test_wrong_compressor(self):
> >          """Test how wic breaks if wrong compressor is provided"""
> >          self.assertEqual(2, runCmd("wic create directdisk "
> > -                                   "--image-name core-image-minimal "
> > +                                   "--image-name=core-image-minimal "
> >                                     "-c wrong",
> > ignore_status=True).status)
> >
> > +    @testcase(1558)
> > +    def test_debug_skip_build_check_and_build_rootfs(self):
> > +        """Test wic debug, skip-build-check and build_rootfs"""
> > +        self.assertEqual(0, runCmd("wic create directdisk "
> > +                                   "--image-name=core-image-minimal "
> > +                                   "-D -s -f").status)
> > +        self.assertEqual(1, len(glob(self.resultdir +
"directdisk-*.direct")))
> > +        self.assertEqual(0, runCmd("wic create directdisk "
> > +                                   "--image-name=core-image-minimal "
> > +                                   "--debug "
> > +                                   "--skip-build-check "
> > +                                   "--build-rootfs").status)
> > +        self.assertEqual(1, len(glob(self.resultdir +
> > + "directdisk-*.direct")))
> > +
> I'd split this to two test cases as they're testing two different options.
Actually, those are three different options (with their short and long
versions). I did this to not add too many test cases, but as you mention,
probably it's better to separate them by option to make it clearer.
> 
> >      @testcase(1268)
> >      def test_rootfs_indirect_recipes(self):
> >          """Test usage of rootfs plugin with rootfs recipes"""
> >          wks = "directdisk-multi-rootfs"
> >          self.assertEqual(0, runCmd("wic create %s "
> > -                                   "--image-name core-image-minimal "
> > +                                   "--image-name=core-image-minimal "
> >                                     "--rootfs rootfs1=core-image-minimal
"
> > -                                   "--rootfs
rootfs2=core-image-minimal" \
> > +                                   "--rootfs
rootfs2=core-image-minimal"
> >                                     % wks).status)
> >          self.assertEqual(1, len(glob(self.resultdir + "%s*.direct" %
> > wks)))
> >
> >      @testcase(1269)
> >      def test_rootfs_artifacts(self):
> >          """Test usage of rootfs plugin with rootfs paths"""
> > -        bbvars = dict((var.lower(), get_bb_var(var,
'core-image-minimal')) \
> > -                        for var in ('STAGING_DATADIR',
'DEPLOY_DIR_IMAGE',
> > -                                    'STAGING_DIR_NATIVE',
'IMAGE_ROOTFS'))
> > +        bbvars = dict((var.lower(), get_bb_var(var,
'core-image-minimal'))
> > +                      for var in ('STAGING_DATADIR',
'DEPLOY_DIR_IMAGE',
> > +                                  'STAGING_DIR_NATIVE',
> > + 'IMAGE_ROOTFS'))
> >          bbvars['wks'] = "directdisk-multi-rootfs"
> >          status = runCmd("wic create %(wks)s "
> > -                        "-b %(staging_datadir)s "
> > -                        "-k %(deploy_dir_image)s "
> > -                        "-n %(staging_dir_native)s "
> > +                        "--bootimg-dir=%(staging_datadir)s "
> > +                        "--kernel-dir=%(deploy_dir_image)s "
> > +                        "--native-sysroot=%(staging_dir_native)s "
> >                          "--rootfs-dir rootfs1=%(image_rootfs)s "
> > -                        "--rootfs-dir rootfs2=%(image_rootfs)s" \
> > +                        "--rootfs-dir rootfs2=%(image_rootfs)s"
> >                          % bbvars).status
> >          self.assertEqual(0, status)
> > -        self.assertEqual(1, len(glob(self.resultdir + \
> > +        self.assertEqual(1, len(glob(self.resultdir +
> >                                       "%(wks)s-*.direct" % bbvars)))
> >
> >      @testcase(1346)
> >      def test_iso_image(self):
> >          """Test creation of hybrid iso image with legacy and EFI
boot"""
> >          self.assertEqual(0, runCmd("wic create mkhybridiso "
> > -                                   "--image-name
core-image-minimal").status)
> > -        self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-
> *.direct")))
> > -        self.assertEqual(1, len(glob(self.resultdir +
"HYBRID_ISO_IMG-*.iso")))
> > +                                   "--image-name core-image-minimal"
> > +                                   ).status)
> This is less readable. Is this only to fit the line into 80 chars?
> If so, let's not do it. Lines up to 100 chars long are more readable than
this I
> believe.
I changed it to conform to PEP8 and increase readability on editors adjusted
to 80 chars. However, if you consider it's better to leave it on 100 chars,
I could work within that.
> 
> > +        self.assertEqual(1, len(glob(self.resultdir +
> > +                                     "HYBRID_ISO_IMG-*.direct")))
> > +        self.assertEqual(1, len(glob(self.resultdir +
> > +                                     "HYBRID_ISO_IMG-*.iso")))
> > +
> The same thing. Full lines from previous code are more readable.
> 
> > +    def __get_image_env_path(self, image):
> Do you really need this to be mangled? one underscore should be enough.
Agreed, I'll change it.
> 
> > +        """Generate and obtain the path to <image>.env"""
> > +        self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' %
image).status)
> > +        stdir = get_bb_var('STAGING_DIR_TARGET', image)
> > +        imgdatadir = os.path.join(stdir, 'imgdata')
> > +        return imgdatadir
> Can we cache results here? This would speed up testing I guess.
> Something like this should be ok:
> 
> if image not in self.wicenv_cache:
>     self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' %
> image).status)
>     stdir = get_bb_var('STAGING_DIR_TARGET', image)
>     self.wicenv_cache[image] = os.path.join(stdir, 'imgdata')
> 
> return self.wicenv_cache[image]
Agreed, thanks. I'll try your suggestion.
> 
> >
> >      @testcase(1347)
> >      def test_image_env(self):
> > -        """Test generation of <image>.env files."""
> > +        """Test generation of <image>.env files"""
> >          image = 'core-image-minimal'
> > -        self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' %
image).status)
> > -        stdir = get_bb_var('STAGING_DIR_TARGET', image)
> > -        imgdatadir = os.path.join(stdir, 'imgdata')
> > +        imgdatadir = self.__get_image_env_path(image)
> >
> >          basename = get_bb_var('IMAGE_BASENAME', image)
> >          self.assertEqual(basename, image) @@ -220,6 +278,21 @@ class
> > Wic(oeSelfTest):
> >                  self.assertTrue(var in content, "%s is not in .env
file" % var)
> >                  self.assertTrue(content[var])
> >
> > +    @testcase(1559)
> > +    def test_image_vars_dir(self):
> > +        """Test image vars directory selection"""
> > +        image = 'core-image-minimal'
> > +        imgenvdir = self.__get_image_env_path(image)
> > +
> > +        self.assertEqual(0, runCmd("wic create directdisk "
> > +                                   "--image-name=%s "
> > +                                   "-v %s"
> > +                                   % (image, imgenvdir)).status)
> > +        self.assertEqual(0, runCmd("wic create directdisk "
> > +                                   "--image-name=%s "
> > +                                   "--vars %s"
> > +                                   % (image, imgenvdir)).status)
> > +
> Do we really want to test short and long variant of options?
> If so, we should do it for all options.
Within the module, all short and long variant of options are tested. Not all
combinations of long variants with '=' and without it are tested, though.
> 
> >      @testcase(1351)
> >      def test_wic_image_type(self):
> >          """Test building wic images by bitbake"""
> > @@ -239,7 +312,7 @@ class Wic(oeSelfTest):
> >      def test_qemux86_directdisk(self):
> >          """Test creation of qemux-86-directdisk image"""
> >          image = "qemux86-directdisk"
> > -        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal" \
> > +        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal"
> >                                     % image).status)
> >          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" %
> > image)))
> >
> > @@ -247,7 +320,8 @@ class Wic(oeSelfTest):
> >      def test_mkgummidisk(self):
> >          """Test creation of mkgummidisk image"""
> >          image = "mkgummidisk"
> > -        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal" \
> > +        self.assertEqual(0, runCmd("wic create %s --image-name "
> > +                                   "core-image-minimal"
> >                                     % image).status)
> >          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" %
> > image)))
> 
> I agree, this doesn't look good. How about dropping 'image' variable in
this
> and similar test cases?
> 
> cmd = "wic create mkgummidisk --image-name core-image-minimal"
> self.assertEqual(0, runCmd(cmd).status)
> 
> self.assertEqual(1, len(glob(self.resultdir + "mkgummidisk-*direct")))
> 
Agreed.
> > @@ -255,7 +329,7 @@ class Wic(oeSelfTest):
> >      def test_mkefidisk(self):
> >          """Test creation of mkefidisk image"""
> >          image = "mkefidisk"
> > -        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal" \
> > +        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal"
> >                                     % image).status)
> >          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" %
> > image)))
> >
> > @@ -263,11 +337,11 @@ class Wic(oeSelfTest):
> >      def test_directdisk_bootloader_config(self):
> >          """Test creation of directdisk-bootloader-config image"""
> >          image = "directdisk-bootloader-config"
> > -        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal" \
> > +        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal"
> >                                     % image).status)
> >          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" %
> > image)))
> >
> > -    @testcase(1422)
> > +    @testcase(1424)
> >      def test_qemu(self):
> >          """Test wic-image-minimal under qemu"""
> >          self.assertEqual(0, bitbake('wic-image-minimal').status)
> > @@ -275,28 +349,56 @@ class Wic(oeSelfTest):
> >          with runqemu('wic-image-minimal', ssh=False) as qemu:
> >              command = "mount |grep '^/dev/' | cut -f1,3 -d ' '"
> >              status, output = qemu.run_serial(command)
> > -            self.assertEqual(1, status, 'Failed to run command "%s":
%s' %
> (command, output))
> > +            self.assertEqual(1, status, 'Failed to run command "%s":
%s'
> > +                                        % (command, output))
> less readable
Same, PEP8, but I may change it to 100 chars instead.
> 
> >              self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
> >
> > +    @testcase(1496)
> >      def test_bmap(self):
> >          """Test generation of .bmap file"""
> >          image = "directdisk"
> > -        status = runCmd("wic create %s -e core-image-minimal --bmap" %
> image).status
> > +        status = runCmd("wic create %s -e core-image-minimal -m"
> > +                        % image).status
> less readable. --bmap is better to use here than -m.
Same, PEP8, but I may change it to 100 chars instead. Using -m and --bmap in
different test cases to increase coverage.
> 
> > +        self.assertEqual(0, status)
> > +        self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" %
image)))
> > +        self.assertEqual(1, len(glob(self.resultdir +
> > +                                     "%s-*direct.bmap" % image)))
> > +        status = runCmd("wic create %s -e core-image-minimal --bmap"
> > +                        % image).status
> >          self.assertEqual(0, status)
> >          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" %
image)))
> > -        self.assertEqual(1, len(glob(self.resultdir + "%s-*direct.bmap"
%
> image)))
> > +        self.assertEqual(1, len(glob(self.resultdir + "%s-*direct.bmap"
> > +                                                      % image)))
> >
> > +    @testcase(1560)
> >      def test_systemd_bootdisk(self):
> >          """Test creation of systemd-bootdisk image"""
> >          image = "systemd-bootdisk"
> > -        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal" \
> > +        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal"
> >                                     % image).status)
> >          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" %
> > image)))
> >
> > +    @testcase(1561)
> >      def test_sdimage_bootpart(self):
> >          """Test creation of sdimage-bootpart image"""
> >          image = "sdimage-bootpart"
> >          self.write_config('IMAGE_BOOT_FILES = "bzImage"\n')
> > -        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal" \
> > +        self.assertEqual(0, runCmd("wic create %s -e
core-image-minimal"
> >                                     % image).status)
> the same thing - it doesn't worth it to please PEP8 if it reduces code
> readability.
Same, PEP8, but I may change it to 100 chars instead.
> 
> >          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" %
> > image)))
> > +
> > +    @testcase(1562)
> > +    def test_alternate_output_dir(self):
> > +        """Test alternate output directory"""
> > +        self.assertEqual(0, runCmd("wic create directdisk "
> > +                                   "-e core-image-minimal "
> > +                                   "-o %s"
> > +                                   % self.alternate_resultdir).status)
> > +        self.assertEqual(1, len(glob(self.alternate_resultdir +
> > +                                     "build/directdisk-*.direct")))
> > +        self.assertEqual(0, runCmd("wic create mkefidisk -e "
> > +                                   "core-image-minimal "
> > +                                   "--outdir %s"
> > +                                   % self.alternate_resultdir).status)
> > +        self.assertEqual(1, len(glob(self.alternate_resultdir +
> > +                                     "build/mkefidisk-*direct")))
> Would one test be enough?
I'm using both output option variants to increase coverage.
> 
> BTW, did you measure how long does the test run before and after your
> changes? We should be careful here as this test runs on ab and makes
people
> wait longer for results.
Agreed. I didn't do it, but I'll measure it and take it into account for my
next update.
> 
> --
> Regards,
> Ed

Regards,
Jair



^ permalink raw reply

* [PATCH v3] uninative: rebuild uninative for gcc 4.8 and 4.9
From: Ed Bartosh @ 2016-12-13 23:55 UTC (permalink / raw)
  To: openembedded-core; +Cc: Paul Eggleton
In-Reply-To: <1976647.jAKzAtoRFl@peggleto-mobl.ger.corp.intel.com>

Some c++ libraries fail to build if uninative is built
with gcc 5.x and host gcc version is either 4.8 or 4.9.

The issue should be solved by making separate uninative sstate
directory structure sstate-cache/universal-<gcc version> for host gcc
versions 4.8 and 4.9. This causes rebuilds of uninative if host gcc
is either 4.8 or 4.9 and it doesn't match gcc version used to build
uninative.

[YOCTO #10441]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/classes/populate_sdk_ext.bbclass |  5 +++--
 meta/classes/uninative.bbclass        |  2 +-
 meta/lib/oe/utils.py                  | 14 ++++++++++++++
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 3c3a73c..1affa9d 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -374,8 +374,9 @@ python copy_buildsystem () {
 
     sstate_out = baseoutpath + '/sstate-cache'
     bb.utils.remove(sstate_out, True)
-    # uninative.bbclass sets NATIVELSBSTRING to 'universal'
-    fixedlsbstring = 'universal'
+
+    # uninative.bbclass sets NATIVELSBSTRING to 'universal%s' % oe.utils.host_gcc_version(d)
+    fixedlsbstring = "universal%s" % oe.utils.host_gcc_version(d)
 
     sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1')
     sdk_ext_type = d.getVar('SDK_EXT_TYPE', True)
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 9242320..11cbf9b 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -88,7 +88,7 @@ def enable_uninative(d):
     loader = d.getVar("UNINATIVE_LOADER", True)
     if os.path.exists(loader):
         bb.debug(2, "Enabling uninative")
-        d.setVar("NATIVELSBSTRING", "universal")
+        d.setVar("NATIVELSBSTRING", "universal%s" % oe.utils.host_gcc_version(d))
         d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
         d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
 
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index d6545b1..2b095f1 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -230,6 +230,20 @@ def format_pkg_list(pkg_dict, ret_format=None):
 
     return '\n'.join(output)
 
+def host_gcc_version(d):
+    compiler = d.getVar("BUILD_CC", True)
+    retval, output = getstatusoutput("%s --version" % compiler)
+    if retval:
+        bb.fatal("Error running %s --version: %s" % (compiler, output))
+
+    import re
+    match = re.match(".* (\d\.\d)\.\d.*", output.split('\n')[0])
+    if not match:
+        bb.fatal("Can't get compiler version from %s --version output" % compiler)
+
+    version = match.group(1)
+    return "-%s" % version if version in ("4.8", "4.9") else ""
+
 #
 # Python 2.7 doesn't have threaded pools (just multiprocessing)
 # so implement a version here
-- 
2.1.4



^ permalink raw reply related

* [PATCH] masterimage: ignore return status in case of ssh shutdown command
From: leonardo.sandoval.gonzalez @ 2016-12-13 21:27 UTC (permalink / raw)
  To: openembedded-core

From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>

There are reported cases (see bugzilla entry below) where ssh process
is killed by the shutdown command it runs, thus the ssh's return
status is non-zero. To ignore the ssh return status, a context manager decorador
is use together with the 'with' statement, ignoring the status of any command
run inside the later body.

[YOCTO #10101]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
---
 meta/lib/oeqa/controllers/masterimage.py | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py
index 9ce3bf8..1054fb4 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -16,6 +16,7 @@ import bb
 import traceback
 import time
 import subprocess
+from contextlib import contextmanager
 
 import oeqa.targetcontrol
 import oeqa.utils.sshcontrol as sshcontrol
@@ -24,6 +25,15 @@ from oeqa.utils import CommandError
 
 from abc import ABCMeta, abstractmethod
 
+@contextmanager
+def ignorestatus(conn):
+    previous = conn.ignore_status
+    conn.ignore_status = True
+    try:
+        yield conn
+    finally:
+        conn.ignore_status = previous
+
 class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta):
 
     supported_image_fstypes = ['tar.gz', 'tar.bz2']
@@ -103,8 +113,11 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
 
     def power_cycle(self, conn):
         if self.powercontrol_cmd:
-            # be nice, don't just cut power
-            conn.run("shutdown -h now")
+            # be nice, don't just cut power and ignore status just for shutdown cmd
+            # status is ignore because the ssh connection may be killed by the
+            # shutdown process, thus yielding a non-zero exit status
+            with c = ignorestatus(conn):
+                c.run("shutdown -h now")
             time.sleep(10)
             self.power_ctl("cycle")
         else:
-- 
2.1.4



^ permalink raw reply related

* Re: [PATCH] selftest/wic: extending test coverage for WIC script options
From: Ed Bartosh @ 2016-12-13 20:17 UTC (permalink / raw)
  To: Jair Gonzalez; +Cc: openembedded-core
In-Reply-To: <1481644407-16699-1-git-send-email-jair.de.jesus.gonzalez.plascencia@linux.intel.com>

Hi Jair,

Thank you for the patch! My comments are below.

On Tue, Dec 13, 2016 at 09:53:27AM -0600, Jair Gonzalez wrote:
> The previous WIC script selftest didn't cover all of its command
> line options. The following test cases were added to complete
> covering them:
> 
> 1552 Test wic --version
> 1553 Test wic help create
> 1554 Test wic help list
> 1555 Test wic list images
> 1556 Test wic list source-plugins
> 1557 Test wic listed images help
> 1558 Test wic debug, skip-build-check and build_rootfs
> 1559 Test image vars directory selection
> 1562 Test alternate output directory

> In addition, the following test cases were assigned an ID number on
> Testopia:
> 
> 1560 Test creation of systemd-bootdisk image
> 1561 Test creation of sdimage-bootpart image
> 
> Finally, part of the test methods were rearranged to group them by
> functionality, and some cleanup was made to improve the code's
> compliance with PEP8 style guide.

I'd suggest to split this patch to at least 3 patches:
- new testcases (fix for YOCTO 10594)
- assigning id numbers
- removing WKS_FILE = "wic-image-minimal" from config
- code cleanup

> Fixes [YOCTO 10594]
> 
> Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com>
> ---
>  meta/lib/oeqa/selftest/wic.py | 246 +++++++++++++++++++++++++++++-------------
>  1 file changed, 174 insertions(+), 72 deletions(-)
> 
> diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
> index e652fad..46bfb94 100644
> --- a/meta/lib/oeqa/selftest/wic.py
> +++ b/meta/lib/oeqa/selftest/wic.py
> @@ -37,13 +37,13 @@ class Wic(oeSelfTest):
>      """Wic test class."""
>  
>      resultdir = "/var/tmp/wic/build/"
> +    alternate_resultdir = "/var/tmp/wic/build/alt/"
>      image_is_ready = False
>  
>      def setUpLocal(self):
>          """This code is executed before each test method."""
>          self.write_config('IMAGE_FSTYPES += " hddimg"\n'
> -                          'MACHINE_FEATURES_append = " efi"\n'
> -                          'WKS_FILE = "wic-image-minimal"\n')
I like the change, but it should be also in a separate patch.

> +                          'MACHINE_FEATURES_append = " efi"\n')
>  
>          # Do this here instead of in setUpClass as the base setUp does some
>          # clean up which can result in the native tools built earlier in
> @@ -56,10 +56,16 @@ class Wic(oeSelfTest):
>  
>          rmtree(self.resultdir, ignore_errors=True)
>  
> +    @testcase(1552)
> +    def test_version(self):
> +        """Test wic --version"""
> +        self.assertEqual(0, runCmd('wic --version').status)
> +
>      @testcase(1208)
>      def test_help(self):
> -        """Test wic --help"""
> +        """Test wic --help and wic -h"""
>          self.assertEqual(0, runCmd('wic --help').status)
> +        self.assertEqual(0, runCmd('wic -h').status)
>      @testcase(1209)
>      def test_createhelp(self):
> @@ -71,19 +77,74 @@ class Wic(oeSelfTest):
>          """Test wic list --help"""
>          self.assertEqual(0, runCmd('wic list --help').status)
>  
> +    @testcase(1553)
> +    def test_help_create(self):
> +        """Test wic help create"""
> +        self.assertEqual(0, runCmd('wic help create').status)
> +
> +    @testcase(1554)
> +    def test_help_list(self):
> +        """Test wic help list"""
> +        self.assertEqual(0, runCmd('wic help list').status)
> +
> +    @testcase(1215)
> +    def test_help_overview(self):
> +        """Test wic help overview"""
> +        self.assertEqual(0, runCmd('wic help overview').status)
> +
> +    @testcase(1216)
> +    def test_help_plugins(self):
> +        """Test wic help plugins"""
> +        self.assertEqual(0, runCmd('wic help plugins').status)
> +
> +    @testcase(1217)
> +    def test_help_kickstart(self):
> +        """Test wic help kickstart"""
> +        self.assertEqual(0, runCmd('wic help kickstart').status)
> +
> +    @testcase(1555)
> +    def test_list_images(self):
> +        """Test wic list images"""
> +        self.assertEqual(0, runCmd('wic list images').status)
> +
> +    @testcase(1556)
> +    def test_list_source_plugins(self):
> +        """Test wic list source-plugins"""
> +        self.assertEqual(0, runCmd('wic list source-plugins').status)
> +
> +    @testcase(1557)
> +    def test_listed_images_help(self):
> +        """Test wic listed images help"""
> +        output = runCmd('wic list images').output
> +        imageDetails = [line.split() for line in output.split('\n')]
> +        imageList = [row[0] for row in imageDetails]
How about replacing two last lines with this?
imagelist = [line.split()[0] for line in output.split('\n')]

> +        for image in imageList:
> +            self.assertEqual(0, runCmd('wic list %s help' % image).status)
> +
> +    @testcase(1213)
> +    def test_unsupported_subcommand(self):
> +        """Test unsupported subcommand"""
> +        self.assertEqual(1, runCmd('wic unsupported',
> +                                   ignore_status=True).status)
> +
> +    @testcase(1214)
> +    def test_no_command(self):
> +        """Test wic without command"""
> +        self.assertEqual(1, runCmd('wic', ignore_status=True).status)
> +
>      @testcase(1211)
>      def test_build_image_name(self):
>          """Test wic create directdisk --image-name core-image-minimal"""
>          self.assertEqual(0, runCmd("wic create directdisk "
> -                                   "--image-name core-image-minimal").status)
> +                                   "--image-name=core-image-minimal").status)
Is '=' mandatory here?

>          self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
>  
>      @testcase(1212)
>      def test_build_artifacts(self):
>          """Test wic create directdisk providing all artifacts."""
> -        bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
> -                        for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
> -                                    'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
> +        bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal'))
> +                      for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
> +                                  'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
>          status = runCmd("wic create directdisk "
>                          "-b %(staging_datadir)s "
>                          "-k %(deploy_dir_image)s "
> @@ -96,113 +157,110 @@ class Wic(oeSelfTest):
>      def test_gpt_image(self):
>          """Test creation of core-image-minimal with gpt table and UUID boot"""
>          self.assertEqual(0, runCmd("wic create directdisk-gpt "
> -                                   "--image-name core-image-minimal").status)
> +                                   "--image-name core-image-minimal "
> +                                   ).status)
What does this fix?

>          self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
>  
> -    @testcase(1213)
> -    def test_unsupported_subcommand(self):
> -        """Test unsupported subcommand"""
> -        self.assertEqual(1, runCmd('wic unsupported',
> -                                   ignore_status=True).status)
> -
> -    @testcase(1214)
> -    def test_no_command(self):
> -        """Test wic without command"""
> -        self.assertEqual(1, runCmd('wic', ignore_status=True).status)
> -
> -    @testcase(1215)
> -    def test_help_overview(self):
> -        """Test wic help overview"""
> -        self.assertEqual(0, runCmd('wic help overview').status)
> -
> -    @testcase(1216)
> -    def test_help_plugins(self):
> -        """Test wic help plugins"""
> -        self.assertEqual(0, runCmd('wic help plugins').status)
> -
> -    @testcase(1217)
> -    def test_help_kickstart(self):
> -        """Test wic help kickstart"""
> -        self.assertEqual(0, runCmd('wic help kickstart').status)
> -
>      @testcase(1264)
>      def test_compress_gzip(self):
>          """Test compressing an image with gzip"""
>          self.assertEqual(0, runCmd("wic create directdisk "
> -                                   "--image-name core-image-minimal "
> +                                   "-e core-image-minimal "
--image-name is more readable than -e from my point of view.

>                                     "-c gzip").status)
> -        self.assertEqual(1, len(glob(self.resultdir + \
> -                                         "directdisk-*.direct.gz")))
> +        self.assertEqual(1, len(glob(self.resultdir +
> +                                     "directdisk-*.direct.gz")))
>  
>      @testcase(1265)
>      def test_compress_bzip2(self):
>          """Test compressing an image with bzip2"""
>          self.assertEqual(0, runCmd("wic create directdisk "
> -                                   "--image-name core-image-minimal "
> +                                   "--image-name=core-image-minimal "
>                                     "-c bzip2").status)
> -        self.assertEqual(1, len(glob(self.resultdir + \
> -                                         "directdisk-*.direct.bz2")))
> +        self.assertEqual(1, len(glob(self.resultdir +
> +                                     "directdisk-*.direct.bz2")))
>  
>      @testcase(1266)
>      def test_compress_xz(self):
>          """Test compressing an image with xz"""
>          self.assertEqual(0, runCmd("wic create directdisk "
> -                                   "--image-name core-image-minimal "
> -                                   "-c xz").status)
> -        self.assertEqual(1, len(glob(self.resultdir + \
> -                                         "directdisk-*.direct.xz")))
> +                                   "--image-name=core-image-minimal "
> +                                   "--compress-with=xz").status)
> +        self.assertEqual(1, len(glob(self.resultdir +
> +                                     "directdisk-*.direct.xz")))
>  
>      @testcase(1267)
>      def test_wrong_compressor(self):
>          """Test how wic breaks if wrong compressor is provided"""
>          self.assertEqual(2, runCmd("wic create directdisk "
> -                                   "--image-name core-image-minimal "
> +                                   "--image-name=core-image-minimal "
>                                     "-c wrong", ignore_status=True).status)
>  
> +    @testcase(1558)
> +    def test_debug_skip_build_check_and_build_rootfs(self):
> +        """Test wic debug, skip-build-check and build_rootfs"""
> +        self.assertEqual(0, runCmd("wic create directdisk "
> +                                   "--image-name=core-image-minimal "
> +                                   "-D -s -f").status)
> +        self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
> +        self.assertEqual(0, runCmd("wic create directdisk "
> +                                   "--image-name=core-image-minimal "
> +                                   "--debug "
> +                                   "--skip-build-check "
> +                                   "--build-rootfs").status)
> +        self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
> +
I'd split this to two test cases as they're testing two different
options.

>      @testcase(1268)
>      def test_rootfs_indirect_recipes(self):
>          """Test usage of rootfs plugin with rootfs recipes"""
>          wks = "directdisk-multi-rootfs"
>          self.assertEqual(0, runCmd("wic create %s "
> -                                   "--image-name core-image-minimal "
> +                                   "--image-name=core-image-minimal "
>                                     "--rootfs rootfs1=core-image-minimal "
> -                                   "--rootfs rootfs2=core-image-minimal" \
> +                                   "--rootfs rootfs2=core-image-minimal"
>                                     % wks).status)
>          self.assertEqual(1, len(glob(self.resultdir + "%s*.direct" % wks)))
>  
>      @testcase(1269)
>      def test_rootfs_artifacts(self):
>          """Test usage of rootfs plugin with rootfs paths"""
> -        bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
> -                        for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
> -                                    'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
> +        bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal'))
> +                      for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
> +                                  'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
>          bbvars['wks'] = "directdisk-multi-rootfs"
>          status = runCmd("wic create %(wks)s "
> -                        "-b %(staging_datadir)s "
> -                        "-k %(deploy_dir_image)s "
> -                        "-n %(staging_dir_native)s "
> +                        "--bootimg-dir=%(staging_datadir)s "
> +                        "--kernel-dir=%(deploy_dir_image)s "
> +                        "--native-sysroot=%(staging_dir_native)s "
>                          "--rootfs-dir rootfs1=%(image_rootfs)s "
> -                        "--rootfs-dir rootfs2=%(image_rootfs)s" \
> +                        "--rootfs-dir rootfs2=%(image_rootfs)s"
>                          % bbvars).status
>          self.assertEqual(0, status)
> -        self.assertEqual(1, len(glob(self.resultdir + \
> +        self.assertEqual(1, len(glob(self.resultdir +
>                                       "%(wks)s-*.direct" % bbvars)))
>  
>      @testcase(1346)
>      def test_iso_image(self):
>          """Test creation of hybrid iso image with legacy and EFI boot"""
>          self.assertEqual(0, runCmd("wic create mkhybridiso "
> -                                   "--image-name core-image-minimal").status)
> -        self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.direct")))
> -        self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.iso")))
> +                                   "--image-name core-image-minimal"
> +                                   ).status)
This is less readable. Is this only to fit the line into 80 chars?
If so, let's not do it. Lines up to 100 chars long are more readable
than this I believe.

> +        self.assertEqual(1, len(glob(self.resultdir +
> +                                     "HYBRID_ISO_IMG-*.direct")))
> +        self.assertEqual(1, len(glob(self.resultdir +
> +                                     "HYBRID_ISO_IMG-*.iso")))
> +
The same thing. Full lines from previous code are more readable.

> +    def __get_image_env_path(self, image):
Do you really need this to be mangled? one underscore should be enough.

> +        """Generate and obtain the path to <image>.env"""
> +        self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status)
> +        stdir = get_bb_var('STAGING_DIR_TARGET', image)
> +        imgdatadir = os.path.join(stdir, 'imgdata')
> +        return imgdatadir
Can we cache results here? This would speed up testing I guess.
Something like this should be ok:

if image not in self.wicenv_cache:
    self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' %
image).status)
    stdir = get_bb_var('STAGING_DIR_TARGET', image)
    self.wicenv_cache[image] = os.path.join(stdir, 'imgdata')

return self.wicenv_cache[image]

>  
>      @testcase(1347)
>      def test_image_env(self):
> -        """Test generation of <image>.env files."""
> +        """Test generation of <image>.env files"""
>          image = 'core-image-minimal'
> -        self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status)
> -        stdir = get_bb_var('STAGING_DIR_TARGET', image)
> -        imgdatadir = os.path.join(stdir, 'imgdata')
> +        imgdatadir = self.__get_image_env_path(image)
>  
>          basename = get_bb_var('IMAGE_BASENAME', image)
>          self.assertEqual(basename, image)
> @@ -220,6 +278,21 @@ class Wic(oeSelfTest):
>                  self.assertTrue(var in content, "%s is not in .env file" % var)
>                  self.assertTrue(content[var])
>  
> +    @testcase(1559)
> +    def test_image_vars_dir(self):
> +        """Test image vars directory selection"""
> +        image = 'core-image-minimal'
> +        imgenvdir = self.__get_image_env_path(image)
> +
> +        self.assertEqual(0, runCmd("wic create directdisk "
> +                                   "--image-name=%s "
> +                                   "-v %s"
> +                                   % (image, imgenvdir)).status)
> +        self.assertEqual(0, runCmd("wic create directdisk "
> +                                   "--image-name=%s "
> +                                   "--vars %s"
> +                                   % (image, imgenvdir)).status)
> +
Do we really want to test short and long variant of options?
If so, we should do it for all options.

>      @testcase(1351)
>      def test_wic_image_type(self):
>          """Test building wic images by bitbake"""
> @@ -239,7 +312,7 @@ class Wic(oeSelfTest):
>      def test_qemux86_directdisk(self):
>          """Test creation of qemux-86-directdisk image"""
>          image = "qemux86-directdisk"
> -        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
> +        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal"
>                                     % image).status)
>          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
>  
> @@ -247,7 +320,8 @@ class Wic(oeSelfTest):
>      def test_mkgummidisk(self):
>          """Test creation of mkgummidisk image"""
>          image = "mkgummidisk"
> -        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
> +        self.assertEqual(0, runCmd("wic create %s --image-name "
> +                                   "core-image-minimal"
>                                     % image).status)
>          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))

I agree, this doesn't look good. How about dropping 'image' variable in
this and similar test cases?

cmd = "wic create mkgummidisk --image-name core-image-minimal"
self.assertEqual(0, runCmd(cmd).status)

self.assertEqual(1, len(glob(self.resultdir + "mkgummidisk-*direct")))

> @@ -255,7 +329,7 @@ class Wic(oeSelfTest):
>      def test_mkefidisk(self):
>          """Test creation of mkefidisk image"""
>          image = "mkefidisk"
> -        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
> +        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal"
>                                     % image).status)
>          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
>  
> @@ -263,11 +337,11 @@ class Wic(oeSelfTest):
>      def test_directdisk_bootloader_config(self):
>          """Test creation of directdisk-bootloader-config image"""
>          image = "directdisk-bootloader-config"
> -        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
> +        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal"
>                                     % image).status)
>          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
>  
> -    @testcase(1422)
> +    @testcase(1424)
>      def test_qemu(self):
>          """Test wic-image-minimal under qemu"""
>          self.assertEqual(0, bitbake('wic-image-minimal').status)
> @@ -275,28 +349,56 @@ class Wic(oeSelfTest):
>          with runqemu('wic-image-minimal', ssh=False) as qemu:
>              command = "mount |grep '^/dev/' | cut -f1,3 -d ' '"
>              status, output = qemu.run_serial(command)
> -            self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
> +            self.assertEqual(1, status, 'Failed to run command "%s": %s'
> +                                        % (command, output))
less readable

>              self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
>  
> +    @testcase(1496)
>      def test_bmap(self):
>          """Test generation of .bmap file"""
>          image = "directdisk"
> -        status = runCmd("wic create %s -e core-image-minimal --bmap" % image).status
> +        status = runCmd("wic create %s -e core-image-minimal -m"
> +                        % image).status
less readable. --bmap is better to use here than -m.

> +        self.assertEqual(0, status)
> +        self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
> +        self.assertEqual(1, len(glob(self.resultdir +
> +                                     "%s-*direct.bmap" % image)))
> +        status = runCmd("wic create %s -e core-image-minimal --bmap"
> +                        % image).status
>          self.assertEqual(0, status)
>          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
> -        self.assertEqual(1, len(glob(self.resultdir + "%s-*direct.bmap" % image)))
> +        self.assertEqual(1, len(glob(self.resultdir + "%s-*direct.bmap"
> +                                                      % image)))
>  
> +    @testcase(1560)
>      def test_systemd_bootdisk(self):
>          """Test creation of systemd-bootdisk image"""
>          image = "systemd-bootdisk"
> -        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
> +        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal"
>                                     % image).status)
>          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
>  
> +    @testcase(1561)
>      def test_sdimage_bootpart(self):
>          """Test creation of sdimage-bootpart image"""
>          image = "sdimage-bootpart"
>          self.write_config('IMAGE_BOOT_FILES = "bzImage"\n')
> -        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
> +        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal"
>                                     % image).status)
the same thing - it doesn't worth it to please PEP8 if it reduces code
readability.

>          self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
> +
> +    @testcase(1562)
> +    def test_alternate_output_dir(self):
> +        """Test alternate output directory"""
> +        self.assertEqual(0, runCmd("wic create directdisk "
> +                                   "-e core-image-minimal "
> +                                   "-o %s"
> +                                   % self.alternate_resultdir).status)
> +        self.assertEqual(1, len(glob(self.alternate_resultdir +
> +                                     "build/directdisk-*.direct")))
> +        self.assertEqual(0, runCmd("wic create mkefidisk -e "
> +                                   "core-image-minimal "
> +                                   "--outdir %s"
> +                                   % self.alternate_resultdir).status)
> +        self.assertEqual(1, len(glob(self.alternate_resultdir +
> +                                     "build/mkefidisk-*direct")))
Would one test be enough?

BTW, did you measure how long does the test run before and after your
changes? We should be careful here as this test runs on ab and makes
people wait longer for results.

--
Regards,
Ed


^ permalink raw reply

* [PATCH 00/91] Morty pull request
From: Armin Kuster @ 2016-12-13 19:50 UTC (permalink / raw)
  To: akuster808, openembedded-core

Cover letter only.

Please consider these changes for Morty-next.

The following changes since commit 5aa481dfedfd089f0d6e8a3bae1b84134d5dff4c:

  ref-manual: Added KERNEL_IMAGE_BASE_NAME change to 2.2 migration (2016-12-08 16:36:47 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib akuster/morty-next
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akuster/morty-next

Alejandro Hernandez (3):
  linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.1
  linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.4
  linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.8

Alexander Kanavin (1):
  grub2: enforce -no-pie if supported by compiler

Alexandre Belloni (1):
  insane: Add aarch64 baremetal mappings to the QA arch test

Andreas Oberritter (5):
  kernel.bbclass: allow uncompressed initramfs archives
  kernel.bbclass: Use real filenames in kernel packages
  kernel.bbclass: Avoid wildcards for kernel images
  kernel.bbclass: do not copy bundled initramfs to /boot
  kernel.bbclass: fix kernel_do_compile for KERNEL_IMAGETYPE =
    "vmlinux.gz" on mips

André Draszik (2):
  cve-check.bbclass: CVE-2014-2524 / readline v5.2
  openssl: fix bashism in c_rehash shell script

Aníbal Limón (1):
  perl: Fix ptest update hash of ExtUtils/Liblist/Kid.pm in
    customized.dat

Armin Kuster (2):
  tzcode: update to 2016i
  tzdata: update to 2016i

Bruce Ashfield (20):
  linux-yocto/4.8: update to 4.8.6
  linux-yocto/4.8: fix cryptodev compilation error
  linux-yocto/4.4: update to v4.4.30
  linux-yocto/4.1: update to v4.1.35
  linux-yocto/4.8: update to v4.8.6-rt5
  linux-yocto/4.8: update from v4.8.6 -> v4.8.8
  linux-yocto/4.4: update to v4.4.32
  kern-tools: error checking and tree generation fixes
  linux-yocto/4.8: update to v4.8.10
  linux-yocto-dev: update to 4.9-rcX
  kern-tools: fix processing for no branch meta-data
  kernel-yocto: exit on non-zero return code
  linux-yocto/4.8: aufs warning and ixgbe calltrace
  linux-yocto/4.4/4.8: Fix remaining kernel_configcheck warnings in
    Intel BSPs
  linux-yoct/4.1: update to v4.1.36
  linux-yocto/4.4: update to v4.4.36
  linux-yocto/4.8: update to v4.8.12
  kern-tools: ensure that no shared directories are used
  linux-yocto-rt/4.4: update to -rt43
  linux-yocto/4.x: CVE-2016-8655

California Sullivan (1):
  parselogs.py: Whitelist iwlwifi firmware load error messages

Daniel Díaz (1):
  weston: Add no-input-device patch to 1.11.0.

David Vincent (1):
  slang: Disable parallel make install

Ed Bartosh (2):
  systemd-bootdisk.wks: use PARTUUID
  qemux86*.conf: set wic-related parameters

Fabio Berton (1):
  binutils: Fix build for c293pcie PPC machine

Jair Gonzalez (1):
  parselogs: Whitelist GPT warnings as the device is fully functional

Kai Kang (3):
  openssh: fix CVE-2016-8858
  qemu: fix CVE-2016-7909
  qemu: update run-ptest script

Kevin Hao (1):
  meta-yocto-bsp: bump to the latest stable linux kernel for the non-x86
    BSPs

Khem Raj (3):
  libbsd: Fix build with musl
  cmake.bbclass: Set CXXFLAGS and CFLAGS
  arch-arm64.inc: Include arch-armv7ve.inc

Koen Kooi (1):
  libbsd 0.8.3: BBCLASSEXTEND to native and nativesdk

Li Zhou (1):
  db: disable the ARM assembler mutex code

Maciej Borzecki (3):
  wic: make sure that partition size is always an integer in internal
    processing
  wic: check that filesystem is specified for a rootfs partition
  wic: fix function comment typos

Mark Asselstine (1):
  systemd.bbclass: don't block on service restart

Martin Vuille (1):
  terminal.py: Pass string instead of bytes to ExecutionError to avoid
    exception

Mingli Yu (3):
  tiff: Security fix CVE-2016-9535
  tiff: Security fix CVE-2016-9538
  tiff: Fix several CVE issues

Patrick Ohly (2):
  pseudo: include fix for xattr corruption
  scripts/send-pull-request: Avoid multiple chain headers

Paul Eggleton (1):
  recipetool: fix encoding-related errors creating python recipes

Richard Purdie (7):
  bitbake: bitbake-worker: Handle cooker/worker IO deadlocking
  staging: Drop unused SYSROOT_LOCK
  attr: Convert SSTATEPOSTINSTFUNCS to a do_install_append
  subversion: Fix issues in LDFLAGS sed manipulation
  bitbake: utils: Avoid traceback errors
  bitbake: cooker: Fix world taskgraph generation issue
  bitbake: cooker: Handle inofity queue overflows more gracefully

Robert Yang (2):
  qemuarm64.conf: make runqemu's graphics work
  diffutils: do_configure: fix "Argument list too long"

Ross Burton (11):
  Revert "libwnck3: remove the recipe"
  Revert "epiphany: remove unnecessary libwnck3 dependency"
  lib/oe/qa: handle binaries with segments outside the first 4kb
  systemtap: remove explicit msgfmt check
  systemtap: fix native linking on recent Ubuntu
  conf: add C++ flags for uninative interoperatility
  insane: fix expanded-d test
  insane: factor out the test matrix processing
  insane: add QAPKGTEST, a package-wide equivilant to QAPATHTEST
  insane: rewrite the expanded-d test as a QAPKGTEST
  tiff: set CVE NAME

Samuli Piippo (1):
  mesa: make sure GLES3 headers are installed

T.O. Radzy Radzykewycz (1):
  OpenSSL: CVE-2004-2761 replace MD5 hash algorithm

Yi Zhao (4):
  openssl: Security fix CVE-2016-7055
  nfs-utils: fix protocol minor version fall-back
  tiff: Security fix CVE-2016-3632
  libxml2: Security fix CVE-2016-5131

Zhixiong Chi (3):
  tiff: Security fix CVE-2016-3658
  tiff: Security fix CVE-2016-9540
  tiff: Security fix CVE-2016-9539

 bitbake/bin/bitbake-worker                         |  52 ++-
 bitbake/lib/bb/cooker.py                           |  22 +-
 bitbake/lib/bb/utils.py                            |   2 +-
 .../recipes-kernel/linux/linux-yocto_4.1.bbappend  |  20 +-
 .../recipes-kernel/linux/linux-yocto_4.4.bbappend  |  20 +-
 .../recipes-kernel/linux/linux-yocto_4.8.bbappend  |  20 +-
 meta/classes/cmake.bbclass                         |   2 +
 meta/classes/cve-check.bbclass                     |   2 +-
 meta/classes/insane.bbclass                        | 101 +++--
 meta/classes/kernel-yocto.bbclass                  |   1 -
 meta/classes/kernel.bbclass                        |  15 +-
 meta/classes/staging.bbclass                       |   1 -
 meta/classes/systemd.bbclass                       |   2 +-
 meta/classes/uninative.bbclass                     |  11 -
 meta/conf/distro/defaultsetup.conf                 |   3 +-
 meta/conf/distro/include/uninative-flags.inc       |   9 +
 meta/conf/machine/include/arm/arch-arm64.inc       |   2 +-
 meta/conf/machine/qemuarm64.conf                   |   2 +-
 meta/conf/machine/qemux86-64.conf                  |   3 +
 meta/conf/machine/qemux86.conf                     |   3 +
 meta/lib/oe/qa.py                                  |  82 ++--
 meta/lib/oe/terminal.py                            |   2 +
 meta/lib/oeqa/runtime/parselogs.py                 |   6 +-
 ...nforce-no-pie-if-the-compiler-supports-it.patch |  45 +++
 meta/recipes-bsp/grub/grub2.inc                    |   1 +
 .../fix-protocol-minor-version-fall-back.patch     |  55 +++
 .../nfs-utils/nfs-utils_1.3.3.bb                   |   1 +
 .../openssh/openssh/fix-CVE-2016-8858.patch        |  39 ++
 meta/recipes-connectivity/openssh/openssh_7.3p1.bb |   1 +
 .../openssl/openssl/CVE-2016-7055.patch            |  43 +++
 .../Use-SHA256-not-MD5-as-default-digest.patch     |  69 ++++
 .../openssl/openssl/openssl-c_rehash.sh            |   2 +-
 .../recipes-connectivity/openssl/openssl_1.0.2j.bb |   1 +
 .../libxml/libxml2/libxml2-CVE-2016-5131.patch     | 180 +++++++++
 meta/recipes-core/libxml/libxml2_2.9.4.bb          |   1 +
 meta/recipes-devtools/binutils/binutils-2.27.inc   |   1 +
 ...01-ppc-apuinfo-for-spe-parsed-incorrectly.patch |  37 ++
 .../perl/perl/perl-test-customized.patch           |   2 +-
 .../pseudo/files/More-correctly-fix-xattrs.patch   |  37 ++
 meta/recipes-devtools/pseudo/pseudo_1.8.1.bb       |   1 +
 meta/recipes-devtools/pseudo/pseudo_git.bb         |   2 +-
 .../qemu/qemu/0004-fix-CVE-2016-7909.patch         |  42 ++
 meta/recipes-devtools/qemu/qemu/run-ptest          |   8 +-
 meta/recipes-devtools/qemu/qemu_2.7.0.bb           |   1 +
 .../subversion/subversion/serfmacro.patch          |  22 ++
 .../subversion/subversion_1.9.4.bb                 |   1 +
 meta/recipes-extended/diffutils/diffutils_3.4.bb   |   3 +
 meta/recipes-extended/slang/slang_2.3.0.bb         |   1 +
 ...code-native_2016h.bb => tzcode-native_2016i.bb} |   8 +-
 .../tzdata/{tzdata_2016h.bb => tzdata_2016i.bb}    |   4 +-
 meta/recipes-gnome/epiphany/epiphany_3.20.3.bb     |   4 +-
 meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb      |  19 +
 meta/recipes-graphics/mesa/mesa.inc                |   3 +
 ...on-1.11-config-option-for-no-input-device.patch | 123 ++++++
 meta/recipes-graphics/wayland/weston_1.11.0.bb     |   1 +
 .../kern-tools/kern-tools-native_git.bb            |   2 +-
 meta/recipes-kernel/linux/linux-yocto-dev.bb       |   2 +-
 meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb    |   6 +-
 meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb    |   6 +-
 meta/recipes-kernel/linux/linux-yocto-rt_4.8.bb    |   6 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb  |   6 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb  |   6 +-
 meta/recipes-kernel/linux/linux-yocto-tiny_4.8.bb  |   6 +-
 meta/recipes-kernel/linux/linux-yocto_4.1.bb       |  20 +-
 meta/recipes-kernel/linux/linux-yocto_4.4.bb       |  20 +-
 meta/recipes-kernel/linux/linux-yocto_4.8.bb       |  20 +-
 .../systemtap/systemtap/fix-monitor-linking.patch  |  41 ++
 .../systemtap/systemtap/no-msgfmt-check.patch      |  15 +
 meta/recipes-kernel/systemtap/systemtap_git.inc    |   2 +
 .../libtiff/files/CVE-2016-3632.patch              |  34 ++
 .../libtiff/files/CVE-2016-3658.patch              | 111 ++++++
 .../libtiff/files/CVE-2016-9535-1.patch            | 423 +++++++++++++++++++++
 .../libtiff/files/CVE-2016-9535-2.patch            |  67 ++++
 .../libtiff/files/CVE-2016-9538.patch              |  67 ++++
 .../libtiff/files/CVE-2016-9539.patch              |  60 +++
 .../libtiff/files/CVE-2016-9540.patch              |  60 +++
 .../libtiff/files/Fix_several_CVE_issues.patch     | 281 ++++++++++++++
 meta/recipes-multimedia/libtiff/tiff_4.0.6.bb      |  10 +
 meta/recipes-support/attr/ea-acl.inc               |  47 ++-
 meta/recipes-support/db/db_6.0.35.bb               |   9 -
 ...001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch | 363 ++++++++++++++++++
 .../libbsd/libbsd/0002-Remove-funopen.patch        |  55 +++
 ...3-Fix-build-breaks-due-to-missing-a.out.h.patch | 130 +++++++
 meta/recipes-support/libbsd/libbsd_0.8.3.bb        |   7 +
 scripts/lib/recipetool/create_buildsys_python.py   |   4 +-
 scripts/lib/wic/canned-wks/systemd-bootdisk.wks    |   2 +-
 scripts/lib/wic/partition.py                       |  16 +-
 scripts/lib/wic/plugins/source/bootimg-efi.py      |   2 +-
 scripts/lib/wic/plugins/source/rawcopy.py          |   4 +-
 scripts/lib/wic/utils/partitionedfs.py             |   4 +-
 scripts/send-pull-request                          |   9 +-
 91 files changed, 2791 insertions(+), 273 deletions(-)
 create mode 100644 meta/conf/distro/include/uninative-flags.inc
 create mode 100644 meta/recipes-bsp/grub/files/0001-Enforce-no-pie-if-the-compiler-supports-it.patch
 create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch
 create mode 100644 meta/recipes-connectivity/openssh/openssh/fix-CVE-2016-8858.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2016-7055.patch
 create mode 100644 meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
 create mode 100644 meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
 create mode 100644 meta/recipes-devtools/binutils/binutils/0001-ppc-apuinfo-for-spe-parsed-incorrectly.patch
 create mode 100644 meta/recipes-devtools/pseudo/files/More-correctly-fix-xattrs.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/0004-fix-CVE-2016-7909.patch
 create mode 100644 meta/recipes-devtools/subversion/subversion/serfmacro.patch
 rename meta/recipes-extended/tzcode/{tzcode-native_2016h.bb => tzcode-native_2016i.bb} (69%)
 rename meta/recipes-extended/tzdata/{tzdata_2016h.bb => tzdata_2016i.bb} (98%)
 create mode 100644 meta/recipes-gnome/libwnck/libwnck3_3.20.1.bb
 create mode 100644 meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/fix-monitor-linking.patch
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/no-msgfmt-check.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3632.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3658.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9535-1.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9535-2.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9538.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9539.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9540.patch
 create mode 100644 meta/recipes-multimedia/libtiff/files/Fix_several_CVE_issues.patch
 create mode 100644 meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
 create mode 100644 meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch
 create mode 100644 meta/recipes-support/libbsd/libbsd/0003-Fix-build-breaks-due-to-missing-a.out.h.patch

-- 
2.3.5



^ permalink raw reply

* Re: [PATCH] populate_sdk_ext: get NATIVELSBSTRING variable
From: Paul Eggleton @ 2016-12-13 19:44 UTC (permalink / raw)
  To: Ed Bartosh; +Cc: openembedded-core
In-Reply-To: <1481648749-25726-1-git-send-email-ed.bartosh@linux.intel.com>

Hi Ed,

On Tue, 13 Dec 2016 19:05:49 Ed Bartosh wrote:
> Setting fixedlsbstring to 'universal' can break populate_sdk_ext
> task as NATIVELSBSTRING can be set to universal-<gcc version> in
> some cases.
> 
> Getting NATIVELSBSTRING value using getVar should fix this.
> 
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> ---
>  meta/classes/populate_sdk_ext.bbclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/populate_sdk_ext.bbclass
> b/meta/classes/populate_sdk_ext.bbclass index 3c3a73c..6ef48c0 100644
> --- a/meta/classes/populate_sdk_ext.bbclass
> +++ b/meta/classes/populate_sdk_ext.bbclass
> @@ -374,8 +374,8 @@ python copy_buildsystem () {
> 
>      sstate_out = baseoutpath + '/sstate-cache'
>      bb.utils.remove(sstate_out, True)
> -    # uninative.bbclass sets NATIVELSBSTRING to 'universal'
> -    fixedlsbstring = 'universal'
> +
> +    fixedlsbstring = d.getVar('NATIVELSBSTRING', True)
> 
>      sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN', True) ==
> '1') sdk_ext_type = d.getVar('SDK_EXT_TYPE', True)

Have you tested this with OE-Core alone or any other configuration where 
uninative is not enabled? I suspect it won't work with that.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply

* Re: [PATCH] libepoxy: move to tip of Emmanuele Bassi's fork
From: Khem Raj @ 2016-12-13 19:29 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CALbNGRR20dSAjp_aeCOeYOUyiCmt9u5iu6ot_0ejB7CWZHKOnQ@mail.gmail.com>

On Tue, Dec 13, 2016 at 10:56 AM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> On Tue, Dec 13, 2016 at 6:54 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Tue, Dec 13, 2016 at 1:09 AM, Andreas Müller
>> <schnitzeltony@googlemail.com> wrote:
>>> * fixes starting of kde-plasma for wayland:
>>>   | No provider of glGenFramebuffers found.  Requires one of:
>>>   |     Desktop OpenGL 3.0
>>>   |     GL extension "GL_ARB_framebuffer_object"
>>>   |     OpenGL ES 2.0
>>>   |     GL extension "GL_EXT_framebuffer_object"
>>>   | /usr/bin/startplasmacompositor: line 223:   787 Aborted                 (core dumped) /usr/bin/kwin_wayland --xwayland --libinput --exit-with-session=/usr/libexec/startplasma
>>> * fixes some strange behavour on kde-plasma for x11: Black screen on logout /
>>>   Lock screen does not return.
>>> * Eric Anholt seems to have passed maintainership of libepoxy over to
>>>   Yaron Cohen-Tal. I agree that things didn't really turn out well since then [1].
>>> * 0001-select-platforms-based-on-configuration-results.patch and
>>>   0002-add-an-option-to-disable-glx-support.patch wre replaced by
>>>   0001-make-x11-support-optional.patch
>>>
>>> [1] https://github.com/ebassi/libepoxy/commit/8dead45cb366bf5c08539bef2ccaa36b80eb1483
>>
>> Why do we change to a different fork ? perhaps its worth mentioning in commit
> Just for the record I mentioned it and if you would have followed the
> link you would know.
>

Thanks.

> I agree to Ross: let's wait what happens with libepoxy. I keep this
> patch in my tree because from meta-qt5-extra perspective this patch
> fixes many many strange issues.
>

It would be acceptable perhaps if you can send relevant patches on top
of upsteam libepoxy.

> Andreas


^ permalink raw reply

* Re: [PATCH] libepoxy: move to tip of Emmanuele Bassi's fork
From: Andreas Müller @ 2016-12-13 18:56 UTC (permalink / raw)
  To: Khem Raj, Patches and discussions about the oe-core layer
In-Reply-To: <CAMKF1srCbFH5g2-RgJyYBqwH12U6zuCSrF7z-sPVqQkGUYQFiQ@mail.gmail.com>

On Tue, Dec 13, 2016 at 6:54 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, Dec 13, 2016 at 1:09 AM, Andreas Müller
> <schnitzeltony@googlemail.com> wrote:
>> * fixes starting of kde-plasma for wayland:
>>   | No provider of glGenFramebuffers found.  Requires one of:
>>   |     Desktop OpenGL 3.0
>>   |     GL extension "GL_ARB_framebuffer_object"
>>   |     OpenGL ES 2.0
>>   |     GL extension "GL_EXT_framebuffer_object"
>>   | /usr/bin/startplasmacompositor: line 223:   787 Aborted                 (core dumped) /usr/bin/kwin_wayland --xwayland --libinput --exit-with-session=/usr/libexec/startplasma
>> * fixes some strange behavour on kde-plasma for x11: Black screen on logout /
>>   Lock screen does not return.
>> * Eric Anholt seems to have passed maintainership of libepoxy over to
>>   Yaron Cohen-Tal. I agree that things didn't really turn out well since then [1].
>> * 0001-select-platforms-based-on-configuration-results.patch and
>>   0002-add-an-option-to-disable-glx-support.patch wre replaced by
>>   0001-make-x11-support-optional.patch
>>
>> [1] https://github.com/ebassi/libepoxy/commit/8dead45cb366bf5c08539bef2ccaa36b80eb1483
>
> Why do we change to a different fork ? perhaps its worth mentioning in commit
Just for the record I mentioned it and if you would have followed the
link you would know.

I agree to Ross: let's wait what happens with libepoxy. I keep this
patch in my tree because from meta-qt5-extra perspective this patch
fixes many many strange issues.

Andreas


^ permalink raw reply

* Re: [PATCH v5 0/6] wic: bugfixes & --fixed-size support, tests, oe-selftest: minor fixes
From: Ed Bartosh @ 2016-12-13 18:53 UTC (permalink / raw)
  To: Maciej Borzęcki
  Cc: Paul Eggleton, Maciej Borzecki,
	Patches and discussions about the oe-core layer
In-Reply-To: <CAD4b0_LMUu4=kTEon3nk+_8-1+nG+zQsph9yPB-SNabahhKsbQ@mail.gmail.com>

On Tue, Dec 13, 2016 at 09:07:30AM +0100, Maciej Borzęcki wrote:
> On Thu, Nov 24, 2016 at 8:08 AM, Maciej Borzecki
> <maciej.borzecki@rndity.com> wrote:
> > v5 of a patch series previously posted here [1].
> >
> > Changes since v4:
> >
> > * dropped `wic: selftest: do not repeat core-image-minimal` & rebased
> >   dependant patches
> >
> > * minor formatting fix in `wic: selftest: add tests for --fixed-size
> >   partition flags`
> >
> > [1]. http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129103.html
> >
> > Maciej Borzecki (6):
> >   oe-selftest: enforce en_US.UTF-8 locale
> >   oeqa/utils/commands.py: allow use of binaries from native sysroot
> >   wic: add --fixed-size wks option
> >   wic: selftest: avoid COMPATIBLE_HOST issues
> >   wic: selftest: do not assume bzImage kernel image
> >   wic: selftest: add tests for --fixed-size partition flags
> >
> >  meta/lib/oeqa/selftest/wic.py          | 123 +++++++++++++++++++++++++++++++--
> >  meta/lib/oeqa/utils/commands.py        |   9 ++-
> >  scripts/lib/wic/help.py                |  14 +++-
> >  scripts/lib/wic/imager/direct.py       |   2 +-
> >  scripts/lib/wic/ksparser.py            |  41 +++++++++--
> >  scripts/lib/wic/partition.py           |  88 ++++++++++++++---------
> >  scripts/lib/wic/utils/partitionedfs.py |   2 +-
> >  scripts/oe-selftest                    |   3 +
> >  8 files changed, 234 insertions(+), 48 deletions(-)
> 
> Is there any additional action needed from me at this point? A rebase
> or a resend perhaps?
> 

Rebase&resend would be nice as at lest one patch from this patchset is already accepted.

--
Regards,
Ed


^ permalink raw reply

* Re: [PATCH 5/5] libsdl2: fix build on wayland(-dev)less hosts
From: Burton, Ross @ 2016-12-13 18:41 UTC (permalink / raw)
  To: Andreas Müller; +Cc: OE-core
In-Reply-To: <CALbNGRRaAi4Y7MhfgPY9X8c3+pOgrBnxK0jeeLG+=EWSReR+Yg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

On 13 December 2016 at 17:51, Andreas Müller <schnitzeltony@googlemail.com>
wrote:

> P.S. This is a good example why recipe specific sysroot is a good
> thing - correct?
>

Yeah :)

Ross

[-- Attachment #2: Type: text/html, Size: 615 bytes --]

^ permalink raw reply

* Re: [PATCH] libepoxy: move to tip of Emmanuele Bassi's fork
From: Burton, Ross @ 2016-12-13 18:41 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <CAMKF1srCbFH5g2-RgJyYBqwH12U6zuCSrF7z-sPVqQkGUYQFiQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

On 13 December 2016 at 17:54, Khem Raj <raj.khem@gmail.com> wrote:

> Why do we change to a different fork ? perhaps its worth mentioning in
> commit
>

Also I spoke to Emmanuele today and he is attempting to have his fork
merged back upstream, so he recommends we hold off for a few days whilst
they sort out where libepoxy is maintained going forwards.

Ross

[-- Attachment #2: Type: text/html, Size: 760 bytes --]

^ permalink raw reply

* Re: [PATCH] libepoxy: move to tip of Emmanuele Bassi's fork
From: Khem Raj @ 2016-12-13 17:54 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <1481620141-4369-1-git-send-email-schnitzeltony@googlemail.com>

On Tue, Dec 13, 2016 at 1:09 AM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> * fixes starting of kde-plasma for wayland:
>   | No provider of glGenFramebuffers found.  Requires one of:
>   |     Desktop OpenGL 3.0
>   |     GL extension "GL_ARB_framebuffer_object"
>   |     OpenGL ES 2.0
>   |     GL extension "GL_EXT_framebuffer_object"
>   | /usr/bin/startplasmacompositor: line 223:   787 Aborted                 (core dumped) /usr/bin/kwin_wayland --xwayland --libinput --exit-with-session=/usr/libexec/startplasma
> * fixes some strange behavour on kde-plasma for x11: Black screen on logout /
>   Lock screen does not return.
> * Eric Anholt seems to have passed maintainership of libepoxy over to
>   Yaron Cohen-Tal. I agree that things didn't really turn out well since then [1].
> * 0001-select-platforms-based-on-configuration-results.patch and
>   0002-add-an-option-to-disable-glx-support.patch wre replaced by
>   0001-make-x11-support-optional.patch
>
> [1] https://github.com/ebassi/libepoxy/commit/8dead45cb366bf5c08539bef2ccaa36b80eb1483

Why do we change to a different fork ? perhaps its worth mentioning in commit

>
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
>  ....patch => 0001-make-x11-support-optional.patch} | 87 +++++++++-------------
>  ...0002-add-an-option-to-disable-glx-support.patch | 42 -----------
>  meta/recipes-graphics/libepoxy/libepoxy_git.bb     |  9 +--
>  3 files changed, 40 insertions(+), 98 deletions(-)
>  rename meta/recipes-graphics/libepoxy/libepoxy/{0001-select-platforms-based-on-configuration-results.patch => 0001-make-x11-support-optional.patch} (55%)
>  delete mode 100644 meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch
>
> diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch b/meta/recipes-graphics/libepoxy/libepoxy/0001-make-x11-support-optional.patch
> similarity index 55%
> rename from meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch
> rename to meta/recipes-graphics/libepoxy/libepoxy/0001-make-x11-support-optional.patch
> index 674c8e8..7b08fd1 100644
> --- a/meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch
> +++ b/meta/recipes-graphics/libepoxy/libepoxy/0001-make-x11-support-optional.patch
> @@ -1,38 +1,52 @@
> -From 3a93150bc0aec86afdb7d053247dc2448925e09a Mon Sep 17 00:00:00 2001
> +From f08cd639eb731c0d8fdbbba9e4beb1041c07e0c2 Mon Sep 17 00:00:00 2001
>  From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
> -Date: Wed, 6 May 2015 10:45:22 +0200
> -Subject: [PATCH 1/2] select platforms based on configuration results
> +Date: Tue, 13 Dec 2016 00:01:47 +0100
> +Subject: [PATCH] make x11 support optional
>  MIME-Version: 1.0
>  Content-Type: text/plain; charset=UTF-8
>  Content-Transfer-Encoding: 8bit
>
> -Upstream-Status: Submitted [1]
> +X11 support is build by default if x11 libs are found. This can be disabled
> +by --disable-glx.
> +
> +A similar (bit too overenthusiastic) pull request was sent long time ago [1]
> +before we saw cmake trouble. There was a follow up PR in [2] but I cannot test
> +it so took only very common parts.
> +
> +Upstream-Status: Submitted [3]
>
>  [1] https://github.com/anholt/libepoxy/pull/52
> +[2] https://github.com/anholt/libepoxy/pull/81
> +[3] https://github.com/ebassi/libepoxy/pull/1
>
>  Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
>  ---
> - configure.ac          | 13 +++++--------
> - src/dispatch_common.c |  9 ++++++---
> - src/dispatch_common.h |  9 +++++----
> - 3 files changed, 16 insertions(+), 15 deletions(-)
> + configure.ac          | 18 ++++++++++--------
> + src/dispatch_common.c |  5 ++++-
> + src/dispatch_common.h |  3 ++-
> + 3 files changed, 16 insertions(+), 10 deletions(-)
>
>  diff --git a/configure.ac b/configure.ac
> -index a52fc58..bdd70da 100644
> +index 2d67726..3df9966 100644
>  --- a/configure.ac
>  +++ b/configure.ac
> -@@ -58,6 +58,10 @@ AC_CHECK_HEADER([KHR/khrplatform.h],
> +@@ -58,6 +58,15 @@ AC_CHECK_HEADER([KHR/khrplatform.h],
>   # uintptr_t to a void *") by default.  Kill that.
>   XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion])
>
> -+PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no])
> ++AC_ARG_ENABLE([glx],
> ++                [AS_HELP_STRING([--disable-glx],
> ++                [disable if you do not want x11/glx support])],
> ++                [enable_glx=$enableval],
> ++                [enable_glx=yes]
> ++             )
>  +
> -+AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes)
> ++PKG_CHECK_MODULES(X11, [x11], [x11=$enable_glx], [x11=no])
>  +
>   has_znow=yes
>
>   case $host_os in
> -@@ -86,7 +90,7 @@ case $host_os in
> +@@ -86,7 +95,7 @@ case $host_os in
>           ;;
>       *)
>           build_egl=yes
> @@ -41,7 +55,7 @@ index a52fc58..bdd70da 100644
>           build_wgl=no
>           # On platforms with dlopen, we load everything dynamically and
>           # don't link against a specific window system or GL implementation.
> -@@ -144,13 +148,6 @@ esac
> +@@ -144,13 +153,6 @@ esac
>
>   AC_SUBST([VISIBILITY_CFLAGS])
>
> @@ -56,10 +70,10 @@ index a52fc58..bdd70da 100644
>
>   AC_CONFIG_FILES([
>  diff --git a/src/dispatch_common.c b/src/dispatch_common.c
> -index 4e34d6e..2ab84ed 100644
> +index c0c7156..a2699d2 100644
>  --- a/src/dispatch_common.c
>  +++ b/src/dispatch_common.c
> -@@ -615,10 +615,13 @@ epoxy_get_proc_address(const char *name)
> +@@ -643,9 +643,12 @@ epoxy_get_proc_address(const char *name)
>   #elif defined(__APPLE__)
>       return epoxy_gl_dlsym(name);
>   #else
> @@ -69,29 +83,15 @@ index 4e34d6e..2ab84ed 100644
>  -    } else {
>  +    } else
>  +#endif /* PLATFORM_HAS_GLX */
> - #if PLATFORM_HAS_EGL
>  +    {
> + #if PLATFORM_HAS_EGL
>           GLenum egl_api = epoxy_egl_get_current_gl_context_api();
>
> -         switch (egl_api) {
> -@@ -628,10 +631,10 @@ epoxy_get_proc_address(const char *name)
> -         case EGL_NONE:
> -             break;
> -         }
> --#endif
> -     }
> -+#endif /* PLATFORM_HAS_EGL */
> -     errx(1, "Couldn't find current GLX or EGL context.\n");
> --#endif
> -+#endif /* _WIN32 | __APPLE__*/
> - }
> -
> - void
>  diff --git a/src/dispatch_common.h b/src/dispatch_common.h
> -index 6b8503a..82681e4 100644
> +index 676a4d5..1c487eb 100644
>  --- a/src/dispatch_common.h
>  +++ b/src/dispatch_common.h
> -@@ -21,12 +21,13 @@
> +@@ -21,6 +21,7 @@
>    * IN THE SOFTWARE.
>    */
>
> @@ -99,30 +99,15 @@ index 6b8503a..82681e4 100644
>   #include <stdbool.h>
>
>   #ifdef _WIN32
> - #define PLATFORM_HAS_EGL 0
> - #define PLATFORM_HAS_GLX 0
> --#define PLATFORM_HAS_WGL 1
> -+#define PLATFORM_HAS_WGL BUILD_WGL
> - #define EPOXY_IMPORTEXPORT __declspec(dllexport)
> - #elif defined(__APPLE__)
> - #define PLATFORM_HAS_EGL 0
> -@@ -34,13 +35,13 @@
> - #define PLATFORM_HAS_WGL 0
> - #define EPOXY_IMPORTEXPORT
> - #elif defined(ANDROID)
> --#define PLATFORM_HAS_EGL 1
> -+#define PLATFORM_HAS_EGL BUILD_EGL
> - #define PLATFORM_HAS_GLX 0
> - #define PLATFORM_HAS_WGL 0
> +@@ -40,7 +41,7 @@
>   #define EPOXY_IMPORTEXPORT
>   #else
> --#define PLATFORM_HAS_EGL 1
> + #define PLATFORM_HAS_EGL 1
>  -#define PLATFORM_HAS_GLX 1
> -+#define PLATFORM_HAS_EGL BUILD_EGL
>  +#define PLATFORM_HAS_GLX BUILD_GLX
>   #define PLATFORM_HAS_WGL 0
>   #define EPOXY_IMPORTEXPORT
>   #endif
>  --
> -1.9.3
> +2.5.5
>
> diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch b/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch
> deleted file mode 100644
> index 262d684..0000000
> --- a/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -From 24868cbfb9dda5f6929dd277c47d35df016e8754 Mon Sep 17 00:00:00 2001
> -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
> -Date: Wed, 6 May 2015 11:05:48 +0200
> -Subject: [PATCH 2/2] add an option to disable glx support
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -this option would help us in yocto to get deterministic build results
> -
> -Upstream-Status: Submitted [1]
> -
> -[1] https://github.com/anholt/libepoxy/pull/52
> -
> -Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ----
> - configure.ac | 9 ++++++++-
> - 1 file changed, 8 insertions(+), 1 deletion(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index bdd70da..6c7153d 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -58,7 +58,14 @@ AC_CHECK_HEADER([KHR/khrplatform.h],
> - # uintptr_t to a void *") by default.  Kill that.
> - XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion])
> -
> --PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no])
> -+AC_ARG_ENABLE([glx],
> -+                [AS_HELP_STRING([--disable-glx],
> -+                              [disable if you don't want x11/glx support])],
> -+                [],
> -+                [enable_glx=yes]
> -+             )
> -+
> -+PKG_CHECK_MODULES(X11, [x11], [x11=$enable_glx], [x11=no])
> -
> - AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes)
> -
> ---
> -1.9.3
> -
> diff --git a/meta/recipes-graphics/libepoxy/libepoxy_git.bb b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> index 6c247cc..54f9ef9 100644
> --- a/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> +++ b/meta/recipes-graphics/libepoxy/libepoxy_git.bb
> @@ -7,13 +7,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
>
>
>  SRC_URI = " \
> -    git://github.com/anholt/libepoxy.git \
> -    file://0001-select-platforms-based-on-configuration-results.patch \
> -    file://0002-add-an-option-to-disable-glx-support.patch \
> +    git://github.com/ebassi/libepoxy.git \
> +    file://0001-make-x11-support-optional.patch \
>      file://no-need-for-python3.patch \
>  "
> -SRCREV="e2c33af5bfcfc9d168f9e776156dd47c33f428b3"
> -PV = "1.3.1"
> +SRCREV="269b4690b9222f53f24c3b97becebab8f8f6bbcb"
> +PV = "1.3.1+git${SRCPV}"
>
>  S = "${WORKDIR}/git"
>
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply

* Re: [PATCH 5/5] libsdl2: fix build on wayland(-dev)less hosts
From: Andreas Müller @ 2016-12-13 17:52 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CALbNGRRaAi4Y7MhfgPY9X8c3+pOgrBnxK0jeeLG+=EWSReR+Yg@mail.gmail.com>

reas

went out too early :)

On Tue, Dec 13, 2016 at 6:51 PM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> On Tue, Dec 13, 2016 at 6:46 PM, Burton, Ross <ross.burton@intel.com> wrote:
>>
>> On 13 December 2016 at 17:46, Andreas Müller <schnitzeltony@googlemail.com>
>> wrote:
>>>
>>> I thought wayland depends on wayland-native already. Is it possible
>>> that you don't have wayland in your DISTO_FEATURES - honestly have not
>>> tested that on a machine with missing wayland-scanner.
>>
>>
>> If wayland comes from sstate then it won't pull in the native dependencies.
>>
>> Ross
> Ahh - OK
>
> P.S. This is a good example why recipe specific sysroot is a good
> thing - correct?
>
> And


^ permalink raw reply

* Re: [PATCH 5/5] libsdl2: fix build on wayland(-dev)less hosts
From: Andreas Müller @ 2016-12-13 17:51 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LazOcewXGiXoqrtxVTt=3994exQPwaf=DnqLkJRYP39qg@mail.gmail.com>

On Tue, Dec 13, 2016 at 6:46 PM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 13 December 2016 at 17:46, Andreas Müller <schnitzeltony@googlemail.com>
> wrote:
>>
>> I thought wayland depends on wayland-native already. Is it possible
>> that you don't have wayland in your DISTO_FEATURES - honestly have not
>> tested that on a machine with missing wayland-scanner.
>
>
> If wayland comes from sstate then it won't pull in the native dependencies.
>
> Ross
Ahh - OK

P.S. This is a good example why recipe specific sysroot is a good
thing - correct?

And


^ permalink raw reply

* Re: [PATCH 5/5] libsdl2: fix build on wayland(-dev)less hosts
From: Burton, Ross @ 2016-12-13 17:46 UTC (permalink / raw)
  To: Andreas Müller; +Cc: OE-core
In-Reply-To: <CALbNGRSCR4bNEwKmH_cjEdoQqUUyarOJ+zp-0EP2bvFp5LXByA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 381 bytes --]

On 13 December 2016 at 17:46, Andreas Müller <schnitzeltony@googlemail.com>
wrote:

> I thought wayland depends on wayland-native already. Is it possible
> that you don't have wayland in your DISTO_FEATURES - honestly have not
> tested that on a machine with missing wayland-scanner.
>

If wayland comes from sstate then it won't pull in the native dependencies.

Ross

[-- Attachment #2: Type: text/html, Size: 803 bytes --]

^ permalink raw reply

* Re: [PATCH 5/5] libsdl2: fix build on wayland(-dev)less hosts
From: Andreas Müller @ 2016-12-13 17:46 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LZ-3hpYZcibQQX=D6o-wMRZbVeTGVSs9rkKNpEmOoqoZg@mail.gmail.com>

On Tue, Dec 13, 2016 at 5:10 PM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 13 December 2016 at 15:42, Andreas Müller <schnitzeltony@googlemail.com>
> wrote:
>>
>> Strange - something must be wrong on your machine :)
>
>
> config.log says:
>
> configure:19371: checking for Wayland support
> configure:19382: checking for wayland-scanner
> configure:19415: result: no
> configure:19425: result: yes
>
> which results in:
>
> WAYLAND_SCANNER =
>
> This should be fatal, but you're just missing a dependency on
> wayland-native.  I'll squash it into the patch now.
>
> Ross
I thought wayland depends on wayland-native already. Is it possible
that you don't have wayland in your DISTO_FEATURES - honestly have not
tested that on a machine with missing wayland-scanner.

Andreas


^ permalink raw reply

* [PATCH] populate_sdk_ext: get NATIVELSBSTRING variable
From: Ed Bartosh @ 2016-12-13 17:05 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <CAJTo0LaODS73GuCL0z9Sz49EnQ5GiZF6FdJ+KHOUiCdfEhZJfQ@mail.gmail.com>

Setting fixedlsbstring to 'universal' can break populate_sdk_ext
task as NATIVELSBSTRING can be set to universal-<gcc version> in
some cases.

Getting NATIVELSBSTRING value using getVar should fix this.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/classes/populate_sdk_ext.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 3c3a73c..6ef48c0 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -374,8 +374,8 @@ python copy_buildsystem () {
 
     sstate_out = baseoutpath + '/sstate-cache'
     bb.utils.remove(sstate_out, True)
-    # uninative.bbclass sets NATIVELSBSTRING to 'universal'
-    fixedlsbstring = 'universal'
+
+    fixedlsbstring = d.getVar('NATIVELSBSTRING', True)
 
     sdk_include_toolchain = (d.getVar('SDK_INCLUDE_TOOLCHAIN', True) == '1')
     sdk_ext_type = d.getVar('SDK_EXT_TYPE', True)
-- 
2.1.4



^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox