[OE-core] [PATCH] libsolv: split libsolvext into it's own pkg-config

2017-01-27 Thread Alejandro del Castillo
Opkg only depends on libsolv proper, splitting libsolv-ext pkg-config
reduces opkg dependencies.

Signed-off-by: Alejandro del Castillo 
---
 ...-libsolvext-into-it-s-own-pkg-config-file.patch | 67 ++
 meta/recipes-extended/libsolv/libsolv_0.6.24.bb|  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 
meta/recipes-extended/libsolv/libsolv/0001-Split-libsolvext-into-it-s-own-pkg-config-file.patch

diff --git 
a/meta/recipes-extended/libsolv/libsolv/0001-Split-libsolvext-into-it-s-own-pkg-config-file.patch
 
b/meta/recipes-extended/libsolv/libsolv/0001-Split-libsolvext-into-it-s-own-pkg-config-file.patch
new file mode 100644
index 000..9d9b234
--- /dev/null
+++ 
b/meta/recipes-extended/libsolv/libsolv/0001-Split-libsolvext-into-it-s-own-pkg-config-file.patch
@@ -0,0 +1,67 @@
+From 0830ceffb32bdf61dab2a598b9e77f65d089074f Mon Sep 17 00:00:00 2001
+From: Alejandro del Castillo 
+Date: Fri, 27 Jan 2017 16:10:14 -0600
+Subject: [PATCH] Split libsolvext into it's own pkg-config file
+
+Upstream-Status: Submitted (https://github.com/openSUSE/libsolv/pull/177)
+
+Signed-off-by: Alejandro del Castillo 
+---
+ CMakeLists.txt| 4 +++-
+ libsolv.pc.in | 4 ++--
+ libsolv.pc.in => libsolvext.pc.in | 4 ++--
+ 3 files changed, 7 insertions(+), 5 deletions(-)
+ copy libsolv.pc.in => libsolvext.pc.in (62%)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 82034e0..0777ed9 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -384,9 +384,11 @@ MACRO (SPECFILE)
+ ENDMACRO (SPECFILE)
+ 
+ MACRO (PCFILE)
+-  MESSAGE (STATUS "Writing pkg-config file...")
++  MESSAGE (STATUS "Writing pkg-config files...")
+   CONFIGURE_FILE (${CMAKE_SOURCE_DIR}/libsolv.pc.in 
${CMAKE_BINARY_DIR}/libsolv.pc @ONLY)
+   INSTALL( FILES ${CMAKE_BINARY_DIR}/libsolv.pc DESTINATION 
${LIB_INSTALL_DIR}/pkgconfig )
++  CONFIGURE_FILE (${CMAKE_SOURCE_DIR}/libsolvext.pc.in 
${CMAKE_BINARY_DIR}/libsolvext.pc @ONLY)
++  INSTALL( FILES ${CMAKE_BINARY_DIR}/libsolvext.pc DESTINATION 
${LIB_INSTALL_DIR}/pkgconfig )
+ ENDMACRO (PCFILE)
+ 
+ SPECFILE ()
+diff --git a/libsolv.pc.in b/libsolv.pc.in
+index c82dfc4..40a8623 100644
+--- a/libsolv.pc.in
 b/libsolv.pc.in
+@@ -2,7 +2,7 @@ libdir=@LIB_INSTALL_DIR@
+ includedir=@INCLUDE_INSTALL_DIR@
+ 
+ Name: libsolv
+-Description: Library for solving packages and reading repositories
++Description: Library for solving packages
+ Version: @VERSION@
+-Libs: -L${libdir} -lsolvext -lsolv
++Libs: -L${libdir} -lsolv
+ Cflags: -I${includedir}
+diff --git a/libsolv.pc.in b/libsolvext.pc.in
+similarity index 62%
+copy from libsolv.pc.in
+copy to libsolvext.pc.in
+index c82dfc4..6395f39 100644
+--- a/libsolv.pc.in
 b/libsolvext.pc.in
+@@ -1,8 +1,8 @@
+ libdir=@LIB_INSTALL_DIR@
+ includedir=@INCLUDE_INSTALL_DIR@
+ 
+-Name: libsolv
+-Description: Library for solving packages and reading repositories
++Name: libsolvext
++Description: Library for reading repositories
+ Version: @VERSION@
+ Libs: -L${libdir} -lsolvext -lsolv
+ Cflags: -I${includedir}
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/libsolv/libsolv_0.6.24.bb 
b/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
index a5d7b5a..6de38b5 100644
--- a/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
+++ b/meta/recipes-extended/libsolv/libsolv_0.6.24.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
 DEPENDS = "expat zlib"
 
 SRC_URI = "git://github.com/openSUSE/libsolv.git \
+   file://0001-Split-libsolvext-into-it-s-own-pkg-config-file.patch \
   "
 SRC_URI_append_libc-musl = " 
file://0001-Add-fallback-fopencookie-implementation.patch"
 
-- 
2.7.4

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


[OE-core] [PATCH 1/2] bitbake.conf: replace USE_LDCONFIG with new "ldconfig" distro feature

2017-01-27 Thread Andre McCurdy
USE_LDCONFIG could previously be set to 0 by distros which do not
require ldconfig or ld.so.conf on the target. Since more and more
recipes may need to respect that option, replace the ad-hoc variable
with a distro feature.

Distros which previously set:

  USE_LDCONFIG = "0"

Should now instead use:

  DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig"

Signed-off-by: Andre McCurdy 
---
 meta/classes/package.bbclass  | 5 +
 meta/conf/bitbake.conf| 2 +-
 meta/recipes-core/glibc/glibc-package.inc | 9 +++--
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index ac2d71c..d5c2d82 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1618,10 +1618,7 @@ python package_do_shlibs() {
 else:
 snap_symlinks = False
 
-if (d.getVar('USE_LDCONFIG') or "1") == "1":
-use_ldconfig = True
-else:
-use_ldconfig = False
+use_ldconfig = bb.utils.contains('DISTRO_FEATURES', 'ldconfig', True, 
False, d)
 
 needed = {}
 shlib_provider = oe.package.read_shlib_providers(d)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e421650..01fd144 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -769,7 +769,7 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
 EXTRA_IMAGE_FEATURES ??= ""
 IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
 
-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 
gobject-introspection-data"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 
gobject-introspection-data ldconfig"
 MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
 
 COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 
'MACHINE_FEATURES', d)}"
diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 481a00e..bb8dc2d 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -14,9 +14,6 @@ python __anonymous () {
d.getVar('TARGET_OS'))
 }
 
-# Set this to zero if you don't want ldconfig in the output package
-USE_LDCONFIG ?= "1"
-
 INHIBIT_SYSROOT_STRIP = "1"
 
 PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils 
glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile 
libsotruss ${PN} glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
@@ -37,7 +34,7 @@ libc_baselibs = "${base_libdir}/libcrypt*.so.* 
${base_libdir}/libcrypt-*.so ${ba
 libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1"
 INSANE_SKIP_${PN}_append_aarch64 = " libdir"
 
-FILES_${PN} = "${libc_baselibs} ${libexecdir}/* 
${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig 
${sysconfdir}/ld.so.conf', '', d)}"
+FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${base_sbindir}/ldconfig 
${sysconfdir}/ld.so.conf"
 FILES_ldd = "${bindir}/ldd"
 FILES_libsegfault = "${base_libdir}/libSegFault*"
 FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
@@ -96,8 +93,8 @@ do_install_append () {
rm -f ${D}${infodir}/dir
fi
 
-   if [ "${USE_LDCONFIG}" != "1" ]; then
-   # We won't ship these files (see FILES above) so let's not 
install them
+   if ! ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'true', 
'false', d)}; then
+   # The distro doesn't want these files so let's not install them
rm -f ${D}${sysconfdir}/ld.so.conf
rm -f ${D}${base_sbindir}/ldconfig
# This directory will be empty now so remove it too.
-- 
1.9.1

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


[OE-core] [PATCH 2/2] systemd: check "ldconfig" distro feature when setting PACKAGECONFIG

2017-01-27 Thread Andre McCurdy
Avoid trying to call ldconfig at run-time in distros which don't
provide ldconfig on the target.

Signed-off-by: Andre McCurdy 
---
 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..2b52227 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -40,7 +40,7 @@ SRC_URI_append_libc-uclibc = "\
 SRC_URI_append_qemuall = " 
file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
 
 PACKAGECONFIG ??= "xz \
-   ldconfig \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 
'ldconfig', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', 
d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', 
'', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 
'selinux', '', d)} \
-- 
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] replace USE_LDCONFIG with ldconfig distro feature

2017-01-27 Thread Andre McCurdy
Andre McCurdy (2):
  bitbake.conf: replace USE_LDCONFIG with new "ldconfig" distro feature
  systemd: check "ldconfig" distro feature when setting PACKAGECONFIG

 meta/classes/package.bbclass  | 5 +
 meta/conf/bitbake.conf| 2 +-
 meta/recipes-core/glibc/glibc-package.inc | 9 +++--
 meta/recipes-core/systemd/systemd_232.bb  | 2 +-
 4 files changed, 6 insertions(+), 12 deletions(-)

-- 
1.9.1

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


[OE-core] ✗ patchtest: failure for Fix for #10835 - WIC should not rely on hddimg creation for finding all needed artifacts (rev3)

2017-01-27 Thread Patchwork
== Series Details ==

Series: Fix for #10835 - WIC should not rely on hddimg creation for finding all 
needed artifacts (rev3)
Revision: 3
URL   : https://patchwork.openembedded.org/series/4802/
State : failure

== Summary ==


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



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



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

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


[OE-core] [PATCH v3 08/11] selftest: wic: fix test_iso_image test case

2017-01-27 Thread Ed Bartosh
Added "iso" to IMAGE_FSTYPES to build iso artifacts required
to fix test of isoimage-isohybrid wic plugin.

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

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index dce83ba..6a6b54c 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -42,7 +42,8 @@ class Wic(oeSelfTest):
 
 def setUpLocal(self):
 """This code is executed before each test method."""
-self.write_config('MACHINE_FEATURES_append = " efi"\n')
+self.write_config('IMAGE_FSTYPES = "iso"\n'
+  'MACHINE_FEATURES_append = " efi"\n')
 
 # Do this here instead of in setUpClass as the base setUp does some
 # clean up which can result in the native tools built earlier in
-- 
2.1.4

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


[OE-core] [PATCH v3 07/11] selftest: stop using hddimg in the wic test suite

2017-01-27 Thread Ed Bartosh
Removed hddimg from IMAGE_FEATURES as wic code doesn't
use hddimg anymore.

[YOCTO #10835]

Signed-off-by: Ed Bartosh 
---
 meta/lib/oeqa/selftest/wic.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index da68e25..dce83ba 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -42,8 +42,7 @@ class Wic(oeSelfTest):
 
 def setUpLocal(self):
 """This code is executed before each test method."""
-self.write_config('IMAGE_FSTYPES += " hddimg"\n'
-  'MACHINE_FEATURES_append = " efi"\n')
+self.write_config('MACHINE_FEATURES_append = " efi"\n')
 
 # Do this here instead of in setUpClass as the base setUp does some
 # clean up which can result in the native tools built earlier in
-- 
2.1.4

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


[OE-core] [PATCH v3 05/11] wic: Look for image artifacts in a common location

2017-01-27 Thread Ed Bartosh
From: Tom Zanussi 

Rather than have each image type look for artifacts in image-specific
locations, move towards having them look for artifacts in a common
location, in this case DEPLOY_DIR_IMAGE

Use the existing deploy.bbclass to have the bootloaders put their binaries
in DEPLOY_DIR_IMAGE and then wic will find them and place them in the image

Signed-off-by: Alejandro Hernandez 
Signed-off-by: Tom Zanussi 
Signed-off-by: Saul Wold 
Signed-off-by: Ed Bartosh 
---
 meta/lib/oeqa/selftest/wic.py  |  4 +--
 scripts/lib/wic/plugins/source/bootimg-efi.py  | 39 --
 .../lib/wic/plugins/source/isoimage-isohybrid.py   | 18 +++---
 3 files changed, 45 insertions(+), 16 deletions(-)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index ebbb280..da68e25 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -372,8 +372,8 @@ class Wic(oeSelfTest):
 
 wicvars = set(get_bb_var('WICVARS', image).split())
 # filter out optional variables
-wicvars = wicvars.difference(('IMAGE_BOOT_FILES', 'INITRD',
-  'INITRD_LIVE', 'ISODIR'))
+wicvars = wicvars.difference(('DEPLOY_DIR_IMAGE', 'IMAGE_BOOT_FILES',
+  'INITRD', 'INITRD_LIVE', 'ISODIR'))
 with open(path) as envfile:
 content = dict(line.split("=", 1) for line in envfile)
 # test if variables used by wic present in the .env file
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index 305e910..74a1557 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -42,7 +42,7 @@ class BootimgEFIPlugin(SourcePlugin):
 name = 'bootimg-efi'
 
 @classmethod
-def do_configure_grubefi(cls, hdddir, creator, cr_workdir):
+def do_configure_grubefi(cls, hdddir, creator, cr_workdir, source_params):
 """
 Create loader-specific (grub-efi) config
 """
@@ -82,7 +82,7 @@ class BootimgEFIPlugin(SourcePlugin):
 cfg.close()
 
 @classmethod
-def do_configure_systemdboot(cls, hdddir, creator, cr_workdir):
+def do_configure_systemdboot(cls, hdddir, creator, cr_workdir, 
source_params):
 """
 Create loader-specific systemd-boot/gummiboot config
 """
@@ -98,6 +98,19 @@ class BootimgEFIPlugin(SourcePlugin):
 loader_conf += "default boot\n"
 loader_conf += "timeout %d\n" % bootloader.timeout
 
+initrd = source_params.get('initrd')
+
+if initrd:
+# obviously we need to have a common common deploy var
+bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+if not bootimg_dir:
+msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
+
+cp_cmd = "cp %s/%s %s" % (bootimg_dir, initrd, hdddir)
+exec_cmd(cp_cmd, True)
+else:
+msger.debug("Ignoring missing initrd")
+
 msger.debug("Writing systemd-boot config 
%s/hdd/boot/loader/loader.conf" \
 % cr_workdir)
 cfg = open("%s/hdd/boot/loader/loader.conf" % cr_workdir, "w")
@@ -127,6 +140,9 @@ class BootimgEFIPlugin(SourcePlugin):
 boot_conf += "options LABEL=Boot root=%s %s\n" % \
  (creator.rootdev, bootloader.append)
 
+if initrd:
+boot_conf += "initrd /%s\n" % initrd
+
 msger.debug("Writing systemd-boot config 
%s/hdd/boot/loader/entries/boot.conf" \
 % cr_workdir)
 cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w")
@@ -148,9 +164,9 @@ class BootimgEFIPlugin(SourcePlugin):
 
 try:
 if source_params['loader'] == 'grub-efi':
-cls.do_configure_grubefi(hdddir, creator, cr_workdir)
+cls.do_configure_grubefi(hdddir, creator, cr_workdir, 
source_params)
 elif source_params['loader'] == 'systemd-boot':
-cls.do_configure_systemdboot(hdddir, creator, cr_workdir)
+cls.do_configure_systemdboot(hdddir, creator, cr_workdir, 
source_params)
 else:
 msger.error("unrecognized bootimg-efi loader: %s" % 
source_params['loader'])
 except KeyError:
@@ -167,9 +183,9 @@ class BootimgEFIPlugin(SourcePlugin):
 In this case, prepare content for an EFI (grub) boot partition.
 """
 if not bootimg_dir:
-bootimg_dir = get_bitbake_var("HDDDIR")
+bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
 if not bootimg_dir:
-msger.error("Couldn't find HDDDIR, exiting\n")
+ msger.error("Couldn't find DEPLOY_DIR_IMAGE, 

[OE-core] [PATCH v3 09/11] grub-efi.bbclass: use 'grub-efi-' prefix

2017-01-27 Thread Ed Bartosh
grub-efi recipe added 'grub-efi-' prefix to the file name of
efi binary. Changed grub-efi.bbclass accordingly.

Signed-off-by: Ed Bartosh 
---
 meta/classes/grub-efi.bbclass | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 3dc9146..8adda09 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -40,13 +40,15 @@ efi_populate() {
 
install -d ${DEST}${EFIDIR}
 
-   GRUB_IMAGE="bootia32.efi"
+   GRUB_IMAGE="grub-efi-bootia32.efi"
+   DEST_IMAGE="bootia32.efi"
if [ "${TARGET_ARCH}" = "x86_64" ]; then
-   GRUB_IMAGE="bootx64.efi"
+   GRUB_IMAGE="grub-efi-bootx64.efi"
+   DEST_IMAGE="bootx64.efi"
fi
-   install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
+   install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} 
${DEST}${EFIDIR}/${DEST_IMAGE}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
-   printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" >${DEST}/startup.nsh
+   printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh
 
install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
 }
-- 
2.1.4

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


[OE-core] [PATCH v3 06/11] isoimage-isohybrid: use TRANSLATED_TARGET_ARCH instead of MACHINE_ARCH

2017-01-27 Thread Ed Bartosh
isoimage-sihybrid plugin uses MACHINE_ARCH to get the name of initrd image.
It doesn't work for all machines, for example for quemux86-64 machine
MACHINE_ARCH is quemux86_64 and initrd name is
core-image-minimal-initramfs-qemux86-64.cpio.gz

Used TRANSLATED_TARGET_ARCH variable to get the initrd image name.
Replaced MACHINE_ARCH->TRANSLATED_TARGET_ARCH in WICVARS variable to
make it available from .env file.

Signed-off-by: Ed Bartosh 
---
 meta/classes/image-wic.bbclass   | 4 ++--
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.bbclass
index bd79073..3e98959 100644
--- a/meta/classes/image-wic.bbclass
+++ b/meta/classes/image-wic.bbclass
@@ -2,8 +2,8 @@
 # variables from this list is written to .env file
 WICVARS ?= "\
BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME 
IMAGE_BOOT_FILES \
-   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE 
ISODIR MACHINE_ARCH \
-   RECIPE_SYSROOT_NATIVE ROOTFS_SIZE STAGING_DATADIR STAGING_DIR 
STAGING_LIBDIR TARGET_SYS"
+   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE 
ISODIR RECIPE_SYSROOT_NATIVE \
+   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS 
TRANSLATED_TARGET_ARCH"
 
 WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
 WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py 
b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index b54a229..e4637a3 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -158,11 +158,11 @@ class IsoImagePlugin(SourcePlugin):
 if not image_type:
 msger.error("Couldn't find INITRAMFS_FSTYPES, exiting.\n")
 
-machine_arch = get_bitbake_var("MACHINE_ARCH")
-if not machine_arch:
-msger.error("Couldn't find MACHINE_ARCH, exiting.\n")
+target_arch = get_bitbake_var("TRANSLATED_TARGET_ARCH")
+if not target_arch:
+msger.error("Couldn't find TRANSLATED_TARGET_ARCH, exiting.\n")
 
-initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, 
machine_arch, image_type))[0]
+initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, 
target_arch, image_type))[0]
 
 if not os.path.exists(initrd):
 # Create initrd from rootfs directory
-- 
2.1.4

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


[OE-core] [PATCH v3 10/11] wic-tools: add dependency to systemd-boot

2017-01-27 Thread Ed Bartosh
Added systemd-boot to the list of dependencies of wic-tools
as wic bootimg-efi plugin depends on it.

Signed-off-by: Ed Bartosh 
---
 meta/recipes-core/meta/wic-tools.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/meta/wic-tools.bb 
b/meta/recipes-core/meta/wic-tools.bb
index aa09c82..1d9ea9c 100644
--- a/meta/recipes-core/meta/wic-tools.bb
+++ b/meta/recipes-core/meta/wic-tools.bb
@@ -3,8 +3,8 @@ SUMMARY = "A meta recipe to build native tools used by wic."
 LICENSE = "MIT"
 
 DEPENDS = "parted-native syslinux-native gptfdisk-native dosfstools-native 
mtools-native bmap-tools-native grub-efi-native cdrtools-native"
-DEPENDS_append_x86 = " syslinux grub-efi"
-DEPENDS_append_x86-64 = " syslinux grub-efi"
+DEPENDS_append_x86 = " syslinux grub-efi systemd-boot"
+DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot"
 
 INHIBIT_DEFAULT_DEPS = "1"
 inherit nopackages
-- 
2.1.4

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


[OE-core] [PATCH v3 03/11] wic: isoimage-isohybrid: stop using HDDDIR

2017-01-27 Thread Ed Bartosh
Stop using HDDDIR in isoimage-isohybrid wic plugin.
This variable is set by hddimg code, which is going to be
removed soon.

All required artifacts should be available from ISODIR.
wic-image.bbclass has been modified to build iso artifacts,
so it should be safe to remove usage of HDDDIR.

[YOCTO #10835]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py 
b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index fd25190..a637ce5 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -249,12 +249,8 @@ class IsoImagePlugin(SourcePlugin):
 part.rootfs_dir = rootfs_dir
 
 # Prepare rootfs.img
-hdd_dir = get_bitbake_var("HDDDIR")
 img_iso_dir = get_bitbake_var("ISODIR")
-
-rootfs_img = "%s/rootfs.img" % hdd_dir
-if not os.path.isfile(rootfs_img):
-rootfs_img = "%s/rootfs.img" % img_iso_dir
+rootfs_img = "%s/rootfs.img" % img_iso_dir
 if not os.path.isfile(rootfs_img):
 # check if rootfs.img is in deploydir
 deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
@@ -283,9 +279,7 @@ class IsoImagePlugin(SourcePlugin):
 os.remove(part.source_file)
 
 # Prepare initial ramdisk
-initrd = "%s/initrd" % hdd_dir
-if not os.path.isfile(initrd):
-initrd = "%s/initrd" % img_iso_dir
+initrd = "%s/initrd" % img_iso_dir
 if not os.path.isfile(initrd):
 initrd = cls._build_initramfs_path(rootfs_dir, cr_workdir)
 
-- 
2.1.4

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


[OE-core] [PATCH v3 11/11] isoimage-isohybrid: renamed variable hdd_dir

2017-01-27 Thread Ed Bartosh
Renamed variable hdd_dir to deploy_dir as this variable is
assigned to the value of DEPLOY_DIR_IMAGE.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py 
b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index e4637a3..bceaa84 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -249,7 +249,7 @@ class IsoImagePlugin(SourcePlugin):
 part.rootfs_dir = rootfs_dir
 
 # Prepare rootfs.img
-hdd_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
+deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
 img_iso_dir = get_bitbake_var("ISODIR")
 rootfs_img = "%s/rootfs.img" % img_iso_dir
 if not os.path.isfile(rootfs_img):
@@ -282,12 +282,12 @@ class IsoImagePlugin(SourcePlugin):
 # Support using a different initrd other than default
 if source_params.get('initrd'):
 initrd = source_params['initrd']
-if not hdd_dir:
+if not deploy_dir:
 msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
-cp_cmd = "cp %s/%s %s" % (hdd_dir, initrd, cr_workdir)
+cp_cmd = "cp %s/%s %s" % (deploy_dir, initrd, cr_workdir)
 else:
 # Prepare initial ramdisk
-initrd = "%s/initrd" % hdd_dir
+initrd = "%s/initrd" % deploy_dir
 if not os.path.isfile(initrd):
 initrd = "%s/initrd" % img_iso_dir
 if not os.path.isfile(initrd):
-- 
2.1.4

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


[OE-core] [PATCH v3 02/11] wic: use INITRD_LIVE in isoimage-isohybrid

2017-01-27 Thread Ed Bartosh
INITRD variable is not set if hddimg is disabled.
isoimage-isohybrid can't get correct name for initrd if INITRD
variable is not set.

Added INITRD_LIVE to WICVARS and used it in isoimage-isohybrid
code to get initrd artifact name. Used INITRD if INITRD_LIVE is not set.

Signed-off-by: Ed Bartosh 
---
 meta/classes/image-wic.bbclass   | 4 ++--
 meta/lib/oeqa/selftest/wic.py| 2 +-
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.bbclass
index 2acfd65..ab2e541 100644
--- a/meta/classes/image-wic.bbclass
+++ b/meta/classes/image-wic.bbclass
@@ -2,8 +2,8 @@
 # variables from this list is written to .env file
 WICVARS ?= "\
BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD HDDDIR 
IMAGE_BASENAME IMAGE_BOOT_FILES \
-   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD ISODIR 
MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
-   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS"
+   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE 
ISODIR MACHINE_ARCH \
+   RECIPE_SYSROOT_NATIVE ROOTFS_SIZE STAGING_DATADIR STAGING_DIR 
STAGING_LIBDIR TARGET_SYS"
 
 WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
 WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 53631fa..8eb77ae 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -373,7 +373,7 @@ class Wic(oeSelfTest):
 wicvars = set(get_bb_var('WICVARS', image).split())
 # filter out optional variables
 wicvars = wicvars.difference(('HDDDIR', 'IMAGE_BOOT_FILES',
-  'INITRD', 'ISODIR'))
+  'INITRD', 'INITRD_LIVE', 'ISODIR'))
 with open(path) as envfile:
 content = dict(line.split("=", 1) for line in envfile)
 # test if variables used by wic present in the .env file
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py 
b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index a8a5dc0..fd25190 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -144,7 +144,7 @@ class IsoImagePlugin(SourcePlugin):
 Create path for initramfs image
 """
 
-initrd = get_bitbake_var("INITRD")
+initrd = get_bitbake_var("INITRD_LIVE") or get_bitbake_var("INITRD")
 if not initrd:
 initrd_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
 if not initrd_dir:
-- 
2.1.4

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


[OE-core] [PATCH v3 04/11] image-wic: remove HDDDIR from WICVARS

2017-01-27 Thread Ed Bartosh
Removed HDDDIR as it's not used by wic anymore.
Stopped usage of HDDDIR in wic test suite.

Signed-off-by: Ed Bartosh 
---
 meta/classes/image-wic.bbclass | 2 +-
 meta/lib/oeqa/selftest/wic.py  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.bbclass
index ab2e541..bd79073 100644
--- a/meta/classes/image-wic.bbclass
+++ b/meta/classes/image-wic.bbclass
@@ -1,7 +1,7 @@
 # The WICVARS variable is used to define list of bitbake variables used in wic 
code
 # variables from this list is written to .env file
 WICVARS ?= "\
-   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD HDDDIR 
IMAGE_BASENAME IMAGE_BOOT_FILES \
+   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME 
IMAGE_BOOT_FILES \
IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE 
ISODIR MACHINE_ARCH \
RECIPE_SYSROOT_NATIVE ROOTFS_SIZE STAGING_DATADIR STAGING_DIR 
STAGING_LIBDIR TARGET_SYS"
 
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 8eb77ae..ebbb280 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -372,8 +372,8 @@ class Wic(oeSelfTest):
 
 wicvars = set(get_bb_var('WICVARS', image).split())
 # filter out optional variables
-wicvars = wicvars.difference(('HDDDIR', 'IMAGE_BOOT_FILES',
-  'INITRD', 'INITRD_LIVE', 'ISODIR'))
+wicvars = wicvars.difference(('IMAGE_BOOT_FILES', 'INITRD',
+  'INITRD_LIVE', 'ISODIR'))
 with open(path) as envfile:
 content = dict(line.split("=", 1) for line in envfile)
 # test if variables used by wic present in the .env file
-- 
2.1.4

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


[OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-27 Thread Ed Bartosh
There is a lot of wic code in image.bbclass and image_types.bbclass
Having all code separated in one file should make it more readable
and easier to maintain.

Signed-off-by: Ed Bartosh 
---
 meta/classes/image-wic.bbclass   | 120 +++
 meta/classes/image.bbclass   |  25 +---
 meta/classes/image_types.bbclass |  95 ---
 3 files changed, 122 insertions(+), 118 deletions(-)
 create mode 100644 meta/classes/image-wic.bbclass

diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.bbclass
new file mode 100644
index 000..2acfd65
--- /dev/null
+++ b/meta/classes/image-wic.bbclass
@@ -0,0 +1,120 @@
+# The WICVARS variable is used to define list of bitbake variables used in wic 
code
+# variables from this list is written to .env file
+WICVARS ?= "\
+   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD HDDDIR 
IMAGE_BASENAME IMAGE_BOOT_FILES \
+   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD ISODIR 
MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
+   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS"
+
+WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
+WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
+WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in 
'${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l for l 
in '${BBPATH}:${COREBASE}'.split(':'))}"
+WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(), '${WKS_SEARCH_PATH}') 
or ''}"
+
+def wks_search(files, search_path):
+for f in files:
+if os.path.isabs(f):
+if os.path.exists(f):
+return f
+else:
+searched = bb.utils.which(search_path, f)
+if searched:
+return searched
+
+WIC_CREATE_EXTRA_ARGS ?= ""
+
+IMAGE_CMD_wic () {
+   out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
+   wks="${WKS_FULL_PATH}"
+   if [ -z "$wks" ]; then
+   bbfatal "No kickstart files from WKS_FILES were found: 
${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
+   fi
+
+   BUILDDIR="${TOPDIR}" wic create "$wks" --vars 
"${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" 
${WIC_CREATE_EXTRA_ARGS}
+   mv "$out/$(basename "${wks%.wks}")"*.direct 
"$out${IMAGE_NAME_SUFFIX}.wic"
+   rm -rf "$out/"
+}
+IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
+
+# Rebuild when the wks file or vars in WICVARS change
+USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' 
'.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
+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"
+
+python () {
+if d.getVar('USING_WIC') and 'do_bootimg' in d:
+bb.build.addtask('do_image_wic', '', 'do_bootimg', d)
+}
+
+python do_write_wks_template () {
+"""Write out expanded template contents to WKS_FULL_PATH."""
+import re
+
+template_body = d.getVar('_WKS_TEMPLATE')
+
+# Remove any remnant variable references left behind by the expansion
+# due to undefined variables
+expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")
+while True:
+new_body = re.sub(expand_var_regexp, '', template_body)
+if new_body == template_body:
+break
+else:
+template_body = new_body
+
+wks_file = d.getVar('WKS_FULL_PATH')
+with open(wks_file, 'w') as f:
+f.write(template_body)
+}
+
+python () {
+if d.getVar('USING_WIC'):
+wks_file_u = d.getVar('WKS_FULL_PATH', False)
+wks_file = d.expand(wks_file_u)
+base, ext = os.path.splitext(wks_file)
+if ext == '.in' and os.path.exists(wks_file):
+wks_out_file = os.path.join(d.getVar('WORKDIR'), 
os.path.basename(base))
+d.setVar('WKS_FULL_PATH', wks_out_file)
+d.setVar('WKS_TEMPLATE_PATH', wks_file_u)
+d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True')
+
+# We need to re-parse each time the file changes, and bitbake
+# needs to be told about that explicitly.
+bb.parse.mark_dependency(d, wks_file)
+
+try:
+with open(wks_file, 'r') as f:
+body = f.read()
+except (IOError, OSError) as exc:
+pass
+else:
+# Previously, I used expandWithRefs to get the dependency list
+# and add it to WICVARS, but there's no point re-parsing the
+# file in process_wks_template as well, so just put it in
+# a variable and let the metadata deal with the deps.
+d.setVar('_WKS_TEMPLATE', body)
+bb.build.addtask('do_write_wks_template', 'do_image_wic', 
None, d)
+}
+
+#
+# Write environment 

[OE-core] [PATCH v3 00/11] Fix for #10835 - WIC should not rely on hddimg creation for finding all needed artifacts

2017-01-27 Thread Ed Bartosh
Hi,

This patchset usage of hddimg from wic codebase due to planned deprecation of 
hddimg.

While working on this wic-related code in meta/classes/ has been moved to
image-wic.bbclass to make it more maintainable.

Changes in v2: rebased on top of ross/mut
Changes in v3: removed patches that add tasks, fixed test cases,
   rebased on top of patches that make use of artifacts from 
DEPLOY_DIR_IMAGE,
   rebased on to pf ross/mut

The following changes since commit 2624674adefd86d15bc0bec2bb2a3876f785b947:

  selftest: check results in test_image_vars_dir* (2017-01-27 17:27:30 +)

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 (10):
  image-wic: move wic code to image-wic.bbclass
  wic: use INITRD_LIVE in isoimage-isohybrid
  wic: isoimage-isohybrid: stop using HDDDIR
  image-wic: remove HDDDIR from WICVARS
  isoimage-isohybrid: use TRANSLATED_TARGET_ARCH instead of MACHINE_ARCH
  selftest: stop using hddimg in the wic test suite
  selftest: wic: fix test_iso_image test case
  grub-efi.bbclass: use 'grub-efi-' prefix
  wic-tools: add dependency to systemd-boot
  isoimage-isohybrid: renamed variable hdd_dir

Tom Zanussi (1):
  wic: Look for image artifacts in a common location

 meta/classes/grub-efi.bbclass  |  10 +-
 meta/classes/image-wic.bbclass | 120 +
 meta/classes/image.bbclass |  25 +
 meta/classes/image_types.bbclass   |  95 
 meta/lib/oeqa/selftest/wic.py  |   6 +-
 meta/recipes-core/meta/wic-tools.bb|   4 +-
 scripts/lib/wic/plugins/source/bootimg-efi.py  |  39 +--
 .../lib/wic/plugins/source/isoimage-isohybrid.py   |  36 ---
 8 files changed, 182 insertions(+), 153 deletions(-)
 create mode 100644 meta/classes/image-wic.bbclass

-- 
2.1.4

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


[OE-core] virtual/ -vs- virtual-

2017-01-27 Thread Andre McCurdy
Is the rule about using "virtual/foo" for PROVIDES and "virtual-foo"
for RPROVIDES documented somewhere?
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for Fix bugs found within runtime testing (rev2)

2017-01-27 Thread Patchwork
== Series Details ==

Series: Fix bugs found within runtime testing (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/4986/
State : failure

== Summary ==


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



* Patch[PATCHv2,5/5] oeqa/runtime/cases: Rename syslog module to 
oe_syslog
 Issue Yocto Project bugzilla tag is not correctly formatted 
[test_bugzilla_entry_format] 
  Suggested fixSpecify bugzilla ID in commit description with format: 
"[YOCTO #]"



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

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


[OE-core] [PATCHv2 3/5] testimage.bbclass: Allow to run tests on autobuilder's images

2017-01-27 Thread mariano . lopez
From: Mariano Lopez 

With the change to the new framework data store dependecy was
removed, instead a new file is generated and used in testimage.
When testing builds from the autobuilders the test data values
are from the autobuilder, including the paths.

Some tests require paths to current environment in order to run,
this commit will update such paths and fix the error of running
images donwloaded from autobuilders.

[YOCTO #10964]

Signed-off-by: Mariano Lopez 
---
 meta/classes/testimage.bbclass   | 18 +++---
 meta/lib/oeqa/core/utils/misc.py |  7 +++
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 73a5c1a..7495fe1 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -49,11 +49,11 @@ DEFAULT_TEST_SUITES_pn-core-image-x11 = "${MINTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs 
${RPMTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg 
parselogs ${RPMTESTSUITE} \
 ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)}"
-DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} connman xorg 
perl python \
-${DEVTESTSUITE} parselogs ${RPMTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} buildcvs 
buildiptables buildgalculator \
+connman ${DEVTESTSUITE} logrotate perl parselogs python ${RPMTESTSUITE} 
xorg"
 DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python 
parselogs ${RPMTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcvs 
buildiptables buildgalculator \
-connman ${DEVTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
+connman ${DEVTESTSUITE} logrotate pam parselogs perl python 
${RPMTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
 
 # aarch64 has no graphics
@@ -79,13 +79,15 @@ TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 
'rpm', 'python-smartp
 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)}"
 
 TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
 TESTIMAGELOCK_qemuall = ""
 
 TESTIMAGE_DUMP_DIR ?= "/tmp/oe-saved-tests/"
 
+TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
+
 testimage_dump_target () {
 top -bn1
 ps
@@ -138,13 +140,12 @@ def testimage_sanity(d):
 
 def testimage_main(d):
 import os
-import signal
 import json
-import sys
+import signal
 import logging
-import time
 
 from bb.utils import export_proxies
+from oeqa.core.utils.misc import updateTestData
 from oeqa.runtime.context import OERuntimeTestContext
 from oeqa.runtime.context import OERuntimeTestContextExecutor
 from oeqa.core.target.qemu import supported_fstypes
@@ -166,6 +167,9 @@ def testimage_main(d):
 
 tdname = "%s.testdata.json" % image_name
 td = json.load(open(tdname, "r"))
+# Some variables need to be updates (mostly paths) with the
+# ones of the current environment because some tests require them.
+updateTestData(d, td, d.getVar('TESTIMAGE_UPDATE_VARS').split())
 
 image_manifest = "%s.manifest" % image_name
 image_packages = 
OERuntimeTestContextExecutor.readPackagesManifest(image_manifest)
diff --git a/meta/lib/oeqa/core/utils/misc.py b/meta/lib/oeqa/core/utils/misc.py
index 6ae58ad..d1eec13 100644
--- a/meta/lib/oeqa/core/utils/misc.py
+++ b/meta/lib/oeqa/core/utils/misc.py
@@ -35,3 +35,10 @@ def dataStoteToDict(d, variables):
 data[v] = d.getVar(v, True)
 
 return data
+
+def updateTestData(d, td, variables):
+"""
+Updates variables with values of data store to test data.
+"""
+for var in variables:
+td[var] = d.getVar(var)
-- 
2.6.6

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


[OE-core] [PATCHv2 5/5] oeqa/runtime/cases: Rename syslog module to oe_syslog

2017-01-27 Thread mariano . lopez
From: Aníbal Limón 

Debian based distros has a builtin syslog module so when
try to load tests using unittest it references the builtin
module instead of runtime/cases.

[YOCTO ##10964]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/classes/testimage.bbclass  | 2 +-
 meta/lib/oeqa/runtime/cases/{syslog.py => oe_syslog.py} | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/lib/oeqa/runtime/cases/{syslog.py => oe_syslog.py} (92%)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 7495fe1..c6e4cec 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -38,7 +38,7 @@ TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
 RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', 
d)}"
 SYSTEMDSUITE = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 
'', d)}"
 MINTESTSUITE = "ping"
-NETTESTSUITE = "${MINTESTSUITE} ssh df date scp syslog ${SYSTEMDSUITE}"
+NETTESTSUITE = "${MINTESTSUITE} ssh df date scp oe_syslog ${SYSTEMDSUITE}"
 DEVTESTSUITE = "gcc kernelmodule ldd"
 
 DEFAULT_TEST_SUITES = "${MINTESTSUITE} auto"
diff --git a/meta/lib/oeqa/runtime/cases/syslog.py 
b/meta/lib/oeqa/runtime/cases/oe_syslog.py
similarity index 92%
rename from meta/lib/oeqa/runtime/cases/syslog.py
rename to meta/lib/oeqa/runtime/cases/oe_syslog.py
index 537c519..005b697 100644
--- a/meta/lib/oeqa/runtime/cases/syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -18,7 +18,7 @@ class SyslogTest(OERuntimeTestCase):
 class SyslogTestConfig(OERuntimeTestCase):
 
 @OETestID(1149)
-@OETestDepends(['syslog.SyslogTest.test_syslog_running'])
+@OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
 def test_syslog_logger(self):
 status, output = self.target.run('logger foobar')
 msg = "Can't log into syslog. Output: %s " % output
@@ -35,7 +35,7 @@ class SyslogTestConfig(OERuntimeTestCase):
 self.assertEqual(status, 0, msg=msg)
 
 @OETestID(1150)
-@OETestDepends(['syslog.SyslogTest.test_syslog_running'])
+@OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
 def test_syslog_restart(self):
 if "systemd" != self.tc.td.get("VIRTUAL-RUNTIME_init_manager", ""):
 (_, _) = self.target.run('/etc/init.d/syslog restart')
@@ -44,7 +44,7 @@ class SyslogTestConfig(OERuntimeTestCase):
 
 
 @OETestID(202)
-@OETestDepends(['syslog.SyslogTestConfig.test_syslog_logger'])
+@OETestDepends(['oe_syslog.SyslogTestConfig.test_syslog_logger'])
 @OEHasPackage(["!sysklogd", "busybox"])
 @skipIfDataVar('VIRTUAL-RUNTIME_init_manager', 'systemd',
'Not appropiate for systemd image')
-- 
2.6.6

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


[OE-core] [PATCHv2 1/5] runtime/cases: Fix case numbers, missing cases and unused classes

2017-01-27 Thread mariano . lopez
From: Mariano Lopez 

connman: oeRuntimeTest class is not used anymore as part of runtime
migration, this particular case was missed, so fix it.

gcc: Removed unneded lines.

multilib: fixed case number.

syslog: added a missing test.

[YOCTO #10964]

Signed-off-by: Mariano Lopez 

Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/runtime/cases/connman.py  | 2 +-
 meta/lib/oeqa/runtime/cases/gcc.py  | 3 ---
 meta/lib/oeqa/runtime/cases/multilib.py | 2 +-
 meta/lib/oeqa/runtime/cases/syslog.py   | 9 +
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/connman.py 
b/meta/lib/oeqa/runtime/cases/connman.py
index 8b47108..12456b4 100644
--- a/meta/lib/oeqa/runtime/cases/connman.py
+++ b/meta/lib/oeqa/runtime/cases/connman.py
@@ -6,7 +6,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 class ConnmanTest(OERuntimeTestCase):
 
 def service_status(self, service):
-if oeRuntimeTest.hasFeature("systemd"):
+if 'systemd' in self.tc.td['DISTRO_FEATURES']:
 (_, output) = self.target.run('systemctl status -l %s' % service)
 return output
 else:
diff --git a/meta/lib/oeqa/runtime/cases/gcc.py 
b/meta/lib/oeqa/runtime/cases/gcc.py
index 064fa49..9110831 100644
--- a/meta/lib/oeqa/runtime/cases/gcc.py
+++ b/meta/lib/oeqa/runtime/cases/gcc.py
@@ -11,15 +11,12 @@ class GccCompileTest(OERuntimeTestCase):
 def setUpClass(cls):
 dst = '/tmp/'
 src = os.path.join(cls.tc.files_dir, 'test.c')
-#dst = '/tmp/test.c'
 cls.tc.target.copyTo(src, dst)
 
 src = os.path.join(cls.tc.runtime_files_dir, 'testmakefile')
-#dst = '/tmp/testmakefile'
 cls.tc.target.copyTo(src, dst)
 
 src = os.path.join(cls.tc.files_dir, 'test.cpp')
-#dst = '/tmp/test.cpp'
 cls.tc.target.copyTo(src, dst)
 
 @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/multilib.py 
b/meta/lib/oeqa/runtime/cases/multilib.py
index 8f6d2b2..8c167f1 100644
--- a/meta/lib/oeqa/runtime/cases/multilib.py
+++ b/meta/lib/oeqa/runtime/cases/multilib.py
@@ -23,9 +23,9 @@ class MultilibTest(OERuntimeTestCase):
 msg = "%s isn't %s (is %s)" % (binary, arch, theclass)
 self.assertEqual(theclass, arch, msg=msg)
 
+@OETestID(1593)
 @skipIfNotInDataVar('MULTILIBS', 'multilib:lib32',
 "This isn't a multilib:lib32 image")
-@OETestID(201)
 @OETestDepends(['ssh.SSHTest.test_ssh'])
 def test_check_multilib_libc(self):
 """
diff --git a/meta/lib/oeqa/runtime/cases/syslog.py 
b/meta/lib/oeqa/runtime/cases/syslog.py
index 1016e67..537c519 100644
--- a/meta/lib/oeqa/runtime/cases/syslog.py
+++ b/meta/lib/oeqa/runtime/cases/syslog.py
@@ -34,6 +34,15 @@ class SyslogTestConfig(OERuntimeTestCase):
' Output: %s ' % output)
 self.assertEqual(status, 0, msg=msg)
 
+@OETestID(1150)
+@OETestDepends(['syslog.SyslogTest.test_syslog_running'])
+def test_syslog_restart(self):
+if "systemd" != self.tc.td.get("VIRTUAL-RUNTIME_init_manager", ""):
+(_, _) = self.target.run('/etc/init.d/syslog restart')
+else:
+(_, _) = self.target.run('systemctl restart syslog.service')
+
+
 @OETestID(202)
 @OETestDepends(['syslog.SyslogTestConfig.test_syslog_logger'])
 @OEHasPackage(["!sysklogd", "busybox"])
-- 
2.6.6

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


[OE-core] [PATCHv2 4/5] oeqa/core/context.py: Add validation for run-tests option

2017-01-27 Thread mariano . lopez
From: Aníbal Limón 

The run-tests option is optional so if isn't specified set
to None instead of crash on split().

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/context.py | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index efed4e6..4476750 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -215,7 +215,11 @@ class OETestContextExecutor(object):
 else:
 self.tc_kwargs['init']['td'] = {}
 
-self.tc_kwargs['load']['modules'] = args.run_tests.split()
+
+if args.run_tests:
+self.tc_kwargs['load']['modules'] = args.run_tests.split()
+else:
+self.tc_kwargs['load']['modules'] = None
 
 self.module_paths = args.CASES_PATHS
 
-- 
2.6.6

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


[OE-core] [PATCHv2 0/5] Fix bugs found within runtime testing

2017-01-27 Thread mariano . lopez
From: Mariano Lopez 

This will fix some bugs found in testimage when executing tests
from images downloaded from the autobuilders.

Changes in v2:

- Fix some test cases that were changed during the migration.
- Add createrepo-native as dependency of test image.
- Fix TEST_SUITES in core-image-sato-sdk and core-image-lsb-sdk.
- Renamed syslog test to oe_syslog to make it run on debian/ubuntu.

The following changes since commit 0150dddeaf901c91d32be093efd0348a344fb545:

  sanity.conf: Update minimum bitbake version requirements to 1.33.0 
(2017-01-27 10:42:39 +)

are available in the git repository at:

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

Aníbal Limón (2):
  oeqa/core/context.py: Add validation for run-tests option
  oeqa/runtime/cases: Rename syslog module to oe_syslog

Mariano Lopez (3):
  runtime/cases: Fix case numbers, missing cases and unused classes
  runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of
PACKAGE_CLASSES
  testimage.bbclass: Allow to run tests on autobuilder's images

 meta/classes/testimage.bbclass   | 20 
 meta/lib/oeqa/core/context.py|  6 +-
 meta/lib/oeqa/core/utils/misc.py |  7 +++
 meta/lib/oeqa/runtime/cases/connman.py   |  2 +-
 meta/lib/oeqa/runtime/cases/gcc.py   |  3 ---
 meta/lib/oeqa/runtime/cases/multilib.py  |  2 +-
 .../oeqa/runtime/cases/{syslog.py => oe_syslog.py}   | 13 +++--
 meta/lib/oeqa/runtime/cases/smart.py |  2 +-
 8 files changed, 38 insertions(+), 17 deletions(-)
 rename meta/lib/oeqa/runtime/cases/{syslog.py => oe_syslog.py} (82%)

-- 
2.6.6

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


[OE-core] [PATCHv2 2/5] runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of PACKAGE_CLASSES

2017-01-27 Thread mariano . lopez
From: Mariano Lopez 

smart test requires to build the image using rpm packages, this check was
included, but it checked for PACKAGE_CLASSES=='package_rpm', and this is
not true when building packages for rpm and deb/ipk. So this would check
IMAGE_PKGTYPE instead.

[YOCTO #10964]

Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/runtime/cases/smart.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/runtime/cases/smart.py 
b/meta/lib/oeqa/runtime/cases/smart.py
index 9b4d0d2..79bd9c8 100644
--- a/meta/lib/oeqa/runtime/cases/smart.py
+++ b/meta/lib/oeqa/runtime/cases/smart.py
@@ -23,7 +23,7 @@ class SmartBasicTest(SmartTest):
 
 @skipIfNotFeature('package-management',
   'Test requires package-management to be in 
IMAGE_FEATURES')
-@skipIfNotDataVar('PACKAGE_CLASSES', 'package_rpm',
+@skipIfNotDataVar('IMAGE_PKGTYPE', 'rpm',
   'RPM is not the primary package manager')
 @OEHasPackage(['smartpm'])
 @OETestID(716)
-- 
2.6.6

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


Re: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter

2017-01-27 Thread Patrick Ohly
On Fri, 2017-01-27 at 16:54 +, Bystricky, Juro wrote:
> Just curious: is this test for "image" in file name really necessary?
> With qemuboot.conf the relevant files are already spelled out.
> I don't see a need to force "compulsory" names for images.
> If I comment out this test, everything works just fine. Am I missing 
> something?

Some of the usages when checking for paths might have become obsolete,
but at least for distinguishing between machine and image base name
parameters it is still relevant:

def check_args(self):
...
elif re.search(r'-image-|-image$', arg):
# Lazy rootfs
self.rootfs = arg
elif arg.startswith('ovmf'):
self.ovmf_bios.append(arg)
else:
# At last, assume is it the MACHINE
if (not unknown_arg) or unknown_arg == arg:
unknown_arg = arg
else:
raise Exception("Can't handle two unknown args: %s %
s" % (unknown_arg, arg))

When removing the "if re.search(r'-image-|-image$', arg)" clause one
gets an error for:

$ runqemu core-image-minimal ext4 qemux86
runqemu - ERROR - Can't handle two unknown args: core-image-minimal qemux86
runqemu - ERROR - Try 'runqemu help' on how to use it

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


Re: [OE-core] why do (some) apache module recipes depend on both apache2 and apache2-native?

2017-01-27 Thread Khem Raj


On 1/27/17 7:17 AM, Robert P. J. Day wrote:
> 
>   i was poking around some apache module recipes, eg,
> apache-websocket_git.bb, and noticed:
> 
>   DEPENDS = "apache2 apache2-native"
>   RDEPENDS_${PN} += "apache2"
> 
> i can certainly understand that run-time dependency, but why would an
> apache module recipe have a build-time dependency on both the native
> and target form of apache?

it might be needing some tools which are build during building the
apache2 itself. Since we do cross compile we will have to separate
building native and target pieces of apache2. Thats one of reason why
such deps are needed.

> 
>   is there something unique about the structure of apache that
> requires the native component of the sysroot even when building for a
> different target?
> 
> rday
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] what is the working directory for configure/compile/install tasks?

2017-01-27 Thread Khem Raj


On 1/27/17 4:44 AM, Robert P. J. Day wrote:
>   i'm aware that most tasks are defined in terms of commands that
> explicitly use directory references with "S", "B", "D", WORKDIR, and
> so on and so on. but if i want to define a do_configure() task that
> does nothing more than invokes the top-level "configure" script, how
> would i refer to it?
> 

do_configure () {
${S}/configure
}
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/7] gzip/pigz/expat/image: Simplify gzip-native/pigz-native

2017-01-27 Thread Richard Purdie
With recipe specific sysroots, the gzip-replacement-native dance/class
is obsolete, simplify the code accordingly.

Signed-off-by: Richard Purdie 
---
 meta/classes/gzipnative.bbclass  | 5 -
 meta/classes/image.bbclass   | 2 --
 meta/classes/image_types.bbclass | 2 +-
 meta/recipes-core/expat/expat.inc| 6 +++---
 meta/recipes-extended/gzip/gzip_1.8.bb   | 1 -
 meta/recipes-extended/pigz/pigz_2.3.4.bb | 2 --
 6 files changed, 4 insertions(+), 14 deletions(-)
 delete mode 100644 meta/classes/gzipnative.bbclass

diff --git a/meta/classes/gzipnative.bbclass b/meta/classes/gzipnative.bbclass
deleted file mode 100644
index 326cbbb..000
--- a/meta/classes/gzipnative.bbclass
+++ /dev/null
@@ -1,5 +0,0 @@
-EXTRANATIVEPATH += "pigz-native gzip-native"
-DEPENDS += "gzip-native"
-
-# tar may get run by do_unpack or do_populate_lic which could call gzip
-do_unpack[depends] += "gzip-native:do_populate_sysroot"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index b4e5432..0ffe99f 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -9,8 +9,6 @@ TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}"
 TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY}"
 POPULATE_SDK_POST_TARGET_COMMAND += "rootfs_sysroot_relativelinks; "
 
-inherit gzipnative
-
 LICENSE = "MIT"
 PACKAGES = ""
 DEPENDS += "${MLPREFIX}qemuwrapper-cross depmodwrapper-cross"
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index ddd52f1..005d1e2 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -359,7 +359,7 @@ CONVERSION_CMD_sha384sum = "sha384sum 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
 CONVERSION_CMD_sha512sum = "sha512sum 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha512sum"
 CONVERSION_CMD_bmap = "bmaptool create 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.bmap"
 CONVERSION_DEPENDS_lzma = "xz-native"
-CONVERSION_DEPENDS_gz = ""
+CONVERSION_DEPENDS_gz = "pigz-native"
 CONVERSION_DEPENDS_bz2 = "pbzip2-native"
 CONVERSION_DEPENDS_xz = "xz-native"
 CONVERSION_DEPENDS_lz4 = "lz4-native"
diff --git a/meta/recipes-core/expat/expat.inc 
b/meta/recipes-core/expat/expat.inc
index fe9d7e7..9fa0ca2 100644
--- a/meta/recipes-core/expat/expat.inc
+++ b/meta/recipes-core/expat/expat.inc
@@ -7,12 +7,12 @@ LICENSE = "MIT"
 SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.bz2 \
file://autotools.patch \
  "
-
-inherit autotools lib_package gzipnative
+inherit autotools lib_package
 
 # This package uses an archive format known to have issue with some
 # versions of gzip
-do_unpack[depends] += "gzip-native:do_populate_sysroot"
+DEPENDS += "pigz-native"
+do_unpack[depends] += "pigz-native:do_populate_sysroot"
 
 do_configure_prepend () {
rm -f ${S}/conftools/libtool.m4
diff --git a/meta/recipes-extended/gzip/gzip_1.8.bb 
b/meta/recipes-extended/gzip/gzip_1.8.bb
index a19b965..11be846 100644
--- a/meta/recipes-extended/gzip/gzip_1.8.bb
+++ b/meta/recipes-extended/gzip/gzip_1.8.bb
@@ -9,7 +9,6 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
 
file://gzip.h;beginline=8;endline=20;md5=6e47caaa630e0c8bf9f1bc8d94a8ed0e"
 
 PROVIDES_append_class-native = " gzip-replacement-native"
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
 
 BBCLASSEXTEND = "native"
 
diff --git a/meta/recipes-extended/pigz/pigz_2.3.4.bb 
b/meta/recipes-extended/pigz/pigz_2.3.4.bb
index 87b61bf..53c56c5 100644
--- a/meta/recipes-extended/pigz/pigz_2.3.4.bb
+++ b/meta/recipes-extended/pigz/pigz_2.3.4.bb
@@ -7,7 +7,5 @@ SRC_URI = "https://github.com/madler/pigz/archive/v${PV}.tar.gz;
 SRC_URI[md5sum] = "c109057050b15edf3eb9bb4d0805235e"
 SRC_URI[sha256sum] = 
"763f2fdb203aa0b7b640e63385e38e5dd4e5aaa041bc8e42aa96f2ef156b06e8"
 
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
 BBCLASSEXTEND = "native nativesdk"
 
-- 
2.7.4

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


[OE-core] [PATCH 4/7] sstate: Allow sstate_clean_manifest to take a prefix

2017-01-27 Thread Richard Purdie
Manifest files containing the same duplicated prefix are wasteful on space
and ultimately this costs build time. Add support for manifest files with
common prefixes removed and use the prefix if the path isn't absolute.

Signed-off-by: Richard Purdie 
---
 meta/classes/sstate.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0fdeb9d..31789da 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -426,7 +426,7 @@ def sstate_clean_cachefiles(d):
 ss = sstate_state_fromvars(ld, task)
 sstate_clean_cachefile(ss, ld)
 
-def sstate_clean_manifest(manifest, d):
+def sstate_clean_manifest(manifest, d, prefix=None):
 import oe.path
 
 mfile = open(manifest)
@@ -435,6 +435,8 @@ def sstate_clean_manifest(manifest, d):
 
 for entry in entries:
 entry = entry.strip()
+if prefix and not entry.startswith("/"):
+entry = prefix + "/" + entry
 bb.debug(2, "Removing manifest: %s" % entry)
 # We can race against another package populating directories as we're 
removing them
 # so we ignore errors here.
-- 
2.7.4

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


[OE-core] [PATCH 5/7] staging: Drop common prefix WORKDIR from manifest files

2017-01-27 Thread Richard Purdie
Manifest files containing the same duplicated prefix are wasteful on space
and ultimately this costs build time. Drop the WORKDIR prefix from the manifest
files since this small change mounts up a lot.

Signed-off-by: Richard Purdie 
---
 meta/classes/staging.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 1fe60ac..1b618fb 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -360,6 +360,7 @@ python extend_recipe_sysroot() {
 
 taskdepdata = d.getVar("BB_TASKDEPDATA", False)
 mytaskname = d.getVar("BB_RUNTASK")
+workdir = d.getVar("WORKDIR")
 #bb.warn(str(taskdepdata))
 pn = d.getVar("PN")
 
@@ -504,7 +505,7 @@ python extend_recipe_sysroot() {
 continue
 else:
 bb.note("%s exists in sysroot, but is stale (%s vs. %s), 
removing." % (c, lnk, c + "." + taskhash))
-sstate_clean_manifest(depdir + "/" + lnk, d)
+sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
 os.unlink(depdir + "/" + c)
 elif os.path.lexists(depdir + "/" + c):
 os.unlink(depdir + "/" + c)
@@ -559,7 +560,7 @@ python extend_recipe_sysroot() {
 else:
 dest = staging_copyfile(l, destsysroot, fixme[''], 
postinsts, stagingdir)
 if dest:
-m.write(dest + "\n")
+m.write(dest.replace(workdir + "/", "") + "\n")
 
 for f in fixme:
 if f == '':
-- 
2.7.4

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


[OE-core] [PATCH 6/7] staging: Allow removal of stale sysroot objects

2017-01-27 Thread Richard Purdie
The main sysroot components of unreachable build targets will be removed by the 
core
code. This currently doesn't trigger a removal in the individual workdirs. This
adds in symlinking between the complete stamps and the component sysroot meaning
we can detect when someting was removed and hence remove it from the sysroot.

This fixes cases where DISTRO_FEATURES like systemd are changed amongst other
things and makes builds more robust against configuration changes.

If a dependency is rebuild, that is caught by checksum comparision code 
elsewhere
in this function as before.

Signed-off-by: Richard Purdie 
---
 meta/classes/staging.bbclass | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 1b618fb..cc7767a 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -490,6 +490,18 @@ python extend_recipe_sysroot() {
 fixme['native'] = []
 postinsts = []
 multilibs = {}
+manifests = {}
+
+for f in os.listdir(depdir):
+if not f.endswith(".complete"):
+continue
+f = depdir + "/" + f
+if os.path.islink(f) and not os.path.exists(f):
+bb.note("%s no longer exists, removing from sysroot" % f)
+lnk = os.readlink(f.replace(".complete", ""))
+sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
+os.unlink(f)
+os.unlink(f.replace(".complete", ""))
 
 for dep in configuredeps:
 c = setscenedeps[dep][0]
@@ -547,6 +559,7 @@ python extend_recipe_sysroot() {
 bb.warn("Manifest %s not found?" % manifest)
 else:
 with open(manifest, "r") as f, open(taskmanifest, 'w') as m:
+manifests[dep] = manifest
 for l in f:
 l = l.strip()
 if l.endswith("/"):
@@ -573,9 +586,9 @@ python extend_recipe_sysroot() {
 for p in postinsts:
 subprocess.check_output(p, shell=True)
 
-for dep in configuredeps:
+for dep in manifests:
 c = setscenedeps[dep][0]
-open(depdir + "/" + c + ".complete", "w").close()
+os.symlink(manifests[dep], depdir + "/" + c + ".complete")
 
 bb.utils.unlockfile(lock)
 }
-- 
2.7.4

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


[OE-core] [PATCH 2/7] allarch: Drop STAGING_DIR_HOST expansion

2017-01-27 Thread Richard Purdie
Now that STAGINGDIR_HOST doesn't contain MACHINE, we no longer need to expand
the value. Pre-expansion can mean components like PV can be expanded too early
and cause problems for certain use cases.

Signed-off-by: Richard Purdie 
---
 meta/classes/allarch.bbclass | 4 
 1 file changed, 4 deletions(-)

diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index a774841..a7ce024 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -2,10 +2,6 @@
 # This class is used for architecture independent recipes/data files (usually 
scripts)
 #
 
-# Expand STAGING_DIR_HOST since for cross-canadian/native/nativesdk, this will
-# point elsewhere after these changes.
-STAGING_DIR_HOST := "${STAGING_DIR_HOST}"
-
 PACKAGE_ARCH = "all"
 
 python () {
-- 
2.7.4

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


[OE-core] [PATCH 7/7] libxml2: Drop docs in native case

2017-01-27 Thread Richard Purdie
With rss, moving these around was having an increasing overhead and we don't
need them in the native case so remove them.

Signed-off-by: Richard Purdie 
---
 meta/recipes-core/libxml/libxml2_2.9.4.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-core/libxml/libxml2_2.9.4.bb 
b/meta/recipes-core/libxml/libxml2_2.9.4.bb
index 0287a0a..93b9ba0 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.4.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.4.bb
@@ -76,4 +76,9 @@ do_install_ptest () {
cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
 }
 
+do_install_append_class-native () {
+   # Docs are not needed in the native case
+   rm ${D}${datadir}/gtk-doc -rf
+}
+
 BBCLASSEXTEND = "native nativesdk"
-- 
2.7.4

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


[OE-core] [PATCH 1/7] image/kernelsrc/packagegroups/recipes: Remove uneeded noexec tasks

2017-01-27 Thread Richard Purdie
We used to have issues removing tasks like do_fetch due to implications
for targets like world and universe. These have now been resolved.

Removing uneeded tasks has advantages compared to noexec since it means
that accidentally left in dependencies are no longer needed/processed
(e.g. do_patch depends on quilt-native).

This cleans up a number of cases which local analysis highlighted as
being unneeded leading to slightly cleaner task graphs.

Signed-off-by: Richard Purdie 
---
 meta/classes/image.bbclass   | 16 
 meta/classes/kernelsrc.bbclass   |  6 +++---
 meta/classes/packagegroup.bbclass| 12 ++--
 meta/recipes-core/glibc/glibc-collateral.inc |  6 +++---
 meta/recipes-core/meta/meta-environment.bb   | 10 +-
 meta/recipes-core/meta/meta-world-pkgdata.bb | 12 ++--
 meta/recipes-core/meta/package-index.bb  | 24 
 7 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 76146c9..b4e5432 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -615,15 +615,15 @@ MULTILIBRE_ALLOW_REP =. 
"${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${l
 MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py"
 MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"
 
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_install[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_install
 deltask do_populate_sysroot
-do_package[noexec] = "1"
-do_package_qa[noexec] = "1"
+deltask do_package
+deltask do_package_qa
 do_packagedata[noexec] = "1"
 do_package_write_ipk[noexec] = "1"
 do_package_write_deb[noexec] = "1"
diff --git a/meta/classes/kernelsrc.bbclass b/meta/classes/kernelsrc.bbclass
index 9efd46a..675d40e 100644
--- a/meta/classes/kernelsrc.bbclass
+++ b/meta/classes/kernelsrc.bbclass
@@ -1,7 +1,7 @@
 S = "${STAGING_KERNEL_DIR}"
-do_fetch[noexec] = "1"
-do_unpack[depends] += "virtual/kernel:do_patch"
-do_unpack[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+do_patch[depends] += "virtual/kernel:do_patch"
 do_patch[noexec] = "1"
 do_package[depends] += "virtual/kernel:do_populate_sysroot"
 KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}")}"
diff --git a/meta/classes/packagegroup.bbclass 
b/meta/classes/packagegroup.bbclass
index ad6c8b0..4af4a01 100644
--- a/meta/classes/packagegroup.bbclass
+++ b/meta/classes/packagegroup.bbclass
@@ -40,12 +40,12 @@ python () {
 DEPCHAIN_DBGDEFAULTDEPS = "1"
 
 # We only need the packaging tasks - disable the rest
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_install[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_install
 deltask do_populate_sysroot
 
 python () {
diff --git a/meta/recipes-core/glibc/glibc-collateral.inc 
b/meta/recipes-core/glibc/glibc-collateral.inc
index 60655eb..6b32e4a 100644
--- a/meta/recipes-core/glibc/glibc-collateral.inc
+++ b/meta/recipes-core/glibc/glibc-collateral.inc
@@ -9,9 +9,9 @@ HOMEPAGE = "http://www.gnu.org/software/libc/index.html;
 # 
http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html
 ARM_INSTRUCTION_SET = "arm"
 
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
 do_configure[noexec] = "1"
 do_compile[noexec] = "1"
 
diff --git a/meta/recipes-core/meta/meta-environment.bb 
b/meta/recipes-core/meta/meta-environment.bb
index a2ed229..47086fb 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -71,9 +71,9 @@ FILES_${PN}= " \
 ${SDKPATH}/* \
 "
 
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
 do_populate_sysroot[noexec] = "1"
diff --git a/meta/recipes-core/meta/meta-world-pkgdata.bb 
b/meta/recipes-core/meta/meta-world-pkgdata.bb
index 617f96a..02abd8a 100644
--- a/meta/recipes-core/meta/meta-world-pkgdata.bb
+++ b/meta/recipes-core/meta/meta-world-pkgdata.bb
@@ -25,12 +25,12 @@ python do_collect_packagedata() {
 oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
 }
 
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_install[noexec] = "1"
+deltask do_fetch
+deltask do_unpack
+deltask do_patch
+deltask do_configure
+deltask do_compile
+deltask do_install
 
 do_prepare_recipe_sysroot[deptask] = ""
 
diff --git a/meta/recipes-core/meta/package-index.bb 

Re: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter

2017-01-27 Thread Bystricky, Juro
Just curious: is this test for "image" in file name really necessary?
With qemuboot.conf the relevant files are already spelled out.
I don't see a need to force "compulsory" names for images.
If I comment out this test, everything works just fine. Am I missing something?

Juro

From: openembedded-core-boun...@lists.openembedded.org 
[openembedded-core-boun...@lists.openembedded.org] on behalf of Patrick Ohly 
[patrick.o...@intel.com]
Sent: Friday, January 27, 2017 7:30 AM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for  
rootfs parameter

The magic detection of the rootfs parameter only worked for image
recipes which embedd the "image" string in the middle, as in
"core-image-minimal".

Sometimes it is more natural to call an image "something-image". To
get such an image detected by runqemu, "-image" at the end of a
parameter must also cause that parameter to be treated as the rootfs
parameter.

Inside the image directory, "something-image" has an - suffix
and thus no change is needed for those usages of
re.search('-image-'). However, while at it also enhance those string
searches a bit (no need for re; any()+map() a bit closer to the
intended logic).

Signed-off-by: Patrick Ohly 
---
 scripts/runqemu | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 17d79e9..4d7168c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -218,7 +218,7 @@ class BaseConfig(object):
 if not re.search('.qemuboot.conf$', '\n'.join(os.listdir(p)), 
re.M):
 logger.info("Can't find required *.qemuboot.conf in %s" % p)
 return False
-if not re.search('-image-', '\n'.join(os.listdir(p))):
+if not any(map(lambda name: '-image-' in name, os.listdir(p))):
 logger.info("Can't find *-image-* in %s" % p)
 return False
 return True
@@ -267,7 +267,7 @@ class BaseConfig(object):
  re.search('zImage', p) or re.search('vmlinux', p) or \
  re.search('fitImage', p) or re.search('uImage', p):
 self.kernel =  p
-elif os.path.exists(p) and (not os.path.isdir(p)) and 
re.search('-image-', os.path.basename(p)):
+elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in 
os.path.basename(p):
 self.rootfs = p
 # Check filename against self.fstypes can hanlde .cpio.gz,
 # otherwise, its type would be "gz", which is incorrect.
@@ -381,7 +381,7 @@ class BaseConfig(object):
 self.kernel_cmdline_script += ' %s' % 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):
+elif re.search(r'-image-|-image$', arg):
 # Lazy rootfs
 self.rootfs = arg
 else:
--
git-series 0.9.1
--
___
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] ✗ patchtest: failure for UEFI + Secure Boot + qemu (rev6)

2017-01-27 Thread Patchwork
== Series Details ==

Series: UEFI + Secure Boot + qemu (rev6)
Revision: 6
URL   : https://patchwork.openembedded.org/series/4506/
State : failure

== Summary ==


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



* Issue A patch file has been added, but does not have a 
Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fixSign off the added patch file 
(meta/recipes-extended/acpica/acpitests/aapits-linux.patch)

* Issue Added patch file is missing Upstream-Status in the header 
[test_upstream_status_presence] 
  Suggested fixAdd Upstream-Status:  to the header of 
meta/recipes-extended/acpica/acpitests/aapits-linux.patch (possible values: 
Pending, Submitted, Accepted, Backport, Denied, Inappropriate)



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

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


Re: [OE-core] [PATCH v4 05/12] ovmf: deploy firmware in image directory

2017-01-27 Thread Patrick Ohly
On Thu, 2017-01-26 at 19:25 -0800, Ricardo Neri wrote:
> On Mon, 2017-01-23 at 08:45 +0100, Patrick Ohly wrote:
> > > On the other hand, this is a new recipe and this may not be super
> > > critical. Especially if you meant that only OVMF will not support
> > > installing bios.bin in sysroot. Maybe all is needed is some
> > > clarification in the commit message.
> > 
> > Care to suggest something? ;-) To me, "traditional usage of ovmf ...
> > is
> > no longer supported" already says that this is a statement about ovmf,
> > not the bios parameter, so I'm not sure how to reword this.
> 
> Perhaps specifying what "traditional usage" means, both when using
> runqemu or qemu directly. I think this is useful as you devoted a fair
> amount of effort to enable your work in qemu. Mentioning the qemu
> features could be useful to people using qemu directly.

I've tried to make the commit message more useful in V5.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


[OE-core] [PATCH v5 12/12] ovmf: remove BGRT patch

2017-01-27 Thread Patrick Ohly
This patch was added to meta-luv for kernel testing purposes and
probably is not relevant for OE-core.

Signed-off-by: Patrick Ohly 
---
 meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch | 110 
+
 meta/recipes-core/ovmf/ovmf_git.bb |   1 +-
 2 files changed, 111 deletions(-)
 delete mode 100644 
meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch

diff --git a/meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch 
b/meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch
deleted file mode 100644
index 4531a6d..000
--- a/meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 66a4020c3c2163aeffc9757851f33c346ecfd870 Mon Sep 17 00:00:00 2001
-From: Sai Praneeth Prakhya 
-Date: Mon, 4 Apr 2016 12:15:12 -0700
-Subject: [PATCH] OvmfPkg: Enable BGRT in OVMF
-
-By default, firmware (OVMF - Open source Virtual Machine Firmware)
-never publishes BGRT (Boot Graphics Resource Table) and in the boot
-process Linux kernel checks for this table and if it fails to find BGRT
-table then corresponding code in Linux kernel is not executed. EDK II
-(EFI Development Kit, thus OVMF) already has BGRT source code packaged
-into it but it is excluded from the build process of OVMF. These changes
-to build system of OVMF enables BGRT in 32-bit and 64-bit OVMF.
-
-There are only two files that need to be modified in order to do this.
-The first one being OvmfPkg*.dsc (this file describes the platform) and
-the second one being OvmfPkg*.fdf (this file describes firmware descriptor
-volume). A *.inf file (here "BootGraphicsResourceTableDxe.inf")
-describes a module (here BGRT). So, include
-"BootGraphicsResourceTableDxe.inf" file in "OvmfPkg*.dsc" so that BGRT
-source code will be compiled and "BootGraphicsResourceTableDxe.efi" file
-is generated and we should also include
-"BootGraphicsResourceTableDxe.inf" file in "OvmfPkg*.fdf" file so that
-"BootGraphicsResourceTableDxe.efi" will be placed in a firmware volume
-and thus gets published.
-
-Signed-off-by: Sai Praneeth Prakhya 

- OvmfPkg/OvmfPkgIa32.dsc| 1 +
- OvmfPkg/OvmfPkgIa32.fdf| 1 +
- OvmfPkg/OvmfPkgIa32X64.dsc | 1 +
- OvmfPkg/OvmfPkgIa32X64.fdf | 1 +
- OvmfPkg/OvmfPkgX64.dsc | 1 +
- OvmfPkg/OvmfPkgX64.fdf | 1 +
- 6 files changed, 6 insertions(+)
-
-diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
-index 9e5b477..0582219 100644
 a/OvmfPkg/OvmfPkgIa32.dsc
-+++ b/OvmfPkg/OvmfPkgIa32.dsc
-@@ -647,6 +647,7 @@
-   OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
-   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
-   MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
-+  
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
- 
-   #
-   # Network Support
-diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
-index fc203f2..f968cb7 100644
 a/OvmfPkg/OvmfPkgIa32.fdf
-+++ b/OvmfPkg/OvmfPkgIa32.fdf
-@@ -274,6 +274,7 @@ INF  RuleOverride=ACPITABLE 
OvmfPkg/AcpiTables/AcpiTables.inf
- INF  OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
- INF  MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
- INF  
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
-+INF  
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
- 
- INF  RuleOverride = BINARY FatBinPkg/EnhancedFatDxe/Fat.inf
- 
-diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
-index 6e4da4f..8289385 100644
 a/OvmfPkg/OvmfPkgIa32X64.dsc
-+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
-@@ -656,6 +656,7 @@
-   OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
-   MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
-   MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
-+  
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
- 
-   #
-   # Network Support
-diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
-index d3f46f3..282d40b 100644
 a/OvmfPkg/OvmfPkgIa32X64.fdf
-+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
-@@ -274,6 +274,7 @@ INF  RuleOverride=ACPITABLE 
OvmfPkg/AcpiTables/AcpiTables.inf
- INF  OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
- INF  MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
- INF  
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
-+INF  
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
- 
- INF  RuleOverride = BINARY USE = X64 FatBinPkg/EnhancedFatDxe/Fat.inf
- 
-diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
-index 3d6d43e..0f956a7 100644
 a/OvmfPkg/OvmfPkgX64.dsc
-+++ b/OvmfPkg/OvmfPkgX64.dsc
-@@ -654,6 +654,7 @@
-   OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
-   

[OE-core] [PATCH v5 11/12] ovmf: build image which enrolls standard keys

2017-01-27 Thread Patrick Ohly
When booting a qemu virtual machine with ovmf.secboot, it comes up
with no keys installed and thus Secure Boot disabled. To lock down
the machine like a typical PC, one has to enroll the same keys
that PC vendors normally install, i.e. the ones from Microsoft.

This can be done manually (see
https://wiki.ubuntu.com/SecurityTeam/SecureBoot and
https://github.com/tianocore-docs/Docs/raw/master/White_Papers/A_Tour_Beyond_BIOS_into_UEFI_Secure_Boot_White_Paper.pdf)
 or automatically with the EnrollDefaultKeys.efi helper
from the Fedora ovmf rpm.

To use this with qemu:
$ bitbake ovmf-shell-image
...
$ runqemu serial nographic qemux86 ovmf-shell-image wic ovmf.secboot
...
UEFI Interactive Shell v2.1
EDK II
UEFI v2.60 (EDK II, 0x0001)
Mapping table
  FS0: Alias(s):HD2b:;BLK4:
  
PciRoot(0x0)/Pci(0x5,0x0)/HD(1,GPT,06AEF759-3982-4AF6-B517-70BA6304FC1C,0x800,0x566C)
 BLK0: Alias(s):
  PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x0)
 BLK1: Alias(s):
  PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x1)
 BLK2: Alias(s):
  PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)
 BLK3: Alias(s):
  PciRoot(0x0)/Pci(0x5,0x0)

Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
Shell> fs0:EnrollDefaultKeys.efi
info: SetupMode=1 SecureBoot=0 SecureBootEnable=0 CustomMode=0 VendorKeys=1
info: SetupMode=0 SecureBoot=1 SecureBootEnable=1 CustomMode=0 VendorKeys=0
info: success
Shell> reset

Remember that this will modify
deploy/images/qemux86/ovmf.secboot.qcow2, so make a copy and use the
full path of that copy instead of the "ovmf" argument if needed.

The ovmf-shell-image contains an EFI shell, which is what got started
here directly. After enrolling the keys, Secure Boot is active and the
same image cannot be booted anymore, so the BIOS goes through the
normal boot targets (including network boot, which can take a while to
time out), and ends up in the internal EFI shell. Trying to invoke
bootia32.efi (the shell from the image) or EnrollDefaultKeys.efi then
fails:
Shell> bootia32.efi
Command Error Status: Security Violation

The main purpose at the moment is to test that Secure Boot enforcement
really works. If we had a way to sign generated images, that part could
also be tested by booting in a locked down qemu instance.

0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch is
from
https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch?id=b1781931894bf2057464e634beed68b1e3218c9e
with one line changed to fix
https://bugzilla.redhat.com/show_bug.cgi?id=132502:
"EFI_STATUS Status = EFI_SUCCESS;" in EnrollListOfX509Certs() lacked
the initializer.

Signed-off-by: Patrick Ohly 
---
 meta/recipes-core/ovmf/ovmf-shell-image.bb 
 |   17 +-
 
meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch
 | 1124 
-
 meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks   
 |4 +-
 meta/recipes-core/ovmf/ovmf_git.bb 
 |   22 +-
 4 files changed, 1167 insertions(+)
 create mode 100644 meta/recipes-core/ovmf/ovmf-shell-image.bb
 create mode 100644 
meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch
 create mode 100644 meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks

diff --git a/meta/recipes-core/ovmf/ovmf-shell-image.bb 
b/meta/recipes-core/ovmf/ovmf-shell-image.bb
new file mode 100644
index 000..029547b
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf-shell-image.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "boot image with UEFI shell and tools"
+
+# For this image recipe, only the wic format with a
+# single vfat partition makes sense.
+IMAGE_FSTYPES_forcevariable = 'wic'
+
+WKS_FILE = "ovmf/ovmf-shell-image.wks"
+inherit image
+
+# We want a minimal image with just ovmf-shell-efi unpacked in it. We
+# avoid installing unnecessary stuff as much as possible, but some
+# things still get through and need to be removed.
+PACKAGE_INSTALL = "ovmf-shell-efi"
+LINGUAS_INSTALL = ""
+do_image () {
+rm -rf `ls -d ${IMAGE_ROOTFS}/* | grep -v efi`
+}
diff --git 
a/meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch
 
b/meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch
new file mode 100644
index 000..3aa6cc4
--- /dev/null
+++ 
b/meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch
@@ -0,0 +1,1124 @@
+From: Laszlo Ersek 
+Date: Mon, 6 Jul 2015 20:22:02 +0200
+Subject: [PATCH] OvmfPkg: EnrollDefaultKeys: application for enrolling default
+ keys
+
+(A port of the  patch
+to Gerd's public RPMs.)
+
+This application is meant to be invoked by 

[OE-core] [PATCH v5 10/12] runqemu: support UEFI with OVMF firmware

2017-01-27 Thread Patrick Ohly
In the simplest case, "runqemu qemux86  qcow2 ovmf" for an
EFI-enabled image in the qcow2 format will locate the ovmf.qcow2
firmware file deployed by the ovmf recipe in the image deploy
directory, override the graphics hardware with "-vga std" because that
is all that OVMF supports, and boot with UEFI enabled.

ovmf is not built by default. Either do it explicitly ("bitbake ovmf")
or make it a part of the normal build
("MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = ' ovmf'").

The firmware file is activated as a flash drive instead of using the
qemu BIOS parameters, because that is the recommended method
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764918#47) as it
allows storing UEFI variables in the file.

Instead of just "ovmf", a full path to an existing file can also be
used, just as with the rootfs. That may be useful when making a
permanent copy of the virtual machine data files.

It is possible to specify "ovmf*" parameters more than once, then
each parameter creates a separate flash drive. This way it is possible
to use separate flash drives for firmware code and variables:
$ runqemu qemux86  qcow2 ovmf.code ovmf.vars"

Note that rebuilding ovmf will overwrite the ovmf.vars.qcow2 file in
the image deploy directory. So when the goal is to update the firmware
while keeping variables, make a copy of the variable file and use
that:
$ mkdir my-machine
$ cp tmp/deploy/images/qemux86/ovmf.vars.qcow2 my-machine/
$ runqemu qemux86  qcow2 ovmf.code my-machine/ovmf.vars.qcow2

When Secure Boot was enabled in ovmf, one can pick that instead of
the non-Secure-Boot enabled ovmf.code:
$ runqemu qemux86  qcow2 ovmf.secboot.code 
my-machine/ovmf.vars.qcow2

Signed-off-by: Patrick Ohly 
---
 scripts/runqemu | 42 +-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 4d7168c..10947bb 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -74,6 +74,7 @@ of the following environment variables (in any order):
 kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU 
required)
 publicvnc - enable a VNC server open to all hosts
 audio - enable audio
+[*/]ovmf* - OVMF firmware file or base name for booting with UEFI
   tcpserial= - specify tcp serial port number
   biosdir= - specify custom bios dir
   biosfilename= - specify bios filename
@@ -162,6 +163,13 @@ class BaseConfig(object):
 self.clean_nfs_dir = False
 self.nfs_server = ''
 self.rootfs = ''
+# File name(s) of a OVMF firmware file or variable store,
+# to be added with -drive if=pflash.
+# Found in the same places as the rootfs, with or without one of
+# these suffices: qcow2, bin.
+# Setting one also adds "-vga std" because that is all that
+# OVMF supports.
+self.ovmf_bios = []
 self.qemuboot = ''
 self.qbconfload = False
 self.kernel = ''
@@ -259,6 +267,7 @@ class BaseConfig(object):
 - Check whether is a kernel file
 - Check whether is a image file
 - Check whether it is a nfs dir
+- Check whether it is a OVMF flash file
 """
 if p.endswith('.qemuboot.conf'):
 self.qemuboot = p
@@ -299,6 +308,8 @@ class BaseConfig(object):
 else:
 logger.info("Assuming %s is an nfs rootfs" % p)
 self.check_arg_nfs(p)
+elif os.path.basename(p).startswith('ovmf'):
+self.ovmf_bios.append(p)
 else:
 raise Exception("Unknown path arg %s" % p)
 
@@ -384,6 +395,8 @@ class BaseConfig(object):
 elif re.search(r'-image-|-image$', arg):
 # Lazy rootfs
 self.rootfs = arg
+elif arg.startswith('ovmf'):
+self.ovmf_bios.append(arg)
 else:
 # At last, assume is it the MACHINE
 if (not unknown_arg) or unknown_arg == arg:
@@ -482,6 +495,20 @@ class BaseConfig(object):
 if not os.path.exists(self.rootfs):
 raise Exception("Can't find rootfs: %s" % self.rootfs)
 
+def check_ovmf(self):
+"""Check and set full path for OVMF firmware and variable file(s)."""
+
+for index, ovmf in enumerate(self.ovmf_bios):
+if os.path.exists(ovmf):
+continue
+for suffix in ('qcow2', 'bin'):
+path = '%s/%s.%s' % (self.get('DEPLOY_DIR_IMAGE'), ovmf, 
suffix)
+if os.path.exists(path):
+self.ovmf_bios[index] = path
+break
+else:
+raise Exception("Can't find OVMF firmware: %s" % ovmf)
+
 def check_kernel(self):
 """Check and set kernel, dtb"""
 # The vm image doesn't need a kernel
@@ -576,6 +603,7 @@ class BaseConfig(object):
 self.check_kvm()
 self.check_fstype()
 self.check_rootfs()
+

[OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter

2017-01-27 Thread Patrick Ohly
The magic detection of the rootfs parameter only worked for image
recipes which embedd the "image" string in the middle, as in
"core-image-minimal".

Sometimes it is more natural to call an image "something-image". To
get such an image detected by runqemu, "-image" at the end of a
parameter must also cause that parameter to be treated as the rootfs
parameter.

Inside the image directory, "something-image" has an - suffix
and thus no change is needed for those usages of
re.search('-image-'). However, while at it also enhance those string
searches a bit (no need for re; any()+map() a bit closer to the
intended logic).

Signed-off-by: Patrick Ohly 
---
 scripts/runqemu | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 17d79e9..4d7168c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -218,7 +218,7 @@ class BaseConfig(object):
 if not re.search('.qemuboot.conf$', '\n'.join(os.listdir(p)), 
re.M):
 logger.info("Can't find required *.qemuboot.conf in %s" % p)
 return False
-if not re.search('-image-', '\n'.join(os.listdir(p))):
+if not any(map(lambda name: '-image-' in name, os.listdir(p))):
 logger.info("Can't find *-image-* in %s" % p)
 return False
 return True
@@ -267,7 +267,7 @@ class BaseConfig(object):
  re.search('zImage', p) or re.search('vmlinux', p) or \
  re.search('fitImage', p) or re.search('uImage', p):
 self.kernel =  p
-elif os.path.exists(p) and (not os.path.isdir(p)) and 
re.search('-image-', os.path.basename(p)):
+elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in 
os.path.basename(p):
 self.rootfs = p
 # Check filename against self.fstypes can hanlde .cpio.gz,
 # otherwise, its type would be "gz", which is incorrect.
@@ -381,7 +381,7 @@ class BaseConfig(object):
 self.kernel_cmdline_script += ' %s' % 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):
+elif re.search(r'-image-|-image$', arg):
 # Lazy rootfs
 self.rootfs = arg
 else:
-- 
git-series 0.9.1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 07/12] ovmf_git.bb: enable Secure Boot

2017-01-27 Thread Patrick Ohly
When enabled via PACCKAGECONFIG = "secureboot" (off by default because
of the extra work and license change), the recipe compiles OVMF twice,
once without Secure Boot, once with. This is the same approach as in
https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/edk2.spec

The results are "ovmf.qcow2" and "ovmf.secboot.qcow2" in the
image deploy directory, so
  runqemu   ovmf.secboot
will boot with Secure Boot enabled.

ovmf.secboot.code.qcow2 is provided for those who want separate code
and variable flash drives. The normal ovmf.vars.qcow2 can be used with
it.

In contrast to Fedora, no attempt is made to strip potentially patent
encumbered algorithms out of the OpenSSL archive. OVMF does not use
the ones considered problematic for Fedora, so this shouldn't be a
problem.

Fixes: luv-yocto/#38

Signed-off-by: Patrick Ohly 
---
 meta/recipes-core/ovmf/ovmf_git.bb | 36 +++-
 1 file changed, 36 insertions(+)

diff --git a/meta/recipes-core/ovmf/ovmf_git.bb 
b/meta/recipes-core/ovmf/ovmf_git.bb
index 9989025..bdec6aa 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -1,8 +1,15 @@
 DESCRIPTION = "OVMF - UEFI firmware for Qemu and KVM"
 HOMEPAGE = 
"http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF;
 LICENSE = "BSD"
+LICENSE_class-target = "${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 
'BSD & OpenSSL', 'BSD', d)}"
 LIC_FILES_CHKSUM = 
"file://OvmfPkg/License.txt;md5=343dc88e82ff33d042074f62050c3496"
 
+# Enabling Secure Boot adds a dependency on OpenSSL and implies
+# compiling OVMF twice, so it is disabled by default. Distros
+# may change that default.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[secureboot] = ",,,"
+
 SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \
file://0001-BaseTools-Force-tools-variables-to-host-toolchain.patch \
file://0001-OvmfPkg-Enable-BGRT-in-OVMF.patch \
@@ -10,7 +17,13 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master 
\
file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
 "
 
+SRC_URI_append_class-target = " \
+   ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 
'http://www.openssl.org/source/openssl-1.0.2j.tar.gz;name=openssl;subdir=${S}/CryptoPkg/Library/OpensslLib',
 '', d)} \
+"
+
 SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
+SRC_URI[openssl.md5sum] = "96322138f0b69e61b7212bc53d5e912b"
+SRC_URI[openssl.sha256sum] = 
"e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431"
 
 inherit deploy
 
@@ -32,6 +45,11 @@ BUILD_OPTIMIZATION="-pipe"
 # OVMF supports IA only, although it could conceivably support ARM someday.
 COMPATIBLE_HOST='(i.86|x86_64).*'
 
+# Additional build flags for OVMF with Secure Boot.
+# Fedora also uses "-D SMM_REQUIRE -D EXCLUDE_SHELL_FROM_FD".
+OVMF_SECURE_BOOT_EXTRA_FLAGS ??= ""
+OVMF_SECURE_BOOT_FLAGS = "-DSECURE_BOOT_ENABLE=TRUE 
${OVMF_SECURE_BOOT_EXTRA_FLAGS}"
+
 do_patch_append_class-native() {
 bb.build.exec_func('do_fix_iasl', d)
 bb.build.exec_func('do_fix_toolchain', d)
@@ -112,10 +130,27 @@ do_compile_class-target() {
 bbnote FIXED_GCCVER is ${FIXED_GCCVER}
 build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
 
+bbnote "Building without Secure Boot."
+rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX
 ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t 
${FIXED_GCCVER}
 ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd
 ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd
 ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd
+
+if ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'true', 'false', 
d)}; then
+# See CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt and
+# https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/ for
+# building with Secure Boot enabled.
+bbnote "Building with Secure Boot."
+rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX
+if ! [ -f 
${S}/CryptoPkg/Library/OpensslLib/openssl-*/edk2-patch-applied ]; then
+( cd ${S}/CryptoPkg/Library/OpensslLib/openssl-* && patch -p1 
<$(echo ../EDKII_openssl-*.patch) && touch edk2-patch-applied )
+fi
+( cd ${S}/CryptoPkg/Library/OpensslLib/ && ./Install.sh )
+${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t 
${FIXED_GCCVER} ${OVMF_SECURE_BOOT_FLAGS}
+ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.secboot.fd
+ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.secboot.code.fd
+fi
 }
 
 do_install_class-native() {
@@ -135,6 +170,7 @@ do_deploy_class-target() {
 ovmf \
 ovmf.code \
 ovmf.vars \
+${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'ovmf.secboot 
ovmf.secboot.code', '', d)} \
 ; do
 qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/$i.fd 
${DEPLOYDIR}/$i.qcow2
 done
-- 
git-series 0.9.1
-- 

[OE-core] [PATCH v5 05/12] ovmf: deploy firmware in image directory

2017-01-27 Thread Patrick Ohly
When used with '-drive if=pflash', qemu will store UEFI variables
inside the firmware image file. That is unexpected for a file located in
the sysroot, which should be read-only, while it is normal for image
files in the deploy/images directory. Therefore that directory is a
better place for use with runqemu.

The name was chose so that "runqemu ovmf" can be used as shorthand for
"runqemu /ovmf.qcow2" by treating "ovmf" as the base name
of the firmware file. "ovmf.secboot.qcow2" is meant to be used for the
Secure Boot enabled firmware.

qcow2 is used because it is needed for "savevm" snapshots of a virtual
machine.

With code and variables stored in the same ovmf.qcow2 it is not
possible to update the firmware code without also overwriting the
variables. For users who care about persistent variables, the code and
variables are also provided as separate files, in ovmf.code.qcow2 and
ovmf.vars.qcow2.

The traditional usage of OVMF via the qemu bios parameter ("biosdir"
and/or "biosfilename" in runqemu) is no longer recommended, and
therefore this recipe no longer provides the bios.bin file. Instead,
OVMF is meant to be used as flash drive in qemu. See the "runqemu:
support UEFI with OVMF firmware" patch for details on how to use OVMF
that way.

Signed-off-by: Patrick Ohly 
---
 meta/recipes-core/ovmf/ovmf_git.bb | 42 ++-
 1 file changed, 31 insertions(+), 11 deletions(-)

diff --git a/meta/recipes-core/ovmf/ovmf_git.bb 
b/meta/recipes-core/ovmf/ovmf_git.bb
index 13b583b..895ed6c 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -12,11 +12,13 @@ SRC_URI = 
"git://github.com/tianocore/edk2.git;branch=master \
 
 SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
 
+inherit deploy
+
 PARALLEL_MAKE = ""
 
 S = "${WORKDIR}/git"
 
-DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native"
+DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native 
qemu-native"
 
 DEPENDS_class-target="ovmf-native"
 
@@ -97,9 +99,22 @@ do_compile_class-target() {
 OVMF_ARCH="IA32"
 fi
 
+# ${WORKDIR}/ovmf is a well-known location where do_install and
+# do_deploy will be able to find the files.
+rm -rf ${WORKDIR}/ovmf
+mkdir ${WORKDIR}/ovmf
+OVMF_DIR_SUFFIX="X64"
+if [ "${TARGET_ARCH}" != "x86_64" ] ; then
+OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
+fi
 FIXED_GCCVER=$(fixup_target_tools ${GCC_VER})
-echo FIXED_GCCVER is ${FIXED_GCCVER}
+bbnote FIXED_GCCVER is ${FIXED_GCCVER}
+build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
+
 ${S}/OvmfPkg/build.sh -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER}
+ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd
+ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd
+ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd
 }
 
 do_install_class-native() {
@@ -108,16 +123,21 @@ do_install_class-native() {
 }
 
 do_install_class-target() {
-OVMF_DIR_SUFFIX="X64"
-if [ "${TARGET_ARCH}" != "x86_64" ] ; then
-OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
-fi
-install -d ${D}${datadir}/ovmf
+}
 
-FIXED_GCCVER=$(fixup_target_tools ${GCC_VER})
-build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
-install -m 0755 ${build_dir}/FV/OVMF.fd \
-   ${D}${datadir}/ovmf/bios.bin
+do_deploy() {
+}
+do_deploy[cleandirs] = "${DEPLOYDIR}"
+do_deploy_class-target() {
+# For use with "runqemu ovmf".
+for i in \
+ovmf \
+ovmf.code \
+ovmf.vars \
+; do
+qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/$i.fd 
${DEPLOYDIR}/$i.qcow2
+done
 }
+addtask do_deploy after do_compile before do_build
 
 BBCLASSEXTEND = "native"
-- 
git-series 0.9.1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 08/12] runqemu: fix undefined variable reference in check_arg_path()

2017-01-27 Thread Patrick Ohly
'arg' isn't defined, the right name there is 'p'.

This fixes a rather obscure error message when that code path
ends up being taken:

$ runqemu some/existing-file-name
runqemu - ERROR - name 'arg' is not defined
runqemu - ERROR - Try 'runqemu help' on how to use it

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

diff --git a/scripts/runqemu b/scripts/runqemu
index 434b1c2..17d79e9 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -292,7 +292,7 @@ class BaseConfig(object):
 else:
 raise Exception("Can't find FSTYPE from: %s" % p)
 
-elif os.path.isdir(p) or re.search(':', arg) and re.search('/', arg):
+elif os.path.isdir(p) or re.search(':', p) and re.search('/', p):
 if self.is_deploy_dir_image(p):
 logger.info('DEPLOY_DIR_IMAGE: %s' % p)
 self.set("DEPLOY_DIR_IMAGE", p)
-- 
git-series 0.9.1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 06/12] ovmf_git.bb: enable parallel compilation

2017-01-27 Thread Patrick Ohly
The Fedora srpm [1] seems to have no problems with parallel
compilation, so let's also use that for the target. The native
tools however indeed have dependency problems:

| test_Ecc_CParser (CheckPythonSyntax.Tests) ... gcc -o ../bin/EfiRom 
-L/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/usr/lib 
-L/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/lib 
-Wl,-rpath-link,/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/usr/lib 
-Wl,-rpath-link,/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/lib 
-Wl,-rpath,/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/usr/lib 
-Wl,-rpath,/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-O1 
EfiRom.o -L../libs -lCommon
| /usr/bin/ld: cannot find -lCommon
| collect2: error: ld returned 1 exit status

ERROR: Task (virtual:native:.../meta/recipes-core/ovmf/ovmf_git.bb:do_compile) 
failed with exit code '1'

[1] https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/edk2.spec

Signed-off-by: Patrick Ohly 
---
 meta/recipes-core/ovmf/ovmf_git.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/ovmf/ovmf_git.bb 
b/meta/recipes-core/ovmf/ovmf_git.bb
index 895ed6c..9989025 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -14,7 +14,7 @@ SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
 
 inherit deploy
 
-PARALLEL_MAKE = ""
+PARALLEL_MAKE_class-native = ""
 
 S = "${WORKDIR}/git"
 
@@ -94,6 +94,7 @@ do_compile_class-native() {
 
 do_compile_class-target() {
 export LFLAGS="${LDFLAGS}"
+PARALLEL_JOBS="${@ '${PARALLEL_MAKE}'.replace('-j', '-n')}"
 OVMF_ARCH="X64"
 if [ "${TARGET_ARCH}" != "x86_64" ] ; then
 OVMF_ARCH="IA32"
@@ -111,7 +112,7 @@ do_compile_class-target() {
 bbnote FIXED_GCCVER is ${FIXED_GCCVER}
 build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}"
 
-${S}/OvmfPkg/build.sh -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER}
+${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t 
${FIXED_GCCVER}
 ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd
 ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd
 ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd
-- 
git-series 0.9.1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 03/12] ovmf: move from meta-luv to OE-core

2017-01-27 Thread Patrick Ohly
From: meta-luv 

This is an unmodified copy of
github.com/01org/luv-yocto/meta-luv/recipes-core/ovmf revision
4be4329.

Signed-off-by: Patrick Ohly 
---
 
meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
   |  48 +-
 meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch 
| 110 
+-
 meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch
|  32 +++-
 
meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
 |  39 +++-
 meta/recipes-core/ovmf/ovmf_git.bb 
| 121 
-
 5 files changed, 350 insertions(+)
 create mode 100644 
meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
 create mode 100644 
meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch
 create mode 100644 
meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch
 create mode 100644 
meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
 create mode 100644 meta/recipes-core/ovmf/ovmf_git.bb

diff --git 
a/meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
 
b/meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
new file mode 100644
index 000..644b99d
--- /dev/null
+++ 
b/meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
@@ -0,0 +1,48 @@
+From 6e24bde1979c2d7149b37d142fb882dfde0e9770 Mon Sep 17 00:00:00 2001
+From: Matt Fleming 
+Date: Fri, 27 Jun 2014 11:12:18 +0100
+Subject: [PATCH] BaseTools: Force tools variables to host toolchain
+
+Signed-off-by: Matt Fleming 
+---
+ BaseTools/Source/C/Makefiles/app.makefile | 7 +++
+ BaseTools/Source/C/VfrCompile/GNUmakefile | 5 +
+ 2 files changed, 12 insertions(+)
+
+diff --git a/BaseTools/Source/C/Makefiles/app.makefile 
b/BaseTools/Source/C/Makefiles/app.makefile
+index 19269a1..62aad0f 100644
+--- a/BaseTools/Source/C/Makefiles/app.makefile
 b/BaseTools/Source/C/Makefiles/app.makefile
+@@ -16,6 +16,13 @@ include $(MAKEROOT)/Makefiles/header.makefile
+ 
+ APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
+ 
++CC = gcc
++CXX = g++
++AS = gcc
++AR = ar
++LD = ld
++LINKER = $(CC)
++
+ .PHONY:all
+ all: $(MAKEROOT)/bin $(APPLICATION) 
+ 
+diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile 
b/BaseTools/Source/C/VfrCompile/GNUmakefile
+index 82005e1..5ac5f7e 100644
+--- a/BaseTools/Source/C/VfrCompile/GNUmakefile
 b/BaseTools/Source/C/VfrCompile/GNUmakefile
+@@ -26,6 +26,11 @@ OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o 
EfiVfrParser.o VfrLexer.o VfrSyn
+ 
+ VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
+ 
++CC = gcc
++CXX = g++
++AS = gcc
++AR = ar
++LD = ld
+ LINKER = $(BUILD_CXX)
+ 
+ EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg 
VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h
+-- 
+1.9.0
+
diff --git a/meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch 
b/meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch
new file mode 100644
index 000..4531a6d
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch
@@ -0,0 +1,110 @@
+From 66a4020c3c2163aeffc9757851f33c346ecfd870 Mon Sep 17 00:00:00 2001
+From: Sai Praneeth Prakhya 
+Date: Mon, 4 Apr 2016 12:15:12 -0700
+Subject: [PATCH] OvmfPkg: Enable BGRT in OVMF
+
+By default, firmware (OVMF - Open source Virtual Machine Firmware)
+never publishes BGRT (Boot Graphics Resource Table) and in the boot
+process Linux kernel checks for this table and if it fails to find BGRT
+table then corresponding code in Linux kernel is not executed. EDK II
+(EFI Development Kit, thus OVMF) already has BGRT source code packaged
+into it but it is excluded from the build process of OVMF. These changes
+to build system of OVMF enables BGRT in 32-bit and 64-bit OVMF.
+
+There are only two files that need to be modified in order to do this.
+The first one being OvmfPkg*.dsc (this file describes the platform) and
+the second one being OvmfPkg*.fdf (this file describes firmware descriptor
+volume). A *.inf file (here "BootGraphicsResourceTableDxe.inf")
+describes a module (here BGRT). So, include
+"BootGraphicsResourceTableDxe.inf" file in "OvmfPkg*.dsc" so that BGRT
+source code will be compiled and "BootGraphicsResourceTableDxe.efi" file
+is generated and we should also include
+"BootGraphicsResourceTableDxe.inf" file in "OvmfPkg*.fdf" file so that
+"BootGraphicsResourceTableDxe.efi" will be placed in a firmware volume
+and thus gets 

[OE-core] [PATCH v5 04/12] ovmf: explicitly depend on nasm-native

2017-01-27 Thread Patrick Ohly
Fixes a build issue when nasm was not build already because of
something else.

Signed-off-by: Patrick Ohly 
---
 meta/recipes-core/ovmf/ovmf_git.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/ovmf/ovmf_git.bb 
b/meta/recipes-core/ovmf/ovmf_git.bb
index e722db5..13b583b 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -20,6 +20,8 @@ DEPENDS_class-native="util-linux-native iasl-native 
ossp-uuid-native"
 
 DEPENDS_class-target="ovmf-native"
 
+DEPENDS_append = " nasm-native"
+
 EDK_TOOLS_DIR="edk2_basetools"
 
 # OVMF has trouble building with the default optimization of -O2.
-- 
git-series 0.9.1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 02/12] acpica: work around flex 2.6.2 code generation issue

2017-01-27 Thread Patrick Ohly
Without this patch, linking fails with a missing implementation of
yy_scan_string. This looks like a regression in flex, because 2.6.0 generated
different code that called PrParser_scan_string
resp. DtParser_scan_string.

Working around that in acpica until this is better understood or fixed
in flex is the easiest solution for now.

Signed-off-by: Patrick Ohly 
---
 meta/recipes-extended/acpica/acpica_20150515.bb |  1 +
 meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch | 64 

 2 files changed, 65 insertions(+)
 create mode 100644 
meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch

diff --git a/meta/recipes-extended/acpica/acpica_20150515.bb 
b/meta/recipes-extended/acpica/acpica_20150515.bb
index de897e1..c23b491 100644
--- a/meta/recipes-extended/acpica/acpica_20150515.bb
+++ b/meta/recipes-extended/acpica/acpica_20150515.bb
@@ -18,6 +18,7 @@ DEPENDS = "bison flex"
 
 SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \
 file://no-werror.patch \
+file://rename-yy_scan_string-manually.patch \
 "
 SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c"
 SRC_URI[sha256sum] = 
"61204ec56d71bc9bfa2ee2ade4c66f7e8541772ac72ef8ccc20b3f339cc96374"
diff --git 
a/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch 
b/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch
new file mode 100644
index 000..b62ca25
--- /dev/null
+++ b/meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch
@@ -0,0 +1,64 @@
+From 2ab61e6ad5a9cfcde838379bc36babfaaa61afb8 Mon Sep 17 00:00:00 2001
+From: Patrick Ohly 
+Date: Fri, 20 Jan 2017 13:50:17 +0100
+Subject: [PATCH] rename yy_scan_string manually
+
+flex 2.6.0 used to generate code where yy_scan_string was mapped
+to _scan_string directly in the generated .c code.
+
+For example, generate/unix/iasl/obj/prparserlex.c:
+
+int
+PrInitLexer (
+char*String)
+{
+
+LexBuffer = PrParser_scan_string (String);
+return (LexBuffer == NULL);
+}
+
+flex 2.6.3 no longer does that, leading to a compiler warning
+and link error about yy_scan_string().
+
+Both versions generate a preamble in the beginning of prparserlex.c
+that maps several yy_* names, but yy_scan_string is not among those:
+
+...
+...
+
+Upstream-Status: Inappropriate [workaround for 
https://github.com/westes/flex/issues/164]
+Signed-off-by: Patrick Ohly 
+---
+ source/compiler/dtparser.l | 2 +-
+ source/compiler/prparser.l | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/source/compiler/dtparser.l b/source/compiler/dtparser.l
+index 3f4c2f3..eaa43ff 100644
+--- a/source/compiler/dtparser.l
 b/source/compiler/dtparser.l
+@@ -120,7 +120,7 @@ DtInitLexer (
+ char*String)
+ {
+ 
+-LexBuffer = yy_scan_string (String);
++LexBuffer = DtParser_scan_string (String);
+ return (LexBuffer == NULL);
+ }
+ 
+diff --git a/source/compiler/prparser.l b/source/compiler/prparser.l
+index 10bd130..9cb3573 100644
+--- a/source/compiler/prparser.l
 b/source/compiler/prparser.l
+@@ -127,7 +127,7 @@ PrInitLexer (
+ char*String)
+ {
+ 
+-LexBuffer = yy_scan_string (String);
++LexBuffer = PrParser_scan_string (String);
+ return (LexBuffer == NULL);
+ }
+ 
+-- 
+2.11.0
+
-- 
git-series 0.9.1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 00/12] UEFI + Secure Boot + qemu

2017-01-27 Thread Patrick Ohly
There seems to be a consensus that supporting UEFI in OE-core for qemu
would be valuable, and there have been some (stalled) attempts to add
it. For reference, see:
   [OE-core] [PATCH V3 0/3] Add UEFI firmware for qemux86*
   [OE-core] Add ovmf-native to make qemu-native/runqemu support boot UEFI 
image?
   https://bugzilla.yoctoproject.org/show_bug.cgi?id=5654
   https://github.com/01org/luv-yocto/issues/38

This patch set includes the necessary recipes (ovmf from meta-luv, acpica from
meta-oe), some improvements to them (in particular, enabling Secure
Boot), and changes to runqemu to make it easier to boot with UEFI. A
special image recipes builds an image which can be used to lock down a
virtual machine by enrolling the "normal" pre-installed certificates.

In contrast to the first version of this patch series, one can now use
both a single OVMF firmware file as well as set up persistent
variables for a virtual machine by using two files.

Eduardo promised to add automated testing for this once it is in OE-core.
As it stands now, ovmf-shell-image and ovmf without Secure Boot enabled
should at least be part of a world build.

As discussed on this list, Ricardo and Fathi volunteered to help with
maintaining the ovmf and acpica recipes in OE-core.

Beware that "git am --keep-cr" must be used to import the ovmf patches
correctly.

Changes since V1:
- support both combined code+vars ("ovmf") and separate code
  and vars flash drives ("ovmf.code ovmf.vars")
- OVMF firmware no longer installed in the target sysroot
- slightly simpler renaming from OVMF (uppercase, underscore)
  to OE naming convention (lowercase, dots): now the different
  ln invocation directly create files with the final name
- DEPLOYDIR needs to be cleaned explicitly (done via cleandirs varflag)
- Secure Boot support in ovmf is controlled by a PACKAGECONFIG option,
  off by default
- distros and developers can add additional Secure Boot compile flags
  with OVMF_SECURE_BOOT_EXTRA_FLAGS
- explain how to get ovmf built for use with runqemu via 
MACHINE_ESSENTIAL_EXTRA_RDEPENDS
- IMAGE_FSTYPES_forcevariable = "wic" used in ovmf-shell-image
- remove OVMF BGRT patch
- location of "inherit deploy"

Changes since V2:
- rebased onto current master
- workaround for acpica compile issue with flex 2.6.2

Changes since V3:
- rebased onto current master (for real, this time!)
- reordered patches a bit

Changes since V4:
- revised the commit message of "ovmf: deploy firmware in image directory"
  to clarify expected usage

Fathi Boudra (1):
  acpica: move from meta-oe to OE-core

Patrick Ohly (10):
  acpica: work around flex 2.6.2 code generation issue
  ovmf: explicitly depend on nasm-native
  ovmf: deploy firmware in image directory
  ovmf_git.bb: enable parallel compilation
  ovmf_git.bb: enable Secure Boot
  runqemu: fix undefined variable reference in check_arg_path()
  runqemu: also accept -image suffix for rootfs parameter
  runqemu: support UEFI with OVMF firmware
  ovmf: build image which enrolls standard keys
  ovmf: remove BGRT patch

meta-luv (1):
  ovmf: move from meta-luv to OE-core

 meta/recipes-core/ovmf/ovmf-shell-image.bb 
 |   17 +-
 
meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
|   48 +++-
 meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch
 |   32 ++-
 
meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch
  |   39 ++-
 
meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch
 | 1124 
-
 meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks   
 |4 +-
 meta/recipes-core/ovmf/ovmf_git.bb 
 |  201 +-
 meta/recipes-extended/acpica/acpica_20150515.bb
 |   47 +++-
 meta/recipes-extended/acpica/acpitests/aapits-linux.patch  
 |  336 ++-
 meta/recipes-extended/acpica/acpitests/aapits-makefile.patch   
 |   34 ++-
 meta/recipes-extended/acpica/acpitests_20140828.bb 
 |   35 ++-
 meta/recipes-extended/acpica/files/no-werror.patch 
 |   32 ++-
 meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch
 |   64 -
 scripts/runqemu
 |   50 ++-
 14 files changed, 2058 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-core/ovmf/ovmf-shell-image.bb
 create mode 100644 
meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
 create mode 100644 

[OE-core] [PATCH v5 01/12] acpica: move from meta-oe to OE-core

2017-01-27 Thread Patrick Ohly
From: Fathi Boudra 

qemu support for UEFI in OE-core depends on OVMF, which needs the iasl
tools provided by this recipe. There's also an iasl recipe in
meta-luv, but than can and will be replaced by this one, thus reducing
overall maintenance work.

Copied from meta-openembedded rev fa65be9ba (current master).

Signed-off-by: Patrick Ohly 
---
 meta/recipes-extended/acpica/acpica_20150515.bb  |  46 +-
 meta/recipes-extended/acpica/acpitests/aapits-linux.patch| 336 +++-
 meta/recipes-extended/acpica/acpitests/aapits-makefile.patch |  34 +-
 meta/recipes-extended/acpica/acpitests_20140828.bb   |  35 +-
 meta/recipes-extended/acpica/files/no-werror.patch   |  32 +-
 5 files changed, 483 insertions(+)
 create mode 100644 meta/recipes-extended/acpica/acpica_20150515.bb
 create mode 100644 meta/recipes-extended/acpica/acpitests/aapits-linux.patch
 create mode 100644 meta/recipes-extended/acpica/acpitests/aapits-makefile.patch
 create mode 100644 meta/recipes-extended/acpica/acpitests_20140828.bb
 create mode 100644 meta/recipes-extended/acpica/files/no-werror.patch

diff --git a/meta/recipes-extended/acpica/acpica_20150515.bb 
b/meta/recipes-extended/acpica/acpica_20150515.bb
new file mode 100644
index 000..de897e1
--- /dev/null
+++ b/meta/recipes-extended/acpica/acpica_20150515.bb
@@ -0,0 +1,46 @@
+SUMMARY = "ACPICA tools for the development and debug of ACPI tables"
+DESCRIPTION = "The ACPI Component Architecture (ACPICA) project provides an \
+OS-independent reference implementation of the Advanced Configuration and \
+Power Interface Specification (ACPI). ACPICA code contains those portions of \
+ACPI meant to be directly integrated into the host OS as a kernel-resident \
+subsystem, and a small set of tools to assist in developing and debugging \
+ACPI tables."
+
+HOMEPAGE = "http://www.acpica.org/;
+SECTION = "console/tools"
+
+LICENSE = "BSD | GPLv2"
+LIC_FILES_CHKSUM = 
"file://generate/unix/readme.txt;md5=204407e197c1a01154a48f6c6280c3aa"
+
+COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+DEPENDS = "bison flex"
+
+SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \
+file://no-werror.patch \
+"
+SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c"
+SRC_URI[sha256sum] = 
"61204ec56d71bc9bfa2ee2ade4c66f7e8541772ac72ef8ccc20b3f339cc96374"
+
+S = "${WORKDIR}/acpica-unix2-${PV}"
+
+EXTRA_OEMAKE = "CC='${CC}' 'OPT_CFLAGS=-Wall'"
+
+do_install() {
+install -D -p -m0755 generate/unix/bin*/iasl ${D}${bindir}/iasl
+install -D -p -m0755 generate/unix/bin*/acpibin ${D}${bindir}/acpibin
+install -D -p -m0755 generate/unix/bin*/acpiexec ${D}${bindir}/acpiexec
+install -D -p -m0755 generate/unix/bin*/acpihelp ${D}${bindir}/acpihelp
+install -D -p -m0755 generate/unix/bin*/acpinames ${D}${bindir}/acpinames
+install -D -p -m0755 generate/unix/bin*/acpisrc ${D}${bindir}/acpisrc
+install -D -p -m0755 generate/unix/bin*/acpixtract ${D}${bindir}/acpixtract
+}
+
+# iasl*.bb is a subset of this recipe, so RREPLACE it
+PROVIDES = "iasl"
+RPROVIDES_${PN} += "iasl"
+RREPLACES_${PN} += "iasl"
+RCONFLIGHTS_${PN} += "iasl"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/acpica/acpitests/aapits-linux.patch 
b/meta/recipes-extended/acpica/acpitests/aapits-linux.patch
new file mode 100644
index 000..7c5d6b0
--- /dev/null
+++ b/meta/recipes-extended/acpica/acpitests/aapits-linux.patch
@@ -0,0 +1,336 @@
+From: Al Stone 
+Date: Mon, 7 Apr 2014 19:09:37 +
+Subject: [PATCH 1/2] Fixup aapits build
+
+From http://git.linaro.org/people/al.stone/acpica-tools.git
+Upstream-status: Unknown
+
+diff -urN acpica-unix2-20130626/tests/aapits/atexec.c 
acpica-unix2-20130626-aapits/tests/aapits/atexec.c
+--- acpica-unix2-20130626/tests/aapits/atexec.c2013-01-17 
12:48:28.0 -0700
 acpica-unix2-20130626-aapits/tests/aapits/atexec.c 2013-07-25 
13:44:23.023894441 -0600
+@@ -639,6 +639,7 @@
+ }
+ 
+ 
++#if ACPI_MACHINE_WIDTH == 32
+ 
/***
+  *
+  * FUNCTION:AtBuildLocalRSDT
+@@ -757,8 +758,9 @@
+ LocalRSDT->Header.Checksum = (UINT8)~LocalRSDT->Header.Checksum;
+ }
+ }
++#endif
+ 
+ 
+ 
/***
+  *
+  * FUNCTION:AtBuildLocalXSDT
+@@ -1424,7 +1426,7 @@
+ ACPI_WARNING ((AE_INFO,
+ "Request on [%4.4s] is beyond region limit Req-%X+%X, Base=%X, 
Len-%X\n",
+ (RegionObject->Region.Node)->Name.Ascii, (UINT32) Address,
+-ByteWidth, (UINT32) BufferAddress, Length));
++ByteWidth, (UINT32) BufferAddress, (UINT32) Length));
+ 
+ return (AE_AML_REGION_LIMIT);
+ }
+@@ -1792,7 +1796,9 @@
+ Path, Obj.Integer.Value, Value);
+ #else
+ printf ("API Error: Value of %s is 0x%llx 

[OE-core] why do (some) apache module recipes depend on both apache2 and apache2-native?

2017-01-27 Thread Robert P. J. Day

  i was poking around some apache module recipes, eg,
apache-websocket_git.bb, and noticed:

  DEPENDS = "apache2 apache2-native"
  RDEPENDS_${PN} += "apache2"

i can certainly understand that run-time dependency, but why would an
apache module recipe have a build-time dependency on both the native
and target form of apache?

  is there something unique about the structure of apache that
requires the native component of the sysroot even when building for a
different target?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


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


[OE-core] [PATCH] oeqa/buildperf: don't archive stdout/stderr of commands

2017-01-27 Thread Markus Lehtonen
Stop capturing output of the shell commands into /commands.log.
Redirecting output into a file prevented the unittest framework from
capturing it, causing useless errors (with empty output) like:
oeqa.utils.CommandError: Command '['bitbake', 'core-image-sato']'
returned non-zero exit status 1 with output:

In general, the console output of commands is only interesting when
something fails. Also, dropping the commands.log file is a huge saving
in disk space, and thus, repository size when results are archived in
Git.

Signed-off-by: Markus Lehtonen 
---
 meta/lib/oeqa/buildperf/base.py   | 29 +
 meta/lib/oeqa/buildperf/test_basic.py | 10 +-
 2 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 975524c..dd473a0 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -163,8 +163,6 @@ class BuildPerfTestResult(unittest.TextTestResult):
('status', status),
('start_time', test.start_time),
('elapsed_time', test.elapsed_time),
-   ('cmd_log_file', 
os.path.relpath(test.cmd_log_file,
-
self.out_dir)),
('measurements', test.measurements)])
 if status in ('ERROR', 'FAILURE', 'EXPECTED_FAILURE'):
 test_result['message'] = str(test.err[1])
@@ -268,18 +266,13 @@ class BuildPerfTestCase(unittest.TestCase):
 def out_dir(self):
 return os.path.join(self.base_dir, self.name)
 
-@property
-def cmd_log_file(self):
-return os.path.join(self.out_dir, 'commands.log')
-
 def shortDescription(self):
 return super(BuildPerfTestCase, self).shortDescription() or ""
 
 def setUp(self):
 """Set-up fixture for each test"""
 if self.build_target:
-self.log_cmd_output(['bitbake', self.build_target,
- '-c', 'fetchall'])
+self.run_cmd(['bitbake', self.build_target, '-c', 'fetchall'])
 
 def run(self, *args, **kwargs):
 """Run test"""
@@ -287,13 +280,12 @@ class BuildPerfTestCase(unittest.TestCase):
 super(BuildPerfTestCase, self).run(*args, **kwargs)
 self.elapsed_time = datetime.now() - self.start_time
 
-def log_cmd_output(self, cmd):
-"""Run a command and log it's output"""
+def run_cmd(self, cmd):
+"""Convenience method for running a command"""
 cmd_str = cmd if isinstance(cmd, str) else ' '.join(cmd)
 log.info("Logging command: %s", cmd_str)
 try:
-with open(self.cmd_log_file, 'a') as fobj:
-runCmd2(cmd, stdout=fobj)
+runCmd2(cmd)
 except CommandError as err:
 log.error("Command failed: %s", err.retcode)
 raise
@@ -338,17 +330,14 @@ class BuildPerfTestCase(unittest.TestCase):
 log.info("Timing command: %s", cmd_str)
 data_q = SimpleQueue()
 try:
-with open(self.cmd_log_file, 'a') as fobj:
-proc = Process(target=_worker, args=(data_q, cmd,),
-   kwargs={'stdout': fobj})
-proc.start()
-data = data_q.get()
-proc.join()
+proc = Process(target=_worker, args=(data_q, cmd,))
+proc.start()
+data = data_q.get()
+proc.join()
 if isinstance(data, Exception):
 raise data
 except CommandError:
-log.error("Command '%s' failed, see %s for more details", cmd_str,
-  self.cmd_log_file)
+log.error("Command '%s' failed", cmd_str)
 raise
 etime = data['elapsed_time']
 
diff --git a/meta/lib/oeqa/buildperf/test_basic.py 
b/meta/lib/oeqa/buildperf/test_basic.py
index 7a48c1e..897c3fc 100644
--- a/meta/lib/oeqa/buildperf/test_basic.py
+++ b/meta/lib/oeqa/buildperf/test_basic.py
@@ -38,8 +38,8 @@ class Test1P2(BuildPerfTestCase):
 def test12(self):
 """Measure bitbake virtual/kernel"""
 # Build and cleans state in order to get all dependencies pre-built
-self.log_cmd_output(['bitbake', self.build_target])
-self.log_cmd_output(['bitbake', self.build_target, '-c', 
'cleansstate'])
+self.run_cmd(['bitbake', self.build_target])
+self.run_cmd(['bitbake', self.build_target, '-c', 'cleansstate'])
 
 self.sync()
 self.measure_cmd_resources(['bitbake', self.build_target], 'build',
@@ -74,7 +74,7 @@ class Test2(BuildPerfTestCase):
 def test2(self):
 """Measure bitbake core-image-sato -c rootfs with sstate"""
 # Build once in order to populate sstate cache
-

Re: [OE-core] what is the working directory for configure/compile/install tasks?

2017-01-27 Thread Robert P. J. Day
On Fri, 27 Jan 2017, Burton, Ross wrote:

>
> On 27 January 2017 at 12:44, Robert P. J. Day  wrote:
>     i've been handed a simple example of Makefile-based source to turn
>   into a recipe, and the configure/build process is absolutely
>   straightforward -- top-level "configure" and "Makefile" files to be
>   run -- to the point where i can simply define my own do_configure(),
>   do_compile(), etc. tasks.
>
>
> $ git grep \\[dirs\\] meta/classes/base.bbclass
> meta/classes/base.bbclass:do_fetch[dirs] = "${DL_DIR}"
> meta/classes/base.bbclass:do_unpack[dirs] = "${WORKDIR}"
> meta/classes/base.bbclass:do_configure[dirs] = "${B}"
> meta/classes/base.bbclass:do_compile[dirs] = "${B}"
> meta/classes/base.bbclass:do_install[dirs] = "${B}"

  *sigh* ... i really should have known that.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] build-perf-test-wrapper.sh: fix issues with non-existing path arguments

2017-01-27 Thread Markus Lehtonen
Without the '-s' option realpath will error out if the given path does
not exist.

Signed-off-by: Markus Lehtonen 
---
 scripts/contrib/build-perf-test-wrapper.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/contrib/build-perf-test-wrapper.sh 
b/scripts/contrib/build-perf-test-wrapper.sh
index e03ea97..affd242 100755
--- a/scripts/contrib/build-perf-test-wrapper.sh
+++ b/scripts/contrib/build-perf-test-wrapper.sh
@@ -44,14 +44,14 @@ while getopts "ha:c:C:w:" opt; do
 h)  usage
 exit 0
 ;;
-a)  archive_dir=`realpath "$OPTARG"`
+a)  archive_dir=`realpath -s "$OPTARG"`
 ;;
 c)  commitish=$OPTARG
 ;;
-C)  results_repo=`realpath "$OPTARG"`
+C)  results_repo=`realpath -s "$OPTARG"`
 commit_results=("--commit-results" "$results_repo")
 ;;
-w)  base_dir=`realpath "$OPTARG"`
+w)  base_dir=`realpath -s "$OPTARG"`
 ;;
 *)  usage
 exit 1
-- 
2.10.2

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


Re: [OE-core] what is the working directory for configure/compile/install tasks?

2017-01-27 Thread Burton, Ross
On 27 January 2017 at 12:44, Robert P. J. Day  wrote:

>   i've been handed a simple example of Makefile-based source to turn
> into a recipe, and the configure/build process is absolutely
> straightforward -- top-level "configure" and "Makefile" files to be
> run -- to the point where i can simply define my own do_configure(),
> do_compile(), etc. tasks.
>

$ git grep \\[dirs\\] meta/classes/base.bbclass
meta/classes/base.bbclass:do_fetch[dirs] = "${DL_DIR}"
meta/classes/base.bbclass:do_unpack[dirs] = "${WORKDIR}"
meta/classes/base.bbclass:do_configure[dirs] = "${B}"
meta/classes/base.bbclass:do_compile[dirs] = "${B}"
meta/classes/base.bbclass:do_install[dirs] = "${B}"

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


Re: [OE-core] what is the working directory for configure/compile/install tasks?

2017-01-27 Thread Alexander Kanavin

On 01/27/2017 02:44 PM, Robert P. J. Day wrote:





  i've been handed a simple example of Makefile-based source to turn
into a recipe, and the configure/build process is absolutely
straightforward -- top-level "configure" and "Makefile" files to be
run -- to the point where i can simply define my own do_configure(),
do_compile(), etc. tasks.


It's not entirely clear, but is the source GNU autotools based? Can you 
provide a link to it, so we can see what configure actually does?


Alex

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


[OE-core] what is the working directory for configure/compile/install tasks?

2017-01-27 Thread Robert P. J. Day

  this is such a simple question, i'm kind of embarrassed to be asking
it.

  i've been handed a simple example of Makefile-based source to turn
into a recipe, and the configure/build process is absolutely
straightforward -- top-level "configure" and "Makefile" files to be
run -- to the point where i can simply define my own do_configure(),
do_compile(), etc. tasks.

  i'm aware that most tasks are defined in terms of commands that
explicitly use directory references with "S", "B", "D", WORKDIR, and
so on and so on. but if i want to define a do_configure() task that
does nothing more than invokes the top-level "configure" script, how
would i refer to it?

  i'm reading the YP dev manual, and it'a just a bit vague on this
topic, unless i managed to miss it.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


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


Re: [OE-core] sysroots, wic-tools and rm_work

2017-01-27 Thread Kristian Amlie
On 27/01/17 13:05, Patrick Ohly wrote:
> On Thu, 2017-01-26 at 16:39 +0100, Kristian Amlie wrote:
>> It seems like wic doesn't work together with rm_work, because of its
>> dependency on wic-tools. The reason is that building wic-tools will
>> result in rm_work removing the very sysroot that wic needs.
>>
>> It's easy to fix locally by adding
>>
>>   RM_WORK_EXCLUDE = "wic-tools"
>>
>> however, I think this deserves a more permanent fix, and I'm not sure
>> which approach is best.
> 
> wic-tools.bb can have:
> RM_WORK_EXCLUDE += "${PN}"

Ah yes, it can be local to the recipe, I didn't think about that. I'll
post a patch shortly.

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


Re: [OE-core] sysroots, wic-tools and rm_work

2017-01-27 Thread Patrick Ohly
On Thu, 2017-01-26 at 16:39 +0100, Kristian Amlie wrote:
> It seems like wic doesn't work together with rm_work, because of its
> dependency on wic-tools. The reason is that building wic-tools will
> result in rm_work removing the very sysroot that wic needs.
> 
> It's easy to fix locally by adding
> 
>   RM_WORK_EXCLUDE = "wic-tools"
> 
> however, I think this deserves a more permanent fix, and I'm not sure
> which approach is best.

wic-tools.bb can have:
RM_WORK_EXCLUDE += "${PN}"

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


[OE-core] [PATCH][morty] libXrandr: fix for CVE-2016-7947 and CVE-2016-7948

2017-01-27 Thread Sona Sarmadi
CVE-2016-7947
Insufficient validation of server responses result in Integer overflows

CVE-2016-7948
Insufficient validation of server responses result in various data mishandlings

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7947
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7948
https://lists.x.org/archives/xorg-announce/2016-October/002720.html

Upstream patch for both CVEs:
https://cgit.freedesktop.org/xorg/lib/libXrandr/commit/?id=a0df3e1c7728205e5c7650b2e6dce684139254a6

Signed-off-by: Sona Sarmadi 
---
 .../libxrandr/CVE-2016-7947_CVE-2016-7948.patch| 439 +
 meta/recipes-graphics/xorg-lib/libxrandr_1.5.0.bb  |   3 +
 2 files changed, 442 insertions(+)
 create mode 100644 
meta/recipes-graphics/xorg-lib/libxrandr/CVE-2016-7947_CVE-2016-7948.patch

diff --git 
a/meta/recipes-graphics/xorg-lib/libxrandr/CVE-2016-7947_CVE-2016-7948.patch 
b/meta/recipes-graphics/xorg-lib/libxrandr/CVE-2016-7947_CVE-2016-7948.patch
new file mode 100644
index 000..a9b3dbc
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libxrandr/CVE-2016-7947_CVE-2016-7948.patch
@@ -0,0 +1,439 @@
+From a0df3e1c7728205e5c7650b2e6dce684139254a6 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann 
+Date: Sun, 25 Sep 2016 22:21:40 +0200
+Subject: Avoid out of boundary accesses on illegal responses
+
+The responses of the connected X server have to be properly checked
+to avoid out of boundary accesses that could otherwise be triggered
+by a malicious server.
+
+CVE: CVE-2016-7947
+libXrandr: Insufficient validation of server responses result in Integer 
overflows
+
+CVE: CVE-2016-7948
+libXrandr: Insufficient validation of server responses result in various data 
mishandlings
+
+Upstream-Status: Backport
+
+Signed-off-by: Tobias Stoeckmann 
+Reviewed-by: Matthieu Herrb 
+Signed-off-by: Sona Sarmadi 
+
+diff --git a/src/XrrConfig.c b/src/XrrConfig.c
+index 2f0282b..e68c45a 100644
+--- a/src/XrrConfig.c
 b/src/XrrConfig.c
+@@ -29,6 +29,7 @@
+ #include 
+ #endif
+ 
++#include 
+ #include 
+ #include 
+ /* we need to be able to manipulate the Display structure on events */
+@@ -272,23 +273,30 @@ static XRRScreenConfiguration *_XRRGetScreenInfo 
(Display *dpy,
+   rep.rate = 0;
+   rep.nrateEnts = 0;
+ }
++if (rep.length < INT_MAX >> 2) {
++  nbytes = (long) rep.length << 2;
+ 
+-nbytes = (long) rep.length << 2;
++  nbytesRead = (long) (rep.nSizes * SIZEOF (xScreenSizes) +
++  ((rep.nrateEnts + 1)& ~1) * 2 /* SIZEOF(CARD16) */);
+ 
+-nbytesRead = (long) (rep.nSizes * SIZEOF (xScreenSizes) +
+-   ((rep.nrateEnts + 1)& ~1) * 2 /* SIZEOF (CARD16) */);
++  /*
++   * first we must compute how much space to allocate for
++   * randr library's use; we'll allocate the structures in a single
++   * allocation, on cleanlyness grounds.
++   */
+ 
+-/*
+- * first we must compute how much space to allocate for
+- * randr library's use; we'll allocate the structures in a single
+- * allocation, on cleanlyness grounds.
+- */
++  rbytes = sizeof (XRRScreenConfiguration) +
++(rep.nSizes * sizeof (XRRScreenSize) +
++ rep.nrateEnts * sizeof (int));
+ 
+-rbytes = sizeof (XRRScreenConfiguration) +
+-  (rep.nSizes * sizeof (XRRScreenSize) +
+-   rep.nrateEnts * sizeof (int));
++  scp = (struct _XRRScreenConfiguration *) Xmalloc(rbytes);
++} else {
++  nbytes = 0;
++  nbytesRead = 0;
++  rbytes = 0;
++  scp = NULL;
++}
+ 
+-scp = (struct _XRRScreenConfiguration *) Xmalloc(rbytes);
+ if (scp == NULL) {
+   _XEatData (dpy, (unsigned long) nbytes);
+   return NULL;
+diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
+index 5ae35c5..6665092 100644
+--- a/src/XrrCrtc.c
 b/src/XrrCrtc.c
+@@ -24,6 +24,7 @@
+ #include 
+ #endif
+ 
++#include 
+ #include 
+ #include 
+ /* we need to be able to manipulate the Display structure on events */
+@@ -57,22 +58,33 @@ XRRGetCrtcInfo (Display *dpy, XRRScreenResources 
*resources, RRCrtc crtc)
+   return NULL;
+ }
+ 
+-nbytes = (long) rep.length << 2;
++if (rep.length < INT_MAX >> 2)
++{
++  nbytes = (long) rep.length << 2;
+ 
+-nbytesRead = (long) (rep.nOutput * 4 +
+-   rep.nPossibleOutput * 4);
++  nbytesRead = (long) (rep.nOutput * 4 +
++   rep.nPossibleOutput * 4);
+ 
+-/*
+- * first we must compute how much space to allocate for
+- * randr library's use; we'll allocate the structures in a single
+- * allocation, on cleanlyness grounds.
+- */
++  /*
++   * first we must compute how much space to allocate for
++   * randr library's use; we'll allocate the structures in a single
++   * allocation, on cleanlyness grounds.
++   */
+ 
+-rbytes = (sizeof 

[OE-core] ✗ patchtest: failure for python3: support profile-optimized build

2017-01-27 Thread Patchwork
== Series Details ==

Series: python3: support profile-optimized build
Revision: 1
URL   : https://patchwork.openembedded.org/series/5027/
State : failure

== Summary ==


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



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



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

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


[OE-core] [PATCH RFC 10/10] python-pgo-image: change python3 profile target to pybench

2017-01-27 Thread Markus Lehtonen
Running test.regrtest was still taking ridiculously long, i.e. around 4
hours in qemux86 on my desktop machine. Change to pybench which "only"
takes around 55 minutes.

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 meta/recipes-devtools/images/python-pgo-image.bb | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/images/python-pgo-image.bb 
b/meta/recipes-devtools/images/python-pgo-image.bb
index db67cf3..008598e 100644
--- a/meta/recipes-devtools/images/python-pgo-image.bb
+++ b/meta/recipes-devtools/images/python-pgo-image.bb
@@ -3,7 +3,7 @@ SUMMARY = "Minimal image for doing Python profiling (for PGO)"
 IMAGE_FEATURES += "ssh-server-dropbear"
 IMAGE_INSTALL = "packagegroup-core-boot"
 IMAGE_INSTALL += "python-profile-opt python-profile-opt-tests 
python-profile-opt-tools"
-IMAGE_INSTALL += "python-profile-opt3 python-profile-opt3-tests"
+IMAGE_INSTALL += "python-profile-opt3 python-profile-opt3-tests 
python-profile-opt3-tools"
 
 LICENSE = "MIT"
 
@@ -22,12 +22,13 @@ PYTHON_PROFILE_TASK_DEFAULT = 
"/opt/share/doc/python-profile-opt/Tools/pybench/p
 PYTHON_PROFILE_TASK ?= "${PYTHON_PROFILE_TASK_DEFAULT}"
 
 PYTHON3_PROFILE_DIR ?= "${TMPDIR}/work-shared/${MACHINE}/python3/pgo-data"
-PYTHON3_PROFILE_TASK_DEFAULT = "-m test.regrtest --pgo -w -x test_asyncore 
test_gdb test_multiprocessing_fork test_multiprocessing_forkserver 
test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess"
+#PYTHON3_PROFILE_TASK_DEFAULT = "-m test.regrtest --pgo -w -x test_asyncore 
test_gdb test_multiprocessing_fork test_multiprocessing_forkserver 
test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess"
 # Exclude tests that are failing on qemux86
-PYTHON3_PROFILE_TASK_DEFAULT += "test_builtin test_cmath 
test_concurrent_futures test_difflib test_distutils test_float test_format 
test_math test_optparse test_shutil test_statistics test_types test_unicode"
+#PYTHON3_PROFILE_TASK_DEFAULT += "test_builtin test_cmath 
test_concurrent_futures test_difflib test_distutils test_float test_format 
test_math test_optparse test_shutil test_statistics test_types test_unicode"
 # Exclude tests that are taking very long on qemux86
-PYTHON3_PROFILE_TASK_DEFAULT += "test_lib2to3 test_buffer test_pickle test_io 
test_threading test_asyncio test_urllib2_localnet test_itertools test_tuple 
test_trace test_tarfile test_unicodedata test_decimal"
-PYTHON3_PROFILE_TASK_DEFAULT += "test_long test_zipfile test_deque test_descr 
test_email test_venv test_bytes test_compileall test_ast test_multibytecodec"
+#PYTHON3_PROFILE_TASK_DEFAULT += "test_lib2to3 test_buffer test_pickle test_io 
test_threading test_asyncio test_urllib2_localnet test_itertools test_tuple 
test_trace test_tarfile test_unicodedata test_decimal"
+#PYTHON3_PROFILE_TASK_DEFAULT += "test_long test_zipfile test_deque test_descr 
test_email test_venv test_bytes test_compileall test_ast test_multibytecodec"
+PYTHON3_PROFILE_TASK_DEFAULT = 
"/opt/share/doc/python-profile-opt3/Tools/pybench/pybench.py -n 2 --with-gc 
--with-syscheck"
 
 PYTHON3_PROFILE_TASK ?= "${PYTHON3_PROFILE_TASK_DEFAULT}"
 
-- 
2.10.2

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


[OE-core] [PATCH RFC 00/10] python3: support profile-optimized build

2017-01-27 Thread Markus Lehtonen
This patchset implements profile-guided-optimization (PGO) for Python 3. The
implementation is very similar to my previous patchset for Python 2.7.

PGO for python3-native is one simple patch. PGO for target python3 is more
complicated and follows the lines of Python 2.7:
1. add new python-profile-opt3 recipe that is a special version of python3
   with profile instrumentation enabled
2. add new do_profile3 in python-pgo-image for running the python3 profile task
   in the target
3. enable usage of profile data in python3 do_compile

Configration variables for controlling the feature are:
PYTHON3_PROFILE_OPT  - set to "1" to enable PGO on python3
PYTHON3_PROFILE_TASK - profile task to run for python3
PYTHON3_NATIVE_PROFILE_OPT   - set to "1" to enable PGO on python3-native
PYTHON3_NATIVE_PROFILE_TASK  - profile task to run for python3-native

Benchmark results from my i7-3770K are found below.
python3-native:
  pystone:  118288 -> 138026 pystones/s (+17%)
  pybench avg:  3428   -> 3118 ms   (-9%)
  regrtest time:598-> 550 s (-8%)

python3 (target):
  pystone:  1531   -> 1616 pystones/s   (+5.5%)
  pybench avg:  215901 -> 207498 ms (-3.9%)
  regrtest time:8355   -> 8157  (-2.4%)

Again, these are just ballpark figures from few test runs.


The following changes since commit ccf50ba2e045b7b690a10633710872845a63943f:

  python-pgo-image: enable sstate for do_profile (2017-01-24 15:23:49 +0200)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib marquiz/fixes-9338-py3
  
http://git.openembedded.org/openembedded-core-contrib/log/?h=marquiz/fixes-9338-py3


Markus Lehtonen (10):
  python3-native: support profile optimized build
  python3: fix depends of python-tests
  python3: add python-profile-opt3 recipe
  python-pgo-image: profiling for python3
  python3: remove two setup.py cross-compile hacks
  python3: support profile optimized build
  python3: fix profile-optimized build of modules
  python-pgo-image: exclude tests from the python3 profile target
  python3: add python3-tools subpackage
  python-pgo-image: change python3 profile target to pybench

 meta/recipes-devtools/images/python-pgo-image.bb   |  61 +--
 .../python/python-3.5-manifest.inc |  10 +-
 meta/recipes-devtools/python/python-profile-opt3   |   1 +
 .../python/python-profile-opt3_3.5.2.bb|  15 +++
 .../python/python3-native_3.5.2.bb |   9 ++
 .../python/python3/000-cross-compile.patch |   9 --
 ...efile-add-install_generate_profile-target.patch |  25 +
 ...-CFLAGS-for-extensions-when-cross-compili.patch |  56 +++
 .../python3-setup.py-no-host-headers-libs.patch|  33 --
 ...name-libpython3-to-libpython-profile-opt3.patch | 111 +
 .../setup.py-find-libraries-in-staging-dirs.patch  |  30 --
 meta/recipes-devtools/python/python3_3.5.2.bb  |  74 ++
 12 files changed, 325 insertions(+), 109 deletions(-)
 create mode 12 meta/recipes-devtools/python/python-profile-opt3
 create mode 100644 meta/recipes-devtools/python/python-profile-opt3_3.5.2.bb
 create mode 100644 
meta/recipes-devtools/python/python3/Makefile-add-install_generate_profile-target.patch
 create mode 100644 
meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
 delete mode 100644 
meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
 create mode 100644 
meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch
 delete mode 100644 
meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch

-- 
2.10.2

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


[OE-core] [PATCH RFC 08/10] python-pgo-image: exclude tests from the python3 profile target

2017-01-27 Thread Markus Lehtonen
Exlude failing tests (on qemux86 target) which would cause the profile
task to fail.

Also, disable some very long running tests. Running in qemux86 target on
my i7-3770K:
  test_lib2to3: 1604.5s
  test_buffer: 1562.8s
  test_pickle: 1527.0s
  test_io: 1517.8s
  test_threading: 1384.1s
  test_asyncio: 1380.9s
  test_urllib2_localnet: 1276.8s
  test_itertools: 944.7s
  test_tuple: 847.7s
  test_trace: 756.7s
  test_tarfile: 716.7s
  test_unicodedata: 709.9s
  test_decimal: 615.1s
  test_buffer: 1562.8s
  test_pickle: 1527.0s
  test_io: 1517.8s
  test_threading: 1384.1s
  test_asyncio: 1380.9s
  test_urllib2_localnet: 1276.8s
  test_itertools: 944.7s
  test_tuple: 847.7s
  test_trace: 756.7s
  test_tarfile: 716.7s
  test_unicodedata: 709.9s
  test_decimal: 615.1s

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 meta/recipes-devtools/images/python-pgo-image.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/images/python-pgo-image.bb 
b/meta/recipes-devtools/images/python-pgo-image.bb
index ca690d5..db67cf3 100644
--- a/meta/recipes-devtools/images/python-pgo-image.bb
+++ b/meta/recipes-devtools/images/python-pgo-image.bb
@@ -23,6 +23,11 @@ PYTHON_PROFILE_TASK ?= "${PYTHON_PROFILE_TASK_DEFAULT}"
 
 PYTHON3_PROFILE_DIR ?= "${TMPDIR}/work-shared/${MACHINE}/python3/pgo-data"
 PYTHON3_PROFILE_TASK_DEFAULT = "-m test.regrtest --pgo -w -x test_asyncore 
test_gdb test_multiprocessing_fork test_multiprocessing_forkserver 
test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess"
+# Exclude tests that are failing on qemux86
+PYTHON3_PROFILE_TASK_DEFAULT += "test_builtin test_cmath 
test_concurrent_futures test_difflib test_distutils test_float test_format 
test_math test_optparse test_shutil test_statistics test_types test_unicode"
+# Exclude tests that are taking very long on qemux86
+PYTHON3_PROFILE_TASK_DEFAULT += "test_lib2to3 test_buffer test_pickle test_io 
test_threading test_asyncio test_urllib2_localnet test_itertools test_tuple 
test_trace test_tarfile test_unicodedata test_decimal"
+PYTHON3_PROFILE_TASK_DEFAULT += "test_long test_zipfile test_deque test_descr 
test_email test_venv test_bytes test_compileall test_ast test_multibytecodec"
 
 PYTHON3_PROFILE_TASK ?= "${PYTHON3_PROFILE_TASK_DEFAULT}"
 
-- 
2.10.2

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


[OE-core] [PATCH RFC 05/10] python3: remove two setup.py cross-compile hacks

2017-01-27 Thread Markus Lehtonen
Remove two unneeded hacks. The first hack ("setup.py: no host headers
libs" patch) is not needed because we use cross-compiler (e.g.
i586-oe-linux-gcc) which has not been configured with any host system
include or library directories, and thus, we don't get any host system
directories when running "gcc -E -v".

The second hack becomes useless after the first hack has been removed
and we get the standard include and lib directories normally from gcc.

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 .../python3-setup.py-no-host-headers-libs.patch| 33 --
 .../setup.py-find-libraries-in-staging-dirs.patch  | 30 
 meta/recipes-devtools/python/python3_3.5.2.bb  |  2 --
 3 files changed, 65 deletions(-)
 delete mode 100644 
meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
 delete mode 100644 
meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch

diff --git 
a/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
 
b/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
deleted file mode 100644
index 2bc8b8c..000
--- 
a/meta/recipes-devtools/python/python3/python3-setup.py-no-host-headers-libs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 43238e1ac13e32984d015c92a5841f3de1fe1d15 Mon Sep 17 00:00:00 2001
-From: Jackie Huang 
-Date: Tue, 18 Nov 2014 00:07:07 -0500
-Subject: [PATCH] setup.py: no host headers libs
-
-When we are cross-compiling, setup.py should never look in /usr
-or /usr/local to find headers or libraries.
-
-Upstream-Status: Inappropriate [Cross compile specific]
-
-Signed-off-by: Jackie Huang 

- setup.py | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index f020b28..e8339cd 100644
 a/setup.py
-+++ b/setup.py
-@@ -444,10 +444,7 @@ class PyBuildExt(build_ext):
- if not cross_compiling:
- add_dir_to_list(self.compiler.library_dirs, 
os.path.join('/usr/local', sys.lib))
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
--# only change this for cross builds for 3.3, issues on Mageia
--if cross_compiling:
- self.add_gcc_paths()
--if not cross_compiling:
- self.add_multiarch_paths()
- 
- # Add paths specified in the environment variables LDFLAGS and
--- 
-2.0.0
-
diff --git 
a/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
 
b/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
deleted file mode 100644
index f26bd38..000
--- 
a/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Patch setup.py so that the detect_modules() function looks for required
-libraries and headers in STAGING_LIBDIR / STAGING_INCDIR.
-
-Without this patch, several extension modules are not built, even though
-their dependencies are present in the compiler's search paths.
-The result is the following warning, and ultimately incomplete packages:
-
-| The necessary bits to build these optional modules were not found:
-| _bz2  _curses_panel _dbm
-| _gdbm _lzma _sqlite3
-| nis   readline  zlib
-| To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.
-
-Upstream-Status:  Inappropriate [Cross compile specific]
-
-Signed-off-by: Dominic Sacré 
-
-Index: Python-3.4.3/setup.py
-===
 Python-3.4.3.orig/setup.py
-+++ Python-3.4.3/setup.py
-@@ -521,6 +521,8 @@ class PyBuildExt(build_ext):
- else:
- lib_dirs = self.compiler.library_dirs[:]
- inc_dirs = self.compiler.include_dirs[:]
-+lib_dirs.append(os.environ.get('STAGING_LIBDIR'))
-+inc_dirs.append(os.environ.get('STAGING_INCDIR'))
- exts = []
- missing = []
- 
diff --git a/meta/recipes-devtools/python/python3_3.5.2.bb 
b/meta/recipes-devtools/python/python3_3.5.2.bb
index 609c28f..ead8a0d 100644
--- a/meta/recipes-devtools/python/python3_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3_3.5.2.bb
@@ -30,10 +30,8 @@ SRC_URI += "\
 file://unixccompiler.patch \
 file://avoid-ncursesw-include-path.patch \
 file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
-file://python3-setup.py-no-host-headers-libs.patch \
 file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
 file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
-file://setup.py-find-libraries-in-staging-dirs.patch \
 file://configure.ac-fix-LIBPL.patch \
 file://python3-fix-CVE-2016-1000110.patch \
"

[OE-core] [PATCH RFC 07/10] python3: fix profile-optimized build of modules

2017-01-27 Thread Markus Lehtonen
Without this the pgo-related compiler flags are not used in
cross-builds.

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 ...-CFLAGS-for-extensions-when-cross-compili.patch | 56 ++
 meta/recipes-devtools/python/python3_3.5.2.bb  |  1 +
 2 files changed, 57 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch

diff --git 
a/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
 
b/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
new file mode 100644
index 000..bf239c6
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
@@ -0,0 +1,56 @@
+From 0fd8b986888ddf1995b503edf46ac827e83114d9 Mon Sep 17 00:00:00 2001
+From: Markus Lehtonen 
+Date: Wed, 23 Nov 2016 16:08:04 +0200
+Subject: [PATCH] Use correct CFLAGS for extensions when cross-compiling
+
+Take PY_CFLAGS_NODIST into account, like in native build. This is needed
+in order to to profile-optimized build. Also, pass EXTRA_CFLAGS to
+profile-optimized build.
+
+Upstream-Status: Pending
+
+Signed-off-by: Markus Lehtonen 
+---
+ Makefile.pre.in | 4 ++--
+ setup.py| 3 ++-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index bace00e..9635aa4 100644
+--- a/Makefile.pre.in
 b/Makefile.pre.in
+@@ -509,7 +509,7 @@ profile-opt:
+   $(MAKE) profile-removal
+ 
+ build_all_generate_profile:
+-  $(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" 
LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LIBS="$(LIBS)"
++  $(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) 
$(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) 
@LTOFLAGS@" LIBS="$(LIBS)"
+ 
+ run_profile_task:
+   : # FIXME: can't run for a cross build
+@@ -519,7 +519,7 @@ build_all_merge_profile:
+   $(LLVM_PROF_MERGER)
+ 
+ build_all_use_profile:
+-  $(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG) @LTOFLAGS@" 
LDFLAGS="$(LDFLAGS) @LTOFLAGS@"
++  $(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) 
$(PGO_PROF_USE_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) @LTOFLAGS@"
+ 
+ # Compile and run with gcov
+ .PHONY=coverage coverage-lcov coverage-report
+diff --git a/setup.py b/setup.py
+index c1ce87e..72d37cf 100644
+--- a/setup.py
 b/setup.py
+@@ -271,7 +271,8 @@ class PyBuildExt(build_ext):
+ # compilers
+ if compiler is not None:
+ if cross_compiling:
+-(ccshared,cflags) = (os.environ.get('CCSHARED') or '', 
os.environ.get('CFLAGS') or '')
++(ccshared,cflags) = (os.environ.get('CCSHARED') or '',
++ (os.environ.get('CFLAGS') or '') + ' ' + 
sysconfig.get_config_var('PY_CFLAGS_NODIST'))
+ else:
+ (ccshared,cflags) = 
sysconfig.get_config_vars('CCSHARED','CFLAGS')
+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
+-- 
+2.6.6
+
diff --git a/meta/recipes-devtools/python/python3_3.5.2.bb 
b/meta/recipes-devtools/python/python3_3.5.2.bb
index 7e629b8..77ab071 100644
--- a/meta/recipes-devtools/python/python3_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3_3.5.2.bb
@@ -34,6 +34,7 @@ SRC_URI += "\
 file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
 file://configure.ac-fix-LIBPL.patch \
 file://python3-fix-CVE-2016-1000110.patch \
+file://Use-correct-CFLAGS-for-extensions-when-cross-compili.patch \
"
 SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e"
 SRC_URI[sha256sum] = 
"0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
-- 
2.10.2

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


[OE-core] [PATCH RFC 09/10] python3: add python3-tools subpackage

2017-01-27 Thread Markus Lehtonen
[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 8 +---
 meta/recipes-devtools/python/python3_3.5.2.bb| 5 +
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 1056ea6..8947b44 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -5,9 +5,9 @@
 
  
 
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs 
${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes 
${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib 
${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-enum 
${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib 
${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math 
${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver 
${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc 
${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors 
${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests 
${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests 
${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin 
${PN}-xml ${PN}-xmlrpc "
+PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs 
${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes 
${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib 
${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-enum 
${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib 
${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math 
${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver 
${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc 
${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors 
${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests 
${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests 
${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin 
${PN}-xml ${PN}-xmlrpc ${PN}-tools "
 
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio 
${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt 
${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev 
${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest 
${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image 
${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox 
${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient 
${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint 
${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource 
${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 
${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog 
${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter 
${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio 
${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt 
${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev 
${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest 
${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image 
${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox 
${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient 
${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint 
${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource 
${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 
${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog 
${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter 
${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules ${PN}-tools"
 
 SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
 RDEPENDS_${PN}-2to3="${PN}-core"
@@ -277,4 +277,6 @@ SUMMARY_${PN}-modules="All Python modules"
 RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio 
${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt 
${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib 
${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm 
${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json 
${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap 
${PN}-multiprocessing ${PN}-netclient 

[OE-core] [PATCH RFC 06/10] python3: support profile optimized build

2017-01-27 Thread Markus Lehtonen
Make it possible to do profile-optimized build. The implementation is
virtually identical to how we do it in Python 2.7. Basically, you need
to define PYTHON3_PROFILE_OPT = "1" in your local.conf and have profile
data available in the location pointed to by PYTHON3_PROFILE_DIR.
Profile data can be obtainen e.g. by running bitbake python-pgo-image -c
profile3.

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 meta/recipes-devtools/python/python3_3.5.2.bb | 20 
 1 file changed, 20 insertions(+)

diff --git a/meta/recipes-devtools/python/python3_3.5.2.bb 
b/meta/recipes-devtools/python/python3_3.5.2.bb
index ead8a0d..7e629b8 100644
--- a/meta/recipes-devtools/python/python3_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3_3.5.2.bb
@@ -77,6 +77,17 @@ export CROSSPYTHONPATH = 
"${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dy
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""
 
+# Automatic profile guided optimization
+PYTHON3_MAKE_TARGET ?= "${@'build_all_use_profile' if 
d.getVar('PYTHON3_PROFILE_OPT', True) == '1' else ''}"
+PYTHON3_PROFILE_DIR ?= "${@'${TMPDIR}/work-shared/${MACHINE}/python3/pgo-data' 
if d.getVar('PYTHON3_PROFILE_OPT', True) == '1' else ''}"
+python () {
+if (d.getVar('PYTHON3_PROFILE_OPT', True) == '1' and
+d.getVar('PYTHON3_MAKE_TARGET', True) == 'build_all_use_profile'):
+profile_dir = d.getVar('PYTHON3_PROFILE_DIR', True)
+bb.utils.mkdirhier(profile_dir)
+d.setVarFlag('do_compile', 'file-checksums', '%s:True' % profile_dir)
+}
+
 do_configure_append() {
rm -f ${S}/Makefile.orig
autoreconf -Wcross --verbose --install --force --exclude=autopoint 
../Python-${PV}/Modules/_ctypes/libffi
@@ -116,6 +127,10 @@ do_compile() {
 if [ "${PYTHON3_MAKE_TARGET}" = "build_all_generate_profile" ]; then
 # This is only used in PGO profiling by python-profile-opt package
 export EXTRA_CFLAGS="-fprofile-dir=./python3-pgo-profiles/"
+elif [ -n "${PYTHON3_PROFILE_DIR}" ]; then
+export EXTRA_CFLAGS="-fprofile-dir=${PYTHON3_PROFILE_DIR}"
+# Remove non-optimized build artefacts
+oe_runmake clean
 fi
 
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
@@ -136,6 +151,11 @@ do_install() {
install -d ${D}${libdir}/pkgconfig
install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
 
+# This only has effect if we build with -fprofile-use, e.g. when make
+# target is build_all_use_profile
+if [ -n "${PYTHON3_PROFILE_DIR}" ]; then
+export EXTRA_CFLAGS="-fprofile-dir=${PYTHON3_PROFILE_DIR}"
+fi
# rerun the build once again with original makefile this time
# run install in a separate step to avoid compile/install race
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-- 
2.10.2

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


[OE-core] [PATCH RFC 02/10] python3: fix depends of python-tests

2017-01-27 Thread Markus Lehtonen
Similar to an earlier fix for Python 2.7. Make the tests subpackage
depend on all modules as test.regrtest uses most (if not all) of them.

Some tests also depend on libgcc so add that as a runtime dependency as
well.

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index b92048f..1056ea6 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -242,7 +242,7 @@ RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
 FILES_${PN}-terminal="${libdir}/python3.5/pty.* 
${libdir}/python3.5/__pycache__/pty.* ${libdir}/python3.5/tty.* 
${libdir}/python3.5/__pycache__/tty.* "
 
 SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core"
+RDEPENDS_${PN}-tests="${PN}-core ${PN}-modules libgcc"
 FILES_${PN}-tests="${libdir}/python3.5/test 
${libdir}/python3.5/test/__pycache__ "
 
 SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-- 
2.10.2

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


[OE-core] [PATCH RFC 04/10] python-pgo-image: profiling for python3

2017-01-27 Thread Markus Lehtonen
Add a new 'do_profile3' task for python-pgo-image that runs profiling
task for python3 and retrieves the profile data, similarly to
'do_profile' for python2. Profile data will be copied into a directory
pointed by PYTHON3_PROFILE_DIR on the host system. The profile task may
be specified with PYTHON3_PROFILE_TASK.

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 meta/recipes-devtools/images/python-pgo-image.bb | 55 +++-
 1 file changed, 44 insertions(+), 11 deletions(-)

diff --git a/meta/recipes-devtools/images/python-pgo-image.bb 
b/meta/recipes-devtools/images/python-pgo-image.bb
index bab95f8..ca690d5 100644
--- a/meta/recipes-devtools/images/python-pgo-image.bb
+++ b/meta/recipes-devtools/images/python-pgo-image.bb
@@ -3,6 +3,7 @@ SUMMARY = "Minimal image for doing Python profiling (for PGO)"
 IMAGE_FEATURES += "ssh-server-dropbear"
 IMAGE_INSTALL = "packagegroup-core-boot"
 IMAGE_INSTALL += "python-profile-opt python-profile-opt-tests 
python-profile-opt-tools"
+IMAGE_INSTALL += "python-profile-opt3 python-profile-opt3-tests"
 
 LICENSE = "MIT"
 
@@ -20,12 +21,17 @@ PYTHON_PROFILE_TASK_DEFAULT = "-m test.regrtest --pgo -w -x 
test_asyncore test_g
 PYTHON_PROFILE_TASK_DEFAULT = 
"/opt/share/doc/python-profile-opt/Tools/pybench/pybench.py -n 2 --with-gc 
--with-syscheck"
 PYTHON_PROFILE_TASK ?= "${PYTHON_PROFILE_TASK_DEFAULT}"
 
+PYTHON3_PROFILE_DIR ?= "${TMPDIR}/work-shared/${MACHINE}/python3/pgo-data"
+PYTHON3_PROFILE_TASK_DEFAULT = "-m test.regrtest --pgo -w -x test_asyncore 
test_gdb test_multiprocessing_fork test_multiprocessing_forkserver 
test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess"
+
+PYTHON3_PROFILE_TASK ?= "${PYTHON3_PROFILE_TASK_DEFAULT}"
+
 # We need these because we're utilizing the runtime test helpers from oeqa
 TEST_TARGET ?= "qemu"
 TEST_QEMUBOOT_TIMEOUT ?= "1000"
 TEST_LOG_DIR ?= "${WORKDIR}/qemulogs"
 
-python do_profile() {
+def run_profile(d, profile_bin, profile_task, tgt_in_dir, host_out_dir):
 from oeqa.targetcontrol import get_target_controller
 from oe.utils import getstatusoutput
 
@@ -39,37 +45,64 @@ python do_profile() {
 target.start(extra_bootparams=bootparams)
 
 # Run profile task
-profile_cmd = 'LD_LIBRARY_PATH=/opt/lib /opt/bin/python %s' % 
d.getVar("PYTHON_PROFILE_TASK", True)
-ret, output = target.run(profile_cmd, timeout=7200)
+ret, output = target.run(profile_bin + ' ' + profile_task, 
timeout=7200)
 if ret:
 bb.fatal("Failed to run profile task on target: %s" % output)
-ret, output = target.run('tar czf pgo-data.tgz -C 
/home/root/python-pgo-profiles/ .')
+ret, output = target.run('tar czf pgo-data.tgz -C %s .' % tgt_in_dir)
 if ret:
 bb.fatal("Failed to archive profile data on target: %s" % output)
 
 # Retrieve and unpack profile data
-profile_dir = d.getVar("PROFILE_DATA_WORKDIR", True)
-target.copy_from('/home/root/pgo-data.tgz', profile_dir)
+target.copy_from('/home/root/pgo-data.tgz', host_out_dir)
 
-profile_tarball = os.path.join(profile_dir, 'pgo-data.tgz')
-ret, output = getstatusoutput('tar xf %s -C %s' % (profile_tarball, 
profile_dir))
+profile_tarball = os.path.join(host_out_dir, 'pgo-data.tgz')
+ret, output = getstatusoutput('tar xf %s -C %s' % (profile_tarball, 
host_out_dir))
 os.unlink(profile_tarball)
 if ret:
 bb.fatal("Failed to unpack python profile data: %s" % output)
 finally:
 target.stop()
+
+
+# Profile task for Python2
+python do_profile() {
+run_profile(d, 'LD_LIBRARY_PATH=/opt/lib /opt/bin/python',
+d.getVar('PYTHON_PROFILE_TASK', True),
+'/home/root/python-pgo-profiles/',
+os.path.join(d.getVar("PROFILE_DATA_WORKDIR", True), 'python'))
 }
 
 addtask profile after do_build
 do_profile[depends] += "qemu-native:do_populate_sysroot 
qemu-helper-native:do_populate_sysroot"
-do_profile[cleandirs] = "${PROFILE_DATA_WORKDIR}"
-
+do_profile[cleandirs] = "${PROFILE_DATA_WORKDIR}/python"
 
 python do_profile_setscene () {
 sstate_setscene(d)
 }
 
 SSTATETASKS += "do_profile"
-do_profile[sstate-inputdirs] = "${PROFILE_DATA_WORKDIR}"
+do_profile[sstate-inputdirs] = "${PROFILE_DATA_WORKDIR}/python"
 do_profile[sstate-outputdirs] = "${PYTHON_PROFILE_DIR}"
 addtask do_profile_setscene
+
+
+# Profile task for Python3
+python do_profile3() {
+run_profile(d, 'LD_LIBRARY_PATH=/opt/lib /opt/bin/python3',
+d.getVar('PYTHON3_PROFILE_TASK', True),
+'/home/root/python3-pgo-profiles/',
+os.path.join(d.getVar("PROFILE_DATA_WORKDIR", True), 
'python3'))
+}
+
+addtask profile3 after do_build
+do_profile3[depends] += "qemu-native:do_populate_sysroot 
qemu-helper-native:do_populate_sysroot"
+do_profile3[cleandirs] = "${PROFILE_DATA_WORKDIR}/python3"
+
+python 

[OE-core] [PATCH RFC 01/10] python3-native: support profile optimized build

2017-01-27 Thread Markus Lehtonen
This feature is virtually identical to that of python-native. Profile
guided optimization is enabled by defining
PYTHON3_NATIVE_PROFILE_OPT = "1"
in local.conf. In addition, the profile task may be defined with
PYTHON3_NATIVE_PROFILE_TASK.

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 meta/recipes-devtools/python/python3-native_3.5.2.bb | 9 +
 meta/recipes-devtools/python/python3/000-cross-compile.patch | 9 -
 2 files changed, 9 insertions(+), 9 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 7ac3942..cdef3dd 100644
--- a/meta/recipes-devtools/python/python3-native_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3-native_3.5.2.bb
@@ -81,10 +81,19 @@ EXTRA_OEMAKE = '\
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""
 
+PYTHON3_NATIVE_MAKE_TARGET ?= "${@'profile-opt' if 
d.getVar('PYTHON3_NATIVE_PROFILE_OPT', True) == '1' else ''}"
+
 do_configure_append() {
autoreconf --verbose --install --force --exclude=autopoint 
../Python-${PV}/Modules/_ctypes/libffi
 }
 
+do_compile() {
+if [ -n "${PYTHON3_NATIVE_PROFILE_TASK}" ]; then
+sed -i -e 
's,^PROFILE_TASK=.*,PROFILE_TASK=${PYTHON3_NATIVE_PROFILE_TASK},g' Makefile
+fi
+oe_runmake ${PYTHON3_NATIVE_MAKE_TARGET}
+}
+
 do_install() {
install -d ${D}${libdir}/pkgconfig
oe_runmake 'DESTDIR=${D}' install
diff --git a/meta/recipes-devtools/python/python3/000-cross-compile.patch 
b/meta/recipes-devtools/python/python3/000-cross-compile.patch
index 2d82221..d6d7820 100644
--- a/meta/recipes-devtools/python/python3/000-cross-compile.patch
+++ b/meta/recipes-devtools/python/python3/000-cross-compile.patch
@@ -29,15 +29,6 @@ Index: Python-3.5.2/Makefile.pre.in
  
  PSRCS=\
Parser/acceler.c \
-@@ -509,7 +511,7 @@ build_all_generate_profile:
- 
- run_profile_task:
-   : # FIXME: can't run for a cross build
--  $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
-+  $(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true
- 
- build_all_merge_profile:
-   $(LLVM_PROF_MERGER)
 @@ -792,7 +794,7 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
@$(MKDIR_P) Include
# Avoid copying the file onto itself for an in-tree build
-- 
2.10.2

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


[OE-core] [PATCH RFC 03/10] python3: add python-profile-opt3 recipe

2017-01-27 Thread Markus Lehtonen
Similar to python-profile-opt for Python 2.7, this is a special version
of Python3 used for profile guided optimization. It is used for
generating profile data on the target device. Libpython3 is renamed to
libpython-profile-opt3 in order to prevent soname clash with "normal"
libpython3.

[YOCTO #9338]

Signed-off-by: Markus Lehtonen 
---
 meta/recipes-devtools/python/python-profile-opt3   |   1 +
 .../python/python-profile-opt3_3.5.2.bb|  15 +++
 ...efile-add-install_generate_profile-target.patch |  25 +
 ...name-libpython3-to-libpython-profile-opt3.patch | 111 +
 meta/recipes-devtools/python/python3_3.5.2.bb  |  46 +
 5 files changed, 178 insertions(+), 20 deletions(-)
 create mode 12 meta/recipes-devtools/python/python-profile-opt3
 create mode 100644 meta/recipes-devtools/python/python-profile-opt3_3.5.2.bb
 create mode 100644 
meta/recipes-devtools/python/python3/Makefile-add-install_generate_profile-target.patch
 create mode 100644 
meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch

diff --git a/meta/recipes-devtools/python/python-profile-opt3 
b/meta/recipes-devtools/python/python-profile-opt3
new file mode 12
index 000..b8a0adb
--- /dev/null
+++ b/meta/recipes-devtools/python/python-profile-opt3
@@ -0,0 +1 @@
+python3
\ No newline at end of file
diff --git a/meta/recipes-devtools/python/python-profile-opt3_3.5.2.bb 
b/meta/recipes-devtools/python/python-profile-opt3_3.5.2.bb
new file mode 100644
index 000..e85807f
--- /dev/null
+++ b/meta/recipes-devtools/python/python-profile-opt3_3.5.2.bb
@@ -0,0 +1,15 @@
+require python3_${PV}.bb
+
+SRC_URI += "file://rename-libpython3-to-libpython-profile-opt3.patch \
+file://Makefile-add-install_generate_profile-target.patch \
+   "
+
+# Use special prefix in order to prevent clash with the normal python3 package
+STAGING_INCDIR_DEFAULT = "${STAGING_DIR_HOST}/usr/include"
+STAGING_LIBDIR_DEFAULT = "${STAGING_DIR_HOST}/usr/${baselib}"
+TARGET_CFLAGS += "-I${STAGING_INCDIR_DEFAULT}"
+TARGET_CPPFLAGS += "-I${STAGING_INCDIR_DEFAULT}"
+prefix = "/opt"
+exec_prefix = "/opt"
+
+PYTHON3_MAKE_TARGET = "build_all_generate_profile"
diff --git 
a/meta/recipes-devtools/python/python3/Makefile-add-install_generate_profile-target.patch
 
b/meta/recipes-devtools/python/python3/Makefile-add-install_generate_profile-target.patch
new file mode 100644
index 000..7aee7fb
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/Makefile-add-install_generate_profile-target.patch
@@ -0,0 +1,25 @@
+Makefile: add install_generate_profile target
+
+Making it possible to install the binaries with profile generation
+enabled. We need this as linking is also performed at the install stage.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Markus Lehtonen 
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 2b87614..826155b 100644
+--- a/Makefile.pre.in
 b/Makefile.pre.in
+@@ -1046,6 +1046,8 @@ QUICKTESTOPTS=   $(TESTOPTS) -x test_subprocess test_io 
test_lib2to3 \
+ quicktest:all platform
+   $(TESTRUNNER) $(QUICKTESTOPTS)
+ 
++install_generate_profile:
++  $(MAKE) install LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" 
LIBS="$(LIBS)"
+ 
+ install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall 
@FRAMEWORKINSTALLLAST@
+   if test "x$(ENSUREPIP)" != "xno"  ; then \
+-- 
+2.6.6
+
diff --git 
a/meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch
 
b/meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch
new file mode 100644
index 000..4ba5531
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/rename-libpython3-to-libpython-profile-opt3.patch
@@ -0,0 +1,111 @@
+rename libpython3 to libpython-profile-opt3
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Markus Lehtonen 
+
+diff --git a/Lib/distutils/command/build_ext.py 
b/Lib/distutils/command/build_ext.py
+index f03a4e3..4c65aff 100644
+--- a/Lib/distutils/command/build_ext.py
 b/Lib/distutils/command/build_ext.py
+@@ -746,7 +746,7 @@ class build_ext(Command):
+ else:
+ from distutils import sysconfig
+ if sysconfig.get_config_var('Py_ENABLE_SHARED'):
+-pythonlib = 'python{}.{}{}'.format(
++pythonlib = 'python-profile-opt{}.{}{}'.format(
+ sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff,
+ sysconfig.get_config_var('ABIFLAGS'))
+ return ext.libraries + [pythonlib]
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index bace00e..2b87614 100644
+--- a/Makefile.pre.in
 b/Makefile.pre.in
+@@ -622,7 +622,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
+   $(AR) $(ARFLAGS) $@ $(MODOBJS)
+   $(RANLIB) $@
+ 
+-libpython$(LDVERSION).so: 

Re: [OE-core] ✗ patchtest: failure for Python3 packaging fixes

2017-01-27 Thread Anders Darander
Hi,

* Patchwork  [170127 10:23]:

> Series: Python3 packaging fixes
> Revision: 1
> URL   : https://patchwork.openembedded.org/series/5024/
> State : failure

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

This is likely due to issues with the email-patches. One of the patches,
0003, has a line > 998 characters (one line in the patch context, ie not
modified by me).

Retrieving the patch series from the branch at github should work, as
it's based on the current master, a99cca0e8e.

Cheers,
Anders

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for Python3 packaging fixes

2017-01-27 Thread Patchwork
== Series Details ==

Series: Python3 packaging fixes
Revision: 1
URL   : https://patchwork.openembedded.org/series/5024/
State : failure

== Summary ==


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



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



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

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


Re: [OE-core] oe-core build fail package_fixsymlinks

2017-01-27 Thread ANDANI PRASHANT
Hi Raj,

I am new to yocto and systemd.
Can you please tell me how to remove meta-linaro-toolchain?

On Fri, Jan 27, 2017 at 12:01 PM, Khem Raj  wrote:

> On Thu, Jan 26, 2017 at 10:29 PM, ANDANI PRASHANT
>  wrote:
> > Hi Raj,
> >
> > Thank you for reply.
> >
> > Yes i am using gcc-linaro-6.2.1-arm-linux-gnueabi toolchain
> >
> > If i comment below line from python package_fixsymlinks () function, it
> > works
> >
> > rtarget = cpath.realpath(path, inst_root, True,
> assume_dir = True)
> > if not cpath.lexists(rtarget):
> >
> > dangling_links[pkg].append(os.path.normpath(rtarget[len(inst_root):]))
> >
>
> I asked something else ? please read the last reply carefully.
>
> > Regards,
> > Prashant
> >
> >
> > On Fri, Jan 27, 2017 at 11:45 AM, Khem Raj  wrote:
> >>
> >> does this happen if you remove meta-linaro-toolchain from your layer
> mix ?
> >>
> >> On Thu, Jan 26, 2017 at 8:23 PM, ANDANI PRASHANT
> >>  wrote:
> >> > Hi,
> >> >
> >> > If i remove package_fixsymlinks from meta/classes/package.bbclass, it
> >> > works
> >> > else giving error as below:
> >> >
> >> > ERROR: external-linaro-toolchain-2017.01~dev-r0.arago30 do_package:
> >> > Error
> >> > executing a python function in exec_python_func() autogenerated:
> >> >
> >> > The stack trace of python calls that resulted in this
> exception/failure
> >> > was:
> >> > File: 'exec_python_func() autogenerated', lineno: 2, function:
> 
> >> >  0001:
> >> >  *** 0002:package_fixsymlinks(d)
> >> >  0003:
> >> > File: 'tisdk/sources/oe-core/meta/classes/package.bbclass', lineno:
> >> > 1210,
> >> > function: package_fixsymlinks
> >> >  1206:inst_root = os.path.join(pkgdest, pkg)
> >> >  1207:for path in pkgfiles[pkg]:
> >> >  1208:rpath = path[len(inst_root):]
> >> >  1209:pkg_files[pkg].append(rpath)
> >> >  *** 1210:rtarget = cpath.realpath(path, inst_root,
> >> > True,
> >> > assume_dir = True)
> >> >  1211:if not cpath.lexists(rtarget):
> >> >  1212:
> >> > dangling_links[pkg].append(os.path.normpath(rtarget[len(inst
> _root):]))
> >> >  1213:
> >> >  1214:newrdepends = {}
> >> > File: tisdk/sources/oe-core/meta/lib/oe/cachedpath.py', lineno: 229,
> >> > function: realpath
> >> >  0225:# be printed a backtrace with 100s of
> OSError
> >> > exceptions
> >> >  0226:# else
> >> >  0227:raise OSError(errno.ELOOP,
> >> >  0228:  "too much recursions while
> >> > resolving
> >> > '%s'; loop in '%s'" %
> >> >  *** 0229:  (file, e.strerror))
> >> >  0230:
> >> >  0231:raise
> >> >  0232:
> >> >  0233:return file
> >> > Exception: OSError: [Errno 40] too much recursions while resolving
> >> >
> >> > 'tisdk/build/arago-tmp-external-linaro-toolchain/work/armv5-
> linux-gnueabi/external-linaro-toolchain/2017.01~dev-r0.
> arago30/packages-split/libstdc++-dev/usr/include/c++/
> 6.2.1/arm-linux-gnueabi/arm-linux-gnueabi';
> >> > loop in
> >> >
> >> > 'tisdk/build/arago-tmp-external-linaro-toolchain/work/armv5-
> linux-gnueabi/external-linaro-toolchain/2017.01~dev-r0.
> arago30/packages-split/libstdc++-dev/usr/include/c++/
> 6.2.1/arm-linux-gnueabi/arm-linux-gnueabi'
> >> >
> >> > ERROR: external-linaro-toolchain-2017.01~dev-r0.arago30 do_package:
> >> > Function
> >> > failed: package_fixsymlinks
> >> > ERROR: Logfile of failure stored in:
> >> >
> >> > tisdk/build/arago-tmp-external-linaro-toolchain/work/armv5-
> linux-gnueabi/external-linaro-toolchain/2017.01~dev-r0.
> arago30/temp/log.do_package.10039
> >> > ERROR: Task 437
> >> >
> >> > (tisdk/sources/meta-linaro/meta-linaro-toolchain/recipes-dev
> tools/external-linaro-toolchain/external-linaro-toolchain.bb,
> >> > do_package) failed with exit code '1'
> >> > NOTE: Tasks Summary: Attempted 642 tasks of which 629 didn't need to
> be
> >> > rerun and 1 failed.
> >> > NOTE: Writing buildhistory
> >> > Waiting for 0 running tasks to finish:
> >> >
> >> > Summary: 1 task failed:
> >> >
> >> > tisdk/sources/meta-linaro/meta-linaro-toolchain/recipes-devt
> ools/external-linaro-toolchain/external-linaro-toolchain.bb,
> >> > do_package
> >> > Summary: There were 3 WARNING messages shown.
> >> > Summary: There were 2 ERROR messages shown, returning a non-zero exit
> >> > code.
> >> >
> >> >
> >> > --
> >> > Regards,
> >> > Prashant
> >> >
> >> > --
> >> > ___
> >> > Openembedded-core mailing list
> >> > Openembedded-core@lists.openembedded.org
> >> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> >> >
> >
> >
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org

[OE-core] [PATCH 2/7] python3-manifest: move htlm.py to python3-html

2017-01-27 Thread Anders Darander
This allows us to use html.py without importing misc.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index b92048f305..6093c2806b 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -103,7 +103,7 @@ 
FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so ${libdir}/python3.5
 
 SUMMARY_${PN}-html="Python HTML processing support"
 RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python3.5/formatter.* 
${libdir}/python3.5/__pycache__/formatter.* 
${libdir}/python3.5/htmlentitydefs.* 
${libdir}/python3.5/__pycache__/htmlentitydefs.* ${libdir}/python3.5/htmllib.* 
${libdir}/python3.5/__pycache__/htmllib.* ${libdir}/python3.5/markupbase.* 
${libdir}/python3.5/__pycache__/markupbase.* ${libdir}/python3.5/sgmllib.* 
${libdir}/python3.5/__pycache__/sgmllib.* ${libdir}/python3.5/HTMLParser.* 
${libdir}/python3.5/__pycache__/HTMLParser.* "
+FILES_${PN}-html="${libdir}/python3.5/formatter.* 
${libdir}/python3.5/__pycache__/formatter.* 
${libdir}/python3.5/htmlentitydefs.* 
${libdir}/python3.5/__pycache__/htmlentitydefs.* ${libdir}/python3.5/html 
${libdir}/python3.5/html/__pycache__ ${libdir}/python3.5/htmllib.* 
${libdir}/python3.5/__pycache__/htmllib.* ${libdir}/python3.5/markupbase.* 
${libdir}/python3.5/__pycache__/markupbase.* ${libdir}/python3.5/sgmllib.* 
${libdir}/python3.5/__pycache__/sgmllib.* ${libdir}/python3.5/HTMLParser.* 
${libdir}/python3.5/__pycache__/HTMLParser.* "
 
 SUMMARY_${PN}-idle="Python Integrated Development Environment"
 RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index cf19f477ab..cc2e5619e6 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -276,7 +276,7 @@ if __name__ == "__main__":
 "lib-dynload/fcntl.*.so" )
 
 m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
-"formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* 
HTMLParser.* " )
+"formatter.* htmlentitydefs.* html htmllib.* markupbase.* sgmllib.* 
HTMLParser.* " )
 
 m.addPackage( "${PN}-importlib", "Python import implementation library", 
"${PN}-core ${PN}-lang",
 "importlib imp.*" )
-- 
2.11.0

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


[OE-core] [PATCH 5/7] python-3-manifest: add _compat_pickle to python3-pickle

2017-01-27 Thread Anders Darander
This allows us to depend on _compat_pickle.* wihtout having to add the whole
python3-misc.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 555ac8844d..8b64069a2f 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -167,7 +167,7 @@ FILES_${PN}-numbers="${libdir}/python3.5/decimal.* 
${libdir}/python3.5/__pycache
 
 SUMMARY_${PN}-pickle="Python serialisation/persistence support"
 RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python3.5/pickle.* 
${libdir}/python3.5/__pycache__/pickle.* ${libdir}/python3.5/shelve.* 
${libdir}/python3.5/__pycache__/shelve.* 
${libdir}/python3.5/lib-dynload/cPickle.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/cPickle.*.so 
${libdir}/python3.5/pickletools.* ${libdir}/python3.5/__pycache__/pickletools.* 
"
+FILES_${PN}-pickle="${libdir}/python3.5/_compat_pickle.* 
${libdir}/python3.5/__pycache__/_compat_pickle.* ${libdir}/python3.5/pickle.* 
${libdir}/python3.5/__pycache__/pickle.* ${libdir}/python3.5/shelve.* 
${libdir}/python3.5/__pycache__/shelve.* 
${libdir}/python3.5/lib-dynload/cPickle.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/cPickle.*.so 
${libdir}/python3.5/pickletools.* ${libdir}/python3.5/__pycache__/pickletools.* 
"
 
 SUMMARY_${PN}-pkgutil="Python package extension utility support"
 RDEPENDS_${PN}-pkgutil="${PN}-core"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index 770ef754e6..1a06896b5c 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -329,7 +329,7 @@ if __name__ == "__main__":
 "decimal.* fractions.* numbers.*" )
 
 m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", 
"${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
-"pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" )
+"_compat_pickle.* pickle.* shelve.* lib-dynload/cPickle.*.so 
pickletools.*" )
 
 m.addPackage( "${PN}-pkgutil", "Python package extension utility support", 
"${PN}-core",
 "pkgutil.*")
-- 
2.11.0

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


[OE-core] [PATCH 3/7] python-3-manifest: add argparse to RDEPENDS for netclient

2017-01-27 Thread Anders Darander
http/server.py requires argparse.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 6093c2806b..5c10cd21bf 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -154,7 +154,7 @@ RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io 
${PN}-lang ${PN}-pickle ${PN
 
FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so
 ${libdir}/python3.5/lib-dynload/__pycache__/_multiprocessing.*.so 
${libdir}/python3.5/multiprocessing 
${libdir}/python3.5/multiprocessing/__pycache__ "
 
 SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io 
${PN}-lang ${PN}-logging ${PN}-mime"
+RDEPENDS_${PN}-netclient="${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime 
${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
 FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* 
${libdir}/python3.5/__pycache__/*Cookie*.* ${libdir}/python3.5/base64.* 
${libdir}/python3.5/__pycache__/base64.* ${libdir}/python3.5/cookielib.* 
${libdir}/python3.5/__pycache__/cookielib.* ${libdir}/python3.5/ftplib.* 
${libdir}/python3.5/__pycache__/ftplib.* ${libdir}/python3.5/gopherlib.* 
${libdir}/python3.5/__pycache__/gopherlib.* ${libdir}/python3.5/hmac.* 
${libdir}/python3.5/__pycache__/hmac.* ${libdir}/python3.5/http* 
${libdir}/python3.5/http*/__pycache__ ${libdir}/python3.5/httplib.* 
${libdir}/python3.5/__pycache__/httplib.* ${libdir}/python3.5/mimetypes.* 
${libdir}/python3.5/__pycache__/mimetypes.* ${libdir}/python3.5/nntplib.* 
${libdir}/python3.5/__pycache__/nntplib.* ${libdir}/python3.5/poplib.* 
${libdir}/python3.5/__pycache__/poplib.* ${libdir}/python3.5/smtplib.* 
${libdir}/python3.5/__pycache__/smtplib.* ${libdir}/python3.5/telnetlib.* 
${libdir}/python3.5/__pycache__/telnetlib.* ${libdir}/python3.5/urllib ${lib
 dir}/python3.5/urllib/__pycache__ ${libdir}/python3.5/uuid.* 
${libdir}/python3.5/__pycache__/uuid.* ${libdir}/python3.5/rfc822.* 
${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/mimetools.* 
${libdir}/python3.5/__pycache__/mimetools.* "
 
 SUMMARY_${PN}-netserver="Python Internet Protocol servers"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index cc2e5619e6..ac95bc8fa9 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -318,7 +318,7 @@ if __name__ == "__main__":
 m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", 
"${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes 
${PN}-mmap",
 "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package
 
-m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", 
"${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging 
${PN}-mime",
+m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", 
"${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang 
${PN}-logging ${PN}-mime",
 "*Cookie*.* " +
 "base64.* cookielib.* ftplib.* gopherlib.* hmac.* http* httplib.* 
mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib  uuid.* rfc822.* 
mimetools.*" )
 
-- 
2.11.0

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


[OE-core] [PATCH 1/7] python-3-manifest: fix adding imp to importlib

2017-01-27 Thread Anders Darander
Commit: 512334f102a33833d39af53467894315f0715d07
"python-3.5-manifest: Add imp to importlib"

added imp to importlib in the generated manifest, but not in the generator 
script.

Signed-off-by: Anders Darander 
---
 scripts/contrib/python/generate-manifest-3.5.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index 7259543098..cf19f477ab 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -279,7 +279,7 @@ if __name__ == "__main__":
 "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* 
HTMLParser.* " )
 
 m.addPackage( "${PN}-importlib", "Python import implementation library", 
"${PN}-core ${PN}-lang",
-"importlib" )
+"importlib imp.*" )
 
 m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
 "lib-dynload/_gdbm.*.so" )
-- 
2.11.0

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


[OE-core] [PATCH 7/7] python-3-manifest: split out typing

2017-01-27 Thread Anders Darander
This allows us to use typing.py without having to add the whole
python3-misc package.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 10 +++---
 scripts/contrib/python/generate-manifest-3.5.py  |  3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index d4c7c4d1b1..a53a8d5d1f 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -5,9 +5,9 @@
 
  
 
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs 
${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes 
${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib 
${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-enum 
${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib 
${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math 
${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver 
${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc 
${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors 
${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests 
${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests 
${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin 
${PN}-xml ${PN}-xmlrpc "
+PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs 
${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes 
${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib 
${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-enum 
${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib 
${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math 
${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver 
${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc 
${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors 
${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests 
${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests 
${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-typing ${PN}-unittest 
${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
 
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio 
${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt 
${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev 
${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest 
${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image 
${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox 
${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient 
${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint 
${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource 
${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 
${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog 
${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter 
${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio 
${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt 
${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev 
${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest 
${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image 
${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox 
${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient 
${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint 
${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource 
${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 
${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog 
${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter 
${PN}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc 
${PN}-modules"
 
 SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
 RDEPENDS_${PN}-2to3="${PN}-core"
@@ -257,6 +257,10 @@ SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
 RDEPENDS_${PN}-tkinter="${PN}-core"
 FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/_tkinter.*.so 
${libdir}/python3.5/lib-tk ${libdir}/python3.5/lib-tk/__pycache__ 
${libdir}/python3.5/tkinter ${libdir}/python3.5/tkinter/__pycache__ "
 
+SUMMARY_${PN}-typing="Python typing support"
+RDEPENDS_${PN}-typing="${PN}-core"

[OE-core] [PATCH 6/7] python-3-manifest: add ipaddress to python3-io

2017-01-27 Thread Anders Darander
This allows us to use ipaddress without requiring the add the whole
python3-misc.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 8b64069a2f..d4c7c4d1b1 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -119,7 +119,7 @@ FILES_${PN}-importlib="${libdir}/python3.5/importlib 
${libdir}/python3.5/importl
 
 SUMMARY_${PN}-io="Python low-level I/O"
 RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/_socket.*.so 
${libdir}/python3.5/lib-dynload/_io.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/_io.*.so 
${libdir}/python3.5/lib-dynload/_ssl.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/_ssl.*.so 
${libdir}/python3.5/lib-dynload/select.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/select.*.so 
${libdir}/python3.5/lib-dynload/termios.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/termios.*.so 
${libdir}/python3.5/lib-dynload/cStringIO.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/cStringIO.*.so 
${libdir}/python3.5/pipes.* ${libdir}/python3.5/__pycache__/pipes.* 
${libdir}/python3.5/socket.* ${libdir}/python3.5/__pycache__/socket.* 
${libdir}/python3.5/ssl.* ${libdir}/python3.5/__pycache__/ssl.* 
${libdir}/python3.5/tempfile.* ${libdir}/python3.5/__pycache__/tempfile.* 
${libdir}/python3.5/StringIO.* ${libdir}/python3.5/__pycache__/StringIO.* 
${libdir}/python3.5/io.
 * ${libdir}/python3.5/__pycache__/io.* ${libdir}/python3.5/_pyio.* 
${libdir}/python3.5/__pycache__/_pyio.* "
+FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/_socket.*.so 
${libdir}/python3.5/lib-dynload/_io.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/_io.*.so 
${libdir}/python3.5/lib-dynload/_ssl.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/_ssl.*.so 
${libdir}/python3.5/lib-dynload/select.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/select.*.so 
${libdir}/python3.5/lib-dynload/termios.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/termios.*.so 
${libdir}/python3.5/lib-dynload/cStringIO.*.so 
${libdir}/python3.5/lib-dynload/__pycache__/cStringIO.*.so 
${libdir}/python3.5/ipaddress.* ${libdir}/python3.5/__pycache__/ipaddress.* 
${libdir}/python3.5/pipes.* ${libdir}/python3.5/__pycache__/pipes.* 
${libdir}/python3.5/socket.* ${libdir}/python3.5/__pycache__/socket.* 
${libdir}/python3.5/ssl.* ${libdir}/python3.5/__pycache__/ssl.* 
${libdir}/python3.5/tempfile.* ${libdir}/python3.5/__pycache__/tempfile.* 
${libdir}/python3.5/S
 tringIO.* ${libdir}/python3.5/__pycache__/StringIO.* ${libdir}/python3.5/io.* 
${libdir}/python3.5/__pycache__/io.* ${libdir}/python3.5/_pyio.* 
${libdir}/python3.5/__pycache__/_pyio.* "
 
 SUMMARY_${PN}-json="Python JSON support"
 RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index 1a06896b5c..55bda1973f 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -289,7 +289,7 @@ if __name__ == "__main__":
 
 m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math",
 "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so 
lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " +
-"pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
+"ipaddress.* pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
 
 m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math 
${PN}-re",
 "json lib-dynload/_json.*.so" ) # package
-- 
2.11.0

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


[OE-core] [PATCH 4/7] python-3-manifest: add socketserver to netserver

2017-01-27 Thread Anders Darander
socketserver.* should be part of python3-netserver.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 5c10cd21bf..555ac8844d 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -159,7 +159,7 @@ FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* 
${libdir}/python3.5/__pyca
 
 SUMMARY_${PN}-netserver="Python Internet Protocol servers"
 RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell 
${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python3.5/cgi.* 
${libdir}/python3.5/__pycache__/cgi.* ${libdir}/python3.5/*HTTPServer.* 
${libdir}/python3.5/__pycache__/*HTTPServer.* 
${libdir}/python3.5/SocketServer.* 
${libdir}/python3.5/__pycache__/SocketServer.* "
+FILES_${PN}-netserver="${libdir}/python3.5/cgi.* 
${libdir}/python3.5/__pycache__/cgi.* ${libdir}/python3.5/socketserver.* 
${libdir}/python3.5/__pycache__/socketserver.* 
${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/__pycache__/*HTTPServer.* 
${libdir}/python3.5/SocketServer.* 
${libdir}/python3.5/__pycache__/SocketServer.* "
 
 SUMMARY_${PN}-numbers="Python number APIs"
 RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index ac95bc8fa9..770ef754e6 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -323,7 +323,7 @@ if __name__ == "__main__":
 "base64.* cookielib.* ftplib.* gopherlib.* hmac.* http* httplib.* 
mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib  uuid.* rfc822.* 
mimetools.*" )
 
 m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", 
"${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
-"cgi.* *HTTPServer.* SocketServer.*" )
+"cgi.* socketserver.* *HTTPServer.* SocketServer.*" )
 
 m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core 
${PN}-lang ${PN}-re",
 "decimal.* fractions.* numbers.*" )
-- 
2.11.0

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


[OE-core] [PATCH 0/7] Python3 packaging fixes

2017-01-27 Thread Anders Darander
This moves a few python modules to more logical places (thus removing the
need for python3-misc on more systems).

A new package for typing.py is also created.

0001 add imp to importlib in the generator, the earlier commit in oe-core 
that made this move, only patched the generated manifest.

The following changes since commit a99cca0e8ee15f7b542986d89b70054ac7cb24be:

  xserver-xorg: Upgrade 1.19.0 -> 1.19.1 (2017-01-26 10:41:12 +)

are available in the git repository at:

  git://github.com/darander/openembedded-core python-splitting
  https://github.com/darander/openembedded-core/tree/python-splitting

Anders Darander (7):
  python-3-manifest: fix adding imp to importlib
  python3-manifest: move htlm.py to python3-html
  python-3-manifest: add argparse to RDEPENDS for netclient
  python-3-manifest: add socketserver to netserver
  python-3-manifest: add _compat_pickle to python3-pickle
  python-3-manifest: add ipaddress to python3-io
  python-3-manifest: split out typing

 meta/recipes-devtools/python/python-3.5-manifest.inc | 20 
 scripts/contrib/python/generate-manifest-3.5.py  | 15 +--
 2 files changed, 21 insertions(+), 14 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] busybox: conditional inclusion of login utilities

2017-01-27 Thread David Vincent
On jeudi 26 janvier 2017 09:55:17 CET Christopher Larson wrote:
> Question, why not use ${PN} here?

It was done the same way in the recipe for other fragments so I made it look 
like the existing declarations.

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


Re: [OE-core] [Openembedded-architecture] OpenEmbedded Stand at FOSDEM

2017-01-27 Thread Paul Barker
On Thu, 26 Jan 2017 22:39:17 +0100
Andreas Müller  wrote:

> On Thu, Jan 5, 2017 at 4:30 PM, Philip Balister 
> wrote:
> > On 01/03/2017 08:13 PM, Andreas Müller wrote:  
> >> On Tue, Jan 3, 2017 at 4:32 PM, Philip Balister
> >>  wrote:  
> >>> Every year since 2007, OpenEmbedded has a stand at FOSDEM
> >>> (http://www.fosdem.org)
> >>>
> >>> From the first year:
> >>>
> >>> https://www.flickr.com/photos/32615155@N00/405229708/in/album-72157594561002629/
> >>>
> >>> Belen and I are sort of organizing this, but both of us are also
> >>> involved in devrooms, so we will need a lot of help manning the
> >>> stand and getting some demos together.
> >>>
> >>> Demos should try and show how the project makes embedded work
> >>> easier, by showing tools and/or cool examples of devices using
> >>> Linux built with OpenEmbedded. In previous years, we've shown
> >>> toaster with data collected from demos on the table. Collections
> >>> of devices running images built from the same recipe and
> >>> interesting products using Linux by OpenEmbedded.
> >>>
> >>> I'm happy to try and organize demos and staffing, but I could
> >>> really use some help this year, so if you are in a position to
> >>> tak ethe lead on operating the stand, that would be a huge help
> >>> to me and the rest of the project.
> >>>
> >>> Thanks,
> >>>
> >>> Philip  
> Nobody?
> 
> Andreas

There's 3 of us from Togán Labs who'll be able to help out manning the
stand. I know I can do all day Saturday and up to about 4pm on Sunday
and I'm happy to be at the stand all day (with the obvious caffeine
breaks!). Let me know if you need help setting things up and what time
you need people to turn up on Saturday morning.

If you need anything printing then send it to me.

I can bring 2x 4-way UK power strips plus 2x EU->UK power adaptors for
our gear. I've got 2 laptops plus a few embedded devices. I don't have
any EU power strips though.

I've updated the wiki page.

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