[OE-core] [PATCH] oeqa/sdkext: wic: add new test cases for eSDK

2018-01-21 Thread Chang Rebecca Swee Fun
wic is now available in the eSDK. Adding test cases to test
wic utility within eSDK.

Signed-off-by: Chang Rebecca Swee Fun 
---
 meta/lib/oeqa/sdkext/cases/wic.py | 171 ++
 1 file changed, 171 insertions(+)
 create mode 100644 meta/lib/oeqa/sdkext/cases/wic.py

diff --git a/meta/lib/oeqa/sdkext/cases/wic.py 
b/meta/lib/oeqa/sdkext/cases/wic.py
new file mode 100644
index 000..221a290
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/cases/wic.py
@@ -0,0 +1,171 @@
+import os
+import sys
+import shutil
+import unittest
+
+from glob import glob
+
+from oeqa.sdkext.case import OESDKExtTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.oeid import OETestID
+from oeqa.utils.commands import runCmd
+
+
+class WicTest(OESDKExtTestCase):
+"""Wic test within eSDK."""
+
+testdir = "/var/tmp/wic.test.sdkext/"
+outfile = "/var/tmp/wic.test.sdkext/output.txt"
+
+@OETestID(1963)
+def test_wic_location(self):
+"""Check whether wic is run within eSDK sysroot"""
+output = self._run("which wic")
+self.assertEqual(output.startswith(self.tc.sdk_dir), True, \
+msg="Seems that wic isn't the eSDK one : %s" % output)
+
+def _exec_wic_cmd(self, cmd):
+"""Wrapper to execute wic command and check status"""
+status = runCmd("cd %s; . %s; %s" % (self.tc.sdk_dir, self.tc.sdk_env, 
cmd)).status
+self.assertEqual(0, status)
+
+def _exec_devtool_build(self):
+"""Wrapper to build image as pre-requisite for wic"""
+cmd = "devtool build-image"
+runCmd("cd %s; . %s; %s" % (self.tc.sdk_dir, self.tc.sdk_env, cmd))
+
+def _get_img_type(self):
+"""Wrapper to get SDK target for image creation"""
+# Get sdk_targets from devtool.conf
+conf_file = self.tc.sdk_dir + "conf/devtool.conf"
+with open (conf_file, 'r') as in_file:
+ for line in in_file:
+if 'sdk_targets' in line:
+image = line.split()
+for img_name in image:
+if img_name.startswith('core-image'):
+break
+return img_name
+
+def _get_line_count(self):
+count = 0
+with open (self.outfile, 'r') as output:
+count = sum(1 for line in output if line.rstrip('\n'))
+return count
+
+@OETestID(1964)
+@OETestDepends(['test_wic_location'])
+def test_wic_version(self):
+cmd = "wic --version"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1965)
+@OETestDepends(['test_wic_location'])
+def test_wic_help(self):
+cmd = "wic --help"
+self._exec_wic_cmd(cmd)
+cmd = "wic -h"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1966)
+@OETestDepends(['test_wic_location'])
+def test_wic_create_help(self):
+cmd = "wic create --help"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1967)
+@OETestDepends(['test_wic_location'])
+def test_wic_list_help(self):
+cmd = "wic list --help"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1968)
+@OETestDepends(['test_wic_location'])
+def test_wic_help_create(self):
+cmd = "wic help create"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1969)
+@OETestDepends(['test_wic_location'])
+def test_wic_help_list(self):
+cmd = "wic help list"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1970)
+@OETestDepends(['test_wic_location'])
+def test_wic_help_overview(self):
+cmd = "wic help overview"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1971)
+@OETestDepends(['test_wic_location'])
+def test_wic_help_plugins(self):
+cmd = "wic help plugins"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1972)
+@OETestDepends(['test_wic_location'])
+def test_wic_help_kickstart(self):
+cmd = "wic help kickstart"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1973)
+@OETestDepends(['test_wic_location'])
+def test_wic_list_images(self):
+cmd = "wic list images"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1974)
+@OETestDepends(['test_wic_location'])
+def test_wic_list_src_plugins(self):
+cmd = "wic list source-plugins"
+self._exec_wic_cmd(cmd)
+
+@OETestID(1976)
+@OETestDepends(['test_wic_location'])
+def test_wic_listed_images_help(self):
+cmd = "wic list images"
+output = runCmd("cd %s; %s" % (self.tc.sdk_dir, cmd)).output
+imagelist = [line.split()[0] for line in output.splitlines()]
+for img in imagelist:
+cmd = "wic list %s help" % img
+self._exec_wic_cmd(cmd)
+
+@OETestID(1977)
+@OETestDepends(['test_wic_location'])
+def test_wic_unsupported_subcommand(self):
+self.assertNotEqual(0, runCmd('wic unsupported', 
ignore_status=True).status)
+
+@OETestID(1978)
+

[OE-core] [PATCH] iw: 4.9 -> 4.14

2018-01-21 Thread Changhyeok Bae
Upgrade iw from 4.9 to 4.14

Signed-off-by: Changhyeok Bae 
---
 meta/recipes-connectivity/iw/{iw_4.9.bb => iw_4.14.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-connectivity/iw/{iw_4.9.bb => iw_4.14.bb} (86%)

diff --git a/meta/recipes-connectivity/iw/iw_4.9.bb 
b/meta/recipes-connectivity/iw/iw_4.14.bb
similarity index 86%
rename from meta/recipes-connectivity/iw/iw_4.9.bb
rename to meta/recipes-connectivity/iw/iw_4.14.bb
index 6daeb07..e1b17de 100644
--- a/meta/recipes-connectivity/iw/iw_4.9.bb
+++ b/meta/recipes-connectivity/iw/iw_4.14.bb
@@ -14,8 +14,8 @@ SRC_URI = 
"http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
file://separate-objdir.patch \
 "
 
-SRC_URI[md5sum] = "06e96ab7a5c652f8eaed6f71533a9e0f"
-SRC_URI[sha256sum] = 
"12f921f3dbe0f33c309f5f2891cccf5325c94bd48dceeb102de183f5f048a9e2"
+SRC_URI[md5sum] = "2067516ca9940fdb8c091ee3250da374"
+SRC_URI[sha256sum] = 
"a0c3aad6ff52234d03a2522ba2eba570e36abb3e60dc29bf0b1ce88dd725d6d4"
 
 inherit pkgconfig
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] systemd-bootchart: upgrade to v233; fix build with musl

2018-01-21 Thread Tim Orling
* Drop xlocale.h patch, merged upstream
* Rework patches from systemd to fix musl build
  - comparison_fn_t is glibc specific
  - musl does not provide printf.h
  - musl does not provide canonicalize_file_name

Signed-off-by: Tim Orling 
---
 .../0001-parse-util-Don-t-use-xlocale.h.patch  |  32 --
 ...fn_t-is-glibc-specific-use-raw-signature-.patch |  36 ++
 .../0002-musl-does-not-provide-printf-h.patch  | 423 +
 ...l-does-not-provide-canonicalize_file_name.patch |  33 ++
 ...d-bootchart_231.bb => systemd-bootchart_233.bb} |  12 +-
 5 files changed, 501 insertions(+), 35 deletions(-)
 delete mode 100644 
meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
 create mode 100644 
meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
 create mode 100644 
meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
 create mode 100644 
meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0003-musl-does-not-provide-canonicalize_file_name.patch
 rename meta/recipes-devtools/systemd-bootchart/{systemd-bootchart_231.bb => 
systemd-bootchart_233.bb} (73%)

diff --git 
a/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
 
b/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
deleted file mode 100644
index 5aa0463ac8..00
--- 
a/meta/recipes-devtools/systemd-bootchart/files/0001-parse-util-Don-t-use-xlocale.h.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d379126d56d0b6e935b2d97ca71579e6cc54d1bb Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen 
-Date: Tue, 18 Jul 2017 13:37:27 +0300
-Subject: [PATCH] parse-util: Don't use xlocale.h
-
-glibc 2.26 no longer contains the non-standard xlocale.h
-(http://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27)
-
-This change shouldn't break anything as xlocale.h was a subset of
-locale.h.
-
-Signed-off-by: Jussi Kukkonen 
-Upstream-Status: Submitted 
[https://github.com/systemd/systemd-bootchart/pull/35]

- src/parse-util.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/src/parse-util.c b/src/parse-util.c
-index 5635a68..1b2169c 100644
 a/src/parse-util.c
-+++ b/src/parse-util.c
-@@ -21,7 +21,6 @@
- #include 
- #include 
- #include 
--#include 
- 
- #include "macro.h"
- #include "parse-util.h"
--- 
-2.13.2
-
diff --git 
a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
 
b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
new file mode 100644
index 00..f392ceafcc
--- /dev/null
+++ 
b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0001-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
@@ -0,0 +1,36 @@
+From 45b401a947af944c20b3c451a35dfe53bca5ef3b Mon Sep 17 00:00:00 2001
+From: Tim Orling 
+Date: Thu, 28 Dec 2017 21:24:57 -0800
+Subject: [PATCH 1/3] comparison_fn_t is glibc specific, use raw signature in
+ function pointer
+
+Make it work with musl where comparison_fn_t is not provided
+
+Reuse the approach from systemd:
+systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
+
+Based on work by: Khem Raj 
+
+Signed-off-by: Tim Orling 
+---
+Upstream-Status: Pending
+
+ src/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util.h b/src/util.h
+index 561f9e7..e9cfd81 100644
+--- a/src/util.h
 b/src/util.h
+@@ -57,7 +57,7 @@ extern char **saved_argv;
+  * Normal qsort requires base to be nonnull. Here were require
+  * that only if nmemb > 0.
+  */
+-static inline void qsort_safe(void *base, size_t nmemb, size_t size, 
comparison_fn_t compar) {
++static inline void qsort_safe(void *base, size_t nmemb, size_t size, int 
(*compar)(const void *, const void *)) {
+ if (nmemb <= 1)
+ return;
+ 
+-- 
+2.13.6
+
diff --git 
a/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
 
b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
new file mode 100644
index 00..196272f7a2
--- /dev/null
+++ 
b/meta/recipes-devtools/systemd-bootchart/systemd-bootchart/0002-musl-does-not-provide-printf-h.patch
@@ -0,0 +1,423 @@
+From 6f9454184a02310802b1ed3e40287958b524a495 Mon Sep 17 00:00:00 2001
+From: Tim Orling 
+Date: Thu, 28 Dec 2017 21:39:51 -0800
+Subject: [PATCH 2/3] musl does not provide printf.h
+
+Reuse the approach from systemd:
+systemd/0001-add-fallback-parse_printf_format-implementation.patch
+
+Original patch author: Emil Renner Berthing 

[OE-core] ✗ patchtest: failure for glibc: Security Fix CVE-2017-17426 (rev2)

2018-01-21 Thread Patchwork
== Series Details ==

Series: glibc: Security Fix CVE-2017-17426 (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/10641/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at 3328211afd)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [V3][PATCH] glibc: Security Fix CVE-2017-17426

2018-01-21 Thread Armin Kuster
From: Huang Qiyu 

Affects glibc < 2.27 including current master
hash 77f921dac17c5fa99bd9e926d926c327982895f7

Signed-off-by: Huang Qiyu 

[v2]
Rebased on new master

[v3]
Fix typo in patch status

Signed-off-by: Armin Kuster 
---
 meta/recipes-core/glibc/glibc/CVE-2017-17426.patch | 53 ++
 meta/recipes-core/glibc/glibc_2.26.bb  |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2017-17426.patch

diff --git a/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch 
b/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch
new file mode 100644
index 000..bfa58bc
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch
@@ -0,0 +1,53 @@
+From 34697694e8a93b325b18f25f7dcded55d6baeaf6 Mon Sep 17 00:00:00 2001
+From: Arjun Shankar 
+Date: Thu, 30 Nov 2017 13:31:45 +0100
+Subject: [PATCH] Fix integer overflow in malloc when tcache is enabled [BZ
+ #22375]
+
+When the per-thread cache is enabled, __libc_malloc uses request2size (which
+does not perform an overflow check) to calculate the chunk size from the
+requested allocation size. This leads to an integer overflow causing malloc
+to incorrectly return the last successfully allocated block when called with
+a very large size argument (close to SIZE_MAX).
+
+This commit uses checked_request2size instead, removing the overflow.
+
+Upstream-Status: Backport
+CVE: CVE-2017-17426
+Signed-off-by: Huang Qiyu 
+Rebase on new master
+Signed-off-by: Armin Kuster 
+
+---
+ ChangeLog   | 6 ++
+ malloc/malloc.c | 3 ++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+Index: git/malloc/malloc.c
+===
+--- git.orig/malloc/malloc.c
 git/malloc/malloc.c
+@@ -3064,7 +3064,8 @@ __libc_malloc (size_t bytes)
+ return (*hook)(bytes, RETURN_ADDRESS (0));
+ #if USE_TCACHE
+   /* int_free also calls request2size, be careful to not pad twice.  */
+-  size_t tbytes = request2size (bytes);
++  size_t tbytes;
++  checked_request2size (bytes, tbytes);
+   size_t tc_idx = csize2tidx (tbytes);
+ 
+   MAYBE_INIT_TCACHE ();
+Index: git/ChangeLog
+===
+--- git.orig/ChangeLog
 git/ChangeLog
+@@ -1,3 +1,9 @@
++2017-11-30  Arjun Shankar  
++
++   [BZ #22375]
++   * malloc/malloc.c (__libc_malloc): Use checked_request2size
++   instead of request2size.
++
+ 2017-12-30  Aurelien Jarno  
+Dmitry V. Levin  
+ 
diff --git a/meta/recipes-core/glibc/glibc_2.26.bb 
b/meta/recipes-core/glibc/glibc_2.26.bb
index 456ce12..ff3197b 100644
--- a/meta/recipes-core/glibc/glibc_2.26.bb
+++ b/meta/recipes-core/glibc/glibc_2.26.bb
@@ -45,6 +45,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0029-malloc-add-missing-arena-lock-in-malloc-info.patch \
file://CVE-2017-15671.patch \
file://CVE-2017-16997.patch \
+   file://CVE-2017-17426.patch \
 "
 
 NATIVESDKFIXES ?= ""
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] mesa: link mesautil with pthreads

2018-01-21 Thread Otavio Salvador
On Sun, Jan 21, 2018 at 4:18 AM, Randy MacLeod
 wrote:
> Cherry-pick fix from mesa upstream:
>23ce168048 link mesautil with pthreads
>
> Signed-off-by: Randy MacLeod 

Missing Upstream-Status. Also, base it on 17.3.3 recipe so we avoid
another patch revision.

> ---
>  .../files/0001-link-mesautil-with-pthreads.patch   | 51 
> ++
>  meta/recipes-graphics/mesa/mesa_17.3.2.bb  |  1 +
>  2 files changed, 52 insertions(+)
>  create mode 100644 
> meta/recipes-graphics/mesa/files/0001-link-mesautil-with-pthreads.patch
>
> diff --git 
> a/meta/recipes-graphics/mesa/files/0001-link-mesautil-with-pthreads.patch 
> b/meta/recipes-graphics/mesa/files/0001-link-mesautil-with-pthreads.patch
> new file mode 100644
> index 00..193c54661b
> --- /dev/null
> +++ b/meta/recipes-graphics/mesa/files/0001-link-mesautil-with-pthreads.patch
> @@ -0,0 +1,51 @@
> +From 23ce168048698eeea3df6bb8c9de5be3ca4784cd Mon Sep 17 00:00:00 2001
> +From: Igor Gnatenko 
> +Date: Mon, 1 Jan 2018 22:49:00 +0100
> +Subject: [PATCH] link mesautil with pthreads
> +
> +../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function 
> `u_thread_setname':
> +/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:66: 
> undefined reference to `pthread_setname_np'
> +../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function 
> `thrd_join':
> +/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:336:
>  undefined reference to `pthread_join'
> +../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function 
> `u_thread_create':
> +/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:48: 
> undefined reference to `pthread_sigmask'
> +../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function 
> `thrd_create':
> +/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:296:
>  undefined reference to `pthread_create'
> +../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function 
> `u_thread_create':
> +/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:50: 
> undefined reference to `pthread_sigmask'
> +/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:50: 
> undefined reference to `pthread_sigmask'
> +../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function 
> `call_once':
> +/builddir/build/BUILD/mesa-17.3.1/src/util/../../include/c11/threads_posix.h:96:
>  undefined reference to `pthread_once'
> +../../src/util/.libs/libmesautil.a(libmesautil_la-u_queue.o): In function 
> `u_thread_get_time_nano':
> +/builddir/build/BUILD/mesa-17.3.1/src/util/../../src/util/u_thread.h:84: 
> undefined reference to `pthread_getcpuclockid'
> +collect2: error: ld returned 1 exit status
> +
> +Reviewed-by: Adam Jackson 
> +Signed-off-by: Igor Gnatenko 
> +---
> + src/util/Makefile.am | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/src/util/Makefile.am b/src/util/Makefile.am
> +index a5241ad27b..633907b9fd 100644
> +--- a/src/util/Makefile.am
>  b/src/util/Makefile.am
> +@@ -31,6 +31,7 @@ noinst_LTLIBRARIES = \
> +   libxmlconfig.la
> +
> + AM_CPPFLAGS = \
> ++  $(PTHREAD_CFLAGS) \
> +   -I$(top_srcdir)/include
> +
> + libmesautil_la_CPPFLAGS = \
> +@@ -50,6 +51,7 @@ libmesautil_la_SOURCES = \
> +   $(MESA_UTIL_GENERATED_FILES)
> +
> + libmesautil_la_LIBADD = \
> ++  $(PTHREAD_LIBS) \
> +   $(CLOCK_LIB) \
> +   $(ZLIB_LIBS) \
> +   $(LIBATOMIC_LIBS)
> +--
> +2.14.3
> +
> diff --git a/meta/recipes-graphics/mesa/mesa_17.3.2.bb 
> b/meta/recipes-graphics/mesa/mesa_17.3.2.bb
> index 9e9b23322a..8cdcf6c84f 100644
> --- a/meta/recipes-graphics/mesa/mesa_17.3.2.bb
> +++ b/meta/recipes-graphics/mesa/mesa_17.3.2.bb
> @@ -9,6 +9,7 @@ SRC_URI = 
> "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
> file://llvm-config-version.patch \
> file://0001-winsys-svga-drm-Include-sys-types.h.patch \
> 
> file://0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch \
> +   file://0001-link-mesautil-with-pthreads.patch \
> "
>
>  SRC_URI[md5sum] = "5c59b779925f504ffd0f13c7dcd29ac6"
> --
> 2.11.0
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3] recipes-core: move hwclock.sh to util-linux

2018-01-21 Thread Otavio Salvador
On Fri, Jan 19, 2018 at 6:12 PM, Alex Stewart  wrote:
> * Move the hwclock.sh initscript from the busybox recipe to util-linux.
>   This script is generally useful for distros that get their hwclock
>   implementation from sources other than busybox and we follow debian's
>   example by providing it in util-linux.

The script now is an independent unit and as such, it should be not
using the busybox or util-linux on its name. Please move it to
hwclock-init and adjust both to depend on it. It can be in
meta/recipes-core/hwclock/hwclock-init.bb and I'd add a comment in the
recipe explaining why it has been split out.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] python*-setuptools: update to 38.4.0

2018-01-21 Thread Derek Straka
Update the python{3}-setuptools to the latest stable version

Tested on the qemu with core-image-minimal

Signed-off-by: Derek Straka 
---
 meta/recipes-devtools/python/python-setuptools.inc| 4 ++--
 .../{python-setuptools_38.2.5.bb => python-setuptools_38.4.0.bb}  | 0
 .../{python3-setuptools_38.2.5.bb => python3-setuptools_38.4.0.bb}| 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python-setuptools_38.2.5.bb => 
python-setuptools_38.4.0.bb} (100%)
 rename meta/recipes-devtools/python/{python3-setuptools_38.2.5.bb => 
python3-setuptools_38.4.0.bb} (100%)

diff --git a/meta/recipes-devtools/python/python-setuptools.inc 
b/meta/recipes-devtools/python/python-setuptools.inc
index 54b7c30..fc4fd9c 100644
--- a/meta/recipes-devtools/python/python-setuptools.inc
+++ b/meta/recipes-devtools/python/python-setuptools.inc
@@ -9,8 +9,8 @@ PYPI_PACKAGE_EXT = "zip"
 
 inherit pypi
 
-SRC_URI[md5sum] = "abfd02fba07b381c3a9682a32d765cc6"
-SRC_URI[sha256sum] = 
"b080f276cc868670540b2c03cee06cc14d2faf9da7bec0f15058d1b402c94507"
+SRC_URI[md5sum] = "3426bbf31662b4067dc79edc0fa21a2e"
+SRC_URI[sha256sum] = 
"6501fc32f505ec5b3ed36ec65ba48f1b975f52cf2ea101c7b73a08583fd12f75"
 
 DEPENDS += "${PYTHON_PN}"
 DEPENDS_class-native += "${PYTHON_PN}-native"
diff --git a/meta/recipes-devtools/python/python-setuptools_38.2.5.bb 
b/meta/recipes-devtools/python/python-setuptools_38.4.0.bb
similarity index 100%
rename from meta/recipes-devtools/python/python-setuptools_38.2.5.bb
rename to meta/recipes-devtools/python/python-setuptools_38.4.0.bb
diff --git a/meta/recipes-devtools/python/python3-setuptools_38.2.5.bb 
b/meta/recipes-devtools/python/python3-setuptools_38.4.0.bb
similarity index 100%
rename from meta/recipes-devtools/python/python3-setuptools_38.2.5.bb
rename to meta/recipes-devtools/python/python3-setuptools_38.4.0.bb
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for glibc: Security Fix CVE-2017-17426

2018-01-21 Thread Patchwork
== Series Details ==

Series: glibc: Security Fix CVE-2017-17426
Revision: 1
URL   : https://patchwork.openembedded.org/series/10641/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at 3328211afd)

* Issue Added patch file is missing Upstream-Status in the header 
[test_upstream_status_presence_format] 
  Suggested fixAdd Upstream-Status:  to the header of 
meta/recipes-core/glibc/glibc/CVE-2017-17426.patch
  Standard format  Upstream-Status: 
  Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], 
Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines: 
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [V2][PATCH] glibc: Security Fix CVE-2017-17426

2018-01-21 Thread Armin Kuster
From: Huang Qiyu 

Affects glibc < 2.27 including current master
hash 77f921dac17c5fa99bd9e926d926c327982895f7

Signed-off-by: Huang Qiyu 

[v2]
Rebased on new master

Signed-off-by: Armin Kuster 
---
 meta/recipes-core/glibc/glibc/CVE-2017-17426.patch | 53 ++
 meta/recipes-core/glibc/glibc_2.26.bb  |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2017-17426.patch

diff --git a/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch 
b/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch
new file mode 100644
index 000..fadaf70
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2017-17426.patch
@@ -0,0 +1,53 @@
+From 34697694e8a93b325b18f25f7dcded55d6baeaf6 Mon Sep 17 00:00:00 2001
+From: Arjun Shankar 
+Date: Thu, 30 Nov 2017 13:31:45 +0100
+Subject: [PATCH] Fix integer overflow in malloc when tcache is enabled [BZ
+ #22375]
+
+When the per-thread cache is enabled, __libc_malloc uses request2size (which
+does not perform an overflow check) to calculate the chunk size from the
+requested allocation size. This leads to an integer overflow causing malloc
+to incorrectly return the last successfully allocated block when called with
+a very large size argument (close to SIZE_MAX).
+
+This commit uses checked_request2size instead, removing the overflow.
+
+Upstream-Statsu: Backport
+CVE: CVE-2017-17426
+Signed-off-by: Huang Qiyu 
+Rebase on new master
+Signed-off-by: Armin Kuster 
+
+---
+ ChangeLog   | 6 ++
+ malloc/malloc.c | 3 ++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+Index: git/malloc/malloc.c
+===
+--- git.orig/malloc/malloc.c
 git/malloc/malloc.c
+@@ -3064,7 +3064,8 @@ __libc_malloc (size_t bytes)
+ return (*hook)(bytes, RETURN_ADDRESS (0));
+ #if USE_TCACHE
+   /* int_free also calls request2size, be careful to not pad twice.  */
+-  size_t tbytes = request2size (bytes);
++  size_t tbytes;
++  checked_request2size (bytes, tbytes);
+   size_t tc_idx = csize2tidx (tbytes);
+ 
+   MAYBE_INIT_TCACHE ();
+Index: git/ChangeLog
+===
+--- git.orig/ChangeLog
 git/ChangeLog
+@@ -1,3 +1,9 @@
++2017-11-30  Arjun Shankar  
++
++   [BZ #22375]
++   * malloc/malloc.c (__libc_malloc): Use checked_request2size
++   instead of request2size.
++
+ 2017-12-30  Aurelien Jarno  
+Dmitry V. Levin  
+ 
diff --git a/meta/recipes-core/glibc/glibc_2.26.bb 
b/meta/recipes-core/glibc/glibc_2.26.bb
index 456ce12..ff3197b 100644
--- a/meta/recipes-core/glibc/glibc_2.26.bb
+++ b/meta/recipes-core/glibc/glibc_2.26.bb
@@ -45,6 +45,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0029-malloc-add-missing-arena-lock-in-malloc-info.patch \
file://CVE-2017-15671.patch \
file://CVE-2017-16997.patch \
+   file://CVE-2017-17426.patch \
 "
 
 NATIVESDKFIXES ?= ""
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] glibc: Security Fix CVE-2017-16997

2018-01-21 Thread Armin Kuster
Affect glibc < 2.27
including current master glibc hash: 77f921dac17c5fa99bd9e926d926c327982895f7

Signed-off-by: Armin Kuster 
---
 meta/recipes-core/glibc/glibc/CVE-2017-16997.patch | 151 +
 meta/recipes-core/glibc/glibc_2.26.bb  |   1 +
 2 files changed, 152 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2017-16997.patch

diff --git a/meta/recipes-core/glibc/glibc/CVE-2017-16997.patch 
b/meta/recipes-core/glibc/glibc/CVE-2017-16997.patch
new file mode 100644
index 000..d9bde7f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2017-16997.patch
@@ -0,0 +1,151 @@
+From 4ebd0c4191c6073cc8a7c5fdcf1d182c4719bcbb Mon Sep 17 00:00:00 2001
+From: Aurelien Jarno 
+Date: Sat, 30 Dec 2017 10:54:23 +0100
+Subject: [PATCH] elf: Check for empty tokens before dynamic string token
+ expansion [BZ #22625]
+
+The fillin_rpath function in elf/dl-load.c loops over each RPATH or
+RUNPATH tokens and interprets empty tokens as the current directory
+("./"). In practice the check for empty token is done *after* the
+dynamic string token expansion. The expansion process can return an
+empty string for the $ORIGIN token if __libc_enable_secure is set
+or if the path of the binary can not be determined (/proc not mounted).
+
+Fix that by moving the check for empty tokens before the dynamic string
+token expansion. In addition, check for NULL pointer or empty strings
+return by expand_dynamic_string_token.
+
+The above changes highlighted a bug in decompose_rpath, an empty array
+is represented by the first element being NULL at the fillin_rpath
+level, but by using a -1 pointer in decompose_rpath and other functions.
+
+Changelog:
+   [BZ #22625]
+   * elf/dl-load.c (fillin_rpath): Check for empty tokens before dynamic
+   string token expansion. Check for NULL pointer or empty string possibly
+   returned by expand_dynamic_string_token.
+   (decompose_rpath): Check for empty path after dynamic string
+   token expansion.
+(cherry picked from commit 3e3c904daef69b8bf7d5cc07f793c9f07c3553ef)
+
+Upstream-Status: Backport
+CVE: CVE-2017-16997
+Signed-off-by: Armin Kuster 
+
+---
+ ChangeLog | 10 ++
+ NEWS  |  4 
+ elf/dl-load.c | 49 +
+ 3 files changed, 47 insertions(+), 16 deletions(-)
+
+Index: git/NEWS
+===
+--- git.orig/NEWS
 git/NEWS
+@@ -211,6 +211,10 @@ Security related changes:
+   on the stack or the heap, depending on the length of the user name).
+   Reported by Tim Rühsen.
+ 
++  CVE-2017-16997: Incorrect handling of RPATH or RUNPATH containing $ORIGIN
++  for AT_SECURE or SUID binaries could be used to load libraries from the
++  current directory.
++
+ The following bugs are resolved with this release:
+ 
+   [984] network: Respond to changed resolv.conf in gethostbyname
+Index: git/elf/dl-load.c
+===
+--- git.orig/elf/dl-load.c
 git/elf/dl-load.c
+@@ -433,32 +433,41 @@ fillin_rpath (char *rpath, struct r_sear
+ {
+   char *cp;
+   size_t nelems = 0;
+-  char *to_free;
+ 
+   while ((cp = __strsep (, sep)) != NULL)
+ {
+   struct r_search_path_elem *dirp;
++  char *to_free = NULL;
++  size_t len = 0;
+ 
+-  to_free = cp = expand_dynamic_string_token (l, cp, 1);
++  /* `strsep' can pass an empty string.  */
++  if (*cp != '\0')
++  {
++to_free = cp = expand_dynamic_string_token (l, cp, 1);
+ 
+-  size_t len = strlen (cp);
++/* expand_dynamic_string_token can return NULL in case of empty
++   path or memory allocation failure.  */
++if (cp == NULL)
++  continue;
++
++/* Compute the length after dynamic string token expansion and
++   ignore empty paths.  */
++len = strlen (cp);
++if (len == 0)
++  {
++free (to_free);
++continue;
++  }
+ 
+-  /* `strsep' can pass an empty string.  This has to be
+-   interpreted as `use the current directory'. */
+-  if (len == 0)
+-  {
+-static const char curwd[] = "./";
+-cp = (char *) curwd;
++/* Remove trailing slashes (except for "/").  */
++while (len > 1 && cp[len - 1] == '/')
++  --len;
++
++/* Now add one if there is none so far.  */
++if (len > 0 && cp[len - 1] != '/')
++  cp[len++] = '/';
+   }
+ 
+-  /* Remove trailing slashes (except for "/").  */
+-  while (len > 1 && cp[len - 1] == '/')
+-  --len;
+-
+-  /* Now add one if there is none so far.  */
+-  if (len > 0 && cp[len - 1] != '/')
+-  cp[len++] = '/';
+-
+   /* Make sure we don't use untrusted directories if we run SUID.  */
+   if (__glibc_unlikely (check_trusted) && !is_trusted_path (cp, len))
+   {
+@@ 

[OE-core] [PATCH 1/2] glibc: Security fix CVE-2017-15671

2018-01-21 Thread Armin Kuster
affects glibc < 2.27
only glibc in current master hash: 77f921dac17c5fa99bd9e926d926c327982895f7

Signed-off-by: Armin Kuster 
---
 meta/recipes-core/glibc/glibc/CVE-2017-15671.patch | 65 ++
 meta/recipes-core/glibc/glibc_2.26.bb  |  1 +
 2 files changed, 66 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/CVE-2017-15671.patch

diff --git a/meta/recipes-core/glibc/glibc/CVE-2017-15671.patch 
b/meta/recipes-core/glibc/glibc/CVE-2017-15671.patch
new file mode 100644
index 000..9a08784
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/CVE-2017-15671.patch
@@ -0,0 +1,65 @@
+From f1cf98b583787cfb6278baea46e286a0ee7567fd Mon Sep 17 00:00:00 2001
+From: Paul Eggert 
+Date: Sun, 22 Oct 2017 10:00:57 +0200
+Subject: [PATCH] glob: Fix buffer overflow during GLOB_TILDE unescaping [BZ
+ #22332]
+
+(cherry picked from commit a159b53fa059947cc2548e3b0d5bdcf7b9630ba8)
+
+Upstream-Status: Backport
+CVE: CVE-2017-15671
+Signed-off-by: Armin Kuster 
+
+---
+ ChangeLog| 6 ++
+ NEWS | 4 
+ posix/glob.c | 4 ++--
+ 3 files changed, 12 insertions(+), 2 deletions(-)
+
+Index: git/NEWS
+===
+--- git.orig/NEWS
 git/NEWS
+@@ -20,6 +20,10 @@ Security related changes:
+   on the stack or the heap, depending on the length of the user name).
+   Reported by Tim Rühsen.
+ 
++  The glob function, when invoked with GLOB_TILDE and without
++  GLOB_NOESCAPE, could write past the end of a buffer while
++  unescaping user names.  Reported by Tim Rühsen.
++
+ The following bugs are resolved with this release:
+ 
+   [16750] ldd: Never run file directly.
+Index: git/posix/glob.c
+===
+--- git.orig/posix/glob.c
 git/posix/glob.c
+@@ -850,11 +850,11 @@ glob (const char *pattern, int flags, in
+ char *p = mempcpy (newp, dirname + 1,
+unescape - dirname - 1);
+ char *q = unescape;
+-while (*q != '\0')
++while (q != end_name)
+   {
+ if (*q == '\\')
+   {
+-if (q[1] == '\0')
++if (q + 1 == end_name)
+   {
+ /* "~fo\\o\\" unescape to user_name "foo\\",
+but "~fo\\o\\/" unescape to user_name
+Index: git/ChangeLog
+===
+--- git.orig/ChangeLog
 git/ChangeLog
+@@ -1,3 +1,9 @@
++2017-10-22  Paul Eggert 
++
++   [BZ #22332]
++   * posix/glob.c (__glob): Fix buffer overflow during GLOB_TILDE
++   unescaping.
++
+ 2017-10-13  James Clarke  
+ 
+   * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela):
diff --git a/meta/recipes-core/glibc/glibc_2.26.bb 
b/meta/recipes-core/glibc/glibc_2.26.bb
index 04d9773..0ba29e4 100644
--- a/meta/recipes-core/glibc/glibc_2.26.bb
+++ b/meta/recipes-core/glibc/glibc_2.26.bb
@@ -43,6 +43,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0027-glibc-reset-dl-load-write-lock-after-forking.patch \
file://0028-Bug-4578-add-ld.so-lock-while-fork.patch \
file://0029-malloc-add-missing-arena-lock-in-malloc-info.patch \
+   file://CVE-2017-15671.patch \
 "
 
 NATIVESDKFIXES ?= ""
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] glibc:CVE-2017-17426

2018-01-21 Thread akuster808

If have rebased this patch to latest master. I will be sending a few
more glibc fixes.

Hope I don't step on anyones toes.

- armin


On 01/19/2018 09:32 AM, Burton, Ross wrote:
> Signed-off-by: Huang Qiyu  >

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 9/9] gettext: rationalise optional dependencies

2018-01-21 Thread Martin Jansa
--without-included-glib seems to cause configure to find glib from the host:

ERROR: This autoconf log indicates errors, it looked at host include and/or
library paths while determining system capabilities.

gettext/0.19.8.1-r0/build/gettext-tools/config.log:cc1: warning: include
location "/usr/include/glib-2.0" is unsafe for cross-compilation
[-Wpoison-system-directories]

I'm testing it with added --with-libglib-2.0-prefix to see if it fixes the
issue. I've added the same to other added PACKAGECONFIGs:
-PACKAGECONFIG[croco] =
"--without-included-libcroco,--with-included-libcroco,libcroco"
-PACKAGECONFIG[glib] =
"--without-included-glib,--with-included-glib,glib-2.0"
-PACKAGECONFIG[libxml] =
"--without-included-libxml,--with-included-libxml,libxml2"
-PACKAGECONFIG[libunistring] =
"--without-included-libunistring,--with-included-libunistring,libunistring"
+PACKAGECONFIG[croco] = "--with-libcroco-0.6-prefix=${STAGING_LIBDIR}/..
--without-included-libcroco,--with-included-libcroco,libcroco"
+PACKAGECONFIG[glib] = "--with-libglib-2.0-prefix=${STAGING_LIBDIR}/..
--without-included-glib,--with-included-glib,glib-2.0"
+PACKAGECONFIG[libxml] = "--with-libxml2-prefix=${STAGING_LIBDIR}/..
--without-included-libxml,--with-included-libxml,libxml2"
+PACKAGECONFIG[libunistring] =
"--with-libunistring-prefix=${STAGING_LIBDIR}/..
--without-included-libunistring,--with-included-libunistring,libunistring"

Not sure if it's worth adding other prefixes for curses related
PACKAGECONFIG
PACKAGECONFIG[msgcat-curses] =
"--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"

  --with-libncurses-prefix[=DIR]  search for PACKLIBS in DIR/include and
DIR/lib
  --without-libncurses-prefix don't search for PACKLIBS in includedir
and libdir
  --with-libxcurses-prefix[=DIR]  search for PACKLIBS in DIR/include and
DIR/lib
  --without-libxcurses-prefix don't search for PACKLIBS in includedir
and libdir
  --with-libcurses-prefix[=DIR]  search for PACKLIBS in DIR/include and
DIR/lib
  --without-libcurses-prefix don't search for PACKLIBS in includedir
and libdir



On Mon, Jan 8, 2018 at 5:00 PM, Ross Burton  wrote:

> gettext has optional dependencies on libxml2, glib, libcroco and
> libunistring.
> If they're not available then gettext will use internal copies, but it can
> also
> use system libraries.
>
> For gettext-native continue to use the internal copies to get this building
> sooner rather than later, but for target use the system shared libraries.
>
> Also gettext 0.19.7 onwards swapped expat for libxm2, so remove the build
> dependency on expat.
>
> Signed-off-by: Ross Burton 
> ---
>  meta/recipes-core/gettext/gettext_0.19.8.1.bb | 14 +-
>  1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
> b/meta/recipes-core/gettext/gettext_0.19.8.1.bb
> index 46ea68ff5b5..25ff601a6be 100644
> --- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
> +++ b/meta/recipes-core/gettext/gettext_0.19.8.1.bb
> @@ -8,7 +8,7 @@ SECTION = "libs"
>  LICENSE = "GPLv3+ & LGPL-2.1+"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
>
> -DEPENDS = "gettext-native virtual/libiconv expat"
> +DEPENDS = "gettext-native virtual/libiconv"
>  DEPENDS_class-native = "gettext-minimal-native"
>  PROVIDES = "virtual/libintl virtual/gettext"
>  PROVIDES_class-native = "virtual/gettext-native"
> @@ -33,18 +33,22 @@ EXTRA_OECONF += "--without-lispdir \
>   --disable-native-java \
>   --disable-openmp \
>   --disable-acl \
> - --with-included-glib \
>   --without-emacs \
>   --without-cvs \
>   --without-git \
> - --with-included-libxml \
> - --with-included-libcroco \
> - --with-included-libunistring \
>  "
>  EXTRA_OECONF_append_class-target = " \
>   --with-bisonlocaledir=${datadir}/locale \
>  "
>
> +PACKAGECONFIG ??= "croco glib libxml libunistring"
> +PACKAGECONFIG_class-native = ""
> +
> +PACKAGECONFIG[croco] = "--without-included-libcroco,-
> -with-included-libcroco,libcroco"
> +PACKAGECONFIG[glib] = "--without-included-glib,--
> with-included-glib,glib-2.0"
> +PACKAGECONFIG[libxml] = "--without-included-libxml,--
> with-included-libxml,libxml2"
> +PACKAGECONFIG[libunistring] = "--without-included-
> libunistring,--with-included-libunistring,libunistring"
> +
>  acpaths = '-I ${S}/gettext-runtime/m4 \
> -I ${S}/gettext-tools/m4'
>
> --
> 2.11.0
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org

[OE-core] Autobuilder Changes [SWAT in particular please read]

2018-01-21 Thread Richard Purdie
[SWAT please see  below at the very least]

The Yocto Project "autobuilder" infrastructure is of key importance to
the project. It allows us to test incoming patches against a huge test
matrix and over the years we've incorporated a lot of tips and tricks
into it. It has a lot of inbuilt knowledge about which tests to run
against which versions of the project.

I'm posting this so people are aware of what is happening, why and the
way we're planning to move forward.

The autobuilder has some problems:

* We heavily customised a version of buildbot, upstream took some
different directions and we're "stuck" on an old version. We can't take
advantage of new features and upgrading in the current form is near
impossible.

* Keeping older releases building is hard as any new change to the
autobuilder has to be made with backwards compatibility in mind.

* Its near impossible to fix some bugs we have (like a forced push to
master-next whilst a build is running will break).

* Whenever we need to deploy configuration changes we have to stop and
restart the infrastructure.

* The codebase is a mess, twisted doesn't lend itself to how we grew
into using it and you can't really understand what is going on.

* We can't easily add new buildsteps to the configuration without
making it even more of a twisted maze. This puts of off extending
testing, we don't dare touch pieces of it.

We need a plan to get out of this situation which keeps the autobuilder
running and keeps our test coverage but lets us move on.

With Joshua I have formulated a plan. We've already executed on one
part of it so we at least know we can make some improvements. Much
remains to be done though and I have no idea how I'm going to find the
time but such is life.

Executive Summary
=

The quick summary is that we're moving large chunks of functionality
out of buildbot/autobuilder code and into its own repo/codebase. If we
can move enough out, it will them make upgrading much simper. It also
resolves some issues we have with older releases.


There is one big user visible change. In order to make this work, the
multiple steps in a given "nightly" target are all getting condensed
into one "RunConfig" step. This makes life harder for SWAT and makes
the logs larger and less manageable. At the same time it makes any
change possible and allows us to condense targets for master to make
things more efficient, something we've never been able to do.

The step does clearly show which configuration its using, which command
its running and which ones failed so grep can find that easily.

Ultimately, we can likely do something clever in newer buildbot to
split the logs up again. For now, we'll have to deal with it, it is
what it is and something had to change.


Implementation Details
==

The first step in the transition was to move the configuration file
generation out to a separate conf file and script in its own repo. This
currently has two pieces, a configuration file generator and a target
executor. The configuration looks like this:

http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/tree/config.json

Its json and contains:

a) a base set of variables
b) overrides of the variables per "target" and per "step"
c) templates which inject patterns into targets (like the nightly-
   'arch' or nightly-*-lsb targets.

A target in this sense is a set of builds like "nightly-arm" or
"nightly-qa-extras".

The script which does this is:

http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/tree/scripts/setup-config

You can run something like:

./setup-config nightly-arm-lsb 
 

e.g.

./setup-config nightly-arm-lsb 0 /tmp/foo/build master poky None None

which would place an auto.conf and sdk-extras.conf into
/tmp/foo/build/conf.

This sounds simple, extracting all the configurations out the current
autobuilder was a nightmare but we have this piece working.

We then have the executor, "run-config":

http://git.yoctoproject.org/cgit.cgi/yocto-autobuilder-helper/tree/scripts/run-config

This iterates the steps in each target. For each one:

* Adds any special layers
* Genereates the configuration (using setup-config)
* Runs BBTARGETS
* Runs SANITYTARGETS
* Runs any EXTRACMDS
* Removes any added layers

We have this in use on the "old" autobuilder cluster,
autobuilder.yoctoproject.org. I believe master, rocko and pyro are
working, morty is in development to tweak the configuration.

The plan from here is:

* Improve the reporting from run-config so that the steps numbers, 
  number of failed steps etc are reported in a way users can more 
  easily parse.
* Add an additional script to handle "publish artefacts" (another rats 
  nest of code we need to untangle)
* Add something which scripts the checkout and configuration of the 
  needed layers meaning we can step away from 'YoctoGit' in the 
  buildbot codebase
* See if we can get a modern version of buildbot to run the remaining 
  pieces.

I'm 

Re: [OE-core] [PATCH 1/1] scripts/oe-depends-dot: add it to handle dot files

2018-01-21 Thread Richard Purdie
On Mon, 2018-01-15 at 18:34 +0800, Robert Yang wrote:
> Add it to handle recipe-depends.dot and task-depends.dot. E.g.:
> 
> * Print why rpm is built
>   $ oe-depends-dot -k rpm --why/-w recipe-depends.dot
>   Because: core-image-sato libdnf libsolv dnf
> 
> * Print bzip2-native's depends
>   $ oe-depends-dot -k bzip2-native --depends/-d recipe-depends.dot
>   Depends: automake-native gnu-config-native libtool-native quilt-
> native autoconf-native
> 
> * Remove duplicated dependencies to reduce the size of the dot files.
>   For example, A->B, B->C, A->C, then A->C can be removed. The dot
> files are too
>   big, we nearly couldn't use 'dot -T' to generate pictcures for
> target recipes,
>   remove the duplicated dependencies makes is it possible.
>   $ bitbake core-image-sato -g
>   $ oe-depends-dot -r recipe-depends.dot
>   Saving reduced dot file to recipe-depends-reduced.dot
>   $ du -sh recipe-depends*.dot
>   608Krecipe-depends.dot
>   32K recipe-depends-reduced.dot
> 
>   It has been recuded from 608K to 32K, now we can generate a
> picture,
>   otherwise, it is too big:
>   $ dot -Tpng recipe-depends-reduced.dot -O
> 
> It also can handle task-depends.dot.

I just wanted to mention that whilst I've not tried using it due to
time constraints, I like the idea of this approach a lot, thanks
Robert!

Cheers,

Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] kernel: Use KERNEL_IMAGETYPE_FOR_MAKE in do_bundle_initramfs

2018-01-21 Thread Richard Purdie
On Wed, 2018-01-17 at 13:31 -0800, Andre McCurdy wrote:
> On Wed, Jan 17, 2018 at 1:21 AM, Thomas Perrot  > wrote:
> > 
> > In the case of a fitImage the this step should be done on the
> > image use to assemble the fitImage.
> > 
> > Signed-off-by: Thomas Perrot 
> > ---
> >  meta/classes/kernel.bbclass | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/classes/kernel.bbclass
> > b/meta/classes/kernel.bbclass
> > index c42f85c665..ff09d4c4c7 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -231,7 +231,7 @@ do_bundle_initramfs () {
> > copy_initramfs
> > # Backing up kernel image relies on its
> > type(regular file or symbolic link)
> > tmp_path=""
> > -   for type in ${KERNEL_IMAGETYPES} ; do
> > +   for type in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
> The net result of this change is to no longer backup the non-
> initramfs
> vmlinux.gz kernel image before creating the kernel image(s)
> containing
> bundled initramfs (plus some other corner cases, depending on whether
> the legacy KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE variables are
> used and whether or not KERNEL_IMAGETYPES contains both vmlinux and
> vmlinux.gz or vmlinux.gz only).
> 
> Can you explain a little how that's related to building fitImage
> kernels?
> 
> This code in do_bundle_initramfs() is extremely fragile and changes
> may only break less well testing targets such as MIPS, so any changes
> need to be very carefully reviewed and tested.

Actually, I think it means we need better tests.

I'm seriously considering removing a lot of the stuff in kernel.bbclass
and then rebuilding things in hopefully a cleaner way. The test for
anything being needed would be whether our regression tests pass.

I appreciate the idea will fill some with horror but there are a few
places the code code is turning into an unmaintainable (and
unreviewable) mess, the kernel classes are getting there :(

Cheers,

Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] populate_sdk_ext: Set cleandirs correctly

2018-01-21 Thread Richard Purdie
The current conflicting use of SDKDEPLOYDIR causes a race between 
do_populate_sdk
and do_populate_sdk_ext potentially causing the SDK to either go missing or the
build to fail.

Signed-off-by: Richard Purdie 
---
 meta/classes/populate_sdk_ext.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index 4f7100d..d7a0884 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -718,7 +718,7 @@ SDKEXTDEPLOYDIR = "${WORKDIR}/deploy-${PN}-populate-sdk-ext"
 
 SSTATETASKS += "do_populate_sdk_ext"
 SSTATE_SKIP_CREATION_task-populate-sdk-ext = '1'
-do_populate_sdk_ext[cleandirs] = "${SDKDEPLOYDIR}"
+do_populate_sdk_ext[cleandirs] = "${SDKEXTDEPLOYDIR}"
 do_populate_sdk_ext[sstate-inputdirs] = "${SDKEXTDEPLOYDIR}"
 do_populate_sdk_ext[sstate-outputdirs] = "${SDK_DEPLOY}"
 do_populate_sdk_ext[stamp-extra-info] = "${MACHINE}"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] perl: add Config_git.PL to -lib

2018-01-21 Thread Tim Orling
Fixes:
Warning: failed to load Config_git.pl, something strange about this perl

Signed-off-by: Tim Orling 
---
 meta/recipes-devtools/perl/perl_5.24.1.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/perl/perl_5.24.1.bb 
b/meta/recipes-devtools/perl/perl_5.24.1.bb
index 0baf3abb60b..f13a63a80a3 100644
--- a/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -280,6 +280,7 @@ FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
 FILES_${PN}-lib = "${libdir}/libperl.so* \
${libdir}/perl5 \
${libdir}/perl/config.sh \
+  ${libdir}/perl/${PV}/Config_git.pl \
${libdir}/perl/${PV}/Config_heavy.pl \
${libdir}/perl/${PV}/Config_heavy-target.pl"
 FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
-- 
2.13.6

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core