Re: [OE-core] [PATCH] Made spdx support SPDX2.0 SPEC Signed-off-by: Lei Maohui <leimao...@cn.fujitsu.com>

2017-02-21 Thread Lei, Maohui
To all 

> I think DoSOCSv2 is more integratabtle into Yocto/OE infra and seems to be
> having, fossology setups are complex and is slow too. so it might be a good
> option to have.

Yes, it is. 
In addition, the fossology-spdx isn't maintained any more. 

To make spdx module easier to use, I have added dosocs2-natives into a new 
meta: 
meta-spdxscanner (https://github.com/dl9pf/meta-spdxscanner/tree/leimh-dev ).
Better than my patch for oe-core, with meta-spdxscanner, user doesn't need to 
do anything on host system.

Because python-dosocs2-natives depends some recipes come from meta-oe, I think 
it is hard to add python-dosocs2-natives into oe-core.
Maybe it is better to move spdx module into meta-oe?

Best regards
Lei


> -Original Message-
> From: Khem Raj [mailto:raj.k...@gmail.com]
> Sent: Friday, December 23, 2016 1:28 AM
> To: Sona Sarmadi
> Cc: Lei, Maohui/雷 茂慧; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] Made spdx support SPDX2.0 SPEC Signed-off-by:
> Lei Maohui 
> 
> 
> > On Dec 22, 2016, at 1:07 AM, Sona Sarmadi  wrote:
> >
> > Hi Lei, all,
> >
> >> --- a/meta/classes/spdx.bbclass
> >> +++ b/meta/classes/spdx.bbclass
> >> @@ -1,12 +1,9 @@
> >> # 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.
> >
> > Why replace Fossology with DoSOCSv2? Why not make it optional?
> >
> > Has anyone any comments on this suggestion? AFAI see this patch has not been
> accepted yet. Is there any plan to do it?
> 
> I think DoSOCSv2 is more integratabtle into Yocto/OE infra and seems to be
> having, fossology setups are complex and is slow too. so it might be a good
> option to have.
> 
> >
> > Cheers
> > //Sona
> > --
> > ___
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> 



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


[OE-core] [PATCH] python3-native: extend RPROVIDES

2017-02-21 Thread liu . ming50
From: Ming Liu 

Let RPROVIDES include identical packages as listed in PROVIDES of
python-3.5-manifest.inc, to satisfy the native runtime requirement
on python3-native.

Signed-off-by: Ming Liu 
---
 .../python/python3-native_3.5.2.bb | 94 --
 1 file changed, 68 insertions(+), 26 deletions(-)

diff --git a/meta/recipes-devtools/python/python3-native_3.5.2.bb 
b/meta/recipes-devtools/python/python3-native_3.5.2.bb
index bf4e686..5cb4ab8 100644
--- a/meta/recipes-devtools/python/python3-native_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3-native_3.5.2.bb
@@ -41,32 +41,74 @@ DEPENDS = "openssl-native bzip2-replacement-native 
zlib-native readline-native s
 
 inherit native
 
-RPROVIDES += " \
-python3-compression-native \
-python3-core-native \
-python3-distutils-native \
-python3-datetime-native \
-python3-enum-native \
-python3-terminal-native \
-python3-email-native \
-python3-importlib-native \
-python3-io-native \
-python3-json-native \
-python3-lang-native \
-python3-misc-native \
-python3-modules-native \
-python3-netclient-native \
-python3-netserver-native \
-python3-numbers-native \
-python3-pkgutil-native \
-python3-pprint-native \
-python3-re-native \
-python3-shell-native \
-python3-subprocess-native \
-python3-textutils-native \
-python3-threading-native \
-python3-unittest-native \
-"
+RPROVIDES += "python3-2to3-native \
+  python3-argparse-native \
+  python3-asyncio-native \
+  python3-audio-native \
+  python3-codecs-native \
+  python3-compile-native \
+  python3-compression-native \
+  python3-core-native \
+  python3-crypt-native \
+  python3-ctypes-native \
+  python3-curses-native \
+  python3-datetime-native \
+  python3-db-native \
+  python3-debugger-native \
+  python3-dev-native \
+  python3-difflib-native \
+  python3-distutils-native \
+  python3-distutils-staticdev-native \
+  python3-doctest-native \
+  python3-email-native \
+  python3-enum-native \
+  python3-fcntl-native \
+  python3-gdbm-native \
+  python3-html-native \
+  python3-idle-native \
+  python3-image-native \
+  python3-importlib-native \
+  python3-io-native \
+  python3-json-native \
+  python3-lang-native \
+  python3-logging-native \
+  python3-mailbox-native \
+  python3-math-native \
+  python3-mime-native \
+  python3-mmap-native \
+  python3-multiprocessing-native \
+  python3-netclient-native \
+  python3-netserver-native \
+  python3-numbers-native \
+  python3-pickle-native \
+  python3-pkgutil-native \
+  python3-pprint-native \
+  python3-profile-native \
+  python3-pydoc-native \
+  python3-re-native \
+  python3-readline-native \
+  python3-reprlib-native \
+  python3-resource-native \
+  python3-selectors-native \
+  python3-shell-native \
+  python3-signal-native \
+  python3-smtpd-native \
+  python3-sqlite3-native \
+  python3-sqlite3-tests-native \
+  python3-stringold-native \
+  python3-subprocess-native \
+  python3-syslog-native \
+  python3-terminal-native \
+  python3-tests-native \
+  python3-textutils-native \
+  python3-threading-native \
+  python3-tkinter-native \
+  python3-typing-native \
+  python3-unittest-native \
+  python3-unixadmin-native \
+  python3-xml-native \
+  python3-xmlrpc-native \
+ "
 
 EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
 
-- 
1.9.1

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


[OE-core] [PATCH] python-native: extend RPROVIDES

2017-02-21 Thread liu . ming50
From: Ming Liu 

Let RPROVIDES include identical packages as listed in PROVIDES of
python-2.7-manifest.inc, to satisfy the native runtime requirement
on python-native.

Signed-off-by: Ming Liu 
---
 .../python/python-native_2.7.12.bb | 70 +-
 1 file changed, 69 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python-native_2.7.12.bb 
b/meta/recipes-devtools/python/python-native_2.7.12.bb
index de83cbd..7819ab6 100644
--- a/meta/recipes-devtools/python/python-native_2.7.12.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.12.bb
@@ -25,7 +25,75 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
 
 inherit native
 
-RPROVIDES += "python-distutils-native python-compression-native 
python-textutils-native python-codecs-native python-core-native 
python-unittest-native"
+RPROVIDES += "python-2to3-native \
+  python-argparse-native \
+  python-audio-native \
+  python-bsddb-native \
+  python-codecs-native \
+  python-compile-native \
+  python-compiler-native \
+  python-compression-native \
+  python-contextlib-native \
+  python-core-native \
+  python-crypt-native \
+  python-ctypes-native \
+  python-curses-native \
+  python-datetime-native \
+  python-db-native \
+  python-debugger-native \
+  python-dev-native \
+  python-difflib-native \
+  python-distutils-native \
+  python-distutils-staticdev-native \
+  python-doctest-native \
+  python-email-native \
+  python-fcntl-native \
+  python-gdbm-native \
+  python-hotshot-native \
+  python-html-native \
+  python-idle-native \
+  python-image-native \
+  python-importlib-native \
+  python-io-native \
+  python-json-native \
+  python-lang-native \
+  python-logging-native \
+  python-mailbox-native \
+  python-math-native \
+  python-mime-native \
+  python-mmap-native \
+  python-multiprocessing-native \
+  python-netclient-native \
+  python-netserver-native \
+  python-numbers-native \
+  python-pickle-native \
+  python-pkgutil-native \
+  python-plistlib-native \
+  python-pprint-native \
+  python-profile-native \
+  python-pydoc-native \
+  python-re-native \
+  python-readline-native \
+  python-resource-native \
+  python-robotparser-native \
+  python-shell-native \
+  python-smtpd-native \
+  python-sqlite3-native \
+  python-sqlite3-tests-native \
+  python-stringold-native \
+  python-subprocess-native \
+  python-syslog-native \
+  python-terminal-native \
+  python-tests-native \
+  python-textutils-native \
+  python-threading-native \
+  python-tkinter-native \
+  python-unittest-native \
+  python-unixadmin-native \
+  python-xml-native \
+  python-xmlrpc-native \
+  python-zlib-native \
+ "
 
 EXTRA_OECONF_append = " --bindir=${bindir}/${PN} 
--with-system-expat=${STAGING_DIR_HOST}"
 
-- 
1.9.1

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


[OE-core] [PATCH] unzip: CVE-2014-9913 CVE-2016-9844

2017-02-21 Thread Zhixiong Chi
Backport the patches for CVE-2014-9913 CVE-2016-9844

CVE-2016-9844:
Buffer overflow in the zi_short function in zipinfo.c in Info-Zip
UnZip 6.0 allows remote attackers to cause a denial of service
(crash) via a large compression method value in the central
directory file header.
CVE-2014-9913:
Buffer overflow in the list_files function in list.c in Info-Zip
UnZip 6.0 allows remote attackers to cause a denial of service
(crash) via vectors related to the compression method.

Patches come from:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/archivers/unzip/  or
https://release.debian.org/proposed-updates/stable_diffs/unzip_6.0-16+deb8u3.debdiff

Bug-Debian: https://bugs.debian.org/847486
Bug-Ubuntu: https://launchpad.net/bugs/1643750

(LOCAL REV: NOT UPSTREAM) --send to oe-core on 20170222

Signed-off-by: Zhixiong Chi 
---
 .../18-cve-2014-9913-unzip-buffer-overflow.patch   | 33 ++
 .../19-cve-2016-9844-zipinfo-buffer-overflow.patch | 32 +
 meta/recipes-extended/unzip/unzip_6.0.bb   |  4 ++-
 3 files changed, 68 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch
 create mode 100644 
meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch

diff --git 
a/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch
 
b/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch
new file mode 100644
index 000..eb76e2e
--- /dev/null
+++ 
b/meta/recipes-extended/unzip/unzip/18-cve-2014-9913-unzip-buffer-overflow.patch
@@ -0,0 +1,33 @@
+From: "Steven M. Schweda" 
+Subject: Fix CVE-2014-9913, buffer overflow in unzip
+Bug: https://sourceforge.net/p/infozip/bugs/27/
+Bug-Debian: https://bugs.debian.org/847485
+Bug-Ubuntu: https://launchpad.net/bugs/387350
+X-Debian-version: 6.0-21
+
+Upstream-Status: Backport
+
+Signed-off-by: Zhixiong Chi 
+
+--- a/list.c
 b/list.c
+@@ -339,7 +339,18 @@
+ G.crec.compression_method == ENHDEFLATED) {
+ methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3];
+ } else if (methnum >= NUM_METHODS) {
+-sprintf([4], "%03u", G.crec.compression_method);
++/* 2013-02-26 SMS.
++ * http://sourceforge.net/p/infozip/bugs/27/  CVE-2014-9913.
++ * Unexpectedly large compression methods overflow
++ * [].  Use the old, three-digit decimal format
++ * for values which fit.  Otherwise, sacrifice the
++ * colon, and use four-digit hexadecimal.
++ */
++if (G.crec.compression_method <= 999) {
++sprintf( [ 4], "%03u", G.crec.compression_method);
++} else {
++sprintf( [ 3], "%04X", G.crec.compression_method);
++}
+ }
+ 
+ #if 0   /* GRR/Euro:  add this? */
diff --git 
a/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch
 
b/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch
new file mode 100644
index 000..fd0c024
--- /dev/null
+++ 
b/meta/recipes-extended/unzip/unzip/19-cve-2016-9844-zipinfo-buffer-overflow.patch
@@ -0,0 +1,32 @@
+From: "Steven M. Schweda" 
+Subject: Fix CVE-2016-9844, buffer overflow in zipinfo
+Bug-Debian: https://bugs.debian.org/847486
+Bug-Ubuntu: https://launchpad.net/bugs/1643750
+X-Debian-version: 6.0-21
+
+Upstream-Status: Backport
+
+Signed-off-by: Zhixiong Chi 
+
+--- a/zipinfo.c
 b/zipinfo.c
+@@ -1921,7 +1921,18 @@
+ ush  dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3);
+ methbuf[3] = dtype[dnum];
+ } else if (methnum >= NUM_METHODS) {   /* unknown */
+-sprintf([1], "%03u", G.crec.compression_method);
++/* 2016-12-05 SMS.
++ * https://launchpad.net/bugs/1643750
++ * Unexpectedly large compression methods overflow
++ * [].  Use the old, three-digit decimal format
++ * for values which fit.  Otherwise, sacrifice the "u",
++ * and use four-digit hexadecimal.
++ */
++if (G.crec.compression_method <= 999) {
++sprintf( [ 1], "%03u", G.crec.compression_method);
++} else {
++sprintf( [ 0], "%04X", G.crec.compression_method);
++}
+ }
+ 
+ for (k = 0;  k < 15;  ++k)
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb 
b/meta/recipes-extended/unzip/unzip_6.0.bb
index 547379c..d4ee487 100644
--- a/meta/recipes-extended/unzip/unzip_6.0.bb
+++ b/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -16,7 +16,9 @@ SRC_URI = 
"${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/
file://11-cve-2014-8141-getzip64data.patch \
file://CVE-2015-7696.patch \

Re: [OE-core] [PATCH V4 1/1] ltp: upgrade to 20170116

2017-02-21 Thread Dengke Du
This is because the ltp source code adds a new function 
"SAFE_FILE_PRINTF" in the version 20170116 of ltp,


in function "SAFE_FILE_PRINTF", the third arguments need a format 
string, but in fchmodat01.c, at the line


of 130:

SAFE_FILE_PRINTF(cleanup, testfile, testfile)

it passed the same as the second arguments, it should pass the format 
string of the second argument.


I will fix it as soon as.


On 2017年02月22日 00:28, Burton, Ross wrote:

Fails with security flags enabled:

| In file included from ../../../../include/old/test.h:47:0,
|  from fchmodat01.c:44:
| fchmodat01.c: In function 'setup':
| ../../../../include/old/old_safe_file_ops.h:55:27: error: format not 
a string literal and no format arguments [-Werror=format-security]

|(path), (fmt), ## __VA_ARGS__)
|^
| fchmodat01.c:130:2: note: in expansion of macro 'SAFE_FILE_PRINTF'
|   SAFE_FILE_PRINTF(cleanup, testfile, testfile);
|   ^~~~
| ../../../../include/old/old_safe_file_ops.h:55:27: error: format not 
a string literal and no format arguments [-Werror=format-security]

|(path), (fmt), ## __VA_ARGS__)
|^
| fchmodat01.c:131:2: note: in expansion of macro 'SAFE_FILE_PRINTF'
|   SAFE_FILE_PRINTF(cleanup, testfile2, testfile2);
|   ^~~~

Ross


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


[OE-core] [PATCH 2/2] systemd: add dependency on initscripts-sushell for selinux

2017-02-21 Thread jackie.huang
From: Jackie Huang 

sushell is required by systemd service debug-shell
when selinux is enabled.

Signed-off-by: Jackie Huang 
---
 meta/recipes-core/systemd/systemd_232.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_232.bb 
b/meta/recipes-core/systemd/systemd_232.bb
index cc8781e..d38be14 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -113,7 +113,7 @@ PACKAGECONFIG[xkbcommon] = 
"--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
 # Update NAT firewall rules
 PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
 PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
+PACKAGECONFIG[selinux] = 
"--enable-selinux,--disable-selinux,libselinux,initscripts-sushell"
 PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes 
ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no 
ac_cv_header_valgrind_valgrind_h=no ,valgrind"
 PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
 PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
-- 
2.8.3

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


[OE-core] [PATCH 0/2] systemd: fixes for debug-shell service

2017-02-21 Thread jackie.huang
From: Jackie Huang 

--
The following changes since commit e436a6398684d2872cb541f1cfb0f67b3618d15a:

  layer.conf: bump version for change in eSDK selftest behaviour (2017-02-19 
09:39:03 -0800)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib.git jhuang0/d_debug-shell_170222_1
  http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/d_debug-shell_170222_1

Jackie Huang (2):
  initscripts: split sushell into sub package
  systemd: add dependency on initscripts-sushell for selinux

 meta/recipes-core/initscripts/initscripts_1.0.bb | 5 +++--
 meta/recipes-core/systemd/systemd_232.bb | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

-- 
2.8.3

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


[OE-core] [PATCH 1/2] initscripts: split sushell into sub package

2017-02-21 Thread jackie.huang
From: Jackie Huang 

* sushell is required by systemd service debug-shell
  when selinux is enabled, but it doesn't make sense
  to make systemd depend on initscripts, so split sushell
  into sub package initscripts-sushell.

* The bash dependency has been removed by:
  '''
  4917e36a77bd6821b45db52caa43939d344d92f6
  initscripts: Fix regression for requiring /bin/bash
  '''
  so remove bash from RDEPENDS when selinux is enabled.

Signed-off-by: Jackie Huang 
---
 meta/recipes-core/initscripts/initscripts_1.0.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb 
b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 2e4f7e4..7e01572 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -46,11 +46,12 @@ inherit update-alternatives
 DEPENDS_append = " update-rc.d-native"
 PACKAGE_WRITE_DEPS_append = " 
${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
 
-PACKAGES =+ "${PN}-functions"
+PACKAGES =+ "${PN}-functions ${PN}-sushell"
 RDEPENDS_${PN} = "${PN}-functions \
-  
${@bb.utils.contains('DISTRO_FEATURES','selinux','bash','',d)} \
+  
${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \
 "
 FILES_${PN}-functions = "${sysconfdir}/init.d/functions*"
+FILES_${PN}-sushell = "${base_sbindir}/sushell"
 
 ALTERNATIVE_PRIORITY_${PN}-functions = "90"
 ALTERNATIVE_${PN}-functions = "functions"
-- 
2.8.3

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


[OE-core] [PATCH v2 1/2] glib-2.0/glib.inc: Only apply MLPREFIX renaming to class-target

2017-02-21 Thread Nathan Rossi
When renaming the 'gio-querymodules' binary to prefix with the current
MLPREFIX, only do this for target packages where the MLPREFIX makes
sense. This skips renaming for nativesdk targets which have MLPREFIX set
to 'nativesdk-'.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-core/glib-2.0/glib.inc | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/glib-2.0/glib.inc 
b/meta/recipes-core/glib-2.0/glib.inc
index a5db455248..bbac7ebd32 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -91,11 +91,6 @@ do_install_append () {
if [ -f ${D}${bindir}/glib-mkenums ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' 
${D}${bindir}/glib-mkenums
fi
-
-# Make sure gio-querymodules is unique among multilibs
-if test "x${MLPREFIX}" != "x"; then
-mv ${D}${libexecdir}/gio-querymodules 
${D}${libexecdir}/${MLPREFIX}gio-querymodules
-fi
 }
 
 do_install_append_class-target () {
@@ -106,6 +101,11 @@ do_install_append_class-target () {
rm 
${D}${datadir}/installed-tests/glib/gdbus-serialization.test
fi
fi
+
+   # Make sure gio-querymodules is unique among multilibs
+   if test "x${MLPREFIX}" != "x"; then
+   mv ${D}${libexecdir}/gio-querymodules 
${D}${libexecdir}/${MLPREFIX}gio-querymodules
+   fi
 }
 
 do_install_append_libc-musl () {
-- 
2.11.0

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


[OE-core] [PATCH v2 2/2] glib-2.0/glib.inc: If 'charset.alias' exists drop it

2017-02-21 Thread Nathan Rossi
Delete the 'charset.alias' file during the do_install task if it exists.
This file is not shipped in any packages and on the targets that it is
generated (musl and mingw32) it is undesired.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-core/glib-2.0/glib.inc | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/glib-2.0/glib.inc 
b/meta/recipes-core/glib-2.0/glib.inc
index bbac7ebd32..6600d33dcd 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -91,6 +91,10 @@ do_install_append () {
if [ -f ${D}${bindir}/glib-mkenums ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' 
${D}${bindir}/glib-mkenums
fi
+
+   if [ -e ${D}${libdir}/charset.alias ]; then
+   rm -f ${D}${libdir}/charset.alias
+   fi
 }
 
 do_install_append_class-target () {
@@ -108,10 +112,6 @@ do_install_append_class-target () {
fi
 }
 
-do_install_append_libc-musl () {
-   rm -f ${D}${libdir}/charset.alias
-}
-
 RDEPENDS_${PN}-ptest += "\
 gnome-desktop-testing \
 tzdata \
-- 
2.11.0

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


[OE-core] [PATCH v2 0/2] glib-2.0 changes for nativesdk and packaging

2017-02-21 Thread Nathan Rossi
This series contains two patches. The first fixes up the renaming of
gio-querymodules so that it is only applied to class-target (so that
'nativesdk-gio-query-modules' is not generated). The second change makes
the removal of 'charset.alias' occur for all targets including musl
since it is not packaged by default and not desired in cases that it is
generated.
---
Changes in v2:
 * Rebased on top of current master


Nathan Rossi (2):
  glib-2.0/glib.inc: Only apply MLPREFIX renaming to class-target
  glib-2.0/glib.inc: If 'charset.alias' exists drop it

 meta/recipes-core/glib-2.0/glib.inc | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

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


Re: [OE-core] [PATCH 3/4] sudo: upgrade to 1.8.19p2

2017-02-21 Thread ChenQi

On 02/17/2017 11:59 PM, Burton, Ross wrote:


On 17 February 2017 at 10:59, Chen Qi > wrote:


-LIC_FILES_CHKSUM =
"file://doc/LICENSE;md5=c16e542408abda013d672be8eb88d174 \
+LIC_FILES_CHKSUM =
"file://doc/LICENSE;md5=f600a47c2a2cdde5899e449607810ed1 \


Please remember to explain why this was changed.

Also, this changing on an upgrade kind of makes the point of the 
.inc/.bb split meaningless, so feel free to merge them.


Ross


I've added the comments and send out V2.

As the change of the contents in doc/LICENSE is a small change, '2015' 
changed to '2017', I think we don't merge the .inc and .bb files.


Best Regards,

Chen Qi

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


[OE-core] [PATCH V2 3/4] sudo: upgrade to 1.8.19p2

2017-02-21 Thread Chen Qi
The license checksum for doc/LICENSE is changed. It's a small change.
'2015' is changed to '2017'. Nothing else is changed. So the licenses
remain the same.

Signed-off-by: Chen Qi 
---
 meta/recipes-extended/sudo/sudo.inc   | 2 +-
 meta/recipes-extended/sudo/{sudo_1.8.18p1.bb => sudo_1.8.19p2.bb} | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-extended/sudo/{sudo_1.8.18p1.bb => sudo_1.8.19p2.bb} (90%)

diff --git a/meta/recipes-extended/sudo/sudo.inc 
b/meta/recipes-extended/sudo/sudo.inc
index a25876b..d42a04a 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.sudo.ws;
 BUGTRACKER = "http://www.sudo.ws/bugs/;
 SECTION = "admin"
 LICENSE = "ISC & BSD & Zlib"
-LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=c16e542408abda013d672be8eb88d174 \
+LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=f600a47c2a2cdde5899e449607810ed1 \
 
file://plugins/sudoers/redblack.c;beginline=1;endline=41;md5=cfe41112f96c19a074934d128f45c693
 \
 
file://lib/util/reallocarray.c;beginline=3;endline=16;md5=85b0905b795d4d58bf2e00635649eec6
 \
 
file://lib/util/fnmatch.c;beginline=3;endline=27;md5=67f83ee9bd456557397082f8f1be0efd
 \
diff --git a/meta/recipes-extended/sudo/sudo_1.8.18p1.bb 
b/meta/recipes-extended/sudo/sudo_1.8.19p2.bb
similarity index 90%
rename from meta/recipes-extended/sudo/sudo_1.8.18p1.bb
rename to meta/recipes-extended/sudo/sudo_1.8.19p2.bb
index 95e1b84..deb60de 100644
--- a/meta/recipes-extended/sudo/sudo_1.8.18p1.bb
+++ b/meta/recipes-extended/sudo/sudo_1.8.19p2.bb
@@ -7,8 +7,8 @@ SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
 
 PAM_SRC_URI = "file://sudo.pam"
 
-SRC_URI[md5sum] = "28f5214d5bcb5af5710decb95184a0a6"
-SRC_URI[sha256sum] = 
"e5a0471c721281a693025bbde33ebd9d3db43245d83ab8516bbfc23980379434"
+SRC_URI[md5sum] = "31a6090ed1d0946fa22cba19e86aafef"
+SRC_URI[sha256sum] = 
"237e18e67c2ad59ecacfa4b7707198b09fcf84914621585a9bc670dcc31a52e0"
 
 DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'pam-plugin-limits pam-plugin-keyinit', '', d)}"
-- 
1.9.1

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


[OE-core] [PATCH V2 2/4] sysstat: upgrade to 11.5.4

2017-02-21 Thread Chen Qi
Signed-off-by: Chen Qi 
---
 .../recipes-extended/sysstat/{sysstat_11.5.3.bb => sysstat_11.5.4.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/sysstat/{sysstat_11.5.3.bb => sysstat_11.5.4.bb} 
(53%)

diff --git a/meta/recipes-extended/sysstat/sysstat_11.5.3.bb 
b/meta/recipes-extended/sysstat/sysstat_11.5.4.bb
similarity index 53%
rename from meta/recipes-extended/sysstat/sysstat_11.5.3.bb
rename to meta/recipes-extended/sysstat/sysstat_11.5.4.bb
index bb6a671..7ff363b 100644
--- a/meta/recipes-extended/sysstat/sysstat_11.5.3.bb
+++ b/meta/recipes-extended/sysstat/sysstat_11.5.4.bb
@@ -4,5 +4,5 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=a23a74b3f4caf9616230789d94217acb"
 
 SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
 
-SRC_URI[md5sum] = "5986da64af934d8cecc7bca7ebe43752"
-SRC_URI[sha256sum] = 
"f8229d14819e2d461ede83894648e03c8a2ad14a1ba200d68cda9816c42f41ea"
+SRC_URI[md5sum] = "f16ae8edd462f5199ee033f7c0e2c197"
+SRC_URI[sha256sum] = 
"1e1008656575e70486b456e79775e98d3b8732d7e2cb408559209bd0318e0807"
-- 
1.9.1

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


[OE-core] [PATCH V2 1/4] cups: upgrade to 2.2.2

2017-02-21 Thread Chen Qi
Signed-off-by: Chen Qi 
---
 meta/recipes-extended/cups/{cups_2.2.1.bb => cups_2.2.2.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/cups/{cups_2.2.1.bb => cups_2.2.2.bb} (40%)

diff --git a/meta/recipes-extended/cups/cups_2.2.1.bb 
b/meta/recipes-extended/cups/cups_2.2.2.bb
similarity index 40%
rename from meta/recipes-extended/cups/cups_2.2.1.bb
rename to meta/recipes-extended/cups/cups_2.2.2.bb
index 7c5e776..5174c30 100644
--- a/meta/recipes-extended/cups/cups_2.2.1.bb
+++ b/meta/recipes-extended/cups/cups_2.2.2.bb
@@ -2,5 +2,5 @@ require cups.inc
 
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f212b4338db0da8cb892e94bf2949460"
 
-SRC_URI[md5sum] = "a94da2a1e9dbdccb4f3836a38a431931"
-SRC_URI[sha256sum] = 
"83b8730aa977cc055e7410df6a3a682548994c113994ca630a16513017e419d5"
+SRC_URI[md5sum] = "036f6bda6202ae3e280ac00c710b5ca4"
+SRC_URI[sha256sum] = 
"f589bb7d5d1dc3aa0915d7cf2b808571ef2e1530cd1a6ebe76ae8f9f4994e4f6"
-- 
1.9.1

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


[OE-core] [PATCH V2 4/4] util-linux: upgrade to 2.29.1

2017-02-21 Thread Chen Qi
Signed-off-by: Chen Qi 
---
 .../util-linux/{util-linux_2.29.bb => util-linux_2.29.1.bb}   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-core/util-linux/{util-linux_2.29.bb => 
util-linux_2.29.1.bb} (86%)

diff --git a/meta/recipes-core/util-linux/util-linux_2.29.bb 
b/meta/recipes-core/util-linux/util-linux_2.29.1.bb
similarity index 86%
rename from meta/recipes-core/util-linux/util-linux_2.29.bb
rename to meta/recipes-core/util-linux/util-linux_2.29.1.bb
index 80638bd..1395b47 100644
--- a/meta/recipes-core/util-linux/util-linux_2.29.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.29.1.bb
@@ -16,8 +16,8 @@ SRC_URI += "file://configure-sbindir.patch \
 file://avoid_parallel_tests.patch \
 file://uuid-test-error-api.patch \
 "
-SRC_URI[md5sum] = "07b6845f48a421ad5844aa9d58edb837"
-SRC_URI[sha256sum] = 
"2c59ea67cc7b564104f60532f6e0a95fe17a91acb870ba8fd7e986f273abf9e7"
+SRC_URI[md5sum] = "0cbb6d16ab9c5736e5649ef1264bee6e"
+SRC_URI[sha256sum] = 
"0ce40600b934ec2fecfa6bfc4efe6982d051ba96c2832b05201347aec582f54f"
 
 CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
 
-- 
1.9.1

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


[OE-core] [PATCH V2 0/4] Package Upgrade -- cups, sysstat, sudo, util-linux

2017-02-21 Thread Chen Qi
The following changes since commit e436a6398684d2872cb541f1cfb0f67b3618d15a:

  layer.conf: bump version for change in eSDK selftest behaviour (2017-02-19 
09:39:03 -0800)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/PU-20170217
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/PU-20170217

Chen Qi (4):
  cups: upgrade to 2.2.2
  sysstat: upgrade to 11.5.4
  sudo: upgrade to 1.8.19p2
  util-linux: upgrade to 2.29.1

 .../util-linux/{util-linux_2.29.bb => util-linux_2.29.1.bb}   | 4 ++--
 meta/recipes-extended/cups/{cups_2.2.1.bb => cups_2.2.2.bb}   | 4 ++--
 meta/recipes-extended/sudo/sudo.inc   | 2 +-
 meta/recipes-extended/sudo/{sudo_1.8.18p1.bb => sudo_1.8.19p2.bb} | 4 ++--
 .../recipes-extended/sysstat/{sysstat_11.5.3.bb => sysstat_11.5.4.bb} | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)
 rename meta/recipes-core/util-linux/{util-linux_2.29.bb => 
util-linux_2.29.1.bb} (86%)
 rename meta/recipes-extended/cups/{cups_2.2.1.bb => cups_2.2.2.bb} (40%)
 rename meta/recipes-extended/sudo/{sudo_1.8.18p1.bb => sudo_1.8.19p2.bb} (90%)
 rename meta/recipes-extended/sysstat/{sysstat_11.5.3.bb => sysstat_11.5.4.bb} 
(53%)

-- 
1.9.1

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


[OE-core] [PATCH 1/1] bash: 4.3.30 -> 4.4

2017-02-21 Thread Hongxu Jia
From: Zheng Ruoqin 

1) Upgrade bash from 4.3.30 to 4.4
2) Delete 1 patche below, since they are integrated upstream.
   fix-run-intl.patch
3) Modify 2 patches below to make it compatible with new version
   fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
   test-output.patch
4) Add 1 patche below to solve pkgconfig sanity error
   0001-patch-to-obtain-pkgconfig-sanity.patch

Signed-off-by: Zheng Ruoqin 

5) Delete CVE-2016-9401.patch which backported from 4.4

6) Update patches from upstream to 4.4

7) Add ${PN}-loadable for loadable builtins which is new features in Bash 4.4
   --
   a.  `make install' now installs the example loadable builtins and a set of
   bash headers to use when developing new loadable builtins.

   b.  `enable -f' now attempts to call functions named BUILTIN_builtin_load 
when
   loading BUILTIN, and BUILTIN_builtin_unload when deleting it.  This 
allows
   loadable builtins to run initialization and cleanup code.

   c.  There is a new BASH_LOADABLES_PATH variable containing a list of 
directories
   where the `enable -f' command looks for shared objects containing 
loadable
   builtins.
   --

8) Fix loadable builtins `uname' could not be parsed by rpmdeps correctly:
   --
   $ recipe-sysroot-native/usr/lib/rpm/bin/rpmdeps-oecore --macros \
   recipe-sysroot-native/usr/lib/rpm/macros --define '_rpmfc_magic_path \
   recipe-sysroot-native/usr/share/misc/magic.mgc' --rpmpopt \
   recipe-sysroot-native/usr/lib/rpm/rpmpopt 
packages-split/bash/usr/lib64/bash/uname

   |packages-split/bash/usr/lib64/bash/uname Provides: )(64bit
   |packages-split/bash/usr/lib64/bash/uname Provides: elf(buildid) = 
7186059a5a6b11ec38493b53072c3a62edf7e05c
   --

   The incorrected "Provides: )(64bit" could not be parsed by rpmbuild.
   --
   | DEBUG: Executing shell function BUILDSPEC
   | error: line 56: Dependency ")(64bit" must begin with alpha-numeric, '_' or 
'/': Provides: )(64bit
   | error: Package has no %description: bash-4.4-r0.core2_64
   --

Signed-off-by: Hongxu Jia 
---
 ...e-builtins-uname-could-not-be-parsed-by-r.patch |  89 +
 .../0001-patch-to-obtain-pkgconfig-sanity.patch|  28 +
 .../recipes-extended/bash/bash/CVE-2016-9401.patch |  50 
 ...roc-run-heredoc-run-execscript-run-test-f.patch | 137 ++---
 meta/recipes-extended/bash/bash/fix-run-intl.patch | 110 -
 meta/recipes-extended/bash/bash/test-output.patch  |  20 ++-
 meta/recipes-extended/bash/bash_4.3.30.bb  |  72 ---
 meta/recipes-extended/bash/bash_4.4.bb |  66 ++
 8 files changed, 209 insertions(+), 363 deletions(-)
 create mode 100644 
meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch
 create mode 100644 
meta/recipes-extended/bash/bash/0001-patch-to-obtain-pkgconfig-sanity.patch
 delete mode 100644 meta/recipes-extended/bash/bash/CVE-2016-9401.patch
 delete mode 100644 meta/recipes-extended/bash/bash/fix-run-intl.patch
 delete mode 100644 meta/recipes-extended/bash/bash_4.3.30.bb
 create mode 100644 meta/recipes-extended/bash/bash_4.4.bb

diff --git 
a/meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch
 
b/meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch
new file mode 100644
index 000..79d9e4e
--- /dev/null
+++ 
b/meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch
@@ -0,0 +1,89 @@
+rename uname to workaround name confliction in rpmnsProbe
+
+The loadable builtins `uname' could not be parsed by
+rpmdeps correctly:
+--
+$recipe-sysroot-native/usr/lib/rpm/bin/rpmdeps-oecore --macros \
+recipe-sysroot-native/usr/lib/rpm/macros --define '_rpmfc_magic_path \
+recipe-sysroot-native/usr/share/misc/magic.mgc' --rpmpopt \
+recipe-sysroot-native/usr/lib/rpm/rpmpopt 
packages-split/bash/usr/lib64/bash/uname
+
+|packages-split/bash/usr/lib64/bash/uname Provides: )(64bit
+|packages-split/bash/usr/lib64/bash/uname Provides: elf(buildid) = 
7186059a5a6b11ec38493b53072c3a62edf7e05c
+--
+
+The incorrected "Provides: )(64bit" could not be parsed by rpmbuild.
+--
+| DEBUG: Executing shell function BUILDSPEC
+| error: line 56: Dependency ")(64bit" must begin with alpha-numeric, '_' or 
'/': Provides: )(64bit
+| error: Package has no %description: bash-4.4-r0.core2_64
+--
+
+The root cause is `uname' is incorrectly parsed by rpmnsProbe that string
+matches with "uname()(64bit)".
+
+The nsType of `uname' should be RPMNS_TYPE_NAMESPACE (like other utilities),
+rather than RPMNS_TYPE_UNAME which generates "Provides: )(64bit".
+
+We could not fix rpm-native without side effect. So rename to `uname-oe'
+and create a symlink `uname' could 

[OE-core] [PATCH V5 0/1] bash: 4.3.30 -> 4.4

2017-02-21 Thread Hongxu Jia
Changed in V5:
- Squash into a single commit.

Changed in V4:
- Rebase bash, to drop backported patch CVE-2016-9401.patch

//Hongxu

The following changes since commit e436a6398684d2872cb541f1cfb0f67b3618d15a:

  layer.conf: bump version for change in eSDK selftest behaviour (2017-02-19 
09:39:03 -0800)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib hongxu/upgrade-20170214
  
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=hongxu/upgrade-20170214

Zheng Ruoqin (1):
  bash: 4.3.30 -> 4.4

 ...e-builtins-uname-could-not-be-parsed-by-r.patch |  89 +
 .../0001-patch-to-obtain-pkgconfig-sanity.patch|  28 +
 .../recipes-extended/bash/bash/CVE-2016-9401.patch |  50 
 ...roc-run-heredoc-run-execscript-run-test-f.patch | 137 ++---
 meta/recipes-extended/bash/bash/fix-run-intl.patch | 110 -
 meta/recipes-extended/bash/bash/test-output.patch  |  20 ++-
 meta/recipes-extended/bash/bash_4.3.30.bb  |  72 ---
 meta/recipes-extended/bash/bash_4.4.bb |  66 ++
 8 files changed, 209 insertions(+), 363 deletions(-)
 create mode 100644 
meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch
 create mode 100644 
meta/recipes-extended/bash/bash/0001-patch-to-obtain-pkgconfig-sanity.patch
 delete mode 100644 meta/recipes-extended/bash/bash/CVE-2016-9401.patch
 delete mode 100644 meta/recipes-extended/bash/bash/fix-run-intl.patch
 delete mode 100644 meta/recipes-extended/bash/bash_4.3.30.bb
 create mode 100644 meta/recipes-extended/bash/bash_4.4.bb

-- 
2.9.3

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


Re: [OE-core] [PATCH 2/4] bash: update patches for 4.4

2017-02-21 Thread Hongxu Jia

On 2017年02月21日 21:45, Burton, Ross wrote:
Having commits which don't build isn't good for bisecting in the 
future: can you squash these into a single commit and credit Zheng 
Ruoqin for the initial work?




OK, I will squash them into a single commit.

//Hongxu


Ross

On 21 February 2017 at 07:36, Hongxu Jia > wrote:


- Update patches from upstream to 4.4

- Add ${PN}-loadable for loadable builtins which is new features
in Bash 4.4
  --
   a.  `make install' now installs the example loadable builtins
and a set of
   bash headers to use when developing new loadable builtins.

   b.  `enable -f' now attempts to call functions named
BUILTIN_builtin_load when
   loading BUILTIN, and BUILTIN_builtin_unload when deleting
it.  This allows
   loadable builtins to run initialization and cleanup code.

   c.  There is a new BASH_LOADABLES_PATH variable containing a
list of directories
   where the `enable -f' command looks for shared objects
containing loadable
   builtins.
   --

- The loadable builtins `uname' could not be parsed by rpmdeps
correctly:
   --
   $ recipe-sysroot-native/usr/lib/rpm/bin/rpmdeps-oecore --macros \
   recipe-sysroot-native/usr/lib/rpm/macros --define
'_rpmfc_magic_path \
   recipe-sysroot-native/usr/share/misc/magic.mgc' --rpmpopt \
   recipe-sysroot-native/usr/lib/rpm/rpmpopt
packages-split/bash/usr/lib64/bash/uname

   |packages-split/bash/usr/lib64/bash/uname Provides: )(64bit
   |packages-split/bash/usr/lib64/bash/uname Provides:
elf(buildid) = 7186059a5a6b11ec38493b53072c3a62edf7e05c
   --

   The incorrected "Provides: )(64bit" could not be parsed by
rpmbuild.
   --
   | DEBUG: Executing shell function BUILDSPEC
   | error: line 56: Dependency ")(64bit" must begin with
alpha-numeric, '_' or '/': Provides: )(64bit
   | error: Package has no %description: bash-4.4-r0.core2_64
   --

Signed-off-by: Hongxu Jia >
---
 ...e-builtins-uname-could-not-be-parsed-by-r.patch | 89
++
 meta/recipes-extended/bash/bash_4.4.bb   
 | 28 +++

 2 files changed, 117 insertions(+)
 create mode 100644

meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch

diff --git

a/meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch

b/meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch
new file mode 100644
index 000..79d9e4e
--- /dev/null
+++

b/meta/recipes-extended/bash/bash/0001-The-loadable-builtins-uname-could-not-be-parsed-by-r.patch
@@ -0,0 +1,89 @@
+rename uname to workaround name confliction in rpmnsProbe
+
+The loadable builtins `uname' could not be parsed by
+rpmdeps correctly:
+--
+$recipe-sysroot-native/usr/lib/rpm/bin/rpmdeps-oecore --macros \
+recipe-sysroot-native/usr/lib/rpm/macros --define
'_rpmfc_magic_path \
+recipe-sysroot-native/usr/share/misc/magic.mgc' --rpmpopt \
+recipe-sysroot-native/usr/lib/rpm/rpmpopt
packages-split/bash/usr/lib64/bash/uname
+
+|packages-split/bash/usr/lib64/bash/uname Provides: )(64bit
+|packages-split/bash/usr/lib64/bash/uname Provides: elf(buildid)
= 7186059a5a6b11ec38493b53072c3a62edf7e05c
+--
+
+The incorrected "Provides: )(64bit" could not be parsed by rpmbuild.
+--
+| DEBUG: Executing shell function BUILDSPEC
+| error: line 56: Dependency ")(64bit" must begin with
alpha-numeric, '_' or '/': Provides: )(64bit
+| error: Package has no %description: bash-4.4-r0.core2_64
+--
+
+The root cause is `uname' is incorrectly parsed by rpmnsProbe
that string
+matches with "uname()(64bit)".
+
+The nsType of `uname' should be RPMNS_TYPE_NAMESPACE (like other
utilities),
+rather than RPMNS_TYPE_UNAME which generates "Provides: )(64bit".
+
+We could not fix rpm-native without side effect. So rename to
`uname-oe'
+and create a symlink `uname' could workaround the issue.
+
+Here is to load builtin uname in the target:
+
+root@qemux86-64:# enable -f /usr/lib64/bash/uname uname
+root@qemux86-64:# help uname
+uname: uname [-amnrsv]
+Display system information.
+
+Display information about the system hardware and OS.
+
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia >
+---
+ 

Re: [OE-core] [PATCH] ncurses: 6.0+20160625 -> 6.0+20161126

2017-02-21 Thread Hongxu Jia

It is fine to me

//Hongxu

On 2017年02月22日 02:10, Ross Burton wrote:

From: Hongxu Jia 

Add a patch to fix the CC/CFLAGS mangling that broke builds. [RB]

Signed-off-by: Hongxu Jia 
Signed-off-by: Ross Burton 
---
  .../recipes-core/ncurses/files/fix-cflags-mangle.patch | 18 ++
  ...ncurses_6.0+20160625.bb => ncurses_6.0+20161126.bb} |  3 ++-
  2 files changed, 20 insertions(+), 1 deletion(-)
  create mode 100644 meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
  rename meta/recipes-core/ncurses/{ncurses_6.0+20160625.bb => 
ncurses_6.0+20161126.bb} (73%)

diff --git a/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch 
b/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
new file mode 100644
index 000..e9447c5
--- /dev/null
+++ b/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
@@ -0,0 +1,18 @@
+configure has a piece of logic to detect users "abusing" CC to hold compiler
+flags (which we do).  It also has logic to "correct" this by moving the flags
+from CC to CFLAGS, but the sed only handles a single argument in CC.
+
+Replace the sed with awk to filter out all words that start with a hyphen.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton 
+
+diff --git a/configure b/configure
+index 7f31208..1a29cfc 100755
+--- a/configure
 b/configure
+@@ -2191,2 +2191,2 @@ echo "$as_me: WARNING: your environment misuses the CC 
variable to hold CFLAGS/C
+-  cf_flags=`echo "$CC" | sed -e 's/^.*[ ]\(-[^  ]\)/\1/'`
+-  CC=`echo "$CC " | sed -e 's/[ ]-[^].*$//' -e 's/[ 
]*$//'`
++  cf_flags=`echo "$CC" | awk  'BEGIN{ORS=" ";RS=" "} /^-.+/ {print $1}'`
++  CC=`echo "$CC " | awk  'BEGIN{ORS=" ";RS=" "} /^[^-].+/ {print $1}'`
diff --git a/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb 
b/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
similarity index 73%
rename from meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
rename to meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
index 6514613..e95741f 100644
--- a/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
+++ b/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
@@ -1,10 +1,11 @@
  require ncurses.inc
  
  SRC_URI += "file://tic-hang.patch \

+file://fix-cflags-mangle.patch \
  file://config.cache \
  "
  # commit id corresponds to the revision in package version
-SRCREV = "63dd558cb8e888d6fab5f00bbf7842736a2356b9"
+SRCREV = "3db0bd19cb50e3d9b4f2cf15b7a102fe11302068"
  S = "${WORKDIR}/git"
  EXTRA_OECONF += "--with-abi-version=5"
  UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+(\+\d+)*)"



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


[OE-core] [PATCH 1/5] strace: 4.15 -> 4.16

2017-02-21 Thread Robert Yang
* The license cheksum is changed becuase a new line is added:
  Copyright (C) 2001-2017 The strace developers.

* Remove use-asm-sgidefs.h.patch, it doesn't check sgidefs.h any more, it was
  use for building on mips, I checked it built well.

* Update Makefile-ptest.patch and disable-git-version-gen.patch.

Signed-off-by: Robert Yang 
---
 .../strace/strace/Makefile-ptest.patch | 13 +++---
 .../strace/strace/disable-git-version-gen.patch| 18 
 .../strace/strace/use-asm-sgidefs.h.patch  | 51 --
 .../strace/{strace_4.15.bb => strace_4.16.bb}  |  7 ++-
 4 files changed, 19 insertions(+), 70 deletions(-)
 delete mode 100644 meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
 rename meta/recipes-devtools/strace/{strace_4.15.bb => strace_4.16.bb} (84%)

diff --git a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch 
b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index 2b76e8a1118..876c2d8629b 100644
--- a/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -10,25 +10,26 @@ Signed-off-by: Chong Lu 
  2 files changed, 19 insertions(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
+index b2b03c6..464a9dc 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -36,7 +36,7 @@ AC_INIT([strace],
+@@ -39,7 +39,7 @@ AC_COPYRIGHT([Copyright (C) 1999-2017 The strace 
developers.])
  AC_CONFIG_SRCDIR([strace.c])
  AC_CONFIG_AUX_DIR([.])
  AC_CONFIG_HEADERS([config.h])
 -AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
 +AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests])
+ AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
  AM_MAINTAINER_MODE
  AC_CANONICAL_HOST
- 
 diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 9023029..e1917fa 100644
+index 311d3bb..72f9022 100644
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
-@@ -784,3 +784,21 @@ ksysent.h: $(srcdir)/ksysent.sed
- 
- BUILT_SOURCES = ksysent.h
+@@ -960,3 +960,21 @@ $(objects): scno.h
  CLEANFILES = ksysent.h $(TESTS:=.tmp)
+ 
+ include ../scno.am
 +
 +buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
 +
diff --git a/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch 
b/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
index 7bc143635f7..76daf3a3b73 100644
--- a/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
+++ b/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
@@ -5,16 +5,16 @@ Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Andre McCurdy 
 
-Index: strace-4.10/configure.ac
-===
 strace-4.10.orig/configure.ac
-+++ strace-4.10/configure.ac
-@@ -1,7 +1,7 @@
- dnl Process this file with autoconf to create configure.  Use autoreconf.
+diff --git a/configure.ac b/configure.ac
+index 7004bd3..b2b03c6 100644
+--- a/configure.ac
 b/configure.ac
+@@ -31,7 +31,7 @@
+ 
  AC_PREREQ(2.57)
  AC_INIT([strace],
 -  m4_esyscmd([./git-version-gen .tarball-version]),
 +  m4_esyscmd_s([cat .tarball-version]),
-   [strace-de...@lists.sourceforge.net])
- AC_CONFIG_SRCDIR([strace.c])
- AC_CONFIG_AUX_DIR([.])
+   [strace-de...@lists.sourceforge.net],
+   [strace],
+   [https://strace.io])
diff --git a/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch 
b/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
deleted file mode 100644
index db83d1130ec..000
--- a/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 2995245d7e3f46e8b3995002995ebd28beca7d55 Mon Sep 17 00:00:00 2001
-From: Andre McCurdy 
-Date: Fri, 5 Feb 2016 14:00:00 -0800
-Subject: [PATCH] use 
-
-Build fix for MIPS with musl libc.
-
-The MIPS specific header  is provided by glibc and uclibc
-but not by musl. Regardless of the libc, the kernel headers provide
- which provides the same definitions, so use that
-instead.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy 

- configure.ac | 8 
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1524b9b..287e03d 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -196,20 +196,20 @@ AC_SUBST(arch_mx32)
- if test "$arch" = mips; then
-   AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM],
-  [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM],
-- [#include ],
-+ [#include ],
-  [AC_MSG_ERROR([_MIPS_SIM cannot be 
determined])])])
- 
-   AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi],
-   [AC_COMPILE_IFELSE(
--  [AC_LANG_PROGRAM([[#include ]],
-+  [AC_LANG_PROGRAM([[#include ]],

[OE-core] [PATCH 4/5] ccache: 3.3.3 -> 3.3.4

2017-02-21 Thread Robert Yang
The LIC_FILES_CHKSUM is changed because of the date. The contents are the same.

Signed-off-by: Robert Yang 
---
 meta/recipes-devtools/ccache/{ccache_3.3.3.bb => ccache_3.3.4.bb} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-devtools/ccache/{ccache_3.3.3.bb => ccache_3.3.4.bb} (48%)

diff --git a/meta/recipes-devtools/ccache/ccache_3.3.3.bb 
b/meta/recipes-devtools/ccache/ccache_3.3.4.bb
similarity index 48%
rename from meta/recipes-devtools/ccache/ccache_3.3.3.bb
rename to meta/recipes-devtools/ccache/ccache_3.3.4.bb
index ded7b309277..45b2899bbeb 100644
--- a/meta/recipes-devtools/ccache/ccache_3.3.3.bb
+++ b/meta/recipes-devtools/ccache/ccache_3.3.4.bb
@@ -1,10 +1,10 @@
 require ccache.inc
 
 LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=938c02728101936f2a74a67d1d82ee25"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7fe21f9470f2305e95e7d8a632255079"
 
-SRC_URI[md5sum] = "ea1f95303749b9ac136c617d1b333eef"
-SRC_URI[sha256sum] = 
"87a399a2267cfac3f36411fbc12ff8959f408cffd050ad15fe423df88e977e8f"
+SRC_URI[md5sum] = "61326f1edac7cd211a7018458dfe2d86"
+SRC_URI[sha256sum] = 
"1348b54e7c35dd2f8d17923389e03c546e599cfbde6459d2f31cf6f1521ec538"
 
 SRC_URI += " \
 file://0002-dev.mk.in-fix-file-name-too-long.patch \
-- 
2.11.0.rc2.dirty

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


[OE-core] [PATCH 5/5] file: 5.29 -> 5.30

2017-02-21 Thread Robert Yang
Signed-off-by: Robert Yang 
---
 meta/recipes-devtools/file/{file_5.29.bb => file_5.30.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/file/{file_5.29.bb => file_5.30.bb} (96%)

diff --git a/meta/recipes-devtools/file/file_5.29.bb 
b/meta/recipes-devtools/file/file_5.30.bb
similarity index 96%
rename from meta/recipes-devtools/file/file_5.29.bb
rename to meta/recipes-devtools/file/file_5.30.bb
index 29af8748150..0998fcfa899 100644
--- a/meta/recipes-devtools/file/file_5.29.bb
+++ b/meta/recipes-devtools/file/file_5.30.bb
@@ -19,7 +19,7 @@ SRC_URI = "git://github.com/file/file.git \
 file://0001-Add-P-prompt-into-Usage-info.patch \
 "
 
-SRCREV = "015b0cdce1a0abb68ab99510e7fc8d2f77e8ec77"
+SRCREV = "79814950aafb81ecd6a910c2a8a3b8ec12f3e4a6"
 S = "${WORKDIR}/git"
 
 inherit autotools
-- 
2.11.0.rc2.dirty

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


[OE-core] [PATCH 0/5] Packages upgrade

2017-02-21 Thread Robert Yang
The following changes since commit def3800c7e58d9d1b54ea1df27b190a0f6d1d544:

  layer.conf: bump version for change in eSDK selftest behaviour (2017-02-19 
09:38:59 -0800)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/PU
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/PU

Robert Yang (5):
  strace: 4.15 -> 4.16
  guile: 2.0.13 -> 2.0.14
  slang: 2.3.1 -> 2.3.1a
  ccache: 3.3.3 -> 3.3.4
  file: 5.29 -> 5.30

 .../ccache/{ccache_3.3.3.bb => ccache_3.3.4.bb}|  6 +--
 .../file/{file_5.29.bb => file_5.30.bb}|  2 +-
 .../guile/{guile_2.0.13.bb => guile_2.0.14.bb} |  4 +-
 .../strace/strace/Makefile-ptest.patch | 13 +++---
 .../strace/strace/disable-git-version-gen.patch| 18 
 .../strace/strace/use-asm-sgidefs.h.patch  | 51 --
 .../strace/{strace_4.15.bb => strace_4.16.bb}  |  7 ++-
 .../slang/{slang_2.3.1.bb => slang_2.3.1a.bb}  |  4 +-
 8 files changed, 27 insertions(+), 78 deletions(-)
 rename meta/recipes-devtools/ccache/{ccache_3.3.3.bb => ccache_3.3.4.bb} (48%)
 rename meta/recipes-devtools/file/{file_5.29.bb => file_5.30.bb} (96%)
 rename meta/recipes-devtools/guile/{guile_2.0.13.bb => guile_2.0.14.bb} (97%)
 delete mode 100644 meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
 rename meta/recipes-devtools/strace/{strace_4.15.bb => strace_4.16.bb} (84%)
 rename meta/recipes-extended/slang/{slang_2.3.1.bb => slang_2.3.1a.bb} (93%)

-- 
2.11.0.rc2.dirty

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


[OE-core] [PATCH 2/5] guile: 2.0.13 -> 2.0.14

2017-02-21 Thread Robert Yang
Signed-off-by: Robert Yang 
---
 meta/recipes-devtools/guile/{guile_2.0.13.bb => guile_2.0.14.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/guile/{guile_2.0.13.bb => guile_2.0.14.bb} (97%)

diff --git a/meta/recipes-devtools/guile/guile_2.0.13.bb 
b/meta/recipes-devtools/guile/guile_2.0.14.bb
similarity index 97%
rename from meta/recipes-devtools/guile/guile_2.0.13.bb
rename to meta/recipes-devtools/guile/guile_2.0.14.bb
index c29e7528599..e0350e4aa4b 100644
--- a/meta/recipes-devtools/guile/guile_2.0.13.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.14.bb
@@ -24,8 +24,8 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
file://libguile-Makefile.am-hook.patch \
"
 
-SRC_URI[md5sum] = "d50bbb19672b72aa1e1c96e8f024bf00"
-SRC_URI[sha256sum] = 
"3744f2addc282a0de627aaef048f062982b44564d54ac31ff5217972529ed88b"
+SRC_URI[md5sum] = "c64977c775effd19393364b3018fd8cd"
+SRC_URI[sha256sum] = 
"e8442566256e1be14e51fc18839cd799b966bc5b16c6a1d7a7c35155a8619d82"
 
 inherit autotools gettext pkgconfig texinfo
 BBCLASSEXTEND = "native"
-- 
2.11.0.rc2.dirty

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


[OE-core] [PATCH 3/5] slang: 2.3.1 -> 2.3.1a

2017-02-21 Thread Robert Yang
Signed-off-by: Robert Yang 
---
 meta/recipes-extended/slang/{slang_2.3.1.bb => slang_2.3.1a.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/slang/{slang_2.3.1.bb => slang_2.3.1a.bb} (93%)

diff --git a/meta/recipes-extended/slang/slang_2.3.1.bb 
b/meta/recipes-extended/slang/slang_2.3.1a.bb
similarity index 93%
rename from meta/recipes-extended/slang/slang_2.3.1.bb
rename to meta/recipes-extended/slang/slang_2.3.1a.bb
index 7bf3af6836f..9326205f068 100644
--- a/meta/recipes-extended/slang/slang_2.3.1.bb
+++ b/meta/recipes-extended/slang/slang_2.3.1a.bb
@@ -22,8 +22,8 @@ SRC_URI = 
"http://www.jedsoft.org/releases/${BPN}/${BP}.tar.bz2 \
file://no-x.patch \
   "
 
-SRC_URI[md5sum] = "bd46d1dc17a50c72004ad842829d7b1f"
-SRC_URI[sha256sum] = 
"a810d5da7b0c0c8c335393c6b4f12884be6fa7696d9ca9521ef21316a4e00f9d"
+SRC_URI[md5sum] = "c5235313042ed0e71ec708f7b85ec241"
+SRC_URI[sha256sum] = 
"54f0c3007fde918039c058965dffdfd6c5aec0bad0f4227192cc486021f08c36"
 
 UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/;
 PREMIRRORS_append = "\n http://www.jedsoft.org/releases/slang/.* 
http://www.jedsoft.org/releases/slang/old/ \n"
-- 
2.11.0.rc2.dirty

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


[OE-core] Task sequence question

2017-02-21 Thread Andreas Müller
Hi,

after some fixing in meta-oe it seems I am able to build some
xfce-image again. Watching the tasks go by I noticed that do_rootfs is
running already while many recipes still do their do_package_qa. This
looks a bit odd to me. Not that I am happy about an early do_rootfs
but what would happen if do_package_qa fails? Isn't that a kind of
prerequisite for an image that do_package_qa passes for all packages
within this image?

Cheers

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


Re: [OE-core] [PATCH 3/3] classes/populate_sdk_base: Adds support to generate extensible sdk package manifest

2017-02-21 Thread Pedraza Gonzalez, Francisco J
I tested this implementation and is writing the installed packages on host and 
target manifest properly.
https://bugzilla.yoctoproject.org/attachment.cgi?id=3639
https://bugzilla.yoctoproject.org/attachment.cgi?id=3638

Regards,




Francisco Pedraza 
Open-source Technology Center 
Yocto Project



-Original Message-
From: Pedraza Gonzalez, Francisco J 
Sent: Tuesday, February 21, 2017 4:49 PM
To: openembedded-core@lists.openembedded.org
Cc: Pedraza Gonzalez, Francisco J 
Subject: [PATCH 3/3] classes/populate_sdk_base: Adds support to generate 
extensible sdk package manifest

This function writes on host and target manifest files for eSDK.
[YOCTO #9038]

Signed-off-by: Francisco Pedraza 
---
 meta/classes/populate_sdk_base.bbclass | 26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index 33665cd..db700d7 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -59,6 +59,9 @@ SDK_TITLE ?= "${@d.getVar('DISTRO_NAME') or 
d.getVar('DISTRO')} SDK"
 
 SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
 SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
+SDK_EXT_TARGET_MANIFEST = 
"${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
+SDK_EXT_HOST_MANIFEST = 
"${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
+
 python write_target_sdk_manifest () {
 if d.getVar('BB_CURRENTTASK') == 'populate_sdk':
 from oe.sdk import sdk_list_installed_packages @@ -69,6 +72,17 @@ 
python write_target_sdk_manifest () {
 bb.utils.mkdirhier(sdkmanifestdir)
 with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output:
 output.write(format_pkg_list(pkgs, 'ver'))
+elif d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext':
+from oe.sdk import get_extra_sdkinfo
+sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+extra_info = get_extra_sdkinfo(sstate_dir)
+target = d.getVar('TARGET_SYS')
+target_multimach = d.getVar('MULTIMACH_TARGET_SYS')
+with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f:
+for fn in extra_info['filesizes']:
+info = fn.split(':') #added
+if info[2] in (target, target_multimach):
+f.write("%s %s %s\n" % (info[1], info[2], info[3]))
 }
 
 python write_sdk_test_data() {
@@ -88,12 +102,22 @@ python write_host_sdk_manifest () {
 bb.utils.mkdirhier(sdkmanifestdir)
 with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output:
 output.write(format_pkg_list(pkgs, 'ver'))
+elif d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext':
+from oe.sdk import get_extra_sdkinfo
+sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+extra_info = get_extra_sdkinfo(sstate_dir)
+host = d.getVar('BUILD_SYS')
+with open(d.getVar('SDK_EXT_HOST_MANIFEST'), 'w') as f:
+for fn in extra_info['filesizes']:
+info = fn.split(':') #added
+if info[2] == host:
+f.write("%s %s %s\n" % (info[1], info[2], info[3]))
 }
 
 POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; 
write_sdk_test_data ; "
 POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; "
 SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if 
'${SDK_PACKAGING_FUNC}' else ''}"
-SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; 
${SDK_PACKAGING_COMMAND} "
+SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; 
write_target_sdk_manifest; write_host_sdk_manifest; ${SDK_PACKAGING_COMMAND} "
 
 def populate_sdk_common(d):
 from oe.sdk import populate_sdk
--
1.8.3.1

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


[OE-core] [PATCH 2/3] meta/classes/populate_sdk_base: Only execute write manifest when is populate_sdk

2017-02-21 Thread Francisco Pedraza
This function is going to be used for generating the eSDK, however the
eSDK package information comes from sstate artifacts instead of package files.

[YOCTO #9038]

Signed-off-by: Francisco Pedraza 
---
 meta/classes/populate_sdk_base.bbclass | 34 ++
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index dd3cac5..33665cd 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -60,14 +60,15 @@ SDK_TITLE ?= "${@d.getVar('DISTRO_NAME') or 
d.getVar('DISTRO')} SDK"
 SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
 SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
 python write_target_sdk_manifest () {
-from oe.sdk import sdk_list_installed_packages
-from oe.utils import format_pkg_list
-sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST"))
-pkgs = sdk_list_installed_packages(d, True)
-if not os.path.exists(sdkmanifestdir):
-bb.utils.mkdirhier(sdkmanifestdir)
-with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output:
-output.write(format_pkg_list(pkgs, 'ver'))
+if d.getVar('BB_CURRENTTASK') == 'populate_sdk':
+from oe.sdk import sdk_list_installed_packages
+from oe.utils import format_pkg_list
+sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST"))
+pkgs = sdk_list_installed_packages(d, True)
+if not os.path.exists(sdkmanifestdir):
+bb.utils.mkdirhier(sdkmanifestdir)
+with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output:
+output.write(format_pkg_list(pkgs, 'ver'))
 }
 
 python write_sdk_test_data() {
@@ -78,14 +79,15 @@ python write_sdk_test_data() {
 }
 
 python write_host_sdk_manifest () {
-from oe.sdk import sdk_list_installed_packages
-from oe.utils import format_pkg_list
-sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST"))
-pkgs = sdk_list_installed_packages(d, False)
-if not os.path.exists(sdkmanifestdir):
-bb.utils.mkdirhier(sdkmanifestdir)
-with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output:
-output.write(format_pkg_list(pkgs, 'ver'))
+if d.getVar('BB_CURRENTTASK') == 'populate_sdk':
+from oe.sdk import sdk_list_installed_packages
+from oe.utils import format_pkg_list
+sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST"))
+pkgs = sdk_list_installed_packages(d, False)
+if not os.path.exists(sdkmanifestdir):
+bb.utils.mkdirhier(sdkmanifestdir)
+with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output:
+output.write(format_pkg_list(pkgs, 'ver'))
 }
 
 POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; 
write_sdk_test_data ; "
-- 
1.8.3.1

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


[OE-core] [PATCH 1/3] lib/oe/sdk: Add get_extra_sdk_info to reuse code in buildhistory

2017-02-21 Thread Francisco Pedraza
This function is going to be used for generating the target and host manifest 
files packages for eSDK.
[YOCTO #9038]

Signed-off-by: Francisco Pedraza 
---
 meta/classes/buildhistory.bbclass | 20 
 meta/lib/oe/sdk.py| 17 +
 2 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/meta/classes/buildhistory.bbclass 
b/meta/classes/buildhistory.bbclass
index 7251a2c..b7130fe 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -550,23 +550,19 @@ END
 python buildhistory_get_extra_sdkinfo() {
 import operator
 import math
+# importing oe.sdk due package information req
+from oe.sdk import get_extra_sdkinfo
+
 if d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext':
-tasksizes = {}
-filesizes = {}
-for root, _, files in 
os.walk(d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')):
-for fn in files:
-if fn.endswith('.tgz'):
-fsize = 
int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024))
-task = fn.rsplit(':', 1)[1].split('_', 1)[1].split('.')[0]
-origtotal = tasksizes.get(task, 0)
-tasksizes[task] = origtotal + fsize
-filesizes[fn] = fsize
+sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+extra_info = get_extra_sdkinfo(sstate_dir)
+
 with 
open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package-sizes.txt'), 'w') as f:
-filesizes_sorted = sorted(filesizes.items(), 
key=operator.itemgetter(1, 0), reverse=True)
+filesizes_sorted = sorted(extra_info['filesizes'].items(), 
key=operator.itemgetter(1, 0), reverse=True)
 for fn, size in filesizes_sorted:
 f.write('%10d KiB %s\n' % (size, fn))
 with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task-sizes.txt'), 
'w') as f:
-tasksizes_sorted = sorted(tasksizes.items(), 
key=operator.itemgetter(1, 0), reverse=True)
+tasksizes_sorted = sorted(extra_info['tasksizes'].items(), 
key=operator.itemgetter(1, 0), reverse=True)
 for task, size in tasksizes_sorted:
 f.write('%10d KiB %s\n' % (size, task))
 }
diff --git a/meta/lib/oe/sdk.py b/meta/lib/oe/sdk.py
index fef02d0..4ce388f 100644
--- a/meta/lib/oe/sdk.py
+++ b/meta/lib/oe/sdk.py
@@ -371,5 +371,22 @@ def populate_sdk(d, manifest_dir=None):
 os.environ.clear()
 os.environ.update(env_bkp)
 
+def get_extra_sdkinfo(sstate_dir):
+import operator
+import math
+
+extra_info = {}
+extra_info['tasksizes'] = {}
+extra_info['filesizes'] = {}
+for root, _, files in os.walk(sstate_dir):
+for fn in files:
+if fn.endswith('.tgz'):
+fsize = int(math.ceil(float(os.path.getsize(os.path.join(root, 
fn))) / 1024))
+task = fn.rsplit(':',1)[1].split('_',1)[1].split(',')[0]
+origtotal = extra_info['tasksizes'].get(task, 0)
+extra_info['tasksizes'][task] = origtotal + fsize
+extra_info['filesizes'][fn] = fsize
+return extra_info
+
 if __name__ == "__main__":
 pass
-- 
1.8.3.1

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


[OE-core] [PATCH 3/3] classes/populate_sdk_base: Adds support to generate extensible sdk package manifest

2017-02-21 Thread Francisco Pedraza
This function writes on host and target manifest files for eSDK.
[YOCTO #9038]

Signed-off-by: Francisco Pedraza 
---
 meta/classes/populate_sdk_base.bbclass | 26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index 33665cd..db700d7 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -59,6 +59,9 @@ SDK_TITLE ?= "${@d.getVar('DISTRO_NAME') or 
d.getVar('DISTRO')} SDK"
 
 SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
 SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
+SDK_EXT_TARGET_MANIFEST = 
"${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
+SDK_EXT_HOST_MANIFEST = 
"${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
+
 python write_target_sdk_manifest () {
 if d.getVar('BB_CURRENTTASK') == 'populate_sdk':
 from oe.sdk import sdk_list_installed_packages
@@ -69,6 +72,17 @@ python write_target_sdk_manifest () {
 bb.utils.mkdirhier(sdkmanifestdir)
 with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output:
 output.write(format_pkg_list(pkgs, 'ver'))
+elif d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext':
+from oe.sdk import get_extra_sdkinfo
+sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+extra_info = get_extra_sdkinfo(sstate_dir)
+target = d.getVar('TARGET_SYS')
+target_multimach = d.getVar('MULTIMACH_TARGET_SYS')
+with open(d.getVar('SDK_EXT_TARGET_MANIFEST'), 'w') as f:
+for fn in extra_info['filesizes']:
+info = fn.split(':') #added
+if info[2] in (target, target_multimach):
+f.write("%s %s %s\n" % (info[1], info[2], info[3]))
 }
 
 python write_sdk_test_data() {
@@ -88,12 +102,22 @@ python write_host_sdk_manifest () {
 bb.utils.mkdirhier(sdkmanifestdir)
 with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output:
 output.write(format_pkg_list(pkgs, 'ver'))
+elif d.getVar('BB_CURRENTTASK') == 'populate_sdk_ext':
+from oe.sdk import get_extra_sdkinfo
+sstate_dir = d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')
+extra_info = get_extra_sdkinfo(sstate_dir)
+host = d.getVar('BUILD_SYS')
+with open(d.getVar('SDK_EXT_HOST_MANIFEST'), 'w') as f:
+for fn in extra_info['filesizes']:
+info = fn.split(':') #added
+if info[2] == host:
+f.write("%s %s %s\n" % (info[1], info[2], info[3]))
 }
 
 POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; 
write_sdk_test_data ; "
 POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; "
 SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if 
'${SDK_PACKAGING_FUNC}' else ''}"
-SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; 
${SDK_PACKAGING_COMMAND} "
+SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; 
write_target_sdk_manifest; write_host_sdk_manifest; ${SDK_PACKAGING_COMMAND} "
 
 def populate_sdk_common(d):
 from oe.sdk import populate_sdk
-- 
1.8.3.1

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


[OE-core] [PATCHv2 2/2] selftest: Optimize get_bb_var use

2017-02-21 Thread mariano . lopez
From: Mariano Lopez 

get_bb_var calls bitbake every time it is used and every call
would take about 7 seconds. There are tests that calls get_bb_var
several times when they can use get_bb_vars. Also there are tests
that calls it to fetch the same variable over and over again.

This will optimize the use of get_bb_var and get_bb_vars for a
little speed up in the tests.

[YOCTO #11037]

Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/selftest/archiver.py |  7 +--
 meta/lib/oeqa/selftest/bbtests.py  | 24 +
 meta/lib/oeqa/selftest/buildhistory.py |  5 +-
 meta/lib/oeqa/selftest/buildoptions.py | 10 ++--
 meta/lib/oeqa/selftest/devtool.py  | 57 -
 meta/lib/oeqa/selftest/eSDK.py | 21 
 meta/lib/oeqa/selftest/liboe.py| 21 
 meta/lib/oeqa/selftest/manifest.py |  7 +--
 meta/lib/oeqa/selftest/pkgdata.py  | 11 ++--
 meta/lib/oeqa/selftest/prservice.py|  9 ++--
 meta/lib/oeqa/selftest/recipetool.py   | 34 +++--
 meta/lib/oeqa/selftest/runtime-test.py | 15 --
 meta/lib/oeqa/selftest/signing.py  | 12 +++--
 meta/lib/oeqa/selftest/sstate.py   | 20 +---
 meta/lib/oeqa/selftest/sstatetests.py  | 92 ++
 meta/lib/oeqa/selftest/tinfoil.py  |  2 +-
 meta/lib/oeqa/selftest/wic.py  | 39 +++---
 17 files changed, 208 insertions(+), 178 deletions(-)

diff --git a/meta/lib/oeqa/selftest/archiver.py 
b/meta/lib/oeqa/selftest/archiver.py
index 97b6f5b..d7f215c 100644
--- a/meta/lib/oeqa/selftest/archiver.py
+++ b/meta/lib/oeqa/selftest/archiver.py
@@ -1,5 +1,5 @@
 from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import bitbake, get_bb_var
+from oeqa.utils.commands import bitbake, get_bb_vars
 from oeqa.utils.decorators import testcase
 import glob
 import os
@@ -28,10 +28,11 @@ class Archiver(oeSelfTest):
 features += 'COPYLEFT_PN_EXCLUDE = "%s"\n' % exclude_recipe
 self.write_config(features)
 
-shutil.rmtree(get_bb_var('TMPDIR'))
+bitbake('-c clean %s %s' % (include_recipe, exclude_recipe))
 bitbake("%s %s" % (include_recipe, exclude_recipe))
 
-src_path = os.path.join(get_bb_var('DEPLOY_DIR_SRC'), 
get_bb_var('TARGET_SYS'))
+bb_vars = get_bb_vars(['DEPLOY_DIR_SRC', 'TARGET_SYS'])
+src_path = os.path.join(bb_vars['DEPLOY_DIR_SRC'], 
bb_vars['TARGET_SYS'])
 
 # Check that include_recipe was included
 included_present = len(glob.glob(src_path + '/%s-*' % include_recipe))
diff --git a/meta/lib/oeqa/selftest/bbtests.py 
b/meta/lib/oeqa/selftest/bbtests.py
index 7675563..4d9eec1 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -3,7 +3,7 @@ import re
 
 import oeqa.utils.ftools as ftools
 from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
 from oeqa.utils.decorators import testcase
 
 class BitbakeTests(oeSelfTest):
@@ -78,9 +78,10 @@ class BitbakeTests(oeSelfTest):
 # test 1 from bug 5875
 test_recipe = 'zlib'
 test_data = "Microsoft Made No Profit From Anyone's Zunes Yo"
-image_dir = get_bb_var('D', test_recipe)
-pkgsplit_dir = get_bb_var('PKGDEST', test_recipe)
-man_dir = get_bb_var('mandir', test_recipe)
+bb_vars = get_bb_vars(['D', 'PKGDEST', 'mandir'], test_recipe)
+image_dir = bb_vars['D']
+pkgsplit_dir = bb_vars['PKGDEST']
+man_dir = bb_vars['mandir']
 
 bitbake('-c clean %s' % test_recipe)
 bitbake('-c package -f %s' % test_recipe)
@@ -121,8 +122,9 @@ class BitbakeTests(oeSelfTest):
 @testcase(899)
 def test_image_manifest(self):
 bitbake('core-image-minimal')
-deploydir = get_bb_var("DEPLOY_DIR_IMAGE", target="core-image-minimal")
-imagename = get_bb_var("IMAGE_LINK_NAME", target="core-image-minimal")
+bb_vars = get_bb_vars(["DEPLOY_DIR_IMAGE", "IMAGE_LINK_NAME"], 
"core-image-minimal")
+deploydir = bb_vars["DEPLOY_DIR_IMAGE"]
+imagename = bb_vars["IMAGE_LINK_NAME"]
 manifest = os.path.join(deploydir, imagename + ".manifest")
 self.assertTrue(os.path.islink(manifest), msg="No manifest file 
created for image. It should have been created in %s" % manifest)
 
@@ -160,8 +162,9 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
 result = bitbake('-c fetch aspell', ignore_status=True)
 self.delete_recipeinc('aspell')
 self.assertEqual(result.status, 0, msg = "Couldn't fetch aspell. %s" % 
result.output)
-self.assertTrue(os.path.isfile(os.path.join(get_bb_var("DL_DIR"), 
'test-aspell.tar.gz')), msg = "File rename failed. No corresponding 
test-aspell.tar.gz file found under %s" % str(get_bb_var("DL_DIR")))
-

[OE-core] [PATCHv2 1/2] selftest: Avoid sstate corruption by calling cleansstate

2017-02-21 Thread mariano . lopez
From: Mariano Lopez 

Currently selftest doesn't use sstates because some tests
clean sstate cache; using sstates would give a performance
boost instead of building everything from scratch.

With this sstates are not corrupted using different methods
depending on tests:

devtool: These tests needed to delete the cache so SSTATE_DIR
as SSTATE_MIRRORS and set a temporal SSTATE_DIR.

sstatetests: This module already used a temporal SSTATE_DIR, so
just set up the SSTATE_MIRRORS.

Rest: Removed cleansstate, some of them required to force a
certain task, others were just removed or changed for another
task.

[YOCTO #10929]

Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/selftest/bbtests.py  |  6 ++
 meta/lib/oeqa/selftest/buildoptions.py | 22 ++
 meta/lib/oeqa/selftest/devtool.py  | 18 +-
 meta/lib/oeqa/selftest/oescripts.py|  8 ++--
 meta/lib/oeqa/selftest/prservice.py|  3 ---
 meta/lib/oeqa/selftest/recipetool.py   |  5 -
 meta/lib/oeqa/selftest/signing.py  |  8 
 meta/lib/oeqa/selftest/sstatetests.py  |  6 +++---
 8 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/meta/lib/oeqa/selftest/bbtests.py 
b/meta/lib/oeqa/selftest/bbtests.py
index fccb395..7675563 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -37,7 +37,6 @@ class BitbakeTests(oeSelfTest):
 
 @testcase(103)
 def test_local_sstate(self):
-bitbake('m4-native -ccleansstate')
 bitbake('m4-native')
 bitbake('m4-native -cclean')
 result = bitbake('m4-native')
@@ -83,8 +82,8 @@ class BitbakeTests(oeSelfTest):
 pkgsplit_dir = get_bb_var('PKGDEST', test_recipe)
 man_dir = get_bb_var('mandir', test_recipe)
 
-bitbake('-c cleansstate %s' % test_recipe)
-bitbake(test_recipe)
+bitbake('-c clean %s' % test_recipe)
+bitbake('-c package -f %s' % test_recipe)
 self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
 
 man_file = os.path.join(image_dir + man_dir, 'man3/zlib.3')
@@ -103,7 +102,6 @@ class BitbakeTests(oeSelfTest):
 # test 2 from bug 5875
 test_recipe = 'zlib'
 
-bitbake('-c cleansstate %s' % test_recipe)
 bitbake(test_recipe)
 self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
 
diff --git a/meta/lib/oeqa/selftest/buildoptions.py 
b/meta/lib/oeqa/selftest/buildoptions.py
index d40eb00..28734fd 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -36,9 +36,8 @@ class ImageOptionsTests(oeSelfTest):
 p = get_bb_var('SYSROOT_DESTDIR', 'ccache-native') + 
get_bb_var('bindir', 'ccache-native') + "/" + "ccache"
 self.assertTrue(os.path.isfile(p), msg = "No ccache found (%s)" % p)
 self.write_config('INHERIT += "ccache"')
-bitbake("m4 -c cleansstate")
-bitbake("m4 -c compile")
-self.addCleanup(bitbake, 'ccache-native -ccleansstate')
+self.add_command_to_tearDown('bitbake -c clean m4')
+bitbake("m4 -f -c compile")
 res = runCmd("grep ccache %s" % 
(os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), 
ignore_status=True)
 self.assertEqual(0, res.status, msg="No match for ccache in m4 
log.do_compile. For further details: %s" % 
os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile"))
 
@@ -75,14 +74,14 @@ class SanityOptionsTest(oeSelfTest):
 
 @testcase(927)
 def test_options_warnqa_errorqa_switch(self):
-bitbake("xcursor-transparent-theme -ccleansstate")
 
 self.write_config("INHERIT_remove = \"report-error\"")
 if "packages-list" not in get_bb_var("ERROR_QA"):
 self.append_config("ERROR_QA_append = \" packages-list\"")
 
 self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += 
\"${PN}-dbg\"')
-res = bitbake("xcursor-transparent-theme", ignore_status=True)
+self.add_command_to_tearDown('bitbake -c clean 
xcursor-transparent-theme')
+res = bitbake("xcursor-transparent-theme -f -c package", 
ignore_status=True)
 self.delete_recipeinc('xcursor-transparent-theme')
 line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is 
listed in PACKAGES multiple times, this leads to packaging errors.")
 self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
@@ -90,8 +89,7 @@ class SanityOptionsTest(oeSelfTest):
 self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += 
\"${PN}-dbg\"')
 self.append_config('ERROR_QA_remove = "packages-list"')
 self.append_config('WARN_QA_append = " packages-list"')
-bitbake("xcursor-transparent-theme -ccleansstate")
-res = bitbake("xcursor-transparent-theme")
+res = bitbake("xcursor-transparent-theme -f -c package")
 

[OE-core] [PATCHv2 0/2] Improvements to oe-selftest

2017-02-21 Thread mariano . lopez
From: Mariano Lopez 

This series includes to main improvements;
- Remove use of cleansstate tasks from tests in order to use shared
  states in the autobuilders
- Optimize use of get_bb_var to avoid calling bitbake -e over and
  over again

This has been tested in local autobuilders.

This series requires:

- https://patchwork.openembedded.org/series/5191/

This series supersedes:

- https://patchwork.openembedded.org/series/5101/
- https://patchwork.openembedded.org/series/5122/

Changes in v2:
- Use 'bitbake -c clean ' after using --force to avoid
  complains from bitbake.

The following changes since commit d9b18c28568432e0710099868576b12f23d502cf:

  insane.bbclass: Add prepare_recipe_sysroot dependency for package_qa 
(2017-02-21 13:52:49 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib mariano/bug10929
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug10929

Mariano Lopez (2):
  selftest: Avoid sstate corruption by calling cleansstate
  selftest: Optimize get_bb_var use

 meta/lib/oeqa/selftest/archiver.py |  7 +--
 meta/lib/oeqa/selftest/bbtests.py  | 30 ++-
 meta/lib/oeqa/selftest/buildhistory.py |  5 +-
 meta/lib/oeqa/selftest/buildoptions.py | 32 +--
 meta/lib/oeqa/selftest/devtool.py  | 75 +-
 meta/lib/oeqa/selftest/eSDK.py | 21 
 meta/lib/oeqa/selftest/liboe.py| 21 
 meta/lib/oeqa/selftest/manifest.py |  7 +--
 meta/lib/oeqa/selftest/oescripts.py|  8 +--
 meta/lib/oeqa/selftest/pkgdata.py  | 11 ++--
 meta/lib/oeqa/selftest/prservice.py| 12 ++---
 meta/lib/oeqa/selftest/recipetool.py   | 39 +++---
 meta/lib/oeqa/selftest/runtime-test.py | 15 --
 meta/lib/oeqa/selftest/signing.py  | 20 +++
 meta/lib/oeqa/selftest/sstate.py   | 20 ---
 meta/lib/oeqa/selftest/sstatetests.py  | 98 ++
 meta/lib/oeqa/selftest/tinfoil.py  |  2 +-
 meta/lib/oeqa/selftest/wic.py  | 39 +++---
 18 files changed, 246 insertions(+), 216 deletions(-)

-- 
2.6.6

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


[OE-core] [PATCH 2/2] e2fsprogs: Fix build with glibc-2.25

2017-02-21 Thread Martin Jansa
Signed-off-by: Martin Jansa 
---
 .../e2fsprogs/e2fsprogs-1.43-sysmacros.patch   | 130 +
 .../recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb |   1 +
 2 files changed, 131 insertions(+)
 create mode 100644 
meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch

diff --git 
a/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch
new file mode 100644
index 00..abbf2bad26
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/e2fsprogs-1.43-sysmacros.patch
@@ -0,0 +1,130 @@
+From 30ef41f68703b6a16027cc8787118b87f1462dff Mon Sep 17 00:00:00 2001
+From: Mike Frysinger 
+Date: Mon, 28 Mar 2016 20:31:33 -0400
+Subject: [PATCH e2fsprogs] include sys/sysmacros.h as needed
+
+The minor/major/makedev macros are not entirely standard.  glibc has had
+the definitions in sys/sysmacros.h since the start, and wants to move away
+from always defining them implicitly via sys/types.h (as this pollutes the
+namespace in violation of POSIX).  Other C libraries have already dropped
+them.  Since the configure script already checks for this header, use that
+to pull in the header in files that use these macros.
+
+Signed-off-by: Mike Frysinger 
+
+Taken from gentoo portage.
+
+Upstream-Status: Pending
+
+---
+ debugfs/debugfs.c  | 3 +++
+ lib/blkid/devname.c| 3 +++
+ lib/blkid/devno.c  | 3 +++
+ lib/ext2fs/finddev.c   | 3 +++
+ lib/ext2fs/ismounted.c | 3 +++
+ misc/create_inode.c| 4 
+ misc/mk_hugefiles.c| 3 +++
+ 7 files changed, 22 insertions(+)
+
+diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
+index ba8be40..7d481bc 100644
+--- a/debugfs/debugfs.c
 b/debugfs/debugfs.c
+@@ -26,6 +26,9 @@ extern char *optarg;
+ #include 
+ #endif
+ #include 
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ 
+ #include "debugfs.h"
+ #include "uuid/uuid.h"
+diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c
+index 3e2efa9..671e781 100644
+--- a/lib/blkid/devname.c
 b/lib/blkid/devname.c
+@@ -36,6 +36,9 @@
+ #if HAVE_SYS_MKDEV_H
+ #include 
+ #endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ #include 
+ 
+ #include "blkidP.h"
+diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c
+index 479d977..61e6fc7 100644
+--- a/lib/blkid/devno.c
 b/lib/blkid/devno.c
+@@ -31,6 +31,9 @@
+ #if HAVE_SYS_MKDEV_H
+ #include 
+ #endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ 
+ #include "blkidP.h"
+ 
+diff --git a/lib/ext2fs/finddev.c b/lib/ext2fs/finddev.c
+index 311608d..62fa0db 100644
+--- a/lib/ext2fs/finddev.c
 b/lib/ext2fs/finddev.c
+@@ -31,6 +31,9 @@
+ #if HAVE_SYS_MKDEV_H
+ #include 
+ #endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ 
+ #include "ext2_fs.h"
+ #include "ext2fs.h"
+diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c
+index e0f69dd..7404996 100644
+--- a/lib/ext2fs/ismounted.c
 b/lib/ext2fs/ismounted.c
+@@ -49,6 +49,9 @@
+ #if HAVE_SYS_TYPES_H
+ #include 
+ #endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ 
+ #include "ext2_fs.h"
+ #include "ext2fs.h"
+diff --git a/misc/create_inode.c b/misc/create_inode.c
+index 4dbd8e5..98aeb41 100644
+--- a/misc/create_inode.c
 b/misc/create_inode.c
+@@ -22,6 +22,10 @@
+ #include 
+ #endif
+ #include 
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
++
+ #include 
+ #include 
+ #include 
+diff --git a/misc/mk_hugefiles.c b/misc/mk_hugefiles.c
+index 71a15c5..00e95cd 100644
+--- a/misc/mk_hugefiles.c
 b/misc/mk_hugefiles.c
+@@ -35,6 +35,9 @@ extern int optind;
+ #include 
+ #include 
+ #include 
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ #include 
+ #include 
+ #include 
+-- 
+2.8.2
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb
index 1e659d7bbd..6d653fbf56 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.4.bb
@@ -7,6 +7,7 @@ SRC_URI += "file://acinclude.m4 \
 file://ptest.patch \
 file://mkdir.patch \
 file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
+file://e2fsprogs-1.43-sysmacros.patch \
 "
 
 SRC_URI_append_class-native = " 
file://e2fsprogs-fix-missing-check-for-permission-denied.patch"
-- 
2.11.1

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


[OE-core] [PATCH 1/2] qemu: fix build with glibc-2.25

2017-02-21 Thread Martin Jansa
Signed-off-by: Martin Jansa 
---
 meta/recipes-devtools/qemu/qemu/glibc-2.25.patch | 88 
 meta/recipes-devtools/qemu/qemu_2.8.0.bb |  1 +
 2 files changed, 89 insertions(+)
 create mode 100644 meta/recipes-devtools/qemu/qemu/glibc-2.25.patch

diff --git a/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch 
b/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch
new file mode 100644
index 00..a6908bdbf9
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch
@@ -0,0 +1,88 @@
+From: Christopher Covington
+Date: Wed, 28 Dec 2016 15:04:33 -0500
+Subject: [Qemu-devel] [PATCH v3] build: include sys/sysmacros.h for major() 
and minor()a
+
+The definition of the major() and minor() macros are moving within glibc to
+. Include this header when it is available to avoid the
+following sorts of build-stopping messages:
+
+qga/commands-posix.c: In function ‘dev_major_minor’:
+qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is defined
+ by . For historical compatibility, it is
+ currently defined by  as well, but we plan to
+ remove this soon. To use "major", include 
+ directly. If you did not intend to use a system-defined macro
+ "major", you should undefine it after including . [-Werror]
+ *devmajor = major(st.st_rdev);
+ ^~
+
+qga/commands-posix.c:657:13: error: In the GNU C Library, "minor" is defined
+ by . For historical compatibility, it is
+ currently defined by  as well, but we plan to
+ remove this soon. To use "minor", include 
+ directly. If you did not intend to use a system-defined macro
+ "minor", you should undefine it after including . [-Werror]
+ *devminor = minor(st.st_rdev);
+ ^~
+
+The additional include allows the build to complete on Fedora 26 (Rawhide)
+with glibc version 2.24.90.
+
+Signed-off-by: Christopher Covington 
+Signed-off-by: Martin Jansa 
+
+Upstream-Status: Submitted 
https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg03548.html
+
+diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure
+--- qemu-2.8.0.orig/configure  2017-02-21 19:05:13.180094708 +0100
 qemu-2.8.0/configure   2017-02-21 19:08:53.114087084 +0100
+@@ -4727,6 +4727,20 @@
+ then
+ fi
+ 
+ ##
++# check for sysmacros.h
++
++have_sysmacros=no
++cat > $TMPC << EOF
++#include 
++int main(void) {
++return makedev(0, 0);
++}
++EOF
++if compile_prog "" "" ; then
++have_sysmacros=yes
++fi
++
++##
+ # End of CC checks
+ # After here, no more $cc or $ld runs
+ 
+diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure
+--- qemu-2.8.0.orig/configure  2017-02-21 19:05:13.180094708 +0100
 qemu-2.8.0/configure   2017-02-21 19:08:53.114087084 +0100
+@@ -5695,6 +5709,10 @@
+   echo "CONFIG_AF_VSOCK=y" >> $config_host_mak
+ fi
+ 
++if test "$have_sysmacros" = "yes" ; then
++  echo "CONFIG_SYSMACROS=y" >> $config_host_mak
++fi
++
+ # Hold two types of flag:
+ #   CONFIG_THREAD_SETNAME_BYTHREAD  - we've got a way of setting the name on
+ # a thread we have a handle to
+diff -uNr qemu-2.8.0.orig/include/sysemu/os-posix.h 
qemu-2.8.0/include/sysemu/os-posix.h
+--- qemu-2.8.0.orig/include/sysemu/os-posix.h  2016-12-20 21:16:48.0 
+0100
 qemu-2.8.0/include/sysemu/os-posix.h   2017-02-21 19:07:18.009090381 
+0100
+@@ -34,6 +34,10 @@
+ #include 
+ #include 
+ 
++#ifdef CONFIG_SYSMACROS
++#include 
++#endif
++
+ void os_set_line_buffering(void);
+ void os_set_proc_name(const char *s);
+ void os_setup_signal_handling(void);
diff --git a/meta/recipes-devtools/qemu/qemu_2.8.0.bb 
b/meta/recipes-devtools/qemu/qemu_2.8.0.bb
index e0527a8fd9..fc3e766323 100644
--- a/meta/recipes-devtools/qemu/qemu_2.8.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.8.0.bb
@@ -9,6 +9,7 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
 file://pathlimit.patch \
 file://qemu-2.5.0-cflags.patch \
 file://target-ppc-fix-user-mode.patch \
+file://glibc-2.25.patch \
 "
 
 SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2;
-- 
2.11.1

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


[OE-core] [PATCH 1/2] perl: Upgrade to 5.24.1

2017-02-21 Thread Aníbal Limón
Upgrade config.sh to match new version.

Removed CVE patches already in upstream:

- perl-fix-CVE-2016-1238.patch
- perl-fix-CVE-2016-6185.patch

Update customized.dat patch to match new hashes.

Signed-off-by: Aníbal Limón 
---
 ...perl-native_5.24.0.bb => perl-native_5.24.1.bb} |   4 +-
 ...depends_5.24.0.inc => perl-rdepends_5.24.1.inc} |   0
 meta/recipes-devtools/perl/perl/config.sh  |  60 ++--
 .../perl/perl/perl-fix-CVE-2016-1238.patch | 352 -
 .../perl/perl/perl-fix-CVE-2016-6185.patch | 128 
 .../perl/perl/perl-test-customized.patch   |  86 +++--
 .../perl/{perl_5.24.0.bb => perl_5.24.1.bb}|   6 +-
 7 files changed, 88 insertions(+), 548 deletions(-)
 rename meta/recipes-devtools/perl/{perl-native_5.24.0.bb => 
perl-native_5.24.1.bb} (96%)
 rename meta/recipes-devtools/perl/{perl-rdepends_5.24.0.inc => 
perl-rdepends_5.24.1.inc} (100%)
 delete mode 100644 meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-1238.patch
 delete mode 100644 meta/recipes-devtools/perl/perl/perl-fix-CVE-2016-6185.patch
 rename meta/recipes-devtools/perl/{perl_5.24.0.bb => perl_5.24.1.bb} (98%)

diff --git a/meta/recipes-devtools/perl/perl-native_5.24.0.bb 
b/meta/recipes-devtools/perl/perl-native_5.24.1.bb
similarity index 96%
rename from meta/recipes-devtools/perl/perl-native_5.24.0.bb
rename to meta/recipes-devtools/perl/perl-native_5.24.1.bb
index 4216257..d111bcd 100644
--- a/meta/recipes-devtools/perl/perl-native_5.24.0.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.24.1.bb
@@ -13,8 +13,8 @@ SRC_URI += "\
file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
   "
 
-SRC_URI[md5sum] = "59456ae4bd4b06cb6e57cb19a3b2d349"
-SRC_URI[sha256sum] = 
"a9a37c0860380ecd7b23aa06d61c20fc5bc6d95198029f3684c44a9d7e2952f2"
+SRC_URI[md5sum] = "af6a84c7c3e2b8b269c105a5db2f6d53"
+SRC_URI[sha256sum] = 
"03a77bac4505c270f1890ece75afc7d4b555090b41aa41ea478747e23b2afb3f"
 
 inherit native
 
diff --git a/meta/recipes-devtools/perl/perl-rdepends_5.24.0.inc 
b/meta/recipes-devtools/perl/perl-rdepends_5.24.1.inc
similarity index 100%
rename from meta/recipes-devtools/perl/perl-rdepends_5.24.0.inc
rename to meta/recipes-devtools/perl/perl-rdepends_5.24.1.inc
diff --git a/meta/recipes-devtools/perl/perl/config.sh 
b/meta/recipes-devtools/perl/perl/config.sh
index e6f..4657673 100644
--- a/meta/recipes-devtools/perl/perl/config.sh
+++ b/meta/recipes-devtools/perl/perl/config.sh
@@ -14,7 +14,7 @@
 
 : Configure command line arguments.
 config_arg0='Configure'
-config_args='-des -Doptimize=-O2 -Dmyhostname=localhost 
-Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded 
-Dinstallprefix=@EXECPREFIX@ -Dprefix=@EXECPREFIX@ -Dvendorprefix=@EXECPREFIX@ 
-Dsiteprefix=@EXECPREFIX@ -Dotherlibdirs=@LIBDIR@/perl/5.24.0 -Duseshrplib 
-Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db 
-Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio 
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=@USRBIN@/less -isr'
+config_args='-des -Doptimize=-O2 -Dmyhostname=localhost 
-Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded 
-Dinstallprefix=@EXECPREFIX@ -Dprefix=@EXECPREFIX@ -Dvendorprefix=@EXECPREFIX@ 
-Dsiteprefix=@EXECPREFIX@ -Dotherlibdirs=@LIBDIR@/perl/5.24.1 -Duseshrplib 
-Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db 
-Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio 
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=@USRBIN@/less -isr'
 config_argc=28
 config_arg1='-des'
 config_arg2='-Doptimize=-O2'
@@ -26,7 +26,7 @@ config_arg7='-Dinstallprefix=@EXECPREFIX@'
 config_arg8='-Dprefix=@EXECPREFIX@'
 config_arg9='-Dvendorprefix=@EXECPREFIX@'
 config_arg10='-Dsiteprefix=@EXECPREFIX@'
-config_arg11='-Dotherlibdirs=@LIBDIR@/perl/5.24.0'
+config_arg11='-Dotherlibdirs=@LIBDIR@/perl/5.24.1'
 config_arg12='-Duseshrplib'
 config_arg13='-Dusethreads'
 config_arg14='-Duseithreads'
@@ -64,13 +64,13 @@ alignbytes='8'
 ansi2knr=''
 aphostname=''
 api_revision='5'
-api_subversion='0'
+api_subversion='1'
 api_version='24'
-api_versionstring='5.24.0'
+api_versionstring='5.24.1'
 ar='ar'
-archlib='@LIBDIR@/perl/5.24.0/@ARCH@-thread-multi'
-archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.24.0/@ARCH@-thread-multi'
-archlib_exp='@LIBDIR@/perl/5.24.0/@ARCH@-thread-multi'
+archlib='@LIBDIR@/perl/5.24.1/@ARCH@-thread-multi'
+archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.24.1/@ARCH@-thread-multi'
+archlib_exp='@LIBDIR@/perl/5.24.1/@ARCH@-thread-multi'
 archname64=''
 archname='@ARCH@-thread-multi'
 archobjs=''
@@ -88,7 +88,7 @@ castflags='0'
 cat='cat'
 cc='gcc'
 cccdlflags='-fPIC'
-ccdlflags='-Wl,-E -Wl,-rpath,@LIBDIR@/perl/5.24.0/@ARCH@-thread-multi/CORE'
+ccdlflags='-Wl,-E -Wl,-rpath,@LIBDIR@/perl/5.24.1/@ARCH@-thread-multi/CORE'
 ccflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 

[OE-core] [PATCH 2/2] dpkg: Upgrade to 1.18.10

2017-02-21 Thread Aníbal Limón
Add a patch to don't use --clamp-time when call tar because
isn't supported in tar hosts versions. See
0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
patch for details.

Rebased patch:

-  0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch

Signed-off-by: Aníbal Limón 
Signed-off-by: Edwin Plauchu 
---
 meta/recipes-devtools/dpkg/dpkg.inc|  6 ++--
 ...tinsts-expect-D-to-be-set-when-running-in.patch | 31 ++---
 ...uild.c-Remove-usage-of-clamp-mtime-in-tar.patch | 40 ++
 .../dpkg/{dpkg_1.18.7.bb => dpkg_1.18.10.bb}   |  7 ++--
 4 files changed, 65 insertions(+), 19 deletions(-)
 create mode 100644 
meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
 rename meta/recipes-devtools/dpkg/{dpkg_1.18.7.bb => dpkg_1.18.10.bb} (69%)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc 
b/meta/recipes-devtools/dpkg/dpkg.inc
index ff88318..bd1fc9e 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -26,10 +26,10 @@ PERL_LIBDIR_class-native = "${libdir}/perl-native/perl"
 EXTRA_OECONF = "\
--disable-dselect \
--enable-start-stop-daemon \
-   --with-zlib \
-   --with-bz2 \
+   --with-libz \
+   --with-libbz2 \
--without-liblzma \
-   --without-selinux \
+   --without-libselinux \
"
 
 EXTRA_OECONF += "TAR=tar"
diff --git 
a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
 
b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
index 80504ce..93d8704 100644
--- 
a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
+++ 
b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
@@ -9,27 +9,32 @@ Upstream-Status: Inappropriate [OE Specific]
 
 RP 2011/12/07
 ALIMON 2016/05/26
-
+ALIMON 2017/02/21
 ---
- src/script.c | 39 +++
- 1 file changed, 3 insertions(+), 36 deletions(-)
+ src/script.c | 44 +++-
+ 1 file changed, 3 insertions(+), 41 deletions(-)
 
 diff --git a/src/script.c b/src/script.c
-index 3c88be8..ce66a86 100644
+index 2f252ae..768a9d1 100644
 --- a/src/script.c
 +++ b/src/script.c
-@@ -97,43 +97,10 @@ setexecute(const char *path, struct stat *stab)
+@@ -97,48 +97,10 @@ setexecute(const char *path, struct stat *stab)
  static const char *
  maintscript_pre_exec(struct command *cmd)
  {
 -  const char *admindir = dpkg_db_get_dir();
--  const char *changedir = fc_script_chrootless ? instdir : "/";
--  size_t instdirl = strlen(instdir);
+-  const char *changedir;
+-  size_t instdirlen = strlen(instdir);
+-
+-  if (instdirlen > 0 && fc_script_chrootless)
+-  changedir = instdir;
+-  else
+-  changedir = "/";
 -
--  if (*instdir && !fc_script_chrootless) {
--  if (strncmp(admindir, instdir, instdirl) != 0)
+-  if (instdirlen > 0 && !fc_script_chrootless) {
+-  if (strncmp(admindir, instdir, instdirlen) != 0)
 -  ohshit(_("admindir must be inside instdir for dpkg to 
work properly"));
--  if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0)
+-  if (setenv("DPKG_ADMINDIR", admindir + instdirlen, 1) < 0)
 -  ohshite(_("unable to setenv for subprocesses"));
 -  if (setenv("DPKG_ROOT", "", 1) < 0)
 -  ohshite(_("unable to setenv for subprocesses"));
@@ -56,11 +61,11 @@ index 3c88be8..ce66a86 100644
 -args.buf);
 -  varbuf_destroy();
 -  }
--  if (!instdirl || fc_script_chrootless)
+-  if (instdirlen == 0 || fc_script_chrootless)
 -  return cmd->filename;
 -
--  assert(strlen(cmd->filename) >= instdirl);
--  return cmd->filename + instdirl;
+-  assert(strlen(cmd->filename) >= instdirlen);
+-  return cmd->filename + instdirlen;
 +  return cmd->filename;
  }
  
diff --git 
a/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
 
b/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
new file mode 100644
index 000..8bfaad1
--- /dev/null
+++ 
b/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
@@ -0,0 +1,40 @@
+From 8659da74d71e12080121f0b13a88cbdda433 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= 
+Date: Tue, 21 Feb 2017 11:23:27 -0600
+Subject: [PATCH] dpkg-deb/build.c: Remove usage of --clamp-mtime in tar
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8

Re: [OE-core] [PATCHv2 1/1] insane.bbclass: Add missing dependencies

2017-02-21 Thread Mariano Lopez


On 15/02/17 22:02, Richard Purdie wrote:
> On Fri, 2017-02-10 at 14:19 -0600, mariano.lo...@linux.intel.com wrote:
>> From: Mariano Lopez 
>>
>> package_qa task requires some tools installed in sysroot; with
>> the introduction of recipe specific sysroot this task won't
>> have such tools installed if it's forced to run.
>>
>> Signed-off-by: Mariano Lopez 
>> ---
>>  meta/classes/insane.bbclass | 5 -
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/insane.bbclass
>> b/meta/classes/insane.bbclass
>> index 3cf86c1..0167b14 100644
>> --- a/meta/classes/insane.bbclass
>> +++ b/meta/classes/insane.bbclass
>> @@ -1223,9 +1223,12 @@ python do_package_qa () {
>>  bb.note("DONE with PACKAGE QA")
>>  }
>>  
>> +# binutils is used for most checks, so need to set as dependency
>> +# POPULATESYSROOTDEPS is defined in staging class.
>> +do_package_qa[depends] += "${POPULATESYSROOTDEPS}"
>>  do_package_qa[vardepsexclude] = "BB_TASKDEPDATA"
>>  do_package_qa[rdeptask] = "do_packagedata"
>> -addtask do_package_qa after do_packagedata do_package before
>> do_build
>> +addtask do_package_qa after do_prepare_recipe_sysroot do_packagedata
>> do_package before do_build
> This is close but I don't think you need this last addtask change, I
> think it should work just fine with the added [depends]?

Indeed, it works just with [depends]. Just sent v3 of this patch.

Mariano

>
> Cheers,
>
> Richard

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


[OE-core] [PATCHv3 1/1] insane.bbclass: Add missing dependencies

2017-02-21 Thread mariano . lopez
From: Mariano Lopez 

package_qa task requires some tools installed in sysroot; with
the introduction of recipe specific sysroot this task won't
have such tools installed if it's forced to run.

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

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index e8e54f0..6a34bd5 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1221,6 +1221,9 @@ python do_package_qa () {
 bb.note("DONE with PACKAGE QA")
 }
 
+# binutils is used for most checks, so need to set as dependency
+# POPULATESYSROOTDEPS is defined in staging class.
+do_package_qa[depends] += "${POPULATESYSROOTDEPS}"
 do_package_qa[vardepsexclude] = "BB_TASKDEPDATA"
 do_package_qa[rdeptask] = "do_packagedata"
 addtask do_package_qa after do_packagedata do_package before do_build
-- 
2.10.2

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


[OE-core] [PATCHv3 0/1] insane.bbclass: Add missing dependencies

2017-02-21 Thread mariano . lopez
From: Mariano Lopez 

Changes in v2:

- Add binutils as dependency too

Changes in v3:

- Remove prepare_recipe_sysroot task dependency as recommended by Richard 

The following changes since commit e436a6398684d2872cb541f1cfb0f67b3618d15a:

  layer.conf: bump version for change in eSDK selftest behaviour (2017-02-19 
09:39:03 -0800)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib mariano/insane_fix
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/insane_fix

Mariano Lopez (1):
  insane.bbclass: Add missing dependencies

 meta/classes/insane.bbclass | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.10.2

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


[OE-core] [PATCH 1/1] oeqa/runtime/context.py: Fix use of getTarget() with testexport

2017-02-21 Thread mariano . lopez
From: Mariano Lopez 

The idea on getTarget is to use kwargs to send custom variables
to different targets, instead of this, a new variable was added
(just used for custom targets) and this broke testexport. So
in order to fix it, just add the custom variable to kwargs.

This fixes the use of getTarget() in testexport class that was
introduced in 1dc8010afd71fe46fb28bb86fb7c07a5fbd3d7cf.

Signed-off-by: Mariano Lopez 
---
 meta/classes/testimage.bbclass|  6 +-
 meta/lib/oeqa/core/target/qemu.py |  2 +-
 meta/lib/oeqa/runtime/context.py  | 11 ++-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 09cc6d2..82557a8 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -229,6 +229,10 @@ def testimage_main(d):
   'kvm' : kvm,
 }
 
+# TODO: Currently BBPATH is needed for custom loading of targets.
+# It would be better to find these modules using instrospection.
+target_kwargs['target_modules_path'] = d.getVar('BBPATH')
+
 # runtime use network for download projects for build
 export_proxies(d)
 
@@ -239,7 +243,7 @@ def testimage_main(d):
 
 # the robot dance
 target = OERuntimeTestContextExecutor.getTarget(
-d.getVar("TEST_TARGET"), d.getVar("BBPATH"), None, 
d.getVar("TEST_TARGET_IP"),
+d.getVar("TEST_TARGET"), None, d.getVar("TEST_TARGET_IP"),
 d.getVar("TEST_SERVER_IP"), **target_kwargs)
 
 # test context
diff --git a/meta/lib/oeqa/core/target/qemu.py 
b/meta/lib/oeqa/core/target/qemu.py
index 9d3f68c..2dc521c 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -15,7 +15,7 @@ class OEQemuTarget(OESSHTarget):
 def __init__(self, logger, ip, server_ip, timeout=300, user='root',
 port=None, machine='', rootfs='', kernel='', kvm=False,
 dump_dir='', dump_host_cmds='', display='', bootlog='',
-tmpdir='', dir_image='', boottime=60):
+tmpdir='', dir_image='', boottime=60, **kwargs):
 
 super(OEQemuTarget, self).__init__(logger, ip, server_ip, timeout,
 user, port)
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index ea1b4a6..c4cd76c 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -89,7 +89,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 help="Qemu boot configuration, only needed when target_type is 
QEMU.")
 
 @staticmethod
-def getTarget(target_type, target_modules_path, logger, target_ip, 
server_ip, **kwargs):
+def getTarget(target_type, logger, target_ip, server_ip, **kwargs):
 target = None
 
 if target_type == 'simpleremote':
@@ -97,8 +97,17 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
 elif target_type == 'qemu':
 target = OEQemuTarget(logger, target_ip, server_ip, **kwargs)
 else:
+# XXX: This code uses the old naming convention for controllers and
+# targets, the idea it is to leave just targets as the controller
+# most of the time was just a wrapper.
+# XXX: This code tries to import modules from lib/oeqa/controllers
+# directory and treat them as controllers, it will less error prone
+# to use introspection to load such modules.
+# XXX: Don't base your targets on this code it will be refactored
+# in the near future.
 # Custom target module loading
 try:
+target_modules_path = kwargs.get('target_modules_path', '')
 controller = 
OERuntimeTestContextExecutor.getControllerModule(target_type, 
target_modules_path)
 target = controller(logger, target_ip, server_ip, **kwargs)
 except ImportError as e:
-- 
2.6.6

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


[OE-core] [PATCH] ncurses: 6.0+20160625 -> 6.0+20161126

2017-02-21 Thread Ross Burton
From: Hongxu Jia 

Add a patch to fix the CC/CFLAGS mangling that broke builds. [RB]

Signed-off-by: Hongxu Jia 
Signed-off-by: Ross Burton 
---
 .../recipes-core/ncurses/files/fix-cflags-mangle.patch | 18 ++
 ...ncurses_6.0+20160625.bb => ncurses_6.0+20161126.bb} |  3 ++-
 2 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
 rename meta/recipes-core/ncurses/{ncurses_6.0+20160625.bb => 
ncurses_6.0+20161126.bb} (73%)

diff --git a/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch 
b/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
new file mode 100644
index 000..e9447c5
--- /dev/null
+++ b/meta/recipes-core/ncurses/files/fix-cflags-mangle.patch
@@ -0,0 +1,18 @@
+configure has a piece of logic to detect users "abusing" CC to hold compiler
+flags (which we do).  It also has logic to "correct" this by moving the flags
+from CC to CFLAGS, but the sed only handles a single argument in CC.
+
+Replace the sed with awk to filter out all words that start with a hyphen.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton 
+
+diff --git a/configure b/configure
+index 7f31208..1a29cfc 100755
+--- a/configure
 b/configure
+@@ -2191,2 +2191,2 @@ echo "$as_me: WARNING: your environment misuses the CC 
variable to hold CFLAGS/C
+-  cf_flags=`echo "$CC" | sed -e 's/^.*[   ]\(-[^  ]\)/\1/'`
+-  CC=`echo "$CC " | sed -e 's/[   ]-[^].*$//' -e 's/[ ]*$//'`
++  cf_flags=`echo "$CC" | awk  'BEGIN{ORS=" ";RS=" "} /^-.+/ {print $1}'`
++  CC=`echo "$CC " | awk  'BEGIN{ORS=" ";RS=" "} /^[^-].+/ {print $1}'`
diff --git a/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb 
b/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
similarity index 73%
rename from meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
rename to meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
index 6514613..e95741f 100644
--- a/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
+++ b/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
@@ -1,10 +1,11 @@
 require ncurses.inc
 
 SRC_URI += "file://tic-hang.patch \
+file://fix-cflags-mangle.patch \
 file://config.cache \
 "
 # commit id corresponds to the revision in package version
-SRCREV = "63dd558cb8e888d6fab5f00bbf7842736a2356b9"
+SRCREV = "3db0bd19cb50e3d9b4f2cf15b7a102fe11302068"
 S = "${WORKDIR}/git"
 EXTRA_OECONF += "--with-abi-version=5"
 UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+(\+\d+)*)"
-- 
2.8.1

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


Re: [OE-core] [PATCH 0/2] glib-2.0 changes for nativesdk and packaging

2017-02-21 Thread Burton, Ross
On 21 February 2017 at 10:34, Nathan Rossi  wrote:

> Ping, any comments or feedback for this series?
>

Sorry, looks good, I'll stage them shortly.

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


[OE-core] [PATCH 1/2][morty] image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion types

2017-02-21 Thread Andre McCurdy
From: Randy Witt 

Previously if IMAGE_TYPEDEP_* contained a conversion type of the form,
"foo.bar", the dependency on CONVERSION_DEPENDS_bar would not get added
to the task depends for do_rootfs.

[YOCTO #10883]

Signed-off-by: Randy Witt 
Signed-off-by: Ross Burton 
(cherry picked from commit 037d39898e0e16c6d5b24a8d3844abfb328d3c14)
---
 meta/classes/image_types.bbclass | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 1ce8334..5020a5a 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -17,17 +17,25 @@ def imagetypes_getdepends(d):
 d += ":do_populate_sysroot"
 deps.add(d)
 
+# Take a type in the form of foo.bar.car and split it into the items
+# needed for the image deps "foo", and the conversion deps ["bar", "car"]
+def split_types(typestring):
+types = typestring.split(".")
+return types[0], types[1:]
+
 fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
 fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
 
 deps = set()
 for typestring in fstypes:
-types = typestring.split(".")
-basetype, resttypes = types[0], types[1:]
-
+basetype, resttypes = split_types(typestring)
 adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
+
 for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or 
"").split():
+base, rest = split_types(typedepends)
+resttypes += rest
 adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
+
 for ctype in resttypes:
 adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype, True), deps)
 adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
-- 
1.9.1

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


[OE-core] [PATCH 0/2][morty] Backport image dependency chain fixes

2017-02-21 Thread Andre McCurdy
Andre McCurdy (1):
  image_types.bbclass: fix image dependency chain collection

Randy Witt (1):
  image_types.bbclass: IMAGE_TYPEDEP_ now adds deps for conversion types

 meta/classes/image_types.bbclass | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

-- 
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][morty] image_types.bbclass: fix image dependency chain collection

2017-02-21 Thread Andre McCurdy
If image type "foo" depends on image type "bar.xz", then dependencies
should be collected from the base image type (ie "IMAGE_DEPENDS_bar")
not from "IMAGE_DEPENDS_bar.xz".

Signed-off-by: Andre McCurdy 
Signed-off-by: Richard Purdie 
(cherry picked from commit 8a9f249a9166347cc0468191ce130003e3d306e1)
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 5020a5a..3bfa60b 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -33,8 +33,8 @@ def imagetypes_getdepends(d):
 
 for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or 
"").split():
 base, rest = split_types(typedepends)
+adddep(d.getVar('IMAGE_DEPENDS_%s' % base, True) , deps)
 resttypes += rest
-adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
 
 for ctype in resttypes:
 adddep(d.getVar("CONVERSION_DEPENDS_%s" % ctype, True), deps)
-- 
1.9.1

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


Re: [OE-core] [PATCH v2 0/4] Make qemu.inc useful for generic use

2017-02-21 Thread Martin Jansa
It's not caused by these changes, but also probably not fixed by these
changes, so this is just FYI

Currently qemu-native fails to build on hosts with glibc-2.25:

| qga/commands-posix.o: In function `dev_major_minor':
|
/OE/build/owpb/webos-ports/tmp-glibc/work/x86_64-linux/qemu-native/2.8.0-r0/qemu-2.8.0/qga/commands-posix.c:656:
undefined reference to `major'
|
/OE/build/owpb/webos-ports/tmp-glibc/work/x86_64-linux/qemu-native/2.8.0-r0/qemu-2.8.0/qga/commands-posix.c:657:
undefined reference to `minor'
| collect2: error: ld returned 1 exit status
| make: *** [Makefile:322: qemu-ga] Error 1

linux-user/strace.o: In function `print_mknodat':
/OE/build/owpb/webos-ports/tmp-glibc/work/x86_64-linux/qemu-native/2.8.0-r0/qemu-2.8.0/linux-user/strace.c:2010:
undefined reference to `major'
/OE/build/owpb/webos-ports/tmp-glibc/work/x86_64-linux/qemu-native/2.8.0-r0/qemu-2.8.0/linux-user/strace.c:2011:
undefined reference to `minor'
linux-user/strace.o: In function `print_mknod':
/OE/build/owpb/webos-ports/tmp-glibc/work/x86_64-linux/qemu-native/2.8.0-r0/qemu-2.8.0/linux-user/strace.c:1990:
undefined reference to `major'
/OE/build/owpb/webos-ports/tmp-glibc/work/x86_64-linux/qemu-native/2.8.0-r0/qemu-2.8.0/linux-user/strace.c:1991:
undefined reference to `minor'
collect2: error: ld returned 1 exit status

Including sys/sysmacros in these files works, there is a patch in review
upstream with proper fix:

https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg03548.html


On Tue, Feb 21, 2017 at 2:12 PM, Nathan Rossi 
wrote:

> This series is intended to make the qemu.inc more generic and useful for
> other recipes to use. This is achieved by moving version specific
> patches, task steps and ptest support into the qemu_*.bb recipe,
> additionally improvements are made to the PACKAGECONFIG options and
> changes to the configure step are made to allow for the configuration to
> be more complete as well as easier to override/modify.
> ---
> Changes in v2:
>  * Rebased on top of current master
>  * Updated changes for QEMU 2.8.0 recipe
>
>
> Nathan Rossi (4):
>   qemu: Improve and add PACKAGECONFIG options
>   qemu: Consolidate EXTRA_OECONF
>   qemu: Convert KVMOPTS to PACKAGECONFIG
>   qemu: Move recipe version specific patches and features to recipe
>
>  meta/recipes-devtools/qemu/qemu.inc  | 84
> +---
>  meta/recipes-devtools/qemu/qemu_2.8.0.bb | 33 -
>  2 files changed, 65 insertions(+), 52 deletions(-)
>
> --
> 2.11.0
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] libusb1: upgrade 1.0.20 -> 1.0.21

2017-02-21 Thread leonardo . sandoval . gonzalez
From: Leonardo Sandoval 

Signed-off-by: Leonardo Sandoval 
---
 meta/recipes-support/libusb/{libusb1_1.0.20.bb => libusb1_1.0.21.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/libusb/{libusb1_1.0.20.bb => libusb1_1.0.21.bb} 
(86%)

diff --git a/meta/recipes-support/libusb/libusb1_1.0.20.bb 
b/meta/recipes-support/libusb/libusb1_1.0.21.bb
similarity index 86%
rename from meta/recipes-support/libusb/libusb1_1.0.20.bb
rename to meta/recipes-support/libusb/libusb1_1.0.21.bb
index 4cad2d4..1fefd14 100644
--- a/meta/recipes-support/libusb/libusb1_1.0.20.bb
+++ b/meta/recipes-support/libusb/libusb1_1.0.21.bb
@@ -12,8 +12,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
file://no-dll.patch \
   "
 
-SRC_URI[md5sum] = "1d4eb194eaaa2bcfbba28102768c7dbf"
-SRC_URI[sha256sum] = 
"cb057190ba0a961768224e4dc6883104c6f945b2bf2ef90d7da39e7c1834f7ff"
+SRC_URI[md5sum] = "1da9ea3c27b3858fa85c5f4466003e44"
+SRC_URI[sha256sum] = 
"7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b"
 
 S = "${WORKDIR}/libusb-${PV}"
 
-- 
2.1.4

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


Re: [OE-core] core-image-tiny-initramfs failing to parse because of WIC (WKS_FULL_PATH, )

2017-02-21 Thread Martin Jansa
You asked for bblayers.conf and local.conf on IRC, here it is:

bblayers.conf:
LCONF_VERSION = "7"
TMPDIR := "/OE/build/oe-core"
BBPATH = "${TOPDIR}:${TMPDIR}"
BBLAYERS = "${TOPDIR}/openembedded-core/meta"

local.conf:
empty

and in environment:
BB_ENV_EXTRAWHITE=MACHINE DISTRO http_proxy ftp_proxy https_proxy all_proxy
ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE
BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED PSEUDO_BUILD
MACHINE=qemux86
DISTRO is empty


On Sat, Feb 18, 2017 at 1:16 AM, Martin Jansa 
wrote:

> On Wed, Feb 15, 2017 at 10:58:49AM +0200, Ed Bartosh wrote:
> > Hi Martin,
> >
> > Sorry for the delay. I missedd your message somehow.
> >
> > I can't reproduce this. Tried with latest poky and latest oe-core +
> > bitbake. I built core-image-tiny-initramfs from scratch and bitbake -e
> > busybox works for me just fine.
> >
> > Can you provide more details about your setup, please?
>
> Hi Ed,
>
> I was also having troubles reproducing it in different setup as well,
> until I've
> found out that my local.conf had this line:
>
> IMAGE_FSTYPES_qemux86 = "vmdk"
>
> which prevented ever using wic (USING_WIC variable was always empty).
>
> Now with this line removed I can share the complete exception reproduced
> with just oe-core layer included:
>
> $ bitbake -e core-image-tiny-initramfs | tee env.core-image-tiny-initramfs5
> NOTE: Started PRServer with DBfile: /OE/build/oe-core/cache/prserv.sqlite3,
> IP: 127.0.0.1, PORT: 38869, PID: 21506
> Parsing recipes...ERROR: ExpansionError during parsing /OE/build/oe-core/
> openembedded-core/meta/recipes-core/images/core-image-tiny-initramfs.bb
> Traceback (most recent call last):
>   File "/OE/build/oe-core/bitbake/lib/bb/data_smart.py", line 412, in
> DataSmart.expandWithRefs(s='\tout="${IMGDEPLOYDIR}/${IMAGE_
> NAME}"\n\twks="${WKS_FULL_PATH}"\n\tif [ -z "$wks" ]; then\n\t\tbbfatal
> "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set
> WKS_FILE or WKS_FILES appropriately."\n\tfi\n\n\tBUILDDIR="${TOPDIR}" wic
> create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e
> "${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}\n\tmv
> "$out/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"\n\trm
> -rf "$out/"\n', varname='IMAGE_CMD'):
>  try:
> >s = __expand_var_regexp__.sub(varparse.var_sub, s)
>  try:
>   File "/OE/build/oe-core/bitbake/lib/bb/data_smart.py", line 111, in
> VariableParse.var_sub(match=<_sre.SRE_Match object; span=(43, 59),
> match='${WKS_FULL_PATH}'>):
>  else:
> >var = self.d.getVarFlag(key, "_content")
>  self.references.add(key)
>   File "/OE/build/oe-core/bitbake/lib/bb/data_smart.py", line 773, in
> DataSmart.getVarFlag(var='WKS_FULL_PATH', flag='_content', expand=True,
> noweakdefault=False, parsing=False):
>  cachename = var + "[" + flag + "]"
> >value = self.expand(value, cachename)
>
>   File "/OE/build/oe-core/bitbake/lib/bb/data_smart.py", line 436, in
> DataSmart.expand(s="${@wks_search('${WKS_FILES}'.split(),
> '${WKS_SEARCH_PATH}') or ''}", varname='WKS_FULL_PATH'):
>  def expand(self, s, varname = None):
> >return self.expandWithRefs(s, varname).value
>
>   File "/OE/build/oe-core/bitbake/lib/bb/data_smart.py", line 426, in
> DataSmart.expandWithRefs(s="${@wks_search('directdisk.wks
> core-image-tiny-initramfs.wks'.split(), '/OE/build/oe-core/
> openembedded-core/meta/recipes-core/images:${@':'.join('%s/wic' % p for p
> in '/OE/build/oe-core:${TMPDIR}:/OE/build/oe-core/openembedded-
> core/meta'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l
> for l in '/OE/build/oe-core:${TMPDIR}:/OE/build/oe-core/openembedded-
> core/meta:/OE/build/oe-core/openembedded-core'.split(':'))}') or ''}",
> varname='WKS_FULL_PATH'):
>  except Exception as exc:
> >raise ExpansionError(varname, s, exc) from exc
>
> bb.data_smart.ExpansionError: Failure expanding variable WKS_FULL_PATH,
> expression was ${@wks_search('directdisk.wks 
> core-image-tiny-initramfs.wks'.split(),
> '/OE/build/oe-core/openembedded-core/meta/recipes-core/images:${@':'.join('%s/wic'
> % p for p in '/OE/build/oe-core:${TMPDIR}:/OE/build/oe-core/openembedded-
> core/meta'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l
> for l in '/OE/build/oe-core:${TMPDIR}:/OE/build/oe-core/openembedded-
> core/meta:/OE/build/oe-core/openembedded-core'.split(':'))}') or ''}
> which triggered exception SyntaxError: invalid syntax (WKS_FULL_PATH, line
> 1)
>
>
> Summary: There was 1 ERROR message shown, returning a non-zero exit code.
>
> The strange part of this exception is the unexpanded ${TMPDIR} in the
> WKS_SEARCH_PATH value,
> that lead me to following 2 lines in conf/bblayers.conf:
>
> TMPDIR := "/OE/build/oe-core"
> BBPATH = "${TOPDIR}:${TMPDIR}"
>
> I'm not sure 

[OE-core] [PATCH] ruby: upgrade 2.3.3 -> 2.4.0

2017-02-21 Thread leonardo . sandoval . gonzalez
From: Leonardo Sandoval 

Two LIC_FILES_CHKSUM checksums changed (COPYING and LEGAL) but LICENSE remains
the same.

Signed-off-by: Leonardo Sandoval 
---
 meta/recipes-devtools/ruby/ruby.inc | 4 ++--
 meta/recipes-devtools/ruby/{ruby_2.3.3.bb => ruby_2.4.0.bb} | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-devtools/ruby/{ruby_2.3.3.bb => ruby_2.4.0.bb} (89%)

diff --git a/meta/recipes-devtools/ruby/ruby.inc 
b/meta/recipes-devtools/ruby/ruby.inc
index f38ebb0..e2a2c05 100644
--- a/meta/recipes-devtools/ruby/ruby.inc
+++ b/meta/recipes-devtools/ruby/ruby.inc
@@ -8,10 +8,10 @@ HOMEPAGE = "http://www.ruby-lang.org/;
 SECTION = "devel/ruby"
 LICENSE = "Ruby | BSD | GPLv2"
 LIC_FILES_CHKSUM = "\
-file://COPYING;md5=837b32593517ae48b9c3b5c87a5d288c \
+file://COPYING;md5=8a960b08d972f43f91ae84a6f00dcbfb \
 file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\
 file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\
-file://LEGAL;md5=78e8a29b8cc93e042990dbbb5572b1e1\
+file://LEGAL;md5=daf349ad59dd19bd8c919171bff3c5d6 \
 "
 
 DEPENDS = "ruby-native zlib openssl tcl libyaml db gdbm readline"
diff --git a/meta/recipes-devtools/ruby/ruby_2.3.3.bb 
b/meta/recipes-devtools/ruby/ruby_2.4.0.bb
similarity index 89%
rename from meta/recipes-devtools/ruby/ruby_2.3.3.bb
rename to meta/recipes-devtools/ruby/ruby_2.4.0.bb
index 7ba9b46..9b951fc 100644
--- a/meta/recipes-devtools/ruby/ruby_2.3.3.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.4.0.bb
@@ -1,7 +1,7 @@
 require ruby.inc
 
-SRC_URI[md5sum] = "e485f3a55649eb24a1e2e1a40bc120df"
-SRC_URI[sha256sum] = 
"241408c8c555b258846368830a06146e4849a1d58dcaf6b14a3b6a73058115b7"
+SRC_URI[md5sum] = "7e9485dcdb86ff52662728de2003e625"
+SRC_URI[sha256sum] = 
"152fd0bd15a90b4a18213448f485d4b53e9f7662e1508190aa5b702446b29e3d"
 
 # 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.1.4

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


Re: [OE-core] [PATCH 4/4] ncurses: fix beaglebone do_configure failure

2017-02-21 Thread Burton, Ross
On 21 February 2017 at 13:50, Burton, Ross  wrote:

> I'm a big fan of fixing upstream so we don't have to carry a patch
> forever.  Their rationale I don't understand, but the implementation is
> clearly broken.
>

Here's my current fix:

+  cf_flags=`echo "$CC" | awk  'BEGIN{ORS=" ";RS=" "} /^-.+/ {print
$1}'`
+  CC=`echo "$CC " | awk  'BEGIN{ORS=" ";RS=" "} /^[^-].+/ {print $1}'`

Works for ccache, and doesn't involve a long/horrible sed.  I've also sent
it upstream.

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


[OE-core] [PATCH 3/6] wic: exec_native_cmd: improve debug message

2017-02-21 Thread Ed Bartosh
Added search paths to the debug message to make it
easier to see where the native command is searched.

[YOCTO #11017]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/utils/misc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index 3bab2f1..6769e39 100644
--- a/scripts/lib/wic/utils/misc.py
+++ b/scripts/lib/wic/utils/misc.py
@@ -114,7 +114,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, 
pseudo=""):
  native_sysroot, native_sysroot, native_sysroot)
 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
(native_paths, cmd_and_args)
-logger.debug("exec_native_cmd: %s", cmd_and_args)
+logger.debug("exec_native_cmd: %s", native_cmd_and_args)
 
 # If the command isn't in the native sysroot say we failed.
 if spawn.find_executable(args[0], native_paths):
-- 
2.1.4

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


[OE-core] [PATCH 5/6] wic: add WKS_FILE_DEPENDS variable

2017-02-21 Thread Ed Bartosh
This variable should be used to specify dependencies that
will be added to DEPENDS only if wic image build is 'active'
i.e. when 'wic' is in IMAGE_FSTYPES.

Signed-off-by: Ed Bartosh 
---
 meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +-
 meta/classes/image_types_wic.bbclass   | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb 
b/meta-selftest/recipes-test/images/wic-image-minimal.bb
index 9e93b8e..b687935 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -6,7 +6,7 @@ IMAGE_INSTALL = "packagegroup-core-boot 
${ROOTFS_PKGMANAGE_BOOTSTRAP}"
 
 IMAGE_FSTYPES = "wic"
 
-DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native 
gptfdisk-native"
+WKS_FILE_DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native 
gptfdisk-native"
 
 LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
diff --git a/meta/classes/image_types_wic.bbclass 
b/meta/classes/image_types_wic.bbclass
index ec6c14d..43b2917 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -40,6 +40,8 @@ USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' 
+ ' '.join('wic.%s
 WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' % 
os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
 do_image_wic[depends] += "wic-tools:do_build"
+WKS_FILE_DEPENDS ??= ''
+DEPENDS += "${@ '${WKS_FILE_DEPENDS}' if d.getVar('USING_WIC') else '' }"
 
 python do_write_wks_template () {
 """Write out expanded template contents to WKS_FULL_PATH."""
-- 
2.1.4

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


[OE-core] [PATCH 6/6] wic: raise WicError instead of calling logger.error

2017-02-21 Thread Ed Bartosh
Replaced forgotten calls of logger.error with raising
WicError exception. Otherwise errors will be ignored.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/source/bootimg-pcbios.py | 4 ++--
 scripts/lib/wic/utils/misc.py| 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py 
b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 74c75a0..bbc9f47 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -96,8 +96,8 @@ class BootimgPcbiosPlugin(SourcePlugin):
 logger.debug("Using custom configuration file %s "
  "for syslinux.cfg", bootloader.configfile)
 else:
-logger.error("configfile is specified but failed to "
- "get it from %s.", bootloader.configfile)
+raise WicError("configfile is specified but failed to "
+   "get it from %s." % bootloader.configfile)
 
 if not custom_cfg:
 # Create syslinux configuration using parameters from wks file
diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index 216ab7b..c941112 100644
--- a/scripts/lib/wic/utils/misc.py
+++ b/scripts/lib/wic/utils/misc.py
@@ -136,7 +136,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, 
pseudo=""):
 else:
 msg += "Wic failed to find a recipe to build native %s. Please "\
"file a bug against wic.\n" % prog
-logger.error(msg)
+raise WicError(msg)
 
 return ret, out
 
-- 
2.1.4

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


[OE-core] [PATCH 4/6] wic: exec_native_cmd: fix undefined variable error

2017-02-21 Thread Ed Bartosh
Defined variable 'out' to fix this exception:
UnboundLocalError: local variable 'out' referenced before assignment

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/utils/misc.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index 6769e39..216ab7b 100644
--- a/scripts/lib/wic/utils/misc.py
+++ b/scripts/lib/wic/utils/misc.py
@@ -121,6 +121,7 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, 
pseudo=""):
 ret, out = _exec_cmd(native_cmd_and_args, True, catch)
 else:
 ret = 127
+out = "can't find native executable %s in %s" % (args[0], native_paths)
 
 prog = args[0]
 # shell command-not-found
-- 
2.1.4

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


[OE-core] [PATCH 2/6] wic: use image recipe sysroot as default

2017-02-21 Thread Ed Bartosh
Switched from using wic-tools recipe sysroot to using
image sysroot in wic script. This way is more logical
and consistent with the way wic uses other artifacts.

[YOCTO #11017]

Signed-off-by: Ed Bartosh 
---
 scripts/wic | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/wic b/scripts/wic
index f32cb19..99721dc 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -190,7 +190,7 @@ def wic_create_subcommand(args, usage_str):
 rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", options.image_name)
 kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE", options.image_name)
 native_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE",
- "wic-tools", cache=False)
+ options.image_name) #, cache=False)
 else:
 if options.build_rootfs:
 raise WicError("Image name is not specified, exiting. "
-- 
2.1.4

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


[OE-core] [PATCH 1/6] wic: use 2 sysroots to find native executable

2017-02-21 Thread Ed Bartosh
Currently there is no way to specify a dependency on native
tools for wic without modifying wic-tools recipe. Obvious
way to make it more flexible is to use image sysroot and
wic-tools together to find an executable.

Modified run_native_cmd to use image and wic-tools sysroots
to find native executable.

[YOCTO #11017]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/utils/misc.py | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/wic/utils/misc.py b/scripts/lib/wic/utils/misc.py
index 4b822f0..3bab2f1 100644
--- a/scripts/lib/wic/utils/misc.py
+++ b/scripts/lib/wic/utils/misc.py
@@ -105,9 +105,13 @@ def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, 
pseudo=""):
 
 if pseudo:
 cmd_and_args = pseudo + cmd_and_args
+
+wtools_sysroot = get_bitbake_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
+
 native_paths = \
-"%s/sbin:%s/usr/sbin:%s/usr/bin" % \
-(native_sysroot, native_sysroot, native_sysroot)
+"%s/sbin:%s/usr/sbin:%s/usr/bin:%s/sbin:%s/usr/sbin:%s/usr/bin" % \
+(wtools_sysroot, wtools_sysroot, wtools_sysroot,
+ native_sysroot, native_sysroot, native_sysroot)
 native_cmd_and_args = "export PATH=%s:$PATH;%s" % \
(native_paths, cmd_and_args)
 logger.debug("exec_native_cmd: %s", cmd_and_args)
-- 
2.1.4

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


[OE-core] [PATCH 0/6] wic: fix for #11017

2017-02-21 Thread Ed Bartosh
Hi,

This patchset improves handling of wic native tool dependencies and
fixes minor bugs in the wic code.

The following changes since commit 9a0ddad5e178d16f302af2d05c32368572849fd3:

  wic: pluginbase: use global dictionary (2017-02-20 11:58:28 +0200)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ed/wic/wip
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip

Ed Bartosh (6):
  wic: use 2 sysroots to find native executable
  wic: use image recipe sysroot as default
  wic: exec_native_cmd: improve debug message
  wic: exec_native_cmd: fix undefined variable error
  wic: add WKS_FILE_DEPENDS variable
  wic: raise WicError instead of calling logger.error

 meta-selftest/recipes-test/images/wic-image-minimal.bb |  2 +-
 meta/classes/image_types_wic.bbclass   |  2 ++
 scripts/lib/wic/plugins/source/bootimg-pcbios.py   |  4 ++--
 scripts/lib/wic/utils/misc.py  | 13 +
 scripts/wic|  2 +-
 5 files changed, 15 insertions(+), 8 deletions(-)

--
Regards,
Ed

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


[OE-core] [PATCH] runqemu: avoid overridden user input for bootparams

2017-02-21 Thread Dmitry Rozhkov
Currently runqemu hardcodes the "ip=" kernel boot parameter
when configuring QEMU to use tap or slirp networking. This makes
the guest system to have a network interface pre-configured
by kernel and causes systemd to fail renaming the interface
to whatever pleases it:

  Feb 21 10:10:20 intel-corei7-64 systemd-udevd[201]: Error changing
  net interface name 'eth0' to 'enp0s3': Device or resource busy,

Always append user input for kernel boot params after the ones
added by the script. This way user input has priority over runqemu's
default params.

Signed-off-by: Dmitry Rozhkov 
---
 scripts/runqemu | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index d74f252..8899cbb 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -180,6 +180,7 @@ class BaseConfig(object):
 self.kernel = ''
 self.kernel_cmdline = ''
 self.kernel_cmdline_script = ''
+self.bootparams = ''
 self.dtb = ''
 self.fstype = ''
 self.kvm_enabled = False
@@ -400,7 +401,7 @@ class BaseConfig(object):
 elif arg.startswith('qemuparams='):
 self.qemu_opt_script += ' %s' % arg[len('qemuparams='):]
 elif arg.startswith('bootparams='):
-self.kernel_cmdline_script += ' %s' % arg[len('bootparams='):]
+self.bootparams = arg[len('bootparams='):]
 elif os.path.exists(arg) or (re.search(':', arg) and 
re.search('/', arg)):
 self.check_arg_path(os.path.abspath(arg))
 elif re.search('-image-', arg):
@@ -1040,7 +1041,9 @@ class BaseConfig(object):
 
 def start_qemu(self):
 if self.kernel:
-kernel_opts = "-kernel %s -append '%s %s %s'" % (self.kernel, 
self.kernel_cmdline, self.kernel_cmdline_script, 
self.get('QB_KERNEL_CMDLINE_APPEND'))
+kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel, 
self.kernel_cmdline,
+
self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'),
+
self.bootparams)
 if self.dtb:
 kernel_opts += " -dtb %s" % self.dtb
 else:
-- 
2.7.4

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


[OE-core] [PATCHv2 13/39] libdnf: add a recipe

2017-02-21 Thread Alexander Kanavin
libdnf is required by dnf.

Signed-off-by: Alexander Kanavin 
---
 ...cmake-drop-the-requirement-for-GTKDOC_SCA.patch | 31 +++
 ...ers-for-both-libsolv-and-libsolvext-libdn.patch | 28 +
 ...-sysroot-path-to-introspection-tools-path.patch | 36 ++
 ...-library-installation-directory-correctly.patch | 29 +
 ...-variables-with-pkg-config-cmake-s-own-mo.patch | 29 +
 meta/recipes-devtools/libdnf/libdnf_git.bb | 36 ++
 6 files changed, 189 insertions(+)
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0003-Set-the-library-installation-directory-correctly.patch
 create mode 100644 
meta/recipes-devtools/libdnf/libdnf/0004-Set-libsolv-variables-with-pkg-config-cmake-s-own-mo.patch
 create mode 100644 meta/recipes-devtools/libdnf/libdnf_git.bb

diff --git 
a/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
 
b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
new file mode 100644
index 000..73acda6af8a
--- /dev/null
+++ 
b/meta/recipes-devtools/libdnf/libdnf/0001-FindGtkDoc.cmake-drop-the-requirement-for-GTKDOC_SCA.patch
@@ -0,0 +1,31 @@
+From 9bb7630915c3e787732463a3e2064fe0e177101b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 24 Nov 2016 14:33:07 +0200
+Subject: [PATCH 1/4] FindGtkDoc.cmake: drop the requirement for
+ GTKDOC_SCANGOBJ_WRAPPER
+
+For some reason cmake is not able to find it when building in openembedded,
+and it's bundled with the source code anyway.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ cmake/modules/FindGtkDoc.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/FindGtkDoc.cmake b/cmake/modules/FindGtkDoc.cmake
+index 92b2cc7..39f34bd 100644
+--- a/cmake/modules/FindGtkDoc.cmake
 b/cmake/modules/FindGtkDoc.cmake
+@@ -52,7 +52,7 @@ find_program(GTKDOC_MKHTML_EXE gtkdoc-mkhtml PATH 
"${GLIB_PREFIX}/bin")
+ find_program(GTKDOC_FIXXREF_EXE gtkdoc-fixxref PATH "${GLIB_PREFIX}/bin")
+ 
+ find_package_handle_standard_args(GtkDoc
+-REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_SCANGOBJ_WRAPPER 
GTKDOC_MKDB_EXE GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
++REQUIRED_VARS GTKDOC_SCAN_EXE GTKDOC_SCANGOBJ_EXE GTKDOC_MKDB_EXE 
GTKDOC_MKHTML_EXE GTKDOC_FIXXREF_EXE
+ VERSION_VAR GtkDoc_VERSION)
+ 
+ # ::
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
 
b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
new file mode 100644
index 000..954add6e738
--- /dev/null
+++ 
b/meta/recipes-devtools/libdnf/libdnf/0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch
@@ -0,0 +1,28 @@
+From 5958b151a4dbb89114e90c971a34b74f873b7beb Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Tue, 7 Feb 2017 12:16:03 +0200
+Subject: [PATCH] Get parameters for both libsolv and libsolvext (libdnf is
+ using both)
+
+Upstream-Status: Pending [depends on whether 
https://github.com/openSUSE/libsolv/pull/177 is accepted]
+Signed-off-by: Alexander Kanavin 
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b531da1..e512da0 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -28,7 +28,7 @@ find_package (PkgConfig REQUIRED)
+ SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+ PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.44.0 REQUIRED)
+ FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
+-PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv)
++PKG_CHECK_MODULES (LIBSOLV REQUIRED libsolv libsolvext)
+ set(LIBSOLV_LIBRARY ${LIBSOLV_LIBRARIES})
+ pkg_check_modules (CHECK REQUIRED check)
+ pkg_check_modules (REPO REQUIRED librepo)
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
 
b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
new file mode 100644
index 000..3d772a5f8a3
--- /dev/null
+++ 
b/meta/recipes-devtools/libdnf/libdnf/0002-Prefix-sysroot-path-to-introspection-tools-path.patch
@@ -0,0 +1,36 @@
+From c8211ad99ccaa4af4a75e0ba639527267fcfd69e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:17:19 +0200
+Subject: [PATCH 2/4] Prefix 

[OE-core] [PATCHv2 30/39] selftest: allow bitbake to fail in test_options_warnqa_errorqa_switch

2017-02-21 Thread Alexander Kanavin
rpm4 seems to be stricter about duplicate entries in .spec, and so
we should let it fail for the test case to succeed.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oeqa/selftest/buildoptions.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/buildoptions.py 
b/meta/lib/oeqa/selftest/buildoptions.py
index 1801511913b..0b744d1f5e9 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -91,7 +91,7 @@ class SanityOptionsTest(oeSelfTest):
 self.append_config('ERROR_QA_remove = "packages-list"')
 self.append_config('WARN_QA_append = " packages-list"')
 bitbake("xcursor-transparent-theme -ccleansstate")
-res = bitbake("xcursor-transparent-theme")
+res = bitbake("xcursor-transparent-theme", ignore_status = True)
 self.delete_recipeinc('xcursor-transparent-theme')
 line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is 
listed in PACKAGES multiple times, this leads to packaging errors.")
 self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
-- 
2.11.0

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


[OE-core] [PATCHv2 21/39] rootfs_rpm.bbclass: migrate image creation to dnf

2017-02-21 Thread Alexander Kanavin
To properly look at this patch, you probably need a side-by-side diff viewing 
tool.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/rootfs_rpm.bbclass |   21 +-
 meta/lib/oe/package_manager.py  | 1189 +++
 meta/lib/oe/rootfs.py   |   18 +-
 meta/lib/oe/sdk.py  |7 +-
 4 files changed, 233 insertions(+), 1002 deletions(-)

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index b8ff4cb7b6a..65881a60a7b 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -2,20 +2,23 @@
 # Creates a root filesystem out of rpm packages
 #
 
-ROOTFS_PKGMANAGE = "rpm smartpm"
+ROOTFS_PKGMANAGE = "rpm dnf"
 ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
 
-# Add 100Meg of extra space for Smart
-IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", 
"smartpm", " + 102400", "" ,d)}"
+# dnf is using our custom distutils, and so will fail without these
+export STAGING_INCDIR
+export STAGING_LIBDIR
 
-# Smart is python based, so be sure python-native is available to us.
+# Add 100Meg of extra space for dnf
+IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", 
"dnf", " + 102400", "" ,d)}"
+
+# Dnf is python based, so be sure python-native is available to us.
 EXTRANATIVEPATH += "python-native"
 
 # opkg is needed for update-alternatives
 RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
-rpmresolve-native:do_populate_sysroot \
-python-smartpm-native:do_populate_sysroot \
-createrepo-native:do_populate_sysroot \
+dnf-native:do_populate_sysroot \
+createrepo-c-native:do_populate_sysroot \
 opkg-native:do_populate_sysroot"
 
 do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
@@ -35,7 +38,3 @@ python () {
 d.setVar('RPM_POSTPROCESS_COMMANDS', '')
 
 }
-# Smart is python based, so be sure python-native is available to us.
-EXTRANATIVEPATH += "python-native"
-
-rpmlibdir = "/var/lib/rpm"
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 725997ce334..49d7fca2314 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -102,109 +102,14 @@ class Indexer(object, metaclass=ABCMeta):
 
 
 class RpmIndexer(Indexer):
-def get_ml_prefix_and_os_list(self, arch_var=None, os_var=None):
-package_archs = collections.OrderedDict()
-target_os = collections.OrderedDict()
-
-if arch_var is not None and os_var is not None:
-package_archs['default'] = self.d.getVar(arch_var).split()
-package_archs['default'].reverse()
-target_os['default'] = self.d.getVar(os_var).strip()
-else:
-package_archs['default'] = self.d.getVar("PACKAGE_ARCHS").split()
-# arch order is reversed.  This ensures the -best- match is
-# listed first!
-package_archs['default'].reverse()
-target_os['default'] = self.d.getVar("TARGET_OS").strip()
-multilibs = self.d.getVar('MULTILIBS') or ""
-for ext in multilibs.split():
-eext = ext.split(':')
-if len(eext) > 1 and eext[0] == 'multilib':
-localdata = bb.data.createCopy(self.d)
-default_tune_key = "DEFAULTTUNE_virtclass-multilib-" + 
eext[1]
-default_tune = localdata.getVar(default_tune_key, False)
-if default_tune is None:
-default_tune_key = "DEFAULTTUNE_ML_" + eext[1]
-default_tune = localdata.getVar(default_tune_key, 
False)
-if default_tune:
-localdata.setVar("DEFAULTTUNE", default_tune)
-package_archs[eext[1]] = 
localdata.getVar('PACKAGE_ARCHS').split()
-package_archs[eext[1]].reverse()
-target_os[eext[1]] = 
localdata.getVar("TARGET_OS").strip()
-
-ml_prefix_list = collections.OrderedDict()
-for mlib in package_archs:
-if mlib == 'default':
-ml_prefix_list[mlib] = package_archs[mlib]
-else:
-ml_prefix_list[mlib] = list()
-for arch in package_archs[mlib]:
-if arch in ['all', 'noarch', 'any']:
-ml_prefix_list[mlib].append(arch)
-else:
-ml_prefix_list[mlib].append(mlib + "_" + arch)
-
-return (ml_prefix_list, target_os)
-
 def write_index(self):
-sdk_pkg_archs = (self.d.getVar('SDK_PACKAGE_ARCHS') or 
"").replace('-', '_').split()
-all_mlb_pkg_archs = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or 
"").replace('-', '_').split()
-
-mlb_prefix_list = self.get_ml_prefix_and_os_list()[0]
-
-archs = set()
-for item in mlb_prefix_list:
-archs = archs.union(set(i.replace('-', '_') for i in 

[OE-core] [PATCHv2 28/39] selftest: do not perform a full build in test_continue

2017-02-21 Thread Alexander Kanavin
This was fetching and building the toolchain and everything else
against empty download dir and sstate cache, and so was enormously slow.
The test does not need that, it only checks that one fetch task fails and
another succeeds when using bitbake's -k option.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oeqa/selftest/bbtests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/bbtests.py 
b/meta/lib/oeqa/selftest/bbtests.py
index fccb395b2a6..daa4d2fdf0c 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -221,7 +221,7 @@ INHERIT_remove = \"report-error\"
 self.track_for_cleanup(os.path.join(self.builddir, 
"download-selftest"))
 self.write_recipeinc('man',"\ndo_fail_task () {\nexit 1 \n}\n\naddtask 
do_fail_task before do_fetch\n" )
 runCmd('bitbake -c cleanall man xcursor-transparent-theme')
-result = runCmd('bitbake man xcursor-transparent-theme -k', 
ignore_status=True)
+result = runCmd('bitbake -c unpack -k man xcursor-transparent-theme', 
ignore_status=True)
 errorpos = result.output.find('ERROR: Function failed: do_fail_task')
 manver = re.search("NOTE: recipe xcursor-transparent-theme-(.*?): task 
do_unpack: Started", result.output)
 continuepos = result.output.find('NOTE: recipe 
xcursor-transparent-theme-%s: task do_unpack: Started' % manver.group(1))
-- 
2.11.0

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


[OE-core] [PATCHv2 26/39] testimage.bbclass: fix runtime test for rpm, port smart tests to dnf

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/classes/testimage.bbclass   |  21 ++--
 meta/lib/oeqa/oetest.py  |   7 --
 meta/lib/oeqa/runtime/cases/dnf.py   | 112 ++
 meta/lib/oeqa/runtime/cases/parselogs.py |   1 +
 meta/lib/oeqa/runtime/cases/rpm.py   |  19 ++-
 meta/lib/oeqa/runtime/cases/smart.py | 196 ---
 6 files changed, 130 insertions(+), 226 deletions(-)
 create mode 100644 meta/lib/oeqa/runtime/cases/dnf.py
 delete mode 100644 meta/lib/oeqa/runtime/cases/smart.py

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 09cc6d2a211..f86b0eb09df 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -35,7 +35,7 @@ TEST_NEEDED_PACKAGES_DIR ?= "${WORKDIR}/testimage/packages"
 TEST_EXTRACTED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/extracted"
 TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
 
-RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', 
d)}"
+RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'dnf rpm', '', 
d)}"
 SYSTEMDSUITE = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 
'', d)}"
 MINTESTSUITE = "ping"
 NETTESTSUITE = "${MINTESTSUITE} ssh df date scp oe_syslog ${SYSTEMDSUITE}"
@@ -74,12 +74,11 @@ TESTIMAGEDEPENDS = ""
 TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot 
qemu-helper-native:do_populate_sysroot"
 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_qemuall += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-c-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'dnf-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)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'python-smartpm-native:do_populate_sysroot', '', d)}"
-TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-native:do_populate_sysroot', '', d)}"
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-c-native:do_populate_sysroot', '', d)}"
 
 TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
 TESTIMAGELOCK_qemuall = ""
@@ -120,7 +119,7 @@ python do_testimage() {
 testimage_sanity(d)
 
 if (d.getVar('IMAGE_PKGTYPE') == 'rpm'
-   and 'smart' in d.getVar('TEST_SUITES')):
+   and 'dnf' in d.getVar('TEST_SUITES')):
 create_rpm_index(d)
 
 testimage_main(d)
@@ -320,19 +319,16 @@ def create_index(arg):
 
 def create_rpm_index(d):
 # Index RPMs
-rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
+rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo_c")
 index_cmds = []
 archs = (d.getVar('ALL_MULTILIB_PACKAGE_ARCHS') or '').replace('-', '_')
 
 for arch in archs.split():
 rpm_dir = os.path.join(d.getVar('DEPLOY_DIR_RPM'), arch)
-idx_path = os.path.join(d.getVar('WORKDIR'), 'rpm', arch)
-db_path = os.path.join(d.getVar('WORKDIR'), 'rpmdb', arch)
+idx_path = os.path.join(d.getVar('WORKDIR'), 'oe-testimage-repo', arch)
 
 if not os.path.isdir(rpm_dir):
 continue
-if os.path.exists(db_path):
-bb.utils.remove(dbpath, True)
 
 lockfilename = os.path.join(d.getVar('DEPLOY_DIR_RPM'), 'rpm.lock')
 lf = bb.utils.lockfile(lockfilename, False)
@@ -342,8 +338,7 @@ def create_rpm_index(d):
 # this leaves some allarch and machine arch packages too.
 bb.utils.remove(idx_path + "*/[a-oq-z]*.rpm")
 bb.utils.unlockfile(lf)
-cmd = '%s --dbpath %s --update -q %s' % (rpm_createrepo,
- db_path, idx_path)
+cmd = '%s --update -q %s' % (rpm_createrepo, idx_path)
 
 # Create repodata
 result = create_index(cmd)
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index b886130d0ec..a47ab6ea647 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -128,13 +128,6 @@ class oeRuntimeTest(oeTest):
 def tearDownLocal(self):
 pass
 
-#TODO: use package_manager.py to install packages on any type of image
-def install_packages(self, packagelist):
-for package in packagelist:
-(status, result) = self.target.run("smart 

[OE-core] [PATCHv2 29/39] selftest: update output checks in incremental image test to match what dnf prints

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/lib/oeqa/selftest/buildoptions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/buildoptions.py 
b/meta/lib/oeqa/selftest/buildoptions.py
index d40eb007ded..1801511913b 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -22,12 +22,12 @@ class ImageOptionsTests(oeSelfTest):
 bitbake("core-image-minimal")
 log_data_file = os.path.join(get_bb_var("WORKDIR", 
"core-image-minimal"), "temp/log.do_rootfs")
 log_data_created = ftools.read_file(log_data_file)
-incremental_created = re.search("NOTE: load old install solution for 
incremental install\nNOTE: old install solution not exist\nNOTE: creating new 
install solution for incremental install(\n.*)*NOTE: Installing the following 
packages:.*packagegroup-core-ssh-openssh", log_data_created)
+incremental_created = re.search("Installing  : 
packagegroup-core-ssh-openssh", log_data_created)
 self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
 self.assertTrue(incremental_created, msg = "Match failed in:\n%s" % 
log_data_created)
 bitbake("core-image-minimal")
 log_data_removed = ftools.read_file(log_data_file)
-incremental_removed = re.search("NOTE: load old install solution for 
incremental install\nNOTE: creating new install solution for incremental 
install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*", log_data_removed)
+incremental_removed = re.search("Erasing : 
packagegroup-core-ssh-openssh", log_data_removed)
 self.assertTrue(incremental_removed, msg = "Match failed in:\n%s" % 
log_data_removed)
 
 @testcase(286)
-- 
2.11.0

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


[OE-core] [PATCHv2 02/39] libsolv: enable rpm support

2017-02-21 Thread Alexander Kanavin
This is required by libdnf.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-extended/libsolv/libsolv_0.6.24.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/libsolv/libsolv_0.6.24.bb 
b/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
index 6de38b59157..3d8b581f851 100644
--- a/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
+++ b/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
@@ -5,7 +5,7 @@ SECTION = "devel"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
 
-DEPENDS = "expat zlib"
+DEPENDS = "expat zlib rpm"
 
 SRC_URI = "git://github.com/openSUSE/libsolv.git \
file://0001-Split-libsolvext-into-it-s-own-pkg-config-file.patch \
@@ -19,7 +19,7 @@ S = "${WORKDIR}/git"
 
 inherit cmake
 
-EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON"
+EXTRA_OECMAKE = "-DLIB=${baselib} -DMULTI_SEMANTICS=ON -DENABLE_RPMMD=ON 
-DENABLE_RPMDB=ON"
 
 PACKAGES =+ "${PN}-tools ${PN}ext"
 
-- 
2.11.0

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


[OE-core] [PATCHv2 23/39] scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 scripts/oe-setup-rpmrepo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/oe-setup-rpmrepo b/scripts/oe-setup-rpmrepo
index 7dcded8f1d4..df1c61435c1 100755
--- a/scripts/oe-setup-rpmrepo
+++ b/scripts/oe-setup-rpmrepo
@@ -89,7 +89,7 @@ if [ ! -d "$RPM_DIR" ]; then
exit 1
 fi
 
-CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo
+CREATEREPO=$OECORE_NATIVE_SYSROOT/usr/bin/createrepo_c
 if [ ! -e "$CREATEREPO" ]; then
echo "Error: can't find createrepo binary"
echo "please run bitbake createrepo-native first"
-- 
2.11.0

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


[OE-core] [PATCHv2 03/39] rpmresolve: remove the recipe

2017-02-21 Thread Alexander Kanavin
The source code is incompatible with rpm4 API - let's use rpm
binary itself for now.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c | 426 --
 meta/recipes-devtools/rpm/rpmresolve_1.0.bb   |  29 --
 2 files changed, 455 deletions(-)
 delete mode 100644 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
 delete mode 100644 meta/recipes-devtools/rpm/rpmresolve_1.0.bb

diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c 
b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
deleted file mode 100644
index c0b4d567fb0..000
--- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/* OpenEmbedded RPM resolver utility
-
-  Written by: Paul Eggleton 
-
-  Copyright 2012 Intel Corporation
-
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License version 2 as
-  published by the Free Software Foundation.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License along
-  with this program; if not, write to the Free Software Foundation, Inc.,
-  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-int debugmode;
-FILE *outf;
-
-int getPackageStr(rpmts ts, const char *NVRA, rpmTag tag, char **value)
-{
-int rc = -1;
-rpmmi mi = rpmmiInit(rpmtsGetRdb(ts), RPMTAG_NVRA, NVRA, 0);
-Header h;
-if ((h = rpmmiNext(mi)) != NULL) {
-HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
-he->tag = tag;
-rc = (headerGet(h, he, 0) != 1);
-if(rc==0)
-*value = strdup((char *)he->p.ptr);
-}
-(void)rpmmiFree(mi);
-return rc;
-}
-
-int loadTs(rpmts **ts, int *tsct, const char *dblistfn)
-{
-int count = 0;
-int sz = 5;
-int rc = 0;
-int listfile = 1;
-struct stat st_buf;
-
-rc = stat(dblistfn, _buf);
-if(rc != 0) {
-perror("stat");
-return 1;
-}
-if(S_ISDIR(st_buf.st_mode))
-listfile = 0;
-
-if(listfile) {
-if(debugmode)
-printf("DEBUG: reading database list file '%s'\n", dblistfn);
-*ts = malloc(sz * sizeof(rpmts));
-FILE *f = fopen(dblistfn, "r" );
-if(f) {
-char line[2048];
-while(fgets(line, sizeof(line), f)) {
-int len = strlen(line) - 1;
-if(len > 0)
-// Trim trailing whitespace
-while(len > 0 && isspace(line[len]))
-line[len--] = '\0';
-
-if(len > 0) {
-// Expand array if needed
-if(count == sz) {
-sz += 5;
-*ts = (rpmts *)realloc(*ts, sz);
-}
-
-if(debugmode)
-printf("DEBUG: opening database '%s'\n", line);
-char *dbpathm = malloc(strlen(line) + 10);
-sprintf(dbpathm, "_dbpath %s", line);
-rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE);
-free(dbpathm);
-
-rpmts tsi = rpmtsCreate();
-(*ts)[count] = tsi;
-rc = rpmtsOpenDB(tsi, O_RDONLY);
-if( rc ) {
-fprintf(stderr, "Failed to open database %s\n", line);
-rc = -1;
-break;
-}
-
-count++;
-}
-}
-fclose(f);
-*tsct = count;
-}
-else {
-perror(dblistfn);
-rc = -1;
-}
-}
-else {
-if(debugmode)
-printf("DEBUG: opening database '%s'\n", dblistfn);
-// Load from single database
-*ts = malloc(sizeof(rpmts));
-char *dbpathm = malloc(strlen(dblistfn) + 10);
-sprintf(dbpathm, "_dbpath %s", dblistfn);
-rpmDefineMacro(NULL, dbpathm, RMIL_CMDLINE);
-free(dbpathm);
-
-rpmts tsi = rpmtsCreate();
-(*ts)[0] = tsi;
-rc = rpmtsOpenDB(tsi, O_RDONLY);
-if( rc ) {
-fprintf(stderr, "Failed to open database %s\n", dblistfn);
-rc = -1;
-}
-*tsct = 1;
-}
-
-return rc;
-}
-
-int processPackages(rpmts *ts, int tscount, const char *packagelistfn, int 
ignoremissing)
-{
-int rc = 0;
-int count = 0;
-int sz = 100;
-int i = 0;
-

[OE-core] [PATCHv2 34/39] lib/oe/gpg_sign: make gpg version a property of the signer

2017-02-21 Thread Alexander Kanavin
From: Markus Lehtonen 

Signed-off-by: Markus Lehtonen 
Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/gpg_sign.py | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index 4b87ddde57a..725da5a2a5d 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -10,6 +10,7 @@ class LocalSigner(object):
 self.gpg_bin = d.getVar('GPG_BIN') or \
   bb.utils.which(os.getenv('PATH'), 'gpg')
 self.gpg_path = d.getVar('GPG_PATH')
+self.gpg_version = self.get_gpg_version()
 self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
 
 def export_pubkey(self, output_file, keyid, armor=True):
@@ -58,9 +59,7 @@ class LocalSigner(object):
 
 #gpg > 2.1 supports password pipes only through the loopback interface
 #gpg < 2.1 errors out if given unknown parameters
-dots = self.get_gpg_version().split('.')
-assert len(dots) >= 2
-if int(dots[0]) >= 2 and int(dots[1]) >= 1:
+if self.gpg_version > (2,1,):
 cmd += ['--pinentry-mode', 'loopback']
 
 cmd += [input_file]
@@ -87,10 +86,11 @@ class LocalSigner(object):
 
 
 def get_gpg_version(self):
-"""Return the gpg version"""
+"""Return the gpg version as a tuple of ints"""
 import subprocess
 try:
-return subprocess.check_output((self.gpg_bin, 
"--version")).split()[2].decode("utf-8")
+ver_str = subprocess.check_output((self.gpg_bin, 
"--version")).split()[2].decode("utf-8")
+return tuple([int(i) for i in ver_str.split('.')])
 except subprocess.CalledProcessError as e:
 raise bb.build.FuncFailed("Could not get gpg version: %s" % e)
 
-- 
2.11.0

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


[OE-core] [PATCHv2 36/39] oe-selftest: no need to parse gpg output to determine the name of the signing key

2017-02-21 Thread Alexander Kanavin
The parsing fails on my machine, and we use a key with a hardcoded name,
and so can provide it directly.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oeqa/selftest/signing.py | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/meta/lib/oeqa/selftest/signing.py 
b/meta/lib/oeqa/selftest/signing.py
index 828dfccab42..884fb61287c 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -101,13 +101,7 @@ class Signing(oeSelfTest):
 self.add_command_to_tearDown('bitbake -c cleansstate %s' % test_recipe)
 self.add_command_to_tearDown('rm -rf %s' % sstatedir)
 
-# Determine the pub key signature
-ret = runCmd('gpg --homedir %s --list-keys' % self.gpg_dir)
-pub_key = re.search(r'^pub\s+\S+/(\S+)\s+', ret.output, re.M)
-self.assertIsNotNone(pub_key, 'Failed to determine the public key 
signature.')
-pub_key = pub_key.group(1)
-
-feature = 'SSTATE_SIG_KEY ?= "%s"\n' % pub_key
+feature = 'SSTATE_SIG_KEY ?= "testuser"\n'
 feature += 'SSTATE_SIG_PASSPHRASE ?= "test123"\n'
 feature += 'SSTATE_VERIFY_SIG ?= "1"\n'
 feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
-- 
2.11.0

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


[OE-core] [PATCHv2 35/39] gpg_sign.py: fix rpm signing with gpg > 2.1

2017-02-21 Thread Alexander Kanavin
From: Markus Lehtonen 

We need to check the gpg version and alter its command line options
accordingly.

Signed-off-by: Markus Lehtonen 
Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/gpg_sign.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index 725da5a2a5d..10272be4c9a 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -31,7 +31,10 @@ class LocalSigner(object):
 """Sign RPM files"""
 
 cmd = self.rpm_bin + " --addsign --define '_gpg_name %s'  " % keyid
-cmd += "--define '_gpg_sign_cmd_extra_args --batch --passphrase=%s 
--pinentry-mode=loopback' " % passphrase
+gpg_args = '--batch --passphrase=%s' % passphrase
+if self.gpg_version > (2,1,):
+gpg_args += ' --pinentry-mode=loopback'
+cmd += "--define '_gpg_sign_cmd_extra_args %s' " % gpg_args
 if self.gpg_bin:
 cmd += "--define '%%__gpg %s' " % self.gpg_bin
 if self.gpg_path:
-- 
2.11.0

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


[OE-core] [PATCHv2 32/39] byacc: remove the recipe

2017-02-21 Thread Alexander Kanavin
It was used only by rpm5 and will be moved to meta-oe

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-extended/byacc/byacc.inc  |  22 ---
 .../0001-byacc-do-not-reorder-CC-and-CFLAGS.patch  | 161 -
 meta/recipes-extended/byacc/byacc/byacc-open.patch |  25 
 meta/recipes-extended/byacc/byacc_20161202.bb  |  12 --
 .../packagegroup-core-full-cmdline.bb  |   1 -
 5 files changed, 221 deletions(-)
 delete mode 100644 meta/recipes-extended/byacc/byacc.inc
 delete mode 100644 
meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
 delete mode 100644 meta/recipes-extended/byacc/byacc/byacc-open.patch
 delete mode 100644 meta/recipes-extended/byacc/byacc_20161202.bb

diff --git a/meta/recipes-extended/byacc/byacc.inc 
b/meta/recipes-extended/byacc/byacc.inc
deleted file mode 100644
index adb07193d73..000
--- a/meta/recipes-extended/byacc/byacc.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Berkeley LALR Yacc parser generator"
-DESCRIPTION = "A parser generator utility that reads a grammar specification 
from a file and generates an LR(1) \
-parser for it.  The parsers consist of a set of LALR(1) parsing tables and a 
driver routine written in the C \
-programming language."
-SECTION = "devel"
-LICENSE = "PD"
-
-SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \
-   file://byacc-open.patch \
-   file://0001-byacc-do-not-reorder-CC-and-CFLAGS.patch"
-
-EXTRA_OECONF += "--program-transform-name='s,^,b,'"
-
-BBCLASSEXTEND = "native"
-
-inherit autotools
-
-do_configure() {
-   install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
-   install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
-   oe_runconf
-}
diff --git 
a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
 
b/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
deleted file mode 100644
index 7cd2510c8ed..000
--- 
a/meta/recipes-extended/byacc/byacc/0001-byacc-do-not-reorder-CC-and-CFLAGS.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-Subject: byacc: do not reorder $CC and $CFLAGS
-
-byacc tries to process $CC and decide which part should belong to CC and which
-part should below to CFLAGS and then do reordering. It doesn't make much sense
-for OE. And it doesn't do its work correctly. Some options are dropped.
-
-Delete all these stuff so that we could have all options we need.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-Signed-off-by: Chen Qi 

- aclocal.m4 |   1 -
- configure  | 119 -
- 2 files changed, 120 deletions(-)
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 917a848..62ef241 100644
 a/aclocal.m4
-+++ b/aclocal.m4
-@@ -1021,7 +1021,6 @@ CF_GCC_VERSION
- CF_ACVERSION_CHECK(2.52,
-   [AC_PROG_CC_STDC],
-   [CF_ANSI_CC_REQD])
--CF_CC_ENV_FLAGS
- ])dnl
- dnl 
---
- dnl CF_PROG_GROFF version: 2 updated: 2015/07/04 11:16:27
-diff --git a/configure b/configure
-index 9707e50..4f0497c 100755
 a/configure
-+++ b/configure
-@@ -1946,125 +1946,6 @@ esac
- # This should have been defined by AC_PROG_CC
- : ${CC:=cc}
- 
--echo "$as_me:1949: checking \$CC variable" >&5
--echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
--case "$CC" in
--(*[\ \]-*)
--  echo "$as_me:1953: result: broken" >&5
--echo "${ECHO_T}broken" >&6
--  { echo "$as_me:1955: WARNING: your environment misuses the CC variable 
to hold CFLAGS/CPPFLAGS options" >&5
--echo "$as_me: WARNING: your environment misuses the CC variable to hold 
CFLAGS/CPPFLAGS options" >&2;}
--  # humor him...
--  cf_flags=`echo "$CC" | sed -e 's/^.*[   ]\(-[^  ]\)/\1/'`
--  CC=`echo "$CC " | sed -e 's/[   ]-[^].*$//' -e 's/[ ]*$//'`
--  for cf_arg in $cf_flags
--  do
--  case "x$cf_arg" in
--  (x-[IUDfgOW]*)
--
--cf_fix_cppflags=no
--cf_new_cflags=
--cf_new_cppflags=
--cf_new_extra_cppflags=
--
--for cf_add_cflags in $cf_flags
--do
--case $cf_fix_cppflags in
--(no)
--  case $cf_add_cflags in
--  (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
--  case $cf_add_cflags in
--  (-D*)
--  cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 
's/^-D[^=]*='\''\"[^"]*//'`
--
--  test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
--  && test -z "${cf_tst_cflags}" \
--  && cf_fix_cppflags=yes
--
--  if test $cf_fix_cppflags = yes ; then
--  cf_new_extra_cppflags="$cf_new_extra_cppflags 
$cf_add_cflags"
--  continue
--  elif test "${cf_tst_cflags}" = "\"'" ; then
--  

[OE-core] [PATCHv2 37/39] run-postinsts: simplify the logic of whether to install it to images

2017-02-21 Thread Alexander Kanavin
The logic is scattered all over the place, but amounts to
"install, unless the rootfs is read only". Let's express that directly.

Signed-off-by: Alexander Kanavin 
---
 meta-selftest/recipes-test/images/oe-selftest-image.bb | 2 +-
 meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 +-
 meta/classes/image.bbclass | 2 +-
 meta/classes/rootfs_deb.bbclass| 1 -
 meta/classes/rootfs_ipk.bbclass| 1 -
 meta/classes/rootfs_rpm.bbclass| 1 -
 meta/lib/oe/manifest.py| 2 +-
 meta/recipes-core/images/core-image-minimal.bb | 2 +-
 meta/recipes-devtools/dpkg/dpkg.inc| 2 +-
 meta/recipes-devtools/opkg/opkg_0.3.4.bb   | 2 +-
 10 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb 
b/meta-selftest/recipes-test/images/oe-selftest-image.bb
index f17094c5d08..5d4d10eef69 100644
--- a/meta-selftest/recipes-test/images/oe-selftest-image.bb
+++ b/meta-selftest/recipes-test/images/oe-selftest-image.bb
@@ -1,6 +1,6 @@
 SUMMARY = "An image used during oe-selftest tests"
 
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} dropbear"
+IMAGE_INSTALL = "packagegroup-core-boot dropbear"
 IMAGE_FEATURES = "debug-tweaks"
 
 IMAGE_LINGUAS = " "
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb 
b/meta-selftest/recipes-test/images/wic-image-minimal.bb
index 9e93b8e1a95..c8196fa1837 100644
--- a/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -2,7 +2,7 @@ SUMMARY = "An example of partitioned image."
 
 SRC_URI = "file://${FILE_DIRNAME}/${BPN}.wks"
 
-IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
+IMAGE_INSTALL = "packagegroup-core-boot"
 
 IMAGE_FSTYPES = "wic"
 
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 127e62d5d95..405fd73c043 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -29,7 +29,7 @@ IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs 
empty-root-password
 IMAGE_GEN_DEBUGFS ?= "0"
 
 # rootfs bootstrap install
-ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", 
"package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
+ROOTFS_BOOTSTRAP_INSTALL = "run-postinsts"
 
 # These packages will be removed from a read-only rootfs after all other
 # packages have been installed
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index e8facd43687..10af4b5ff0f 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -3,7 +3,6 @@
 #
 
 ROOTFS_PKGMANAGE = "dpkg apt"
-ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "dpkg-native:do_populate_sysroot 
apt-native:do_populate_sysroot"
 do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot 
apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 6b60c466386..a57b1d34f7b 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -7,7 +7,6 @@
 
 EXTRAOPKGCONFIG ?= ""
 ROOTFS_PKGMANAGE = "opkg ${EXTRAOPKGCONFIG}"
-ROOTFS_PKGMANAGE_BOOTSTRAP  = "run-postinsts"
 
 do_rootfs[depends] += "opkg-native:do_populate_sysroot 
opkg-utils-native:do_populate_sysroot"
 do_populate_sdk[depends] += "opkg-native:do_populate_sysroot 
opkg-utils-native:do_populate_sysroot"
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 65881a60a7b..af0f23877ac 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -3,7 +3,6 @@
 #
 
 ROOTFS_PKGMANAGE = "rpm dnf"
-ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
 
 # dnf is using our custom distutils, and so will fail without these
 export STAGING_INCDIR
diff --git a/meta/lib/oe/manifest.py b/meta/lib/oe/manifest.py
index 6ec9b1af8bc..60c49be0e99 100644
--- a/meta/lib/oe/manifest.py
+++ b/meta/lib/oe/manifest.py
@@ -104,7 +104,7 @@ class Manifest(object, metaclass=ABCMeta):
 pkg_list['lgp'] = \
 "locale-base-en-us locale-base-en-gb"
 elif image_rootfs.find("core-image-minimal") > 0:
-pkg_list[self.PKG_TYPE_MUST_INSTALL] = "run-postinsts 
packagegroup-core-boot"
+pkg_list[self.PKG_TYPE_MUST_INSTALL] = "packagegroup-core-boot"
 
 with open(self.initial_manifest, "w+") as manifest:
 manifest.write(self.initial_manifest_file_header)
diff --git a/meta/recipes-core/images/core-image-minimal.bb 
b/meta/recipes-core/images/core-image-minimal.bb
index 8dd77b3472e..4630026aa9d 100644
--- a/meta/recipes-core/images/core-image-minimal.bb
+++ b/meta/recipes-core/images/core-image-minimal.bb
@@ -1,6 +1,6 @@
 SUMMARY = "A small image just capable of allowing a device 

[OE-core] [PATCHv2 39/39] security_flags.inc: update to reflect smart->dnf transition

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/conf/distro/include/security_flags.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/conf/distro/include/security_flags.inc 
b/meta/conf/distro/include/security_flags.inc
index 77416bc11e7..99a0a33969f 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -72,14 +72,13 @@ SECURITY_CFLAGS_pn-openssl = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-opensp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-ppp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-python-backports-lzma = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-pycurl = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python-smartpm = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-python-pygpgme = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3-numpy = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3-pycairo = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3 = "${SECURITY_NO_PIE_CFLAGS}"
-# Revert RPM to using internally supported values
-SECURITY_CFLAGS_pn-rpm = "${lcl_maybe_fortify} -fstack-protector"
 SECURITY_CFLAGS_pn-syslinux = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-slang = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-source-highlight = "${SECURITY_NO_PIE_CFLAGS}"
-- 
2.11.0

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


[OE-core] [PATCHv2 38/39] package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages

2017-02-21 Thread Alexander Kanavin
nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
are run with it. We can either teach rpm4 and dnf to ignore that dependency
(a lot of non-upstreamable work), or add auto-satisfy the dependency
in each package. I've chosen to do the latter.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ff86dc87980..2cdaae0ff25 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -560,7 +560,7 @@ python write_specfile () {
 
 print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
 print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
-print_deps(srcrprovides, "Provides", spec_preamble_top, d)
+print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") 
else ""), "Provides", spec_preamble_top, d)
 print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
 
 # conflicts can not be in a provide!  We will need to filter it.
-- 
2.11.0

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


[OE-core] [PATCHv2 31/39] ossp-uuid: remove the recipe

2017-02-21 Thread Alexander Kanavin
It was used only by rpm5, and will be moved to meta-oe.

Signed-off-by: Alexander Kanavin 
---
 .../ossp-uuid/0001-Change-library-name.patch   | 119 -
 ...erve-m-option-status-in-v-option-handling.patch |  62 ---
 .../ossp-uuid/0003-Fix-whatis-entries.patch|  58 --
 .../ossp-uuid/0004-fix-data-uuid-from-string.patch |  43 
 .../ossp-uuid/ossp-uuid/install-pc.patch   |  19 
 .../ossp-uuid/ossp-uuid/ldflags.patch  |  26 -
 .../ossp-uuid/ossp-uuid/uuid-libtool.patch |  27 -
 .../ossp-uuid/ossp-uuid/uuid-nostrip.patch |  19 
 meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb |  64 ---
 9 files changed, 437 deletions(-)
 delete mode 100644 
meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch
 delete mode 100644 
meta/recipes-devtools/ossp-uuid/ossp-uuid/0002-uuid-preserve-m-option-status-in-v-option-handling.patch
 delete mode 100644 
meta/recipes-devtools/ossp-uuid/ossp-uuid/0003-Fix-whatis-entries.patch
 delete mode 100644 
meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
 delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/install-pc.patch
 delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/ldflags.patch
 delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-libtool.patch
 delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid/uuid-nostrip.patch
 delete mode 100644 meta/recipes-devtools/ossp-uuid/ossp-uuid_1.6.2.bb

diff --git 
a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch 
b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch
deleted file mode 100644
index ed67c501cb0..000
--- a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0001-Change-library-name.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From: Piotr Roszatycki 
-Date: Wed, 27 Jan 2010 16:53:11 +0100
-Subject: [PATCH] Change library name
-
-The soname was changed to ossp-uuid to prevend the name clash with e2fsprogs's
-uuid library.

- Makefile.in  |6 +++---
- perl/Makefile.PL |   12 ++--
- php/config.m4|2 +-
- uuid-config.in   |2 +-
- uuid.pc.in   |4 ++--
- 5 files changed, 13 insertions(+), 13 deletions(-)
-
-
-Upstream-Status: Inappropriate [not author]
-
-This patch is from debian ossp-uuid 1.6.2 integration.
-
-Signed-off-by: Mark Hatle 
-
-diff --git a/Makefile.in b/Makefile.in
-index d28f4be..c2ba99d 100644
 a/Makefile.in
-+++ b/Makefile.in
-@@ -62,13 +62,13 @@ PERL= @PERL@
- PHP = @PHP@
- PG_CONFIG   = @PG_CONFIG@
- 
--LIB_NAME= libuuid.la
-+LIB_NAME= libossp-uuid.la
- LIB_OBJS= uuid.lo uuid_md5.lo uuid_sha1.lo uuid_prng.lo uuid_mac.lo 
uuid_time.lo uuid_ui64.lo uuid_ui128.lo uuid_str.lo
- 
--DCE_NAME= libuuid_dce.la
-+DCE_NAME= libossp-uuid_dce.la
- DCE_OBJS= uuid_dce.lo $(LIB_OBJS)
- 
--CXX_NAME= libuuid++.la
-+CXX_NAME= libossp-uuid++.la
- CXX_OBJS= uuid++.lo $(LIB_OBJS)
- 
- PRG_NAME= uuid
-diff --git a/perl/Makefile.PL b/perl/Makefile.PL
-index 92f4494..9c6fee6 100644
 a/perl/Makefile.PL
-+++ b/perl/Makefile.PL
-@@ -33,9 +33,9 @@ use Config;
- use ExtUtils::MakeMaker;
- 
- #   determine source directory
--my ($srcdir) = map { my $d = $_; $d =~ s/\/libuuid\.la$//; $d }
--   grep { -f $_ } ("../libuuid.la", glob("../*/libuuid.la"))
--or die "no source directory found (where libuuid.la is located)";
-+my ($srcdir) = map { my $d = $_; $d =~ s/\/libossp-uuid\.la$//; $d }
-+   grep { -f $_ } ("../libossp-uuid.la", 
glob("../*/libossp-uuid.la"))
-+or die "no source directory found (where libossp-uuid.la is located)";
- 
- #   determine extra build options
- my $compat = 0;
-@@ -47,15 +47,15 @@ WriteMakefile(
- VERSION_FROM  => 'uuid.pm',
- ABSTRACT_FROM => 'uuid.pod',
- PREREQ_PM => {},
--LIBS  => [ "-L$srcdir/.libs -L$srcdir -luuid" ],
-+LIBS  => [ "-L$srcdir/.libs -L$srcdir -lossp-uuid" ],
- DEFINE=> '',
- INC   => "-I. -I$srcdir",
- PM=> { 'uuid.pm'   => '$(INST_LIBDIR)/uuid.pm',
-'uuid.pod'  => '$(INST_LIBDIR)/uuid.pod',
-($compat ? ('uuid_compat.pm'  => 
'$(INST_LIBDIR)/../Data/UUID.pm')  : ()),
-($compat ? ('uuid_compat.pod' => 
'$(INST_LIBDIR)/../Data/UUID.pod') : ()), },
--MAN3PODS  => { 'uuid.pod' => '$(INST_MAN3DIR)/OSSP::uuid.3',
--   ($compat ? ('uuid_compat.pod' => 
'$(INST_MAN3DIR)/Data::UUID.3') : ()), },
-+MAN3PODS  => { 'uuid.pod' => '$(INST_MAN3DIR)/OSSP::uuid.3pm',
-+   ($compat ? ('uuid_compat.pod' => 
'$(INST_MAN3DIR)/Data::UUID.3pm') : ()), },
- TYPEMAPS  => [ 'uuid.tm' ],
- test

[OE-core] [PATCHv2 33/39] gpg_sign.py: fix signing of rpm files using gpg

2017-02-21 Thread Alexander Kanavin
This means
a) calling rpmkeys and rpmsign instead of rpm
b) instructing gpg to run non-interactively; otherwise on my machine
it pops up windows requesting a key passphrase

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/gpg_sign.py   | 4 ++--
 meta/lib/oeqa/selftest/signing.py | 8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index dcd19909302..4b87ddde57a 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -10,7 +10,7 @@ class LocalSigner(object):
 self.gpg_bin = d.getVar('GPG_BIN') or \
   bb.utils.which(os.getenv('PATH'), 'gpg')
 self.gpg_path = d.getVar('GPG_PATH')
-self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpm")
+self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpmsign")
 
 def export_pubkey(self, output_file, keyid, armor=True):
 """Export GPG public key to a file"""
@@ -30,7 +30,7 @@ class LocalSigner(object):
 """Sign RPM files"""
 
 cmd = self.rpm_bin + " --addsign --define '_gpg_name %s'  " % keyid
-cmd += "--define '_gpg_passphrase %s' " % passphrase
+cmd += "--define '_gpg_sign_cmd_extra_args --batch --passphrase=%s 
--pinentry-mode=loopback' " % passphrase
 if self.gpg_bin:
 cmd += "--define '%%__gpg %s' " % self.gpg_bin
 if self.gpg_path:
diff --git a/meta/lib/oeqa/selftest/signing.py 
b/meta/lib/oeqa/selftest/signing.py
index 70e8369876c..828dfccab42 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -27,7 +27,7 @@ class Signing(oeSelfTest):
 cls.pub_key_path = os.path.join(cls.testlayer_path, 'files', 
'signing', "key.pub")
 cls.secret_key_path = os.path.join(cls.testlayer_path, 'files', 
'signing', "key.secret")
 
-runCmd('gpg --homedir %s --import %s %s' % (cls.gpg_dir, 
cls.pub_key_path, cls.secret_key_path))
+runCmd('gpg --batch --homedir %s --import %s %s' % (cls.gpg_dir, 
cls.pub_key_path, cls.secret_key_path))
 
 @testcase(1362)
 def test_signing_packages(self):
@@ -73,13 +73,13 @@ class Signing(oeSelfTest):
 # Use a temporary rpmdb
 rpmdb = tempfile.mkdtemp(prefix='oeqa-rpmdb')
 
-runCmd('%s/rpm --define "_dbpath %s" --import %s' %
+runCmd('%s/rpmkeys --define "_dbpath %s" --import %s' %
(staging_bindir_native, rpmdb, self.pub_key_path))
 
-ret = runCmd('%s/rpm --define "_dbpath %s" --checksig %s' %
+ret = runCmd('%s/rpmkeys --define "_dbpath %s" --checksig %s' %
  (staging_bindir_native, rpmdb, pkg_deploy))
 # tmp/deploy/rpm/i586/ed-1.9-r0.i586.rpm: rsa sha1 md5 OK
-self.assertIn('rsa sha1 md5 OK', ret.output, 'Package signed 
incorrectly.')
+self.assertIn('rsa sha1 (md5) pgp md5 OK', ret.output, 'Package signed 
incorrectly.')
 shutil.rmtree(rpmdb)
 
 @testcase(1382)
-- 
2.11.0

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


[OE-core] [PATCHv2 22/39] scripts/rpm2cpio.sh: replace 5.x version with 4.x version

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 scripts/rpm2cpio.sh | 108 ++--
 1 file changed, 55 insertions(+), 53 deletions(-)

diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
index 5df8c0f7054..cf23472ba95 100755
--- a/scripts/rpm2cpio.sh
+++ b/scripts/rpm2cpio.sh
@@ -1,53 +1,55 @@
-#!/bin/sh
-
-# This comes from the RPM5 5.4.0 distribution.
-
-pkg=$1
-if [ "$pkg" = "" -o ! -e "$pkg" ]; then
-echo "no package supplied" 1>&2
-   exit 1
-fi
-
-leadsize=96
-o=`expr $leadsize + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "sig il: $il dl: $dl"
-
-sigsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
-set `od -j $o -N 8 -t u1 $pkg`
-il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
-dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
-# echo "hdr il: $il dl: $dl"
-
-hdrsize=`expr 8 + 16 \* $il + $dl`
-o=`expr $o + $hdrsize`
-EXTRACTOR="dd if=$pkg ibs=$o skip=1"
-
-COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
-if echo $COMPRESSION |grep -iq gzip; then
-   DECOMPRESSOR=gunzip
-elif echo $COMPRESSION |grep -iq bzip2; then
-   DECOMPRESSOR=bunzip2
-elif echo $COMPRESSION |grep -iq xz; then
-   DECOMPRESSOR=unxz
-elif echo $COMPRESSION |grep -iq cpio; then
-   DECOMPRESSOR=cat
-else
-   # Most versions of file don't support LZMA, therefore we assume
-   # anything not detected is LZMA
-   DECOMPRESSOR=`which unlzma 2>/dev/null`
-   case "$DECOMPRESSOR" in
-   /* ) ;;
-   *  ) DECOMPRESSOR=`which lzmash 2>/dev/null`
-case "$DECOMPRESSOR" in
-/* ) DECOMPRESSOR="lzmash -d -c" ;;
-*  ) DECOMPRESSOR=cat ;;
-esac
-;;
-   esac
-fi
-
-$EXTRACTOR 2>/dev/null | $DECOMPRESSOR
+#!/bin/sh -efu
+
+# This file comes from rpm 4.x distribution
+
+fatal() {
+   echo "$*" >&2
+   exit 1
+}
+
+pkg="$1"
+[ -n "$pkg" -a -e "$pkg" ] ||
+   fatal "No package supplied"
+
+_dd() {
+   local o="$1"; shift
+   dd if="$pkg" skip="$o" iflag=skip_bytes status=none $*
+}
+
+calcsize() {
+   offset=$(($1 + 8))
+
+   local i b b0 b1 b2 b3 b4 b5 b6 b7
+
+   i=0
+   while [ $i -lt 8 ]; do
+   b="$(_dd $(($offset + $i)) bs=1 count=1)"
+   [ -z "$b" ] &&
+   b="0" ||
+   b="$(exec printf '%u\n' "'$b")"
+   eval "b$i=\$b"
+   i=$(($i + 1))
+   done
+
+   rsize=$((8 + ((($b0 << 24) + ($b1 << 16) + ($b2 << 8) + $b3) << 4) + 
($b4 << 24) + ($b5 << 16) + ($b6 << 8) + $b7))
+   offset=$(($offset + $rsize))
+}
+
+case "$(_dd 0 bs=8 count=1)" in
+   "$(printf '\355\253\356\333')"*) ;; # '\xed\xab\xee\xdb'
+   *) fatal "File doesn't look like rpm: $pkg" ;;
+esac
+
+calcsize 96
+sigsize=$rsize
+
+calcsize $(($offset + (8 - ($sigsize % 8)) % 8))
+hdrsize=$rsize
+
+case "$(_dd $offset bs=3 count=1)" in
+   "$(printf '\102\132')"*) _dd $offset | bunzip2 ;; # '\x42\x5a'
+   "$(printf '\037\213')"*) _dd $offset | gunzip  ;; # '\x1f\x8b'
+   "$(printf '\375\067')"*) _dd $offset | xzcat   ;; # '\xfd\x37'
+   "$(printf '\135\000')"*) _dd $offset | unlzma  ;; # '\x5d\x00'
+   *) fatal "Unrecognized rpm file: $pkg" ;;
+esac
-- 
2.11.0

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


[OE-core] [PATCHv2 20/39] nativesdk-packagegroup-sdk-host: replace smartpm with dnf

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb | 2 +-
 meta/recipes-devtools/dnf/dnf_git.bb   | 1 -
 meta/recipes-devtools/libcomps/libcomps_git.bb | 2 +-
 meta/recipes-devtools/libdnf/libdnf_git.bb | 2 +-
 meta/recipes-devtools/librepo/librepo_git.bb   | 2 +-
 .../python-backports-lzma/python-backports-lzma_git.bb | 2 +-
 meta/recipes-devtools/python/python-iniparse_0.4.bb| 2 +-
 meta/recipes-devtools/python/python-pygpgme_0.3.bb | 2 +-
 meta/recipes-devtools/rpm/rpm_git.bb   | 2 +-
 meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb | 2 +-
 meta/recipes-support/gpgme/gpgme_1.8.0.bb  | 2 +-
 meta/recipes-support/libassuan/libassuan_2.4.3.bb  | 2 +-
 meta/recipes-support/libcheck/libcheck_0.10.0.bb   | 3 ++-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb 
b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
index 2c2abed33cd..3283e7370e8 100644
--- a/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
+++ b/meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
@@ -22,7 +22,7 @@ RDEPENDS_${PN} = "\
 nativesdk-automake \
 nativesdk-shadow \
 nativesdk-makedevs \
-nativesdk-smartpm \
+nativesdk-dnf \
 nativesdk-postinst-intercept \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', 
'', d)} \
 "
diff --git a/meta/recipes-devtools/dnf/dnf_git.bb 
b/meta/recipes-devtools/dnf/dnf_git.bb
index 82501a866bb..2a6acddd784 100644
--- a/meta/recipes-devtools/dnf/dnf_git.bb
+++ b/meta/recipes-devtools/dnf/dnf_git.bb
@@ -28,7 +28,6 @@ DEPENDS += "python-backports-lzma"
 EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 
 BBCLASSEXTEND = "native nativesdk"
-
 RDEPENDS_${PN}_class-target += "python-core python-codecs python-netclient 
python-email python-threading python-distutils librepo python-shell 
python-subprocess libcomps libdnf python-sqlite3 python-compression 
python-pygpgme python-backports-lzma python-rpm python-iniparse python-json 
python-importlib python-curses python-argparse"
 
 # Direct dnf-native to read rpm configuration from our sysroot, not the one it 
was compiled in
diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb 
b/meta/recipes-devtools/libcomps/libcomps_git.bb
index 448ea62f67c..8ff13b26b62 100644
--- a/meta/recipes-devtools/libcomps/libcomps_git.bb
+++ b/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -19,5 +19,5 @@ DEPENDS = "libxml2 expat libcheck"
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 OECMAKE_SOURCEPATH = "${S}/libcomps"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/libdnf/libdnf_git.bb 
b/meta/recipes-devtools/libdnf/libdnf_git.bb
index 6875401301e..7b1bf21199d 100644
--- a/meta/recipes-devtools/libdnf/libdnf_git.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_git.bb
@@ -32,5 +32,5 @@ DEPENDS += "python-native"
 
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} 
-DWITH_MAN=OFF"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git a/meta/recipes-devtools/librepo/librepo_git.bb 
b/meta/recipes-devtools/librepo/librepo_git.bb
index 70e88c47b9e..3f3c5fbcf51 100644
--- a/meta/recipes-devtools/librepo/librepo_git.bb
+++ b/meta/recipes-devtools/librepo/librepo_git.bb
@@ -20,5 +20,5 @@ inherit cmake distutils-base pkgconfig
 
 EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
diff --git 
a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb 
b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
index 6d3b8d569de..93c6684be6c 100644
--- a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
+++ b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
@@ -18,4 +18,4 @@ DEPENDS_append = " xz"
 RDEPENDS_${PN} += "python-core python-io python-pkgutil"
 RDEPENDS_${PN}_class-native += "python-core"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/python/python-iniparse_0.4.bb 
b/meta/recipes-devtools/python/python-iniparse_0.4.bb
index f2515759b13..c6d98c2fdfc 100644
--- a/meta/recipes-devtools/python/python-iniparse_0.4.bb
+++ b/meta/recipes-devtools/python/python-iniparse_0.4.bb
@@ -12,6 +12,6 @@ inherit distutils
 
 RDEPENDS_${PN} += "python-core"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
 S = "${WORKDIR}/iniparse-${PV}"
diff --git 

[OE-core] [PATCHv2 19/39] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags

2017-02-21 Thread Alexander Kanavin
Previously they were swapped, not sure why. Their meaning, as far as rpm
world goes, is different:

- Recommends is a soft dependency and will be installed by default; there is
an option not to do that.

- Suggests is a suggestion to be picked up and presented to end user by
package management tools; it has no special meaning otherwise.

OE packages use RRECOMMENDS, which should be mapped to Recommends rpm tag,
so that the packages will be picked up as dependencies.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 07eb974f736..480c6d58d39 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -450,10 +450,8 @@ python write_specfile () {
 if splitrpostrm:
 print_deps(splitrdepends, "Requires(postun)", 
spec_preamble_bottom, d)
 
-# Suggests in RPM are like recommends in OE-core!
-print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
-# While there is no analog for suggests... (So call them recommends 
for now)
-print_deps(splitrsuggests,  "Recommends", spec_preamble_bottom, d)
+print_deps(splitrrecommends, "Recommends", spec_preamble_bottom, d)
+print_deps(splitrsuggests,  "Suggests", spec_preamble_bottom, d)
 print_deps(splitrprovides,  "Provides", spec_preamble_bottom, d)
 print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
 
@@ -560,10 +558,8 @@ python write_specfile () {
 if srcrpostrm:
 print_deps(srcrdepends, "Requires(postun)", spec_preamble_top, d)
 
-# Suggests in RPM are like recommends in OE-core!
-print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
-# While there is no analog for suggests... (So call them recommends for 
now)
-print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
+print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
+print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
 print_deps(srcrprovides, "Provides", spec_preamble_top, d)
 print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
 
-- 
2.11.0

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


[OE-core] [PATCHv2 18/39] package_manager.py: improve the API for insert_feed_uris()

2017-02-21 Thread Alexander Kanavin
No need to store the configuration as class members,
just pass it directly into the method.

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/package_manager.py | 41 ++---
 meta/lib/oe/rootfs.py  |  5 -
 2 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 79f0a8b9f1b..725997ce334 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -513,9 +513,6 @@ class PackageManager(object, metaclass=ABCMeta):
 self.d = d
 self.deploy_dir = None
 self.deploy_lock = None
-self.feed_uris = self.d.getVar('PACKAGE_FEED_URIS') or ""
-self.feed_base_paths = self.d.getVar('PACKAGE_FEED_BASE_PATHS') or ""
-self.feed_archs = self.d.getVar('PACKAGE_FEED_ARCHS')
 
 """
 Update the package manager package database.
@@ -555,8 +552,14 @@ class PackageManager(object, metaclass=ABCMeta):
 def list_installed(self):
 pass
 
+"""
+Add remote package feeds into repository manager configuration. The 
parameters
+for the feeds are set by feed_uris, feed_base_paths and feed_archs.
+See 
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGE_FEED_URIS
+for their description.
+"""
 @abstractmethod
-def insert_feeds_uris(self):
+def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
 pass
 
 """
@@ -691,14 +694,14 @@ class RpmPM(PackageManager):
 
 self.ml_prefix_list, self.ml_os_list = 
self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
 
-def insert_feeds_uris(self):
-if self.feed_uris == "":
+def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+if feed_uris == "":
 return
 
 arch_list = []
-if self.feed_archs is not None:
+if feed_archs is not None:
 # User define feed architectures
-arch_list = self.feed_archs.split()
+arch_list = feed_archs.split()
 else:
 # List must be prefered to least preferred order
 default_platform_extra = list()
@@ -721,7 +724,7 @@ class RpmPM(PackageManager):
 continue
 arch_list.append(arch)
 
-feed_uris = self.construct_uris(self.feed_uris.split(), 
self.feed_base_paths.split())
+feed_uris = self.construct_uris(feed_uris.split(), 
feed_base_paths.split())
 
 uri_iterator = 0
 channel_priority = 10 + 5 * len(feed_uris) * (len(arch_list) if 
arch_list else 1)
@@ -1707,22 +1710,22 @@ class OpkgPM(OpkgDpkgPM):
 config_file.write("option info_dir %s\n" % 
os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info'))
 config_file.write("option status_file  %s\n" % 
os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status'))
 
-def insert_feeds_uris(self):
-if self.feed_uris == "":
+def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+if feed_uris == "":
 return
 
 rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf'
   % self.target_rootfs)
 
-feed_uris = self.construct_uris(self.feed_uris.split(), 
self.feed_base_paths.split())
-archs = self.pkg_archs.split() if self.feed_archs is None else 
self.feed_archs.split()
+feed_uris = self.construct_uris(feed_uris.split(), 
feed_base_paths.split())
+archs = self.pkg_archs.split() if feed_archs is None else 
feed_archs.split()
 
 with open(rootfs_config, "w+") as config_file:
 uri_iterator = 0
 for uri in feed_uris:
 if archs:
 for arch in archs:
-if (self.feed_archs is None) and (not 
os.path.exists(os.path.join(self.deploy_dir, arch))):
+if (feed_archs is None) and (not 
os.path.exists(os.path.join(self.deploy_dir, arch))):
 continue
 bb.note('Adding opkg feed url-%s-%d (%s)' %
 (arch, uri_iterator, uri))
@@ -2111,23 +2114,23 @@ class DpkgPM(OpkgDpkgPM):
 if result is not None:
 bb.fatal(result)
 
-def insert_feeds_uris(self):
-if self.feed_uris == "":
+def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs):
+if feed_uris == "":
 return
 
 sources_conf = os.path.join("%s/etc/apt/sources.list"
 % self.target_rootfs)
 arch_list = []
 
-if self.feed_archs is None:
+if feed_archs is None:
 for arch in self.all_arch_list:
 if not os.path.exists(os.path.join(self.deploy_dir, arch)):
 continue
 arch_list.append(arch)
 else:
-arch_list = 

[OE-core] [PATCHv2 25/39] package_rpm.bbclass: no need to specify the magic file location

2017-02-21 Thread Alexander Kanavin
It's handled by the rpm wrapper command, created in rpm recipe.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 27a2bb479a2..9b634e583b8 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -693,7 +693,6 @@ python do_package_rpm () {
 d.setVar('RPM_PKGWRITEDIR', pkgwritedir)
 bb.debug(1, 'PKGWRITEDIR: %s' % d.getVar('RPM_PKGWRITEDIR'))
 pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}${HOST_VENDOR}-${HOST_OS}')
-magicfile = 
d.expand('${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc')
 bb.utils.mkdirhier(pkgwritedir)
 os.chmod(pkgwritedir, 0o755)
 
@@ -711,7 +710,6 @@ python do_package_rpm () {
 cmd = cmd + " --define '__find_provides %{nil}'"
 cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
 cmd = cmd + " --define 'debug_package %{nil}'"
-cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
 cmd = cmd + " --define '_tmppath " + workdir + "'"
 if d.getVarFlag('ARCHIVER_MODE', 'srpm') == '1' and 
bb.data.inherits_class('archiver', d):
 cmd = cmd + " --define '_sourcedir " + d.getVar('ARCHIVER_OUTDIR') + 
"'"
-- 
2.11.0

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


[OE-core] [PATCHv2 27/39] package_rpm.bbclass: instruct rpm to not remove the buildroot directory

2017-02-21 Thread Alexander Kanavin
This is the ${W}/package directory which may be reused in subsequent builds.

Also clean up various default directories rpm 4 creates.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9b634e583b8..ff86dc87980 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -697,7 +697,7 @@ python do_package_rpm () {
 os.chmod(pkgwritedir, 0o755)
 
 cmd = rpmbuild
-cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " 
--buildroot " + pkgd
+cmd = cmd + " --noclean --nodeps --short-circuit --target " + pkgarch + " 
--buildroot " + pkgd
 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + 
pkgwritedir + "'"
 cmd = cmd + " --define '_builddir " + d.getVar('S') + "'"
 cmd = cmd + " --define '_build_name_fmt 
%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
@@ -721,8 +721,11 @@ python do_package_rpm () {
 bb.build.exec_func('SBUILDSPEC', d)
 cmd = cmd + " -bb " + outspecfile
 
+# rpm 4 creates various empty directories in _topdir, let's clean them up
+cleanupcmd = "rm -rf %s/BUILDROOT %s/SOURCES %s/SPECS %s/SRPMS" % 
(workdir, workdir, workdir, workdir)
+
 # Build the rpm package!
-d.setVar('BUILDSPEC', cmd + "\n")
+d.setVar('BUILDSPEC', cmd + "\n" + cleanupcmd + "\n")
 d.setVarFlag('BUILDSPEC', 'func', '1')
 bb.build.exec_func('BUILDSPEC', d)
 
-- 
2.11.0

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


[OE-core] [PATCHv2 16/39] db: remove the 6.x recipe

2017-02-21 Thread Alexander Kanavin
Version 6.x of Berkeley DB has been rejected by open source community due to 
its hostile
AGPLv3 license; both Fedora and Debian are sticking with db 5.x - and by 
extension,
all the open source projects are still developed and tested with db 5.x

In oe-core the only thing that was requiring db 6.x was rpm 5.x, and so there's 
no reason
to continue carrying db 6.x in oe-core. If someone needs API features that are 
only available in
db 6.x, it can be re-added to meta-oe.

Signed-off-by: Alexander Kanavin 
---
 meta/conf/distro/include/default-versions.inc  |   3 -
 ...Makefile-let-libdb-6.0.la-depend-os_map.l.patch |  29 --
 ...akefile-let-libso_target-depend-on-bt_rec.patch |  30 --
 meta/recipes-support/db/db_5.3.28.bb   |   1 +
 meta/recipes-support/db/db_6.0.35.bb   | 111 -
 5 files changed, 1 insertion(+), 173 deletions(-)
 delete mode 100644 
meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
 delete mode 100644 
meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
 delete mode 100644 meta/recipes-support/db/db_6.0.35.bb

diff --git a/meta/conf/distro/include/default-versions.inc 
b/meta/conf/distro/include/default-versions.inc
index cc8c533d4c0..d976508ff51 100644
--- a/meta/conf/distro/include/default-versions.inc
+++ b/meta/conf/distro/include/default-versions.inc
@@ -5,6 +5,3 @@
 # Force the older version of liberation-fonts until we fix the fontforge issue
 PREFERRED_VERSION_liberation-fonts ?= "1.04"
 
-# Force db-native's version to keep sync with db while
-# 'AGPL-3.0' in ${INCOMPATIBLE_LICENSE} blacklist
-PREFERRED_VERSION_db-native = "${@incompatible_license_contains('AGPL-3.0', 
'5.%', '6.%', d)}"
diff --git 
a/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch 
b/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
deleted file mode 100644
index 68a213136b6..000
--- a/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 2902dda6e3f7b2cd5796a96af20deece610e2eb9 Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Mon, 16 Nov 2015 22:20:49 -0800
-Subject: [PATCH] build_unix/Makefile: let libdb-6.0.la depend os_map.lo
-
-Fixed parallel issue:
-libtool: link: `os_map.lo' is not a valid libtool object
-Makefile:867: recipe for target 'libdb-6.0.la' failed
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang 

- dist/Makefile.in |2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: db-6.0.30/dist/Makefile.in
-===
 db-6.0.30.orig/dist/Makefile.in
-+++ db-6.0.30/dist/Makefile.in
-@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
-   $(LN) -s $(libdb_version) $(libdb)
- 
- # Shared C library.
--$(libso_target): $(C_OBJS) bt_rec@o@
-+$(libso_target): $(C_OBJS) bt_rec@o@ os_map@o@
-   $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
-   $(LIBCSO_LIBS)
-   $(RM) $(libdb)
diff --git 
a/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch 
b/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
deleted file mode 100644
index 86804083472..000
--- 
a/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c640ff9340f358a00835816d0fea03d27a7be978 Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Tue, 31 Mar 2015 00:56:44 -0700
-Subject: [PATCH] Makefile: let libso_target depend on bt_rec
-
-Fixed parallel issue:
-libtool: link: `bt_rec.lo' is not a valid libtool object
-Makefile:867: recipe for target 'libdb-6.0.la' failed
-make: *** [libdb-6.0.la] Error 1
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang 

- Makefile.in |2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: db-6.0.30/dist/Makefile.in
-===
 db-6.0.30.orig/dist/Makefile.in
-+++ db-6.0.30/dist/Makefile.in
-@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
-   $(LN) -s $(libdb_version) $(libdb)
- 
- # Shared C library.
--$(libso_target): $(C_OBJS)
-+$(libso_target): $(C_OBJS) bt_rec@o@
-   $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
-   $(LIBCSO_LIBS)
-   $(RM) $(libdb)
diff --git a/meta/recipes-support/db/db_5.3.28.bb 
b/meta/recipes-support/db/db_5.3.28.bb
index 0b51a1d4403..4f5aae60132 100644
--- a/meta/recipes-support/db/db_5.3.28.bb
+++ b/meta/recipes-support/db/db_5.3.28.bb
@@ -16,6 +16,7 @@ VIRTUAL_NAME ?= "virtual/db"
 RCONFLICTS_${PN} = "db3"
 
 PR = "r1"
+PE = "1"
 
 SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz;
 SRC_URI += "file://arm-thumb-mutex_db5.patch \
diff --git a/meta/recipes-support/db/db_6.0.35.bb 

[OE-core] [PATCHv2 17/39] package_rpm.bbclass: make architecture-independent .rpm packages "noarch" instead of "all"

2017-02-21 Thread Alexander Kanavin
Too many places in dnf/rpm4 stack make that assumption; let's not fight against 
it.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index db448ab8d1d..07eb974f736 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -684,7 +684,9 @@ python do_package_rpm () {
 rpmbuild = d.getVar('RPMBUILD')
 targetsys = d.getVar('TARGET_SYS')
 targetvendor = d.getVar('HOST_VENDOR')
-package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", "_")
+# Too many places in dnf stack assume that arch-independent packages are 
"noarch".
+# Let's not fight against this.
+package_arch = (d.getVar('PACKAGE_ARCH') or "").replace("-", 
"_").replace("all", "noarch")
 sdkpkgsuffix = (d.getVar('SDKPKGSUFFIX') or "nativesdk").replace("-", "_")
 if package_arch not in "all any noarch".split() and not 
package_arch.endswith(sdkpkgsuffix):
 ml_prefix = (d.getVar('MLPREFIX') or "").replace("-", "_")
-- 
2.11.0

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


[OE-core] [PATCHv2 24/39] package_rpm.bbclass: replace createrepo reference with createrepo_c

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 480c6d58d39..27a2bb479a2 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -763,6 +763,6 @@ do_package_write_rpm[depends] += 
"${@oe.utils.build_depends_string(d.getVar('PAC
 addtask package_write_rpm after do_packagedata do_package
 
 PACKAGEINDEXDEPS += "rpm-native:do_populate_sysroot"
-PACKAGEINDEXDEPS += "createrepo-native:do_populate_sysroot"
+PACKAGEINDEXDEPS += "createrepo-c-native:do_populate_sysroot"
 
 do_build[recrdeptask] += "do_package_write_rpm"
-- 
2.11.0

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


[OE-core] [PATCHv2 12/39] libcomps: add a recipe

2017-02-21 Thread Alexander Kanavin
libcomps is required by dnf.

Signed-off-by: Alexander Kanavin 
---
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 41 ++
 ...2-Set-library-installation-path-correctly.patch | 27 ++
 meta/recipes-devtools/libcomps/libcomps_git.bb | 23 
 3 files changed, 91 insertions(+)
 create mode 100644 
meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 
meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
 create mode 100644 meta/recipes-devtools/libcomps/libcomps_git.bb

diff --git 
a/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 
b/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 000..26e8b06f378
--- /dev/null
+++ 
b/meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,41 @@
+From ff4aae4c8beaf17cb8e7a3431f6c541eccfae244 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:22:09 +0200
+Subject: [PATCH 1/2] Do not set PYTHON_INSTALL_DIR by running python.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ libcomps/src/python/src/python2/CMakeLists.txt | 2 +-
+ libcomps/src/python/src/python3/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libcomps/src/python/src/python2/CMakeLists.txt 
b/libcomps/src/python/src/python2/CMakeLists.txt
+index 3ad9e18..0e7dd4b 100644
+--- a/libcomps/src/python/src/python2/CMakeLists.txt
 b/libcomps/src/python/src/python2/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ find_package (PythonLibs 2.6)
+ find_package (PythonInterp 2.6 REQUIRED)
+ 
+-execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ 
+ include_directories(${PYTHON_INCLUDE_PATH})
+ include_directories(${LIBCOMPS_INCLUDE_PATH})
+diff --git a/libcomps/src/python/src/python3/CMakeLists.txt 
b/libcomps/src/python/src/python3/CMakeLists.txt
+index 7fafa9f..ed82d3d 100644
+--- a/libcomps/src/python/src/python3/CMakeLists.txt
 b/libcomps/src/python/src/python3/CMakeLists.txt
+@@ -2,7 +2,7 @@ find_package (PythonLibs 3.0)
+ find_package (PythonInterp 3.0)
+ #add_custom_target(py3-copy)
+ 
+-execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ 
+ include_directories(${PYTHON_INCLUDE_PATH})
+ include_directories(${LIBCOMPS_INCLUDE_PATH})
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
 
b/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
new file mode 100644
index 000..ec1fdc409bf
--- /dev/null
+++ 
b/meta/recipes-devtools/libcomps/libcomps/0002-Set-library-installation-path-correctly.patch
@@ -0,0 +1,27 @@
+From b1f61296e2f16c2b9a39c5501e4538628ff01ab4 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:26:00 +0200
+Subject: [PATCH 2/2] Set library installation path correctly
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ libcomps/src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcomps/src/CMakeLists.txt b/libcomps/src/CMakeLists.txt
+index e553d77..e2eef9c 100644
+--- a/libcomps/src/CMakeLists.txt
 b/libcomps/src/CMakeLists.txt
+@@ -52,7 +52,7 @@ add_dependencies(libcomps src-copy)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-set (LIB_INST_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
++set (LIB_INST_DIR ${CMAKE_INSTALL_LIBDIR})
+ 
+ 
+ install (FILES ${libcomps_HEADERS} DESTINATION include/libcomps)
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/libcomps/libcomps_git.bb 
b/meta/recipes-devtools/libcomps/libcomps_git.bb
new file mode 100644
index 000..448ea62f67c
--- /dev/null
+++ b/meta/recipes-devtools/libcomps/libcomps_git.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Libcomps is alternative for yum.comps library (which is for 
managing rpm package groups)."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = 

[OE-core] [PATCHv2 15/39] python-smartpm: remove the recipe

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 ...m_sys-use-md5sum-instead-of-mtime-as-the-.patch |  38 --
 ...art-add-deugging-when-targetpath-is-empty.patch |  47 ---
 .../smart-add-for-rpm-ignoresize-check.patch   |  35 --
 .../smart-already-installed-message.patch  |  54 ---
 .../python/python-smartpm/smart-attempt-fix.patch  | 158 -
 .../python/python-smartpm/smart-attempt.patch  | 185 --
 ...cache.py-getPackages-matches-name-version.patch |  43 ---
 .../python-smartpm/smart-channel-remove-all.patch  |  33 --
 .../python/python-smartpm/smart-channelsdir.patch  |  24 --
 .../python/python-smartpm/smart-locale.patch   |  27 --
 .../python/python-smartpm/smart-recommends.patch   | 381 -
 .../smart-rpm-transaction-failure-check.patch  |  57 ---
 .../smart-set-noprogress-for-pycurl.patch  |  20 --
 .../smartpm-rpm5-support-check-signatures.patch| 112 --
 meta/recipes-devtools/python/python-smartpm_git.bb | 141 
 15 files changed, 1355 deletions(-)
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-already-installed-message.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-attempt-fix.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-attempt.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-cache.py-getPackages-matches-name-version.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-channel-remove-all.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-channelsdir.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-locale.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-rpm-transaction-failure-check.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
 delete mode 100644 
meta/recipes-devtools/python/python-smartpm/smartpm-rpm5-support-check-signatures.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm_git.bb

diff --git 
a/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
 
b/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
deleted file mode 100644
index 2f14a124efc..000
--- 
a/meta/recipes-devtools/python/python-smartpm/channels-rpm_sys-use-md5sum-instead-of-mtime-as-the-.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-channels/rpm_sys: use md5sum instead of mtime as the digest
-
-Use the internal getFileDigest() function (which defaults to md5) instead of
-mtime for getting the file digest. On some systems mtime proved to be
-unreliable because of delayed update. This caused smart to miss rpm db updates
-and thus get its understanding of installed packages out of sync.
-
-Upstream-Status: Pending
-
-Signed-off-by: Markus Lehtonen 

- smart/channels/rpm_sys.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/smart/channels/rpm_sys.py b/smart/channels/rpm_sys.py
-index b9fda27..6f1fe94 100644
 a/smart/channels/rpm_sys.py
-+++ b/smart/channels/rpm_sys.py
-@@ -22,6 +22,7 @@
- from smart.backends.rpm.header import RPMDBLoader
- from smart.backends.rpm.base import getTS, rpm_join_dbpath
- from smart.channel import PackageChannel
-+from smart.util.filetools import getFileDigest
- from smart import *
- import os
- 
-@@ -35,7 +36,7 @@ class RPMSysChannel(PackageChannel):
- dbdir = rpm_join_dbpath(sysconf.get("rpm-root", "/"),
- sysconf.get("rpm-dbpath", "var/lib/rpm"))
- path = os.path.join(dbdir, "Packages")
--digest = os.path.getmtime(path)
-+digest = getFileDigest(path)
- if digest == self._digest:
- return True
- self.removeLoaders()
--- 
-2.6.6
-
diff --git 
a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
 
b/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
deleted file mode 100644
index 5e80804bf42..000
--- 
a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 01e51afd03131947f8d74b9a23fdbc0078249499 Mon Sep 17 00:00:00 2001
-From: Mariano Lopez 
-Date: Wed, 3 Aug 2016 07:47:09 +
-Subject: [PATCH] fetcher.py: Add debugging when 

[OE-core] [PATCHv2 14/39] dnf: add a recipe

2017-02-21 Thread Alexander Kanavin
This is replacing Smart package manager, which is unsupported upstream, and has 
a growing
amount of issues (lack of python 3.x support in particular). We identified dnf 
as
the only feasible replacement.

Signed-off-by: Alexander Kanavin 
---
 ...Corretly-install-tmpfiles.d-configuration.patch | 21 ++
 ...hardcode-etc-and-systemd-unit-directories.patch | 29 +
 ...0001-Do-not-prepend-installroot-to-logdir.patch | 31 ++
 .../dnf/dnf/0028-Use-backports.lzma-not-lzma.patch | 30 ++
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 27 
 .../dnf/0030-Run-python-scripts-using-env.patch| 48 ++
 meta/recipes-devtools/dnf/dnf_git.bb   | 40 ++
 7 files changed, 226 insertions(+)
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0028-Use-backports.lzma-not-lzma.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 
meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch
 create mode 100644 meta/recipes-devtools/dnf/dnf_git.bb

diff --git 
a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
 
b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
new file mode 100644
index 000..c9df4589746
--- /dev/null
+++ 
b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch
@@ -0,0 +1,21 @@
+From 8ce181714640315d2dd37ee794acbb22063cd669 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 26 Jan 2017 16:36:20 +0200
+Subject: [PATCH] Corretly install tmpfiles.d configuration
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ etc/tmpfiles.d/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/etc/tmpfiles.d/CMakeLists.txt b/etc/tmpfiles.d/CMakeLists.txt
+index f69c773e..3eb6d0e8 100644
+--- a/etc/tmpfiles.d/CMakeLists.txt
 b/etc/tmpfiles.d/CMakeLists.txt
+@@ -1 +1 @@
+-INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/)
++INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/)
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
 
b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
new file mode 100644
index 000..0f261e5c5d6
--- /dev/null
+++ 
b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch
@@ -0,0 +1,29 @@
+From 4313ced1320594013795f11f6db00381e3f4cc45 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Thu, 26 Jan 2017 16:25:47 +0200
+Subject: [PATCH] Do not hardcode /etc and systemd unit directories
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6a319935..db20ccd4 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -7,8 +7,8 @@ if (NOT PYTHON_DESIRED)
+ set (PYTHON_DESIRED "2")
+ endif()
+ 
+-SET( SYSCONFDIR /etc)
+-SET( SYSTEMD_DIR /usr/lib/systemd/system)
++SET( SYSCONFDIR ${CMAKE_INSTALL_SYSCONFDIR})
++SET( SYSTEMD_DIR $ENV{systemd_system_unitdir})
+ 
+ if (${PYTHON_DESIRED} STREQUAL "2")
+   FIND_PACKAGE (PythonInterp REQUIRED)
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch 
b/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
new file mode 100644
index 000..a90e77cbf10
--- /dev/null
+++ 
b/meta/recipes-devtools/dnf/dnf/0001-Do-not-prepend-installroot-to-logdir.patch
@@ -0,0 +1,31 @@
+From 31653d324cf8c7b1f2f9e49d22676bd2ac546331 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Wed, 11 Jan 2017 15:10:13 +0200
+Subject: [PATCH] Do not prepend installroot to logdir.
+
+This would otherwise write the logs into rootfs/var/log
+(whereas we want them in $T),
+and will break installation of base-files rpm.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ dnf/cli/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py
+index b764801a..893f4bda 100644
+--- a/dnf/cli/cli.py
 b/dnf/cli/cli.py
+@@ -881,7 +881,7 @@ class Cli(object):
+ subst = conf.substitutions
+ 

[OE-core] [PATCHv2 11/39] librepo: add a recipe

2017-02-21 Thread Alexander Kanavin
librepo is needed by dnf and libdnf.

Signed-off-by: Alexander Kanavin 
---
 ...ly-set-the-library-installation-directory.patch | 28 +++
 ...to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch | 41 ++
 ...-race-when-deleting-temporary-directories.patch | 41 ++
 ...ariables-with-pkg-config-not-with-cmake-m.patch | 29 +++
 meta/recipes-devtools/librepo/librepo_git.bb   | 24 +
 5 files changed, 163 insertions(+)
 create mode 100644 
meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
 create mode 100644 
meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
 create mode 100644 
meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch
 create mode 100644 
meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch
 create mode 100644 meta/recipes-devtools/librepo/librepo_git.bb

diff --git 
a/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
 
b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
new file mode 100644
index 000..01fea40467e
--- /dev/null
+++ 
b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch
@@ -0,0 +1,28 @@
+From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:04:35 +0200
+Subject: [PATCH 1/4] Correctly set the library installation directory
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ librepo/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt
+index 2fe76d8..5026def 100644
+--- a/librepo/CMakeLists.txt
 b/librepo/CMakeLists.txt
+@@ -60,7 +60,8 @@ CONFIGURE_FILE("version.h.in" 
"${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+   SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+ 
+ INSTALL(FILES ${librepo_HEADERS} DESTINATION include/librepo)
+ INSTALL(TARGETS librepo LIBRARY DESTINATION ${LIB_INSTALL_DIR})
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
 
b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
new file mode 100644
index 000..7138dfce21d
--- /dev/null
+++ 
b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch
@@ -0,0 +1,41 @@
+From 1570ad33dd7e5d83f3ee80bd104b114709ac1e34 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:05:36 +0200
+Subject: [PATCH 2/4] Do not try to obtain PYTHON_INSTALL_DIR by running
+ python.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ librepo/python/python2/CMakeLists.txt | 2 +-
+ librepo/python/python3/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/librepo/python/python2/CMakeLists.txt 
b/librepo/python/python2/CMakeLists.txt
+index 3615e17..cffa99f 100644
+--- a/librepo/python/python2/CMakeLists.txt
 b/librepo/python/python2/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ FIND_PACKAGE (PythonLibs 2 )
+ FIND_PACKAGE (PythonInterp 2 REQUIRED)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from 
distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+ 
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+diff --git a/librepo/python/python3/CMakeLists.txt 
b/librepo/python/python3/CMakeLists.txt
+index dfecac9..38bcc72 100644
+--- a/librepo/python/python3/CMakeLists.txt
 b/librepo/python/python3/CMakeLists.txt
+@@ -10,7 +10,7 @@ message("--- ${PYTHON_INCLUDE_DIR}")
+ 
+ FIND_PACKAGE(PythonLibs 3.0)
+ FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from 
distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 

[OE-core] [PATCHv2 10/39] python-backports-lzma: add a recipe

2017-02-21 Thread Alexander Kanavin
It is needed by dnf, and only when using Python 2.x, so can
be dropped after moving dnf/rpm4 stack to Python 3.x.

Signed-off-by: Alexander Kanavin 
---
 ...-not-add-include-and-library-directories-.patch | 32 ++
 .../python-backports-lzma_git.bb   | 21 ++
 2 files changed, 53 insertions(+)
 create mode 100644 
meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
 create mode 100644 
meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb

diff --git 
a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
 
b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
new file mode 100644
index 000..0eb904a8a70
--- /dev/null
+++ 
b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma/0001-setup.py-do-not-add-include-and-library-directories-.patch
@@ -0,0 +1,32 @@
+From e5e3196cf69172b625c8c6ccca991c02fd18137c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:02:12 +0200
+Subject: [PATCH] setup.py: do not add include and library directories from the
+ host
+
+This avoids host contamination.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ setup.py | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 7886cf7..9a0356a 100644
+--- a/setup.py
 b/setup.py
+@@ -31,9 +31,7 @@ packages = ["backports", "backports.lzma"]
+ home = os.path.expanduser("~")
+ extens = [Extension('backports/lzma/_lzma',
+ ['backports/lzma/_lzmamodule.c'],
+-libraries = ['lzma'],
+-include_dirs = [os.path.join(home, 'include'), 
'/opt/local/include', '/usr/local/include'],
+-library_dirs = [os.path.join(home, 'lib'), 
'/opt/local/lib', '/usr/local/lib']
++libraries = ['lzma']
+ )]
+ 
+ descr = "Backport of Python 3.3's 'lzma' module for XZ/LZMA compressed files."
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb 
b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
new file mode 100644
index 000..6d3b8d569de
--- /dev/null
+++ b/meta/recipes-devtools/python-backports-lzma/python-backports-lzma_git.bb
@@ -0,0 +1,21 @@
+HOMEPAGE = "https://github.com/peterjc/backports.lzma;
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=846e05e7e9e1c886b2637c230cfcd5dd"
+
+SRC_URI = "git://github.com/peterjc/backports.lzma.git \
+   
file://0001-setup.py-do-not-add-include-and-library-directories-.patch \
+   "
+
+PV = "0.0.6+git${SRCPV}"
+SRCREV = "718b3316ae7aee8e03c02e7e110108779ce3aec8"
+
+S = "${WORKDIR}/git"
+
+inherit distutils
+
+DEPENDS_append = " xz"
+
+RDEPENDS_${PN} += "python-core python-io python-pkgutil"
+RDEPENDS_${PN}_class-native += "python-core"
+
+BBCLASSEXTEND = "native"
-- 
2.11.0

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


[OE-core] [PATCHv2 09/39] python-iniparse: add a recipe

2017-02-21 Thread Alexander Kanavin
python-iniparse is required by dnf.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/python/python-iniparse_0.4.bb | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python-iniparse_0.4.bb

diff --git a/meta/recipes-devtools/python/python-iniparse_0.4.bb 
b/meta/recipes-devtools/python/python-iniparse_0.4.bb
new file mode 100644
index 000..f2515759b13
--- /dev/null
+++ b/meta/recipes-devtools/python/python-iniparse_0.4.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Accessing and Modifying INI files"
+HOMEPAGE = "https://pypi.python.org/pypi/iniparse/;
+LICENSE = "MIT & PSF"
+LIC_FILES_CHKSUM = "file://LICENSE-PSF;md5=1c78a5bb3584b353496d5f6f34edb4b2 \
+file://LICENSE;md5=52f28065af11d69382693b45b5a8eb54"
+
+SRC_URI = 
"https://files.pythonhosted.org/packages/source/i/iniparse/iniparse-${PV}.tar.gz;
+SRC_URI[md5sum] = "5e573e9e9733d97623881ce9bbe5eca6"
+SRC_URI[sha256sum] = 
"abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054"
+
+inherit distutils
+
+RDEPENDS_${PN} += "python-core"
+
+BBCLASSEXTEND = "native"
+
+S = "${WORKDIR}/iniparse-${PV}"
-- 
2.11.0

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


[OE-core] [PATCHv2 08/39] python-pygpgme: add a recipe

2017-02-21 Thread Alexander Kanavin
python-pygpgme is required by dnf.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/python/python-pygpgme_0.3.bb | 18 ++
 1 file changed, 18 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python-pygpgme_0.3.bb

diff --git a/meta/recipes-devtools/python/python-pygpgme_0.3.bb 
b/meta/recipes-devtools/python/python-pygpgme_0.3.bb
new file mode 100644
index 000..f7dd835eee9
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygpgme_0.3.bb
@@ -0,0 +1,18 @@
+SUMMARY = "A Python module for working with OpenPGP messages"
+HOMEPAGE = "https://launchpad.net/pygpgme;
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://README;md5=2dc15a76acf01e126188c8de634ae4b3"
+
+SRC_URI = 
"https://launchpad.net/pygpgme/trunk/${PV}/+download/pygpgme-${PV}.tar.gz;
+SRC_URI[md5sum] = "d38355af73f0352cde3d410b25f34fd0"
+SRC_URI[sha256sum] = 
"5fd887c407015296a8fd3f4b867fe0fcca3179de97ccde90449853a3dfb802e1"
+
+S = "${WORKDIR}/pygpgme-${PV}"
+
+inherit distutils
+
+DEPENDS = "gpgme python"
+
+RDEPENDS_${PN} += "python-core"
+
+BBCLASSEXTEND = "native"
-- 
2.11.0

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


[OE-core] [PATCHv2 06/39] rpm: add a 4.x recipe

2017-02-21 Thread Alexander Kanavin
The dnf stack is written and tested against rpm 4.x. So if we want to use dnf 
for packaging,
we should also use rpm 4 - there's simply too much work involved in making rpm 
5 work with it due
to significant API differences, and supporting that going forward.

Signed-off-by: Alexander Kanavin 
---
 ...an-unsatisfiable-dependency-when-building.patch |  33 +++
 .../0001-Do-not-read-config-files-from-HOME.patch  |  38 
 ...t-the-PATH-environment-variable-before-ru.patch |  30 ++
 ...installing-execute-package-scriptlets-wit.patch |  37 
 ...alue-cannot-be-reset-issue-a-notice-inste.patch |  31 ++
 ...-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch |  72 ++
 meta/recipes-devtools/rpm/rpm_git.bb   | 104 +
 7 files changed, 345 insertions(+)
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-When-cross-installing-execute-package-scriptlets-wit.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0001-When-nice-value-cannot-be-reset-issue-a-notice-inste.patch
 create mode 100644 
meta/recipes-devtools/rpm/files/0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch
 create mode 100644 meta/recipes-devtools/rpm/rpm_git.bb

diff --git 
a/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
 
b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
new file mode 100644
index 000..80e2f0fad70
--- /dev/null
+++ 
b/meta/recipes-devtools/rpm/files/0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch
@@ -0,0 +1,33 @@
+From 87cfc0db1ed6fe381a5ed5f0016d8c3344a31a11 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Mon, 9 Jan 2017 18:52:11 +0200
+Subject: [PATCH] Do not add an unsatisfiable dependency when building rpms in
+ a short-circuited way.
+
+Upstream permits short-circuiting only for local testing; Yocto on the other
+hand produces rpms that way by design.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ build/pack.c | 4 
+ 1 file changed, 4 deletions(-)
+
+diff --git a/build/pack.c b/build/pack.c
+index 1261cdbba..bb2d6f4f6 100644
+--- a/build/pack.c
 b/build/pack.c
+@@ -595,10 +595,6 @@ rpmRC packageBinaries(rpmSpec spec, const char *cookie, 
int cheating)
+   headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
+   }
+ 
+-  if (cheating) {
+-  (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
+-  }
+-  
+   {   char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
+   char *binRpm, *binDir;
+   binRpm = headerFormat(pkg->header, binFormat, );
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch 
b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
new file mode 100644
index 000..96eb4189520
--- /dev/null
+++ 
b/meta/recipes-devtools/rpm/files/0001-Do-not-read-config-files-from-HOME.patch
@@ -0,0 +1,38 @@
+From 35381b6cd6c1b571bf7e6b0640de0f54dbf94386 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Tue, 10 Jan 2017 14:11:30 +0200
+Subject: [PATCH] Do not read config files from $HOME
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ lib/rpmrc.c | 6 ++
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c
+index 4ed991321..19fe80f98 100644
+--- a/lib/rpmrc.c
 b/lib/rpmrc.c
+@@ -458,8 +458,7 @@ static void setDefaults(void)
+ if (!defrcfiles) {
+   defrcfiles = rstrscat(NULL, confdir, "/rpmrc", ":",
+   confdir, "/" RPMCANONVENDOR "/rpmrc", ":",
+-  SYSCONFDIR "/rpmrc", ":",
+-  "~/.rpmrc", NULL);
++  SYSCONFDIR "/rpmrc", ":");
+ }
+ 
+ #ifndef MACROFILES
+@@ -471,8 +470,7 @@ static void setDefaults(void)
+   confdir, "/" RPMCANONVENDOR "/macros", ":",
+   SYSCONFDIR "/rpm/macros.*", ":",
+   SYSCONFDIR "/rpm/macros", ":",
+-  SYSCONFDIR "/rpm/%{_target}/macros", ":",
+-  "~/.rpmmacros", NULL);
++  SYSCONFDIR "/rpm/%{_target}/macros", ":");
+ }
+ #else
+ macrofiles = MACROFILES;
+-- 
+2.11.0
+
diff --git 

[OE-core] [PATCHv2 05/39] createrepo: remove the recipe

2017-02-21 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 .../createrepo/createrepo/createrepo-dbpath.patch  |  61 
 .../createrepo/createrepo/createrepo-rpm549.patch  |  22 ---
 ...dumpMetadata-disable-signature-validation.patch |  31 
 .../createrepo/createrepo/fix-native-install.patch | 163 -
 .../createrepo/createrepo/fixstat.patch|  19 ---
 ...n-scripts-should-use-interpreter-from-env.patch |  47 --
 .../createrepo/createrepo/recommends.patch |  71 -
 .../createrepo/createrepo/rpm-createsolvedb.py |  64 
 .../createrepo/createrepo_0.4.11.bb|  51 ---
 9 files changed, 529 deletions(-)
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/fix-native-install.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/fixstat.patch
 delete mode 100644 
meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
 delete mode 100644 meta/recipes-support/createrepo/createrepo/recommends.patch
 delete mode 100755 
meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
 delete mode 100644 meta/recipes-support/createrepo/createrepo_0.4.11.bb

diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch 
b/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
deleted file mode 100644
index 72755981a91..000
--- a/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-createrepo: Implement --dbpath command line option
-
---dbpath option allows to specify path to the directory
-with rpm database. By default createrepo uses or creates
-rpm database in /var/lib/rpm/
-
-Upstream-Status: Pending
-
-Signed-off-by: Ed Bartosh 
-
 createrepo-0.4.11.orig/genpkgmetadata.py 2015-03-30 22:18:19.90400 
+0300
-+++ createrepo-0.4.11/genpkgmetadata.py 2015-03-30 22:28:49.20800 +0300
-@@ -65,6 +65,7 @@
-  -p, --pretty = output xml files in pretty format.
-  --update = update existing metadata (if present)
-  -d, --database = generate the sqlite databases.
-+ --dbpath  = specify path to rpm db directory.
- """)
- 
- sys.exit(retval)
-@@ -72,10 +73,13 @@
- class MetaDataGenerator:
- def __init__(self, cmds):
- self.cmds = cmds
--self.ts = rpm.TransactionSet()
- self.pkgcount = 0
- self.files = []
- 
-+if self.cmds['dbpath']:
-+rpm.addMacro("_dbpath", self.cmds['dbpath'])
-+self.ts = rpm.TransactionSet()
-+
- def _os_path_walk(self, top, func, arg):
- """Directory tree walk with callback function.
-  copy of os.path.walk, fixes the link/stating problem
-@@ -435,6 +439,7 @@
- cmds['dir-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*']
- cmds['skip-symlinks'] = False
- cmds['pkglist'] = []
-+cmds['dbpath'] = None
- 
- try:
- gopts, argsleft = getopt.getopt(args, 'phqVvndg:s:x:u:c:o:CSi:', 
['help', 'exclude=',
-@@ -442,7 +447,7 @@
-   'baseurl=', 
'groupfile=', 'checksum=',
-   'version', 
'pretty', 'split', 'outputdir=',
-   'noepoch', 
'checkts', 'database', 'update',
--  
'skip-symlinks', 'pkglist='])
-+  
'skip-symlinks', 'pkglist=', 'dbpath='])
- except getopt.error, e:
- errorprint(_('Options Error: %s.') % e)
- usage()
-@@ -516,6 +521,8 @@
- cmds['skip-symlinks'] = True
- elif arg in ['-i', '--pkglist']:
- cmds['pkglist'] = a
-+elif arg == '--dbpath':
-+cmds['dbpath'] = os.path.realpath(a)
- 
- except ValueError, e:
- errorprint(_('Options Error: %s') % e)
diff --git a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch 
b/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
deleted file mode 100644
index bc7200d0722..000
--- a/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-dumpMetadata.py: Fix for RPM5 - 5.4.9 integration
-
-RPM5 no longer has a switch to disable signature validation.  (Due to security
-validation concerns.)
-
-Upstream-Status: Inappropriate [other]
-  createrepo does not support RPM5 upstream
-
-Signed-off-by: Mark Hatle 
-
-diff -u 

[OE-core] [PATCHv2 04/39] createrepo-c: add a recipe

2017-02-21 Thread Alexander Kanavin
This is the current C reimplementation/replacement of the original createrepo.
https://github.com/rpm-software-management/createrepo_c/wiki

Signed-off-by: Alexander Kanavin 
---
 ...0001-Correctly-install-the-shared-library.patch | 28 +++
 ...-set-PYTHON_INSTALL_DIR-by-running-python.patch | 27 +++
 .../createrepo-c/createrepo-c_git.bb   | 31 ++
 3 files changed, 86 insertions(+)
 create mode 100644 
meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
 create mode 100644 
meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 create mode 100644 meta/recipes-devtools/createrepo-c/createrepo-c_git.bb

diff --git 
a/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
 
b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
new file mode 100644
index 000..01271246a22
--- /dev/null
+++ 
b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
@@ -0,0 +1,28 @@
+From fef835e1fdedc72c97d9c3e5704302e56e1bdef0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Mon, 2 Jan 2017 17:23:59 +0200
+Subject: [PATCH] Correctly install the shared library
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin 
+---
+ src/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index f3635e8..46dc037 100644
+--- a/src/CMakeLists.txt
 b/src/CMakeLists.txt
+@@ -110,7 +110,8 @@ CONFIGURE_FILE("deltarpms.h.in" 
"${CMAKE_CURRENT_SOURCE_DIR}/deltarpms.h" @ONLY)
+ IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+ SET (LIB_SUFFIX "64")
+ ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
+-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
++SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
+ 
+ INSTALL(FILES ${headers} DESTINATION "include/createrepo_c")
+ INSTALL(FILES "createrepo_c.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+-- 
+2.11.0
+
diff --git 
a/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
 
b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 000..9531070937c
--- /dev/null
+++ 
b/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,27 @@
+From bef487b5c2515062c5dd73c21082ce42f69aa717 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin 
+Date: Fri, 30 Dec 2016 18:31:02 +0200
+Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin 
+---
+ src/python/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
+index 9f1ac64..eae0cbb 100644
+--- a/src/python/CMakeLists.txt
 b/src/python/CMakeLists.txt
+@@ -19,7 +19,7 @@ else()
+ FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+ endif()
+ 
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from 
distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; 
from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" 
OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+ 
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb 
b/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
new file mode 100644
index 000..1e69067eebf
--- /dev/null
+++ b/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "C implementation of createrepo."
+HOMEPAGE = "https://github.com/rpm-software-management/createrepo_c/wiki;
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
+   file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+   file://0001-Correctly-install-the-shared-library.patch \
+   "
+
+PV = "0.10.0+git${SRCPV}"
+SRCREV = "748891ff8ee524c2d37926c608cd2794f88013f3"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm"
+DEPENDS_append_class-native = " file-replacement-native"
+
+inherit cmake pkgconfig bash-completion distutils-base
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"

[OE-core] [PATCHv2 00/39] Replace Smart package manager with DNF package manager

2017-02-21 Thread Alexander Kanavin
This patchset replaces the outdated, unsupported Smart package manager with
DNF package manager (Fedora's successor to yum). This is not a trivial change
and there are many consequences:

- DNF is API incompatible with rpm5; therefore rpm5 is replaced with rpm4.

- There are various non-default features that aren't yet supported or tested:
such as signing packages and repositories, RPM_PREFER_ELF_ARCH and possibly 
others

- db 6.x is removed from oe-core; db 5.x is replacing it

- Although I did my very best to test this patchset locally, 
the whole thing may break down in surprising ways. I would appreaciate all the 
help
you can provide here. The patchset touches many things in many places and has
more than the usual share of side effects.

Please see specific commits for further information and explanations. There is 
also
a longer email explaining user-visible changes and rationale behind them in
http://lists.openembedded.org/pipermail/openembedded-architecture/2017-February/000419.html
(note that section 6 in that email is no longer valid.

Changes in version 2 of the patchset:

- addressed review comments received for the first version of the pachset;
in particular the controversial pkg_postinst changes are removed (but they'll
be back as a separate change). Please check that I didn't forget anything.

- rpm package signing with gpg is now fixed, and should be working

The following changes since commit e436a6398684d2872cb541f1cfb0f67b3618d15a:

  layer.conf: bump version for change in eSDK selftest behaviour (2017-02-19 
09:39:03 -0800)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib akanavin/dnf-rpm4
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4

Alexander Kanavin (37):
  package.bbclass: fix locations of debugedit and rpmdeps utilities
  libsolv: enable rpm support
  rpmresolve: remove the recipe
  createrepo-c: add a recipe
  createrepo: remove the recipe
  rpm: add a 4.x recipe
  rpm: remove 5.x recipe
  python-pygpgme: add a recipe
  python-iniparse: add a recipe
  python-backports-lzma: add a recipe
  librepo: add a recipe
  libcomps: add a recipe
  libdnf: add a recipe
  dnf: add a recipe
  python-smartpm: remove the recipe
  db: remove the 6.x recipe
  package_rpm.bbclass: make architecture-independent .rpm packages
"noarch" instead of "all"
  package_manager.py: improve the API for insert_feed_uris()
  package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm
tags
  nativesdk-packagegroup-sdk-host: replace smartpm with dnf
  rootfs_rpm.bbclass: migrate image creation to dnf
  scripts/rpm2cpio.sh: replace 5.x version with 4.x version
  scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c
  package_rpm.bbclass: replace createrepo reference with createrepo_c
  package_rpm.bbclass: no need to specify the magic file location
  testimage.bbclass: fix runtime test for rpm, port smart tests to dnf
  package_rpm.bbclass: instruct rpm to not remove the buildroot
directory
  selftest: do not perform a full build in test_continue
  selftest: update output checks in incremental image test to match what
dnf prints
  selftest: allow bitbake to fail in test_options_warnqa_errorqa_switch
  ossp-uuid: remove the recipe
  byacc: remove the recipe
  gpg_sign.py: fix signing of rpm files using gpg
  oe-selftest: no need to parse gpg output to determine the name of the
signing key
  run-postinsts: simplify the logic of whether to install it to images
  package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
  security_flags.inc: update to reflect smart->dnf transition

Markus Lehtonen (2):
  lib/oe/gpg_sign: make gpg version a property of the signer
  gpg_sign.py: fix rpm signing with gpg > 2.1

 .../recipes-test/images/oe-selftest-image.bb   |2 +-
 .../recipes-test/images/wic-image-minimal.bb   |2 +-
 meta/classes/image.bbclass |2 +-
 meta/classes/package.bbclass   |4 +-
 meta/classes/package_rpm.bbclass   |   29 +-
 meta/classes/rootfs_deb.bbclass|1 -
 meta/classes/rootfs_ipk.bbclass|1 -
 meta/classes/rootfs_rpm.bbclass|   22 +-
 meta/classes/testimage.bbclass |   21 +-
 meta/conf/distro/include/default-versions.inc  |3 -
 meta/conf/distro/include/security_flags.inc|5 +-
 meta/lib/oe/gpg_sign.py|   17 +-
 meta/lib/oe/manifest.py|2 +-
 meta/lib/oe/package_manager.py | 1218 
 meta/lib/oe/rootfs.py  |   23 +-
 meta/lib/oe/sdk.py |7 +-
 meta/lib/oeqa/oetest.py|7 -
 meta/lib/oeqa/runtime/cases/dnf.py |  112 ++
 meta/lib/oeqa/runtime/cases/parselogs.py   |1 +
 

[OE-core] [PATCHv2 01/39] package.bbclass: fix locations of debugedit and rpmdeps utilities

2017-02-21 Thread Alexander Kanavin
rpm4 installs them in different locations than rpm5. This also replaces
our custom rpmdeps-oecore with standard rpmdeps; I'm not seeing a
significant performance penalty.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/package.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index ac2d71cfa44..17029451e36 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -345,7 +345,7 @@ def splitdebuginfo(file, debugfile, debugsrcdir, 
sourcefile, d):
 
 dvar = d.getVar('PKGD')
 objcopy = d.getVar("OBJCOPY")
-debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
+debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/debugedit")
 
 # We ignore kernel modules, we don't generate debug info files.
 if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -1436,7 +1436,7 @@ if [ x"$D" = "x" ]; then
 fi
 }
 
-RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps-oecore --macros 
${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path 
${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt 
${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt"
+RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/rpmdeps --macros 
${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path 
${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt 
${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt"
 
 # Collect perfile run-time dependency metadata
 # Output:
-- 
2.11.0

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


  1   2   >