Re: [OE-core] [PATCH] weston: upgrade from 1.11.1 to 1.12.0

2016-11-15 Thread Fathi Boudra
On 15 November 2016 at 23:16, Andre McCurdy  wrote:
> On Wed, Nov 9, 2016 at 6:41 AM, Fathi Boudra  wrote:
>> On 9 November 2016 at 14:15, Burton, Ross  wrote:
>>>
>>> On 8 November 2016 at 13:54, Fathi Boudra  wrote:

  FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so"
>>>
>>>
>>> Because you didn't fix this patch the weston-xwayland package is never
>>> built, buildhistory is huge and core-image-weston with X11 enabled doesn't
>>> build.
>>
>> I'll spin a v2 with Jussi suggested split.
>
> Would it be OK to split the version update and the packaging changes
> across two commits?

ok

>> --
>> ___
>> 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
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] Test needed to verify postinst script order.

2016-11-15 Thread Francisco Pedraza
Will verify the following:
1. Compile a minimal image.
2. The compiled image will add the created layer with the
recipes postinstz postinsta postinstb postinstd postinstp postinstt
created previously at "meta-selftest/recipes-test"
2. Run qemu
3. Validate the task execution order.
V4

Signed-off-by: Francisco Pedraza 
---
 .../recipes-test/postinsta/postinsta_1.0.bb| 20 +++
 .../recipes-test/postinstb/postinstb_1.0.bb| 22 
 .../recipes-test/postinstd/postinstd_1.0.bb| 22 
 .../recipes-test/postinstp/postinstp_1.0.bb| 22 
 .../recipes-test/postinstt/postinstt_1.0.bb| 22 
 .../recipes-test/postinstz/postinstz_1.0.bb| 12 +++
 meta/lib/oeqa/selftest/runtime-test.py | 40 ++
 7 files changed, 160 insertions(+)
 create mode 100644 meta-selftest/recipes-test/postinsta/postinsta_1.0.bb
 create mode 100644 meta-selftest/recipes-test/postinstb/postinstb_1.0.bb
 create mode 100644 meta-selftest/recipes-test/postinstd/postinstd_1.0.bb
 create mode 100644 meta-selftest/recipes-test/postinstp/postinstp_1.0.bb
 create mode 100644 meta-selftest/recipes-test/postinstt/postinstt_1.0.bb
 create mode 100644 meta-selftest/recipes-test/postinstz/postinstz_1.0.bb

diff --git a/meta-selftest/recipes-test/postinsta/postinsta_1.0.bb 
b/meta-selftest/recipes-test/postinsta/postinsta_1.0.bb
new file mode 100644
index 000..2e69a85
--- /dev/null
+++ b/meta-selftest/recipes-test/postinsta/postinsta_1.0.bb
@@ -0,0 +1,20 @@
+LICENSE = "MIT"
+
+RDEPENDS_${PN} = "postinstz"
+
+ALLOW_EMPTY_${PN} = "1"
+
+pkg_postinst_${PN} () {
+   if test "x$D" != "x"; then
+  # Need to run on first boot
+  exit 1
+   else
+  if test -e /etc/postinstz-test ; then
+  echo 'success' > /etc/postinsta-test
+  else
+  echo 'fail to install postinstz first!' >&2
+  exit 1
+  fi
+   fi
+}
+
diff --git a/meta-selftest/recipes-test/postinstb/postinstb_1.0.bb 
b/meta-selftest/recipes-test/postinstb/postinstb_1.0.bb
new file mode 100644
index 000..447d777
--- /dev/null
+++ b/meta-selftest/recipes-test/postinstb/postinstb_1.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Device formfactor information"
+SECTION = "base"
+LICENSE = "MIT"
+
+RDEPENDS_${PN} = "postinsta"
+
+ALLOW_EMPTY_${PN} = "1"
+
+pkg_postinst_${PN} () {
+   if test "x$D" != "x"; then
+  # Need to run on first boot
+  exit 1
+   else
+  if test -e /etc/postinsta-test ; then
+  echo 'success' > /etc/postinstb-test
+  else
+  echo 'fail to install postinsta first!' >&2
+  exit 1
+  fi
+   fi
+}
+
diff --git a/meta-selftest/recipes-test/postinstd/postinstd_1.0.bb 
b/meta-selftest/recipes-test/postinstd/postinstd_1.0.bb
new file mode 100644
index 000..939f60e
--- /dev/null
+++ b/meta-selftest/recipes-test/postinstd/postinstd_1.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Device formfactor information"
+SECTION = "base"
+LICENSE = "MIT"
+
+RDEPENDS_${PN} = "postinstb"
+
+ALLOW_EMPTY_${PN} = "1"
+
+pkg_postinst_${PN} () {
+   if test "x$D" != "x"; then
+  # Need to run on first boot
+  exit 1
+   else
+  if test -e /etc/postinstb-test ; then
+  echo 'success' > /etc/postinstd-test
+  else
+  echo 'fail to install postinstb first!' >&2
+  exit 1
+  fi
+   fi
+}
+
diff --git a/meta-selftest/recipes-test/postinstp/postinstp_1.0.bb 
b/meta-selftest/recipes-test/postinstp/postinstp_1.0.bb
new file mode 100644
index 000..a5210b1
--- /dev/null
+++ b/meta-selftest/recipes-test/postinstp/postinstp_1.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Device formfactor information"
+SECTION = "base"
+LICENSE = "MIT"
+
+RDEPENDS_${PN} = "postinstd"
+
+ALLOW_EMPTY_${PN} = "1"
+
+pkg_postinst_${PN} () {
+   if test "x$D" != "x"; then
+  # Need to run on first boot
+  exit 1
+   else
+  if test -e /etc/z-test ; then
+  echo 'success' > /etc/postinstp-test
+  else
+  echo 'fail to install postinstd first!' >&2
+  exit 1
+  fi
+   fi
+}
+
diff --git a/meta-selftest/recipes-test/postinstt/postinstt_1.0.bb 
b/meta-selftest/recipes-test/postinstt/postinstt_1.0.bb
new file mode 100644
index 000..25c279b
--- /dev/null
+++ b/meta-selftest/recipes-test/postinstt/postinstt_1.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Device formfactor information"
+SECTION = "base"
+LICENSE = "MIT"
+
+RDEPENDS_${PN} = "postinstp"
+
+ALLOW_EMPTY_${PN} = "1"
+
+pkg_postinst_${PN} () {
+   if test "x$D" != "x"; then
+  # Need to run on first boot
+  exit 1
+   else
+  if test -e /etc/postinstp-test ; then
+  echo 'success' > /etc/postinstt-test
+  else
+  echo 'fail to install postinstp first!' >&2
+  exit 1
+  fi
+   fi
+}
+
diff --git a/meta-selftest/recipes-test/postinstz/postinstz_1.0.bb 
b/meta-selftest/recipes-test/postinstz/postinstz_1.0.bb
new file mode 100644
index 000..79abd74

Re: [OE-core] [PATCH] ltp: 20160126 -> 20160920

2016-11-15 Thread lyang0

any update for it ?

Lei



On 2016年10月17日 17:44, Robert Yang wrote:

Hi Maohui,

Oe-core will release morty branch recently, so the package upgrades
is pending atm.

// Robert

On 10/17/2016 05:05 PM, Lei, Maohui wrote:

Ping.




-Original Message-
From: openembedded-core-boun...@lists.openembedded.org
[mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of
Wang Xin
Sent: Monday, September 26, 2016 4:18 PM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH] ltp: 20160126 -> 20160920

1)Upgrade ltp from 20160126 to 20160920.
2)Delete some patches, since they are integrated upstream.
0001-ltp-Don-t-link-against-libfl.patch
0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
0007-replace-SIGCLD-with-SIGCHLD.patch
0009-Guard-error.h-with-__GLIBC__.patch
0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
0013-include-fcntl.h-for-getting-O_-definitions.patch
0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
0017-replace-sigval_t-with-union-sigval.patch
0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
0022-include-sys-types.h.patch
0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
0029-trace_shed-Fix-build-with-musl.patch
0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch
0032-regen.sh-Include-asm-unistd.h-explicitly.patch
0035-fix-test_proc_kill-hang.patch
3)Modify one patch, since the data has been changed.
0011-Rename-sigset-variable-to-sigset1.patch
4)Add some new patches.
0001-Define-__SIGRTMIN-and-__SIGRTMAX-on-musl.patch
0002-initialize-recursive-mutex-in-a-portable-way.patch
0003-lapi-Use-sig_t-instead-of-sighandler_t.patch
0004-rt_sigaction-rt_sigprocmark-Replace-SA_NOMASK-with-S.patch
0005-Fix-test_proc_kill-hanging.patch
0006-Remove-unused-__BEGIN_DECLS-and-__END_DECLS.patch

Signed-off-by: Wang Xin 
---
 ...-Define-__SIGRTMIN-and-__SIGRTMAX-on-musl.patch |  32 ++
 .../ltp/0001-ltp-Don-t-link-against-libfl.patch|  30 --
 ...tialize-recursive-mutex-in-a-portable-way.patch | 167 +
 ...3-lapi-Use-sig_t-instead-of-sighandler_t.patch} |  30 +-
 ...n-rt_sigprocmark-Replace-SA_NOMASK-with-S.patch | 120 +++
 ...patch => 0005-Fix-test_proc_kill-hanging.patch} |  25 +-
 ...move-unused-__BEGIN_DECLS-and-__END_DECLS.patch |  48 +++
 ...sendfile-Use-off64_t-instead-of-__off64_t.patch |  31 --
 .../ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch | 394 -

 .../ltp/0009-Guard-error.h-with-__GLIBC__.patch| 270 -
-
 .../0011-Rename-sigset-variable-to-sigset1.patch   |  60 ++--
 ...fsstress.c-Replace-__int64_t-with-int64_t.patch | 351 -
-
 ...nclude-fcntl.h-for-getting-O_-definitions.patch |  67 
 ...ing-Include-sys-types.h-for-pid_t-definit.patch |  56 ---
 ...015-mincore01-Rename-PAGESIZE-to-pagesize.patch |  64 
 ...Change-header-from-ustat.h-to-sys-ustat.h.patch |  45 ---
 .../0017-replace-sigval_t-with-union-sigval.patch  |  88 -
 ...lace-canonicalize_file_name-with-realpath.patch |  32 --
 .../ltp/ltp/0022-include-sys-types.h.patch |  29 --
 ...sconf01-Use-_SC_2_C_VERSION-conditionally.patch |  29 --
 .../ltp/0029-trace_shed-Fix-build-with-musl.patch  |  32 --
 ...READ_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch |  33 --
 ...age-size-offset-as-per-page-size-alignmen.patch |  33 --
 ...-regen.sh-Include-asm-unistd.h-explicitly.patch |  30 --
 .../ltp/{ltp_20160126.bb => ltp_20160920.bb}   |  27 +-
 25 files changed, 433 insertions(+), 1690 deletions(-)
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-Define-
__SIGRTMIN-and-__SIGRTMAX-on-musl.patch
 delete mode 100644 meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-
against-libfl.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/0002-initialize-
recursive-mutex-in-a-portable-way.patch
 rename meta/recipes-extended/ltp/ltp/{0028-rt_sigaction.h-Use-
sighandler_t-instead-of-__sighand.patch => 0003-lapi-Use-sig_t-instead-
of-sighandler_t.patch} (59%)
 create mode 100644 meta/recipes-extended/ltp/ltp/0004-rt_sigaction-
rt_sigprocmark-Replace-SA_NOMASK-with-S.patch
 rename meta/recipes-extended/ltp/ltp/{0035-fix-test_proc_kill-
hang.patch => 0005-Fix-test_proc_kill-hanging.patch} (52%)
 create mode 100644 meta/recipes-extended/ltp/ltp/0006-Remove-unused-
__BEGIN_DECLS-and-__END_DECLS.patch
 delete mode 100644 meta/recipes-extended/ltp/ltp/0006-sendfile-Use-
off64_t-instead-of-__off64_t.patch
 delete mode 100644 meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-
with-SIGCHLD.patch
 delete mode 100644 meta/recipes-extended/ltp/ltp/0009-Guard-error.h-
with-__GLIBC__.patch
 delete mode 100644 meta/recipes-extended/ltp/ltp/0012-fsstress.c-

[OE-core] [PATCH 1/1] parselogs: Whitelist NUC6 firmware load error message on genericx86-64

2016-11-15 Thread California Sullivan
This was already whitelisted, but the 4.8 kernel changed the error
message, causing it to get caught by parselogs again.

Fixes [YOCTO #10494].

Signed-off-by: California Sullivan 
---
 meta/lib/oeqa/runtime/parselogs.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/runtime/parselogs.py 
b/meta/lib/oeqa/runtime/parselogs.py
index 8efe2d1..58f62da 100644
--- a/meta/lib/oeqa/runtime/parselogs.py
+++ b/meta/lib/oeqa/runtime/parselogs.py
@@ -140,6 +140,7 @@ ignore_errors = {
 'Failed to load firmware i915',
 'Failed to fetch GuC',
 'Failed to initialize GuC',
+'Failed to load DMC firmware',
 'The driver is built-in, so to load the firmware you need to',
 ] + x86_common,
 'edgerouter' : [
-- 
2.5.5

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


Re: [OE-core] [PATCH v2] libdbus-c++: added recipe for it

2016-11-15 Thread Burton, Ross
On 15 November 2016 at 15:21, Thilo Cestonaro <
thilo.ceston...@ts.fujitsu.com> wrote:

> Patch goes into meta-oe of meta-openembedded.
>

meta-oe patches should go to openembedded-de...@lists.openembedded.org.

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


[OE-core] [PATCH] lib/oe/lsb: better handle missing fields

2016-11-15 Thread Joshua Lock
Some rolling release distros, such as Arch Linux, don't include a
VERSION_ID field in their os-release file.

Change release_dict_osr() to better handle this optional field
being absent.

Further improve the resilience of the release_dict_*() methods by
always returning a dict and using dict.get() in distro_identifier()
to supply a default, empty string, value when then key is missing.

Signed-off-by: Joshua Lock 
---
 meta/lib/oe/lsb.py | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 5a795a1..3a945e0 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -15,9 +15,6 @@ def release_dict_osr():
 if key == 'VERSION_ID':
 data['DISTRIB_RELEASE'] = val.strip('"')
 
-if len(data.keys()) != 2:
-return None
-
 return data
 
 def release_dict_lsb():
@@ -27,7 +24,7 @@ def release_dict_lsb():
 try:
 output, err = bb.process.run(['lsb_release', '-ir'], stderr=PIPE)
 except bb.process.CmdError as exc:
-return None
+return {}
 
 lsb_map = { 'Distributor ID': 'DISTRIB_ID',
 'Release': 'DISTRIB_RELEASE'}
@@ -51,7 +48,7 @@ def release_dict_lsb():
 
 def release_dict_file():
 """ Try to gather release information manually when other methods fail """
-data = None
+data = {}
 try:
 if os.path.exists('/etc/lsb-release'):
 data = {}
@@ -78,7 +75,7 @@ def release_dict_file():
 break
 
 except IOError:
-return None
+return {}
 return data
 
 def distro_identifier(adjust_hook=None):
@@ -96,8 +93,8 @@ def distro_identifier(adjust_hook=None):
 if not distro_data:
 distro_data = release_dict_file()
 
-distro_id = distro_data['DISTRIB_ID']
-release = distro_data['DISTRIB_RELEASE']
+distro_id = distro_data.get('DISTRIB_ID', '')
+release = distro_data.get('DISTRIB_RELEASE', '')
 
 if adjust_hook:
 distro_id, release = adjust_hook(distro_id, release)
-- 
2.7.4

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


[OE-core] [PATCH] [V2] OpenSSL: CVE-2004-2761 replace MD5 hash algorithm

2016-11-15 Thread T.O. Radzy Radzykewycz
Use SHA256 as default digest for OpenSSL instead of MD5.

CVE: CVE-2004-2761

The MD5 Message-Digest Algorithm is not collision resistant,
which makes it easier for context-dependent attackers to
conduct spoofing attacks, as demonstrated by attacks on the
use of MD5 in the signature algorithm of an X.509 certificate.

Upstream-Status: Backport
Backport from OpenSSL 2.0 to OpenSSL 1.0.2
Commit f8547f62c212837dbf44fb7e2755e5774a59a57b

Reviewed-by: Viktor Dukhovni 
Signed-off-by: Zhang Xiao 
Signed-off-by: T.O. Radzy Radzykewycz 
---
 .../Use-SHA256-not-MD5-as-default-digest.patch | 69 ++
 1 file changed, 69 insertions(+)
 create mode 100644 
meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch

diff --git 
a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
 
b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
new file mode 100644
index ..58c9ee784433
--- /dev/null
+++ 
b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
@@ -0,0 +1,69 @@
+From d795f5f20a29adecf92c09459a3ee07ffac01a99 Mon Sep 17 00:00:00 2001
+From: Rich Salz 
+Date: Sat, 13 Jun 2015 17:03:39 -0400
+Subject: [PATCH] Use SHA256 not MD5 as default digest.
+
+Commit f8547f62c212837dbf44fb7e2755e5774a59a57b upstream.
+
+Upstream-Status: Backport
+Backport from OpenSSL 2.0 to OpenSSL 1.0.2
+Commit f8547f62c212837dbf44fb7e2755e5774a59a57b   
+
+CVE: CVE-2004-2761
+
+The MD5 Message-Digest Algorithm is not collision resistant,
+which makes it easier for context-dependent attackers to
+conduct spoofing attacks, as demonstrated by attacks on the 
+use of MD5 in the signature algorithm of an X.509 certificate. 
+
+Reviewed-by: Viktor Dukhovni 
+Signed-off-by: Zhang Xiao  
+Signed-off-by: T.O. Radzy Radzykewycz  
+---
+ apps/ca.c   | 2 +-
+ apps/dgst.c | 2 +-
+ apps/enc.c  | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/apps/ca.c b/apps/ca.c
+index 3b7336c..8f3a84b 100644
+--- a/apps/ca.c
 b/apps/ca.c
+@@ -1612,7 +1612,7 @@ static int certify_cert(X509 **xret, char *infile, 
EVP_PKEY *pkey, X509 *x509,
+ } else
+ BIO_printf(bio_err, "Signature ok\n");
+ 
+-if ((rreq = X509_to_X509_REQ(req, NULL, EVP_md5())) == NULL)
++if ((rreq = X509_to_X509_REQ(req, NULL, NULL)) == NULL)
+ goto err;
+ 
+ ok = do_body(xret, pkey, x509, dgst, sigopts, policy, db, serial, subj,
+diff --git a/apps/dgst.c b/apps/dgst.c
+index 95e5fa3..0d1529f 100644
+--- a/apps/dgst.c
 b/apps/dgst.c
+@@ -442,7 +442,7 @@ int MAIN(int argc, char **argv)
+ goto end;
+ }
+ if (md == NULL)
+-md = EVP_md5();
++md = EVP_sha256();
+ if (!EVP_DigestInit_ex(mctx, md, impl)) {
+ BIO_printf(bio_err, "Error setting digest %s\n", pname);
+ ERR_print_errors(bio_err);
+diff --git a/apps/enc.c b/apps/enc.c
+index 7b7c70b..a7d944c 100644
+--- a/apps/enc.c
 b/apps/enc.c
+@@ -344,7 +344,7 @@ int MAIN(int argc, char **argv)
+ }
+ 
+ if (dgst == NULL) {
+-dgst = EVP_md5();
++dgst = EVP_sha256();
+ }
+ 
+ if (bufsize != NULL) {
+-- 
+1.9.1
+
-- 
1.9.1

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


[OE-core] [PATCH] python3-setuptools: upgrade to 28.8.0

2016-11-15 Thread Edwin Plauchu
From: Edwin Plauchu 

Signed-off-by: Edwin Plauchu 
---
 meta/recipes-devtools/python/python-setuptools.inc  | 6 +++---
 .../{python3-setuptools_22.0.5.bb => python3-setuptools_28.8.0.bb}  | 0
 2 files changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-devtools/python/{python3-setuptools_22.0.5.bb => 
python3-setuptools_28.8.0.bb} (100%)

diff --git a/meta/recipes-devtools/python/python-setuptools.inc 
b/meta/recipes-devtools/python/python-setuptools.inc
index 92ca9a0..d3eef13 100644
--- a/meta/recipes-devtools/python/python-setuptools.inc
+++ b/meta/recipes-devtools/python/python-setuptools.inc
@@ -3,14 +3,14 @@ HOMEPAGE = "https://pypi.python.org/pypi/setuptools;
 SECTION = "devel/python"
 LICENSE = "MIT"
 
-LIC_FILES_CHKSUM = 
"file://setup.py;beginline=134;endline=134;md5=3e8df024d6c1442d18e84acf8fbbc475"
+LIC_FILES_CHKSUM = 
"file://setup.py;beginline=146;endline=146;md5=3e8df024d6c1442d18e84acf8fbbc475"
 
 SRCNAME = "setuptools"
 
 SRC_URI = 
"https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz;
 
-SRC_URI[md5sum] = "869f3029dcc66a64ba39875e2a2f044a"
-SRC_URI[sha256sum] = 
"19aad19471052d5daefe96f2c1fa2e88dcdb17488bf8708d7e6356881ea833cb"
+SRC_URI[md5sum] = "43d6eb25f60e8a2682a8f826ce9e3f42"
+SRC_URI[sha256sum] = 
"432a1ad4044338c34c2d09b0ff75d509b9849df8cf329f4c1c7706d9c2ba3c61"
 
 UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools;
 
diff --git a/meta/recipes-devtools/python/python3-setuptools_22.0.5.bb 
b/meta/recipes-devtools/python/python3-setuptools_28.8.0.bb
similarity index 100%
rename from meta/recipes-devtools/python/python3-setuptools_22.0.5.bb
rename to meta/recipes-devtools/python/python3-setuptools_28.8.0.bb
-- 
2.9.3

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


Re: [OE-core] [PATCH] weston: upgrade from 1.11.1 to 1.12.0

2016-11-15 Thread Andre McCurdy
On Wed, Nov 9, 2016 at 6:41 AM, Fathi Boudra  wrote:
> On 9 November 2016 at 14:15, Burton, Ross  wrote:
>>
>> On 8 November 2016 at 13:54, Fathi Boudra  wrote:
>>>
>>>  FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so"
>>
>>
>> Because you didn't fix this patch the weston-xwayland package is never
>> built, buildhistory is huge and core-image-weston with X11 enabled doesn't
>> build.
>
> I'll spin a v2 with Jussi suggested split.

Would it be OK to split the version update and the packaging changes
across two commits?

> --
> ___
> 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
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] FW: [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests

2016-11-15 Thread Burton, Ross
On 15 November 2016 at 19:10, Benjamin Esquivel <
benjamin.esqui...@linux.intel.com> wrote:

> The reason for the migration of the tests is for them to be included in
> the selftest execution. And for that execution, it needs to base off of the
> oeSelfTest class.
>
>
Sounds like a problem with the discovery if it mandates oeselftest.  Is
there a reason why it can't also execute bare unittests?

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


[OE-core] [PATCH 1/1] devtool: modify: support recipes with only local files as source

2016-11-15 Thread Paul Eggleton
The hello-mod recipe is unusual in that it has only local files in
SRC_URI and builds these out of ${WORKDIR}. When you use devtool modify
on it, devtool puts all of those files in an "oe-local-files"
subdirectory of the source tree, which is not ${S} (or ${B}) any more
and thus building the recipe afterwards fails. It's a bit of a hack, but
symlink the files in oe-local-files into the source tree (and commit the
symlinks with an ignored commit so that the repo is clean) to work
around the problem. We only do this at time of extraction, so any files
added to or removed from oe-local-files after that won't be handled, but
I think there's a limit to how far we should go to support these kinds
of recipes - ultimately they are anomalies.

I initially tried a hacky workaround where I set effectively set B =
"${WORKDIR}" and that allowed it to build, but other things such as the
LIC_FILES_CHKSUM checks still broke because they expected to find files
in ${S}. Another hack where I set the sourcetree to point to the
oe-local-files subdirectory works for hello-mod but not for makedevs
since whilst that is similar, unlike hello-mod it does in fact have
files in the source tree (since it has a patch that adds COPYING) and
thus the same issue occurred.

Also tweak one of the tests that tries devtool modify / update-recipe on
the makedevs recipe to try building it since that would have caught this
issue.

Fixes [YOCTO #10616].

Signed-off-by: Paul Eggleton 
---
 meta/lib/oeqa/selftest/devtool.py |  2 ++
 scripts/lib/devtool/standard.py   | 23 +++
 2 files changed, 25 insertions(+)

diff --git a/meta/lib/oeqa/selftest/devtool.py 
b/meta/lib/oeqa/selftest/devtool.py
index 46f5a0b..b5f850f 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -874,6 +874,8 @@ class DevtoolTests(DevtoolBase):
 result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
 # Check git repo
 self._check_src_repo(tempdir)
+# Try building just to ensure we haven't broken that
+bitbake("%s" % testrecipe)
 # Edit / commit local source
 runCmd('echo "/* Foobar */" >> oe-local-files/makedevs.c', cwd=tempdir)
 runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 4523048..891f308 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -673,6 +673,29 @@ def _extract_source(srctree, keep_temp, devbranch, sync, 
d):
 
 shutil.move(srcsubdir, srctree)
 
+if os.path.abspath(d.getVar('S', True)) == 
os.path.abspath(d.getVar('WORKDIR', True)):
+# If recipe extracts to ${WORKDIR}, symlink the files into the 
srctree
+# (otherwise the recipe won't build as expected)
+local_files_dir = os.path.join(srctree, 'oe-local-files')
+addfiles = []
+for root, _, files in os.walk(local_files_dir):
+relpth = os.path.relpath(root, local_files_dir)
+if relpth != '.':
+bb.utils.mkdirhier(os.path.join(srctree, relpth))
+for fn in files:
+if fn == '.gitignore':
+continue
+destpth = os.path.join(srctree, relpth, fn)
+if os.path.exists(destpth):
+os.unlink(destpth)
+os.symlink('oe-local-files/%s' % fn, destpth)
+addfiles.append(os.path.join(relpth, fn))
+if addfiles:
+bb.process.run('git add %s' % ' '.join(addfiles), 
cwd=srctree)
+useroptions = []
+oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d)
+bb.process.run('git %s commit -a -m "Committing local file 
symlinks\n\n%s"' % (' '.join(useroptions), 
oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
+
 if kconfig:
 logger.info('Copying kernel config to srctree')
 shutil.copy2(kconfig, srctree)
-- 
2.5.5

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


Re: [OE-core] [PATCH] OpenSSL: CVE-2004-2761 replace MD5 hash algorithm

2016-11-15 Thread Radzykewycz, T (Radzy)


> From: Burton, Ross [ross.bur...@intel.com]
> Sent: Tuesday, November 15, 2016 11:59 AM
> To: Radzykewycz, T (Radzy)
> Cc: OE-core
> Subject: Re: [OE-core] [PATCH] OpenSSL: CVE-2004-2761 replace MD5 hash 
> algorithm
> 
> On 15 November 2016 at 19:43, T.O. Radzy Radzykewycz 
> > wrote:
>  .../recipes-connectivity/openssl/openssl_1.0.2h.bb 
> |  1 +
> 
> oe-core master is on openssl 1.0.2j now, so please rebase.
> 
>  2 files changed, 60 insertions(+)
>  create mode 100644 
> meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
> 
> diff --git 
> a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
>  
> b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
> new file mode 100644
> index ..766af67e1db9
> --- /dev/null
> +++ 
> b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
> @@ -0,0 +1,59 @@
> +From d795f5f20a29adecf92c09459a3ee07ffac01a99 Mon Sep 17 00:00:00 2001
> +From: Rich Salz >
> +Date: Sat, 13 Jun 2015 17:03:39 -0400
> +Subject: [PATCH] Use SHA256 not MD5 as default digest.
> +
> +Commit f8547f62c212837dbf44fb7e2755e5774a59a57b upstream.
> +
> +Upstream Status: Backport
> 
> I'm such a pedant but we do have automated tooling around this, so please use 
> "Upstream-Status".  Also adding a CVE tag in the patch (CVE: CVE-2004-2761) 
> would be appreciated for tracking.

Thanks for the great feedback!

I'll send a new patch shortly.

Enjoy!

-- radzy

PS: The instructions at
http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
seem to indicate that you should not use master.  Since I seem to have
misunderstood, please forgive my ignorance.

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


[OE-core] [PATCH 0/1] devtool: modify: support recipes with only local files as source

2016-11-15 Thread Paul Eggleton
The following changes since commit a675b2c89e477af088faee9b3be96eae19a85f0b:

  sanity.bbclass: fix logging of an error (2016-11-15 15:18:50 +)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/devtool-localfiles
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/devtool-localfiles

Paul Eggleton (1):
  devtool: modify: support recipes with only local files as source

 meta/lib/oeqa/selftest/devtool.py |  2 ++
 scripts/lib/devtool/standard.py   | 23 +++
 2 files changed, 25 insertions(+)

-- 
2.5.5

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


Re: [OE-core] [PATCH] OpenSSL: CVE-2004-2761 replace MD5 hash algorithm

2016-11-15 Thread Burton, Ross
On 15 November 2016 at 19:43, T.O. Radzy Radzykewycz 
wrote:

>  .../recipes-connectivity/openssl/openssl_1.0.2h.bb |  1 +
>

oe-core master is on openssl 1.0.2j now, so please rebase.


>  2 files changed, 60 insertions(+)
>  create mode 100644 meta/recipes-connectivity/openssl/openssl/Use-SHA256-
> not-MD5-as-default-digest.patch
>
> diff --git a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-
> not-MD5-as-default-digest.patch b/meta/recipes-connectivity/
> openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
> new file mode 100644
> index ..766af67e1db9
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-
> not-MD5-as-default-digest.patch
> @@ -0,0 +1,59 @@
> +From d795f5f20a29adecf92c09459a3ee07ffac01a99 Mon Sep 17 00:00:00 2001
> +From: Rich Salz 
> +Date: Sat, 13 Jun 2015 17:03:39 -0400
> +Subject: [PATCH] Use SHA256 not MD5 as default digest.
> +
> +Commit f8547f62c212837dbf44fb7e2755e5774a59a57b upstream.
> +
> +Upstream Status: Backport
>

I'm such a pedant but we do have automated tooling around this, so please
use "Upstream-Status".  Also adding a CVE tag in the patch (CVE:
CVE-2004-2761) would be appreciated for tracking.

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


[OE-core] [PATCH] OpenSSL: CVE-2004-2761 replace MD5 hash algorithm

2016-11-15 Thread T.O. Radzy Radzykewycz
Use SHA256 as default digest for OpenSSL instead of MD5.

CVE-2004-2761:

The MD5 Message-Digest Algorithm is not collision resistant,
which makes it easier for context-dependent attackers to
conduct spoofing attacks, as demonstrated by attacks on the
use of MD5 in the signature algorithm of an X.509 certificate.

Status: Backport from OpenSSL 2.0 to OpenSSL 1.0.2
Commit f8547f62c212837dbf44fb7e2755e5774a59a57b

Reviewed-by: Viktor Dukhovni 
Signed-off-by: Zhang Xiao 
Signed-off-by: T.O. Radzy Radzykewycz 
---
 .../Use-SHA256-not-MD5-as-default-digest.patch | 59 ++
 .../recipes-connectivity/openssl/openssl_1.0.2h.bb |  1 +
 2 files changed, 60 insertions(+)
 create mode 100644 
meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch

diff --git 
a/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
 
b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
new file mode 100644
index ..766af67e1db9
--- /dev/null
+++ 
b/meta/recipes-connectivity/openssl/openssl/Use-SHA256-not-MD5-as-default-digest.patch
@@ -0,0 +1,59 @@
+From d795f5f20a29adecf92c09459a3ee07ffac01a99 Mon Sep 17 00:00:00 2001
+From: Rich Salz 
+Date: Sat, 13 Jun 2015 17:03:39 -0400
+Subject: [PATCH] Use SHA256 not MD5 as default digest.
+
+Commit f8547f62c212837dbf44fb7e2755e5774a59a57b upstream.
+
+Upstream Status: Backport
+
+Reviewed-by: Viktor Dukhovni 
+Signed-off-by: Zhang Xiao 
+---
+ apps/ca.c   | 2 +-
+ apps/dgst.c | 2 +-
+ apps/enc.c  | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/apps/ca.c b/apps/ca.c
+index 3b7336c..8f3a84b 100644
+--- a/apps/ca.c
 b/apps/ca.c
+@@ -1612,7 +1612,7 @@ static int certify_cert(X509 **xret, char *infile, 
EVP_PKEY *pkey, X509 *x509,
+ } else
+ BIO_printf(bio_err, "Signature ok\n");
+ 
+-if ((rreq = X509_to_X509_REQ(req, NULL, EVP_md5())) == NULL)
++if ((rreq = X509_to_X509_REQ(req, NULL, NULL)) == NULL)
+ goto err;
+ 
+ ok = do_body(xret, pkey, x509, dgst, sigopts, policy, db, serial, subj,
+diff --git a/apps/dgst.c b/apps/dgst.c
+index 95e5fa3..0d1529f 100644
+--- a/apps/dgst.c
 b/apps/dgst.c
+@@ -442,7 +442,7 @@ int MAIN(int argc, char **argv)
+ goto end;
+ }
+ if (md == NULL)
+-md = EVP_md5();
++md = EVP_sha256();
+ if (!EVP_DigestInit_ex(mctx, md, impl)) {
+ BIO_printf(bio_err, "Error setting digest %s\n", pname);
+ ERR_print_errors(bio_err);
+diff --git a/apps/enc.c b/apps/enc.c
+index 7b7c70b..a7d944c 100644
+--- a/apps/enc.c
 b/apps/enc.c
+@@ -344,7 +344,7 @@ int MAIN(int argc, char **argv)
+ }
+ 
+ if (dgst == NULL) {
+-dgst = EVP_md5();
++dgst = EVP_sha256();
+ }
+ 
+ if (bufsize != NULL) {
+-- 
+1.9.1
+
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb 
b/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
index 5a4e52a4d735..5714affe4407 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
@@ -49,6 +49,7 @@ SRC_URI += "file://find.pl;subdir=${BP}/util/ \
 file://CVE-2016-6303.patch \
 file://CVE-2016-6304.patch \
 file://CVE-2016-6306.patch \
+   file://Use-SHA256-not-MD5-as-default-digest.patch \
"
 SRC_URI[md5sum] = "9392e65072ce4b614c1392eefc1f23d0"
 SRC_URI[sha256sum] = 
"1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c74332919"
-- 
1.9.1

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


[OE-core] [PATCH] licenses.conf: Fix variable name in comments (FOSS_NO_COPYRIGHT)

2016-11-15 Thread Olof Johansson
A FOSSology related variable was renamed from FOSS_COPRYIGHT to
FOSS_NO_COPYRIGHT, but the comment block describing the variable
in licenses.conf was missed.

Besides fixing this, this change also removes a redundant comment
about where the variable is defined (it's right there! ;-)).

Signed-off-by: Olof Johansson 
---
 meta/conf/licenses.conf | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/conf/licenses.conf b/meta/conf/licenses.conf
index 9917c40..d210a0e 100644
--- a/meta/conf/licenses.conf
+++ b/meta/conf/licenses.conf
@@ -133,11 +133,10 @@ DATA_LICENSE = "CC0-1.0"
 # You can set option to control if the copyright information will be skipped
 # during the identification process.
 #
-# It is defined as [FOSS_COPYRIGHT] in ./meta/conf/licenses.conf.
-# FOSS_COPYRIGHT = "true"
+# FOSS_NO_COPYRIGHT = "true"
 #   NO copyright will be processed. That means only license information will be
 #   identified and output to SPDX file
-# FOSS_COPYRIGHT = "false"
+# FOSS_NO_COPYRIGHT = "false"
 #   Copyright will be identified and output to SPDX file along with license
 #   information. The process will take more time than not processing copyright
 #   information.
-- 
2.1.4

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


[OE-core] FW: [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests

2016-11-15 Thread Benjamin Esquivel
Re-sending from the correct account (of mine).

 

From: Esquivel, Benjamin 
Sent: Tuesday, November 15, 2016 12:38 PM
To: 'Jose Perez Carranza' ; 'Burton, Ross' 

Cc: 'OE-core' 
Subject: RE: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to 
/oeqa/selftest/oe-tests

 

Apologies for the top posting.

 

The reason for the migration of the tests is for them to be included in the 
selftest execution. And for that execution, it needs to base off of the 
oeSelfTest class.

 

Benjamin

 

From: openembedded-core-boun...@lists.openembedded.org 
  
[mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of Jose 
Perez Carranza
Sent: Tuesday, November 15, 2016 12:09 PM
To: Burton, Ross  >
Cc: OE-core  >
Subject: Re: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to 
/oeqa/selftest/oe-tests

 

 

 

On 11/15/2016 11:16 AM, Burton, Ross wrote:

 

On 15 November 2016 at 16:24,  > wrote:

+class TestPackagesFilterOutSystem(oeSelfTest):


As the tests don't need anything special that oeSelfTest provides, can they 
remain as testcase.TestCase instances?  There's a lot of complication from 
oeSelfTest that isn't required.

 

In order to the test cases be recognized and executed as part of the suite they 
need to be in the same context of selftest hence be an instance of oeSelftest.  

Ross

 

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


Re: [OE-core] [PATCH 1/2] go: Add recipes for golang compilers and tools

2016-11-15 Thread Matt Madison
On Fri, Nov 11, 2016 at 10:04 AM, Richard Purdie
 wrote:
> On Fri, 2016-11-11 at 15:10 +0200, Alexander Kanavin wrote:
>> On 11/10/2016 02:39 AM, Khem Raj wrote:
>> >
>> > This is converging the recipes for go from
>> > meta-virtualization and oe-meta-go
>> Wait a moment, why this should go to oe-core and not to meta-go? Is
>> there something in oe-core itself that requires presence of go
>> compiler?
>
> This was something that came up at OEDEM. There are several layers with
> several attempts at getting this right, most have some issues.
>
> Whilst we've been pulling things out of core, we also need to consider
> things that perhaps should get added. Having this in core would
> certainly address a number of issues (but is also potentially a
> maintenance burden).
>
> We did agree there that we'd consider this. Obviously input from people
> not there is welcome though and this does need discussion. I'm leaning
> moderately in favour of adding it as things stand.

It would certainly help me, as I have a bunch of developers writing Go
packages and apps for embedded targets.  That said, I don't know if Go
is really mature enough.  I've just been working through a pretty
significant bug in the Go 1.7 runtime that makes it unusable when
linked as a shareable library, for instance.

Any reason why more of meta-golang couldn't be integrated into this
patch set, though?   I've been looking over what's in oe-meta-go and
meta-virt, and most of the patches i put into meta-golang to have
already been pulled in there.  And go.bbclass looks like a subset of
meta-golang's golang.bbclass.

Whether it's pulled into OE-core or a common layer hosted at
git.yp.org, it would be helpful to synthesize a common base for Go
support.  I'd be willing to help that.

Thanks,
-Matt

>
> Cheers,
>
> Richard
> --
> ___
> 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
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests

2016-11-15 Thread Benjamin Esquivel
Looks good to me, thanks for sending the v2.

> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org
> [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf
> Of jose.perez.carra...@linux.intel.com
> Sent: Tuesday, November 15, 2016 10:25 AM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to
> /oeqa/selftest/oe-tests
> 
> From: Jose Perez Carranza 
> 
> Currently the unittests for scripts on meta/lib/oe/tests are not being
> executed by any suite hence the best option is migrate them to
> meta/lib/oeqa/selftest/oelib-tests to be executed along with the selftest
> suite.
> 
> [YOCTO #7376]
> 
> Signed-off-by: Jose Perez Carranza 
> ---
>  meta/lib/oe/tests/__init__.py  |  0
>  meta/lib/oe/tests/test_elf.py  | 21 --
>  meta/lib/oe/tests/test_license.py  | 68 ---
>  meta/lib/oe/tests/test_path.py | 89
-
>  meta/lib/oe/tests/test_types.py| 62 --
>  meta/lib/oe/tests/test_utils.py| 51 ---
>  meta/lib/oeqa/selftest/oelib-tests/__init__.py |  0
>  meta/lib/oeqa/selftest/oelib-tests/elf.py  | 22 +++
>  meta/lib/oeqa/selftest/oelib-tests/license.py  | 69
> 
>  meta/lib/oeqa/selftest/oelib-tests/path.py | 90
> ++
>  meta/lib/oeqa/selftest/oelib-tests/types.py| 61 +
>  meta/lib/oeqa/selftest/oelib-tests/utils.py| 52 +++
>  12 files changed, 294 insertions(+), 291 deletions(-)  delete mode 100644
> meta/lib/oe/tests/__init__.py  delete mode 100644
> meta/lib/oe/tests/test_elf.py  delete mode 100644
> meta/lib/oe/tests/test_license.py  delete mode 100644
> meta/lib/oe/tests/test_path.py  delete mode 100644
> meta/lib/oe/tests/test_types.py  delete mode 100644
> meta/lib/oe/tests/test_utils.py  create mode 100644
> meta/lib/oeqa/selftest/oelib-tests/__init__.py
>  create mode 100644 meta/lib/oeqa/selftest/oelib-tests/elf.py
>  create mode 100644 meta/lib/oeqa/selftest/oelib-tests/license.py
>  create mode 100644 meta/lib/oeqa/selftest/oelib-tests/path.py
>  create mode 100644 meta/lib/oeqa/selftest/oelib-tests/types.py
>  create mode 100644 meta/lib/oeqa/selftest/oelib-tests/utils.py
> 
> diff --git a/meta/lib/oe/tests/__init__.py b/meta/lib/oe/tests/__init__.py
> deleted file mode 100644 index e69de29..000 diff --git
> a/meta/lib/oe/tests/test_elf.py b/meta/lib/oe/tests/test_elf.py deleted
file
> mode 100644 index 1f59037..000
> --- a/meta/lib/oe/tests/test_elf.py
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -import unittest
> -import oe.qa
> -
> -class TestElf(unittest.TestCase):
> -def test_machine_name(self):
> -"""
> -Test elf_machine_to_string()
> -"""
> -self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
> -self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
> -self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
> -self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
> -self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
> -self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
> -self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
> -self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
> -self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
> -
> -self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown
(0)")
> -self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF),
"Unknown
> (3735928559)")
> -self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown
> ('foobar')")
> diff --git a/meta/lib/oe/tests/test_license.py
> b/meta/lib/oe/tests/test_license.py
> deleted file mode 100644
> index c36..000
> --- a/meta/lib/oe/tests/test_license.py
> +++ /dev/null
> @@ -1,68 +0,0 @@
> -import unittest
> -import oe.license
> -
> -class SeenVisitor(oe.license.LicenseVisitor):
> -def __init__(self):
> -self.seen = []
> -oe.license.LicenseVisitor.__init__(self)
> -
> -def visit_Str(self, node):
> -self.seen.append(node.s)
> -
> -class TestSingleLicense(unittest.TestCase):
> -licenses = [
> -"GPLv2",
> -"LGPL-2.0",
> -"Artistic",
> -"MIT",
> -"GPLv3+",
> -"FOO_BAR",
> -]
> -invalid_licenses = ["GPL/BSD"]
> -
> -@staticmethod
> -def parse(licensestr):
> -visitor = SeenVisitor()
> -visitor.visit_string(licensestr)
> -return visitor.seen
> -
> -def test_single_licenses(self):
> -for license in self.licenses:
> -licenses = self.parse(license)
> -self.assertListEqual(licenses, [license])
> -
> -def 

Re: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests

2016-11-15 Thread Jose Perez Carranza



On 11/15/2016 11:16 AM, Burton, Ross wrote:


On 15 November 2016 at 16:24, > wrote:


+class TestPackagesFilterOutSystem(oeSelfTest):


As the tests don't need anything special that oeSelfTest provides, can 
they remain as testcase.TestCase instances? There's a lot of 
complication from oeSelfTest that isn't required.


In order to the test cases be recognized and executed as part of the 
suite they need to be in the same context of selftest hence be an 
instance of oeSelftest.

Ross


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


[OE-core] [PATCH V4] Cleanup subprocess calls

2016-11-15 Thread Stephano Cetola
Changed since V3:
Corrected commit summary by changing primary item worked on from
subprocess to package_manager.

Stephano Cetola (1):
  package_manager: remove strings and migrate to direct arrays

 meta/lib/oe/package.py |  13 +--
 meta/lib/oe/package_manager.py | 229 -
 2 files changed, 118 insertions(+), 124 deletions(-)

-- 
2.10.2

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


[OE-core] [PATCH V4] package_manager: remove strings and migrate to direct arrays

2016-11-15 Thread Stephano Cetola
When using subprocess call and check_output, it is better to use arrays
rather than strings when possible to avoid whitespace and quoting
problems.

[ YOCTO #9342 ]

Signed-off-by: Stephano Cetola 
---
 meta/lib/oe/package.py |  13 +--
 meta/lib/oe/package_manager.py | 229 -
 2 files changed, 118 insertions(+), 124 deletions(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 02642f2..ae60a58 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -18,23 +18,24 @@ def runstrip(arg):
 newmode = origmode | stat.S_IWRITE | stat.S_IREAD
 os.chmod(file, newmode)
 
-extraflags = ""
+stripcmd = [strip]
 
 # kernel module
 if elftype & 16:
-extraflags = "--strip-debug --remove-section=.comment 
--remove-section=.note --preserve-dates"
+stripcmd.extend(["--strip-debug", "--remove-section=.comment",
+"--remove-section=.note", "--preserve-dates"])
 # .so and shared library
 elif ".so" in file and elftype & 8:
-extraflags = "--remove-section=.comment --remove-section=.note 
--strip-unneeded"
+stripcmd.extend(["--remove-section=.comment", 
"--remove-section=.note", "--strip-unneeded"])
 # shared or executable:
 elif elftype & 8 or elftype & 4:
-extraflags = "--remove-section=.comment --remove-section=.note"
+stripcmd.extend(["--remove-section=.comment", 
"--remove-section=.note"])
 
-stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+stripcmd.append(file)
 bb.debug(1, "runstrip: %s" % stripcmd)
 
 try:
-output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT, 
shell=True)
+output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
 except subprocess.CalledProcessError as e:
 bb.error("runstrip: '%s' strip command failed with %s (%s)" % 
(stripcmd, e.returncode, e.output))
 
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index a9d216a..5fbfa7a 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -358,12 +358,11 @@ class RpmPkgsList(PkgsList):
 RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, 
os_var)
 
 # Determine rpm version
-cmd = "%s --version" % self.rpm_cmd
 try:
-output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, 
shell=True).decode("utf-8")
+output = subprocess.check_output([self.rpm_cmd, "--version"], 
stderr=subprocess.STDOUT).decode("utf-8")
 except subprocess.CalledProcessError as e:
 bb.fatal("Getting rpm version failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, 
e.output.decode("utf-8")))
+ "returned %d:\n%s" % (self.rpm_cmd, e.returncode, 
e.output.decode("utf-8")))
 
 '''
 Translate the RPM/Smart format names to the OE multilib format names
@@ -412,16 +411,15 @@ class RpmPkgsList(PkgsList):
 return output
 
 def list_pkgs(self):
-cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
-cmd += ' -D "_dbpath /var/lib/rpm" -qa'
-cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
+cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
+cmd.extend(['-D', '_dbpath /var/lib/rpm'])
+cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION} 
%{PACKAGEORIGIN}\n]'])
 
 try:
-# bb.note(cmd)
-tmp_output = subprocess.check_output(cmd, 
stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
+tmp_output = subprocess.check_output(cmd, 
stderr=subprocess.STDOUT).strip().decode("utf-8")
 except subprocess.CalledProcessError as e:
 bb.fatal("Cannot get the installed packages list. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, 
e.output.decode("utf-8")))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, 
e.output.decode("utf-8")))
 
 output = dict()
 deps = dict()
@@ -672,11 +670,11 @@ class RpmPM(PackageManager):
 # 2 = --log-level=debug
 # 3 = --log-level=debug plus dumps of scriplet content and command 
invocation
 self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG', True) or "0")
-self.smart_opt = "--log-level=%s --data-dir=%s" % \
+self.smart_opt = ["--log-level=%s" %
  ("warning" if self.debug_level == 0 else
   "info" if self.debug_level == 1 else
-  "debug",
-  os.path.join(target_rootfs, 'var/lib/smart'))
+  "debug"), "--data-dir=%s" %
+  os.path.join(target_rootfs, 'var/lib/smart')]
 self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
 self.solution_manifest = 

Re: [OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests

2016-11-15 Thread Burton, Ross
On 15 November 2016 at 16:24,  wrote:

> +class TestPackagesFilterOutSystem(oeSelfTest):
>

As the tests don't need anything special that oeSelfTest provides, can they
remain as testcase.TestCase instances?  There's a lot of complication from
oeSelfTest that isn't required.

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


[OE-core] [PATCH V2] recipetool: add postinst to .deb import

2016-11-15 Thread Stephano Cetola
Changed since V1:
Removed unused variable and cleaned up commit message.

Stephano Cetola (1):
  recipetool: add postinst to .deb import

 scripts/lib/recipetool/create.py | 35 ---
 1 file changed, 32 insertions(+), 3 deletions(-)

-- 
2.10.2

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


[OE-core] [PATCH V2] recipetool: add postinst to .deb import

2016-11-15 Thread Stephano Cetola
The .deb import feature did not import postinst, postrm, preinst, or
prerm functions. This change checks to see if those files exist, and
if so, adds the appropriate functions.

[ YOCTO #10421 ]

Signed-off-by: Stephano Cetola 
---
 scripts/lib/recipetool/create.py | 35 ---
 1 file changed, 32 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index cb1c804..ab26531 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -234,7 +234,8 @@ class RecipeHandler(object):
 if deps:
 values['DEPENDS'] = ' '.join(deps)
 
-def genfunction(self, outlines, funcname, content, python=False, 
forcespace=False):
+@staticmethod
+def genfunction(outlines, funcname, content, python=False, 
forcespace=False):
 if python:
 prefix = 'python '
 else:
@@ -460,8 +461,8 @@ def create_recipe(args):
 
 if pkgfile:
 if pkgfile.endswith(('.deb', '.ipk')):
-stdout, _ = bb.process.run('ar x %s control.tar.gz' % 
pkgfile, cwd=tmpfdir)
-stdout, _ = bb.process.run('tar xf control.tar.gz 
./control', cwd=tmpfdir)
+stdout, _ = bb.process.run('ar x %s' % pkgfile, 
cwd=tmpfdir)
+stdout, _ = bb.process.run('tar xf control.tar.gz', 
cwd=tmpfdir)
 values = convert_debian(tmpfdir)
 extravalues.update(values)
 elif pkgfile.endswith(('.rpm', '.srpm')):
@@ -722,6 +723,15 @@ def create_recipe(args):
 if not bbclassextend:
 lines_after.append('BBCLASSEXTEND = "native"')
 
+postinst = ("postinst", extravalues.pop('postinst', None))
+postrm = ("postrm", extravalues.pop('postrm', None))
+preinst = ("preinst", extravalues.pop('preinst', None))
+prerm = ("prerm", extravalues.pop('prerm', None))
+funcs = [postinst, postrm, preinst, prerm]
+for func in funcs:
+if func[1]:
+RecipeHandler.genfunction(lines_after, 'pkg_%s_${PN}' % func[0], 
func[1])
+
 outlines = []
 outlines.extend(lines_before)
 if classes:
@@ -1058,6 +1068,25 @@ def convert_debian(debpath):
 varname = value_map.get(key, None)
 if varname:
 values[varname] = value
+postinst = os.path.join(debpath, 'postinst')
+postrm = os.path.join(debpath, 'postrm')
+preinst = os.path.join(debpath, 'preinst')
+prerm = os.path.join(debpath, 'prerm')
+sfiles = [postinst, postrm, preinst, prerm]
+for sfile in sfiles:
+if os.path.isfile(sfile):
+logger.info("Converting %s file to recipe function..." %
+os.path.basename(sfile).upper())
+content = []
+with open(sfile) as f:
+for line in f:
+if "#!/" in line:
+continue
+line = line.rstrip("\n")
+if line.strip():
+content.append(line)
+if content:
+values[os.path.basename(f.name)] = content
 
 #if depends:
 #values['DEPENDS'] = ' '.join(depends)
-- 
2.10.2

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


[OE-core] [PATCH 00/45] Morty: Patch set review

2016-11-15 Thread Armin Kuster
Sending cover leter only:

I have pulled together a set of patches which seem to be appropriate for Morty.
Please review to see if a commit is inappropriate or missing.


The following changes since commit 6c9f6b5f70ab3ee194b2c2c6f3bd462c994848fa:

  bitbake: toaster: buildinfohelper Handle regex paths (2016-11-03 17:41:15 
+)

are available in the git repository at:

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

Alexander Kanavin (8):
  lttng-tools: do not install shared libraries in ptest package
  gnome-desktop3: fix dependencies
  webkitgtk: remove lib_package inherit as executables are now installed
in libexecdir
  rt-tests: fix the recipe version to match upstream
  epiphany: remove unnecessary libwnck3 dependency
  libwnck3: remove the recipe
  libarchive: update to 3.2.2
  valgrind: update to 3.12.0

Andre McCurdy (1):
  gdb: update 7.11+git1a982b689c -> 7.11.1

André Draszik (2):
  boost: disable 'wave' in MIPS16e mode
  bash_3.2.x: update recipe version to match what we're shipping

Armin Kuster (2):
  tzcode-native: update to 2016h
  tzdata: Update to 2016h

Chen Qi (2):
  rpm: fix file location of rpm2cpio.real
  systemd: CVE-2016-7795

Dengke Du (1):
  subversion: fix "svnadmin create" fail on x86

Dmitry Rozhkov (1):
  openssl: rehash actual mozilla certificates inside rootfs

George McCollister (1):
  uboot-sign: fix do_concat_dtb for .img, .rom

Juro Bystricky (1):
  build-appliance-image: Fix incorrect PATH

Kai Kang (2):
  qemu: supplementary fix of CVE-2016-5403
  qemu: fix CVE-2016-7423 and CVE-2016-7908

Khem Raj (1):
  binutils-2.27: Fix linker segfaults when linking binary files

Lukasz Nowak (1):
  connman: fix bad file descriptor initialisation

Markus Lehtonen (1):
  python: fix python-tests rdepends

Mike Looijmans (1):
  busybox/mdev.conf: Ignore eMMC RPMB and boot block devices

Olaf Mandel (1):
  texi2html: Allow compiling out-of-source

Paul Eggleton (5):
  classes/license: fix handling of symlinks pointed to in
LIC_FILES_CHKSUM
  classes/populate_sdk_base: fix usage of & character in SDK_TITLE
  classes/nativesdk: set SDK_OLDEST_KERNEL appropriately
  oe-setup-builddir: fix TEMPLATECONF error message
  classes/populate_sdk_ext: prevent invalid TEMPLATECONF entering eSDK

Robert P. J. Day (2):
  testsdk.bbclass: Clean up comments, clarify image choices.
  oe-pkgdata-util: Use standard verb form in help info.

Robert Yang (2):
  oe/copy_buildsystem.py: dereference symlink
  insane.bbclass:buildpaths: open() file with 'rb'

Ross Burton (4):
  slang: add PREMIRRORS to handle upstream moving tarballs
  slang: clean up options and dependencies
  util-linux: add su.1 to update-alternatives
  shadow: add nologin.8 to alternatives

Samuli Piippo (1):
  package_manager.py: correctly remove all dependent packages

Yi Zhao (5):
  tiff: Security fix CVE-2016-3945
  tiff: Security fix CVE-2016-3990
  tiff: Security fix CVE-2016-3991
  tiff: Security fix CVE-2016-3623
  tiff: Security fix CVE-2016-3622

 meta/classes/insane.bbclass|   4 +-
 meta/classes/license.bbclass   |   2 +
 meta/classes/nativesdk.bbclass |   2 +
 meta/classes/populate_sdk_base.bbclass |   7 +-
 meta/classes/populate_sdk_ext.bbclass  |   6 +-
 meta/classes/testsdk.bbclass   |  14 +-
 meta/classes/uboot-sign.bbclass|   4 +-
 meta/conf/bitbake.conf |   5 +
 meta/conf/machine-sdk/i586.conf|   1 +
 meta/conf/machine-sdk/i686.conf|   1 +
 meta/conf/machine-sdk/x86_64.conf  |   1 +
 meta/lib/oe/copy_buildsystem.py|   6 +-
 meta/lib/oe/package_manager.py |   2 +-
 ...ts-Fix-bad-file-descriptor-initialisation.patch | 102 ++
 meta/recipes-connectivity/connman/connman_1.33.bb  |   1 +
 .../openssl/openssl/openssl-c_rehash.sh|  20 ++-
 meta/recipes-core/busybox/files/mdev.conf  |   2 +
 .../images/build-appliance-image_15.0.0.bb |   2 +-
 .../systemd/systemd/CVE-2016-7795.patch|  69 ++
 meta/recipes-core/systemd/systemd_230.bb   |   1 +
 meta/recipes-core/util-linux/util-linux.inc|   8 +-
 meta/recipes-devtools/binutils/binutils-2.27.inc   |   1 +
 ...lt-in-ARM-linker-when-trying-to-parse-a-b.patch |  31 +
 meta/recipes-devtools/gdb/gdb-7.11.1.inc   |  22 +++
 meta/recipes-devtools/gdb/gdb-7.11.inc |   9 --
 meta/recipes-devtools/gdb/gdb-common.inc   |  24 
 ...nadian_7.11.bb => gdb-cross-canadian_7.11.1.bb} |   0
 .../gdb/{gdb-cross_7.11.bb => gdb-cross_7.11.1.bb} |   0
 .../gdb/{gdb_7.11.bb => gdb_7.11.1.bb} |   0
 .../python/python-2.7-manifest.inc |   2 +-
 ...0001-virtio-zero-vq-inuse-in-virtio_reset.patch |  57 
 

[OE-core] [PATCH v2] oe-tests: Migrate tests from /oe/test to /oeqa/selftest/oe-tests

2016-11-15 Thread jose . perez . carranza
From: Jose Perez Carranza 

Currently the unittests for scripts on meta/lib/oe/tests are not being
executed by any suite hence the best option is migrate them to
meta/lib/oeqa/selftest/oelib-tests to be executed along with the selftest suite.

[YOCTO #7376]

Signed-off-by: Jose Perez Carranza 
---
 meta/lib/oe/tests/__init__.py  |  0
 meta/lib/oe/tests/test_elf.py  | 21 --
 meta/lib/oe/tests/test_license.py  | 68 ---
 meta/lib/oe/tests/test_path.py | 89 -
 meta/lib/oe/tests/test_types.py| 62 --
 meta/lib/oe/tests/test_utils.py| 51 ---
 meta/lib/oeqa/selftest/oelib-tests/__init__.py |  0
 meta/lib/oeqa/selftest/oelib-tests/elf.py  | 22 +++
 meta/lib/oeqa/selftest/oelib-tests/license.py  | 69 
 meta/lib/oeqa/selftest/oelib-tests/path.py | 90 ++
 meta/lib/oeqa/selftest/oelib-tests/types.py| 61 +
 meta/lib/oeqa/selftest/oelib-tests/utils.py| 52 +++
 12 files changed, 294 insertions(+), 291 deletions(-)
 delete mode 100644 meta/lib/oe/tests/__init__.py
 delete mode 100644 meta/lib/oe/tests/test_elf.py
 delete mode 100644 meta/lib/oe/tests/test_license.py
 delete mode 100644 meta/lib/oe/tests/test_path.py
 delete mode 100644 meta/lib/oe/tests/test_types.py
 delete mode 100644 meta/lib/oe/tests/test_utils.py
 create mode 100644 meta/lib/oeqa/selftest/oelib-tests/__init__.py
 create mode 100644 meta/lib/oeqa/selftest/oelib-tests/elf.py
 create mode 100644 meta/lib/oeqa/selftest/oelib-tests/license.py
 create mode 100644 meta/lib/oeqa/selftest/oelib-tests/path.py
 create mode 100644 meta/lib/oeqa/selftest/oelib-tests/types.py
 create mode 100644 meta/lib/oeqa/selftest/oelib-tests/utils.py

diff --git a/meta/lib/oe/tests/__init__.py b/meta/lib/oe/tests/__init__.py
deleted file mode 100644
index e69de29..000
diff --git a/meta/lib/oe/tests/test_elf.py b/meta/lib/oe/tests/test_elf.py
deleted file mode 100644
index 1f59037..000
--- a/meta/lib/oe/tests/test_elf.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import unittest
-import oe.qa
-
-class TestElf(unittest.TestCase):
-def test_machine_name(self):
-"""
-Test elf_machine_to_string()
-"""
-self.assertEqual(oe.qa.elf_machine_to_string(0x02), "SPARC")
-self.assertEqual(oe.qa.elf_machine_to_string(0x03), "x86")
-self.assertEqual(oe.qa.elf_machine_to_string(0x08), "MIPS")
-self.assertEqual(oe.qa.elf_machine_to_string(0x14), "PowerPC")
-self.assertEqual(oe.qa.elf_machine_to_string(0x28), "ARM")
-self.assertEqual(oe.qa.elf_machine_to_string(0x2A), "SuperH")
-self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
-self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
-self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
-
-self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)")
-self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown 
(3735928559)")
-self.assertEqual(oe.qa.elf_machine_to_string("foobar"), "Unknown 
('foobar')")
diff --git a/meta/lib/oe/tests/test_license.py 
b/meta/lib/oe/tests/test_license.py
deleted file mode 100644
index c36..000
--- a/meta/lib/oe/tests/test_license.py
+++ /dev/null
@@ -1,68 +0,0 @@
-import unittest
-import oe.license
-
-class SeenVisitor(oe.license.LicenseVisitor):
-def __init__(self):
-self.seen = []
-oe.license.LicenseVisitor.__init__(self)
-
-def visit_Str(self, node):
-self.seen.append(node.s)
-
-class TestSingleLicense(unittest.TestCase):
-licenses = [
-"GPLv2",
-"LGPL-2.0",
-"Artistic",
-"MIT",
-"GPLv3+",
-"FOO_BAR",
-]
-invalid_licenses = ["GPL/BSD"]
-
-@staticmethod
-def parse(licensestr):
-visitor = SeenVisitor()
-visitor.visit_string(licensestr)
-return visitor.seen
-
-def test_single_licenses(self):
-for license in self.licenses:
-licenses = self.parse(license)
-self.assertListEqual(licenses, [license])
-
-def test_invalid_licenses(self):
-for license in self.invalid_licenses:
-with self.assertRaises(oe.license.InvalidLicense) as cm:
-self.parse(license)
-self.assertEqual(cm.exception.license, license)
-
-class TestSimpleCombinations(unittest.TestCase):
-tests = {
-"FOO": ["FOO", "BAR"],
-"BAZ & MOO": ["BAZ", "MOO"],
-"ALPHA|BETA": ["ALPHA"],
-"BAZ|FOO": ["FOO"],
-"FOO|BAZ": ["FOO", "BAR"],
-}
-preferred = ["ALPHA", "FOO", "BAR"]
-
-def test_tests(self):
-def choose(a, b):
-if all(lic in self.preferred for lic in b):
-return b
-  

[OE-core] [PATCH v2] libdbus-c++: added recipe for it

2016-11-15 Thread Thilo Cestonaro
From: Thilo Cestonaro 

to fix the build, two patches where needed.

One which just adds an include of unistd.h, as the functions pipe, write and
close defined by this include, weren't defined.

The other patch enables the build to build the tools of libdbus-c++ for the
target, which, without the patch, will always be build for the host, even when
cross compiling.

Signed-off-by: Thilo Cestonaro 
---
 .../fix-missing-unistd.h-include.patch | 12 +++
 .../remove-CXX_FOR_BUILD-stuff.patch   | 24 ++
 meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb | 24 ++
 3 files changed, 60 insertions(+)
 create mode 100644 
meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
 create mode 100644 
meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
 create mode 100644 meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb

changelog:
v2:
Stripped down the remove-CXX_FOR_BUILD-stuff patch, as Ross said, to only
include configure.ac and the tools/Makefile.am
Added description about the patches in the commit.
Patch goes into meta-oe of meta-openembedded.

diff --git 
a/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
 
b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
new file mode 100644
index 000..5cb8096
--- /dev/null
+++ 
b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
@@ -0,0 +1,12 @@
+diff --git a/include/dbus-c++/eventloop-integration.h 
b/include/dbus-c++/eventloop-integration.h
+index 1b0302e..3e44304 100644
+--- a/include/dbus-c++/eventloop-integration.h
 b/include/dbus-c++/eventloop-integration.h
+@@ -26,6 +26,7 @@
+ #define __DBUSXX_EVENTLOOP_INTEGRATION_H
+ 
+ #include 
++#include 
+ #include "api.h"
+ #include "dispatcher.h"
+ #include "util.h"
diff --git 
a/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch 
b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
new file mode 100644
index 000..906470a
--- /dev/null
+++ 
b/meta-oe/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
@@ -0,0 +1,24 @@
+diff -Naur libdbus-c++-0.9.0.ori/configure.ac libdbus-c++-0.9.0/configure.ac
+--- libdbus-c++-0.9.0.ori/configure.ac 2016-11-15 14:25:36.085882774 +0100
 libdbus-c++-0.9.0/configure.ac 2016-11-15 14:27:08.814568717 +0100
+@@ -64,9 +64,6 @@
+ AC_PROG_CC
+ AC_PROG_CXX
+ 
+-CXX_FOR_BUILD=${CXX_FOR_BUILD-${CXX}}
+-AC_SUBST(CXX_FOR_BUILD)
+-
+ AM_PROG_LIBTOOL
+ 
+ PKG_PROG_PKG_CONFIG
+diff -Naur libdbus-c++-0.9.0.ori/tools/Makefile.am 
libdbus-c++-0.9.0/tools/Makefile.am
+--- libdbus-c++-0.9.0.ori/tools/Makefile.am2016-11-15 14:25:36.089882803 
+0100
 libdbus-c++-0.9.0/tools/Makefile.am2016-11-15 14:26:19.454203583 
+0100
+@@ -1,7 +1,5 @@
+ # hacky, but ...
+ 
+-CXX = $(CXX_FOR_BUILD)
+-
+ AM_CPPFLAGS = \
+   $(dbus_CFLAGS) \
+   $(xml_CFLAGS) \
diff --git a/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb 
b/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb
new file mode 100644
index 000..7edaffc
--- /dev/null
+++ b/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb
@@ -0,0 +1,24 @@
+SUMMARY = "DBus-C++ Library"
+DESCRIPTION = "DBus-c++ attempts to provide a C++ API for D-BUS. The library 
has a glib and an Ecore mainloop integration. It also offers an optional own 
main loop."
+HOMEPAGE = "http://dbus-cplusplus.sourceforge.net;
+SECTION = "base"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+DEPENDS = "dbus glib-2.0 libpcre"
+
+SRC_URI = 
"${SOURCEFORGE_MIRROR}/project/dbus-cplusplus/dbus-c++/${PV}/${BPN}-${PV}.tar.gz
 \
+  file://fix-missing-unistd.h-include.patch \
+  file://remove-CXX_FOR_BUILD-stuff.patch"
+SRC_URI[md5sum] = "e752116f523fa88ef041e63d3dee4de2"
+SRC_URI[sha256sum] = 
"bc11ac297b3cb010be904c72789695543ee3fdf3d75cdc8225fd371385af4e61"
+
+EXTRA_OECONF = "--disable-ecore --disable-examples --disable-tests"
+
+inherit autotools pkgconfig
+
+PACKAGES += "${PN}-tools"
+
+FILES_${PN} = "${libdir}"
+FILES_${PN}-tools = "${bindir}"
+
+BBCLASSEXTEND = "native"
-- 
2.10.2

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


Re: [OE-core] [PATCH] added recipe for libdbus-c++

2016-11-15 Thread thilo.ceston...@ts.fujitsu.com
Am Dienstag, den 15.11.2016, 14:23 + schrieb Burton, Ross:
> 
> On 15 November 2016 at 13:46, Thilo Cestonaro 
>  wrote:
> > Signed-off-by: Thilo Cestonaro 
> > 
> 
> As Alex said, please submit this to meta-oe as there's no strong rationale to 
> keep it in oe-core, especially considering it's abandoned.
> 
> The remove_CXX_FOR_BUILD-stuff patch can be trimmed to just modify 
> configure.ac and tools/Makefile.am, the other files will be regenerated at 
> do_configure and patching them can cause conflicts if
> upstream ever makes a new release.
> 
> Also please explain clearly why that has to be removed in the patch header 
> because usually we need to patch *in* the _FOR_BUILD macros: I was curious 
> and ended up looking at the build to understand
> why. AFAICT it's because upstream if cross-compiling it refuses to build 
> target tools and will only build host tools so the test suite can run, but 
> disabling the tests and patching out CXX_FOR_BUILD
> we can build target tools.  The downside is that we have no test suite, which 
> is useful (see the ptest class).

Perhaps I will add ptest in another patch later. Will need to look into it.
Thanks for your comments!

> 
> Thank you for being the first person in a long time to actually submit the 
> recipe to the community!
> 
> Ross

smime.p7s
Description: S/MIME cryptographic signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH V3] subprocess: remove strings and migrate to direct arrays

2016-11-15 Thread Christopher Larson
On Tue, Nov 15, 2016 at 7:28 AM, Stephano Cetola <
stephano.cet...@linux.intel.com> wrote:

> When using subprocess call and check_output, it is better to use arrays
> rather than strings when possible to avoid whitespace and quoting
> problems.
>
> [ YOCTO #9342 ]
>
> Signed-off-by: Stephano Cetola 
>

The commi message summary isn’t prefixed the way the OE commit message
guidelines indicate.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] package.bbclass: allow using EXCLUDE_FROM_SHLIBS for subpackages

2016-11-15 Thread Andrii Bordunov

Ping-2. Guys? Anything?


Thank you,
Andrii

On 19.10.16 16:58, Andrii Bordunov wrote:

Ping? Any comments?



Thank you,
Andrii

On 10.10.16 20:02, Andrii Bordunov wrote:

Some packages containing shared libraries might be registered
as shlib providers when they shouldn't (for example, the lib is for
their private use and must not generate any dependency).

EXCLUDE_FROM_SHLIBS is targeted at that, but it could be set
for entire recipe only.

This patch expands EXCLUDE_FROM_SHLIBS usage, so now it's possible
to set it in a style similar with RDEPENDS. For example:
 EXCLUDE_FROM_SHLIBS_${PN}-ptest = "1"

Signed-off-by: Andrii Bordunov 
---
 meta/classes/package.bbclass | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index a6f0a7a..9bf43dc 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1499,6 +1499,14 @@ python package_do_shlibs() {
 libdir_re = re.compile(".*/%s$" % d.getVar('baselib', True))

 packages = d.getVar('PACKAGES', True)
+
+shlib_pkgs = []
+for pkg in packages.split():
+if d.getVar('EXCLUDE_FROM_SHLIBS_' + pkg, 0):
+bb.note("not generating shlibs for %s" % pkg)
+else:
+shlib_pkgs.append(pkg)
+
 targetos = d.getVar('TARGET_OS', True)

 workdir = d.getVar('WORKDIR', True)
@@ -1614,7 +1622,7 @@ python package_do_shlibs() {
 needed = {}
 shlib_provider = oe.package.read_shlib_providers(d)

-for pkg in packages.split():
+for pkg in shlib_pkgs:
 private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or
d.getVar('PRIVATE_LIBS', True) or ""
 private_libs = private_libs.split()
 needs_ldconfig = False
@@ -1684,7 +1692,7 @@ python package_do_shlibs() {

 libsearchpath = [d.getVar('libdir', True),
d.getVar('base_libdir', True)]

-for pkg in packages.split():
+for pkg in shlib_pkgs:
 bb.debug(2, "calculating shlib requirements for %s" % pkg)

 deps = list()


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


[OE-core] [PATCH V3] Cleanup subprocess calls

2016-11-15 Thread Stephano Cetola
Changed since V2:
Fixed rpm "remove" function, changing strings to arrays.
This fixes the error when using "read-only-rootfs" image feature.

Stephano Cetola (1):
  subprocess: remove strings and migrate to direct arrays

 meta/lib/oe/package.py |  13 +--
 meta/lib/oe/package_manager.py | 229 -
 2 files changed, 118 insertions(+), 124 deletions(-)

-- 
2.10.2

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


Re: [OE-core] [PATCH] added recipe for libdbus-c++

2016-11-15 Thread Burton, Ross
On 15 November 2016 at 13:46, Thilo Cestonaro <
thilo.ceston...@ts.fujitsu.com> wrote:

> Signed-off-by: Thilo Cestonaro 
>

As Alex said, please submit this to meta-oe as there's no strong rationale
to keep it in oe-core, especially considering it's abandoned.

The remove_CXX_FOR_BUILD-stuff patch can be trimmed to just modify
configure.ac and tools/Makefile.am, the other files will be regenerated at
do_configure and patching them can cause conflicts if upstream ever makes a
new release.

Also please explain clearly why that has to be removed in the patch header
because usually we need to patch *in* the _FOR_BUILD macros: I was curious
and ended up looking at the build to understand why. AFAICT it's because
upstream if cross-compiling it refuses to build target tools and will only
build host tools so the test suite can run, but disabling the tests and
patching out CXX_FOR_BUILD we can build target tools.  The downside is that
we have no test suite, which is useful (see the ptest class).

Thank you for being the first person in a long time to actually submit the
recipe to the community!

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


[OE-core] [PATCH V3] subprocess: remove strings and migrate to direct arrays

2016-11-15 Thread Stephano Cetola
When using subprocess call and check_output, it is better to use arrays
rather than strings when possible to avoid whitespace and quoting
problems.

[ YOCTO #9342 ]

Signed-off-by: Stephano Cetola 
---
 meta/lib/oe/package.py |  13 +--
 meta/lib/oe/package_manager.py | 229 -
 2 files changed, 118 insertions(+), 124 deletions(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 02642f2..ae60a58 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -18,23 +18,24 @@ def runstrip(arg):
 newmode = origmode | stat.S_IWRITE | stat.S_IREAD
 os.chmod(file, newmode)
 
-extraflags = ""
+stripcmd = [strip]
 
 # kernel module
 if elftype & 16:
-extraflags = "--strip-debug --remove-section=.comment 
--remove-section=.note --preserve-dates"
+stripcmd.extend(["--strip-debug", "--remove-section=.comment",
+"--remove-section=.note", "--preserve-dates"])
 # .so and shared library
 elif ".so" in file and elftype & 8:
-extraflags = "--remove-section=.comment --remove-section=.note 
--strip-unneeded"
+stripcmd.extend(["--remove-section=.comment", 
"--remove-section=.note", "--strip-unneeded"])
 # shared or executable:
 elif elftype & 8 or elftype & 4:
-extraflags = "--remove-section=.comment --remove-section=.note"
+stripcmd.extend(["--remove-section=.comment", 
"--remove-section=.note"])
 
-stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+stripcmd.append(file)
 bb.debug(1, "runstrip: %s" % stripcmd)
 
 try:
-output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT, 
shell=True)
+output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
 except subprocess.CalledProcessError as e:
 bb.error("runstrip: '%s' strip command failed with %s (%s)" % 
(stripcmd, e.returncode, e.output))
 
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index a9d216a..5fbfa7a 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -358,12 +358,11 @@ class RpmPkgsList(PkgsList):
 RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, 
os_var)
 
 # Determine rpm version
-cmd = "%s --version" % self.rpm_cmd
 try:
-output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, 
shell=True).decode("utf-8")
+output = subprocess.check_output([self.rpm_cmd, "--version"], 
stderr=subprocess.STDOUT).decode("utf-8")
 except subprocess.CalledProcessError as e:
 bb.fatal("Getting rpm version failed. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, 
e.output.decode("utf-8")))
+ "returned %d:\n%s" % (self.rpm_cmd, e.returncode, 
e.output.decode("utf-8")))
 
 '''
 Translate the RPM/Smart format names to the OE multilib format names
@@ -412,16 +411,15 @@ class RpmPkgsList(PkgsList):
 return output
 
 def list_pkgs(self):
-cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
-cmd += ' -D "_dbpath /var/lib/rpm" -qa'
-cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
+cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
+cmd.extend(['-D', '_dbpath /var/lib/rpm'])
+cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION} 
%{PACKAGEORIGIN}\n]'])
 
 try:
-# bb.note(cmd)
-tmp_output = subprocess.check_output(cmd, 
stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
+tmp_output = subprocess.check_output(cmd, 
stderr=subprocess.STDOUT).strip().decode("utf-8")
 except subprocess.CalledProcessError as e:
 bb.fatal("Cannot get the installed packages list. Command '%s' "
- "returned %d:\n%s" % (cmd, e.returncode, 
e.output.decode("utf-8")))
+ "returned %d:\n%s" % (' '.join(cmd), e.returncode, 
e.output.decode("utf-8")))
 
 output = dict()
 deps = dict()
@@ -672,11 +670,11 @@ class RpmPM(PackageManager):
 # 2 = --log-level=debug
 # 3 = --log-level=debug plus dumps of scriplet content and command 
invocation
 self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG', True) or "0")
-self.smart_opt = "--log-level=%s --data-dir=%s" % \
+self.smart_opt = ["--log-level=%s" %
  ("warning" if self.debug_level == 0 else
   "info" if self.debug_level == 1 else
-  "debug",
-  os.path.join(target_rootfs, 'var/lib/smart'))
+  "debug"), "--data-dir=%s" %
+  os.path.join(target_rootfs, 'var/lib/smart')]
 self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
 self.solution_manifest = 

Re: [OE-core] [PATCH] added recipe for libdbus-c++

2016-11-15 Thread Alexander Kanavin

On 11/15/2016 03:46 PM, Thilo Cestonaro wrote:

Signed-off-by: Thilo Cestonaro 
---
 .../fix-missing-unistd.h-include.patch |  12 +
 .../remove-CXX_FOR_BUILD-stuff.patch   | 257 +
 meta/recipes-core/dbus/libdbus-c++_0.9.0.bb|  24 ++


The whole thing should go to meta-openembedded (mailing list 
openembedded-devel). Patches are missing description of what they are 
for, and Upstream-Status, and Signed-off-by lines. Follow this please:


http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

Alex

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


[OE-core] [PATCH] added recipe for libdbus-c++

2016-11-15 Thread Thilo Cestonaro
Signed-off-by: Thilo Cestonaro 
---
 .../fix-missing-unistd.h-include.patch |  12 +
 .../remove-CXX_FOR_BUILD-stuff.patch   | 257 +
 meta/recipes-core/dbus/libdbus-c++_0.9.0.bb|  24 ++
 3 files changed, 293 insertions(+)
 create mode 100644 
meta/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
 create mode 100644 
meta/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
 create mode 100644 meta/recipes-core/dbus/libdbus-c++_0.9.0.bb

diff --git 
a/meta/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch 
b/meta/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
new file mode 100644
index 000..5cb8096
--- /dev/null
+++ 
b/meta/recipes-core/dbus/libdbus-c++-0.9.0/fix-missing-unistd.h-include.patch
@@ -0,0 +1,12 @@
+diff --git a/include/dbus-c++/eventloop-integration.h 
b/include/dbus-c++/eventloop-integration.h
+index 1b0302e..3e44304 100644
+--- a/include/dbus-c++/eventloop-integration.h
 b/include/dbus-c++/eventloop-integration.h
+@@ -26,6 +26,7 @@
+ #define __DBUSXX_EVENTLOOP_INTEGRATION_H
+ 
+ #include 
++#include 
+ #include "api.h"
+ #include "dispatcher.h"
+ #include "util.h"
diff --git 
a/meta/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch 
b/meta/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
new file mode 100644
index 000..af87174
--- /dev/null
+++ b/meta/recipes-core/dbus/libdbus-c++-0.9.0/remove-CXX_FOR_BUILD-stuff.patch
@@ -0,0 +1,257 @@
+diff -Naur libdbus-c++-0.9.0.ori/configure libdbus-c++-0.9.0/configure
+--- libdbus-c++-0.9.0.ori/configure2016-11-15 14:25:36.085882774 +0100
 libdbus-c++-0.9.0/configure2016-11-15 14:27:55.402913346 +0100
+@@ -800,7 +800,6 @@
+ GREP
+ SED
+ LIBTOOL
+-CXX_FOR_BUILD
+ am__fastdepCXX_FALSE
+ am__fastdepCXX_TRUE
+ CXXDEPMODE
+@@ -5233,8 +5232,6 @@
+ 
+ 
+ 
+-CXX_FOR_BUILD=${CXX_FOR_BUILD-${CXX}}
+-
+ 
+ case `pwd` in
+   *\ * | *\   *)
+diff -Naur libdbus-c++-0.9.0.ori/configure.ac libdbus-c++-0.9.0/configure.ac
+--- libdbus-c++-0.9.0.ori/configure.ac 2016-11-15 14:25:36.085882774 +0100
 libdbus-c++-0.9.0/configure.ac 2016-11-15 14:27:08.814568717 +0100
+@@ -64,9 +64,6 @@
+ AC_PROG_CC
+ AC_PROG_CXX
+ 
+-CXX_FOR_BUILD=${CXX_FOR_BUILD-${CXX}}
+-AC_SUBST(CXX_FOR_BUILD)
+-
+ AM_PROG_LIBTOOL
+ 
+ PKG_PROG_PKG_CONFIG
+diff -Naur libdbus-c++-0.9.0.ori/data/Makefile.in 
libdbus-c++-0.9.0/data/Makefile.in
+--- libdbus-c++-0.9.0.ori/data/Makefile.in 2016-11-15 14:25:36.085882774 
+0100
 libdbus-c++-0.9.0/data/Makefile.in 2016-11-15 14:26:59.746501637 +0100
+@@ -66,7 +66,6 @@
+ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+-CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
+diff -Naur libdbus-c++-0.9.0.ori/doc/Makefile.in 
libdbus-c++-0.9.0/doc/Makefile.in
+--- libdbus-c++-0.9.0.ori/doc/Makefile.in  2016-11-15 14:25:36.085882774 
+0100
 libdbus-c++-0.9.0/doc/Makefile.in  2016-11-15 14:27:33.790753474 +0100
+@@ -67,7 +67,6 @@
+ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+-CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
+diff -Naur libdbus-c++-0.9.0.ori/examples/echo/Makefile.in 
libdbus-c++-0.9.0/examples/echo/Makefile.in
+--- libdbus-c++-0.9.0.ori/examples/echo/Makefile.in2016-11-15 
14:25:36.089882803 +0100
 libdbus-c++-0.9.0/examples/echo/Makefile.in2016-11-15 
14:26:28.722272141 +0100
+@@ -105,7 +105,6 @@
+ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+-CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
+diff -Naur libdbus-c++-0.9.0.ori/examples/echo_ecore/Makefile.in 
libdbus-c++-0.9.0/examples/echo_ecore/Makefile.in
+--- libdbus-c++-0.9.0.ori/examples/echo_ecore/Makefile.in  2016-11-15 
14:25:36.089882803 +0100
 libdbus-c++-0.9.0/examples/echo_ecore/Makefile.in  2016-11-15 
14:26:41.446366266 +0100
+@@ -110,7 +110,6 @@
+ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+-CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
+diff -Naur libdbus-c++-0.9.0.ori/examples/ecore/Makefile.in 
libdbus-c++-0.9.0/examples/ecore/Makefile.in
+--- libdbus-c++-0.9.0.ori/examples/ecore/Makefile.in   2016-11-15 
14:25:36.089882803 +0100
 libdbus-c++-0.9.0/examples/ecore/Makefile.in   2016-11-15 
14:26:37.074333925 +0100
+@@ -100,7 +100,6 @@
+ CXXCPP = @CXXCPP@
+ CXXDEPMODE = @CXXDEPMODE@
+ CXXFLAGS = @CXXFLAGS@
+-CXX_FOR_BUILD = @CXX_FOR_BUILD@
+ CYGPATH_W = @CYGPATH_W@
+ DEFS = @DEFS@
+ DEPDIR = @DEPDIR@
+diff -Naur libdbus-c++-0.9.0.ori/examples/glib/Makefile.in 
libdbus-c++-0.9.0/examples/glib/Makefile.in
+--- libdbus-c++-0.9.0.ori/examples/glib/Makefile.in2016-11-15 
14:25:36.089882803 +0100
 

[OE-core] [PATCH 1/2] xserver-nodm-init: Bump PV to ensure upgrade from 2.0

2016-11-15 Thread Jussi Kukkonen
meta-oe provides a 2.0 version of this recipe, but this one now
does everything the meta-oe version does.

There's one exception though: xserver-common is not a runtime
dependency. This needs to be added elsewhere for the platforms that
require it.

Signed-off-by: Jussi Kukkonen 
---
 .../x11-common/{xserver-nodm-init.bb => xserver-nodm-init_3.0.bb} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename meta/recipes-graphics/x11-common/{xserver-nodm-init.bb => 
xserver-nodm-init_3.0.bb} (100%)

diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb 
b/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
similarity index 100%
rename from meta/recipes-graphics/x11-common/xserver-nodm-init.bb
rename to meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
-- 
2.1.4

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


[OE-core] [PATCH 2/2] x11-common: Merge into xserver-nodm-init

2016-11-15 Thread Jussi Kukkonen
Move the (non-factual) x utils dependencies from x11-common to
x11 packagegroup.

Remove some obsolete configuration from x11-common:
 * Xsession.d/12keymap.sh: commented out xmodmap call for kdrive
 * default.xmodmap: xmodmap file used by 12keymap.sh
 * Xdefaults: rxvt configuration

At this point x11-common is just /etc/X11/Xsession and three
non-intrusive Xsession scripts: make these explicitly part of
xserver-nodm-init. RCONFLICT with the versions of xserver-common
that also provide these files.

VIRTUAL-RUNTIME_xserver_common is no longer a real abstraction but
preserve the setting for backwards compatibility (if the variable
is set to "xserver-common", the right thing still happens).

Signed-off-by: Jussi Kukkonen 
---
 meta/conf/distro/include/distro_alias.inc  |   1 -
 .../packagegroups/packagegroup-core-x11.bb |   9 +-
 .../x11-common/x11-common/etc/X11/Xdefaults|   3 -
 .../x11-common/etc/X11/Xsession.d/12keymap.sh  |   4 -
 .../x11-common/x11-common/etc/X11/default.xmodmap  | 260 ---
 .../x11-common/x11-common/gplv2-license.patch  | 355 -
 meta/recipes-graphics/x11-common/x11-common_0.1.bb |  22 --
 .../etc => xserver-nodm-init}/X11/Xsession |   0
 .../X11/Xsession.d/13xdgbasedirs.sh|   0
 .../X11/Xsession.d/89xdgautostart.sh   |   0
 .../X11/Xsession.d/90XWindowManager.sh |   0
 .../x11-common/xserver-nodm-init_3.0.bb|   5 +
 12 files changed, 11 insertions(+), 648 deletions(-)
 delete mode 100644 
meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults
 delete mode 100644 
meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh
 delete mode 100644 
meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap
 delete mode 100644 
meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch
 delete mode 100644 meta/recipes-graphics/x11-common/x11-common_0.1.bb
 rename meta/recipes-graphics/x11-common/{x11-common/etc => 
xserver-nodm-init}/X11/Xsession (100%)
 rename meta/recipes-graphics/x11-common/{x11-common/etc => 
xserver-nodm-init}/X11/Xsession.d/13xdgbasedirs.sh (100%)
 rename meta/recipes-graphics/x11-common/{x11-common/etc => 
xserver-nodm-init}/X11/Xsession.d/89xdgautostart.sh (100%)
 rename meta/recipes-graphics/x11-common/{x11-common/etc => 
xserver-nodm-init}/X11/Xsession.d/90XWindowManager.sh (100%)

diff --git a/meta/conf/distro/include/distro_alias.inc 
b/meta/conf/distro/include/distro_alias.inc
index 10efb09..a59265a 100644
--- a/meta/conf/distro/include/distro_alias.inc
+++ b/meta/conf/distro/include/distro_alias.inc
@@ -400,7 +400,6 @@ DISTRO_PN_ALIAS_pn-weston = "Fedora=weston OpenSuSE=weston"
 DISTRO_PN_ALIAS_pn-weston-init = "OE-Core"
 DISTRO_PN_ALIAS_pn-which = "Mandriva=which Fedora=which"
 DISTRO_PN_ALIAS_pn-wpa-supplicant = "Meego=wpa_supplicant 
Fedora=wpa_supplicant OpenSuSE=wpa_supplicant Ubuntu=wpasupplicant 
Mandriva=wpa_supplicant Debian=wpasupplicant"
-DISTRO_PN_ALIAS_pn-x11-common = "OE-Core"
 DISTRO_PN_ALIAS_pn-x11perf = "Fedora=xorg-x11-apps Ubuntu=x11-apps"
 DISTRO_PN_ALIAS_pn-xcb-util-image = "Debian=xcb-util Fedora=xcb-util"
 DISTRO_PN_ALIAS_pn-xcb-util-keysyms = "Debian=xcb-util Fedora=xcb-util"
diff --git a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb 
b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
index 4291424..001db9e 100644
--- a/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
+++ b/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
@@ -5,13 +5,12 @@
 PR = "r40"
 
 inherit packagegroup distro_features_check
-# rdepends on x11-common
 REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGES = "${PN} ${PN}-utils"
 
-# xserver-common, x11-common
-VIRTUAL-RUNTIME_xserver_common ?= "x11-common"
+# backwards compatibility for xserver-common
+VIRTUAL-RUNTIME_xserver_common ?= ""
 
 # elsa, xserver-nodm-init
 VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init"
@@ -30,4 +29,8 @@ RDEPENDS_${PN}-utils = "\
 xhost \
 xset \
 xrandr \
+xmodmap \
+xdpyinfo \
+xinput-calibrator \
+dbus-x11 \
 "
diff --git a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults 
b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults
deleted file mode 100644
index f5b69dd..000
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults
+++ /dev/null
@@ -1,3 +0,0 @@
-Rxvt*scrollBar_right: true
-Rxvt*font: xft:Mono:pixelsize=9
-
diff --git 
a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh 
b/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh
deleted file mode 100644
index a9d102c..000
--- a/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-# kdrive 1.4 does not have default keymap in server
-#xmodmap - 
-
-diff --git a/COPYING b/COPYING
-new file mode 100644
-index 

[OE-core] [PATCH 0/2] X initialization refactoring

2016-11-15 Thread Jussi Kukkonen
This set has a companion set on meta-oe, neither set makes much sense
without the other. Cover letters are identical. Please CC both lists
if needed.


Current state:
 * meta-oe and oe-core both provide xserver-nodm-init: the oe-core
   version should already do everything the meta-oe version does, but
   the meta-oe version gets selected by default because of layer
   priority.
 * meta-oe and oe-core provide xserver-common and x11-common:
   x11-common files are essentially a subset of xserver-common files.


Goals:
 * Adding meta-oe to bblayers alone should not modify X initialization
 * meta-oe and oe-core should not duplicate content without reason
 * xserver startup should still be modifiable from other layers
   (just not implicitly)


What was done to achieve those goals:
 * (oe-core) Removed old cruft from x11-common. What was left is
   Xsession and a few Xsession scripts.
 * (oe-core) Merged what's left of x11-common into xserver-nodm-init
 * (meta-oe) Removed xserver-nodm-init-2.0 as unneeded
 * (meta-oe) No longer install files in xserver-common that oe-core
   xserver-nodm-init installs


xserver-common now has to be explicitly installed if it is wanted.

There are multiple ways to solve these issues: I'm prepared to try
alternative approaches if needed. Testing results are appreciated
as well. 


Cheers,
 Jussi

The following changes since commit 43e652f3d1fee5ce7fad67e6400315eab1b34270:

  devtool: add "rename" subcommand (2016-11-07 11:04:22 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib jku/x-init-refactor
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=jku/x-init-refactor

Jussi Kukkonen (2):
  xserver-nodm-init: Bump PV to ensure upgrade from 2.0
  x11-common: Merge into xserver-nodm-init

 meta/conf/distro/include/distro_alias.inc  |   1 -
 .../packagegroups/packagegroup-core-x11.bb |   9 +-
 .../x11-common/x11-common/etc/X11/Xdefaults|   3 -
 .../x11-common/etc/X11/Xsession.d/12keymap.sh  |   4 -
 .../x11-common/x11-common/etc/X11/default.xmodmap  | 260 ---
 .../x11-common/x11-common/gplv2-license.patch  | 355 -
 meta/recipes-graphics/x11-common/x11-common_0.1.bb |  22 --
 .../etc => xserver-nodm-init}/X11/Xsession |   0
 .../X11/Xsession.d/13xdgbasedirs.sh|   0
 .../X11/Xsession.d/89xdgautostart.sh   |   0
 .../X11/Xsession.d/90XWindowManager.sh |   0
 ...erver-nodm-init.bb => xserver-nodm-init_3.0.bb} |   5 +
 12 files changed, 11 insertions(+), 648 deletions(-)
 delete mode 100644 
meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults
 delete mode 100644 
meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh
 delete mode 100644 
meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap
 delete mode 100644 
meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch
 delete mode 100644 meta/recipes-graphics/x11-common/x11-common_0.1.bb
 rename meta/recipes-graphics/x11-common/{x11-common/etc => 
xserver-nodm-init}/X11/Xsession (100%)
 rename meta/recipes-graphics/x11-common/{x11-common/etc => 
xserver-nodm-init}/X11/Xsession.d/13xdgbasedirs.sh (100%)
 rename meta/recipes-graphics/x11-common/{x11-common/etc => 
xserver-nodm-init}/X11/Xsession.d/89xdgautostart.sh (100%)
 rename meta/recipes-graphics/x11-common/{x11-common/etc => 
xserver-nodm-init}/X11/Xsession.d/90XWindowManager.sh (100%)
 rename meta/recipes-graphics/x11-common/{xserver-nodm-init.bb => 
xserver-nodm-init_3.0.bb} (89%)

-- 
2.1.4

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


Re: [OE-core] libdbus-c++

2016-11-15 Thread Burton, Ross
On 14 November 2016 at 13:33, thilo.ceston...@ts.fujitsu.com <
thilo.ceston...@ts.fujitsu.com> wrote:

> Yeah I propably can and will be if I need to write my own. But the funny
> thing is, that there ones was a meta-oe dbus-c++ recipe and this was
> removed with the comment, that it didn't work and it's
> better to use the one from oe-core :)
>

Just found this recipe in my WIP folder, no idea if it works but it's
probably a starting point:

$ cat dbus-cxx_0.8.0.bb
SUMMARY = "C++ bindings for dbus"
HOMEPAGE = "http://dbus-cxx.sourceforge.net/;
SECTION = "libs"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

DEPENDS = "dbus libsigc++-2.0 popt"

SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2"
SRC_URI[md5sum] = "ab89f48dd0cd3c581a9228fcbb3af96b"
SRC_URI[sha256sum] =
"a7c179cb7ecafc6477c789b080bd936ac3620220604ffb2ae214a33719839d13"

inherit autotools pkgconfig

BBCLASSEXTEND = "native"

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


Re: [OE-core] [PATCH v2] xinput-calibrator: use up-to-date git version

2016-11-15 Thread Burton, Ross
On 15 November 2016 at 11:08, Diego Rondini  wrote:

> Use up-to-date version from git. While currently there aren't official
> releases
> newer than 0.7.5, quite some new features have been added in git, for
> example
> the ability to disable the calibration screen timeout.
>

buildhistory-diff in my local automated testing says:

packages/corei7-64-poky-linux/xinput-calibrator/xinput-calibrator:
RDEPENDS: removed "libxrandr (['>= 1.5.1'])"

https://github.com/tias/xinput_calibrator/blob/master/configure.ac#L72
shows that xinput-calibrator has an automatic dependency on xrandr.  We
build and ship this, and I can't see any downside to using it, so this
should be in DEPENDS so the build is deterministic.

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


[OE-core] [PATCH v2] xinput-calibrator: use up-to-date git version

2016-11-15 Thread Diego Rondini
Use up-to-date version from git. While currently there aren't official releases
newer than 0.7.5, quite some new features have been added in git, for example
the ability to disable the calibration screen timeout.

Signed-off-by: Diego Rondini 
---
 meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb 
b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 57c3a7a..87f09e7 100644
--- a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -11,7 +11,7 @@ inherit autotools pkgconfig distro_features_check
 # depends on virtual/libx11
 REQUIRED_DISTRO_FEATURES = "x11"
 
-SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
+SRCREV = "03dadf55109bd43d3380f040debe9f82f66f2f35"
 SRC_URI = "git://github.com/tias/xinput_calibrator.git \
file://30xinput_calibrate.sh \
file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \
-- 
1.9.1


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


Re: [OE-core] [PATCH] xinput-calibrator: use up-to-date git version

2016-11-15 Thread Burton, Ross
On 15 November 2016 at 09:39, Diego Rondini  wrote:

> -PR = "r6"
> +PR = "r7"
>

No need to bump PR anymore, this is historical and when they release PR can
be removed.

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


Re: [OE-core] [PATCH v3 00/11] wic: bugfixes & --fixed-size support, tests, oe-selftest: minor fixes

2016-11-15 Thread Maciej Borzęcki
On Tue, Nov 15, 2016 at 11:32 AM, Burton, Ross  wrote:
>
> On 15 November 2016 at 09:52, Maciej Borzecki 
> wrote:
>>
>> I have noticed that Ross has cherry-picked some patches into his
>> pull request to master. Just for reference, the patches are included in
>> this
>> series, but have not been changed since the previous version. The
>> patches in question are:
>>   oe-selftest: fix handling of test cases without ID in --list-tests-by
>>   wic: make sure that partition size is always an integer in internal
>> processing
>>   wic: use partition size when creating empty partition files
>>   wic: check that filesystem is specified for a rootfs partition
>>   wic: fix function comment typos
>>   wic: add --fixed-size wks option
>
>
> These were simple and/or fixing serious problems, hope I didn't cause too
> much inconvenience doing this.

None at all. I was actually about to propose cherry picking those
patches along with `oe-selftest: enforce en_US.UTF-8 locale`, when your
pull request to OE-core came in.

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


Re: [OE-core] [PATCH v3 00/11] wic: bugfixes & --fixed-size support, tests, oe-selftest: minor fixes

2016-11-15 Thread Burton, Ross
On 15 November 2016 at 09:52, Maciej Borzecki 
wrote:

> I have noticed that Ross has cherry-picked some patches into his
> pull request to master. Just for reference, the patches are included in
> this
> series, but have not been changed since the previous version. The
> patches in question are:
>   oe-selftest: fix handling of test cases without ID in --list-tests-by
>   wic: make sure that partition size is always an integer in internal
> processing
>   wic: use partition size when creating empty partition files
>   wic: check that filesystem is specified for a rootfs partition
>   wic: fix function comment typos
>   wic: add --fixed-size wks option
>

These were simple and/or fixing serious problems, hope I didn't cause too
much inconvenience doing this.

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


[OE-core] [PATCH v3 11/11] oe-selftest: enforce en_US.UTF-8 locale

2016-11-15 Thread Maciej Borzecki
Replicate bitbake and eforce en_US.UTF-8 locale so that ouptut of locale-aware
tools remains stable.

Signed-off-by: Maciej Birzecki 
Signed-off-by: Maciej Borzecki 
---
 scripts/oe-selftest | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 
c3215ea6592e128d17da550d778272985f5bd1a6..deaa4324cc888ea261687f90f83e8759c4436a15
 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -468,6 +468,9 @@ def main():
 sys.path.extend(layer_libdirs)
 imp.reload(oeqa.selftest)
 
+# act like bitbake and enforce en_US.UTF-8 locale
+os.environ["LC_ALL"] = "en_US.UTF-8"
+
 if args.run_tests_by and len(args.run_tests_by) >= 2:
 valid_options = ['name', 'class', 'module', 'id', 'tag']
 if args.run_tests_by[0] not in valid_options:
-- 
2.5.0

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


[OE-core] [PATCH v3 10/11] oe-selftest: fix handling of test cases without ID in --list-tests-by

2016-11-15 Thread Maciej Borzecki
Running `oe-selftest --list-tests-by module wic` will produce the
following backtrace:

Traceback (most recent call last):
  File "/poky/scripts/oe-selftest", line 668, in 
ret = main()
  File "/poky/scripts/oe-selftest", line 486, in main
list_testsuite_by(criteria, keyword)
  File "/poky/scripts/oe-selftest", line 340, in list_testsuite_by
ts = sorted([ (tc.tcid, tc.tctag, tc.tcname, tc.tcclass, tc.tcmodule) for 
tc in get_testsuite_by(criteria, keyword) ])
TypeError: unorderable types: int() < NoneType()

The root cause is that a test case does not necessarily have an ID
assigned, hence its value is None. Since Python 3 does not allow
comparison of heterogeneous types, TypeError is raised.

Signed-off-by: Maciej Borzecki 
---
 scripts/oe-selftest | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 
d9ffd40e8c4caa734cd490d77304cc600cc75b73..c3215ea6592e128d17da550d778272985f5bd1a6
 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -336,10 +336,15 @@ def list_testsuite_by(criteria, keyword):
 # Get a testsuite based on 'keyword'
 # criteria: name, class, module, id, tag
 # keyword: a list of tests, classes, modules, ids, tags
-
-ts = sorted([ (tc.tcid, tc.tctag, tc.tcname, tc.tcclass, tc.tcmodule) for 
tc in get_testsuite_by(criteria, keyword) ])
-
-print('%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % ('id', 'tag', 'name', 'class', 
'module'))
+def tc_key(t):
+if t[0] is None:
+return  (0,) + t[1:]
+return t
+# tcid may be None if no ID was assigned, in which case sorted() will throw
+# a TypeError as Python 3 does not allow comparison (<,<=,>=,>) of
+# heterogeneous types, handle this by using a custom key generator
+ts = sorted([ (tc.tcid, tc.tctag, tc.tcname, tc.tcclass, tc.tcmodule) \
+  for tc in get_testsuite_by(criteria, keyword) ], key=tc_key)
 print('_' * 150)
 for t in ts:
 if isinstance(t[1], (tuple, list)):
-- 
2.5.0

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


[OE-core] [PATCH v3 09/11] wic: selftest: add tests for --fixed-size partition flags

2016-11-15 Thread Maciej Borzecki
wic has a new flag for setting a fixed parition size --fixed-size. Add
tests that verify if partition is indeed sized properly and that errors
are signaled when there is not enough space to fit partition data.

Signed-off-by: Maciej Borzecki 
---
 meta/lib/oeqa/selftest/wic.py | 65 +++
 1 file changed, 65 insertions(+)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 
ad783043b92130a023fd70120becec479c6253a7..052d77d510adf4b3fe56ab8fcc87a834c15b1d4c
 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -29,6 +29,7 @@ import unittest
 from glob import glob
 from shutil import rmtree
 from functools import wraps
+from tempfile import NamedTemporaryFile
 
 from oeqa.selftest.base import oeSelfTest
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
@@ -378,3 +379,67 @@ class Wic(oeSelfTest):
 self.assertEqual(0, runCmd("wic create %(wks)s -e %(image)s" \
% wic_cmd_vars).status)
 self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
+
+def _make_fixed_size_wks(self, size):
+"""
+Create a wks of an image with a single partition. Size of the 
partition is set
+using --fixed-size flag. Returns a tuple: (path to wks file, wks image 
name)
+"""
+with NamedTemporaryFile("w", suffix=".wks", delete=False) as tf:
+wkspath = tf.name
+tf.write("part " \
+ "--source rootfs --ondisk hda --align 4 --fixed-size %d "
+ "--fstype=ext4\n" % size)
+wksname = os.path.splitext(os.path.basename(wkspath))[0]
+
+return (wkspath, wksname)
+
+def test_fixed_size(self):
+"""
+Test creation of a simple image with partition size controlled through
+--fixed-size flag
+"""
+wkspath, wksname = self._make_fixed_size_wks(200)
+
+wic_cmd_vars = {
+'wks': wkspath,
+'image': self.OE_IMAGE,
+}
+self.assertEqual(0, runCmd("wic create %(wks)s -e %(image)s" \
+   % wic_cmd_vars).status)
+os.remove(wkspath)
+wicout = glob(self.resultdir + "%s-*direct" % wksname)
+self.assertEqual(1, len(wicout))
+
+wicimg = wicout[0]
+
+# verify partition size with wic
+res = runCmd("parted -m %s unit mib p 2>/dev/null" % wicimg, 
ignore_status=True)
+self.assertEqual(0, res.status)
+
+# parse parted output which looks like this:
+# BYT;\n
+# 
/var/tmp/wic/build/tmpfwvjjkf_-201611101222-hda.direct:200MiB:file:512:512:msdos::;\n
+# 1:0.00MiB:200MiB:200MiB:ext4::;\n
+partlns = res.output.splitlines()[2:]
+
+self.assertEqual(1, len(partlns))
+self.assertEqual("1:0.00MiB:200MiB:200MiB:ext4::;", partlns[0])
+
+def test_fixed_size_error(self):
+"""
+Test creation of a simple image with partition size controlled through
+--fixed-size flag. The size of partition is intentionally set to 1MiB
+in order to trigger an error in wic.
+"""
+wkspath, wksname = self._make_fixed_size_wks(1)
+
+wic_cmd_vars = {
+'wks': wkspath,
+'image': self.OE_IMAGE,
+}
+self.assertEqual(1, runCmd("wic create %(wks)s -e %(image)s" \
+   % wic_cmd_vars, ignore_status=True).status)
+os.remove(wkspath)
+wicout = glob(self.resultdir + "%s-*direct" % wksname)
+self.assertEqual(0, len(wicout))
-- 
2.5.0

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


[OE-core] [PATCH v3 05/11] wic: add --fixed-size wks option

2016-11-15 Thread Maciej Borzecki
Added new option --fixed-size to wks. The option can be used to indicate
the exact size of a partition. The option cannot be added together with
--size, in which case an error will be raised. Other options that
influence automatic partition size (--extra-space, --overhead-factor),
if specifiec along with --fixed-size, will raise an error.

If it partition data is larger than the amount of space specified with
--fixed-size option wic will raise an error.

Signed-off-by: Maciej Borzecki 
---
 scripts/lib/wic/help.py| 14 --
 scripts/lib/wic/imager/direct.py   |  2 +-
 scripts/lib/wic/ksparser.py| 41 ++--
 scripts/lib/wic/partition.py   | 88 +-
 scripts/lib/wic/utils/partitionedfs.py |  2 +-
 5 files changed, 105 insertions(+), 42 deletions(-)

diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index 
e5347ec4b7c900c68fc64351a5293e75de0672b3..daa11bf489c135627ddfe4cef968e48f8e3ad1d8
 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -646,6 +646,12 @@ DESCRIPTION
  not specified, the size is in MB.
  You do not need this option if you use --source.
 
+ --fixed-size: Exact partition size. Value format is the same
+   as for --size option. This option cannot be
+   specified along with --size. If partition data
+   is larger than --fixed-size and error will be
+   raised when assembling disk image.
+
  --source: This option is a wic-specific option that names the
source of the data that will populate the
partition.  The most common value for this option
@@ -719,13 +725,15 @@ DESCRIPTION
 space after the space filled by the content
 of the partition. The final size can go
 beyond the size specified by --size.
-By default, 10MB.
+By default, 10MB. This option cannot be used
+with --fixed-size option.
 
  --overhead-factor: This option is specific to wic. The
 size of the partition is multiplied by
 this factor. It has to be greater than or
-equal to 1.
-The default value is 1.3.
+equal to 1. The default value is 1.3.
+This option cannot be used with --fixed-size
+option.
 
  --part-type: This option is specific to wic. It specifies partition
   type GUID for GPT partitions.
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 
2bedef08d6450096c786def6f75a9ee53fcd4b3b..11ec15e33f65885618c7adc83e55c6a39fedbe99
 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -290,7 +290,7 @@ class DirectImageCreator(BaseImageCreator):
  self.bootimg_dir, self.kernel_dir, 
self.native_sysroot)
 
 
-self.__image.add_partition(int(part.size),
+self.__image.add_partition(part.disk_size,
part.disk,
part.mountpoint,
part.source_file,
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 
0894e2b199a299fbbed272f2e1c95e9d692e3ab1..62c490274aa92bf82aac304d9323250e3b728d0c
 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -113,6 +113,9 @@ def systemidtype(arg):
 class KickStart():
 Kickstart parser implementation."""
 
+DEFAULT_EXTRA_SPACE = 10*1024
+DEFAULT_OVERHEAD_FACTOR = 1.3
+
 def __init__(self, confpath):
 
 self.partitions = []
@@ -127,16 +130,24 @@ class KickStart():
 part.add_argument('mountpoint', nargs='?')
 part.add_argument('--active', action='store_true')
 part.add_argument('--align', type=int)
-part.add_argument("--extra-space", type=sizetype, default=10*1024)
+part.add_argument("--extra-space", type=sizetype)
 part.add_argument('--fsoptions', dest='fsopts')
 part.add_argument('--fstype')
 part.add_argument('--label')
 part.add_argument('--no-table', action='store_true')
 part.add_argument('--ondisk', '--ondrive', dest='disk')
-part.add_argument("--overhead-factor", type=overheadtype, default=1.3)
+part.add_argument("--overhead-factor", type=overheadtype)
 part.add_argument('--part-type')
 part.add_argument('--rootfs-dir')
-part.add_argument('--size', type=sizetype, default=0)
+
+# --size and --fixed-size cannot be specified together; options
+# extra-space and --overhead-factor should also 

[OE-core] [PATCH v3 08/11] wic: selftest: do not assume bzImage kernel image

2016-11-15 Thread Maciej Borzecki
Instead of assuming that bzImage is available, query bitbake enviroment
for KERNEL_IMAGETYPE.

Signed-off-by: Maciej Borzecki 
---
 meta/lib/oeqa/selftest/wic.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 
37ed2c6de5a7f22f982f921476fa392304995b2e..ad783043b92130a023fd70120becec479c6253a7
 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -369,7 +369,8 @@ class Wic(oeSelfTest):
 def test_sdimage_bootpart(self):
 """Test creation of sdimage-bootpart image"""
 image = "sdimage-bootpart"
-self.write_config('IMAGE_BOOT_FILES = "bzImage"\n')
+kimgtype = get_bb_var('KERNEL_IMAGETYPE', self.OE_IMAGE)
+self.write_config('IMAGE_BOOT_FILES = "%s"\n' % kimgtype)
 wic_cmd_vars = {
 'wks': image,
 'image': self.OE_IMAGE,
-- 
2.5.0

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


[OE-core] [PATCH v3 07/11] wic: selftest: do not repeat core-image-minimal

2016-11-15 Thread Maciej Borzecki
Replace repeated core-image-minimal with Wic class field.

Signed-off-by: Maciej Borzecki 
---
 meta/lib/oeqa/selftest/wic.py | 111 +++---
 1 file changed, 73 insertions(+), 38 deletions(-)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 
2db14445956bc5adcf1e755844bbdb69edcb468f..37ed2c6de5a7f22f982f921476fa392304995b2e
 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -57,6 +57,8 @@ class Wic(oeSelfTest):
 resultdir = "/var/tmp/wic/build/"
 image_is_ready = False
 
+OE_IMAGE = "core-image-minimal"
+
 def setUpLocal(self):
 """This code is executed before each test method."""
 arch = get_bb_var('HOST_ARCH', 'core-image-minimal')
@@ -75,7 +77,7 @@ class Wic(oeSelfTest):
 tools += ' syslinux syslinux-native'
 bitbake(tools)
 
-bitbake('core-image-minimal')
+bitbake(self.OE_IMAGE)
 Wic.image_is_ready = True
 
 rmtree(self.resultdir, ignore_errors=True)
@@ -100,14 +102,14 @@ class Wic(oeSelfTest):
 def test_build_image_name(self):
 """Test wic create directdisk --image-name core-image-minimal"""
 self.assertEqual(0, runCmd("wic create directdisk "
-   "--image-name core-image-minimal").status)
+   "--image-name %s" % self.OE_IMAGE).status)
 self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
 
 @testcase(1212)
 @onlyForArch('i586', 'i686', 'x86_64')
 def test_build_artifacts(self):
 """Test wic create directdisk providing all artifacts."""
-bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
+bbvars = dict((var.lower(), get_bb_var(var, self.OE_IMAGE)) \
 for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
 status = runCmd("wic create directdisk "
@@ -123,7 +125,7 @@ class Wic(oeSelfTest):
 def test_gpt_image(self):
 """Test creation of core-image-minimal with gpt table and UUID boot"""
 self.assertEqual(0, runCmd("wic create directdisk-gpt "
-   "--image-name core-image-minimal").status)
+   "--image-name %s" % self.OE_IMAGE).status)
 self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
 
 @testcase(1213)
@@ -157,8 +159,8 @@ class Wic(oeSelfTest):
 def test_compress_gzip(self):
 """Test compressing an image with gzip"""
 self.assertEqual(0, runCmd("wic create directdisk "
-   "--image-name core-image-minimal "
-   "-c gzip").status)
+   "--image-name %s "
+   "-c gzip" % self.OE_IMAGE).status)
 self.assertEqual(1, len(glob(self.resultdir + \
  "directdisk-*.direct.gz")))
 
@@ -167,8 +169,8 @@ class Wic(oeSelfTest):
 def test_compress_bzip2(self):
 """Test compressing an image with bzip2"""
 self.assertEqual(0, runCmd("wic create directdisk "
-   "--image-name core-image-minimal "
-   "-c bzip2").status)
+   "--image-name %s "
+   "-c bzip2" % self.OE_IMAGE).status)
 self.assertEqual(1, len(glob(self.resultdir + \
  "directdisk-*.direct.bz2")))
 
@@ -177,8 +179,8 @@ class Wic(oeSelfTest):
 def test_compress_xz(self):
 """Test compressing an image with xz"""
 self.assertEqual(0, runCmd("wic create directdisk "
-   "--image-name core-image-minimal "
-   "-c xz").status)
+   "--image-name %s "
+   "-c xz" % self.OE_IMAGE).status)
 self.assertEqual(1, len(glob(self.resultdir + \
  "directdisk-*.direct.xz")))
 
@@ -187,26 +189,31 @@ class Wic(oeSelfTest):
 def test_wrong_compressor(self):
 """Test how wic breaks if wrong compressor is provided"""
 self.assertEqual(2, runCmd("wic create directdisk "
-   "--image-name core-image-minimal "
-   "-c wrong", ignore_status=True).status)
+   "--image-name %s "
+   "-c wrong" % self.OE_IMAGE,
+   ignore_status=True).status)
 
 @testcase(1268)
 @onlyForArch('i586', 'i686', 'x86_64')
 def test_rootfs_indirect_recipes(self):
 """Test usage of rootfs plugin with rootfs recipes"""
 wks = 

[OE-core] [PATCH v3 04/11] wic: fix function comment typos

2016-11-15 Thread Maciej Borzecki
Fix typos in documentation of Image.add_partition() and
Image.__format_disks().

Signed-off-by: Maciej Borzecki 
---
 scripts/lib/wic/utils/partitionedfs.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/utils/partitionedfs.py 
b/scripts/lib/wic/utils/partitionedfs.py
index 
cb03009fc7e3c97305079629ded7d2ff01eba4c4..9e76487844eebfffc7227d053a65dc9fdab3678b
 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -92,7 +92,7 @@ class Image():
 def add_partition(self, size, disk_name, mountpoint, source_file=None, 
fstype=None,
   label=None, fsopts=None, boot=False, align=None, 
no_table=False,
   part_type=None, uuid=None, system_id=None):
-""" Add the next partition. Prtitions have to be added in the
+""" Add the next partition. Partitions have to be added in the
 first-to-last order. """
 
 ks_pnum = len(self.partitions)
@@ -292,7 +292,7 @@ class Image():
 # even number of sectors.
 if part['mountpoint'] == "/boot" and part['fstype'] in ["vfat", 
"msdos"] \
and part['size'] % 2:
-msger.debug("Substracting one sector from '%s' partition to " \
+msger.debug("Subtracting one sector from '%s' partition to " \
 "get even number of sectors for the partition" % \
 part['mountpoint'])
 part['size'] -= 1
-- 
2.5.0

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


[OE-core] [PATCH v3 06/11] wic: selftest: avoid COMPATIBLE_HOST issues

2016-11-15 Thread Maciej Borzecki
wic tests will unconditionally attempt to build syslinux and add
configuration options that may not be compatible with current machine.

Resolve this by consulting HOST_ARCH (which defaults to TARGET_ARCH) and build
recipes, add configuration options or skip tests conditionally.

A convenience decorator onlyForArch() can be used to skip test cases for
specific architectures.

Signed-off-by: Maciej Borzecki 
---
 meta/lib/oeqa/selftest/wic.py | 51 +++
 1 file changed, 47 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 
faac11e21643e4c32a83b649b6ae986fead498f1..2db14445956bc5adcf1e755844bbdb69edcb468f
 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -24,15 +24,33 @@
 """Test cases for wic."""
 
 import os
+import unittest
 
 from glob import glob
 from shutil import rmtree
+from functools import wraps
 
 from oeqa.selftest.base import oeSelfTest
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
 from oeqa.utils.decorators import testcase
 
 
+class onlyForArch(object):
+
+def __init__(self, *args):
+self.archs = args
+
+def __call__(self,f):
+@wraps(f)
+def wrapped_f(*args, **kwargs):
+arch = get_bb_var('HOST_ARCH', 'core-image-minimal')
+if self.archs and arch not in self.archs :
+raise unittest.SkipTest("Testcase arch dependency not met: %s" 
% arch)
+return f(*args, **kwargs)
+wrapped_f.__name__ = f.__name__
+return wrapped_f
+
+
 class Wic(oeSelfTest):
 """Wic test class."""
 
@@ -41,15 +59,22 @@ class Wic(oeSelfTest):
 
 def setUpLocal(self):
 """This code is executed before each test method."""
-self.write_config('IMAGE_FSTYPES += " hddimg"\n'
-  'MACHINE_FEATURES_append = " efi"\n')
+arch = get_bb_var('HOST_ARCH', 'core-image-minimal')
+is_x86 = arch in ['i586', 'i686', 'x86_64']
+if is_x86:
+self.write_config('IMAGE_FSTYPES += " hddimg"\n' \
+  'MACHINE_FEATURES_append = " efi"\n')
 
 # Do this here instead of in setUpClass as the base setUp does some
 # clean up which can result in the native tools built earlier in
 # setUpClass being unavailable.
 if not Wic.image_is_ready:
-bitbake('syslinux syslinux-native parted-native gptfdisk-native '
-'dosfstools-native mtools-native bmap-tools-native')
+tools = 'parted-native gptfdisk-native ' \
+'dosfstools-native mtools-native bmap-tools-native'
+if is_x86:
+tools += ' syslinux syslinux-native'
+bitbake(tools)
+
 bitbake('core-image-minimal')
 Wic.image_is_ready = True
 
@@ -71,6 +96,7 @@ class Wic(oeSelfTest):
 self.assertEqual(0, runCmd('wic list --help').status)
 
 @testcase(1211)
+@onlyForArch('i586', 'i686', 'x86_64')
 def test_build_image_name(self):
 """Test wic create directdisk --image-name core-image-minimal"""
 self.assertEqual(0, runCmd("wic create directdisk "
@@ -78,6 +104,7 @@ class Wic(oeSelfTest):
 self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
 
 @testcase(1212)
+@onlyForArch('i586', 'i686', 'x86_64')
 def test_build_artifacts(self):
 """Test wic create directdisk providing all artifacts."""
 bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
@@ -92,6 +119,7 @@ class Wic(oeSelfTest):
 self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
 
 @testcase(1157)
+@onlyForArch('i586', 'i686', 'x86_64')
 def test_gpt_image(self):
 """Test creation of core-image-minimal with gpt table and UUID boot"""
 self.assertEqual(0, runCmd("wic create directdisk-gpt "
@@ -125,6 +153,7 @@ class Wic(oeSelfTest):
 self.assertEqual(0, runCmd('wic help kickstart').status)
 
 @testcase(1264)
+@onlyForArch('i586', 'i686', 'x86_64')
 def test_compress_gzip(self):
 """Test compressing an image with gzip"""
 self.assertEqual(0, runCmd("wic create directdisk "
@@ -134,6 +163,7 @@ class Wic(oeSelfTest):
  "directdisk-*.direct.gz")))
 
 @testcase(1265)
+@onlyForArch('i586', 'i686', 'x86_64')
 def test_compress_bzip2(self):
 """Test compressing an image with bzip2"""
 self.assertEqual(0, runCmd("wic create directdisk "
@@ -143,6 +173,7 @@ class Wic(oeSelfTest):
  "directdisk-*.direct.bz2")))
 
 @testcase(1266)
+@onlyForArch('i586', 'i686', 'x86_64')
 def test_compress_xz(self):
 """Test compressing an image with xz"""
 self.assertEqual(0, runCmd("wic create directdisk "
@@ -152,6 +183,7 @@ 

[OE-core] [PATCH v3 03/11] wic: check that filesystem is specified for a rootfs partition

2016-11-15 Thread Maciej Borzecki
We explicitly check for --fstype if no source was provided for a
partition. However, this was not the case for rootfs partitions. Make
sure to raise an error if filesystem was left unspecified when preparing
a rootfs partition image.

Signed-off-by: Maciej Borzecki 
---
 scripts/lib/wic/partition.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 
f3835339afc5091604ffd7f0d0acf1d1ad4351cc..ac4c836bdb53300d3a4e4c09926b7b1514b8faf2
 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -190,6 +190,10 @@ class Partition():
 if os.path.isfile(rootfs):
 os.remove(rootfs)
 
+if not self.fstype:
+msger.error("File system for partition %s not specified in 
kickstart, " \
+"use --fstype option" % (self.mountpoint))
+
 for prefix in ("ext", "btrfs", "vfat", "squashfs"):
 if self.fstype.startswith(prefix):
 method = getattr(self, "prepare_rootfs_" + prefix)
-- 
2.5.0

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


[OE-core] [PATCH v3 01/11] wic: make sure that partition size is always an integer in internal processing

2016-11-15 Thread Maciej Borzecki
The size field of Partition class is expected to be an integer and ought
to be set inside prepare_*() method. Make sure that this is always the
case.

Signed-off-by: Maciej Borzecki 
---
 scripts/lib/wic/partition.py  | 12 +---
 scripts/lib/wic/plugins/source/bootimg-efi.py |  2 +-
 scripts/lib/wic/plugins/source/rawcopy.py |  4 ++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 
89c33ab8b7d54bb14678b2e07e706e3feb6ae57a..959035a97110244ffe56e95a886e122c400d4779
 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -146,6 +146,12 @@ class Partition():
  oe_builddir,
  bootimg_dir, kernel_dir, 
rootfs_dir,
  native_sysroot)
+# further processing required Partition.size to be an integer, make
+# sure that it is one
+if type(self.size) is not int:
+msger.error("Partition %s internal size is not an integer. " \
+  "This a bug in source plugin %s and needs to be 
fixed." \
+  % (self.mountpoint, self.source))
 
 def prepare_rootfs_from_fs_image(self, cr_workdir, oe_builddir,
  rootfs_dir):
@@ -157,7 +163,7 @@ class Partition():
 out = exec_cmd(du_cmd)
 rootfs_size = out.split()[0]
 
-self.size = rootfs_size
+self.size = int(rootfs_size)
 self.source_file = rootfs
 
 def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
@@ -194,7 +200,7 @@ class Partition():
 # get the rootfs size in the right units for kickstart (kB)
 du_cmd = "du -Lbks %s" % rootfs
 out = exec_cmd(du_cmd)
-self.size = out.split()[0]
+self.size = int(out.split()[0])
 
 break
 
@@ -379,7 +385,7 @@ class Partition():
 out = exec_cmd(du_cmd)
 fs_size = out.split()[0]
 
-self.size = fs_size
+self.size = int(fs_size)
 
 def prepare_swap_partition(self, cr_workdir, oe_builddir, native_sysroot):
 """
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 
8bc362254d8c06511aa2cf0d5e1bf6f5aa93804b..4adb80becc11a6d30ffeae64ff87ebeb959dde86
 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -234,5 +234,5 @@ class BootimgEFIPlugin(SourcePlugin):
 out = exec_cmd(du_cmd)
 bootimg_size = out.split()[0]
 
-part.size = bootimg_size
+part.size = int(bootimg_size)
 part.source_file = bootimg
diff --git a/scripts/lib/wic/plugins/source/rawcopy.py 
b/scripts/lib/wic/plugins/source/rawcopy.py
index 
e0b11f95adb5a2c55fdc3b5e3ff1f4b463e2be9d..5bd22fdeb55bc2f0b38ffcc2a46cf18ade5425ef
 100644
--- a/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/scripts/lib/wic/plugins/source/rawcopy.py
@@ -78,9 +78,9 @@ class RawCopyPlugin(SourcePlugin):
 # get the size in the right units for kickstart (kB)
 du_cmd = "du -Lbks %s" % dst
 out = exec_cmd(du_cmd)
-filesize = out.split()[0]
+filesize = int(out.split()[0])
 
-if int(filesize) > int(part.size):
+if filesize > part.size:
 part.size = filesize
 
 part.source_file = dst
-- 
2.5.0

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


[OE-core] [PATCH v3 02/11] wic: use partition size when creating empty partition files

2016-11-15 Thread Maciej Borzecki
It seems that prepare_empty_partition_ext() and
prepare_empty_partition_btrfs() got broken in commit
c8669749e37fe865c197c98d5671d9de176ff4dd, thus one could observe the
following backtrace:

Backtrace:
  File "/poky/scripts/lib/wic/plugins/imager/direct_plugin.py", line 93, 
in do_create
creator.create()
  File "/poky/scripts/lib/wic/imager/baseimager.py", line 159, in create
self._create()
  File "/poky/scripts/lib/wic/imager/direct.py", line 290, in _create
self.bootimg_dir, self.kernel_dir, self.native_sysroot)
  File "/poky/scripts/lib/wic/partition.py", line 146, in prepare
method(rootfs, oe_builddir, native_sysroot)
  File "/poky/scripts/lib/wic/partition.py", line 325, in 
prepare_empty_partition_ext
os.ftruncate(sparse.fileno(), rootfs_size * 1024)
NameError: name 'rootfs_size' is not defined

Signed-off-by: Maciej Borzecki 
---
 scripts/lib/wic/partition.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 
959035a97110244ffe56e95a886e122c400d4779..f3835339afc5091604ffd7f0d0acf1d1ad4351cc
 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -314,7 +314,7 @@ class Partition():
 Prepare an empty ext2/3/4 partition.
 """
 with open(rootfs, 'w') as sparse:
-os.ftruncate(sparse.fileno(), rootfs_size * 1024)
+os.ftruncate(sparse.fileno(), self.size * 1024)
 
 extra_imagecmd = "-i 8192"
 
@@ -332,7 +332,7 @@ class Partition():
 Prepare an empty btrfs partition.
 """
 with open(rootfs, 'w') as sparse:
-os.ftruncate(sparse.fileno(), rootfs_size * 1024)
+os.ftruncate(sparse.fileno(), self.size * 1024)
 
 label_str = ""
 if self.label:
-- 
2.5.0

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


[OE-core] [PATCH v3 00/11] wic: bugfixes & --fixed-size support, tests, oe-selftest: minor fixes

2016-11-15 Thread Maciej Borzecki
v3 of patch series previously posted here [1].

I have noticed that Ross has cherry-picked some patches into his
pull request to master. Just for reference, the patches are included in this
series, but have not been changed since the previous version. The
patches in question are:
  oe-selftest: fix handling of test cases without ID in --list-tests-by
  wic: make sure that partition size is always an integer in internal
processing
  wic: use partition size when creating empty partition files
  wic: check that filesystem is specified for a rootfs partition
  wic: fix function comment typos
  wic: add --fixed-size wks option

Changes since v2:

* COMPATIBLE_HOST workarounds now selectively skip certain wic tests for
  archs that cannot build images included in the test (most commonly
  directdisk-* image is not usable on non x86 archs), wic tests were
  verified to pass for qemux86-64 and beaglebone

* oe-selftest enforces en_US.UTF-8 encoding to enforce stable textual
  output of locaization aware programs

[1]. 
http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128630.html

Maciej Borzecki (11):
  wic: make sure that partition size is always an integer in internal
processing
  wic: use partition size when creating empty partition files
  wic: check that filesystem is specified for a rootfs partition
  wic: fix function comment typos
  wic: add --fixed-size wks option
  wic: selftest: avoid COMPATIBLE_HOST issues
  wic: selftest: do not repeat core-image-minimal
  wic: selftest: do not assume bzImage kernel image
  wic: selftest: add tests for --fixed-size partition flags
  oe-selftest: fix handling of test cases without ID in --list-tests-by
  oe-selftest: enforce en_US.UTF-8 locale

 meta/lib/oeqa/selftest/wic.py | 230 +-
 scripts/lib/wic/help.py   |  14 +-
 scripts/lib/wic/imager/direct.py  |   2 +-
 scripts/lib/wic/ksparser.py   |  41 -
 scripts/lib/wic/partition.py  | 104 
 scripts/lib/wic/plugins/source/bootimg-efi.py |   2 +-
 scripts/lib/wic/plugins/source/rawcopy.py |   4 +-
 scripts/lib/wic/utils/partitionedfs.py|   6 +-
 scripts/oe-selftest   |  16 +-
 9 files changed, 322 insertions(+), 97 deletions(-)

-- 
2.5.0

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


[OE-core] [PATCH] xinput-calibrator: use up-to-date git version

2016-11-15 Thread Diego Rondini
Use up-to-date version from git. While currently there aren't official releases
newer than 0.7.5, quite some new features have been added in git, for example
the ability to disable the calibration screen timeout.

Signed-off-by: Diego Rondini 
---
 meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb 
b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 57c3a7a..791895a 100644
--- a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -5,13 +5,13 @@ LIC_FILES_CHKSUM = 
"file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f340
 DEPENDS = "virtual/libx11 libxi"
 
 PV = "0.7.5+git${SRCPV}"
-PR = "r6"
+PR = "r7"
 
 inherit autotools pkgconfig distro_features_check
 # depends on virtual/libx11
 REQUIRED_DISTRO_FEATURES = "x11"
 
-SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
+SRCREV = "03dadf55109bd43d3380f040debe9f82f66f2f35"
 SRC_URI = "git://github.com/tias/xinput_calibrator.git \
file://30xinput_calibrate.sh \
file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \
-- 
1.9.1


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


[OE-core] [PATCHv5][krogoth 10/11] curl: CVE-2016-8624

2016-11-15 Thread Sona Sarmadi
invalid URL parsing with '#'

Affected versions: curl 7.1 to and including 7.50.3
Reference:
https://curl.haxx.se/docs/adv_20161102J.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8624.patch | 51 ++
 meta/recipes-support/curl/curl_7.47.1.bb   |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8624.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8624.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8624.patch
new file mode 100644
index 000..009f7d0
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8624.patch
@@ -0,0 +1,51 @@
+From 3bb273db7e40ebc284cff45f3ce3f0475c8339c2 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Tue, 11 Oct 2016 00:48:35 +0200
+Subject: [PATCH] urlparse: accept '#' as end of host name
+
+'http://example.com#@127.0.0.1/x.txt' equals a request to example.com
+for the '/' document with the rest of the URL being a fragment.
+
+CVE: CVE-2016-8624
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102J.html
+Reported-by: Fernando Muñoz
+
+Signed-off-by: Sona Sarmadi 
+
+diff -ruN a/lib/url.c b/lib/url.c
+--- a/lib/url.c2016-11-07 08:50:23.030126833 +0100
 b/lib/url.c2016-11-07 10:16:13.562089428 +0100
+@@ -4086,7 +4086,7 @@
+ path[0]=0;
+ 
+ if(2 > sscanf(data->change.url,
+-   "%15[^\n:]://%[^\n/?]%[^\n]",
++   "%15[^\n:]://%[^\n/?#]%[^\n]",
+protobuf,
+conn->host.name, path)) {
+ 
+@@ -4094,7 +4094,7 @@
+* The URL was badly formatted, let's try the browser-style _without_
+* protocol specified like 'http://'.
+*/
+-  rc = sscanf(data->change.url, "%[^\n/?]%[^\n]", conn->host.name, path);
++  rc = sscanf(data->change.url, "%[^\n/?#]%[^\n]", conn->host.name, path);
+   if(1 > rc) {
+ /*
+  * We couldn't even get this format.
+@@ -4184,10 +4184,10 @@
+   }
+ 
+   /* If the URL is malformatted (missing a '/' after hostname before path) we
+-   * insert a slash here. The only letter except '/' we accept to start a path
+-   * is '?'.
++   * insert a slash here. The only letters except '/' that can start a path is
++   * '?' and '#' - as controlled by the two sscanf() patterns above.
+*/
+-  if(path[0] == '?') {
++  if(path[0] != '/') {
+ /* We need this function to deal with overlapping memory areas. We know
+that the memory area 'path' points to is 'urllen' bytes big and that
+is bigger than the path. Use +1 to move the zero byte too. */
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index 0f8fa3a..3c877e4 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -24,6 +24,7 @@ SRC_URI += " file://configure_ac.patch \
  file://CVE-2016-8621.patch \
  file://CVE-2016-8622.patch \
  file://CVE-2016-8623.patch \
+ file://CVE-2016-8624.patch \
"
 
 SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-- 
1.9.1

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


[OE-core] [PATCHv5][krogoth 11/11] curl: CVE-2016-8625

2016-11-15 Thread Sona Sarmadi
IDNA 2003 makes curl use wrong host

Affected versions: curl 7.12.0 to and including 7.50.3
Reference:
https://curl.haxx.se/docs/adv_20161102K.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8625.patch | 615 +
 .../url-remove-unconditional-idn2.h-include.patch  |  29 +
 meta/recipes-support/curl/curl_7.47.1.bb   |   2 +
 3 files changed, 646 insertions(+)
 create mode 100755 meta/recipes-support/curl/curl/CVE-2016-8625.patch
 create mode 100644 
meta/recipes-support/curl/curl/url-remove-unconditional-idn2.h-include.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8625.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8625.patch
new file mode 100755
index 000..b618277
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8625.patch
@@ -0,0 +1,615 @@
+commit 914aae739463ec72340130ea9ad42e04b02a5338
+Author: Daniel Stenberg 
+Date:   Wed Oct 12 09:01:06 2016 +0200
+
+idn: switch to libidn2 use and IDNA2008 support
+
+CVE: CVE-2016-8625
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102K.html
+Reported-by: Christian Heimes
+
+Conflicts:
+   CMakeLists.txt
+   lib/url.c
+
+Signed-off-by: Martin Borg 
+Signed-off-by: Sona Sarmadi 
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 06f18cf..c3e5c7c 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -440,7 +440,7 @@ if(NOT CURL_DISABLE_LDAPS)
+ endif()
+ 
+ # Check for idn
+-check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
++check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
+ 
+ # Check for symbol dlopen (same as HAVE_LIBDL)
+ check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
+@@ -608,7 +608,7 @@ check_include_file_concat("des.h"HAVE_DES_H)
+ check_include_file_concat("err.h"HAVE_ERR_H)
+ check_include_file_concat("errno.h"  HAVE_ERRNO_H)
+ check_include_file_concat("fcntl.h"  HAVE_FCNTL_H)
+-check_include_file_concat("idn-free.h"   HAVE_IDN_FREE_H)
++check_include_file_concat("idn2.h"   HAVE_IDN2_H)
+ check_include_file_concat("ifaddrs.h"HAVE_IFADDRS_H)
+ check_include_file_concat("io.h" HAVE_IO_H)
+ check_include_file_concat("krb.h"HAVE_KRB_H)
+@@ -638,7 +638,6 @@ check_include_file_concat("stropts.h"
HAVE_STROPTS_H)
+ check_include_file_concat("termio.h" HAVE_TERMIO_H)
+ check_include_file_concat("termios.h"HAVE_TERMIOS_H)
+ check_include_file_concat("time.h"   HAVE_TIME_H)
+-check_include_file_concat("tld.h"HAVE_TLD_H)
+ check_include_file_concat("unistd.h" HAVE_UNISTD_H)
+ check_include_file_concat("utime.h"  HAVE_UTIME_H)
+ check_include_file_concat("x509.h"   HAVE_X509_H)
+@@ -652,9 +651,6 @@ check_include_file_concat("netinet/if_ether.h" 
HAVE_NETINET_IF_ETHER_H)
+ check_include_file_concat("stdint.h"HAVE_STDINT_H)
+ check_include_file_concat("sockio.h"HAVE_SOCKIO_H)
+ check_include_file_concat("sys/utsname.h"   HAVE_SYS_UTSNAME_H)
+-check_include_file_concat("idna.h"  HAVE_IDNA_H)
+-
+-
+ 
+ check_type_size(size_t  SIZEOF_SIZE_T)
+ check_type_size(ssize_t  SIZEOF_SSIZE_T)
+@@ -802,9 +798,6 @@ check_symbol_exists(pipe   "${CURL_INCLUDES}" 
HAVE_PIPE)
+ check_symbol_exists(ftruncate  "${CURL_INCLUDES}" HAVE_FTRUNCATE)
+ check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
+ check_symbol_exists(getrlimit  "${CURL_INCLUDES}" HAVE_GETRLIMIT)
+-check_symbol_exists(idn_free   "${CURL_INCLUDES}" HAVE_IDN_FREE)
+-check_symbol_exists(idna_strerror  "${CURL_INCLUDES}" HAVE_IDNA_STRERROR)
+-check_symbol_exists(tld_strerror   "${CURL_INCLUDES}" HAVE_TLD_STRERROR)
+ check_symbol_exists(setlocale  "${CURL_INCLUDES}" HAVE_SETLOCALE)
+ check_symbol_exists(setrlimit  "${CURL_INCLUDES}" HAVE_SETRLIMIT)
+ check_symbol_exists(fcntl  "${CURL_INCLUDES}" HAVE_FCNTL)
+@@ -1067,7 +1060,7 @@ _add_if("IPv6"  ENABLE_IPV6)
+ _add_if("unix-sockets"  USE_UNIX_SOCKETS)
+ _add_if("libz"  HAVE_LIBZ)
+ _add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX)
+-_add_if("IDN"   HAVE_LIBIDN)
++_add_if("IDN"   HAVE_LIBIDN2)
+ # TODO SSP1 (WinSSL) check is missing
+ _add_if("SSPI"  USE_WINDOWS_SSPI)
+ _add_if("GSS-API"   HAVE_GSSAPI)
+diff --git a/configure.ac b/configure.ac
+index 4c9862f..c8e2721 100644
+--- a/configure.ac
 b/configure.ac
+@@ -157,7 +157,7 @@ curl_tls_srp_msg="no  (--enable-tls-srp)"
+ curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
+curl_ipv6_msg="no  (--enable-ipv6)"
+ curl_unix_sockets_msg="no  (--enable-unix-sockets)"
+-curl_idn_msg="no  (--with-{libidn,winidn})"
++curl_idn_msg="no  (--with-{libidn2,winidn})"
+  curl_manual_msg="no  (--enable-manual)"
+ curl_libcurl_msg="enabled 

[OE-core] [PATCHv5][krogoth 06/11] curl: CVE-2016-8620

2016-11-15 Thread Sona Sarmadi
glob parser write/read out of bounds

Affected versions: curl 7.34.0 to and including 7.50.3
Reference:
https://curl.haxx.se/docs/adv_20161102F.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8620.patch | 44 ++
 meta/recipes-support/curl/curl_7.47.1.bb   |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8620.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8620.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8620.patch
new file mode 100644
index 000..613ace3
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8620.patch
@@ -0,0 +1,44 @@
+From fbb5f1aa0326d485d5a7ac643b48481897ca667f Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Mon, 3 Oct 2016 17:27:16 +0200
+Subject: [PATCH] range: prevent negative end number in a glob range
+
+CVE: CVE-2016-8620
+
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102F.html
+Reported-by: Luật Nguyễn
+Signed-off-by: Sona Sarmadi 
+---
+ src/tool_urlglob.c | 7 +++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
+index a357b8b..64c75ba 100644
+--- a/src/tool_urlglob.c
 b/src/tool_urlglob.c
+@@ -257,6 +257,12 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
+ endp = NULL;
+   else {
+ pattern = endp+1;
++while(*pattern && ISBLANK(*pattern))
++  pattern++;
++if(!ISDIGIT(*pattern)) {
++  endp = NULL;
++  goto fail;
++}
+ errno = 0;
+ max_n = strtoul(pattern, , 10);
+ if(errno || (*endp == ':')) {
+@@ -277,6 +283,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
+   }
+ }
+ 
++fail:
+ *posp += (pattern - *patternp);
+ 
+ if(!endp || (min_n > max_n) || (step_n > (max_n - min_n)) || !step_n)
+-- 
+1.9.1
+
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index 9ef5718..e6ad03f 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -20,6 +20,7 @@ SRC_URI += " file://configure_ac.patch \
  file://CVE-2016-8617.patch \
  file://CVE-2016-8618.patch \
  file://CVE-2016-8619.patch \
+ file://CVE-2016-8620.patch \
"
 
 SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-- 
1.9.1

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


[OE-core] [PATCHv5][krogoth 07/11] curl: CVE-2016-8621

2016-11-15 Thread Sona Sarmadi
curl_getdate read out of bounds

Affected versions: curl 7.12.2 to and including 7.50.3
Reference:
https://curl.haxx.se/docs/adv_20161102G.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8621.patch | 120 +
 meta/recipes-support/curl/curl_7.47.1.bb   |   1 +
 2 files changed, 121 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8621.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8621.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8621.patch
new file mode 100644
index 000..7345838
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8621.patch
@@ -0,0 +1,120 @@
+From 8a6d9ded5f02f0294ae63a007e26087316c1998e Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Tue, 4 Oct 2016 16:59:38 +0200
+Subject: [PATCH] parsedate: handle cut off numbers better
+
+... and don't read outside of the given buffer!
+
+CVE: CVE-2016-8621
+Upstream-Status: Backport
+
+bug: https://curl.haxx.se/docs/adv_20161102G.html
+Reported-by: Luật Nguyễn
+Signed-off-by: Sona Sarmadi 
+---
+ lib/parsedate.c| 12 +++-
+ tests/data/test517 |  6 ++
+ tests/libtest/lib517.c |  8 +++-
+ 3 files changed, 20 insertions(+), 6 deletions(-)
+
+diff --git a/lib/parsedate.c b/lib/parsedate.c
+index dfcf855..8e932f4 100644
+--- a/lib/parsedate.c
 b/lib/parsedate.c
+@@ -3,11 +3,11 @@
+  *  Project ___| | | |  _ \| |
+  * / __| | | | |_) | |
+  *| (__| |_| |  _ <| |___
+  * \___|\___/|_| \_\_|
+  *
+- * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al.
+  *
+  * This software is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution. The terms
+  * are also available at https://curl.haxx.se/docs/copyright.html.
+  *
+@@ -384,19 +384,21 @@ static int parsedate(const char *date, time_t *output)
+ }
+ else if(ISDIGIT(*date)) {
+   /* a digit */
+   int val;
+   char *end;
++  int len=0;
+   if((secnum == -1) &&
+- (3 == sscanf(date, "%02d:%02d:%02d", , , ))) {
++ (3 == sscanf(date, "%02d:%02d:%02d%n",
++  , , , ))) {
+ /* time stamp! */
+-date += 8;
++date += len;
+   }
+   else if((secnum == -1) &&
+-  (2 == sscanf(date, "%02d:%02d", , ))) {
++  (2 == sscanf(date, "%02d:%02d%n", , , ))) {
+ /* time stamp without seconds */
+-date += 5;
++date += len;
+ secnum = 0;
+   }
+   else {
+ long lval;
+ int error;
+diff --git a/tests/data/test517 b/tests/data/test517
+index c81a45e..513634f 100644
+--- a/tests/data/test517
 b/tests/data/test517
+@@ -114,10 +114,16 @@ nothing
+ 79: 20110632 12:34:56 => -1
+ 80: 20110623 56:34:56 => -1
+ 81: 20111323 12:34:56 => -1
+ 82: 20110623 12:34:79 => -1
+ 83: Wed, 31 Dec 2008 23:59:60 GMT => 1230768000
++84: 20110623 12:3 => 1308830580
++85: 20110623 1:3 => 1308790980
++86: 20110623 1:30 => 1308792600
++87: 20110623 12:12:3 => 1308831123
++88: 20110623 01:12:3 => 1308791523
++89: 20110623 01:99:30 => -1
+ 
+ 
+ # This test case previously tested an overflow case ("2094 Nov 6 =>
+ # 2147483647") for 32bit time_t, but since some systems have 64bit time_t and
+ # handles this (returning 393984), and some 64bit-time_t systems don't
+diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c
+index 2f68ebd..22162ff 100644
+--- a/tests/libtest/lib517.c
 b/tests/libtest/lib517.c
+@@ -3,11 +3,11 @@
+  *  Project ___| | | |  _ \| |
+  * / __| | | | |_) | |
+  *| (__| |_| |  _ <| |___
+  * \___|\___/|_| \_\_|
+  *
+- * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al.
+  *
+  * This software is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution. The terms
+  * are also available at https://curl.haxx.se/docs/copyright.html.
+  *
+@@ -114,10 +114,16 @@ static const char * const dates[]={
+   "20110632 12:34:56",
+   "20110623 56:34:56",
+   "20111323 12:34:56",
+   "20110623 12:34:79",
+   "Wed, 31 Dec 2008 23:59:60 GMT", /* leap second */
++  "20110623 12:3",
++  "20110623 1:3",
++  "20110623 1:30",
++  "20110623 12:12:3",
++  "20110623 01:12:3",
++  "20110623 01:99:30",
+   NULL
+ };
+ 
+ int test(char *URL)
+ {
+-- 
+2.9.3
+
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index e6ad03f..67b07da 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb

[OE-core] [PATCHv5][krogoth 01/11] curl: CVE-2016-8615

2016-11-15 Thread Sona Sarmadi
cookie injection for other servers

Affected versions: curl 7.1 to and including 7.50.3

Reference:
https://curl.haxx.se/docs/adv_20161102A.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8615.patch | 77 ++
 meta/recipes-support/curl/curl_7.47.1.bb   |  1 +
 2 files changed, 78 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8615.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8615.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8615.patch
new file mode 100644
index 000..5faa423
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8615.patch
@@ -0,0 +1,77 @@
+From 1620f552a277ed5b23a48b9c27dbf07663cac068 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Tue, 27 Sep 2016 17:36:19 +0200
+Subject: [PATCH] cookie: replace use of fgets() with custom version
+
+... that will ignore lines that are too long to fit in the buffer.
+
+CVE: CVE-2016-8615
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102A.html
+Reported-by: Cure53
+Signed-off-by: Sona Sarmadi 
+---
+ lib/cookie.c | 31 ++-
+ 1 file changed, 30 insertions(+), 1 deletion(-)
+
+diff --git a/lib/cookie.c b/lib/cookie.c
+index 0f05da2..e5097d3 100644
+--- a/lib/cookie.c
 b/lib/cookie.c
+@@ -901,10 +901,39 @@ Curl_cookie_add(struct Curl_easy *data,
+   }
+ 
+   return co;
+ }
+ 
++/*
++ * get_line() makes sure to only return complete whole lines that fit in 'len'
++ * bytes and end with a newline.
++ */
++static char *get_line(char *buf, int len, FILE *input)
++{
++  bool partial = FALSE;
++  while(1) {
++char *b = fgets(buf, len, input);
++if(b) {
++  size_t rlen = strlen(b);
++  if(rlen && (b[rlen-1] == '\n')) {
++if(partial) {
++  partial = FALSE;
++  continue;
++}
++return b;
++  }
++  else
++/* read a partial, discard the next piece that ends with newline */
++partial = TRUE;
++}
++else
++  break;
++  }
++  return NULL;
++}
++
++
+ /*
+  *
+  * Curl_cookie_init()
+  *
+  * Inits a cookie struct to read data from a local file. This is always
+@@ -957,11 +986,11 @@ struct CookieInfo *Curl_cookie_init(struct Curl_easy 
*data,
+ bool headerline;
+ 
+ line = malloc(MAX_COOKIE_LINE);
+ if(!line)
+   goto fail;
+-while(fgets(line, MAX_COOKIE_LINE, fp)) {
++while(get_line(line, MAX_COOKIE_LINE, fp)) {
+   if(checkprefix("Set-Cookie:", line)) {
+ /* This is a cookie line, get it! */
+ lineptr=[11];
+ headerline=TRUE;
+   }
+-- 
+2.9.3
+
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index 3670a11..1f2758c 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -15,6 +15,7 @@ SRC_URI += " file://configure_ac.patch \
  file://CVE-2016-5420.patch \
  file://CVE-2016-5421.patch \
  file://CVE-2016-7141.patch \
+ file://CVE-2016-8615.patch \
"
 
 SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-- 
1.9.1

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


[OE-core] [PATCHv5][krogoth 08/11] curl: CVE-2016-8622

2016-11-15 Thread Sona Sarmadi
URL unescape heap overflow via integer truncation

Affected versions: curl 7.24.0 to and including 7.50.3
Reference:
https://curl.haxx.se/docs/adv_20161102H.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8622.patch | 94 ++
 meta/recipes-support/curl/curl_7.47.1.bb   |  1 +
 2 files changed, 95 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8622.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8622.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8622.patch
new file mode 100644
index 000..8edad01
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8622.patch
@@ -0,0 +1,94 @@
+From 53e71e47d6b81650d26ec33a58d0dca24c7ffb2c Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Tue, 4 Oct 2016 18:56:45 +0200
+Subject: [PATCH] unescape: avoid integer overflow
+
+CVE: CVE-2016-8622
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102H.html
+Reported-by: Cure53
+
+Signed-off-by: Sona Sarmadi 
+
+diff -ruN a/docs/libcurl/curl_easy_unescape.3 
b/docs/libcurl/curl_easy_unescape.3
+--- a/docs/libcurl/curl_easy_unescape.32016-02-03 00:08:02.0 
+0100
 b/docs/libcurl/curl_easy_unescape.32016-11-07 09:25:45.33275 
+0100
+@@ -5,7 +5,7 @@
+ .\" *| (__| |_| |  _ <| |___
+ .\" * \___|\___/|_| \_\_|
+ .\" *
+-.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al.
++.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al.
+ .\" *
+ .\" * This software is licensed as described in the file COPYING, which
+ .\" * you should have received as part of this distribution. The terms
+@@ -40,7 +40,10 @@
+ 
+ If \fBoutlength\fP is non-NULL, the function will write the length of the
+ returned string in the integer it points to. This allows an escaped string
+-containing %00 to still get used properly after unescaping.
++containing %00 to still get used properly after unescaping. Since this is a
++pointer to an \fIint\fP type, it can only return a value up to INT_MAX so no
++longer string can be unescaped if the string length is returned in this
++parameter.
+ 
+ You must \fIcurl_free(3)\fP the returned string when you're done with it.
+ .SH AVAILABILITY
+diff -ruN a/lib/dict.c b/lib/dict.c
+--- a/lib/dict.c   2016-02-03 00:02:44.0 +0100
 b/lib/dict.c   2016-11-07 09:25:45.33275 +0100
+@@ -5,7 +5,7 @@
+  *| (__| |_| |  _ <| |___
+  * \___|\___/|_| \_\_|
+  *
+- * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al.
+  *
+  * This software is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution. The terms
+@@ -52,7 +52,7 @@
+ #include 
+ #include "transfer.h"
+ #include "sendf.h"
+-
++#include "escape.h"
+ #include "progress.h"
+ #include "strequal.h"
+ #include "dict.h"
+@@ -96,12 +96,12 @@
+   char *newp;
+   char *dictp;
+   char *ptr;
+-  int len;
++  size_t len;
+   char ch;
+   int olen=0;
+ 
+-  newp = curl_easy_unescape(data, inputbuff, 0, );
+-  if(!newp)
++  CURLcode result = Curl_urldecode(data, inputbuff, 0, , , FALSE);
++  if(!newp || result)
+ return NULL;
+ 
+   dictp = malloc(((size_t)len)*2 + 1); /* add one for terminating zero */
+diff -ruN a/lib/escape.c b/lib/escape.c
+--- a/lib/escape.c 2016-02-05 10:02:03.0 +0100
 b/lib/escape.c 2016-11-07 09:29:43.073671606 +0100
+@@ -217,8 +217,14 @@
+ FALSE);
+   if(res)
+ return NULL;
+-  if(olen)
+-*olen = curlx_uztosi(outputlen);
++
++if(olen) {
++  if(outputlen <= (size_t) INT_MAX)
++*olen = curlx_uztosi(outputlen);
++  else
++/* too large to return in an int, fail! */
++Curl_safefree(str);
++}
+   return str;
+ }
+ 
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index 67b07da..4bff34e 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -22,6 +22,7 @@ SRC_URI += " file://configure_ac.patch \
  file://CVE-2016-8619.patch \
  file://CVE-2016-8620.patch \
  file://CVE-2016-8621.patch \
+ file://CVE-2016-8622.patch \
"
 
 SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-- 
1.9.1

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


[OE-core] [PATCHv5][krogoth 09/11] curl: CVE-2016-8623

2016-11-15 Thread Sona Sarmadi
Use-after-free via shared cookies

Affected versions: curl 7.10.7 to and including 7.50.3
Reference:
https://curl.haxx.se/docs/adv_20161102I.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8623.patch | 209 +
 meta/recipes-support/curl/curl_7.47.1.bb   |   1 +
 2 files changed, 210 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8623.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8623.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8623.patch
new file mode 100644
index 000..d9ddef6
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8623.patch
@@ -0,0 +1,209 @@
+From d9d57fe0da6f25d05570fd583520ecd321ed9c3f Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Tue, 4 Oct 2016 23:26:13 +0200
+Subject: [PATCH] cookies: getlist() now holds deep copies of all cookies
+
+Previously it only held references to them, which was reckless as the
+thread lock was released so the cookies could get modified by other
+handles that share the same cookie jar over the share interface.
+
+CVE: CVE-2016-8623
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102I.html
+Reported-by: Cure53
+Signed-off-by: Sona Sarmadi 
+---
+ lib/cookie.c | 61 +++-
+ lib/cookie.h |  4 ++--
+ lib/http.c   |  2 +-
+ 3 files changed, 43 insertions(+), 24 deletions(-)
+
+diff --git a/lib/cookie.c b/lib/cookie.c
+index 0f05da2..8607ce3 100644
+--- a/lib/cookie.c
 b/lib/cookie.c
+@@ -1022,10 +1022,44 @@ static int cookie_sort(const void *p1, const void *p2)
+ 
+   /* sorry, can't be more deterministic */
+   return 0;
+ }
+ 
++#define CLONE(field) \
++  do {   \
++if(src->field) { \
++  dup->field = strdup(src->field);   \
++  if(!dup->field)\
++goto fail;   \
++}\
++  } while(0)
++
++static struct Cookie *dup_cookie(struct Cookie *src)
++{
++  struct Cookie *dup = calloc(sizeof(struct Cookie), 1);
++  if(dup) {
++CLONE(expirestr);
++CLONE(domain);
++CLONE(path);
++CLONE(spath);
++CLONE(name);
++CLONE(value);
++CLONE(maxage);
++CLONE(version);
++dup->expires = src->expires;
++dup->tailmatch = src->tailmatch;
++dup->secure = src->secure;
++dup->livecookie = src->livecookie;
++dup->httponly = src->httponly;
++  }
++  return dup;
++
++  fail:
++  freecookie(dup);
++  return NULL;
++}
++
+ /*
+  *
+  * Curl_cookie_getlist()
+  *
+  * For a given host and path, return a linked list of cookies that the
+@@ -1077,15 +,12 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo 
*c,
+ if(!co->spath || pathmatch(co->spath, path) ) {
+ 
+   /* and now, we know this is a match and we should create an
+  entry for the return-linked-list */
+ 
+-  newco = malloc(sizeof(struct Cookie));
++  newco = dup_cookie(co);
+   if(newco) {
+-/* first, copy the whole source cookie: */
+-memcpy(newco, co, sizeof(struct Cookie));
+-
+ /* then modify our next */
+ newco->next = mainco;
+ 
+ /* point the main to us */
+ mainco = newco;
+@@ -1093,16 +1124,11 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo 
*c,
+ matches++;
+   }
+   else {
+ fail:
+ /* failure, clear up the allocated chain and return NULL */
+-while(mainco) {
+-  co = mainco->next;
+-  free(mainco);
+-  mainco = co;
+-}
+-
++Curl_cookie_freelist(mainco);
+ return NULL;
+   }
+ }
+   }
+ }
+@@ -1150,11 +1176,11 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo 
*c,
+  *
+  /
+ void Curl_cookie_clearall(struct CookieInfo *cookies)
+ {
+   if(cookies) {
+-Curl_cookie_freelist(cookies->cookies, TRUE);
++Curl_cookie_freelist(cookies->cookies);
+ cookies->cookies = NULL;
+ cookies->numcookies = 0;
+   }
+ }
+ 
+@@ -1162,25 +1188,18 @@ void Curl_cookie_clearall(struct CookieInfo *cookies)
+  *
+  * Curl_cookie_freelist()
+  *
+  * Free a list of cookies previously returned by Curl_cookie_getlist();
+  *
+- * The 'cookiestoo' argument tells this function whether to just free the
+- * list or actually also free all cookies within the list as well.
+- *
+  /
+ 
+-void Curl_cookie_freelist(struct Cookie *co, bool cookiestoo)
++void Curl_cookie_freelist(struct Cookie *co)
+ {
+   struct Cookie *next;
+   while(co) {
+   

[OE-core] [PATCHv5][krogoth 05/11] curl: CVE-2016-8619

2016-11-15 Thread Sona Sarmadi
double-free in krb5 code

Affected versions: curl 7.3 to and including 7.50.3
Reference:
https://curl.haxx.se/docs/adv_20161102E.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8619.patch | 52 ++
 meta/recipes-support/curl/curl_7.47.1.bb   |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8619.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8619.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8619.patch
new file mode 100644
index 000..fb21cf6
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8619.patch
@@ -0,0 +1,52 @@
+From 91239f7040b1f026d4d15765e7e3f58e92e93761 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Wed, 28 Sep 2016 12:56:02 +0200
+Subject: [PATCH] krb5: avoid realloc(0)
+
+If the requested size is zero, bail out with error instead of doing a
+realloc() that would cause a double-free: realloc(0) acts as a free()
+and then there's a second free in the cleanup path.
+
+CVE: CVE-2016-8619
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102E.html
+Reported-by: Cure53
+Signed-off-by: Sona Sarmadi 
+---
+ lib/security.c | 9 ++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/lib/security.c b/lib/security.c
+index a268d4a..4cef8f8 100644
+--- a/lib/security.c
 b/lib/security.c
+@@ -190,19 +190,22 @@ socket_write(struct connectdata *conn, curl_socket_t fd, 
const void *to,
+ static CURLcode read_data(struct connectdata *conn,
+   curl_socket_t fd,
+   struct krb5buffer *buf)
+ {
+   int len;
+-  void* tmp;
++  void *tmp = NULL;
+   CURLcode result;
+ 
+   result = socket_read(fd, , sizeof(len));
+   if(result)
+ return result;
+ 
+-  len = ntohl(len);
+-  tmp = realloc(buf->data, len);
++  if(len) {
++/* only realloc if there was a length */
++len = ntohl(len);
++tmp = realloc(buf->data, len);
++  }
+   if(tmp == NULL)
+ return CURLE_OUT_OF_MEMORY;
+ 
+   buf->data = tmp;
+   result = socket_read(fd, buf->data, len);
+-- 
+2.9.3
+
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index 27a999e..9ef5718 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -19,6 +19,7 @@ SRC_URI += " file://configure_ac.patch \
  file://CVE-2016-8616.patch \
  file://CVE-2016-8617.patch \
  file://CVE-2016-8618.patch \
+ file://CVE-2016-8619.patch \
"
 
 SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-- 
1.9.1

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


[OE-core] [PATCHv5][krogoth 02/11] curl: CVE-2016-8616

2016-11-15 Thread Sona Sarmadi
case insensitive password comparison

Affected versions: curl 7.7 to and including 7.50.3

Reference:
https://curl.haxx.se/docs/adv_20161102B.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8616.patch | 49 ++
 meta/recipes-support/curl/curl_7.47.1.bb   |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8616.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8616.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8616.patch
new file mode 100644
index 000..d5d78fc
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8616.patch
@@ -0,0 +1,49 @@
+From b3ee26c5df75d97f6895e6ec4538894ebaf76e48 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Tue, 27 Sep 2016 18:01:53 +0200
+Subject: [PATCH] connectionexists: use case sensitive user/password
+ comparisons
+
+CVE: CVE-2016-8616
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102B.html
+Reported-by: Cure53
+Signed-off-by: Sona Sarmadi 
+
+diff -ruN a/lib/url.c b/lib/url.c
+--- a/lib/url.c2016-11-07 08:50:23.030126833 +0100
 b/lib/url.c2016-11-07 09:16:20.459836564 +0100
+@@ -3305,8 +3305,8 @@
+   if(!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) {
+ /* This protocol requires credentials per connection,
+so verify that we're using the same name and password as well */
+-if(!strequal(needle->user, check->user) ||
+-   !strequal(needle->passwd, check->passwd)) {
++if(strcmp(needle->user, check->user) ||
++   strcmp(needle->passwd, check->passwd)) {
+   /* one of them was different */
+   continue;
+ }
+@@ -3369,8 +3369,8 @@
+possible. (Especially we must not reuse the same connection if
+partway through a handshake!) */
+ if(wantNTLMhttp) {
+-  if(!strequal(needle->user, check->user) ||
+- !strequal(needle->passwd, check->passwd))
++  if(strcmp(needle->user, check->user) ||
++ strcmp(needle->passwd, check->passwd))
+ continue;
+ }
+ else if(check->ntlm.state != NTLMSTATE_NONE) {
+@@ -3380,8 +3380,8 @@
+ 
+ /* Same for Proxy NTLM authentication */
+ if(wantProxyNTLMhttp) {
+-  if(!strequal(needle->proxyuser, check->proxyuser) ||
+- !strequal(needle->proxypasswd, check->proxypasswd))
++  if(strcmp(needle->proxyuser, check->proxyuser) ||
++ strcmp(needle->proxypasswd, check->proxypasswd))
+ continue;
+ }
+ else if(check->proxyntlm.state != NTLMSTATE_NONE) {
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index 1f2758c..20c3721 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -16,6 +16,7 @@ SRC_URI += " file://configure_ac.patch \
  file://CVE-2016-5421.patch \
  file://CVE-2016-7141.patch \
  file://CVE-2016-8615.patch \
+ file://CVE-2016-8616.patch \
"
 
 SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-- 
1.9.1

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


[OE-core] [PATCHv5][krogoth 04/11] curl: CVE-2016-8618

2016-11-15 Thread Sona Sarmadi
double-free in curl_maprintf

Affected versions: curl 7.1 to and including 7.50.3
Reference:
https://curl.haxx.se/docs/adv_20161102D.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8618.patch | 52 ++
 meta/recipes-support/curl/curl_7.47.1.bb   |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8618.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8618.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8618.patch
new file mode 100644
index 000..2fd4749
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8618.patch
@@ -0,0 +1,52 @@
+From 31106a073882656a2a5ab56c4ce2847e9a334c3c Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Wed, 28 Sep 2016 10:15:34 +0200
+Subject: [PATCH] aprintf: detect wrap-around when growing allocation
+
+On 32bit systems we could otherwise wrap around after 2GB and allocate 0
+bytes and crash.
+
+CVE: CVE-2016-8618
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102D.html
+Reported-by: Cure53
+Signed-off-by: Sona Sarmadi 
+---
+ lib/mprintf.c | 9 ++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/lib/mprintf.c b/lib/mprintf.c
+index dbedeaa..2c88aa8 100644
+--- a/lib/mprintf.c
 b/lib/mprintf.c
+@@ -1034,20 +1034,23 @@ static int alloc_addbyter(int output, FILE *data)
+ }
+ infop->alloc = 32;
+ infop->len =0;
+   }
+   else if(infop->len+1 >= infop->alloc) {
+-char *newptr;
++char *newptr = NULL;
++size_t newsize = infop->alloc*2;
+ 
+-newptr = realloc(infop->buffer, infop->alloc*2);
++/* detect wrap-around or other overflow problems */
++if(newsize > infop->alloc)
++  newptr = realloc(infop->buffer, newsize);
+ 
+ if(!newptr) {
+   infop->fail = 1;
+   return -1; /* fail */
+ }
+ infop->buffer = newptr;
+-infop->alloc *= 2;
++infop->alloc = newsize;
+   }
+ 
+   infop->buffer[ infop->len ] = outc;
+ 
+   infop->len++;
+-- 
+2.9.3
+
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index 3724411..27a999e 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -18,6 +18,7 @@ SRC_URI += " file://configure_ac.patch \
  file://CVE-2016-8615.patch \
  file://CVE-2016-8616.patch \
  file://CVE-2016-8617.patch \
+ file://CVE-2016-8618.patch \
"
 
 SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-- 
1.9.1

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


[OE-core] [PATCHv5][krogoth 03/11] curl: CVE-2016-8617

2016-11-15 Thread Sona Sarmadi
OOB write via unchecked multiplication

Affected versions: curl 7.1 to and including 7.50.3

Reference:
https://curl.haxx.se/docs/adv_20161102C.html

Signed-off-by: Sona Sarmadi 
---
 meta/recipes-support/curl/curl/CVE-2016-8617.patch | 28 ++
 meta/recipes-support/curl/curl_7.47.1.bb   |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2016-8617.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2016-8617.patch 
b/meta/recipes-support/curl/curl/CVE-2016-8617.patch
new file mode 100644
index 000..d16c2f5
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8617.patch
@@ -0,0 +1,28 @@
+From efd24d57426bd77c9b5860e6b297904703750412 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg 
+Date: Wed, 28 Sep 2016 00:05:12 +0200
+Subject: [PATCH] base64: check for integer overflow on large input
+
+CVE: CVE-2016-8617
+Upstream-Status: Backport
+
+Bug: https://curl.haxx.se/docs/adv_20161102C.html
+Reported-by: Cure53
+
+Signed-off-by: Sona Sarmadi 
+---
+diff -ruN a/lib/base64.c b/lib/base64.c
+--- a/lib/base64.c 2016-02-03 00:02:43.0 +0100
 b/lib/base64.c 2016-11-07 09:22:07.918167530 +0100
+@@ -190,6 +190,11 @@
+   if(0 == insize)
+ insize = strlen(indata);
+ 
++#if SIZEOF_SIZE_T == 4
++  if(insize > UINT_MAX/4)
++return CURLE_OUT_OF_MEMORY;
++#endif
++
+   base64data = output = malloc(insize*4/3+4);
+   if(NULL == output)
+ return CURLE_OUT_OF_MEMORY;
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb 
b/meta/recipes-support/curl/curl_7.47.1.bb
index 20c3721..3724411 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -17,6 +17,7 @@ SRC_URI += " file://configure_ac.patch \
  file://CVE-2016-7141.patch \
  file://CVE-2016-8615.patch \
  file://CVE-2016-8616.patch \
+ file://CVE-2016-8617.patch \
"
 
 SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
-- 
1.9.1

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


[OE-core] [PATCH 00/57] Consolidated Pull

2016-11-15 Thread Ross Burton
Consolidated pull, generally green on the AB.  The last build run failed in
qemumips64 sanity testing but has previously passed so this appears to be a new
transient failure.  oe-core runs are failing in eSDK creation but this needs
modifications to the autobuiler itself.

Ross

The following changes since commit 43e652f3d1fee5ce7fad67e6400315eab1b34270:

  devtool: add "rename" subcommand (2016-11-07 11:04:22 +)

are available in the git repository at:

  ssh://g...@git.yoctoproject.org/poky-contrib ross/mut

for you to fetch changes up to cb4f6ebe47032fba4d63259524aa4f3d36e1b0aa:

  maintainers.inc: remove libwnck3 recipe (2016-11-15 08:49:49 +)


Alexander Kanavin (1):
  maintainers.inc: remove libwnck3 recipe

Alistair Francis (1):
  runqemu: Split out the base name of QB_DEFAULT_KERNEL

André Draszik (2):
  image-buildinfo: treat staged changes as modified branch, too
  cve-check.bbclass: CVE-2014-2524 / readline v5.2

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

Brad Bishop (1):
  libyaml: Enable nativesdk bake

Carlos Alberto Lopez Perez (1):
  webkitgtk: drop patch 
0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch

Ed Bartosh (1):
  systemd-bootdisk.wks: use PARTUUID

Fabio Berton (5):
  serf: Update to version 1.3.9
  grep: Update to version 2.26
  curl: Update to version 7.51.0
  gawk: Update to version 4.1.4
  libpcap: Update to version 1.8.1

Fathi Boudra (1):
  wayland: upgrade from 1.11.1 to 1.12.0

Jackie Huang (1):
  classes/cpan-base: fix for PERLVERSION

Joe Konno (1):
  initrdscripts: add support for NVME target install

Joshua Lock (5):
  lib/oe/path: remove duplicate import
  lib/oe/lsb: make the release dict keys consistent regardless of source
  lib/oe/lsb: prefer /etc/os-release for distribution data
  lib/oe/lsb: attempt to ensure consistent distro id regardless of source
  poky: update SANITY_TEST_DISTROS for new format

Jussi Kukkonen (1):
  conf: Remove legacy X input drivers

Khem Raj (3):
  libbsd: Fix build with musl
  glibc-2.0: Detect pthread_getname_np() before use
  x264: Update to latest on stable branch

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

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

Maciej Borzecki (5):
  wic: make sure that partition size is always an integer in internal 
processing
  wic: use partition size when creating empty partition files
  wic: check that filesystem is specified for a rootfs partition
  wic: fix function comment typos
  oe-selftest: fix handling of test cases without ID in --list-tests-by

Markus Lehtonen (1):
  sanity.bbclass: fix logging of an error

Maxin B. John (1):
  ref-images.xml: remove core-image-directfb reference

Richard Purdie (1):
  chrpath: Remove standard search paths from RPATHS

Robert Yang (2):
  qemuarm64.conf: make runqemu's graphics work
  populate_sdk_ext.bbclass: check unfsd before create it

Ross Burton (6):
  conf/distro/include/maintainers: move toolchain to Khem Raj
  Revert "oeqa/selftest/kernel.py: Add new file destined for kernel related 
tests"
  distro_check: MeeGo is long dead, compare against Clear Linux instead
  lib/oe/qa: handle binaries with segments outside the first 4kb
  systemtap: remove explicit msgfmt check
  systemtap: fix native linking on recent Ubuntu

Zubair Lutfullah Kakakhel (13):
  arch-mips: Add o32 in TUNE_FEATURES for MIPS32R6
  arch-mips: Add MACHINEOVERRIDES variables to reduce duplication
  bitbake.conf: Reduce duplication in MIPS variants
  fts: Reduce duplication in MIPS variants.
  glibc: Reduce duplication in MIPS variants
  packagegroup: Reduce duplication in MIPS variants.
  gcc-runtime: Reduce duplication in MIPS variants.
  gdb: Reduce duplication in MIPS variants.
  mmc-utils: Reduce duplication in MIPS variants.
  valgrind: Reduce duplication in MIPS variants.
  ghostscript: Reduce duplication in MIPS variants.
  mdadm: Reduce duplication in MIPS variants.
  webkit: Reduce duplication in MIPS variants.

 documentation/ref-manual/ref-images.xml|   3 -
 meta-poky/conf/distro/include/maintainers.inc  |  59 ++--
 meta-poky/conf/distro/poky.conf|  24 +-
 meta-yocto-bsp/conf/machine/beaglebone.conf|   4 +-
 meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf  |   1 -
 meta/classes/chrpath.bbclass   |  13 +-
 meta/classes/cpan-base.bbclass |   2 +-
 meta/classes/cve-check.bbclass |   2 +-
 meta/classes/image-buildinfo.bbclass   |   4 +-
 meta/classes/populate_sdk_ext.bbclass  |   5 +-
 meta/classes/sanity.bbclass|   2 +-
 meta/conf/bitbake.conf