Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC

2016-09-21 Thread Lei, Maohui
Hi Maxin, Simon

> It would be nice to include the reason for change from fossology to dosocs2 
> in the commit message too (from cover letter)

OK, I will add the reasons into the commit message in v3.

> Instead of requesting the user to install the DoSOCSv2 from github or
> other repos, can we make the spdx.bbclass depend on "dosocs-native" or
> similar and make that "DoSOCSv2" recipe available in oe-core ?

That's a good idea. I will try.


Best Regards
Lei


> -Original Message-
> From: Maxin B. John [mailto:maxin.j...@intel.com]
> Sent: Monday, September 19, 2016 6:58 PM
> To: Lei, Maohui
> Cc: openembedded-core@lists.openembedded.org;
> jsmoel...@linuxfoundation.org
> Subject: Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0
> SPEC
> 
> Hi,
> 
> Please find my comments below:
> 
> On Mon, Sep 19, 2016 at 04:39:50PM +0800, Lei Maohui wrote:
> > More:
> > - change spdx tool from fossology to dosocs2
> 
> It would be nice to include the reason for change from fossology to
> dosocs2 in the commit message too (from cover letter)
> 
> > Signed-off-by: Lei Maohui 
> > ---
> >  meta/classes/spdx.bbclass | 505 ++--
> --
> >  meta/conf/licenses.conf   |  67 +-
> >  2 files changed, 198 insertions(+), 374 deletions(-)
> >
> > diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
> > index 0c92765..27c0fa0 100644
> > --- a/meta/classes/spdx.bbclass
> > +++ b/meta/classes/spdx.bbclass
> > @@ -1,365 +1,252 @@
> >  # This class integrates real-time license scanning, generation of
> > SPDX standard  # output and verifiying license info during the
> building process.
> > -# It is a combination of efforts from the OE-Core, SPDX and
> Fossology projects.
> > +# It is a combination of efforts from the OE-Core, SPDX and DoSOCSv2
> projects.
> >  #
> > -# For more information on FOSSology:
> > -#   http://www.fossology.org
> > -#
> > -# For more information on FOSSologySPDX commandline:
> > -#   https://github.com/spdx-tools/fossology-spdx/wiki/Fossology-
> SPDX-Web-API
> > +# For more information on DoSOCSv2:
> > +#   https://github.com/DoSOCSv2
> 
> Instead of requesting the user to install the DoSOCSv2 from github or
> other repos, can we make the spdx.bbclass depend on "dosocs-native" or
> similar and make that "DoSOCSv2" recipe available in oe-core ?
> 
> That might make it easy to use this class.
> 
> >  # For more information on SPDX:
> >  #   http://www.spdx.org
> >  #
> > +# Note:
> > +# 1) Make sure DoSOCSv2 has beed installed in your host # 2) By
> > +default,spdx files will be output to the path which is defined
> as[SPDX_MANIFEST_DIR]
> > +#in ./meta/conf/licenses.conf.
> >
> > -# SPDX file will be output to the path which is defined
> > as[SPDX_MANIFEST_DIR] -# in ./meta/conf/licenses.conf.
> > +SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir"
> >  SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir"
> >
> >  # If ${S} isn't actually the top-level source directory, set SPDX_S
> > to point at  # the real top-level directory.
> > +
> >  SPDX_S ?= "${S}"
> >
> >  python do_spdx () {
> >  import os, sys
> > -import json, shutil
> > -
> > -info = {}
> > -info['workdir'] = d.getVar('WORKDIR', True)
> > -info['sourcedir'] = d.getVar('SPDX_S', True)
> > -info['pn'] = d.getVar('PN', True)
> > -info['pv'] = d.getVar('PV', True)
> > -info['spdx_version'] = d.getVar('SPDX_VERSION', True)
> > -info['data_license'] = d.getVar('DATA_LICENSE', True)
> > -
> > -sstatedir = d.getVar('SPDXSSTATEDIR', True)
> > -sstatefile = os.path.join(sstatedir, info['pn'] + info['pv'] +
> ".spdx")
> > +import json
> >
> > -manifest_dir = d.getVar('SPDX_MANIFEST_DIR', True)
> > -info['outfile'] = os.path.join(manifest_dir, info['pn'] +
> ".spdx" )
> > +## It's no necessary  to get spdx files for *-native
> > +if d.getVar('PN', True) == d.getVar('BPN', True) + "-native":
> > +return None
> >
> > -info['spdx_temp_dir'] = d.getVar('SPDX_TEMP_DIR', True)
> > -info['tar_file'] = os.path.join(info['workdir'], info['pn'] +
> ".tar.gz" )
> > +## gcc is too big to get spdx file.
> > +if 'gcc' in d.getVar('PN', True):
> > +return None
> >
> > -# Make sure important dirs exist
> > -try:
> > -bb.utils.mkdirhier(manifest_dir)
> > -bb.utils.mkdirhier(sstatedir)
> > -bb.utils.mkdirhier(info['spdx_temp_dir'])
> > -except OSError as e:
> > -bb.error("SPDX: Could not set up required directories: " +
> str(e))
> > -return
> > +info = {}
> > +info['workdir'] = (d.getVar('WORKDIR', True) or "")
> > +info['pn'] = (d.getVar( 'PN', True ) or "")
> > +info['pv'] = (d.getVar( 'PV', True ) or "")
> > +info['package_download_location'] = (d.getVar( 'SRC_URI', True )
> or "")
> > +if info['package_download_location'] != "":
> > +info['package_download_location'] =
> 

Re: [OE-core] [PATCH 1/1] toolchain-shar-relocate.sh: Add error-handling

2016-09-21 Thread Christopher Larson
On Wed, Sep 21, 2016 at 12:54 AM,  wrote:

> diff --git a/meta/files/toolchain-shar-relocate.sh
> b/meta/files/toolchain-shar-relocate.sh
> index d4bcf0e..e491153 100644
> --- a/meta/files/toolchain-shar-relocate.sh
> +++ b/meta/files/toolchain-shar-relocate.sh
> @@ -1,3 +1,8 @@
> +if ! xargs --version > /dev/null 2>&1; then
> +   echo "xargs is required by the relocation script, please install
> it firts. Abort!"
> +   exit 1
> +fi
>

This is pointless, xargs is mandated by posix/sus.
-- 
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] swig: 3.0.8 -> 3.0.10

2016-09-21 Thread Wang, Xin
ping

-Original Message-
From: Wang, Xin/王 鑫 
Sent: Thursday, September 01, 2016 5:08 PM
To: openembedded-core@lists.openembedded.org
Cc: Wang, Xin/王 鑫
Subject: [OE-core][PATCH] swig: 3.0.8 -> 3.0.10

Upgrade swig from 3.0.8 to 3.0.10.

Signed-off-by: Wang Xin 
---
 meta/recipes-devtools/swig/{swig_3.0.8.bb => swig_3.0.10.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)  rename 
meta/recipes-devtools/swig/{swig_3.0.8.bb => swig_3.0.10.bb} (58%)

diff --git a/meta/recipes-devtools/swig/swig_3.0.8.bb 
b/meta/recipes-devtools/swig/swig_3.0.10.bb
similarity index 58%
rename from meta/recipes-devtools/swig/swig_3.0.8.bb
rename to meta/recipes-devtools/swig/swig_3.0.10.bb
index c1b820e..44c26c4 100644
--- a/meta/recipes-devtools/swig/swig_3.0.8.bb
+++ b/meta/recipes-devtools/swig/swig_3.0.10.bb
@@ -3,6 +3,6 @@ require ${BPN}.inc
 SRC_URI += 
"file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
 file://0001-configure-use-pkg-config-for-pcre-detection.patch \
"
-SRC_URI[md5sum] = "c96a1d5ecb13d38604d7e92148c73c97"
-SRC_URI[sha256sum] = 
"58a475dbbd4a4d7075e5fe86d4e54c9edde39847cdb96a3053d87cb64a23a453"
+SRC_URI[md5sum] = "bb4ab8047159469add7d00910e203124"
+SRC_URI[sha256sum] = 
"2939aae39dec06095462f1b95ce1c958ac80d07b926e48871046d17c0094f44c"
 
--
2.7.4



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


Re: [OE-core] [PATCH] ruby: 2.2.5 -> 2.3.1

2016-09-21 Thread Wang, Xin
ping

-Original Message-
From: Wang, Xin/王 鑫 
Sent: Thursday, September 01, 2016 1:36 PM
To: openembedded-core@lists.openembedded.org
Cc: Wang, Xin/王 鑫
Subject: [OE-core][PATCH] ruby: 2.2.5 -> 2.3.1

1) Upgrade ruby from 2.2.5 to 2.3.1.
2) Modify LIC_FILES_CHKSUM, since the date in it has been changed, But the 
LICENSE has not been changed.

Signed-off-by: Wang Xin 
---
 meta/recipes-devtools/ruby/ruby.inc | 2 +-
 meta/recipes-devtools/ruby/{ruby_2.2.5.bb => ruby_2.3.1.bb} | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)  rename 
meta/recipes-devtools/ruby/{ruby_2.2.5.bb => ruby_2.3.1.bb} (89%)

diff --git a/meta/recipes-devtools/ruby/ruby.inc 
b/meta/recipes-devtools/ruby/ruby.inc
index fde67e9..f38ebb0 100644
--- a/meta/recipes-devtools/ruby/ruby.inc
+++ b/meta/recipes-devtools/ruby/ruby.inc
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "\
 file://COPYING;md5=837b32593517ae48b9c3b5c87a5d288c \
 file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\
 file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\
-file://LEGAL;md5=c440adb575ba4e6e2344c2630b6a5584\
+file://LEGAL;md5=78e8a29b8cc93e042990dbbb5572b1e1\
 "
 
 DEPENDS = "ruby-native zlib openssl tcl libyaml db gdbm readline"
diff --git a/meta/recipes-devtools/ruby/ruby_2.2.5.bb 
b/meta/recipes-devtools/ruby/ruby_2.3.1.bb
similarity index 89%
rename from meta/recipes-devtools/ruby/ruby_2.2.5.bb
rename to meta/recipes-devtools/ruby/ruby_2.3.1.bb
index 5a64582..f9f5b33 100644
--- a/meta/recipes-devtools/ruby/ruby_2.2.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.3.1.bb
@@ -1,7 +1,7 @@
 require ruby.inc
 
-SRC_URI[md5sum] = "bd8e349d4fb2c75d90817649674f94be"
-SRC_URI[sha256sum] = 
"30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03ca335e3"
+SRC_URI[md5sum] = "0d896c2e7fd54f722b399f407e48a4c6"
+SRC_URI[sha256sum] = 
"b87c738cb2032bf4920fef8e3864dc5cf8eae9d89d8d523ce0236945c5797dcd"
 
 # it's unknown to configure script, but then passed to extconf.rb  # maybe 
it's not really needed as we're hardcoding the result with
--
2.7.4



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


Re: [OE-core] [PATCH 1/1] rpm: make install with --nosignature and --nodigest work

2016-09-21 Thread Robert Yang



On 09/21/2016 10:10 PM, Mark Hatle wrote:

On 9/20/16 10:37 PM, Robert Yang wrote:



On 09/21/2016 04:33 AM, Mark Hatle wrote:

On 9/20/16 10:00 AM, Burton, Ross wrote:


On 20 September 2016 at 09:15, Hongxu Jia > wrote:

-Upstream-Status: Submitted [Sent email to rpm-de...@rpm5.org
]
+Upstream-Status: Rejected [Sent email to rpm-de...@rpm5.org
]
+http://rpm5.org/community/rpm-devel/5655.html



Considering upstream has explicitly rejected this patch, why should we accept 
it?

Ross




I'm confused by what the patch is doing looking at it.

It sounds like from the description there is a bug that without the change,
packages with (intentionally) bad checksums and such are allowed to be 
installed.

The bug is caused by a previous patch that enabled nosignature, etc -- because
the comparisons turned out to be backwards.

So really nosignature, etc is already in place -- it's just not working 
properly?

What was rejected upstream is the use of nosignature in any context.  RPM5
maintainer believes it is unwise and unsafe to permit uses to install packages
that have failed basic validation.  (I tend to agree.)  Similarly, even being
able to run queries and other operations against them may be dangerous as well.


If command like "rpm5 -qp --nosignature --nodigest " queries database,
then it would cause rpm5 hang when more than one "rpm5 -qp" is running, so I
fixed the *query* problem, and the *install* problem is not caused by the fix.
Btw., *rpm4* doesn't query database when "rpm -qp file.rpm", if we are going
to use dnf in next release, maybe we can consider using rpm4 as Fedora does.
I did a rough statistics for oe-core's local patches, the winner is rpm, it
has 77 local patches, that's not good for maintaining, and you can imagine that


30 patches are simply configuration changes.

42 patches are bug fixes that have been submitted and will likely go away in the
next uprev.


how many times it surprised us. rpm4 should be more stable than rpm5, I don't
know how many distros use rpm5, I can't access rpm5.org atm, it seems that the
web is down (It was OK yesterday), but widely used distros like Redhat and Suse


The website is working for me today.


uses rpm4, so maybe rpm4 will make our life much more easier, and also for
yocto's user. I think that why we need rpm5 before was because we need use it


There is a major problem with rpm4.  It doesn't support cross compiling at all.
We know in the past there have been significant problems with it and BerkleyDB
with endian issues.  Also it was not possible to do cross-architecture installs
(in the past, this one might be resolved.)

The general functionality between RPM4 and RPM5 is nearly identical.  RPM 4 has
a plug-in interface (which I personally don't believe should be used due to
security issues.)  RPM 5 has a focus around specific security enhancements.
Some are reasonable, some are a bit too experimental to be used.

The other main difference is software license.  RPM 4 is 'GPLv2', while RPM5 is
'LGPLv2'.  This doesn't sound like a big deal at first -- but RPM 4 can't be
linked to OpenSSL for it's crypto library.  RPM 4 is linked ONLY to NSS, while
RPM5 can use beecrypt, nss, openssl and others.  This makes for a significantly
more flexible embedded system.


to compute the package dependencies, but now we have smartpm, so we don't rely
on that any more.

Here is the recipe list which has more than 10 local patches, and we have 1762
patches atm:
  77 rpm


I'd think it's a better comparison to say '30', the configuration items.  So
it's similar to perl or openssl in complexity.  I'd agree that is a fair 
comparison.


  59 gcc-5.4
  49 gcc-6.2
  36 ltp
  31 python3
  30 perl
  29 openssl
  28 man
  27 glibc
  24 python
  23 tcp-wrappers-7.6
  23 systemd
  18 busybox
  14 syslinux
  14 python-smartpm
  14 elfutils-0.166
  14 apt
  13 qemu
  13 libtool
  13 gstreamer1.0-plugins-bad
  13 glib-2.0
  13 binutils
  13 bind
  12 coreutils-6.9
  11 valgrind
  11 gdb
  11 dhcp
  11 autoconf
  10 unzip
  10 dpkg
  10 console-tools-0.3.2



If fixing the problem is as simple as reverting the other change -- and that
doesn't cause other problems elsewhere...  I'd rather see that.


We can't revert the patch, it would break packagefeed-stability.bbclass,
we will see the hang


Something is wrong with the implementation then.

You should not be doing the equivalent of:

list = ''
for each in list; do rpm -qp $each ; done

This is HORRIBLY inefficient, even with rpm4.

The proper way to query a number of packages is in a single transaction.  This
permits RPM to load the data and validation structures once.

This is equivalent to:
  rpm -qp `cat list`

or

  

Re: [OE-core] [PATCH v4] bind: 9.10.3-P3 -> 9.11.0b2

2016-09-21 Thread Wang, Xin
ping

-Original Message-
From: Wang, Xin/王 鑫 
Sent: Friday, August 26, 2016 11:12 AM
To: openembedded-core@lists.openembedded.org
Cc: Wang, Xin/王 鑫
Subject: [OE-core][PATCH v4] bind: 9.10.3-P3 -> 9.11.0b2

1) Upgrade bind from 9.10.3-P3 to 9.11.0b2.
2) Delete some patchers, since they are no use.
bind-confgen-build-unix.o-once.patch
CVE-2016-1285.patch
CVE-2016-1286_1.patch
CVE-2016-1286_2.patch
CVE-2016-2088.patch
3) Modify LIC_FILES_CHKSUM, since the date in it has been changed, But the 
LICENSE has not been changed.
4) Modify EXTRA_OECONF, enable python3.
5) Modify do_install_append(), since the data has changed.

Signed-off-by: Wang Xin 
---
 .../bind/{bind_9.10.3-P3.bb => bind_9.11.0b2.bb} | 16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)  rename 
meta/recipes-connectivity/bind/{bind_9.10.3-P3.bb => bind_9.11.0b2.bb} (83%)

diff --git a/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb 
b/meta/recipes-connectivity/bind/bind_9.11.0b2.bb
similarity index 83%
rename from meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
rename to meta/recipes-connectivity/bind/bind_9.11.0b2.bb
index a99f0dd..4919de7 100644
--- a/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
+++ b/meta/recipes-connectivity/bind/bind_9.11.0b2.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.isc.org/sw/bind/;
 SECTION = "console/network"
 
 LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=0a95f52a0ab6c5f52dedc9a45e7abb3f"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=26895b6b2e11695fb4756065b885d5d9"
 
 DEPENDS = "openssl libcap"
 
@@ -16,22 +16,17 @@ SRC_URI = 
"ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://named.service \
file://bind9 \
file://init.d-add-support-for-read-only-rootfs.patch \
-   file://bind-confgen-build-unix.o-once.patch \
file://0001-build-use-pkg-config-to-find-libxml2.patch \
file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
file://0001-lib-dns-gen.c-fix-too-long-error.patch \
-   file://CVE-2016-1285.patch \
-   file://CVE-2016-1286_1.patch \
-   file://CVE-2016-1286_2.patch \
-   file://CVE-2016-2088.patch \
"
 
-SRC_URI[md5sum] = "bcf7e772b616f7259420a3edc5df350a"
-SRC_URI[sha256sum] = 
"690810d1fbb72afa629e74638d19cd44e28d2b2e5eb63f55c705ad85d1a4cb83"
+SRC_URI[md5sum] = "30db652baa5c227a61f8f4ca9b7ad9c2"
+SRC_URI[sha256sum] = 
"440e7fa7c4e241c13028699ab107fc4c3efd1719012b1af356d39db5ab49109d"
 
 ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 
'yes', 'no', d)}"
-EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads 
\
+EXTRA_OECONF = " ${ENABLE_IPV6} --with-python=python3 
+--with-randomdev=/dev/random --disable-threads \
  --disable-devpoll --disable-epoll --with-gost=no \
  --with-gssapi=no --with-ecdsa=yes \
  --sysconfdir=${sysconfdir}/bind \ @@ -62,7 +57,7 @@ 
RDEPENDS_${PN}-dev = ""
 PACKAGE_BEFORE_PN += "${PN}-utils"
 FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
 FILES_${PN}-dev += "${bindir}/isc-config.h"
-FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
+FILES_${PN} += "${sbindir}/generate-rndc-key.sh ${libdir}/*"
 
 do_install_prepend() {
# clean host path in isc-config.sh before the hardlink created @@ -81,7 
+76,6 @@ do_install_append() {
install -d "${D}${sysconfdir}/init.d"
install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
-   sed -i -e '1s,#!.*python,#! /usr/bin/python3,' 
${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
 
# Install systemd related files
install -d ${D}${sbindir}
--
2.7.4



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


[OE-core] [PATCH] uninative-tarball: Make stamp independent

2016-09-21 Thread Richard Purdie
The uninative tarball only contains nativesdk compoents. It should
not get regenerated when MACHINE changes for example. Currently its
sstate arch is also incorrect so changing SDKMACHINE results in other
variants being removed from the deploy directory.

This patch removes the target architecture dependencies so that
deploy artefacts can overlap and it doesn't continually rebuild. This
also fixes various autobuilder/release artefact issues we're having
as a result of these issues.

Signed-off-by: Richard Purdie 

diff --git a/meta/recipes-core/meta/uninative-tarball.bb 
b/meta/recipes-core/meta/uninative-tarball.bb
index 4ead812..0dad974 100644
--- a/meta/recipes-core/meta/uninative-tarball.bb
+++ b/meta/recipes-core/meta/uninative-tarball.bb
@@ -18,6 +18,9 @@ INHIBIT_DEFAULT_DEPS = "1"
 
 MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
 PACKAGE_ARCH = "${SDK_ARCH}"
+PACKAGE_ARCHS = ""
+TARGET_ARCH = "none"
+TARGET_OS = "none"
 
 TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-nativesdk-libc"
 
@@ -27,16 +30,19 @@ EXCLUDE_FROM_WORLD = "1"
 
 inherit meta
 inherit populate_sdk
+inherit nopackages
 
 deltask install
 deltask package
 deltask packagedata
+deltask populate_sysroot
 
 do_populate_sdk[stamp-extra-info] = "${SDKMACHINE}"
 
 SDK_DEPENDS += "patchelf-native"
 
 SDK_PACKAGING_FUNC = ""
+REAL_MULTIMACH_TARGET_SYS = "none"
 
 fakeroot create_sdk_files() {
    cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/


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


Re: [OE-core] [PATCH] encodings: Add dependency to mkfontdir-native

2016-09-21 Thread Gratian Crisan

Burton, Ross writes:

> On 21 September 2016 at 19:40, Gratian Crisan  wrote:
>
>> Instead add a DEPENDS on mkfontdir-native in the encodings recipe in
>> addition to the mkfontscale-native dependency it already contains. This
>> solves the missing mkfontdir in the native sysroot problem without
>> introducing a build dependency loop.
>>
>
> Have you tested this in a build where encodings isn't built, but pulled
> from sstate?

If I understand your question correctly the answer is yes. We use sstate
for our builds and this was tested in that configuration (i.e. with
sstate enabled).

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


[OE-core] [PATCH 1/1] testimage.bbclass: Add package manager dependency

2016-09-21 Thread mariano . lopez
From: Mariano Lopez 

The feature to install packages in the target requires to
build the package manager. It would fail, with very obtuse
errors, if a test requires to install something and the
package manager hasn't been build. This will add the package
manager as dependency for testimage.

[YOCTO #10260]

Signed-off-by: Mariano Lopez 
---
 meta/classes/testimage.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 263d539..a908f92 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -68,6 +68,10 @@ TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot 
qemu-helper-native:d
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'cpio-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'cpio-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'python-smartpm-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 
'opkg-utils-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 
'apt-native:do_populate_sysroot', '', d)}"
+
 
 TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
 TESTIMAGELOCK_qemuall = ""
-- 
2.6.6

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


Re: [OE-core] State of bitbake world 2016-09-20

2016-09-21 Thread Andrea Adami
On Wed, Sep 21, 2016 at 10:38 PM, Andrea Adami  wrote:
> On Wed, Sep 21, 2016 at 10:19 PM, Martin Jansa  wrote:
>>
>> == Number of issues - stats ==
>> {| class='wikitable'
>> !|Date   !!colspan='3'|Failed tasks 
>> !!colspan='6'|Failed depencencies!!|Signatures   
>>  !!colspan='12'|QA !!Comment
>> |-
>> ||  ||qemuarm   ||qemux86   ||qemux86_64
>> ||qemuarm||max||min ||qemux86||max||min ||all   ||already-stripped   
>>||libdir||textrel   ||build-deps||file-rdeps
>> ||version-going-backwards   ||host-user-contaminated
>> ||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot 
>>||invalid-pkgconfig ||pkgname   ||
>> |-
>> ||2016-09-20||2 ||5 ||2 ||5 ||2 ||2 ||7 ||3  
>>||3 ||0 ||0 ||0 ||3 ||7   
>>   ||11||0 ||2 ||0 ||0
>>  ||0 ||0 ||0 ||
>> |}
>>
>> http://www.openembedded.org/wiki/Bitbake_World_Status
>>
>> == Failed tasks 2016-09-20 ==
>>
>> INFO: jenkins-job.sh-1.8.10 Complete log available at 
>> http://logs.nslu2-linux.org/buildlogs/oe/world/log.report.20160921_101445.log
>>
>> === common (2) ===
>> * 
>> meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.7.0.bb:do_compile
>> * 
>> openembedded-core/meta/recipes-support/libunwind/libunwind_git.bb:do_compile
>>
>> === common-x86 (0) ===
>>
>> === qemuarm (0) ===
>>
>> === qemux86 (3) ===
>> * 
>> meta-browser/recipes-browser/chromium/chromium_52.0.2743.76.bb:do_compile
>> * 
>> meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb:do_compile
>
> Now this is the second time klibc appears racing.
> The error is fishy:
>
> usr/klibc/sigsuspend.c:8:31: fatal error: klibc/havesyscall.h: No such
> file or directory
>  #include 
>
> And indeed googling about it seems to be a race originated by an old Knuild.
> http://thr3ads.net/klibc/2013/05/2361452-Klibc-2.0.2-build-vs-j-30-ish
>
> I'm trying a build from scratch but I only have 8 cores here...

As expected the build from scratch, pull of today, ended just fine on my system.
I'm sorry but I cannot test the hack/band-aid proposed in the link above.

andrea@ThinkPad-T520:/oe/oe-core/build$ bitbake klibc
Parsing recipes: 100% |##| Time: 0:01:01
Parsing of 1564 .bb files complete (0 cached, 1564 parsed). 2120
targets, 130 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION= "1.31.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-16.04"
TARGET_SYS= "i586-oe-linux"
MACHINE   = "qemux86"
DISTRO= "nodistro"
DISTRO_VERSION= "nodistro.0"
TUNE_FEATURES = "m32 i586"
TARGET_FPU= ""
meta  = "master:2a9603759fe87d6326c145f6213eb6afc6ae"
meta-handheld = "master:a24680e7606f61dfd57c7ca6cf67a00805aa7df2"
meta-initramfs
meta-oe   = "master:24e387aaf78bc0f68a46abb1fab3a76364804bd1"

Initialising tasks: 100% |###| Time: 0:00:01
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 578 tasks of which 0 didn't need to be
rerun and all succeeded.
andrea@ThinkPad-T520:/oe/oe-core/build$


>
> Cheers
> Andrea
>
>
>> * 
>> meta-openembedded/meta-oe/recipes-support/ipmiutil/ipmiutil_2.9.6.bb:do_compile
>>
>> === qemux86_64 (0) ===
>>
>> === Number of failed tasks (9) ===
>> {| class=wikitable
>> |-
>> || qemuarm  || 2 || 
>> http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemuarm.20160919_050339.log/
>>  || http://errors.yoctoproject.org/Errors/Build/21909/
>> |-
>> || qemux86  || 5 || 
>> http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemux86.20160919_050337.log/
>>  || http://errors.yoctoproject.org/Errors/Build/21910/
>> |-
>> || qemux86_64   || 2 || 
>> http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemux86-64.20160920_054228.log/
>>  || http://errors.yoctoproject.org/Errors/Build/21963/
>> |}
>> === PNBLACKLISTs (118) ===
>> === QA issues (23) ===
>> {| class=wikitable
>> !| Count||Issue
>> |-
>> ||0 ||already-stripped
>> |-
>> ||0 ||installed-vs-shipped
>> |-
>> ||0 ||invalid-pkgconfig
>> |-
>> ||0 ||libdir
>> |-
>> ||0 ||pkgname
>> |-
>> ||0 ||symlink-to-sysroot
>> |-
>> ||0 ||unknown-configure-option
>> |-
>> ||0 ||version-going-backwards
>> |-
>> ||11||file-rdeps
>> |-
>> ||2 ||host-user-contaminated
>> |-
>> ||3 ||textrel
>> |-
>> ||7 ||build-deps
>> |}
>>
>>
>>
>> === Failed dependencies for qemuarm (5) ===
>>
>> Complete log: 
>> 

[OE-core] [PATCH] base.bbclass: Drop unnecessary dirs setting

2016-09-21 Thread Richard Purdie
${D} is listed in cleandirs so no need to list it in dirs as well.
The default directory is ${B} so this is a cleanup which should have
no changes to the execution.

[YOCTO #10017]

Signed-off-by: Richard Purdie 

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 9502a68..e34e25b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -304,7 +304,7 @@ base_do_compile() {
 }
 
 addtask install after do_compile
-do_install[dirs] = "${D} ${B}"
+do_install[dirs] = "${B}"
 # Remove and re-create ${D} so that is it guaranteed to be empty
 do_install[cleandirs] = "${D}"
 


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


[OE-core] [PATCH] [krogoth] Fixes several python3 dependencies

2016-09-21 Thread Alejandro Hernandez
This patch adds the packages python3-signal, python3-enum and python3-selectors,
while it also fixes python3-subprocess, this fixes the installation of 
python3-modules

[YOCTO #10276]

Signed-off-by: Alejandro Hernandez 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 18 +++---
 scripts/contrib/python/generate-manifest-3.5.py  | 11 ++-
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index bce9ce1..0ad9186 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -1,6 +1,6 @@
 
 # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I 
regenerate the file.
-# Generator: '../../../scripts/contrib/python/generate-manifest-3.5.py' 
Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer 
+# Generator: './generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 
Michael 'Mickey' Lauer 
 # Visit the Python for Embedded Systems Site => 
http://www.Vanille.de/projects/python.spy
 
  
@@ -39,7 +39,7 @@ FILES_${PN}-compression="${libdir}/python3.5/gzip.* 
${libdir}/python3.5/zipfile.
 
 SUMMARY_${PN}-core="Python interpreter and core modules"
 RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io 
${PN}-math"
-FILES_${PN}-core="${libdir}/python3.5/__future__.* 
${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* 
${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* 
${libdir}/python3.5/copyreg.* ${libdir}/python3.5/configparser.* 
${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* 
${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* 
${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* 
${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* 
${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* 
${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* 
${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so 
${libdir}/python3.5/lib-dynload/_struct.*.so 
${libdir}/python3.5/lib-dynload/time.*.so 
${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* 
${libdir}/python3.5/platform.* ${bindir}/python* 
${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* 
${libdir}/python3.5/_sysconfigdata.* ${libdir}/python
 3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h 
${libdir}/python${PYTHON_MAJMIN}/collections 
${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* 
${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* 
${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+FILES_${PN}-core="${libdir}/python3.5/__future__.* 
${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* 
${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* 
${libdir}/python3.5/copyreg.* ${libdir}/python3.5/ConfigParser.* 
${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* 
${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* 
${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* 
${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* 
${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* 
${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* 
${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so 
${libdir}/python3.5/lib-dynload/_struct.*.so 
${libdir}/python3.5/lib-dynload/time.*.so 
${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* 
${libdir}/python3.5/platform.* ${bindir}/python* 
${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* 
${libdir}/python3.5/_sysconfigdata.* ${libdir}/python
 3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h 
${libdir}/python${PYTHON_MAJMIN}/collections 
${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* 
${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* 
${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
 
 SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
 RDEPENDS_${PN}-crypt="${PN}-core"
@@ -89,6 +89,10 @@ SUMMARY_${PN}-email="Python email support"
 RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio 
${PN}-image ${PN}-netclient"
 FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/email "
 
+SUMMARY_${PN}-enum="Python support for enumerations"
+RDEPENDS_${PN}-enum="${PN}-core"
+FILES_${PN}-enum="${libdir}/python3.5/enum.* "
+
 SUMMARY_${PN}-fcntl="Python's fcntl interface"
 RDEPENDS_${PN}-fcntl="${PN}-core"
 FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so "
@@ -197,10 +201,18 @@ SUMMARY_${PN}-resource="Python resource control interface"
 RDEPENDS_${PN}-resource="${PN}-core"
 FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so "
 
+SUMMARY_${PN}-selectors="Python High-level I/O multiplexing"
+RDEPENDS_${PN}-selectors="${PN}-core"

Re: [OE-core] [PATCH] encodings: Add dependency to mkfontdir-native

2016-09-21 Thread Burton, Ross
On 21 September 2016 at 19:40, Gratian Crisan  wrote:

> Instead add a DEPENDS on mkfontdir-native in the encodings recipe in
> addition to the mkfontscale-native dependency it already contains. This
> solves the missing mkfontdir in the native sysroot problem without
> introducing a build dependency loop.
>

Have you tested this in a build where encodings isn't built, but pulled
from sstate?

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


[OE-core] [PATCH] libnewt: link whiptail properly with libnewt

2016-09-21 Thread Andreas Müller
Configuration failed to detect gold as GNU linker. It was searching for
'GNU ld' but gold returns 'GNU gold (GNU Binutils 2.27.0.20160806) 1.12' which
does not match. When not linking by GNU linker Makefile did some magic link
target alignment:

ifneq ($(GNU_LD),)
SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver -Wl,-soname,$(LIBNEWTSONAME)
else
SHLIBFLAGS=
endif

which caused:

| WARNING: libnewt-0.52.19-r0 do_package_qa: QA Issue: /usr/bin/whiptail 
contained in package whiptail requires libnewt.so, but no providers found in 
RDEPENDS_whiptail? [file-rdeps]

Signed-off-by: Andreas Müller 
---
 .../files/0001-detect-gold-as-GNU-linker-too.patch | 31 ++
 meta/recipes-extended/newt/libnewt_0.52.19.bb  |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch

diff --git 
a/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch 
b/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch
new file mode 100644
index 000..a4b3afd
--- /dev/null
+++ b/meta/recipes-extended/newt/files/0001-detect-gold-as-GNU-linker-too.patch
@@ -0,0 +1,31 @@
+From 58245b859ffbcb1780575bf1b0a018d55e74e434 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= 
+Date: Wed, 21 Sep 2016 21:14:40 +0200
+Subject: [PATCH] detect gold as GNU linker too
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller 
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 03e8bda..c2fce51 100644
+--- a/configure.ac
 b/configure.ac
+@@ -28,7 +28,7 @@ AC_CHECK_SIZEOF([void *])
+ AC_MSG_CHECKING([for GNU ld])
+ LD=`$CC -print-prog-name=ld 2>&5`
+ 
+-if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0; then
++if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU "` = 0; then
+   # Not
+   GNU_LD=""
+   AC_MSG_RESULT([no])
+-- 
+2.5.5
+
diff --git a/meta/recipes-extended/newt/libnewt_0.52.19.bb 
b/meta/recipes-extended/newt/libnewt_0.52.19.bb
index 22bdaf5..a26ce1f 100644
--- a/meta/recipes-extended/newt/libnewt_0.52.19.bb
+++ b/meta/recipes-extended/newt/libnewt_0.52.19.bb
@@ -22,6 +22,7 @@ SRC_URI = 
"https://fedorahosted.org/releases/n/e/newt/newt-${PV}.tar.gz \
file://cross_ar.patch \
file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \
file://pie-flags.patch \
+   file://0001-detect-gold-as-GNU-linker-too.patch \
 "
 
 SRC_URI[md5sum] = "e4aa0f7943edd39c52481a87f68f412a"
-- 
2.5.5

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


Re: [OE-core] State of bitbake world 2016-09-20

2016-09-21 Thread Andrea Adami
On Wed, Sep 21, 2016 at 10:19 PM, Martin Jansa  wrote:
>
> == Number of issues - stats ==
> {| class='wikitable'
> !|Date   !!colspan='3'|Failed tasks 
> !!colspan='6'|Failed depencencies!!|Signatures
> !!colspan='12'|QA !!Comment
> |-
> ||  ||qemuarm   ||qemux86   ||qemux86_64
> ||qemuarm||max||min ||qemux86||max||min ||all   ||already-stripped
>   ||libdir||textrel   ||build-deps||file-rdeps
> ||version-going-backwards   ||host-user-contaminated
> ||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot  
>   ||invalid-pkgconfig ||pkgname   ||
> |-
> ||2016-09-20||2 ||5 ||2 ||5 ||2 ||2 ||7 ||3   
>   ||3 ||0 ||0 ||0 ||3 ||7 
> ||11||0 ||2 ||0 ||0   
>   ||0 ||0 ||0 ||
> |}
>
> http://www.openembedded.org/wiki/Bitbake_World_Status
>
> == Failed tasks 2016-09-20 ==
>
> INFO: jenkins-job.sh-1.8.10 Complete log available at 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.report.20160921_101445.log
>
> === common (2) ===
> * 
> meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.7.0.bb:do_compile
> * 
> openembedded-core/meta/recipes-support/libunwind/libunwind_git.bb:do_compile
>
> === common-x86 (0) ===
>
> === qemuarm (0) ===
>
> === qemux86 (3) ===
> * 
> meta-browser/recipes-browser/chromium/chromium_52.0.2743.76.bb:do_compile
> * 
> meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb:do_compile

Now this is the second time klibc appears racing.
The error is fishy:

usr/klibc/sigsuspend.c:8:31: fatal error: klibc/havesyscall.h: No such
file or directory
 #include 

And indeed googling about it seems to be a race originated by an old Knuild.
http://thr3ads.net/klibc/2013/05/2361452-Klibc-2.0.2-build-vs-j-30-ish

I'm trying a build from scratch but I only have 8 cores here...

Cheers
Andrea


> * 
> meta-openembedded/meta-oe/recipes-support/ipmiutil/ipmiutil_2.9.6.bb:do_compile
>
> === qemux86_64 (0) ===
>
> === Number of failed tasks (9) ===
> {| class=wikitable
> |-
> || qemuarm  || 2 || 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemuarm.20160919_050339.log/
>  || http://errors.yoctoproject.org/Errors/Build/21909/
> |-
> || qemux86  || 5 || 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemux86.20160919_050337.log/
>  || http://errors.yoctoproject.org/Errors/Build/21910/
> |-
> || qemux86_64   || 2 || 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemux86-64.20160920_054228.log/
>  || http://errors.yoctoproject.org/Errors/Build/21963/
> |}
> === PNBLACKLISTs (118) ===
> === QA issues (23) ===
> {| class=wikitable
> !| Count||Issue
> |-
> ||0 ||already-stripped
> |-
> ||0 ||installed-vs-shipped
> |-
> ||0 ||invalid-pkgconfig
> |-
> ||0 ||libdir
> |-
> ||0 ||pkgname
> |-
> ||0 ||symlink-to-sysroot
> |-
> ||0 ||unknown-configure-option
> |-
> ||0 ||version-going-backwards
> |-
> ||11||file-rdeps
> |-
> ||2 ||host-user-contaminated
> |-
> ||3 ||textrel
> |-
> ||7 ||build-deps
> |}
>
>
>
> === Failed dependencies for qemuarm (5) ===
>
> Complete log: 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log/
> Found differences:
> Found errors:
> * ERROR: 5 issues were found in these recipes: libunwind xfsprogs
>
> === Recipes failing with maximal dependencies for qemuarm (2) ===
> * libunwind -- 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log//2_max/failed/libunwind.log
> * xfsprogs -- 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log//2_max/failed/xfsprogs.log
>
> === Recipes failing with minimal dependencies for qemuarm (2) ===
> * libunwind -- 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log//3_min/failed/libunwind.log
> * xfsprogs -- 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log//3_min/failed/xfsprogs.log
>
> === Failed dependencies for qemux86 (7) ===
>
> Complete log: 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log/
> Found differences:
> Found errors:
> * ERROR: 7 issues were found in these recipes: chromium klibc-utils 
> libunwind xfsprogs
>
> === Recipes failing with maximal dependencies for qemux86 (3) ===
> * chromium -- 
> http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log//2_max/failed/chromium.log
> * libunwind -- 
> 

[OE-core] State of bitbake world 2016-09-20

2016-09-21 Thread Martin Jansa

== Number of issues - stats ==
{| class='wikitable'
!|Date   !!colspan='3'|Failed tasks 
!!colspan='6'|Failed depencencies!!|Signatures
!!colspan='12'|QA !!Comment
|-
||  ||qemuarm   ||qemux86   ||qemux86_64
||qemuarm||max||min ||qemux86||max||min ||all   ||already-stripped  
||libdir||textrel   ||build-deps||file-rdeps
||version-going-backwards   ||host-user-contaminated
||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot
||invalid-pkgconfig ||pkgname   ||  
|-
||2016-09-20||2 ||5 ||2 ||5 ||2 ||2 ||7 ||3 
||3 ||0 ||0 ||0 ||3 ||7 
||11||0 ||2 ||0 ||0 
||0 ||0 ||0 ||  
|}

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

== Failed tasks 2016-09-20 ==

INFO: jenkins-job.sh-1.8.10 Complete log available at 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.report.20160921_101445.log

=== common (2) ===
* 
meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.7.0.bb:do_compile
* 
openembedded-core/meta/recipes-support/libunwind/libunwind_git.bb:do_compile

=== common-x86 (0) ===

=== qemuarm (0) ===

=== qemux86 (3) ===
* meta-browser/recipes-browser/chromium/chromium_52.0.2743.76.bb:do_compile
* 
meta-openembedded/meta-initramfs/recipes-devtools/klibc/klibc_2.0.4.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-support/ipmiutil/ipmiutil_2.9.6.bb:do_compile

=== qemux86_64 (0) ===

=== Number of failed tasks (9) ===
{| class=wikitable
|-
|| qemuarm  || 2 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemuarm.20160919_050339.log/
 || http://errors.yoctoproject.org/Errors/Build/21909/
|-
|| qemux86  || 5 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemux86.20160919_050337.log/
 || http://errors.yoctoproject.org/Errors/Build/21910/
|-
|| qemux86_64   || 2 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemux86-64.20160920_054228.log/
 || http://errors.yoctoproject.org/Errors/Build/21963/
|}
=== PNBLACKLISTs (118) ===
=== QA issues (23) ===
{| class=wikitable
!| Count||Issue
|-
||0 ||already-stripped
|-
||0 ||installed-vs-shipped
|-
||0 ||invalid-pkgconfig
|-
||0 ||libdir
|-
||0 ||pkgname
|-
||0 ||symlink-to-sysroot
|-
||0 ||unknown-configure-option
|-
||0 ||version-going-backwards
|-
||11||file-rdeps
|-
||2 ||host-user-contaminated
|-
||3 ||textrel
|-
||7 ||build-deps
|}



=== Failed dependencies for qemuarm (5) ===

Complete log: 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log/
Found differences: 
Found errors: 
* ERROR: 5 issues were found in these recipes: libunwind xfsprogs

=== Recipes failing with maximal dependencies for qemuarm (2) ===
* libunwind -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log//2_max/failed/libunwind.log
* xfsprogs -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log//2_max/failed/xfsprogs.log

=== Recipes failing with minimal dependencies for qemuarm (2) ===
* libunwind -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log//3_min/failed/libunwind.log
* xfsprogs -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20160920_041851.log//3_min/failed/xfsprogs.log

=== Failed dependencies for qemux86 (7) ===

Complete log: 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log/
Found differences: 
Found errors: 
* ERROR: 7 issues were found in these recipes: chromium klibc-utils 
libunwind xfsprogs

=== Recipes failing with maximal dependencies for qemux86 (3) ===
* chromium -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log//2_max/failed/chromium.log
* libunwind -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log//2_max/failed/libunwind.log
* xfsprogs -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log//2_max/failed/xfsprogs.log

=== Recipes failing with minimal dependencies for qemux86 (3) ===
* chromium -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log//3_min/failed/chromium.log
* libunwind -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log//3_min/failed/libunwind.log
* xfsprogs -- 
http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20160921_043213.log//3_min/failed/xfsprogs.log

=== Incorrect PACKAGE_ARCH or sstate signatures (0) ===


[OE-core] [PATCH v2] oeqa/selftest/base: backup and restore local configuration files

2016-09-21 Thread Jose Lamego
Selftests' cleanup method during test setup is not capable of
restoring local configuration files that remain modified after
aborting a test through a keyboard interruption.
This change creates backups for local.conf and bblayers.conf at
test setup, restore them when found, and deletes them at cleanup.

[YOCTO #9390]

Signed-off-by: Jose Lamego 
---
 meta/lib/oeqa/selftest/base.py | 32 +++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/base.py b/meta/lib/oeqa/selftest/base.py
index b5a52fe..26c93f9 100644
--- a/meta/lib/oeqa/selftest/base.py
+++ b/meta/lib/oeqa/selftest/base.py
@@ -28,17 +28,47 @@ class oeSelfTest(unittest.TestCase):
 def __init__(self, methodName="runTest"):
 self.builddir = os.environ.get("BUILDDIR")
 self.localconf_path = os.path.join(self.builddir, "conf/local.conf")
+self.localconf_backup = os.path.join(self.builddir, "conf/local.bk")
 self.testinc_path = os.path.join(self.builddir, "conf/selftest.inc")
 self.local_bblayers_path = os.path.join(self.builddir, 
"conf/bblayers.conf")
+self.local_bblayers_backup = os.path.join(self.builddir,
+  "conf/bblayers.bk")
 self.testinc_bblayers_path = os.path.join(self.builddir, 
"conf/bblayers.inc")
 self.machineinc_path = os.path.join(self.builddir, "conf/machine.inc")
 self.testlayer_path = oeSelfTest.testlayer_path
 self._extra_tear_down_commands = []
-self._track_for_cleanup = [self.testinc_path, 
self.testinc_bblayers_path, self.machineinc_path]
+self._track_for_cleanup = [
+self.testinc_path, self.testinc_bblayers_path,
+self.machineinc_path, self.localconf_backup,
+self.local_bblayers_backup]
 super(oeSelfTest, self).__init__(methodName)
 
 def setUp(self):
 os.chdir(self.builddir)
+# Check if local.conf or bblayers.conf files backup exists
+# from a previous failed test and restore them
+if os.path.isfile(self.localconf_backup) or os.path.isfile(
+self.local_bblayers_backup):
+self.log.debug("Found a local.conf and/or bblayers.conf backup \
+from a previously aborted test. Restoring these files now, but tests should \
+be re-executed from a clean environment to ensure accurate results.")
+try:
+shutil.copyfile(self.localconf_backup, self.localconf_path)
+except OSError as e:
+if e.errno != errno.ENOENT:
+raise
+try:
+shutil.copyfile(self.local_bblayers_backup,
+self.local_bblayers_path)
+except OSError as e:
+if e.errno != errno.ENOENT:
+raise
+else:
+# backup local.conf and bblayers.conf
+shutil.copyfile(self.localconf_path, self.localconf_backup)
+shutil.copyfile(self.local_bblayers_path,
+self.local_bblayers_backup)
+self.log.debug("Creating local.conf and bblayers.conf backups.")
 # we don't know what the previous test left around in config or inc 
files
 # if it failed so we need a fresh start
 try:
-- 
1.8.3.1

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


[OE-core] [PATCH] encodings: Add dependency to mkfontdir-native

2016-09-21 Thread Gratian Crisan
Currently adding a font recipe to an image doesn't have enough
dependencies to cause mkfontdir-native to be included in the native
sysroot. This creates problems with the postinstall scripts for fonts
which call mkfontdir to create font index files: font.dir. The end
result is missing font.dir files in the built image and a malfunctioning
font system.

Dependencies for the relevant recipes currently look like this:

  *[D ] -> font-util-native
[R ] -> encodings, font-util
[RN] -> font-util-native

  * font-util   [D ] -> encodings
[R ] -> mkfontdir, mkfontscale, encodings
[RN] -> mkfontdir-native, mkfontscale-native

  * encodings   [D ] -> mkfontscale-native, font-util-native

  * mkfontdir   [R ] -> mkfontscale
[RN] -> mkfontscale-native

  * mkfontscale [D ] -> libfontenc

  * libfontenc  [D ] -> font-util

Where:
  * D = DEPENDS
  * R = RDEPENDS
  * RN = RDEPENDS_class-native
  *  e.g. font-adobe-100dpi*.bb
Some details where omitted for clarity e.g. dependencies on util-macros.

I believe the intent behind the RDEPENDS_class-native chain:
  *  -> font-util-native -> mkfontdir-native
was to provide the necessary dependency on mkfontdir. However because
the native sysroot is not built from packages this RDEPENDS_class-native
chain doesn't have the desire effect (i.e. it doesn't pull in
mkfontdir-native).

Changing the RDEPENDS_class-native chain into a DEPENDS_class-native
chain is a non-starter because of the build time dependency loop it
creates:
  * font-util-native -> mkfontscale-native -> libfontenc-native -> 
font-util-native

Having upstream remove the build time dependency of libfontenc on
font-util is also a non-starter[1] even though it does create problems
in other distributions, for example on Debian see [2], [3].

Instead add a DEPENDS on mkfontdir-native in the encodings recipe in
addition to the mkfontscale-native dependency it already contains. This
solves the missing mkfontdir in the native sysroot problem without
introducing a build dependency loop.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=97631
[2] https://wiki.debian.org/CircularBuildDependencies
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717843

Signed-off-by: Gratian Crisan 
---
 meta/recipes-graphics/xorg-font/encodings_1.0.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb 
b/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
index 90846d8..36766f2 100644
--- a/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
+++ b/meta/recipes-graphics/xorg-font/encodings_1.0.4.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=9da93f2daf2d5572faa2bfaf0dbd9e76"
 PE = "1"
 PR = "${INC_PR}.1"
 
-DEPENDS = "mkfontscale-native font-util-native"
+DEPENDS = "mkfontscale-native mkfontdir-native font-util-native"
 RDEPENDS_${PN} = ""
 
 SRC_URI += "file://nocompiler.patch"
-- 
2.7.1

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


[OE-core] [PATCH 4/4] runqemu: don't fail during check_arg_machine()

2016-09-21 Thread Joshua Lock
If DEPLOY_DIR_IMAGE doesn't exist during check_arg_machine() we
will attempt to guess a suitable value later when check_and_set()
calls validate_paths(), therefore this shouldn't raise an exception

Signed-off-by: Joshua Lock 
---
 scripts/runqemu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index e8360c2..658f7c8 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -332,7 +332,7 @@ class BaseConfig(object):
 self.set_machine_deploy_dir(arg, deploy_dir_image)
 else:
 logger.error("%s not a directory valid DEPLOY_DIR_IMAGE" % 
deploy_dir_image)
-raise Exception("Failed to set MACHINE to %s. Unknown arg: %s" % 
(arg, arg))
+self.set("MACHINE", arg)
 
 def check_args(self):
 unknown_arg = ""
-- 
2.7.4

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


[OE-core] [PATCH 2/4] runqemu: try and guess qemu-system binary when MACHINE isn't set

2016-09-21 Thread Joshua Lock
Emulate some logic from the prior, shell based, version of runqemu
to try and infer the correct setting for MACHINE from the kernel
and rootfs filenames.

Signed-off-by: Joshua Lock 
---
 scripts/runqemu | 36 
 1 file changed, 36 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index 5170d87..591746f 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -846,9 +846,45 @@ class BaseConfig(object):
 
 self.set('ROOTFS_OPTIONS', self.rootfs_options)
 
+def guess_qb_system(self):
+"""attempt to determine the appropriate qemu-system binary"""
+mach = self.get('MACHINE')
+if not mach:
+search = 
'.*(qemux86-64|qemux86|qemuarm64|qemuarm|qemumips64|qemumips|qemuppc).*'
+if self.rootfs:
+match = re.match(search, self.rootfs)
+if match:
+mach = match.group(1)
+elif self.kernel:
+match = re.match(search, self.kernel)
+if match:
+mach = match.group(1)
+
+if not mach:
+return None
+
+if mach == 'qemuarm':
+qbsys = 'arm'
+elif mach == 'qemuarm64':
+qbsys = 'aarch64'
+elif mach == 'qemux86':
+qbsys = 'i386'
+elif mach == 'qemux86-64':
+qbsys = 'x86_64'
+elif mach == 'qemuppc':
+qbsys = 'ppc'
+elif mach == 'qemumips':
+qbsys = 'mips'
+elif mach == 'qemumips64':
+qbsys = 'mips64'
+
+return 'qemu-system-%s' % qbsys
+
 def setup_final(self):
 qemu_system = self.get('QB_SYSTEM_NAME')
 if not qemu_system:
+qemu_system = self.guess_qb_system()
+if not qemu_system:
 raise Exception("Failed to boot, QB_SYSTEM_NAME is NULL!")
 
 qemu_bin = '%s/%s' % (self.get('STAGING_BINDIR_NATIVE'), qemu_system)
-- 
2.7.4

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


[OE-core] [PATCH 3/4] runqemu: don't try and invoke bitbake when running in a toolchain env

2016-09-21 Thread Joshua Lock
If a MACHINE value is passed we can't validate it by running bitbake
as the toolchain environment doesn't include the build system, we
must assume that the passed value for MACHINE is correct.

Signed-off-by: Joshua Lock 
---
 scripts/runqemu | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 591746f..e8360c2 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -306,11 +306,16 @@ class BaseConfig(object):
 # FIXME: testimage.bbclass exports these two variables into env,
 # are there other scenarios in which we need to support being
 # invoked by bitbake?
-deploy = os.environ.get('DEPLOY_DIR_IMAGE', None)
-bbchild = deploy and os.environ.get('OE_TMPDIR', None)
+deploy = os.environ.get('DEPLOY_DIR_IMAGE')
+bbchild = deploy and os.environ.get('OE_TMPDIR')
 if bbchild:
 self.set_machine_deploy_dir(arg, deploy)
 return
+# also check whether we're running under a sourced toolchain
+# environment file
+if os.environ.get('OECORE_NATIVE_SYSROOT'):
+self.set("MACHINE", arg)
+return
 
 cmd = 'MACHINE=%s bitbake -e' % arg
 logger.info('Running %s...' % cmd)
-- 
2.7.4

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


[OE-core] [PATCH 1/4] runqemu: validate paths and attempt to infer unset paths

2016-09-21 Thread Joshua Lock
We need to validate and ensure all paths are set regardless of
whether runqemu was invoked with a .qemuboot.conf file or
otherwise. Split this logic out into a separate method called
during check_and_set()

Signed-off-by: Joshua Lock 
---
 scripts/runqemu | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index 08dc306..5170d87 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -536,6 +536,7 @@ class BaseConfig(object):
 
 def check_and_set(self):
 """Check configs sanity and set when needed"""
+self.validate_paths()
 check_tun()
 # Check audio
 if self.audio_enabled:
@@ -598,6 +599,8 @@ class BaseConfig(object):
 k_upper = k.upper()
 self.set(k_upper, v)
 
+def validate_paths(self):
+"""Ensure all relevant path variables are set"""
 # When we're started with a *.qemuboot.conf arg assume that image
 # artefacts are relative to that file, rather than in whatever
 # directory DEPLOY_DIR_IMAGE in the conf file points to.
-- 
2.7.4

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


[OE-core] [PATCH 0/4] runqemu fixes for toolchain and sdk uses

2016-09-21 Thread Joshua Lock
Another round of fixes for runqemu to support common usage models such as being
called via the Eclipse plugin.

* don't immediately bail out if QB_SYSTEM_NAME isn't set (this variable is only
  set in a qemuboot.conf file), instead attempt to infer the correct qemu-system
  binary based on the machine name, rootfs name or kernel name
* always attempt to infer paths which aren't explicitly set, rather than only
  trying to infer them when the values in a qemuboot.conf aren't validate
* don't try and determine whether a MACHINE setting is correct when called From
  an sdk environment, bitbake isn't available in this context

[YOCTO #10309]

The following changes since commit b2771e17a5f301423f65be9f93c9c1b1e7f8ab93:

  oeqa/selftest/lic-checksum: don't report the expected failure to errors.yp 
(2016-09-20 15:10:37 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib joshuagl/runqemu
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=joshuagl/runqemu

Joshua Lock (4):
  runqemu: validate paths and attempt to infer unset paths
  runqemu: try and guess qemu-system binary when MACHINE isn't set
  runqemu: don't try and invoke bitbake when running in a toolchain env
  runqemu: don't fail during check_arg_machine()

 scripts/runqemu | 50 +++---
 1 file changed, 47 insertions(+), 3 deletions(-)

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


[OE-core] [PATCH] oeqa/selftest/base: backup and restore local configuration files

2016-09-21 Thread Jose Lamego
Selftests' cleanup method during test setup is not capable of
restoring local configuration files that remain modified after
aborting a test through a keyboard interruption.
This change creates backups for local.conf and bblayers.conf at
test setup, restore them when found, and deletes them at cleanup.

[YOCTO #9390]

Signed-off-by: Jose Lamego 
---
 meta/lib/oeqa/selftest/base.py | 32 +++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/base.py b/meta/lib/oeqa/selftest/base.py
index b5a52fe..b746aff 100644
--- a/meta/lib/oeqa/selftest/base.py
+++ b/meta/lib/oeqa/selftest/base.py
@@ -28,17 +28,47 @@ class oeSelfTest(unittest.TestCase):
 def __init__(self, methodName="runTest"):
 self.builddir = os.environ.get("BUILDDIR")
 self.localconf_path = os.path.join(self.builddir, "conf/local.conf")
+self.localconf_backup = os.path.join(self.builddir, "conf/local.bk")
 self.testinc_path = os.path.join(self.builddir, "conf/selftest.inc")
 self.local_bblayers_path = os.path.join(self.builddir, 
"conf/bblayers.conf")
+self.local_bblayers_backup = os.path.join(self.builddir,
+  "conf/bblayers.bk")
 self.testinc_bblayers_path = os.path.join(self.builddir, 
"conf/bblayers.inc")
 self.machineinc_path = os.path.join(self.builddir, "conf/machine.inc")
 self.testlayer_path = oeSelfTest.testlayer_path
 self._extra_tear_down_commands = []
-self._track_for_cleanup = [self.testinc_path, 
self.testinc_bblayers_path, self.machineinc_path]
+self._track_for_cleanup = [
+self.testinc_path, self.testinc_bblayers_path,
+self.machineinc_path, self.localconf_backup,
+self.local_bblayers_backup]
 super(oeSelfTest, self).__init__(methodName)
 
 def setUp(self):
 os.chdir(self.builddir)
+# Check if local.conf or bblayers.conf files backup exists
+# from a previous failed test and restore them
+if os.path.isfile(self.localconf_backup) or os.path.isfile(
+self.local_bblayers_path):
+self.log.debug("Found a local.conf and/or bblayers.conf backup \
+from a previously aborted test. Restoring these files now, but tests should \
+be re-executed from a clean environment to ensure accurate results.")
+try:
+shutil.copyfile(self.localconf_backup, self.localconf_path)
+except OSError as e:
+if e.errno != errno.ENOENT:
+raise
+try:
+shutil.copyfile(self.local_bblayers_backup,
+self.local_bblayers_path)
+except OSError as e:
+if e.errno != errno.ENOENT:
+raise
+else:
+# backup local.conf and bblayers.conf
+shutil.copyfile(self.localconf_path, self.localconf_backup)
+shutil.copyfile(self.local_bblayers_path,
+self.local_bblayers_backup)
+self.log.debug("Creating local.conf and bblayers.conf backups.")
 # we don't know what the previous test left around in config or inc 
files
 # if it failed so we need a fresh start
 try:
-- 
1.8.3.1

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


[OE-core] [PATCH] buildtools-tarball: add SDKMACHINE to stamps-extra-info

2016-09-21 Thread Joshua Lock
Otherwise the stamps for x86-64 and i686 uninative tarballs match
and we can't deploy both to the DEPLOYDIR.

Signed-off-by: Joshua Lock 
---
 meta/recipes-core/meta/buildtools-tarball.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/meta/buildtools-tarball.bb 
b/meta/recipes-core/meta/buildtools-tarball.bb
index e84efab..2e738e6 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -43,7 +43,7 @@ inherit meta
 inherit populate_sdk
 inherit toolchain-scripts
 
-do_populate_sdk[stamp-extra-info] = ""
+do_populate_sdk[stamp-extra-info] = "${SDKMACHINE}"
 
 create_sdk_files_append () {
rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
-- 
2.7.4

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


Re: [OE-core] [PATCH 0/2] systemd: use nss-resolve when systemd-resoveld is enable

2016-09-21 Thread Khem Raj
On Wed, Sep 21, 2016 at 1:19 AM, Maciej Borzecki
 wrote:
> A patch series that enables use of nss-resolve (systemd's NSS service module) 
> if
> systemd-networkd is enabled via PACKAGECONFIG.
>
> The first patch is a trivial formatting change.
>
> The second patch does the following:
>
> - replace dns with resolve in /etc/nsswitch.conf if systemd-resolved is 
> enabled
>
> - applies a patch fixing the location of libnss_* services provided by systemd
>   (the patch has been submitted upstream for inclusion in v232)
>
> - applies a patch that fixes SERVFAIL handling, this restores the ability to
>   properly resolve names under qemu (backport from v231)
>
> Maciej Borzecki (2):
>   systemd: fix indentation
>   systemd: use nss-resolve by default if resolved is enabled
>


These changes look fine to me.

>  .../0023-nss-install-nss-modules-into-lib.patch| 64 
> ++
>  ...en-processing-auxiliary-DNSSEC-transactio.patch | 49 +
>  meta/recipes-core/systemd/systemd_230.bb   | 22 ++--
>  3 files changed, 131 insertions(+), 4 deletions(-)
>  create mode 100644 
> meta/recipes-core/systemd/systemd/0023-nss-install-nss-modules-into-lib.patch
>  create mode 100644 
> meta/recipes-core/systemd/systemd/0024-resolved-when-processing-auxiliary-DNSSEC-transactio.patch
>
> --
> 2.5.0
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] Make yocto-spdx support spdx2.0 SPEC

2016-09-21 Thread Jan-Simon Möller
Hi Lei, Maxin, * !

I think this patch is very useful and should be considered for inclusion in 
OE-core.

Maxin's comment on making the class depend on a "dosocs-native" recipe is 
good.

@Lei: Could you follow-up with a v2 applying this enhancement as proposed by 
Maxin?

-- 

Dipl.-Ing.
Jan-Simon Möller

jansimon.moel...@gmx.de

> Instead of requesting the user to install the DoSOCSv2 from github or other
> repos, can we make the spdx.bbclass depend on "dosocs-native" or similar
> and make that "DoSOCSv2" recipe available in oe-core ?
> 
> That might make it easy to use this class.

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


Re: [OE-core] [wic][PATCH] wic: add beaglebone.wks

2016-09-21 Thread Maciej Borzęcki
On Wed, Sep 21, 2016 at 5:18 PM, Ed Bartosh  wrote:
> Added wks to make an image for Beaglebone board.
>
> Signed-off-by: Ed Bartosh 
> ---
>  scripts/lib/wic/canned-wks/beaglebone.wks | 7 +++
>  1 file changed, 7 insertions(+)
>  create mode 100644 scripts/lib/wic/canned-wks/beaglebone.wks
>
> diff --git a/scripts/lib/wic/canned-wks/beaglebone.wks 
> b/scripts/lib/wic/canned-wks/beaglebone.wks
> new file mode 100644
> index 000..753418e
> --- /dev/null
> +++ b/scripts/lib/wic/canned-wks/beaglebone.wks
> @@ -0,0 +1,7 @@
> +# short-description: Create Beaglebone disk image
> +# long-description: Creates a partitioned disk image for Beaglebone board
> +# which can be directly copied to SD card.
> +
> +part /boot --ondisk mmcblk0 --label boot --fstype vfat --source 
> bootimg-partition --align 1024 --active
> +part / --ondisk mmcblk0 --label root --fstype ext4 --source rootfs 
> --align 1024
> +

Should be basically the same as sdimage-bootpart.wks as I used BBB
back when I posted it along with some wic fixes. It also used to be
possible to build a usable RaspberryPI image with the same kickstart
file, though I have not tried that lately.

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


Re: [OE-core] [PATCH V2 1/1] kernel.bbclass: Add kernel_version_sanity_check function

2016-09-21 Thread Cal Sullivan
Yes, the PV is set incorrectly here. In b5e7625, the kernel's source was 
updated to 4.1.32 for genericx86-64, but the LINUX_VERSION variable 
(which is used to set PV) was not.


---
Cal

On 09/20/2016 08:11 PM, Robert Yang wrote:


Hi,

There is an error on autobuilder related to this patch:

http://autobuilder.yocto.io:8010/builders/nightly-x86-64-lsb/builds/60/steps/BuildImages_1/logs/stdio 



// Robert

On 09/17/2016 07:48 AM, California Sullivan wrote:

The kernel being built should match what the recipe claims it is
building. This function ensures that happens by comparing the version
information in the kernel's Makefile to the PV the recipe is using.

v2 changes:
* Match against PV instead of LINUX_VERSION
* Match against EXTRAVERSION as well (e.g., -rc4)
* Cleaned up version string building

Fixes [YOCTO #6767].

Signed-off-by: California Sullivan 
---
 meta/classes/kernel.bbclass   | 30 
++

 meta/recipes-kernel/linux/linux-yocto.inc |  1 +
 2 files changed, 31 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index a6112e8..f894795 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -327,6 +327,36 @@ kernel_do_install() {
 }
 do_install[prefuncs] += "package_get_auto_pr"

+# Must be ran no earlier than after do_kernel_checkout or else 
Makefile won't be in ${S}/Makefile

+do_kernel_version_sanity_check() {
+# The Makefile determines the kernel version shown at runtime
+# Don't use KERNEL_VERSION because the headers it grabs the 
version from aren't generated until do_compile

+VERSION=$(grep "^VERSION =" ${S}/Makefile | sed s/.*=\ *//)
+PATCHLEVEL=$(grep "^PATCHLEVEL =" ${S}/Makefile | sed s/.*=\ *//)
+SUBLEVEL=$(grep "^SUBLEVEL =" ${S}/Makefile | sed s/.*=\ *//)
+EXTRAVERSION=$(grep "^EXTRAVERSION =" ${S}/Makefile | sed s/.*=\ 
*//)

+
+# Build a string for regex and a plain version string
+reg="^${VERSION}\.${PATCHLEVEL}"
+vers="${VERSION}.${PATCHLEVEL}"
+if [ -n "${SUBLEVEL}" ]; then
+# Ignoring a SUBLEVEL of zero is fine
+if [ "${SUBLEVEL}" = "0" ]; then
+reg="${reg}(\.${SUBLEVEL})?"
+else
+reg="${reg}\.${SUBLEVEL}"
+vers="${vers}.${SUBLEVEL}"
+fi
+fi
+vers="${vers}${EXTRAVERSION}"
+reg="${reg}${EXTRAVERSION}"
+
+if [ -z `echo ${PV} | grep -E "${reg}"` ]; then
+bbfatal "Package Version (${PV}) does not match of kernel 
being built (${vers}). Please update the PV variable to match the 
kernel source."

+fi
+exit 0
+}
+
 addtask shared_workdir after do_compile before do_compile_kernelmodules
 addtask shared_workdir_setscene

diff --git a/meta/recipes-kernel/linux/linux-yocto.inc 
b/meta/recipes-kernel/linux/linux-yocto.inc

index 98a48ec..d979662 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -55,6 +55,7 @@ do_install_append(){
 }

 # extra tasks
+addtask kernel_version_sanity_check after do_kernel_checkout before 
do_compile

 addtask kernel_link_images after do_compile before do_install
 addtask validate_branches before do_patch after do_kernel_checkout
 addtask kernel_configcheck after do_configure before do_compile



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


Re: [OE-core] rm_work + pybootchart enhancements

2016-09-21 Thread Martin Jansa
On Wed, Sep 21, 2016 at 05:39:02PM +0200, Patrick Ohly wrote:
> Hello!
> 
> rm_work.bbclass currently isn't good enough for use in really tightly
> constrained environments. For example, building core-image-sato with
> 20GB of free disk space should work (final disk usage with rm_work
> active: <13GB). But in practice, that disk space gets exhausted in the
> middle of a build because do_rm_work doesn't run often and/or soon
> enough.

I agree that it could use some improvements, but I'm using simple work
around for this - building whole image in couple steps which forces
rm_work being executed often enough to fit WORKDIR in e.g. 14G tmpfs

something like:
bitbake gcc && bitbake console-image && bitbake webkit && bitbake bigger-image

> Test script attached. I only ran this once, so I can't vouch that the
> numbers are stable. I remember reading about a benchmark wrapper which
> can run such a test script multiple times and then will automatically
> merge the output of all runs together, adding min/max/average/deviation,
> but couldn't find the tool again. Does anyone know which tool does that?

it's in oe-core:
./scripts/contrib/bb-perf/bb-matrix-plot.sh
./scripts/contrib/bb-perf/bb-matrix.sh

...


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


[OE-core] [PATCH 1/1] toolchain-shar-relocate.sh: Add error-handling

2016-09-21 Thread mariano . lopez
From: Mariano Lopez 

The relocation script of the SDK doesn't have enough
error handling when replacing host perl with SDK perl
or changing the symlinks. This will add those checks
along with a sanity check of xargs.

[YOCTO #10114]

Signed-off-by: Mariano Lopez 
---
 meta/files/toolchain-shar-relocate.sh | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/meta/files/toolchain-shar-relocate.sh 
b/meta/files/toolchain-shar-relocate.sh
index d4bcf0e..e491153 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -1,3 +1,8 @@
+if ! xargs --version > /dev/null 2>&1; then
+   echo "xargs is required by the relocation script, please install it 
firts. Abort!"
+   exit 1
+fi
+
 # fix dynamic loader paths in all ELF SDK binaries
 native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 
'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"')
 dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
@@ -7,6 +12,10 @@ if [ "$dl_path" = "" ] ; then
 fi
 executable_files=$($SUDO_EXEC find $native_sysroot -type f \
\( -perm -0100 -o -perm -0010 -o -perm -0001 \) -printf "'%h/%f' ")
+if [ "x$executable_files" = "x" ]; then
+   echo "SDK relocate failed, could not get executalbe files"
+   exit 1
+fi
 
 tdir=`mktemp -d`
 if [ x$tdir = x ] ; then
@@ -14,7 +23,7 @@ if [ x$tdir = x ] ; then
exit 1
 fi
 cat <> $tdir/relocate_sdk.sh
-#!/bin/bash
+#!/bin/sh
 for py in python python2 python3
 do
PYTHON=\`which \${py} 2>/dev/null\`
@@ -53,9 +62,18 @@ done | xargs -n100 file | grep 
":.*\(ASCII\|script\|source\).*text" | \
 -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \
 -e "s: /usr/bin/perl: /usr/bin/env perl:g"
 
+if [ $? -ne 0 ]; then
+   echo "Failed to replace perl. Relocate script failed. Abort!"
+   exit 1
+fi
+
 # change all symlinks pointing to @SDKPATH@
 for l in $($SUDO_EXEC find $native_sysroot -type l); do
$SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e 
"s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
+   if [ $? -ne 0 ]; then
+   echo "Failed to setup symlinks. Relocate script failed. Abort!"
+   exit 1
+fi
 done
 
 echo done
-- 
2.6.6

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


[OE-core] [wic][PATCH] wic: add beaglebone.wks

2016-09-21 Thread Ed Bartosh
Added wks to make an image for Beaglebone board.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/canned-wks/beaglebone.wks | 7 +++
 1 file changed, 7 insertions(+)
 create mode 100644 scripts/lib/wic/canned-wks/beaglebone.wks

diff --git a/scripts/lib/wic/canned-wks/beaglebone.wks 
b/scripts/lib/wic/canned-wks/beaglebone.wks
new file mode 100644
index 000..753418e
--- /dev/null
+++ b/scripts/lib/wic/canned-wks/beaglebone.wks
@@ -0,0 +1,7 @@
+# short-description: Create Beaglebone disk image
+# long-description: Creates a partitioned disk image for Beaglebone board
+# which can be directly copied to SD card.
+
+part /boot --ondisk mmcblk0 --label boot --fstype vfat --source 
bootimg-partition --align 1024 --active
+part / --ondisk mmcblk0 --label root --fstype ext4 --source rootfs --align 
1024
+
-- 
2.1.4

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


Re: [OE-core] [PATCH] wpa_supplicant: Security Advisory-wpa_supplicant-CVE-2016-4476

2016-09-21 Thread Burton, Ross
On 21 September 2016 at 03:47, Zhixiong Chi 
wrote:

> +From ecbb0b3dc122b0d290987cf9c84010bbe53e1022 Mon Sep 17 00:00:00 2001
> +From: Jouni Malinen 
> +Date: Fri, 4 Mar 2016 17:20:18 +0200
> +Subject: [PATCH 1/2] WPS: Reject a Credential with invalid passphrase
> +
> +WPA/WPA2-Personal passphrase is not allowed to include control
> +characters. Reject a Credential received from a WPS Registrar both as
> +STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or
> +WPA2PSK authentication type and includes an invalid passphrase.
> +
> +This fixes an issue where hostapd or wpa_supplicant could have updated
> +the configuration file PSK/passphrase parameter with arbitrary data from
> +an external device (Registrar) that may not be fully trusted. Should
> +such data include a newline character, the resulting configuration file
> +could become invalid and fail to be parsed.
> +
> +Upstream-Status: Backport
> +
> +Signed-off-by: Jouni Malinen 
>

Please add your own s-o-b to the patch header, and as it fixes a CVE then a
CVE tag (CVE: CVE-2016-4476) too.

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


Re: [OE-core] [PATCH 1/1] rpm: make install with --nosignature and --nodigest work

2016-09-21 Thread Mark Hatle
On 9/20/16 10:37 PM, Robert Yang wrote:
> 
> 
> On 09/21/2016 04:33 AM, Mark Hatle wrote:
>> On 9/20/16 10:00 AM, Burton, Ross wrote:
>>>
>>> On 20 September 2016 at 09:15, Hongxu Jia >> > wrote:
>>>
>>> -Upstream-Status: Submitted [Sent email to rpm-de...@rpm5.org
>>> ]
>>> +Upstream-Status: Rejected [Sent email to rpm-de...@rpm5.org
>>> ]
>>> +http://rpm5.org/community/rpm-devel/5655.html
>>> 
>>>
>>>
>>> Considering upstream has explicitly rejected this patch, why should we 
>>> accept it?
>>>
>>> Ross
>>>
>>>
>>
>> I'm confused by what the patch is doing looking at it.
>>
>> It sounds like from the description there is a bug that without the change,
>> packages with (intentionally) bad checksums and such are allowed to be 
>> installed.
>>
>> The bug is caused by a previous patch that enabled nosignature, etc -- 
>> because
>> the comparisons turned out to be backwards.
>>
>> So really nosignature, etc is already in place -- it's just not working 
>> properly?
>>
>> What was rejected upstream is the use of nosignature in any context.  RPM5
>> maintainer believes it is unwise and unsafe to permit uses to install 
>> packages
>> that have failed basic validation.  (I tend to agree.)  Similarly, even being
>> able to run queries and other operations against them may be dangerous as 
>> well.
> 
> If command like "rpm5 -qp --nosignature --nodigest " queries 
> database,
> then it would cause rpm5 hang when more than one "rpm5 -qp" is running, so I
> fixed the *query* problem, and the *install* problem is not caused by the fix.
> Btw., *rpm4* doesn't query database when "rpm -qp file.rpm", if we are going
> to use dnf in next release, maybe we can consider using rpm4 as Fedora does.
> I did a rough statistics for oe-core's local patches, the winner is rpm, it
> has 77 local patches, that's not good for maintaining, and you can imagine 
> that

30 patches are simply configuration changes.

42 patches are bug fixes that have been submitted and will likely go away in the
next uprev.

> how many times it surprised us. rpm4 should be more stable than rpm5, I don't
> know how many distros use rpm5, I can't access rpm5.org atm, it seems that the
> web is down (It was OK yesterday), but widely used distros like Redhat and 
> Suse

The website is working for me today.

> uses rpm4, so maybe rpm4 will make our life much more easier, and also for
> yocto's user. I think that why we need rpm5 before was because we need use it

There is a major problem with rpm4.  It doesn't support cross compiling at all.
We know in the past there have been significant problems with it and BerkleyDB
with endian issues.  Also it was not possible to do cross-architecture installs
(in the past, this one might be resolved.)

The general functionality between RPM4 and RPM5 is nearly identical.  RPM 4 has
a plug-in interface (which I personally don't believe should be used due to
security issues.)  RPM 5 has a focus around specific security enhancements.
Some are reasonable, some are a bit too experimental to be used.

The other main difference is software license.  RPM 4 is 'GPLv2', while RPM5 is
'LGPLv2'.  This doesn't sound like a big deal at first -- but RPM 4 can't be
linked to OpenSSL for it's crypto library.  RPM 4 is linked ONLY to NSS, while
RPM5 can use beecrypt, nss, openssl and others.  This makes for a significantly
more flexible embedded system.

> to compute the package dependencies, but now we have smartpm, so we don't rely
> on that any more.
> 
> Here is the recipe list which has more than 10 local patches, and we have 1762
> patches atm:
>   77 rpm

I'd think it's a better comparison to say '30', the configuration items.  So
it's similar to perl or openssl in complexity.  I'd agree that is a fair 
comparison.

>   59 gcc-5.4
>   49 gcc-6.2
>   36 ltp
>   31 python3
>   30 perl
>   29 openssl
>   28 man
>   27 glibc
>   24 python
>   23 tcp-wrappers-7.6
>   23 systemd
>   18 busybox
>   14 syslinux
>   14 python-smartpm
>   14 elfutils-0.166
>   14 apt
>   13 qemu
>   13 libtool
>   13 gstreamer1.0-plugins-bad
>   13 glib-2.0
>   13 binutils
>   13 bind
>   12 coreutils-6.9
>   11 valgrind
>   11 gdb
>   11 dhcp
>   11 autoconf
>   10 unzip
>   10 dpkg
>   10 console-tools-0.3.2
> 
>>
>> If fixing the problem is as simple as reverting the other change -- and that
>> doesn't cause other problems elsewhere...  I'd rather see that.
> 
> We can't revert the patch, it would break packagefeed-stability.bbclass,
> we will see the hang

Something is wrong with the implementation then.

You should not be doing the equivalent of:

list = ''
for each in list; do rpm -qp $each ; done

This is HORRIBLY inefficient, even with rpm4.


Re: [OE-core] [PATCH] autotools/siteinfo: Tweak CONFIG_SITE handling for determism/races

2016-09-21 Thread Otavio Salvador
On Wed, Sep 21, 2016 at 7:53 AM, Richard Purdie
 wrote:
> As things stand there are multiple races in the CONFIG_SITE handling
> where checksums can change depending on whether site directories
> exist or not when parsing happens. This is bad.
>
> Secondly, there is a build race that occurs if you build virtuals
> in parallel with the "main" recipe, since the main recipe is parsed
> when the virtual is (since it sets variables like BBCLASSEXTEND)
> and with the current code, it may look for files and directories
> which could be created/destroyed which the loop is executing. This
> is also bad.
>
> The aclocal-copy directory should only ever be accessed by the call
> from autotools.bbclass. This chanages the parameter name to make it

... This changes the parameter ...

> clear and ensures all callers have the right usage, neatly avoiding
> all the problems above. Also added better comments.
>
> Signed-off-by: Richard Purdie 

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


[OE-core] [PATCH] autotools/siteinfo: Tweak CONFIG_SITE handling for determism/races

2016-09-21 Thread Richard Purdie
As things stand there are multiple races in the CONFIG_SITE handling
where checksums can change depending on whether site directories
exist or not when parsing happens. This is bad.

Secondly, there is a build race that occurs if you build virtuals
in parallel with the "main" recipe, since the main recipe is parsed
when the virtual is (since it sets variables like BBCLASSEXTEND)
and with the current code, it may look for files and directories
which could be created/destroyed which the loop is executing. This
is also bad.

The aclocal-copy directory should only ever be accessed by the call
from autotools.bbclass. This chanages the parameter name to make it
clear and ensures all callers have the right usage, neatly avoiding
all the problems above. Also added better comments.

Signed-off-by: Richard Purdie 

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 4c32c84..e5f527e 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -25,7 +25,7 @@ inherit siteinfo
 
 # Space separated list of shell scripts with variables defined to supply test
 # results for autoconf tests we cannot run at build time.
-export CONFIG_SITE = "${@siteinfo_get_files(d, False)}"
+export CONFIG_SITE = "${@siteinfo_get_files(d)}"
 
 acpaths = "default"
 EXTRA_AUTORECONF = "--exclude=autopoint"
@@ -253,8 +253,9 @@ python autotools_copy_aclocals () {
 t = os.path.join(aclocaldir, os.path.basename(c))
 if not os.path.exists(t):
 os.symlink(c, t)
-
-d.setVar("CONFIG_SITE", siteinfo_get_files(d, False))
+
+# Refresh variable with cache files
+d.setVar("CONFIG_SITE", siteinfo_get_files(d, aclocalcache=True))
 }
 autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS 
BB_TASKDEPDATA"
 
diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass
index 03d4c4f..6a2e4bf 100644
--- a/meta/classes/siteinfo.bbclass
+++ b/meta/classes/siteinfo.bbclass
@@ -153,7 +153,7 @@ python () {
 bb.fatal("Please add your architecture to siteinfo.bbclass")
 }
 
-def siteinfo_get_files(d, no_cache = False):
+def siteinfo_get_files(d, aclocalcache = False):
 sitedata = siteinfo_data(d)
 sitefiles = ""
 for path in d.getVar("BBPATH", True).split(":"):
@@ -162,11 +162,17 @@ def siteinfo_get_files(d, no_cache = False):
 if os.path.exists(filename):
 sitefiles += filename + " "
 
-if no_cache: return sitefiles
+if not aclocalcache:
+return sitefiles
 
-# Now check for siteconfig cache files
-# Use the files copied to the aclocal cache generated by autotools.bbclass
-# to avoid races
+# Now check for siteconfig cache files in the directory setup by 
autotools.bbclass to
+# avoid races.
+#
+# ACLOCALDIR may or may not exist so cache should only be set to True from 
autotools.bbclass
+# after files have been copied into this location. To do otherwise risks 
parsing/signature
+# issues and the directory being created/removed whilst this code 
executes. This can happen
+# when a multilib recipe is parsed along with its base variant which may 
be running at the time
+# causing rare but nasty failures
 path_siteconfig = d.getVar('ACLOCALDIR', True)
 if path_siteconfig and os.path.isdir(path_siteconfig):
 for i in os.listdir(path_siteconfig):
@@ -174,7 +180,6 @@ def siteinfo_get_files(d, no_cache = False):
 continue
 filename = os.path.join(path_siteconfig, i)
 sitefiles += filename + " "
-
 return sitefiles
 
 #
diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index dabd17b..8df0967 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -105,7 +105,7 @@ EOF
 }
 
 #we get the cached site config in the runtime
-TOOLCHAIN_CONFIGSITE_NOCACHE := "${@siteinfo_get_files(d, True)}"
+TOOLCHAIN_CONFIGSITE_NOCACHE := "${@siteinfo_get_files(d)}"
 TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = 
"${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
 TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/${MLPREFIX}libc ncurses"
 


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


[OE-core] [openembedded-core][PATCH 0/2] perl: fix some CVE issues

2016-09-21 Thread mingli.yu
Changed in V2:
add CVE tags
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [openembedded-core][PATCH 1/2] perl: fix CVE-2016-6185

2016-09-21 Thread mingli.yu
From: Mingli Yu 

Backport patch to fix CVE-2016-6185 from perl upstream:
http://perl5.git.perl.org/perl.git/commitdiff/08e3451d7

Signed-off-by: Mingli Yu 
---
 .../perl/perl/perl-fix-CVE-2016-6185.patch | 128 +
 meta/recipes-devtools/perl/perl_5.22.1.bb  |   1 +
 2 files changed, 129 insertions(+)
 create mode 100644 meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch

diff --git a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch 
b/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch
new file mode 100644
index 000..2722af3
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch
@@ -0,0 +1,128 @@
+From 7cedaa8bc2ca9e63369d0e2d4c4c23af9febb93a Mon Sep 17 00:00:00 2001
+From: Father Chrysostomos 
+Date: Sat, 2 Jul 2016 22:56:51 -0700
+Subject: [PATCH] perl: fix CVE-2016-6185
+MIME-Version: 1.0
+
+Don't let XSLoader load relative paths
+
+[rt.cpan.org #115808]
+
+The logic in XSLoader for determining the library goes like this:
+
+my $c = () = split(/::/,$caller,-1);
+$modlibname =~ s,[\\/][^\\/]+$,, while $c--;# Q basename
+my $file = "$modlibname/auto/$modpname/$modfname.bundle";
+
+(That last line varies by platform.)
+
+$caller is the calling package.  $modlibname is the calling file.  It
+removes as many path segments from $modlibname as there are segments
+in $caller.  So if you have Foo/Bar/XS.pm calling XSLoader from the
+Foo::Bar package, the $modlibname will end up containing the path in
+@INC where XS.pm was found, followed by "/Foo".  Usually the fallback
+to Dynaloader::bootstrap_inherit, which does an @INC search, makes
+things Just Work.
+
+But if our hypothetical Foo/Bar/XS.pm actually calls
+XSLoader::load from inside a string eval, then path ends up being
+"(eval 1)/auto/Foo/Bar/Bar.bundle".
+
+So if someone creates a directory named '(eval 1)' with a naughty
+binary file in it, it will be loaded if a script using Foo::Bar is run
+in the parent directory.
+
+This commit makes XSLoader fall back to Dynaloader's @INC search if
+the calling file has a relative path that is not found in @INC.
+
+Backport patch from http://perl5.git.perl.org/perl.git/commitdiff/08e3451d7
+
+Upstream-Status: Backport
+CVE: CVE-2016-6185
+Signed-off-by: Mingli Yu 
+---
+ dist/XSLoader/XSLoader_pm.PL | 25 +
+ dist/XSLoader/t/XSLoader.t   | 27 ++-
+ 2 files changed, 51 insertions(+), 1 deletion(-)
+
+diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL
+index 668411d..778e46b 100644
+--- a/dist/XSLoader/XSLoader_pm.PL
 b/dist/XSLoader/XSLoader_pm.PL
+@@ -104,6 +104,31 @@ print OUT <<'EOT';
+ my $modpname = join('/',@modparts);
+ my $c = () = split(/::/,$caller,-1);
+ $modlibname =~ s,[\\/][^\\/]+$,, while $c--;# Q basename
++# Does this look like a relative path?
++if ($modlibname !~ m|^[\\/]|) {
++# Someone may have a #line directive that changes the file name, or
++# may be calling XSLoader::load from inside a string eval.  We cer-
++# tainly do not want to go loading some code that is not in @INC,
++# as it could be untrusted.
++#
++# We could just fall back to DynaLoader here, but then the rest of
++# this function would go untested in the perl core, since all @INC
++# paths are relative during testing.  That would be a time bomb
++# waiting to happen, since bugs could be introduced into the code.
++#
++# So look through @INC to see if $modlibname is in it.  A rela-
++# tive $modlibname is not a common occurrence, so this block is
++# not hot code.
++FOUND: {
++for (@INC) {
++if ($_ eq $modlibname) {
++last FOUND;
++}
++}
++# Not found.  Fall back to DynaLoader.
++goto \::bootstrap_inherit;
++}
++}
+ EOT
+ 
+ my $dl_dlext = quotemeta($Config::Config{'dlext'});
+diff --git a/dist/XSLoader/t/XSLoader.t b/dist/XSLoader/t/XSLoader.t
+index 2ff11fe..1e86faa 100644
+--- a/dist/XSLoader/t/XSLoader.t
 b/dist/XSLoader/t/XSLoader.t
+@@ -33,7 +33,7 @@ my %modules = (
+ 'Time::HiRes'=> q| ::can_ok( 'Time::HiRes' => 'usleep'  ) |,  # 5.7.3
+ );
+ 
+-plan tests => keys(%modules) * 3 + 9;
++plan tests => keys(%modules) * 3 + 10;
+ 
+ # Try to load the module
+ use_ok( 'XSLoader' );
+@@ -125,3 +125,28 @@ XSLoader::load("Devel::Peek");
+ EOS
+ or ::diag $@;
+ }
++
++SKIP: {
++  skip "File::Path not available", 1
++unless eval { require File::Path };
++  my $name = "phooo$$";
++  File::Path::make_path("$name/auto/Foo/Bar");
++  open my $fh,
++">$name/auto/Foo/Bar/Bar.$Config::Config{'dlext'}";
++  close $fh;
++  my $fell_back;
++  local *XSLoader::bootstrap_inherit = sub {
++$fell_back++;
++  

[OE-core] [openembedded-core][PATCH 2/2] perl: fix CVE-2015-8607

2016-09-21 Thread mingli.yu
From: Mingli Yu 

Backport patch to fix CVE-2015-8607 from perl upstream:
http://perl5.git.perl.org/perl.git/commitdiff/0b6f93036de171c12ba95d415e264d9cf7f4e1fd

Signed-off-by: Mingli Yu 
---
 .../perl/perl/perl-fix-CVE-2015-8607.patch | 74 ++
 meta/recipes-devtools/perl/perl_5.22.1.bb  |  1 +
 2 files changed, 75 insertions(+)
 create mode 100644 meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch

diff --git a/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch 
b/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch
new file mode 100644
index 000..7b4a001
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl/perl-fix-CVE-2015-8607.patch
@@ -0,0 +1,74 @@
+From 652c8d4852a69f1bb4d387946f9b76350a1f0d0e Mon Sep 17 00:00:00 2001
+From: Tony Cook 
+Date: Tue, 15 Dec 2015 10:56:54 +1100
+Subject: [PATCH] perl: fix CVE-2015-8607
+
+ensure File::Spec::canonpath() preserves taint
+
+Previously the unix specific XS implementation of canonpath() would
+return an untainted path when supplied a tainted path.
+
+For the empty string case, newSVpvs() already sets taint as needed on
+its result.
+
+This issue was assigned CVE-2015-8607.  [perl #126862]
+
+Backport patch from 
http://perl5.git.perl.org/perl.git/commitdiff/0b6f93036de171c12ba95d415e264d9cf7f4e1fd
+
+Upstream-Status: Backport
+CVE: CVE-2015-8607
+Signed-off-by: Mingli Yu 
+---
+ dist/PathTools/Cwd.xs|  1 +
+ dist/PathTools/t/taint.t | 19 ++-
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/dist/PathTools/Cwd.xs b/dist/PathTools/Cwd.xs
+index 9d4dcf0..3d018dc 100644
+--- a/dist/PathTools/Cwd.xs
 b/dist/PathTools/Cwd.xs
+@@ -535,6 +535,7 @@ THX_unix_canonpath(pTHX_ SV *path)
+ *o = 0;
+ SvPOK_on(retval);
+ SvCUR_set(retval, o - SvPVX(retval));
++SvTAINT(retval);
+ return retval;
+ }
+ 
+diff --git a/dist/PathTools/t/taint.t b/dist/PathTools/t/taint.t
+index 309b3e5..48f8c5b 100644
+--- a/dist/PathTools/t/taint.t
 b/dist/PathTools/t/taint.t
+@@ -12,7 +12,7 @@ use Test::More;
+ BEGIN {
+ plan(
+ ${^TAINT}
+-? (tests => 17)
++? (tests => 21)
+ : (skip_all => "A perl without taint support")
+ );
+ }
+@@ -34,3 +34,20 @@ foreach my $func (@Functions) {
+ 
+ # Previous versions of Cwd tainted $^O
+ is !tainted($^O), 1, "\$^O should not be tainted";
++
++{
++# [perl #126862] canonpath() loses taint
++my $tainted = substr($ENV{PATH}, 0, 0);
++# yes, getcwd()'s result should be tainted, and is tested above
++# but be sure
++ok tainted(File::Spec->canonpath($tainted . Cwd::getcwd)),
++"canonpath() keeps taint on non-empty string";
++ok tainted(File::Spec->canonpath($tainted)),
++"canonpath() keeps taint on empty string";
++
++(Cwd::getcwd() =~ /^(.*)/);
++my $untainted = $1;
++ok !tainted($untainted), "make sure our untainted value is untainted";
++ok !tainted(File::Spec->canonpath($untainted)),
++"canonpath() doesn't add taint to untainted string";
++}
+-- 
+2.8.1
+
diff --git a/meta/recipes-devtools/perl/perl_5.22.1.bb 
b/meta/recipes-devtools/perl/perl_5.22.1.bb
index 33cad9e..b904674 100644
--- a/meta/recipes-devtools/perl/perl_5.22.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.22.1.bb
@@ -67,6 +67,7 @@ SRC_URI += " \
 file://perl-test-customized.patch \
 file://perl-fix-CVE-2016-2381.patch \
 file://perl-fix-CVE-2016-6185.patch \
+file://perl-fix-CVE-2015-8607.patch \
 "
 
 # Fix test case issues
-- 
2.8.1

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


Re: [OE-core] [PATCH 1/2] perl: fix CVE-2016-6185

2016-09-21 Thread Yu, Mingli



On 2016年09月21日 17:21, Burton, Ross wrote:


On 21 September 2016 at 06:38, > wrote:

From: Mingli Yu >

Backport patch to fix CVE-2016-6185 from perl upstream:
http://perl5.git.perl.org/perl.git/commitdiff/08e3451d7


Signed-off-by: Mingli Yu >


Can you please add CVE: tags to the patches alongside the
upstream-status and s-o-b, so that the automated CVE tooling can work?


Will resend the v2 patch to add CVE tags.

Thanks,
Mingli



Ross

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


[OE-core] [PATCH] x264: add textrel to INSANE_SKIP

2016-09-21 Thread Sujith H
From: Fahad Usman 

Tried by adding CFLAGS_append = " -fpic " to
the recipe. But that couldn't help resolve the
warning message:

x264/r2491+gitAUTOINC+c8a773ebfc-r0/packages-split/x264/usr/lib/libx264.so.144' 
has relocations in .text [textrel]

It was found that this warning is emitted because of the
assembly files in the source code. And it is not easy to
get rid of TEXTREL's which are coming from the assembly
source files.

Adding textrel to INSANE_SKIP resolves this issue.
This issue was observed in cyclone5 and imx6qsabresd BSP's.
So generalizing the patch.

Signed-off-by: Fahad Usman 
Signed-off-by: Sujith Haridasan 
---
 meta/recipes-multimedia/x264/x264_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-multimedia/x264/x264_git.bb 
b/meta/recipes-multimedia/x264/x264_git.bb
index fa44f9c..393310f 100644
--- a/meta/recipes-multimedia/x264/x264_git.bb
+++ b/meta/recipes-multimedia/x264/x264_git.bb
@@ -48,6 +48,6 @@ do_install() {
 oe_runmake install DESTDIR=${D}
 }
 
-# PIC can't be enabled for 32-bit x86
-INSANE_SKIP_${PN}_append_x86 = " textrel"
+# PIC can't be enabled for few BSP's
+INSANE_SKIP_${PN}_append = " textrel"
 
-- 
1.9.1

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


[OE-core] [PATCH] uninative-tarball: add SDKMACHINE to stamps-extra-info

2016-09-21 Thread Joshua Lock
Otherwise the stamps for x86-64 and i686 uninative tarballs match
and we can't deploy both to the DEPLOYDIR.

Signed-off-by: Joshua Lock 
---
 meta/recipes-core/meta/uninative-tarball.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/meta/uninative-tarball.bb 
b/meta/recipes-core/meta/uninative-tarball.bb
index 7037bdd..4ead812 100644
--- a/meta/recipes-core/meta/uninative-tarball.bb
+++ b/meta/recipes-core/meta/uninative-tarball.bb
@@ -32,7 +32,7 @@ deltask install
 deltask package
 deltask packagedata
 
-do_populate_sdk[stamp-extra-info] = ""
+do_populate_sdk[stamp-extra-info] = "${SDKMACHINE}"
 
 SDK_DEPENDS += "patchelf-native"
 
-- 
2.7.4

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


[OE-core] [PATCH v2] populate_sdk_base: fix support for changing SDKMACHINE settings

2016-09-21 Thread Joshua Lock
Include SDKMACHINE in the tasks stamp information and the name of
the sstate-inputdirs so that changing SDKMACHINE doesn't result in
valid output of the task being deleted when SDKMACHINE is changed.

Without this patch changing SDKMACHINE and building an SDK resulted
in toolchain installers for other  SDKMACHINE's being deleted from
the deploy directoy.

[YOCTO #10275]

Signed-off-by: Joshua Lock 
---
 meta/classes/populate_sdk_base.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index 6fe0b37..ce12f27 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -26,7 +26,7 @@ SDK_DIR = "${WORKDIR}/sdk"
 SDK_OUTPUT = "${SDK_DIR}/image"
 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
 
-SDKDEPLOYDIR = "${WORKDIR}/deploy-${PN}-populate-sdk"
+SDKDEPLOYDIR = "${WORKDIR}/${SDKMACHINE}-deploy-${PN}-populate-sdk"
 
 B_task-populate-sdk = "${SDK_DIR}"
 
@@ -125,7 +125,7 @@ SSTATE_SKIP_CREATION_task-populate-sdk = '1'
 do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
 do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}"
 do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}"
-do_populate_sdk[stamp-extra-info] = "${MACHINE}"
+do_populate_sdk[stamp-extra-info] = "${MACHINE}${SDKMACHINE}"
 
 fakeroot create_sdk_files() {
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
-- 
2.7.4

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


Re: [OE-core] [PATCH 1/2] perl: fix CVE-2016-6185

2016-09-21 Thread Burton, Ross
On 21 September 2016 at 06:38,  wrote:

> From: Mingli Yu 
>
> Backport patch to fix CVE-2016-6185 from perl upstream:
> http://perl5.git.perl.org/perl.git/commitdiff/08e3451d7
>
> Signed-off-by: Mingli Yu 
>

Can you please add CVE: tags to the patches alongside the upstream-status
and s-o-b, so that the automated CVE tooling can work?

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


Re: [OE-core] [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params

2016-09-21 Thread Andreas Müller
On Wed, Sep 21, 2016 at 11:06 AM, Burton, Ross  wrote:
>
> On 21 September 2016 at 06:30, Andreas Müller 
> wrote:
>>
>> During install all files are recompiled. This should be investigated
>> further
>> later
>
>
> I'd put (pretend) money on it being because PREFIX/prefix change between
> compile and install, so it needs to rebuild.  Looks like this class is doing
> something wrong.
>
> Ross
Answering your 1st email:
Recipes inheriting scons I found in my meta's were:

pingus mongodb mixxx gpsd

* gpsd do_compile is broken for me without this patch (not findinig
math lib although -lm is in ld's command line)
* all others I tested here

Answering your 2nd email:
All files are recompiled without actually doing something. If somebody
has the time for it - it might be useful to see what happens

* if we skip do_compile completely or
* what causes scons to force a recompile although it is told to install

To be honest: Scons is yet another build system doing same thing as
others and creating it's own bugs (e.g pkg-config variables). I
wouldn't want to spend too much time on because there are fortunately
only few packets using it.

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


Re: [OE-core] [PATCH] x264: add textrel to INSANE_SKIP to skip the warning

2016-09-21 Thread Phil Blundell
On Wed, 2016-09-21 at 13:44 +0530, sujith h wrote:
> 
> The above mentioned functions are part of .S files.

OK.  In that case, please just mention in the commit message that you
can't easily get rid of the TEXTRELs because they are coming from
assembler source files that would (I assume) need significant
modifications to work as PIC.  I think that's fine.

thanks

p.

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


Re: [OE-core] [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params

2016-09-21 Thread Burton, Ross
On 21 September 2016 at 06:30, Andreas Müller 
wrote:

> During install all files are recompiled. This should be investigated
> further
> later
>

I'd put (pretend) money on it being because PREFIX/prefix change between
compile and install, so it needs to rebuild.  Looks like this class is
doing something wrong.

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


Re: [OE-core] [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params

2016-09-21 Thread Burton, Ross
On 21 September 2016 at 06:30, Andreas Müller 
wrote:

> During install all files are recompiled. This should be investigated
> further
> later. Currently only one file is recompiled at the same time. Reduce
> install
> time significantly by setting PARALLEL_MAKEINST option in do_install task.
>

Have you verified this happens for all scons recipes?  If we're hacking the
class in lieu of fixing whatever is causing scons to do this, then why not
just not invoke scons in do_compile?

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


Re: [OE-core] [PATCH 1/1] gcc-sanitizers: Fix libtool library files

2016-09-21 Thread Burton, Ross
On 21 September 2016 at 02:46, Yuanjie Huang 
wrote:

> We have some user making use of these libraries directly, otherwise, cross
> gcc can link these sanitizer libraries with just -fsantizer flag without
> problem. Without .la files, his flow can not be libtoolized.
>

libtool works fine without .la files on linux, which is why the
remove-libtool class works (which can be a distro-level inherit and deletes
every .la before it reaches the sysroot).

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


Re: [OE-core] [PATCH] populate_sdk_base: fix support for changing SDKMACHINE settings

2016-09-21 Thread Joshua Lock
On Tue, 2016-09-20 at 15:57 +0100, Joshua Lock wrote:
> Include SDKMACHINE in the tasks stamp information and the name of
> the sstate-inputdirs so that changing SDKMACHINE doesn't result in
> valid output of the task being deleted when SDKMACHINE is changed.
> 
> Without this patch changing SDKMACHINE and building an SDK resulted
> in toolchain installers for other  SDKMACHINE's being deleted from
> the deploy directoy.
> 
> [YOCTO #10275]
> 
> Signed-off-by: Joshua Lock 
> ---
>  meta/classes/populate_sdk_base.bbclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/populate_sdk_base.bbclass
> b/meta/classes/populate_sdk_base.bbclass
> index 6fe0b37..fc4ee8d 100644
> --- a/meta/classes/populate_sdk_base.bbclass
> +++ b/meta/classes/populate_sdk_base.bbclass
> @@ -26,7 +26,7 @@ SDK_DIR = "${WORKDIR}/sdk"
>  SDK_OUTPUT = "${SDK_DIR}/image"
>  SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
>  
> -SDKDEPLOYDIR = "${WORKDIR}/deploy-${PN}-populate-sdk"
> +SDKDEPLOYDIR = "${WORKDIR}/${SDKMACHINE}-deploy-${PN}-populate-sdk"
>  
>  B_task-populate-sdk = "${SDK_DIR}"
>  
> @@ -125,7 +125,7 @@ SSTATE_SKIP_CREATION_task-populate-sdk = '1'
>  do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
>  do_populate_sdk[sstate-inputdirs] = "${SDKDEPLOYDIR}"
>  do_populate_sdk[sstate-outputdirs] = "${SDK_DEPLOY}"
> -do_populate_sdk[stamp-extra-info] = "${MACHINE}"
> +do_populate_sdk[stamp-extra-info] = "${MACHINE} ${SDKMACHINE}"

This adds a space to the stamp file name. A v2 which removes the space
is being prepared.

Joshua

>  
>  fakeroot create_sdk_files() {
>   cp ${COREBASE}/scripts/relocate_sdk.py
> ${SDK_OUTPUT}/${SDKPATH}/
> -- 
> 2.7.4
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] libnl: Fix build with musl

2016-09-21 Thread André Draszik
On Mi, 2016-09-21 at 09:37 +0200, Ming Liu wrote:
> From: Ming Liu 
> 
> [YOCTO #10313]
> 
> Signed-off-by: Ming Liu 
> ---
>  .../libnl/libnl/0001-Fix-build-with-musl.patch | 43
> ++
>  meta/recipes-support/libnl/libnl_3.2.28.bb |  1 +
>  2 files changed, 44 insertions(+)
>  create mode 100644 meta/recipes-support/libnl/libnl/0001-Fix-build-with-
> musl.patch
> 
> diff --git a/meta/recipes-support/libnl/libnl/0001-Fix-build-with-
> musl.patch b/meta/recipes-support/libnl/libnl/0001-Fix-build-with-
> musl.patch
> new file mode 100644
> index 000..8a2dad5
> --- /dev/null
> +++ b/meta/recipes-support/libnl/libnl/0001-Fix-build-with-musl.patch
> @@ -0,0 +1,43 @@
> +From 963d9818d13a025b857380c84d53b11c3aceff54 Mon Sep 17 00:00:00 2001
> +From: Peter Liu 
> +Date: Wed, 21 Sep 2016 09:07:12 +0200
> +Subject: [PATCH] Fix build with musl
> +
> +Upstream-Status: Pending
> +
> +Due to both  and  being included, the
> +in6_addr is being redefined: once from the C library headers and once
> +from the kernel headers. This causes some build failures with for
> +example the musl C library:
> +| In file included from ../../libnl-3.2.28/include/linux-
> private/linux/if_bridge.h:18:0,
> +|  from ../../libnl-3.2.28/lib/route/link/bridge.c:26:
> +| /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/linux/in6.h:32:8:
> error: redefinition of 'struct in6_addr'
> +|  struct in6_addr {
> +| ^~~~
> +| In file included from /mnt/ale-
> build/tmp/musl/sysroots/itmk2/usr/include/arpa/inet.h:9:0,
> +|  from ../../libnl-3.2.28/include/netlink-
> private/netlink.h:33,
> +|  from ../../libnl-3.2.28/lib/route/link/bridge.c:20:
> +| /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/netinet/in.h:23:8:
> note: originally defined here
> +
> +In order to fix this, use just the C library header .


This doesn't look right, as this error shouldn't happen (and I don't see it
myself).
As per linux kernel commit cfd280c91253cc28e4919e349fa7a813b63e71e8,
sysroot/usr/include/linux/in6.h guards definition of struct in6_addr
with __UAPI_DEF_IN6_ADDR wich is set appropriately as per
sysroot/usr/include/linux/libc-compat.h. Same for all the other structs. You
can double check when compiling bridge.c manually using gcc's -E option.

Are you using a very old kernel or very old kernel headers? Older than 3.12?

Cheers,
Andre'

> +
> +Signed-off-by: Peter Liu 
> +---
> + include/linux-private/linux/if_bridge.h | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/include/linux-private/linux/if_bridge.h b/include/linux-
> private/linux/if_bridge.h
> +index f24050b..8f7490c 100644
> +--- a/include/linux-private/linux/if_bridge.h
>  b/include/linux-private/linux/if_bridge.h
> +@@ -15,7 +15,6 @@
> + 
> + #include 
> + #include 
> +-#include 
> + 
> + #define SYSFS_BRIDGE_ATTR   "bridge"
> + #define SYSFS_BRIDGE_FDB"brforward"
> +-- 
> +1.9.1
> +
> diff --git a/meta/recipes-support/libnl/libnl_3.2.28.bb b/meta/recipes-
> support/libnl/libnl_3.2.28.bb
> index 26982f3..f8f3e53 100644
> --- a/meta/recipes-support/libnl/libnl_3.2.28.bb
> +++ b/meta/recipes-support/libnl/libnl_3.2.28.bb
> @@ -15,6 +15,7 @@ SRC_URI = "https://github.com/thom311/${BPN}/releases/do
> wnload/${BPN}${@d.getVar
> file://0001-lib-add-utility-function-nl_strerror_l.patch \
> file://0002-lib-switch-to-using-strerror_l-instead-of-
> strerror_r.patch \
> file://0003-src-switch-to-using-strerror_l-instead-of-
> strerror_r.patch \
> +   file://0001-Fix-build-with-musl.patch \
>  "
>  UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases;
>  
> -- 
> 1.9.1
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] systemd: use nss-resolve by default if resolved is enabled

2016-09-21 Thread Maciej Borzecki
Add nss-resolve to NSS hosts resolution service if systemd-resolved is
enabled via PACKAGECONFIG. This enabled routing all DNS requests through
systemd-networkd by default.

Apply the following patches:
- 0023-nss-install-nss-modules-into-lib - makes sure that libnss_resolve
  and other nss modules end up in ${rootlibdir}
- 0024-resolved-when-processing-auxiliary-DNSSEC-transactio - backport
  v231 patch that fixes SERVFAIL handling, required for name resolution
  under qemu or in containers.

Signed-off-by: Maciej Borzecki 
---
 .../0023-nss-install-nss-modules-into-lib.patch| 64 ++
 ...en-processing-auxiliary-DNSSEC-transactio.patch | 49 +
 meta/recipes-core/systemd/systemd_230.bb   | 18 +-
 3 files changed, 129 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-core/systemd/systemd/0023-nss-install-nss-modules-into-lib.patch
 create mode 100644 
meta/recipes-core/systemd/systemd/0024-resolved-when-processing-auxiliary-DNSSEC-transactio.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0023-nss-install-nss-modules-into-lib.patch 
b/meta/recipes-core/systemd/systemd/0023-nss-install-nss-modules-into-lib.patch
new file mode 100644
index 
..747d848a3e3917a69872cf68d77e26d66506a18e
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0023-nss-install-nss-modules-into-lib.patch
@@ -0,0 +1,64 @@
+From eb76a59139c5ca6355cf1ef9594dab8b73b9b1f5 Mon Sep 17 00:00:00 2001
+Message-Id: 

+In-Reply-To: 
+References: 
+From: Maciek Borzecki 
+Date: Tue, 20 Sep 2016 21:24:45 +0200
+Subject: [PATCH 1/2] nss: install nss modules into /lib
+
+NSS modules (libnss_*.so.*) need to be installed into
+${rootlibdir} (typically /lib) in order to be used. Previously, the
+modules were installed into ${libdir} (usually ${prefix}/lib), where in
+case of a split /usr, this would typically resolve to /usr/lib.
+
+Signed-off-by: Maciek Borzecki 
+Signed-off-by: Maciej Borzecki 
+
+---
+Upstream-Status: Pending
+
+ Makefile.am | 7 ---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index dbd3386..0e2dca5 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -151,6 +151,7 @@ nodist_zshcompletion_DATA = $(nodist_zshcompletion_data)
+ endif
+ udevlibexec_PROGRAMS =
+ gperf_gperf_sources =
++rootlib_LTLIBRARIES =
+ 
+ in_files = $(filter %.in,$(EXTRA_DIST))
+ in_in_files = $(filter %.in.in, $(in_files))
+@@ -4931,7 +4932,7 @@ libnss_myhostname_la_LDFLAGS = \
+ libnss_myhostname_la_LIBADD = \
+   libsystemd-internal.la
+ 
+-lib_LTLIBRARIES += \
++rootlib_LTLIBRARIES += \
+   libnss_myhostname.la
+ endif
+ 
+@@ -5030,7 +5031,7 @@ libnss_mymachines_la_LDFLAGS = \
+ libnss_mymachines_la_LIBADD = \
+   libsystemd-internal.la
+ 
+-lib_LTLIBRARIES += \
++rootlib_LTLIBRARIES += \
+   libnss_mymachines.la
+ 
+ endif
+@@ -5321,7 +5322,7 @@ libnss_resolve_la_LIBADD = \
+   libsystemd-internal.la \
+ -ldl
+ 
+-lib_LTLIBRARIES += \
++rootlib_LTLIBRARIES += \
+   libnss_resolve.la
+ 
+ systemd_resolve_SOURCES = \
+-- 
+2.5.0
+
diff --git 
a/meta/recipes-core/systemd/systemd/0024-resolved-when-processing-auxiliary-DNSSEC-transactio.patch
 
b/meta/recipes-core/systemd/systemd/0024-resolved-when-processing-auxiliary-DNSSEC-transactio.patch
new file mode 100644
index 
..6924ce712ca4e8bb3d9e59178515b8bef4e381a5
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0024-resolved-when-processing-auxiliary-DNSSEC-transactio.patch
@@ -0,0 +1,49 @@
+From 44f04e32cb66676446b70895278348910f3666c3 Mon Sep 17 00:00:00 2001
+Message-Id: 
<44f04e32cb66676446b70895278348910f3666c3.1474443269.git.maciej.borze...@rndity.com>
+In-Reply-To: 
+References: 
+From: Lennart Poettering 
+Date: Thu, 23 Jun 2016 23:46:56 +0200
+Subject: [PATCH 2/2] resolved: when processing auxiliary DNSSEC transactions,
+ accept those with SERVFAIL
+
+Some upstream DNS servers return SERVFAIL if we ask them for DNSSEC RRs, which
+some forwarding DNS servers pass on to us as SERVFAIL (other though as
+NOERROR...). This is should not be considered a problem, as long as the domain
+in question didn't have DNSSEC enabled. Hence: when making use of auxiliary
+transactions accept those that return SERVFAIL.
+
+Signed-off-by: Maciej Borzecki 
+---
+Upstream-Status: Backport from 231
+
+ src/resolve/resolved-dns-transaction.c | 9 +
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/resolve/resolved-dns-transaction.c 

[OE-core] [PATCH 0/2] systemd: use nss-resolve when systemd-resoveld is enable

2016-09-21 Thread Maciej Borzecki
A patch series that enables use of nss-resolve (systemd's NSS service module) if
systemd-networkd is enabled via PACKAGECONFIG.

The first patch is a trivial formatting change.

The second patch does the following:

- replace dns with resolve in /etc/nsswitch.conf if systemd-resolved is enabled

- applies a patch fixing the location of libnss_* services provided by systemd
  (the patch has been submitted upstream for inclusion in v232)

- applies a patch that fixes SERVFAIL handling, this restores the ability to
  properly resolve names under qemu (backport from v231)

Maciej Borzecki (2):
  systemd: fix indentation
  systemd: use nss-resolve by default if resolved is enabled

 .../0023-nss-install-nss-modules-into-lib.patch| 64 ++
 ...en-processing-auxiliary-DNSSEC-transactio.patch | 49 +
 meta/recipes-core/systemd/systemd_230.bb   | 22 ++--
 3 files changed, 131 insertions(+), 4 deletions(-)
 create mode 100644 
meta/recipes-core/systemd/systemd/0023-nss-install-nss-modules-into-lib.patch
 create mode 100644 
meta/recipes-core/systemd/systemd/0024-resolved-when-processing-auxiliary-DNSSEC-transactio.patch

-- 
2.5.0

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


[OE-core] [PATCH 1/2] systemd: fix indentation

2016-09-21 Thread Maciej Borzecki
Signed-off-by: Maciej Borzecki 
---
 meta/recipes-core/systemd/systemd_230.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_230.bb 
b/meta/recipes-core/systemd/systemd_230.bb
index 
6e6ef76cfa2322fc0b833e4f38a4cdf7483a8782..1276316a0cddeefecb34cf9422c94c3ed12f5381
 100644
--- a/meta/recipes-core/systemd/systemd_230.bb
+++ b/meta/recipes-core/systemd/systemd_230.bb
@@ -211,8 +211,8 @@ do_install() {
 
chown root:systemd-journal ${D}/${localstatedir}/log/journal
 
-# Delete journal README, as log can be symlinked inside volatile.
-rm -f ${D}/${localstatedir}/log/README
+   # Delete journal README, as log can be symlinked inside volatile.
+   rm -f ${D}/${localstatedir}/log/README
 
install -d ${D}${systemd_unitdir}/system/graphical.target.wants
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
-- 
2.5.0

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


Re: [OE-core] [PATCH] x264: add textrel to INSANE_SKIP to skip the warning

2016-09-21 Thread sujith h
On Thu, Sep 15, 2016 at 3:37 PM, Phil Blundell <p...@pbcl.net> wrote:

> On Thu, 2016-09-15 at 12:22 +0530, Sujith H wrote:
> > From: Fahad Usman <fahad_us...@mentor.com>
> >
> > This change help fix the warning message:
> >
> > x264/r2491+gitAUTOINC+c8a773ebfc-r0/packages-
> > split/x264/usr/lib/libx264.so.144' has relocations in .text [textrel]
> >
> > Adding textrel to INSANE_SKIP resolves this issue.
>
> This is a poor commit message.  Adding textrel to INSANE_SKIP prevents
> the check from being done, so it is fairly self-evident that it will
> suppress the corresponding warning message.  Please add an explanation
> of why this is an appropriate thing to do, i.e. why the textrels are
> present and why you can't get rid of them by other means.
>
> In particular please clarify whether you want to do this because the
> textrels are absolutely unavoidable for some reason on your
> architecture, or just because you think this is a good trade-off for
> performance.  If the latter then I think the change probably belongs in
> a distro or BSP layer not in oe-core.
>

As per the reference from
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#qa-issue-textrel
I added CFLAGS_append = " -fPIC " in the recipe and tried to build x264.
Below is the result.


Loading cache: 100%
|##|
Time: 0:00:00
Loaded 1313 entries from dependency cache.
Parsing recipes: 100%
||
Time: 0:00:02
Parsing of 877 .bb files complete (865 cached, 12 parsed). 1325 targets, 69
skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION= "1.31.1"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS= "arm-poky-linux-gnueabi"
MACHINE   = "cyclone5"
DISTRO= "poky"
DISTRO_VERSION= "2.1+snapshot-20160921"
TUNE_FEATURES = "arm armv7a vfp  neon"
TARGET_FPU= "softfp"
meta
meta-poky
meta-yocto-bsp= "toaster-next:75927f8f6809b9b4696fc438b240bc7a3db561e2"
meta-altera   = "master:1bfc1ac36f28352a79a7ba98dc9d74608d76f1e6"

Initialising tasks: 100%
|#|
Time: 0:00:01
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: x264-r2491+gitAUTOINC+c8a773ebfc-r0 do_package_qa: QA Issue: ELF
binary
'/home/sujith/poky-push/build-qemuarm/tmp/work/armv7a-neon-poky-linux-gnueabi/x264/r2491+gitAUTOINC+c8a773ebfc-r0/packages-split/x264/usr/lib/libx264.so.144'
has relocations in .text [textrel]
NOTE: Tasks Summary: Attempted 407 tasks of which 394 didn't need to be
rerun and all succeeded.

Summary: There was 1 WARNING message shown.

I have tried to debug the compile log where I found, there are .S files in
the source. Here is the small snippet of the compile log

arm-poky-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon  -mfloat-abi=softfp
--sysroot=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/cyclone5
-Wno-maybe-uninitialized -Wshadow -O3 -ffast-math  -O2 -pipe -g
-feliminate-unused-debug-types
-fdebug-prefix-map=/home/sujith/poky-push/build-qemuarm/tmp/work/armv7a-neon-poky-linux-gnueabi/x264/r2491+gitAUTOINC+c8a773ebfc-r0=/usr/src/debug/x264/r2491+gitAUTOINC+c8a773ebfc-r0
-fdebug-prefix-map=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/x86_64-linux=
-fdebug-prefix-map=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/cyclone5=
-fPIC  -Wall -I. -I.
--sysroot=/home/sujith/poky-push/build-qemuarm/tmp/sysroots/cyclone5
-std=gnu99 -fPIC -fomit-frame-pointer -fno-tree-vectorize   -c -o
encoder/slicetype-cl.o encoder/slicetype-cl.c
arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC
-DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/cpu-a.o common/arm/cpu-a.S
arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC
-DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/pixel-a.o
common/arm/pixel-a.S
arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC
-DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/mc-a.o common/arm/mc-a.S
arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC
-DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/dct-a.o common/arm/dct-a.S
arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC
-DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/quant-a.o
common/arm/quant-a.S
arm-poky-linux-gnueabi-gcc -I. -I. -c -DSTACK_ALIGNMENT=16 -DPIC
-DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/de

[OE-core] [PATCH][krogoth] qemu: CVE-2016-3710

2016-09-21 Thread Sona Sarmadi
Fixes an out-of-bounds read/write access flaw which was found
in the way QEMU's VGA emulation with VESA BIOS Extensions (VBE)
support performed read/write operations using I/O port methods.

A privileged guest user could use this flaw to execute arbitrary
code on the host with the privileges of the host's QEMU process.

Reference to pstream fix:
-
https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg01197.html

References:
---
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-3710
http://www.openwall.com/lists/oss-security/2016/05/09/3
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-3710

Signed-off-by: Sona Sarmadi 
---
 .../recipes-devtools/qemu/qemu/CVE-2016-3710.patch | 111 +
 meta/recipes-devtools/qemu/qemu_2.5.0.bb   |   1 +
 2 files changed, 112 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2016-3710.patch

diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2016-3710.patch 
b/meta/recipes-devtools/qemu/qemu/CVE-2016-3710.patch
new file mode 100644
index 000..48b9589
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/CVE-2016-3710.patch
@@ -0,0 +1,111 @@
+From 3bf1817079bb0d80c0d8a86a7c7dd0bfe90eb82e Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann 
+Date: Tue, 26 Apr 2016 08:49:10 +0200
+Subject: [PATCH] vga: fix banked access bounds checking (CVE-2016-3710)
+
+vga allows banked access to video memory using the window at 0xa0
+and it supports a different access modes with different address
+calculations.
+
+The VBE bochs extentions support banked access too, using the
+VBE_DISPI_INDEX_BANK register.  The code tries to take the different
+address calculations into account and applies different limits to
+VBE_DISPI_INDEX_BANK depending on the current access mode.
+
+Which is probably effective in stopping misprogramming by accident.
+But from a security point of view completely useless as an attacker
+can easily change access modes after setting the bank register.
+
+Drop the bogus check, add range checks to vga_mem_{readb,writeb}
+instead.
+
+Upstream-Status: Backport [from v2.6.0-rc5~1^2~4
+commit: 3bf1817079bb0d80c0d8a86a7c7dd0bfe90eb82e]
+
+Fixes: CVE-2016-3710
+Reported-by: Qinghao Tang 
+Signed-off-by: Gerd Hoffmann 
+Signed-off-by: Sona Sarmadi 
+---
+ hw/display/vga.c | 24 ++--
+ 1 file changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/hw/display/vga.c b/hw/display/vga.c
+index 657e9f1..b9191ca 100644
+--- a/hw/display/vga.c
 b/hw/display/vga.c
+@@ -179,6 +179,7 @@ static void vga_update_memory_access(VGACommonState *s)
+ size = 0x8000;
+ break;
+ }
++assert(offset + size <= s->vram_size);
+ memory_region_init_alias(>chain4_alias, 
memory_region_owner(>vram),
+  "vga.chain4", >vram, offset, size);
+ memory_region_add_subregion_overlap(s->legacy_address_space, base,
+@@ -716,11 +717,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, 
uint32_t val)
+ vbe_fixup_regs(s);
+ break;
+ case VBE_DISPI_INDEX_BANK:
+-if (s->vbe_regs[VBE_DISPI_INDEX_BPP] == 4) {
+-  val &= (s->vbe_bank_mask >> 2);
+-} else {
+-  val &= s->vbe_bank_mask;
+-}
++val &= s->vbe_bank_mask;
+ s->vbe_regs[s->vbe_index] = val;
+ s->bank_offset = (val << 16);
+ vga_update_memory_access(s);
+@@ -819,13 +816,21 @@ uint32_t vga_mem_readb(VGACommonState *s, hwaddr addr)
+ 
+ if (s->sr[VGA_SEQ_MEMORY_MODE] & VGA_SR04_CHN_4M) {
+ /* chain 4 mode : simplest access */
++assert(addr < s->vram_size);
+ ret = s->vram_ptr[addr];
+ } else if (s->gr[VGA_GFX_MODE] & 0x10) {
+ /* odd/even mode (aka text mode mapping) */
+ plane = (s->gr[VGA_GFX_PLANE_READ] & 2) | (addr & 1);
+-ret = s->vram_ptr[((addr & ~1) << 1) | plane];
++addr = ((addr & ~1) << 1) | plane;
++if (addr >= s->vram_size) {
++return 0xff;
++}
++ret = s->vram_ptr[addr];
+ } else {
+ /* standard VGA latched access */
++if (addr * sizeof(uint32_t) >= s->vram_size) {
++return 0xff;
++}
+ s->latch = ((uint32_t *)s->vram_ptr)[addr];
+ 
+ if (!(s->gr[VGA_GFX_MODE] & 0x08)) {
+@@ -882,6 +887,7 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, 
uint32_t val)
+ plane = addr & 3;
+ mask = (1 << plane);
+ if (s->sr[VGA_SEQ_PLANE_WRITE] & mask) {
++assert(addr < s->vram_size);
+ s->vram_ptr[addr] = val;
+ #ifdef DEBUG_VGA_MEM
+ printf("vga: chain4: [0x" TARGET_FMT_plx "]\n", addr);
+@@ -895,6 +901,9 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, 
uint32_t val)
+ mask = (1 << plane);
+

[OE-core] [PATCH] libnl: Fix build with musl

2016-09-21 Thread Ming Liu
From: Ming Liu 

[YOCTO #10313]

Signed-off-by: Ming Liu 
---
 .../libnl/libnl/0001-Fix-build-with-musl.patch | 43 ++
 meta/recipes-support/libnl/libnl_3.2.28.bb |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 
meta/recipes-support/libnl/libnl/0001-Fix-build-with-musl.patch

diff --git a/meta/recipes-support/libnl/libnl/0001-Fix-build-with-musl.patch 
b/meta/recipes-support/libnl/libnl/0001-Fix-build-with-musl.patch
new file mode 100644
index 000..8a2dad5
--- /dev/null
+++ b/meta/recipes-support/libnl/libnl/0001-Fix-build-with-musl.patch
@@ -0,0 +1,43 @@
+From 963d9818d13a025b857380c84d53b11c3aceff54 Mon Sep 17 00:00:00 2001
+From: Peter Liu 
+Date: Wed, 21 Sep 2016 09:07:12 +0200
+Subject: [PATCH] Fix build with musl
+
+Upstream-Status: Pending
+
+Due to both  and  being included, the
+in6_addr is being redefined: once from the C library headers and once
+from the kernel headers. This causes some build failures with for
+example the musl C library:
+| In file included from 
../../libnl-3.2.28/include/linux-private/linux/if_bridge.h:18:0,
+|  from ../../libnl-3.2.28/lib/route/link/bridge.c:26:
+| /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/linux/in6.h:32:8: error: 
redefinition of 'struct in6_addr'
+|  struct in6_addr {
+| ^~~~
+| In file included from 
/mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/arpa/inet.h:9:0,
+|  from 
../../libnl-3.2.28/include/netlink-private/netlink.h:33,
+|  from ../../libnl-3.2.28/lib/route/link/bridge.c:20:
+| /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/netinet/in.h:23:8: note: 
originally defined here
+
+In order to fix this, use just the C library header .
+
+Signed-off-by: Peter Liu 
+---
+ include/linux-private/linux/if_bridge.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/include/linux-private/linux/if_bridge.h 
b/include/linux-private/linux/if_bridge.h
+index f24050b..8f7490c 100644
+--- a/include/linux-private/linux/if_bridge.h
 b/include/linux-private/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+ 
+ #include 
+ #include 
+-#include 
+ 
+ #define SYSFS_BRIDGE_ATTR "bridge"
+ #define SYSFS_BRIDGE_FDB  "brforward"
+-- 
+1.9.1
+
diff --git a/meta/recipes-support/libnl/libnl_3.2.28.bb 
b/meta/recipes-support/libnl/libnl_3.2.28.bb
index 26982f3..f8f3e53 100644
--- a/meta/recipes-support/libnl/libnl_3.2.28.bb
+++ b/meta/recipes-support/libnl/libnl_3.2.28.bb
@@ -15,6 +15,7 @@ SRC_URI = 
"https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar
file://0001-lib-add-utility-function-nl_strerror_l.patch \

file://0002-lib-switch-to-using-strerror_l-instead-of-strerror_r.patch \

file://0003-src-switch-to-using-strerror_l-instead-of-strerror_r.patch \
+   file://0001-Fix-build-with-musl.patch \
 "
 UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases;
 
-- 
1.9.1

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