Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] sstatesig: don't squash dependencies of useradd packages
From: Maxin B. John @ 2016-12-12 13:48 UTC (permalink / raw)
  To: openembedded-core

Without this change, sstate dependency filter squashes dependencies
of packages which inherits useradd class. That causes failures while
rebuilding it for another MACHINE.

Fixes [YOCTO #8078]

Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
 meta/lib/oe/sstatesig.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 8224e3a..88b2290 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -17,6 +17,9 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
     def isAllArch(fn):
         inherits = " ".join(dataCache.inherits[fn])
         return "/allarch.bbclass" in inherits
+    def isUserAdd(fn):
+        inherits = " ".join(dataCache.inherits[fn])
+        return "/useradd.bbclass" in inherits
     def isImage(fn):
         return "/image.bbclass" in " ".join(dataCache.inherits[fn])
 
@@ -39,6 +42,10 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache):
 
     # Only target packages beyond here
 
+    # Don't squash the dependencies of packages inheritting useradd class
+    if  isUserAdd(fn):
+        return True
+
     # allarch packagegroups are assumed to have well behaved names which don't change between architecures/tunes
     if isPackageGroup(fn) and isAllArch(fn) and not isNative(depname):
         return False  
-- 
2.4.0



^ permalink raw reply related

* Re: [PATCH 1/3] libxml2: Necessary changes before fixing CVE-2016-5131 Fix comaparation with root node in xmlXPathCmpNodes and NULL pointer deref in XPointer
From: Valek, Andrej @ 2016-12-12 13:53 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LaQJYV17g0oc3Os_uqa+a33tGXJwya4s-jDpotweBEBwA@mail.gmail.com>

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

Hi Ross,

I think, there was a web-page delay. Patch 3/3 is already there: http://lists.openembedded.org/pipermail/openembedded-core/2016-December/130046.html

Andrej

From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: 12. decembra 2016 14:44
To: Valek, Andrej (CT DD DS EU SK BT)
Cc: OE-core
Subject: Re: [OE-core] [PATCH 1/3] libxml2: Necessary changes before fixing CVE-2016-5131 Fix comaparation with root node in xmlXPathCmpNodes and NULL pointer deref in XPointer

I see part 1 and 2 but no part 3.

Also, have you asked upstream if they'll be making a point release with these in?

Ross

On 12 December 2016 at 13:20, Andrej Valek <andrej.valek@siemens.com<mailto:andrej.valek@siemens.com>> wrote:
xpath:
 - Check for errors after evaluating first operand.
 - Add sanity check for empty stack.
 - Include comparation in changes from xmlXPathCmpNodesExt to xmlXPathCmpNodes

Signed-off-by: Andrej Valek <andrej.valek@siemens.com<mailto:andrej.valek@siemens.com>>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com<mailto:pascal.bach@siemens.com>>
---
 .../libxml2/libxml2-fix_node_comparison.patch      | 67 ++++++++++++++++++++++
 meta/recipes-core/libxml/libxml2_2.9.4.bb<http://libxml2_2.9.4.bb>          |  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch

diff --git a/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch b/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
new file mode 100644
index 0000000..11718bb
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/libxml2-fix_node_comparison.patch
@@ -0,0 +1,67 @@
+libxml2-2.9.4: Fix comparison with root node in xmlXPathCmpNodes and NULL pointer deref in XPointer
+
+xpath:
+ - Check for errors after evaluating first operand.
+ - Add sanity check for empty stack.
+ - Include comparation in changes from xmlXPathCmpNodesExt to xmlXPathCmpNodes
+
+Upstream-Status: Backported
+ - [https://git.gnome.org/browse/libxml2/commit/?id=c1d1f7121194036608bf555f08d3062a36fd344b]
+ - [https://git.gnome.org/browse/libxml2/commit/?id=a005199330b86dada19d162cae15ef9bdcb6baa8]
+CVE: necessary changes for fixing CVE-2016-5131
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com<mailto:andrej.valek@siemens.com>>
+Signed-off-by: Pascal Bach <pascal.bach@siemens.com<mailto:pascal.bach@siemens.com>>
+
+diff --git a/result/XPath/xptr/viderror b/result/XPath/xptr/viderror
+new file mode 100644
+index 0000000..d589882
+--- /dev/null
++++ b/result/XPath/xptr/viderror
+@@ -0,0 +1,4 @@
++
++========================
++Expression: xpointer(non-existing-fn()/range-to(id('chapter2')))
++Object is empty (NULL)
+diff --git a/test/XPath/xptr/viderror b/test/XPath/xptr/viderror
+new file mode 100644
+index 0000000..da8c53b
+--- /dev/null
++++ b/test/XPath/xptr/viderror
+@@ -0,0 +1 @@
++xpointer(non-existing-fn()/range-to(id('chapter2')))
+diff --git a/xpath.c b/xpath.c
+index 113bce6..d992841 100644
+--- a/xpath.c
++++ b/xpath.c
+@@ -3342,13 +3342,13 @@ xmlXPathCmpNodes(xmlNodePtr node1, xmlNodePtr node2) {
+      * compute depth to root
+      */
+     for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
+-      if (cur == node1)
++      if (cur->parent == node1)
+           return(1);
+       depth2++;
+     }
+     root = cur;
+     for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
+-      if (cur == node2)
++      if (cur->parent == node2)
+           return(-1);
+       depth1++;
+     }
+@@ -14005,9 +14005,14 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op)
+                 xmlNodeSetPtr oldset;
+                 int i, j;
+
+-                if (op->ch1 != -1)
++                if (op->ch1 != -1) {
+                     total +=
+                         xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]);
++                    CHECK_ERROR0;
++                }
++                if (ctxt->value == NULL) {
++                    XP_ERROR0(XPATH_INVALID_OPERAND);
++                }
+                 if (op->ch2 == -1)
+                     return (total);
+
diff --git a/meta/recipes-core/libxml/libxml2_2.9.4.bb<http://libxml2_2.9.4.bb> b/meta/recipes-core/libxml/libxml2_2.9.4.bb<http://libxml2_2.9.4.bb>
index 1fed90b..66a8940 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.4.bb<http://libxml2_2.9.4.bb>
+++ b/meta/recipes-core/libxml/libxml2_2.9.4.bb<http://libxml2_2.9.4.bb>
@@ -19,6 +19,7 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
            file://run-ptest \
            file://python-sitepackages-dir.patch \
            file://libxml-m4-use-pkgconfig.patch \
+           file://libxml2-fix_node_comparison.patch \
            file://libxml2-CVE-2016-5131.patch \
           "

--
2.1.4

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org>
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

^ permalink raw reply related

* Re: [PATCH 1/3] libxml2: Necessary changes before fixing CVE-2016-5131 Fix comaparation with root node in xmlXPathCmpNodes and NULL pointer deref in XPointer
From: Burton, Ross @ 2016-12-12 13:55 UTC (permalink / raw)
  To: Valek, Andrej; +Cc: OE-core
In-Reply-To: <D55698ECEC159B488D62A508E18D7FEC0143F6AB@ATNETS9912WMSX.ww300.siemens.net>

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

On 12 December 2016 at 13:53, Valek, Andrej <andrej.valek@siemens.com>
wrote:

> I think, there was a web-page delay. Patch 3/3 is already there:
> http://lists.openembedded.org/pipermail/openembedded-core/
> 2016-December/130046.html
>
>
Yeah, obviously posting about it meant it arrived. :)

Ross

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

^ permalink raw reply

* Re: [PATCH] edgerouter.conf: enable generation of wic.bmap
From: Christopher Larson @ 2016-12-12 15:11 UTC (permalink / raw)
  To: Ed Bartosh; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <20161212105853.GA21809@linux.intel.com>

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

On Mon, Dec 12, 2016 at 3:58 AM, Ed Bartosh <ed.bartosh@linux.intel.com>
wrote:

> On Sat, Dec 10, 2016 at 11:40:38AM -0700, Christopher Larson wrote:
> > On Fri, Dec 9, 2016 at 10:46 AM, Ed Bartosh <ed.bartosh@linux.intel.com>
> > wrote:
> >
> > > Enabled generation of block map(bmap) files for wic images
> > > built for edgerouter machine. This should simplify flashing
> > > images with bmaptool.
> > >
> > > [YOCTO #10621]
> > >
> > > Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> > >
> >
> > I think this is more of a distro decision than machine, whether they want
> > to support use of bmaptool for their users/customers. It’d be nice if it
> > was easier to control compression from the distro, too. For example, if
> we
> > want to distribute wic.bz2+wic.bmap in our installers, it’d be nice to be
> > able to switch to that for all machines that use wic. I’m not sure how
> best
> > to pull that off, however. Something to think about for the future.
>
> Thanks for pointing out to it. I did it this way for two reasons:
> - IMAGE_FSTYPES was already modified in edgerouter.conf
> - I wanted to enable generation of wic.bmap for subset of machines, i.e.
>   only for hardware reference BSPs mentioned in README.hardware
>

That’s a fair point. As khem indicated, this is a bit of an intersection
between distro and machine, hardware capabilities and distro policy. I
expect this is fine as is, but something to consider improving going
forward. I’m not certain a distro/machine feature makes sense for something
like this, but perhaps something else might.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

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

^ permalink raw reply

* [PATCH 1/2] libunistring: Update version 0.9.6 -> 0.9.7
From: Maxin B. John @ 2016-12-12 15:16 UTC (permalink / raw)
  To: openembedded-core

The license has changed from LGPLv3+ to "LGPLv3+ or GPLv2"
        * README (Copyright): Rewrite section
        * doc/libunistring.texi (Licenses): Change accordingly

Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
 .../{libunistring_0.9.6.bb => libunistring_0.9.7.bb}         | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
 rename meta/recipes-support/libunistring/{libunistring_0.9.6.bb => libunistring_0.9.7.bb} (70%)

diff --git a/meta/recipes-support/libunistring/libunistring_0.9.6.bb b/meta/recipes-support/libunistring/libunistring_0.9.7.bb
similarity index 70%
rename from meta/recipes-support/libunistring/libunistring_0.9.6.bb
rename to meta/recipes-support/libunistring/libunistring_0.9.7.bb
index bb70122..f77a210 100644
--- a/meta/recipes-support/libunistring/libunistring_0.9.6.bb
+++ b/meta/recipes-support/libunistring/libunistring_0.9.7.bb
@@ -13,16 +13,18 @@ DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
 
 HOMEPAGE = "http://www.gnu.org/software/libunistring/"
 SECTION = "devel"
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+LICENSE = "LGPLv3+ | GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+                    file://README;beginline=45;endline=65;md5=08287d16ba8d839faed8d2dc14d7d6a5 \
+                    file://doc/libunistring.texi;md5=b86c9fd7acaac623017239640631912c \
+                   "
 
 SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
            file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
            file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
 "
-SRC_URI[md5sum] = "dfae4ff5583649ed24d8f368f1d0543b"
-SRC_URI[sha256sum] = "9625eec2507f4789ebb6fc48ebda98be0e0168979a2f68aa8b680bf8eeabbd47"
+SRC_URI[md5sum] = "8e663454aa372181ee8e46edaa3ba4c8"
+SRC_URI[sha256sum] = "9ce081cbee1951b55597b30e7030bda9d7b2f034ef901a135ff3a020be5a41e5"
 
 inherit autotools texinfo
 BBCLASSEXTEND = "native nativesdk"
-- 
2.4.0



^ permalink raw reply related

* [PATCH 2/2] harfbuzz: upgrade to 1.3.4
From: Maxin B. John @ 2016-12-12 15:16 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <1481555783-3130-1-git-send-email-maxin.john@intel.com>

1.3.3 -> 1.3.4

Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
 .../harfbuzz/{harfbuzz_1.3.3.bb => harfbuzz_1.3.4.bb}                 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-graphics/harfbuzz/{harfbuzz_1.3.3.bb => harfbuzz_1.3.4.bb} (88%)

diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.3.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.4.bb
similarity index 88%
rename from meta/recipes-graphics/harfbuzz/harfbuzz_1.3.3.bb
rename to meta/recipes-graphics/harfbuzz/harfbuzz_1.3.4.bb
index 0bda42e..74d6c6a 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.3.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.4.bb
@@ -12,8 +12,8 @@ DEPENDS = "glib-2.0 cairo fontconfig freetype"
 
 SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
 
-SRC_URI[md5sum] = "97ae15a72a93f1f27324a2b8d9bd3b1d"
-SRC_URI[sha256sum] = "2620987115a4122b47321610dccbcc18f7f121115fd7b88dc8a695c8b66cb3c9"
+SRC_URI[md5sum] = "065843caf247687b94126773285bc70f"
+SRC_URI[sha256sum] = "718aa6fcadef1a6548315b8cfe42cc27e926256302c337f42df3a443843f6a2b"
 
 inherit autotools pkgconfig lib_package gtk-doc
 
-- 
2.4.0



^ permalink raw reply related

* Re: [PATCH] module.bbclass: allow to override location of Module.symvers
From: André Draszik @ 2016-12-12 15:38 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <20161121093713.7220-1-git@andred.net>

ping

On Mon, 2016-11-21 at 09:37 +0000, André Draszik wrote:
> From: André Draszik <adraszik@tycoint.com>
> 
> Requiring all build systems for external kernel modules to
> place Module.symvers directly into ${B}/. is quite an
> artificial assumption/requirement. It doesn't have to end
> up there, but could easily end up somewhere below ${B}.
> 
> Allow to override the location below ${B}
> 
> Note that we still don't make use of multiple
> Module.symvers in case there are any generated by one
> single kernel module build, but this is no change in
> behaviour from before and could be added if there really
> is a demand for that.
> 
> Reported-by: Denys Dmytriyenko <denis@denix.org>
> Signed-off-by: André Draszik <adraszik@tycoint.com>
> ---
>  meta/classes/module.bbclass | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
> index 68e3d34..037ca4f 100644
> --- a/meta/classes/module.bbclass
> +++ b/meta/classes/module.bbclass
> @@ -7,6 +7,7 @@ do_make_scripts[depends] +=
> "virtual/kernel:do_shared_workdir"
>  EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
>  
>  MODULES_INSTALL_TARGET ?= "modules_install"
> +MODULES_MODULE_SYMVERS_LOCATION ?= ""
>  
>  python __anonymous () {
>      depends = d.getVar('DEPENDS', True)
> @@ -35,10 +36,17 @@ module_do_install() {
>  	           O=${STAGING_KERNEL_BUILDDIR} \
>  	           ${MODULES_INSTALL_TARGET}
>  
> -	install -d -m0755 ${D}${includedir}/${BPN}
> -	cp -a --no-preserve=ownership ${B}/Module.symvers
> ${D}${includedir}/${BPN}
> -	# it doesn't actually seem to matter which path is specified here
> -	sed -e 's:${B}/::g' -i ${D}${includedir}/${BPN}/Module.symvers
> +	if [ ! -e
> "${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers" ] ; then
> +		bbwarn "Module.symvers not found in
> ${B}/${MODULES_MODULE_SYMVERS_LOCATION}"
> +		bbwarn "Please consider setting
> MODULES_MODULE_SYMVERS_LOCATION to a"
> +		bbwarn "directory below B to get correct inter-module
> dependencies"
> +	else
> +		install -Dm0644
> "${B}/${MODULES_MODULE_SYMVERS_LOCATION}"/Module.symvers
> ${D}${includedir}/${BPN}/Module.symvers
> +		# Module.symvers contains absolute path to the build
> directory.
> +		# While it doesn't actually seem to matter which path is
> specified,
> +		# clear them out to avoid confusion
> +		sed -e 's:${B}/::g' -i
> ${D}${includedir}/${BPN}/Module.symvers
> +	fi
>  }
>  
>  EXPORT_FUNCTIONS do_compile do_install


^ permalink raw reply

* [PATCH] busybox: allow libiproute to handle table ids larger than 255
From: André Draszik @ 2016-12-12 15:40 UTC (permalink / raw)
  To: openembedded-core

From: Lukasz Nowak <lnowak@tycoint.com>

These changes are required for compatibility with ConnMan, which by default
uses table ids greater than 255.

Signed-off-by: Lukasz Nowak <lnowak@tycoint.com>
---
 ...biproute-handle-table-ids-larger-than-255.patch | 132 +++++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.24.1.bb        |   1 +
 2 files changed, 133 insertions(+)
 create mode 100644 meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch

diff --git a/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch b/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
new file mode 100644
index 0000000..9ce720b
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-libiproute-handle-table-ids-larger-than-255.patch
@@ -0,0 +1,132 @@
+From 93952a29faae6ac90f3107f1833046a30fb9789c Mon Sep 17 00:00:00 2001
+From: Lukasz Nowak <lnowak@tycoint.com>
+Date: Wed, 23 Nov 2016 12:48:21 +0000
+Subject: [PATCH] libiproute: handle table ids larger than 255
+
+Linux kernel, starting from 2.6.19 allows ip table ids to have 32-bit values.
+In order to preserve compatibility, the old 8-bit field: rtm_table is still
+in use when table id is lower than 256.
+
+Add support for the 32-bit table id (RTA_TABLE attribute) in:
+- ip route print
+- ip route modify
+- ip rule print
+- ip rule modify
+
+Add printing of table ids to ip route.
+
+Changes are compatible with the mainline iproute2 utilities.
+
+These changes are required for compatibility with ConnMan, which by default
+uses table ids greater than 255.
+
+Upstream-Status: Submitted http://lists.busybox.net/pipermail/busybox/2016-November/084966.html
+
+Signed-off-by: Lukasz Nowak <lnowak@tycoint.com>
+---
+ networking/libiproute/iproute.c | 22 ++++++++++++++++++----
+ networking/libiproute/iprule.c  | 11 +++++++++--
+ 2 files changed, 27 insertions(+), 6 deletions(-)
+
+diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
+index 6ecd5f7..3add10b 100644
+--- a/networking/libiproute/iproute.c
++++ b/networking/libiproute/iproute.c
+@@ -87,6 +87,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
+ 	inet_prefix dst;
+ 	inet_prefix src;
+ 	int host_len = -1;
++	uint32_t tid;
+ 
+ 	if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
+ 		fprintf(stderr, "Not a route: %08x %08x %08x\n",
+@@ -99,6 +100,14 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
+ 	if (len < 0)
+ 		bb_error_msg_and_die("wrong nlmsg len %d", len);
+ 
++	memset(tb, 0, sizeof(tb));
++	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
++
++	if (tb[RTA_TABLE])
++		tid = *(uint32_t *)RTA_DATA(tb[RTA_TABLE]);
++	else
++		tid = r->rtm_table;
++
+ 	if (r->rtm_family == AF_INET6)
+ 		host_len = 128;
+ 	else if (r->rtm_family == AF_INET)
+@@ -128,7 +137,7 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
+ 			}
+ 		}
+ 	} else {
+-		if (G_filter.tb > 0 && G_filter.tb != r->rtm_table) {
++		if (G_filter.tb > 0 && G_filter.tb != tid) {
+ 			return 0;
+ 		}
+ 	}
+@@ -157,10 +166,8 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
+ 		return 0;
+ 	}
+ 
+-	memset(tb, 0, sizeof(tb));
+ 	memset(&src, 0, sizeof(src));
+ 	memset(&dst, 0, sizeof(dst));
+-	parse_rtattr(tb, RTA_MAX, RTM_RTA(r), len);
+ 
+ 	if (tb[RTA_SRC]) {
+ 		src.bitlen = r->rtm_src_len;
+@@ -283,6 +290,8 @@ static int FAST_FUNC print_route(const struct sockaddr_nl *who UNUSED_PARAM,
+ 	if (tb[RTA_OIF]) {
+ 		printf("dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF])));
+ 	}
++	if (tid && tid != RT_TABLE_MAIN && !G_filter.tb)
++		printf("table %s ", rtnl_rttable_n2a(tid));
+ 
+ 	/* Todo: parse & show "proto kernel", "scope link" here */
+ 
+@@ -434,7 +443,12 @@ IF_FEATURE_IP_RULE(ARG_table,)
+ 			NEXT_ARG();
+ 			if (rtnl_rttable_a2n(&tid, *argv))
+ 				invarg(*argv, "table");
+-			req.r.rtm_table = tid;
++			if (tid < 256)
++				req.r.rtm_table = tid;
++			else {
++				req.r.rtm_table = RT_TABLE_UNSPEC;
++				addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
++			}
+ #endif
+ 		} else if (arg == ARG_dev || arg == ARG_oif) {
+ 			NEXT_ARG();
+diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
+index 774a3e2..3fac7c5 100644
+--- a/networking/libiproute/iprule.c
++++ b/networking/libiproute/iprule.c
+@@ -119,7 +119,9 @@ static int FAST_FUNC print_rule(const struct sockaddr_nl *who UNUSED_PARAM,
+ 		printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
+ 	}
+ 
+-	if (r->rtm_table)
++	if (tb[RTA_TABLE])
++		printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
++	else if (r->rtm_table)
+ 		printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
+ 
+ 	if (tb[RTA_FLOW]) {
+@@ -259,7 +261,12 @@ static int iprule_modify(int cmd, char **argv)
+ 			NEXT_ARG();
+ 			if (rtnl_rttable_a2n(&tid, *argv))
+ 				invarg(*argv, "table ID");
+-			req.r.rtm_table = tid;
++			if (tid < 256)
++				req.r.rtm_table = tid;
++			else {
++				req.r.rtm_table = RT_TABLE_UNSPEC;
++				addattr32(&req.n, sizeof(req), RTA_TABLE, tid);
++			}
+ 			table_ok = 1;
+ 		} else if (key == ARG_dev ||
+ 			   key == ARG_iif
+-- 
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.24.1.bb
index df0e131..c35cba3 100644
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -53,6 +53,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://busybox-kbuild-race-fix-commit-d8e61bb.patch \
            file://commit-applet_tables-fix-commit-0dddbc1.patch \
            file://makefile-libbb-race.patch \
+           file://0001-libiproute-handle-table-ids-larger-than-255.patch \
 "
 SRC_URI_append_libc-musl = " file://musl.cfg "
 
-- 
2.10.2



^ permalink raw reply related

* [PATCH v4] rootfs: Modify RPM installation
From: David Vincent @ 2016-12-12 15:59 UTC (permalink / raw)
  To: openembedded-core, ross.burton, leonardo.sandoval.gonzalez,
	daniela.plascencia
In-Reply-To: <20161124104959.32350-1-freesilicon@gmail.com>

When using a custom RPM data directory instead of the default dir
'/var/lib/rpm', the final image did not contain any of the database
files in the expected location. This commit takes into account the
'rpmlibdir' variable set into 'rootfs_rpm.bbclass'.

Signed-off-by: David Vincent <freesilicon@gmail.com>
---
 meta/lib/oe/package_manager.py | 23 +++++++++++++----------
 meta/lib/oe/rootfs.py          |  3 ++-
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index e5e3c3b679..e063eeeeee 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -352,7 +352,8 @@ class RpmPkgsList(PkgsList):
         super(RpmPkgsList, self).__init__(d, rootfs_dir)
 
         self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
-        self.image_rpmlib = os.path.join(self.rootfs_dir, 'var/lib/rpm')
+        self.rpm_libdir = self.d.getVar('rpmlibdir', True)
+        self.image_rpmlib = os.path.join(self.rootfs_dir, self.rpm_libdir[1:])
 
         self.ml_prefix_list, self.ml_os_list = \
             RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, os_var)
@@ -412,7 +413,7 @@ class RpmPkgsList(PkgsList):
 
     def list_pkgs(self):
         cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
-        cmd.extend(['-D', '_dbpath /var/lib/rpm'])
+        cmd.extend(['-D', '_dbpath', self.rpm_libdir])
         cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'])
 
         try:
@@ -679,7 +680,8 @@ class RpmPM(PackageManager):
         self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
                                                self.task_name)
         self.saved_rpmlib = self.d.expand('${T}/saved/%s' % self.task_name)
-        self.image_rpmlib = os.path.join(self.target_rootfs, 'var/lib/rpm')
+        self.rpm_libdir = self.d.getVar('rpmlibdir', True)
+        self.image_rpmlib = os.path.join(self.target_rootfs, self.rpm_libdir[1:])
 
         if not os.path.exists(self.d.expand('${T}/saved')):
             bb.utils.mkdirhier(self.d.expand('${T}/saved'))
@@ -950,7 +952,7 @@ class RpmPM(PackageManager):
             open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
 
         # Create database so that smart doesn't complain (lazy init)
-        cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '-qa']
+        cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', self.rpm_libdir, '-qa']
         try:
             subprocess.check_output(cmd, stderr=subprocess.STDOUT)
         except subprocess.CalledProcessError as e:
@@ -959,20 +961,19 @@ class RpmPM(PackageManager):
         # Import GPG key to RPM database of the target system
         if self.d.getVar('RPM_SIGN_PACKAGES', True) == '1':
             pubkey_path = self.d.getVar('RPM_GPG_PUBKEY', True)
-            cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '--import', pubkey_path]
+            cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', self.rpm_libdir, '--import', pubkey_path]
             try:
                 subprocess.check_output(cmd, stderr=subprocess.STDOUT)
             except subprocess.CalledProcessError as e:
                 bb.fatal("Import GPG key failed. Command '%s' "
                         "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
 
-
         # Configure smart
         bb.note("configuring Smart settings")
         bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
                         True)
         self._invoke_smart(['config', '--set', 'rpm-root=%s' % self.target_rootfs])
-        self._invoke_smart(['config', '--set', 'rpm-dbpath=/var/lib/rpm'])
+        self._invoke_smart(['config', '--set', 'rpm-dbpath=%s' % self.rpm_libdir])
         self._invoke_smart(['config', '--set', 'rpm-extra-macros._var=%s' %
                            self.d.getVar('localstatedir', True)])
         cmd = ["config", "--set", "rpm-extra-macros._tmppath=/%s/tmp" % self.install_dir_name]
@@ -1232,7 +1233,7 @@ class RpmPM(PackageManager):
 
         if not with_dependencies:
             cmd = [self.rpm_cmd] + ["-e", "--nodeps", "--root=%s" %
-                    self.target_rootfs, "--dbpath=/var/lib/rpm",
+                    self.target_rootfs, "--dbpath=%s" % self.rpm_libdir,
                     "--define='_cross_scriptlet_wrapper %s'" %
                     self.scriptlet_wrapper,
                     "--define='_tmppath /%s/tmp'" % self.install_dir_name] + pkgs
@@ -1380,7 +1381,8 @@ class RpmPM(PackageManager):
         saved_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/') + new_pkg
 
         cmd = self.rpm_cmd + ' -q --scripts --root ' + self.target_rootfs
-        cmd += ' --dbpath=/var/lib/rpm ' + new_pkg
+        cmd += ' --dbpath=%s ' %  self.rpm_libdir
+        cmd += new_pkg
         cmd += ' | sed -n -e "/^postinstall scriptlet (using .*):$/,/^.* scriptlet (using .*):$/ {/.*/p}"'
         cmd += ' | sed -e "/postinstall scriptlet (using \(.*\)):$/d"'
         cmd += ' -e "/^.* scriptlet (using .*):$/d" > %s' % saved_dir
@@ -1412,7 +1414,8 @@ class RpmPM(PackageManager):
     '''
     def unlock_rpm_db(self):
         # Remove rpm db lock files
-        rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.target_rootfs)
+        rpm_db_locks = glob.glob('%s%s/__db.*' % (self.target_rootfs,
+            self.rpm_libdir))
         for f in rpm_db_locks:
             bb.utils.remove(f, True)
 
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index a348b975c2..7cf8ce84ca 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -426,6 +426,7 @@ class RpmRootfs(Rootfs):
 
     def _create(self):
         pkgs_to_install = self.manifest.parse_initial_manifest()
+        rpm_libdir = self.d.getVar('rpmlibdir', True)
         rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS', True)
         rpm_post_process_cmds = self.d.getVar('RPM_POSTPROCESS_COMMANDS', True)
 
@@ -473,7 +474,7 @@ class RpmRootfs(Rootfs):
         if self.progress_reporter:
             self.progress_reporter.next_stage()
 
-        self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm', '/var/lib/smart'])
+        self._setup_dbg_rootfs(['/etc/rpm', rpm_libdir, '/var/lib/smart'])
 
         execute_pre_post_process(self.d, rpm_post_process_cmds)
 
-- 
2.11.0



^ permalink raw reply related

* Yocto Project Status WW51
From: Saul Wold @ 2016-12-12 16:01 UTC (permalink / raw)
  To: yocto, openembedded-core

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


Current Dev Position: YP 2.3 M1 -> M2
Next Deadline: YP 2.3 M1 by Dec. 12, 2016 (TODAY!!)
                         YP 2.3 M2 by Jan 23, 2017

SWAT team rotation: Tracy -> Alejandro
https://wiki.yoctoproject.org/wiki/Yocto_Build_Failure_Swat_Team

Key Status/Updates:
 * Today is the M1 feature freeze deadline. Patches are being processed with a view to merging. We believe all patchsets targeting M1 have been posted apart from tinfoil2 which is imminent and we’re planning to try and include that in M1.
 * We’re continuing to struggle to identify which patches are causing which failures which may delay M1 slightly as it is going to take time to figure this out and ensure builds are stable.
 * We’re considering the best way to handle containers and the current build appliance in the project going forwards. If anyone had input they wish to contribute on that subject, Brian has started a thread on the architecture mailing list.

Proposed upcoming dot releases:
YP 2.0.3 Release by Dec. 9, 2016
YP 2.2.1 Release by Jan. 20, 2017
YP 2.1.3 Release by May. 19, 2017

Key YP 2.3 Dates:
YP 2.3 M1 Cutoff is Dec. 12, 2016
YP 2.3 M1 Release is Dec. 23, 2016
YP 2.3 M2 Cutoff is Jan. 23, 2017
YP 2.3 M2 Release is Feb. 3, 2017
YP 2.3 M3 Cutoff is Feb 27, 2017
YP 2.3 M3 Release is Mar. 10, 2017
YP 2.3 M4 Cutoff is April 3, 2017
YP 2.3 M4 Release is April 28, 2017

Tracking Metrics:
	WDD 2437 (last week 2507)
(https://wiki.yoctoproject.org/charts/combo.html)

Key Status Links for YP:
https://wiki.yoctoproject.org/wiki/Yocto_Project_v2.3_Status
https://wiki.yoctoproject.org/wiki/Yocto_2.3_Schedule
https://wiki.yoctoproject.org/wiki/Yocto_2.3_Features

[If anyone has suggestions for other information you’d like to see on this weekly status update, let us know!]

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

^ permalink raw reply

* [PATCH v5] classes: Fix alternatives and rc.d ordering
From: David Vincent @ 2016-12-12 16:01 UTC (permalink / raw)
  To: openembedded-core, haris.okanovic, markus.lehtonen
In-Reply-To: <20161128161150.28655-2-freesilicon@gmail.com>

When using an alternative as an initscript, the ordering between
update-rc.d and update-alternatives tasks during prerm and postinst
tasks must always be the following in order to work:
  * prerm:
    - stop daemon
    - remove alternative

  * postinst:
    - add alternative
    - start daemon

This patchset adds comments to the scripts generated by both classes and
organize the generated sections based on those comments.

[YOCTO #10433]

Signed-off-by: David Vincent <freesilicon@gmail.com>
---
 meta/classes/update-alternatives.bbclass | 29 ++++++++++++++++++++++-------
 meta/classes/update-rc.d.bbclass         | 20 ++++++++++++++++++--
 2 files changed, 40 insertions(+), 9 deletions(-)

diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 1fdd681315..65929e5555 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -195,8 +195,8 @@ python populate_packages_updatealternatives () {
     pkgdest = d.getVar('PKGD', True)
     for pkg in (d.getVar('PACKAGES', True) or "").split():
         # Create post install/removal scripts
-        alt_setup_links = ""
-        alt_remove_links = ""
+        alt_setup_links = "# Begin section update-alternatives\n"
+        alt_remove_links = "# Begin section update-alternatives\n"
         for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split():
             alt_link     = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True)
             alt_target   = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name, True)
@@ -219,10 +219,13 @@ python populate_packages_updatealternatives () {
             # Default to generate shell script.. eventually we may want to change this...
             alt_target = os.path.normpath(alt_target)
 
-            alt_setup_links  += '\tupdate-alternatives --install %s %s %s %s\n' % (alt_link, alt_name, alt_target, alt_priority)
-            alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % (alt_name, alt_target)
+            alt_setup_links  += 'update-alternatives --install %s %s %s %s\n' % (alt_link, alt_name, alt_target, alt_priority)
+            alt_remove_links += 'update-alternatives --remove  %s %s\n' % (alt_name, alt_target)
 
-        if alt_setup_links:
+        alt_setup_links += "# End section update-alternatives\n"
+        alt_remove_links += "# End section update-alternatives\n"
+
+        if len(alt_setup_links.splitlines()) > 2:
             # RDEPENDS setup
             provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True)
             if provider:
@@ -232,12 +235,24 @@ python populate_packages_updatealternatives () {
             bb.note('adding update-alternatives calls to postinst/prerm for %s' % pkg)
             bb.note('%s' % alt_setup_links)
             postinst = d.getVar('pkg_postinst_%s' % pkg, True) or '#!/bin/sh\n'
-            postinst += alt_setup_links
+            postinst = postinst.splitlines(True)
+            try:
+                index = postinst.index('# Begin section update-rc.d\n')
+                postinst.insert(index, alt_setup_links)
+            except ValueError:
+                postinst.append(alt_setup_links)
+            postinst = ''.join(postinst)
             d.setVar('pkg_postinst_%s' % pkg, postinst)
 
             bb.note('%s' % alt_remove_links)
             prerm = d.getVar('pkg_prerm_%s' % pkg, True) or '#!/bin/sh\n'
-            prerm += alt_remove_links
+            prerm = prerm.splitlines(True)
+            try:
+                index = prerm.index('# End section update-rc.d\n')
+                prerm.insert(index + 1, alt_remove_links)
+            except ValueError:
+                prerm.append(alt_remove_links)
+            prerm = ''.join(prerm)
             d.setVar('pkg_prerm_%s' % pkg, prerm)
 }
 
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 2c3ef9edd1..530de87270 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -35,6 +35,7 @@ fi
 }
 
 updatercd_postinst() {
+# Begin section update-rc.d
 if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
 	if [ -n "$D" ]; then
 		OPT="-r $D"
@@ -43,12 +44,15 @@ if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then
 	fi
 	update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
 fi
+# End section update-rc.d
 }
 
 updatercd_prerm() {
+# Begin section update-rc.d
 if ${@use_updatercd(d)} && [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
 	${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
 fi
+# End section update-rc.d
 }
 
 updatercd_postrm() {
@@ -111,13 +115,25 @@ python populate_packages_updatercd () {
         postinst = d.getVar('pkg_postinst_%s' % pkg, True)
         if not postinst:
             postinst = '#!/bin/sh\n'
-        postinst += localdata.getVar('updatercd_postinst', True)
+        postinst = postinst.splitlines(True)
+        try:
+            index = postinst.index('# End section update-alternatives\n')
+            postinst.insert(index + 1, localdata.getVar('updatercd_postinst', True))
+        except ValueError:
+            postinst.append(localdata.getVar('updatercd_postinst', True))
+        postinst = ''.join(postinst)
         d.setVar('pkg_postinst_%s' % pkg, postinst)
 
         prerm = d.getVar('pkg_prerm_%s' % pkg, True)
         if not prerm:
             prerm = '#!/bin/sh\n'
-        prerm += localdata.getVar('updatercd_prerm', True)
+        prerm = prerm.splitlines(True)
+        try:
+            index = prerm.index('# Begin section update-alternatives\n')
+            prerm.insert(index, localdata.getVar('updatercd_prerm', True))
+        except ValueError:
+            prerm.append(localdata.getVar('updatercd_prerm', True))
+        prerm = ''.join(prerm)
         d.setVar('pkg_prerm_%s' % pkg, prerm)
 
         postrm = d.getVar('pkg_postrm_%s' % pkg, True)
-- 
2.11.0



^ permalink raw reply related

* [PATCH] oe-pkgdata-util: Make read-value handle override variables
From: Ola x Nilsson @ 2016-12-12 16:19 UTC (permalink / raw)
  To: openembedded-core

Some variables in pkgdata files have a package-name override.  When
the bare variable can not be found, try with the override-variant.

PKGSIZE is one such variable, and already had special code to handle this.

Test included.

Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com>
---
 meta/lib/oeqa/selftest/pkgdata.py |  2 ++
 scripts/oe-pkgdata-util           | 16 ++++++++--------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/selftest/pkgdata.py b/meta/lib/oeqa/selftest/pkgdata.py
index 5a63f89..adfe346 100644
--- a/meta/lib/oeqa/selftest/pkgdata.py
+++ b/meta/lib/oeqa/selftest/pkgdata.py
@@ -41,6 +41,8 @@ class OePkgdataUtilTests(oeSelfTest):
     def test_read_value(self):
         result = runCmd('oe-pkgdata-util read-value PN libz1')
         self.assertEqual(result.output, 'zlib')
+        result = runCmd('oe-pkgdata-util read-value PKG libz1')
+        self.assertEqual(result.output, 'libz1')
         result = runCmd('oe-pkgdata-util read-value PKGSIZE bash')
         pkgsize = int(result.output.strip())
         self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output)
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index dbffd6a..fe41f41 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -174,15 +174,16 @@ def read_value(args):
             logger.error("No packages specified")
             sys.exit(1)
 
-    def readvar(pkgdata_file, valuename):
+    def readvar(pkgdata_file, valuename, mappedpkg):
         val = ""
         with open(pkgdata_file, 'r') as f:
             for line in f:
-                if line.startswith(valuename + ":"):
+                if (line.startswith(valuename + ":") or
+                    line.startswith(valuename + "_" + mappedpkg + ":")):
                     val = line.split(': ', 1)[1].rstrip()
         return val
 
-    logger.debug("read-value('%s', '%s' '%s'" % (args.pkgdata_dir, args.valuename, packages))
+    logger.debug("read-value('%s', '%s' '%s')" % (args.pkgdata_dir, args.valuename, packages))
     for package in packages:
         pkg_split = package.split('_')
         pkg_name = pkg_split[0]
@@ -192,18 +193,17 @@ def read_value(args):
         if os.path.exists(revlink):
             mappedpkg = os.path.basename(os.readlink(revlink))
             qvar = args.valuename
+            value = readvar(revlink, qvar, mappedpkg)
             if qvar == "PKGSIZE":
-                # append packagename
-                qvar = "%s_%s" % (args.valuename, mappedpkg)
                 # PKGSIZE is now in bytes, but we we want it in KB
-                pkgsize = (int(readvar(revlink, qvar)) + 1024 // 2) // 1024
+                pkgsize = (int(value) + 1024 // 2) // 1024
                 value = "%d" % pkgsize
-            else:
-                value = readvar(revlink, qvar)
             if args.prefix_name:
                 print('%s %s' % (pkg_name, value))
             else:
                 print(value)
+        else:
+            logger.debug("revlink %s does not exist", revlink)
 
 def lookup_pkglist(pkgs, pkgdata_dir, reverse):
     if reverse:
-- 
2.1.4



^ permalink raw reply related

* Re: [PATCH] fontconfig: Fix namespace conflicts with glibc
From: Khem Raj @ 2016-12-12 17:47 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0La2dNp3SQ3AurR+QOq9mt-YgsMz6PVra56eJQVwXfvjpA@mail.gmail.com>

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


> On Dec 12, 2016, at 4:45 AM, Burton, Ross <ross.burton@intel.com> wrote:
> 
> Has fallout, for example libxft:
> 
> | ../../libXft-2.3.2/src/xftfreetype.c:675:43: error: ‘FC_CHAR_WIDTH’ undeclared (first use in this function)
> 

OK, I wasn’t aware this is exported API, I will tweak the patch accordingly.

> Ross
> 
> On 11 December 2016 at 23:07, Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>> wrote:
> glibc 2.25 will come with TS 18661-1 macro definitions in limits.h which ends with following errors
> 
> | ../../fontconfig-2.12.1/src/fcmatch.c:324:63: error: 'PRI_CHAR_WIDTH_STRONG' undeclared here (not in a function)
> |  #define FC_OBJECT(NAME, Type, Cmp) { FC_##NAME##_OBJECT, Cmp, PRI_##NAME##_STRONG, PRI_##NAME##_WEAK },
> |                                                                ^
> | ../../fontconfig-2.12.1/src/fcobjs.h:54:1: note: in expansion of macro 'FC_OBJECT'
> |  FC_OBJECT (CHAR_WIDTH,  FcTypeInteger, NULL)
> |  ^~~~~~~~~
> | ../../fontconfig-2.12.1/src/fcmatch.c:324:84: error: 'PRI_CHAR_WIDTH_WEAK' undeclared here (not in a function)
> |  #define FC_OBJECT(NAME, Type, Cmp) { FC_##NAME##_OBJECT, Cmp, PRI_##NAME##_STRONG, PRI_##NAME##_WEAK },
> |                                                                                     ^
> | ../../fontconfig-2.12.1/src/fcobjs.h:54:1: note: in expansion of macro 'FC_OBJECT'
> |  FC_OBJECT (CHAR_WIDTH,  FcTypeInteger, NULL)
> |  ^~~~~~~~~
> | make[3]: *** [Makefile:632: fcmatch.lo] Error 1
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>>
> ---
>  ...icts-with-integer-width-macros-from-TS-18.patch | 74 ++++++++++++++++++++++
>  .../fontconfig/fontconfig_2.12.1.bb <http://fontconfig_2.12.1.bb/>                |  1 +
>  2 files changed, 75 insertions(+)
>  create mode 100644 meta/recipes-graphics/fontconfig/fontconfig/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch
> 
> diff --git a/meta/recipes-graphics/fontconfig/fontconfig/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch b/meta/recipes-graphics/fontconfig/fontconfig/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch
> new file mode 100644
> index 0000000..326ff3c
> --- /dev/null
> +++ b/meta/recipes-graphics/fontconfig/fontconfig/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch
> @@ -0,0 +1,74 @@
> +From 20cddc824c6501c2082cac41b162c34cd5fcc530 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>>
> +Date: Sun, 11 Dec 2016 14:32:00 -0800
> +Subject: [PATCH] Avoid conflicts with integer width macros from TS
> + 18661-1:2014
> +
> +glibc 2.25+ has now defined these macros in <limits.h>
> +https://sourceware.org/git/?p=glibc.git;a=commit;h=5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a <https://sourceware.org/git/?p=glibc.git;a=commit;h=5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a>
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com <mailto:raj.khem@gmail.com>>
> +---
> +Upstream-Status: Submitted
> +
> + fontconfig/fontconfig.h | 2 +-
> + src/fcobjs.h            | 2 +-
> + src/fcobjshash.gperf    | 2 +-
> + src/fcobjshash.h        | 2 +-
> + 4 files changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
> +index 5c72b22..843c532 100644
> +--- a/fontconfig/fontconfig.h
> ++++ b/fontconfig/fontconfig.h
> +@@ -128,7 +128,7 @@ typedef int                FcBool;
> + #define FC_USER_CACHE_FILE        ".fonts.cache-" FC_CACHE_VERSION
> +
> + /* Adjust outline rasterizer */
> +-#define FC_CHAR_WIDTH     "charwidth" /* Int */
> ++#define FC_CHARWIDTH      "charwidth" /* Int */
> + #define FC_CHAR_HEIGHT            "charheight"/* Int */
> + #define FC_MATRIX         "matrix"    /* FcMatrix */
> +
> +diff --git a/src/fcobjs.h b/src/fcobjs.h
> +index 1fc4f65..d27864b 100644
> +--- a/src/fcobjs.h
> ++++ b/src/fcobjs.h
> +@@ -51,7 +51,7 @@ FC_OBJECT (DPI,                      FcTypeDouble,   NULL)
> + FC_OBJECT (RGBA,              FcTypeInteger,  NULL)
> + FC_OBJECT (SCALE,             FcTypeDouble,   NULL)
> + FC_OBJECT (MINSPACE,          FcTypeBool,     NULL)
> +-FC_OBJECT (CHAR_WIDTH,                FcTypeInteger,  NULL)
> ++FC_OBJECT (CHARWIDTH,         FcTypeInteger,  NULL)
> + FC_OBJECT (CHAR_HEIGHT,               FcTypeInteger,  NULL)
> + FC_OBJECT (MATRIX,            FcTypeMatrix,   NULL)
> + FC_OBJECT (CHARSET,           FcTypeCharSet,  FcCompareCharSet)
> +diff --git a/src/fcobjshash.gperf b/src/fcobjshash.gperf
> +index 80a0237..eb4ad84 100644
> +--- a/src/fcobjshash.gperf
> ++++ b/src/fcobjshash.gperf
> +@@ -44,7 +44,7 @@ int id;
> + "rgba",FC_RGBA_OBJECT
> + "scale",FC_SCALE_OBJECT
> + "minspace",FC_MINSPACE_OBJECT
> +-"charwidth",FC_CHAR_WIDTH_OBJECT
> ++"charwidth",FC_CHARWIDTH_OBJECT
> + "charheight",FC_CHAR_HEIGHT_OBJECT
> + "matrix",FC_MATRIX_OBJECT
> + "charset",FC_CHARSET_OBJECT
> +diff --git a/src/fcobjshash.h b/src/fcobjshash.h
> +index 5a4d1ea..4e66bb0 100644
> +--- a/src/fcobjshash.h
> ++++ b/src/fcobjshash.h
> +@@ -284,7 +284,7 @@ FcObjectTypeLookup (register const char *str, register unsigned int len)
> +       {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT},
> +       {-1},
> + #line 47 "fcobjshash.gperf"
> +-      {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT},
> ++      {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT},
> + #line 48 "fcobjshash.gperf"
> +       {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT},
> + #line 55 "fcobjshash.gperf"
> +--
> +2.10.2
> +
> diff --git a/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb <http://fontconfig_2.12.1.bb/> b/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb <http://fontconfig_2.12.1.bb/>
> index 115f558..8616154 100644
> --- a/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb <http://fontconfig_2.12.1.bb/>
> +++ b/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb <http://fontconfig_2.12.1.bb/>
> @@ -22,6 +22,7 @@ DEPENDS = "expat freetype zlib"
> 
>  SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz <http://fontconfig.org/release/fontconfig-${PV}.tar.gz> \
>             file://revert-static-pkgconfig.patch \
> +           file://0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch \
>             "
>  SRC_URI[md5sum] = "ce55e525c37147eee14cc2de6cc09f6c"
>  SRC_URI[sha256sum] = "a9f42d03949f948a3a4f762287dbc16e53a927c91a07ee64207ebd90a9e5e292"
> --
> 2.10.2
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org <mailto:Openembedded-core@lists.openembedded.org>
> http://lists.openembedded.org/mailman/listinfo/openembedded-core <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
> 


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

^ permalink raw reply

* Re: [PATCH 1/2] go: Add recipes for golang compilers and tools
From: Khem Raj @ 2016-12-12 18:02 UTC (permalink / raw)
  To: Gary Thomas; +Cc: openembedded-core
In-Reply-To: <a186e3be-242a-5ba1-36fe-f5f3d561552c@mlbassoc.com>

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


> On Dec 12, 2016, at 4:36 AM, Gary Thomas <gary@mlbassoc.com> wrote:
> 
> Looking at these recipes and they seem like a good starting point.
> I did have some issues though:
> 
> * bitbake go - didn't create any target installable packages, although the
>  .../image directory seemed to be well populated.

Yeah mostly, I was concentrating on cross builds but this is something to look at.

> * bitbake go-helloworld - had these errors:
> ERROR: go-helloworld-0.1-r0 do_populate_lic: QA Issue: go-helloworld: LIC_FILES_CHKSUM points to an invalid file: /MIT [license-checksum]

Thats new, somehow it did not happen for me. I will check again.

> ERROR: go-helloworld-0.1-r0 do_compile: Function failed: do_compile (log file is located at /build/p0382_2016-01-13/tmp/work/cortexa9hf-neon-amltd-linux-gnueabi/go-helloworld/0.1-r0/temp/log.do_compile.31170)
> ERROR: Logfile of failure stored in: /build/p0382_2016-01-13/tmp/work/cortexa9hf-neon-amltd-linux-gnueabi/go-helloworld/0.1-r0/temp/log.do_compile.31170
> Log data follows:
> | DEBUG: Executing shell function do_compile
> | stat helloworld.go: no such file or directory
> | WARNING: exit code 1 from a shell command.
> | ERROR: Function failed: do_compile (log file is located at /build/p0382_2016-01-13/tmp/work/cortexa9hf-neon-amltd-linux-gnueabi/go-helloworld/0.1-r0/temp/log.do_compile.31170)
> ERROR: Task (/local/poky-cutting-edge/meta/recipes-extended/go-examples/go-helloworld_0.1.bb:do_compile) failed with exit code '1'
> 
> I forced the compiler to my target (rsync is _my_ friend) and was
> able to run 'helloword.go'.  I've not tested much past this point,
> but I am enthusiastic about getting 'go' into OE-core


Thanks Gary for your feedback it will help. I know I have a rev2 due for this patchset. Haven’t yet includes all needed changes for v2.

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

^ permalink raw reply

* [PATCH] systemd: disable 'libdir' QA check
From: Mark Asselstine @ 2016-12-12 19:36 UTC (permalink / raw)
  To: openembedded-core

When building systemd with multilib support enabled in your build you
will get the following QA warnings (if the 'libdir' QA check is
enabled.)

WARNING: systemd-1_232-r0 do_package_qa: QA Issue: systemd-dbg: found \
 library in wrong location: /lib/systemd/.debug/libsystemd-shared-232.so
systemd: found library in wrong location: /lib/systemd/libsystemd-shared.so
systemd: found library in wrong location: /lib/systemd/libsystemd-shared-232.so [libdir]

Since systemd 231 upstream has included an 'internal' library which
they explicitly place in the application specific /lib/systemd
directory. You can see some of the discussion about this placement
here https://github.com/systemd/systemd/issues/3810

This placement is being picked up by the QA checker since when
multilibs are enabled it expects all libraries to be in lib32 or
lib64. Since the systemd and systemd-dbg packages don't contain any
other libraries we can respect the upstream placement and skip this QA
check for these packages. Unfortunately the QA mechanism doesn't allow
us to specify individual files so this approach is the best we can do.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
 meta/recipes-core/systemd/systemd_232.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_232.bb b/meta/recipes-core/systemd/systemd_232.bb
index baee02e..c86badb 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -485,7 +485,8 @@ RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-genera
                       os-release \
 "
 
-INSANE_SKIP_${PN} += "dev-so"
+INSANE_SKIP_${PN} += "dev-so libdir"
+INSANE_SKIP_${PN}-dbg += "libdir"
 INSANE_SKIP_${PN}-doc += " libdir"
 
 PACKAGES =+ "udev udev-hwdb"
-- 
2.7.4



^ permalink raw reply related

* Re: [PATCH] systemd: disable 'libdir' QA check
From: Khem Raj @ 2016-12-12 19:59 UTC (permalink / raw)
  To: Mark Asselstine; +Cc: openembedded-core
In-Reply-To: <1481571408-19983-1-git-send-email-mark.asselstine@windriver.com>


> On Dec 12, 2016, at 11:36 AM, Mark Asselstine <mark.asselstine@windriver.com> wrote:
> 
> When building systemd with multilib support enabled in your build you
> will get the following QA warnings (if the 'libdir' QA check is
> enabled.)
> 
> WARNING: systemd-1_232-r0 do_package_qa: QA Issue: systemd-dbg: found \
> library in wrong location: /lib/systemd/.debug/libsystemd-shared-232.so
> systemd: found library in wrong location: /lib/systemd/libsystemd-shared.so
> systemd: found library in wrong location: /lib/systemd/libsystemd-shared-232.so [libdir]

Can we check if systemd can be a bit more flexible and accept it to go into multilib libdir ?
this patch can be then applied if its not acceptable to systemd community.

> 
> Since systemd 231 upstream has included an 'internal' library which
> they explicitly place in the application specific /lib/systemd
> directory. You can see some of the discussion about this placement
> here https://github.com/systemd/systemd/issues/3810
> 
> This placement is being picked up by the QA checker since when
> multilibs are enabled it expects all libraries to be in lib32 or
> lib64. Since the systemd and systemd-dbg packages don't contain any
> other libraries we can respect the upstream placement and skip this QA
> check for these packages. Unfortunately the QA mechanism doesn't allow
> us to specify individual files so this approach is the best we can do.
> 
> Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
> ---
> meta/recipes-core/systemd/systemd_232.bb | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/systemd/systemd_232.bb b/meta/recipes-core/systemd/systemd_232.bb
> index baee02e..c86badb 100644
> --- a/meta/recipes-core/systemd/systemd_232.bb
> +++ b/meta/recipes-core/systemd/systemd_232.bb
> @@ -485,7 +485,8 @@ RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-genera
>                       os-release \
> "
> 
> -INSANE_SKIP_${PN} += "dev-so"
> +INSANE_SKIP_${PN} += "dev-so libdir"
> +INSANE_SKIP_${PN}-dbg += "libdir"
> INSANE_SKIP_${PN}-doc += " libdir"
> 
> PACKAGES =+ "udev udev-hwdb"
> -- 
> 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] systemd: disable 'libdir' QA check
From: Burton, Ross @ 2016-12-12 20:42 UTC (permalink / raw)
  To: Khem Raj; +Cc: OE-core
In-Reply-To: <FE42CCA4-D2B8-4AE1-83E5-5CBE94FA160C@gmail.com>

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

On 12 December 2016 at 19:59, Khem Raj <raj.khem@gmail.com> wrote:

> Can we check if systemd can be a bit more flexible and accept it to go
> into multilib libdir ?
> this patch can be then applied if its not acceptable to systemd community.
>

Agreed, whilst I get that systemd really wants to use /lib as "libexec in
/" the libraries most definitely should be following $libdir.

Ross

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

^ permalink raw reply

* Re: [PATCH] systemd: disable 'libdir' QA check
From: Mark Asselstine @ 2016-12-12 20:51 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core
In-Reply-To: <FE42CCA4-D2B8-4AE1-83E5-5CBE94FA160C@gmail.com>

On Monday, December 12, 2016 11:59:04 AM EST Khem Raj wrote:
> > On Dec 12, 2016, at 11:36 AM, Mark Asselstine
> > <mark.asselstine@windriver.com> wrote:
> > 
> > When building systemd with multilib support enabled in your build you
> > will get the following QA warnings (if the 'libdir' QA check is
> > enabled.)
> > 
> > WARNING: systemd-1_232-r0 do_package_qa: QA Issue: systemd-dbg: found \
> > library in wrong location: /lib/systemd/.debug/libsystemd-shared-232.so
> > systemd: found library in wrong location:
> > /lib/systemd/libsystemd-shared.so
> > systemd: found library in wrong location:
> > /lib/systemd/libsystemd-shared-232.so [libdir]
> Can we check if systemd can be a bit more flexible and accept it to go into
> multilib libdir ? this patch can be then applied if its not acceptable to
> systemd community.

I think the discussion I pointed to in the commit log closes the door on any 
such change. Specific the comment from Lennart --
https://github.com/systemd/systemd/issues/3810#issuecomment-235290526

They don't want the library to be found in the default search path, they want 
to maintain this as a "hidden, internal resource".

Being on the record that I am aware of this discussion/conclusion if I send a 
patch now I would look like a bit of ass for wasting their time. If someone 
else wants to push the issue, feel free. Unless there is a suitable 
recommendation that would satisfy their wishes and ours that I am missing.

Mark


> > Since systemd 231 upstream has included an 'internal' library which
> > they explicitly place in the application specific /lib/systemd
> > directory. You can see some of the discussion about this placement
> > here https://github.com/systemd/systemd/issues/3810
> > 
> > This placement is being picked up by the QA checker since when
> > multilibs are enabled it expects all libraries to be in lib32 or
> > lib64. Since the systemd and systemd-dbg packages don't contain any
> > other libraries we can respect the upstream placement and skip this QA
> > check for these packages. Unfortunately the QA mechanism doesn't allow
> > us to specify individual files so this approach is the best we can do.
> > 
> > Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
> > ---
> > meta/recipes-core/systemd/systemd_232.bb | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-core/systemd/systemd_232.bb
> > b/meta/recipes-core/systemd/systemd_232.bb index baee02e..c86badb 100644
> > --- a/meta/recipes-core/systemd/systemd_232.bb
> > +++ b/meta/recipes-core/systemd/systemd_232.bb
> > @@ -485,7 +485,8 @@ RRECOMMENDS_${PN} +=
> > "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-genera> 
> >                       os-release \
> > 
> > "
> > 
> > -INSANE_SKIP_${PN} += "dev-so"
> > +INSANE_SKIP_${PN} += "dev-so libdir"
> > +INSANE_SKIP_${PN}-dbg += "libdir"
> > INSANE_SKIP_${PN}-doc += " libdir"
> > 
> > PACKAGES =+ "udev udev-hwdb"




^ permalink raw reply

* Re: [PATCH] systemd: disable 'libdir' QA check
From: Burton, Ross @ 2016-12-12 21:17 UTC (permalink / raw)
  To: Mark Asselstine; +Cc: OE-core
In-Reply-To: <3629007.TMJVuC0a6H@tal>

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

On 12 December 2016 at 20:51, Mark Asselstine <mark.asselstine@windriver.com
> wrote:

> I think the discussion I pointed to in the commit log closes the door on
> any
> such change. Specific the comment from Lennart --
> https://github.com/systemd/systemd/issues/3810#issuecomment-235290526
>
> They don't want the library to be found in the default search path, they
> want
> to maintain this as a "hidden, internal resource".
>

Oh if it's an implementation detail of systemd and not a user-facing
library then I can see their argument I guess.

Don't agree with it though.  But, the point is that as long as the parts of
systemd that could realistically be multilibd are in $libdir then this
isn't a problem.

Ross

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

^ permalink raw reply

* [PATCH 0/2] Fix log_check warnings for bb* logging functions
From: Paul Eggleton @ 2016-12-12 22:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter Kjellerstedt

This patchset requires the patch I just sent to the bitbake-devel mailing
list ("lib/bb/build: enable access to logger within tasks").


The following changes since commit d62f18c39bc0ed3b0f5ac8465b393c15f2143ecf:

  targetloader.py: drop test for ClassType (2016-12-12 15:16:39 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/rootfs-log-check-oe
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/rootfs-log-check-oe

Paul Eggleton (2):
  lib/oe/rootfs: fix log_check warnings being printed twice with RPM packaging
  classes/image: suppress log_check mechanism for warnings/errors logged through BitBake

 meta/classes/image.bbclass | 10 +++++++++-
 meta/lib/oe/rootfs.py      | 31 ++++++++++++++++---------------
 2 files changed, 25 insertions(+), 16 deletions(-)

-- 
2.5.5



^ permalink raw reply

* [PATCH 1/2] lib/oe/rootfs: fix log_check warnings being printed twice with RPM packaging
From: Paul Eggleton @ 2016-12-12 22:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter Kjellerstedt
In-Reply-To: <cover.1481579713.git.paul.eggleton@linux.intel.com>

We were calling _log_check() in the RPM-specific rootfs class as well as
in the base class; this is unnecessary and resulted in any errors/warnings
generated during the actual package installation time triggering two warnings
instead of one. Drop the call from RpmRootfs._create() to fix this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oe/rootfs.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index a348b97..ed40b23 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -477,8 +477,6 @@ class RpmRootfs(Rootfs):
 
         execute_pre_post_process(self.d, rpm_post_process_cmds)
 
-        self._log_check()
-
         if self.inc_rpm_image_gen == "1":
             self.pm.backup_packaging_data()
 
-- 
2.5.5



^ permalink raw reply related

* [PATCH 2/2] classes/image: suppress log_check mechanism for warnings/errors logged through BitBake
From: Paul Eggleton @ 2016-12-12 22:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter Kjellerstedt
In-Reply-To: <cover.1481579713.git.paul.eggleton@linux.intel.com>

If you printed a warning through bb.warn() / bbwarn or an error through
bb.error() / bberror, this was also being picked up by our log_check
mechanism that was designed to pick up warnings and errors printed by
other programs used during do_rootfs. This meant you saw not only the
warning or error itself, you saw it a second time through log_check,
which is a bit ugly. Use the just-added BB_TASK_LOGGER to access the
logger and add a handler that we can use to find out if any warning or
error we find in the logs is one we should ignore as it has already been
printed.

Fixes [YOCTO #8223].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/image.bbclass | 10 +++++++++-
 meta/lib/oe/rootfs.py      | 29 ++++++++++++++++-------------
 2 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index b10272a..e63f6a3 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -208,6 +208,14 @@ PACKAGE_EXCLUDE[type] = "list"
 fakeroot python do_rootfs () {
     from oe.rootfs import create_rootfs
     from oe.manifest import create_manifest
+    import logging
+
+    logger = d.getVar('BB_TASK_LOGGER', False)
+    if logger:
+        logcatcher = bb.utils.LogCatcher()
+        logger.addHandler(logcatcher)
+    else:
+        logcatcher = None
 
     # NOTE: if you add, remove or significantly refactor the stages of this
     # process then you should recalculate the weightings here. This is quite
@@ -255,7 +263,7 @@ fakeroot python do_rootfs () {
     progress_reporter.next_stage()
 
     # generate rootfs
-    create_rootfs(d, progress_reporter=progress_reporter)
+    create_rootfs(d, progress_reporter=progress_reporter, logcatcher=logcatcher)
 
     progress_reporter.finish()
 }
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index ed40b23..74fc3bd 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -15,12 +15,13 @@ class Rootfs(object, metaclass=ABCMeta):
     This is an abstract class. Do not instantiate this directly.
     """
 
-    def __init__(self, d, progress_reporter=None):
+    def __init__(self, d, progress_reporter=None, logcatcher=None):
         self.d = d
         self.pm = None
         self.image_rootfs = self.d.getVar('IMAGE_ROOTFS', True)
         self.deploydir = self.d.getVar('IMGDEPLOYDIR', True)
         self.progress_reporter = progress_reporter
+        self.logcatcher = logcatcher
 
         self.install_order = Manifest.INSTALL_ORDER
 
@@ -53,6 +54,8 @@ class Rootfs(object, metaclass=ABCMeta):
         messages = []
         with open(log_path, 'r') as log:
             for line in log:
+                if self.logcatcher and self.logcatcher.contains(line.rstrip()):
+                    continue
                 for ee in excludes:
                     m = ee.search(line)
                     if m:
@@ -375,8 +378,8 @@ class Rootfs(object, metaclass=ABCMeta):
 
 
 class RpmRootfs(Rootfs):
-    def __init__(self, d, manifest_dir, progress_reporter=None):
-        super(RpmRootfs, self).__init__(d, progress_reporter)
+    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+        super(RpmRootfs, self).__init__(d, progress_reporter, logcatcher)
         self.log_check_regex = '(unpacking of archive failed|Cannot find package'\
                                '|exit 1|ERROR: |Error: |Error |ERROR '\
                                '|Failed |Failed: |Failed$|Failed\(\d+\):)'
@@ -530,8 +533,8 @@ class RpmRootfs(Rootfs):
            bb.utils.remove(self.pm.install_dir_path, True)
 
 class DpkgOpkgRootfs(Rootfs):
-    def __init__(self, d, progress_reporter=None):
-        super(DpkgOpkgRootfs, self).__init__(d, progress_reporter)
+    def __init__(self, d, progress_reporter=None, logcatcher=None):
+        super(DpkgOpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
 
     def _get_pkgs_postinsts(self, status_file):
         def _get_pkg_depends_list(pkg_depends):
@@ -625,8 +628,8 @@ class DpkgOpkgRootfs(Rootfs):
             num += 1
 
 class DpkgRootfs(DpkgOpkgRootfs):
-    def __init__(self, d, manifest_dir, progress_reporter=None):
-        super(DpkgRootfs, self).__init__(d, progress_reporter)
+    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+        super(DpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
         self.log_check_regex = '^E:'
         self.log_check_expected_regexes = \
         [
@@ -717,8 +720,8 @@ class DpkgRootfs(DpkgOpkgRootfs):
 
 
 class OpkgRootfs(DpkgOpkgRootfs):
-    def __init__(self, d, manifest_dir, progress_reporter=None):
-        super(OpkgRootfs, self).__init__(d, progress_reporter)
+    def __init__(self, d, manifest_dir, progress_reporter=None, logcatcher=None):
+        super(OpkgRootfs, self).__init__(d, progress_reporter, logcatcher)
         self.log_check_regex = '(exit 1|Collected errors)'
 
         self.manifest = OpkgManifest(d, manifest_dir)
@@ -994,16 +997,16 @@ def variable_depends(d, manifest_dir=None):
     cls = get_class_for_type(img_type)
     return cls._depends_list()
 
-def create_rootfs(d, manifest_dir=None, progress_reporter=None):
+def create_rootfs(d, manifest_dir=None, progress_reporter=None, logcatcher=None):
     env_bkp = os.environ.copy()
 
     img_type = d.getVar('IMAGE_PKGTYPE', True)
     if img_type == "rpm":
-        RpmRootfs(d, manifest_dir, progress_reporter).create()
+        RpmRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
     elif img_type == "ipk":
-        OpkgRootfs(d, manifest_dir, progress_reporter).create()
+        OpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
     elif img_type == "deb":
-        DpkgRootfs(d, manifest_dir, progress_reporter).create()
+        DpkgRootfs(d, manifest_dir, progress_reporter, logcatcher).create()
 
     os.environ.clear()
     os.environ.update(env_bkp)
-- 
2.5.5



^ permalink raw reply related

* Re: [PATCH 0/8] Fixes for eSDK and testsdkext
From: Robert Yang @ 2016-12-13  2:58 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1479363545.git.liezhi.yang@windriver.com>

Ping, any comments on this thread, please ?

// Robert

On 11/17/2016 02:19 PM, Robert Yang wrote:
> The following changes since commit a675b2c89e477af088faee9b3be96eae19a85f0b:
>
>   sanity.bbclass: fix logging of an error (2016-11-15 15:18:50 +0000)
>
> are available in the git repository at:
>
>   git://git.openembedded.org/openembedded-core-contrib rbt/eSDK
>   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/eSDK
>
> Robert Yang (8):
>   populate_sdk_ext.bbclass: install multilib targets as populate_sdk
>     does
>   oeqa/sdkext/devtool.py: remove workspace/sources before running test
>     cases
>   oe-publish-sdk: make cmd easier to read
>   oe-publish-sdk: add pyshtables.py to .gitignore
>   oeqa/sdkext/devtool.py: don't reset when the test is failed
>   oeqa/oetest.py: add hasLockedSig()
>   oeqa/sdkext/devtool.py: skip test_extend_autotools_recipe_creation
>     when no libxml2
>   oe/copy_buildsystem.py: add SDK_LAYERS_EXCLUDE_PATTERN
>
>  meta/classes/populate_sdk_ext.bbclass | 61 ++++++++++++++++++++++-------------
>  meta/lib/oe/copy_buildsystem.py       | 18 +++++++++++
>  meta/lib/oeqa/oetest.py               | 13 ++++++++
>  meta/lib/oeqa/sdkext/devtool.py       | 13 ++++----
>  scripts/oe-publish-sdk                | 19 +++++++++--
>  5 files changed, 93 insertions(+), 31 deletions(-)
>


^ permalink raw reply

* [PATCH] util-linux: 2.28.1 -> 2.29
From: Zheng Ruoqin @ 2016-12-13  3:30 UTC (permalink / raw)
  To: openembedded-core

Upgrade util-linux from 2.28.1 to 2.29

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
 .../util-linux/{util-linux_2.28.1.bb => util-linux_2.29.bb}         | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-core/util-linux/{util-linux_2.28.1.bb => util-linux_2.29.bb} (84%)

diff --git a/meta/recipes-core/util-linux/util-linux_2.28.1.bb b/meta/recipes-core/util-linux/util-linux_2.29.bb
similarity index 84%
rename from meta/recipes-core/util-linux/util-linux_2.28.1.bb
rename to meta/recipes-core/util-linux/util-linux_2.29.bb
index f232cb9..80638bd 100644
--- a/meta/recipes-core/util-linux/util-linux_2.28.1.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.29.bb
@@ -1,4 +1,4 @@
-MAJOR_VERSION = "2.28"
+MAJOR_VERSION = "2.29"
 require util-linux.inc
 
 # To support older hosts, we need to patch and/or revert
@@ -16,8 +16,8 @@ SRC_URI += "file://configure-sbindir.patch \
             file://avoid_parallel_tests.patch \
             file://uuid-test-error-api.patch \
 "
-SRC_URI[md5sum] = "e2d863efaf4fd330a42c5efe9f1b02b4"
-SRC_URI[sha256sum] = "3ece4ea4a34ef786b68f5c415e848390424232abd1ee00f7ee5bddc30657b60f"
+SRC_URI[md5sum] = "07b6845f48a421ad5844aa9d58edb837"
+SRC_URI[sha256sum] = "2c59ea67cc7b564104f60532f6e0a95fe17a91acb870ba8fd7e986f273abf9e7"
 
 CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
 
-- 
2.7.4





^ permalink raw reply related

* Re: [PATCH 2/8] oeqa/sdkext/devtool.py: remove workspace/sources before running test cases
From: Paul Eggleton @ 2016-12-13  4:45 UTC (permalink / raw)
  To: Robert Yang
  Cc: Francisco Pedraza, Limon, Anibal, Lopez, Mariano,
	openembedded-core
In-Reply-To: <61246658fe264929d272f4da2f681e0fb95f9809.1479363545.git.liezhi.yang@windriver.com>

On Wed, 16 Nov 2016 22:19:31 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]
> ERROR: Source tree path
> /path/to/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testsdkex
> t/tc/workspace/sources/v4l2loopback-driver already exists and is not
> empty\n' [snip]
> 
> This is because the test case will run twice
> (environment-setup-core2-64-poky-linux and
> environment-setup-x86-pokymllib32-linux), it would fail in the second
> run, 'devtool reset' can not remove sources, so remove it before running
> test cases.
> 
> [YOCTO #10647]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  meta/lib/oeqa/sdkext/devtool.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/lib/oeqa/sdkext/devtool.py
> b/meta/lib/oeqa/sdkext/devtool.py index 65f41f6..f101eb6 100644
> --- a/meta/lib/oeqa/sdkext/devtool.py
> +++ b/meta/lib/oeqa/sdkext/devtool.py
> @@ -15,6 +15,9 @@ class DevtoolTest(oeSDKExtTest):
>          self.myapp_cmake_dst = os.path.join(self.tc.sdktestdir,
> "myapp_cmake") shutil.copytree(self.myapp_cmake_src, self.myapp_cmake_dst)
> 
> +        # Clean sources dir to make "git clone" can run again
> +        shutil.rmtree(os.path.join(self.tc.sdktestdir,
> "tc/workspace/sources"), True) +
>      def _test_devtool_build(self, directory):
>          self._run('devtool add myapp %s' % directory)
>          try:

It seems to me that's what's missing here is a proper teardown process like we 
have for oe-selftest, so that tests clean up after themselves whether they 
succeed or fail. I'm unsure as to whether that is part of the plan for the new 
QA refactoring though.

In the absence of that however I guess we don't have much choice but to do 
something like this.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply


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