[OE-core] [PATCH] musl: Update to latest master

2018-07-16 Thread Khem Raj
General bug fixes

Full logs
https://git.musl-libc.org/cgit/musl/log/?qt=range=193338e619de7c993efa2c0e1a87240bd732c181..9cad27a3dc1a4eb349b6591e4dc8cc89dce32277

Signed-off-by: Khem Raj 
---
 meta/recipes-core/musl/musl_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index 2bcd45d571..b56870cb3f 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -3,7 +3,7 @@
 
 require musl.inc
 
-SRCREV = "193338e619de7c993efa2c0e1a87240bd732c181"
+SRCREV = "9cad27a3dc1a4eb349b6591e4dc8cc89dce32277"
 
 PV = "1.1.19+git${SRCPV}"
 
-- 
2.18.0

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


[OE-core] [PATCH] recipes: Enforce ARM ISA just for arm arches <= armv5

2018-07-16 Thread Khem Raj
armv7+ used thumb2 ISA and it compiles fine with thumb2
issues are only when using thumb1 ISA

Signed-off-by: Khem Raj 
---
 meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb| 5 -
 meta/classes/goarch.bbclass| 6 +-
 meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb | 4 +++-
 meta/recipes-gnome/gcr/gcr_3.28.0.bb   | 4 +++-
 meta/recipes-gnome/libsecret/libsecret_0.18.6.bb   | 4 +++-
 meta/recipes-multimedia/ffmpeg/ffmpeg_4.0.bb   | 4 +++-
 meta/recipes-support/aspell/aspell_0.60.6.1.bb | 5 -
 7 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb 
b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
index 073cf5665c..922518bc39 100644
--- a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
+++ b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb
@@ -28,5 +28,8 @@ FILES_${PN} = "${bindir}/aspell"
 FILES_libpspell = "${libdir}/libpspell.so.*"
 FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config 
${includedir}/pspell"
 
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
 inherit autotools gettext
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index bb36cc8142..b2c94faddb 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -33,7 +33,11 @@ COMPATIBLE_HOST_linux-muslx32 = "null"
 COMPATIBLE_HOST_powerpc = "null"
 COMPATIBLE_HOST_powerpc64 = "null"
 COMPATIBLE_HOST_mipsarchn32 = "null"
-ARM_INSTRUCTION_SET = "arm"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
+
 TUNE_CCARGS_remove = "-march=mips32r2"
 SECURITY_CFLAGS_mipsarch = "${SECURITY_NOPIE_CFLAGS}"
 SECURITY_NOPIE_CFLAGS ??= ""
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb 
b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index a8baca51e3..4bee3713a7 100644
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -36,6 +36,8 @@ do_install () {
install -m 0755 unsquashfs ${D}${sbindir}/
 }
 
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-gnome/gcr/gcr_3.28.0.bb 
b/meta/recipes-gnome/gcr/gcr_3.28.0.bb
index 6777ad2277..0796362e4b 100644
--- a/meta/recipes-gnome/gcr/gcr_3.28.0.bb
+++ b/meta/recipes-gnome/gcr/gcr_3.28.0.bb
@@ -21,7 +21,9 @@ FILES_${PN} += " \
 "
 
 # http://errors.yoctoproject.org/Errors/Details/20229/
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
 
 # These files may be out of date or missing our fixes
 # libgcrypt.m4 in particular is calling into libgcrypt-config
diff --git a/meta/recipes-gnome/libsecret/libsecret_0.18.6.bb 
b/meta/recipes-gnome/libsecret/libsecret_0.18.6.bb
index cdc41e762a..518c71feb1 100644
--- a/meta/recipes-gnome/libsecret/libsecret_0.18.6.bb
+++ b/meta/recipes-gnome/libsecret/libsecret_0.18.6.bb
@@ -12,7 +12,9 @@ SRC_URI[archive.md5sum] = "c6cf132a56bd346fbf49a43abb02e5c2"
 SRC_URI[archive.sha256sum] = 
"5efbc890ba41a323ffe0599cd260fd12bd8eb62a04aa1bd1b2762575d253d66f"
 
 # http://errors.yoctoproject.org/Errors/Details/20228/
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
 
 # vapigen.m4 bundled with the tarball does not yet have our cross-compilation 
fixes
 do_configure_prepend() {
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.0.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.0.bb
index feafce2580..e105ea2c00 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.0.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_4.0.bb
@@ -30,7 +30,9 @@ SRC_URI[md5sum] = "1cc9e8cb027b9fd4c54f598f51002c19"
 SRC_URI[sha256sum] = 
"ed945daf40b124e77a685893cc025d086f638bc703183460aff49508edb3a43f"
 
 # Build fails when thumb is enabled: 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+ARM_INSTRUCTION_SET_armv6 = "arm"
 
 # Should be API compatible with libav (which was a fork of ffmpeg)
 # libpostproc was previously packaged from a separate recipe
diff --git a/meta/recipes-support/aspell/aspell_0.60.6.1.bb 
b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
index 19a7155d66..161bb5ce20 100644
--- a/meta/recipes-support/aspell/aspell_0.60.6.1.bb
+++ b/meta/recipes-support/aspell/aspell_0.60.6.1.bb
@@ -25,7 +25,10 @@ FILES_${PN} = "${bindir}/aspell"
 FILES_libpspell = "${libdir}/libpspell.so.*"
 FILES_${PN}-dev += "${bindir}/pspell-config"
 
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"

[OE-core] [PATCH] sqlite3:3.23.1 -> 3.24.0

2018-07-16 Thread Hong Liu
Upgrade sqlite3 from 3.23.1 to 3.24.0.

Signed-off-by: Hong Liu 
---
 meta/recipes-support/sqlite/{sqlite3_3.23.1.bb => sqlite3_3.24.0.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/sqlite/{sqlite3_3.23.1.bb => sqlite3_3.24.0.bb} 
(59%)

diff --git a/meta/recipes-support/sqlite/sqlite3_3.23.1.bb 
b/meta/recipes-support/sqlite/sqlite3_3.24.0.bb
similarity index 59%
rename from meta/recipes-support/sqlite/sqlite3_3.23.1.bb
rename to meta/recipes-support/sqlite/sqlite3_3.24.0.bb
index 3755761..ce18fec 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.23.1.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.24.0.bb
@@ -6,5 +6,5 @@ LIC_FILES_CHKSUM = 
"file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed0
 SRC_URI = "\
   http://www.sqlite.org/2018/sqlite-autoconf-${SQLITE_PV}.tar.gz \
   "
-SRC_URI[md5sum] = "99a51b40a66872872a91c92f6d0134fa"
-SRC_URI[sha256sum] = 
"92842b283e5e744eff5da29ed3c69391de7368fccc4d0ee6bf62490ce555ef25"
+SRC_URI[md5sum] = "dcd96fb9bbb603d29f6b0ad9554932ee"
+SRC_URI[sha256sum] = 
"d9d14e88c6fb6d68de9ca0d1f9797477d82fc3aed613558f87ffbdbbc5ceb74a"
-- 
2.7.4



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


[OE-core] [PATCH 0/2] distutils/setuptools:fix recipes may try to fetch code during do_compile

2018-07-16 Thread Hongxu Jia
The following changes since commit 05c32d2de1ee4681cc78cb107a158e9ab22c9619:

  oeqa/selftest/wic: Split tests into two class groups (2018-07-16 13:21:35 
+0100)

are available in the git repository at:

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

Hongxu Jia (2):
  distutils/setuptools-native: do not try to fetch code during
do_compile
  distutils3/setuptools3-native: do not try to fetch code during
do_compile

 meta/classes/distutils.bbclass |  2 ++
 meta/classes/distutils3.bbclass|  2 ++
 ...ionally-do-not-fetch-code-by-easy_install.patch | 35 ++
 .../python/python-setuptools_40.0.0.bb |  2 ++
 ...ionally-do-not-fetch-code-by-easy_install.patch | 35 ++
 .../python/python3-setuptools_40.0.0.bb|  2 ++
 6 files changed, 78 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
 create mode 100644 
meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch

-- 
2.8.1

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


[OE-core] [PATCH 1/2] distutils/setuptools-native: do not try to fetch code during do_compile

2018-07-16 Thread Hongxu Jia
If a python recipe is using setuptools and the setup_requires argument, where
setuptools will use easy_install to fetch the module if it isn't
present.

The build failed on a machine where a proxy was required, but succeeded on a
machine which had direct access to the internet

Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not
allow to fetch code from internet during do_compile.

Example result:
...
ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native 
recipe to DEPENDS.
Traceback (most recent call last):
  File "setup.py", line 56, in 
...

The improvement is flexible for test_requirements argument (used at
`setup.py test'), where use easy_install also.

[YOCTO #12084]
Signed-off-by: Hongxu Jia 
---
 meta/classes/distutils.bbclass |  2 ++
 ...ionally-do-not-fetch-code-by-easy_install.patch | 35 ++
 .../python/python-setuptools_40.0.0.bb |  2 ++
 3 files changed, 39 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch

diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 1930c35..872f4e3 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -8,6 +8,8 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
 --install-data=${D}/${datadir}"
 
 distutils_do_compile() {
+ NO_FETCH_BUILD=1 \
+ NO_FETCH_BUILD_HELP="Please add its native recipe to DEPENDS." \
  STAGING_INCDIR=${STAGING_INCDIR} \
  STAGING_LIBDIR=${STAGING_LIBDIR} \
  ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py 
build ${DISTUTILS_BUILD_ARGS} || \
diff --git 
a/meta/recipes-devtools/python/python-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
 
b/meta/recipes-devtools/python/python-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
new file mode 100644
index 000..441af16
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
@@ -0,0 +1,35 @@
+From 019422d19c6401fa8f45b1311ecd31bb087c809d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Tue, 17 Jul 2018 10:13:38 +0800
+Subject: [PATCH] conditionally do not fetch code by easy_install
+
+If var-NO_FETCH_BUILD is set, do not allow to fetch code from
+internet by easy_install, and log the help message from
+var-NO_FETCH_BUILD_HELP
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ setuptools/command/easy_install.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/setuptools/command/easy_install.py 
b/setuptools/command/easy_install.py
+index 85ee40f..7eb9d2a 100755
+--- a/setuptools/command/easy_install.py
 b/setuptools/command/easy_install.py
+@@ -637,6 +637,11 @@ class easy_install(Command):
+ os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))
+ 
+ def easy_install(self, spec, deps=False):
++if os.environ.get('NO_FETCH_BUILD', None):
++log.error("ERROR: Do not try to fetch `%s' for building. %s" %
++ (spec,  os.environ.get('NO_FETCH_BUILD_HELP', 
'')))
++return None
++
+ if not self.editable:
+ self.install_site_py()
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/python/python-setuptools_40.0.0.bb 
b/meta/recipes-devtools/python/python-setuptools_40.0.0.bb
index cf94404..9d9a093 100644
--- a/meta/recipes-devtools/python/python-setuptools_40.0.0.bb
+++ b/meta/recipes-devtools/python/python-setuptools_40.0.0.bb
@@ -1,5 +1,7 @@
 require python-setuptools.inc
 
+SRC_URI_append_class-native = " 
file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
+
 PROVIDES = "python-distribute"
 
 inherit setuptools
-- 
2.8.1

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


[OE-core] [PATCH 2/2] distutils3/setuptools3-native: do not try to fetch code during do_compile

2018-07-16 Thread Hongxu Jia
If a python recipe is using setuptools and the setup_requires argument, where
setuptools will use easy_install to fetch the module if it isn't
present.

The build failed on a machine where a proxy was required, but succeeded on a
machine which had direct access to the internet

Add var-NO_FETCH_BUILD, and set it in distutils_do_compile which does not
allow to fetch code from internet during do_compile.

Example result:
...
ERROR: Do not try to fetch `pytest-runner1' for building. Please add its native 
recipe to DEPENDS.
Traceback (most recent call last):
File "setup.py", line 56, in 
...

The improvement is flexible for test_requirements argument (used at
`setup.py test'), where use easy_install also.

[YOCTO #12084]

Signed-off-by: Hongxu Jia 
---
 meta/classes/distutils3.bbclass|  2 ++
 ...ionally-do-not-fetch-code-by-easy_install.patch | 35 ++
 .../python/python3-setuptools_40.0.0.bb|  2 ++
 3 files changed, 39 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch

diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index d4b92a3..fea7368 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -15,6 +15,8 @@ distutils3_do_configure() {
 }
 
 distutils3_do_compile() {
+NO_FETCH_BUILD=1 \
+NO_FETCH_BUILD_HELP="Please add its native recipe to DEPENDS." \
 STAGING_INCDIR=${STAGING_INCDIR} \
 STAGING_LIBDIR=${STAGING_LIBDIR} \
 ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
diff --git 
a/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
 
b/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
new file mode 100644
index 000..441af16
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
@@ -0,0 +1,35 @@
+From 019422d19c6401fa8f45b1311ecd31bb087c809d Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Tue, 17 Jul 2018 10:13:38 +0800
+Subject: [PATCH] conditionally do not fetch code by easy_install
+
+If var-NO_FETCH_BUILD is set, do not allow to fetch code from
+internet by easy_install, and log the help message from
+var-NO_FETCH_BUILD_HELP
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ setuptools/command/easy_install.py | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/setuptools/command/easy_install.py 
b/setuptools/command/easy_install.py
+index 85ee40f..7eb9d2a 100755
+--- a/setuptools/command/easy_install.py
 b/setuptools/command/easy_install.py
+@@ -637,6 +637,11 @@ class easy_install(Command):
+ os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))
+ 
+ def easy_install(self, spec, deps=False):
++if os.environ.get('NO_FETCH_BUILD', None):
++log.error("ERROR: Do not try to fetch `%s' for building. %s" %
++ (spec,  os.environ.get('NO_FETCH_BUILD_HELP', 
'')))
++return None
++
+ if not self.editable:
+ self.install_site_py()
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/python/python3-setuptools_40.0.0.bb 
b/meta/recipes-devtools/python/python3-setuptools_40.0.0.bb
index 0dc1ed8..713a1b5 100644
--- a/meta/recipes-devtools/python/python3-setuptools_40.0.0.bb
+++ b/meta/recipes-devtools/python/python3-setuptools_40.0.0.bb
@@ -1,6 +1,8 @@
 require python-setuptools.inc
 inherit setuptools3
 
+SRC_URI_append_class-native = " 
file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
+
 do_install_append() {
 mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
 }
-- 
2.8.1

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


[OE-core] [PATCH 2/2] systemd-boot: upgrade to 239

2018-07-16 Thread Chen Qi
Upgrade systemd-boot to 239.

The following patch is removed due to recent fix about meson's cpu family
mapping and validation.

  0001-Also-check-i386-i586-and-i686-for-ia32.patch

Signed-off-by: Chen Qi 
---
 .../{systemd-boot_237.bb => systemd-boot_239.bb}   |  5 ++--
 ...01-Also-check-i386-i586-and-i686-for-ia32.patch | 28 --
 2 files changed, 2 insertions(+), 31 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_237.bb => systemd-boot_239.bb} 
(91%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch

diff --git a/meta/recipes-core/systemd/systemd-boot_237.bb 
b/meta/recipes-core/systemd/systemd-boot_239.bb
similarity index 91%
rename from meta/recipes-core/systemd/systemd-boot_237.bb
rename to meta/recipes-core/systemd/systemd-boot_239.bb
index afd3848..7fe420c 100644
--- a/meta/recipes-core/systemd/systemd-boot_237.bb
+++ b/meta/recipes-core/systemd/systemd-boot_239.bb
@@ -3,9 +3,8 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:"
 
 DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
 
-SRC_URI += 
"file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
-file://0027-remove-nobody-user-group-checking.patch \
-file://0001-Also-check-i386-i586-and-i686-for-ia32.patch \
+SRC_URI += 
"file://0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+file://0006-remove-nobody-user-group-checking.patch \
 
file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
 "
 
diff --git 
a/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
 
b/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
deleted file mode 100644
index 877bb1c..000
--- 
a/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3e8c19bb1bbc4493c591f75c00c1fefe3b1c8a69 Mon Sep 17 00:00:00 2001
-From: Chen Qi 
-Date: Tue, 27 Feb 2018 20:42:41 -0800
-Subject: [PATCH] Also check i386, i586 and i686 for ia32
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi 

- meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 28cb8b60e..489531a43 100644
 a/meson.build
-+++ b/meson.build
-@@ -1217,7 +1217,7 @@ conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests)
- if get_option('efi')
- efi_arch = host_machine.cpu_family()
- 
--if efi_arch == 'x86'
-+if efi_arch == 'x86' or efi_arch == 'i386' or efi_arch == 'i586' or 
efi_arch == 'i686'
- EFI_MACHINE_TYPE_NAME = 'ia32'
- gnu_efi_arch = 'ia32'
- elif efi_arch == 'x86_64'
--- 
-2.13.0
-
-- 
1.9.1

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


[OE-core] [PATCH V6 0/2] upgrade systemd and systemd-boot to 239

2018-07-16 Thread Chen Qi
Changes in V6:
* Backport 0001-login-use-parse_uid-when-unmounting-user-runtime-dir.patch to 
solve race condition

Changes in V5:
* Add to ${PN}-container 
${datadir}/dbus-1/system.d/org.freedesktop.import1.conf to avoid QA issue

Changes in V4:
* Squash fixes into the upgrade patch

Changes in V3:
* Change SRC_URI back to include musl patches unconditionally

Changes in V2:
* Update commit message to detail why dropping 
0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
* Remove -Dfirmware-path option
* Fix segment fault in case of musl
* Workaround race condition in rpm.py test case


The following changes since commit 05c32d2de1ee4681cc78cb107a158e9ab22c9619:

  oeqa/selftest/wic: Split tests into two class groups (2018-07-16 13:21:35 
+0100)

are available in the git repository at:

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

Chen Qi (2):
  systemd: upgrade to 239
  systemd-boot: upgrade to 239

 .../{systemd-boot_237.bb => systemd-boot_239.bb}   |   5 +-
 meta/recipes-core/systemd/systemd.inc  |   2 +-
 ...01-Also-check-i386-i586-and-i686-for-ia32.patch |  28 --
 ...rt_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch |  34 --
 ...ck-protector-flags-to-workaround-musl-bui.patch |  28 +-
 ...nv-when-secure-versions-are-not-available.patch |  10 +-
 ...-install-dependency-links-at-install-tim.patch} |  22 +-
 c-Change-the-default-device-timeout-to-2.patch |  19 +-
 ...arse_uid-when-unmounting-user-runtime-dir.patch | 110 ++
 ...=> 0002-don-t-use-glibc-specific-qsort_r.patch} | 108 +-
 ...per-instead-of-looking-for-relative-opti.patch} |  16 +-
 ...n_t-is-glibc-specific-use-raw-signature-.patch} |  25 +-
 ...003-implment-systemd-sysv-install-for-OE.patch} |  10 +-
 ...lback-parse_printf_format-implementation.patch} |  49 +--
 ...patch => 0004-rules-whitelist-hd-devices.patch} |   8 +-
 ...-Make-root-s-home-directory-configurable.patch} |  34 +-
 ...clude-gshadow-only-if-ENABLE_GSHADOW-is-1.patch |  29 ++
 ...> 0006-remove-nobody-user-group-checking.patch} |  40 +--
 ...sic-missing.h-check-for-missing-strndupa.patch} |  66 ++--
 ...patch => 0007-Include-netinet-if_ether.h.patch} |  51 +--
 ...evert-rules-remove-firmware-loading-rules.patch |  28 --
 ...es-watch-metadata-changes-in-ide-devices.patch} |   6 +-
 ...e-nss-tests-if-nss-systemd-is-not-enable.patch} |  16 +-
 ...-remove-userspace-firmware-loading-suppor.patch | 377 -
 ...f-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch} |  86 +++--
 ...=> 0009-add-missing-FTW_-macros-for-musl.patch} |  12 +-
 ...es-Build-conditionally-when-ENABLE_MYHOS.patch} |  10 +-
 .../0009-remove-duplicate-include-uchar.h.patch|  41 ---
 .../0010-check-for-uchar.h-in-meson.build.patch|  45 ---
 ...l-don-t-fail-if-libc-doesn-t-support-IDN.patch} |  17 +-
 ...ssing.h-check-for-missing-__compar_fn_t-.patch} |  23 +-
 ...of-__register_atfork-for-non-glibc-build.patch} |  18 +-
 ...> 0013-Use-uintmax_t-for-handling-rlim_t.patch} |  33 +-
 ...ULONG_LONG_MAX-definition-in-case-of-mus.patch} |  12 +-
 ...xdecoct.c-Include-missing.h-for-strndupa.patch} |  12 +-
 ...c-Disable-tests-for-missing-typedefs-in-.patch} |  14 +-
 ...ss-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch} |  20 +-
 ...-compatible-basename-for-non-glibc-syste.patch} |  11 +-
 ...-check-for-missing-canonicalize_file_name.patch |  47 ---
 ...ble-buffering-when-writing-to-oom_score_a.patch |  39 +++
 ...-XSI-compliant-strerror_r-from-GNU-specif.patch |  62 
 ...PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch |  43 ---
 meta/recipes-core/systemd/systemd/0032-memfd.patch | 272 ---
 ...cros-rename-noreturn-into-_noreturn_-8456.patch | 203 ---
 ...truncation-compile-failure-by-typecasting.patch | 173 --
 ...ix-build-with-gcc8-Werror-format-truncati.patch |  53 ---
 meta/recipes-core/systemd/systemd/libmount.patch   |  75 
 .../systemd/{systemd_237.bb => systemd_239.bb} | 126 ---
 48 files changed, 735 insertions(+), 1833 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_237.bb => systemd-boot_239.bb} 
(91%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
 rename 
meta/recipes-core/systemd/systemd/{0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
 => 0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch} (83%)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-login-use-parse_uid-when-unmounting-user-runtime-dir.patch
 rename 
meta/recipes-core/systemd/systemd/{0022-don-t-use-glibc-specific-qsort_r.patch 
=> 0002-don-t-use-glibc-specific-qsort_r.patch} (52%)
 rename 
meta/recipes-core/systemd/systemd/{0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
 => 

Re: [OE-core] [PATCH] systemd: Enable coredump if it is in PACKAGECONFIG

2018-07-16 Thread ChenQi

Hi Alistair,

I don't think this file needs to be modified. And you are uncommenting 
the default values. The behavior is expected to remain the same.


Also, I just did a quick test with coredump enabled and things were 
working correctly.


Best Regards,
Chen Qi

On 07/17/2018 06:50 AM, Alistair Francis wrote:

Previously if coredump was enabled in PACKAGECONFIG the user would still
need to modify the conf file to enable it. Now the config will be
enabled if coredump is enalbed in the PACKAGECONFIG.

Signed-off-by: Alistair Francis 
---
  .../systemd/systemd/coredump.conf | 21 +++
  meta/recipes-core/systemd/systemd_237.bb  |  5 +
  2 files changed, 26 insertions(+)
  create mode 100644 meta/recipes-core/systemd/systemd/coredump.conf

diff --git a/meta/recipes-core/systemd/systemd/coredump.conf 
b/meta/recipes-core/systemd/systemd/coredump.conf
new file mode 100644
index 00..4cbc19cdc5
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/coredump.conf
@@ -0,0 +1,21 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+#
+# Entries in this file show the compile time defaults.
+# You can change settings by editing this file.
+# Defaults can be restored by simply deleting this file.
+#
+# See coredump.conf(5) for details.
+
+[Coredump]
+Storage=external
+Compress=yes
+ProcessSizeMax=2G
+ExternalSizeMax=2G
+#JournalSizeMax=767M
+#MaxUse=
+#KeepFree=
diff --git a/meta/recipes-core/systemd/systemd_237.bb 
b/meta/recipes-core/systemd/systemd_237.bb
index 3efca33e73..db2848fd65 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -276,6 +276,11 @@ do_install() {
chown polkitd:root ${D}${datadir}/polkit-1/rules.d
fi
fi
+
+  # If coredump was enalbed, enable it in the config
+  if ${@bb.utils.contains('PACKAGECONFIG', 'coredump', 'true', 'false', d)}; 
then
+install -Dm 0755 ${FILE_DIRNAME}/${BPN}/coredump.conf 
${D}${sysconfdir}/systemd/
+  fi
  }
  
  



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


Re: [OE-core] [PATCH 3/3] oeqa/runtime/cases/rpm.py: workaround race condition

2018-07-16 Thread ChenQi
I'll backport the patch, integrate it into the upgrade patch and send 
out V6.


Best Regards,
Chen Qi

On 07/16/2018 07:15 PM, Burton, Ross wrote:

Still refusing to accept a "sleep 1" on a race:

1) a 1 second sleep just makes the race rarer, a loaded host and
you'll hit it again and want to push it to 2 seconds
2) Upstream fix at
https://github.com/systemd/systemd/commit/86d18f3b09ec984ef3732567af992adb2dc77a8a

Ross

On 16 July 2018 at 04:20, Chen Qi  wrote:

With the recent change in new systemd version, it's possible that
a user is deleted before stopping user-runtime-dir@xxx.service.
See link below.

   https://github.com/systemd/systemd/issues/9541

Workaround this issue by delay for 1 second before deleting user.

Signed-off-by: Chen Qi 
---
  meta/lib/oeqa/runtime/cases/rpm.py | 6 ++
  1 file changed, 6 insertions(+)

diff --git a/meta/lib/oeqa/runtime/cases/rpm.py 
b/meta/lib/oeqa/runtime/cases/rpm.py
index 1e5e463..2f9dcad 100644
--- a/meta/lib/oeqa/runtime/cases/rpm.py
+++ b/meta/lib/oeqa/runtime/cases/rpm.py
@@ -87,6 +87,12 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
  self.assertEqual(status, 0, msg=msg)

  def unset_up_test_user(u):
+# Due to recent change in systemd, we need to sleep for a while
+# to avoid unexpected failure of user-runtime-dir@1000.service
+# See https://github.com/systemd/systemd/issues/9541
+if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
+self.target.run('sleep 1')
+
  status, output = self.target.run('userdel -r %s' % u)
  msg = 'Failed to erase user: %s' % output
  self.assertTrue(status == 0, msg=msg)
--
1.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


Re: [OE-core] [PATCH] systemd: Enable coredump if it is in PACKAGECONFIG

2018-07-16 Thread Khem Raj




On 7/16/18 5:00 PM, Andre McCurdy wrote:

On Mon, Jul 16, 2018 at 4:22 PM, Alistair Francis  wrote:

On Mon, Jul 16, 2018 at 4:19 PM, Andre McCurdy  wrote:

On Mon, Jul 16, 2018 at 3:50 PM, Alistair Francis
 wrote:

Previously if coredump was enabled in PACKAGECONFIG the user would still
need to modify the conf file to enable it. Now the config will be
enabled if coredump is enalbed in the PACKAGECONFIG.

^^^
another typo



Signed-off-by: Alistair Francis 
---
  .../systemd/systemd/coredump.conf | 21 +++
  meta/recipes-core/systemd/systemd_237.bb  |  5 +
  2 files changed, 26 insertions(+)
  create mode 100644 meta/recipes-core/systemd/systemd/coredump.conf

diff --git a/meta/recipes-core/systemd/systemd/coredump.conf 
b/meta/recipes-core/systemd/systemd/coredump.conf
new file mode 100644
index 00..4cbc19cdc5
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/coredump.conf
@@ -0,0 +1,21 @@
+#  This file is part of systemd.


If this file is part of systemd, why does it need to be added to
oe-core? Isn't there a copy somewhere in the systemd source directory
which could be used?


The file is included by default, but by default the coredump config is disabled.

At first I was modifying the systemd source to enable it but I thought
that this would be a better approach as it allows explicit editing
instead of a diff which needs to be maintained.


A diff doesn't need to maintained until it fails to apply - and then
it generally NEEDS to be maintained, or at least reviewed.

If you unconditionally over-write a file then there's not warning when
your version becomes stale.

However, if you don't like patching, then an alternative could be to
use sed, e.g. something like:

   sed 's/^#\(\(Storage\|Compress\|ProcessSizeMax\|ExternalSizeMax\).*=.*\)/\1/'
-i ${D}${sysconfdir}/systemd/coredump.conf


+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+#
+# Entries in this file show the compile time defaults.
+# You can change settings by editing this file.
+# Defaults can be restored by simply deleting this file.
+#
+# See coredump.conf(5) for details.
+
+[Coredump]
+Storage=external
+Compress=yes
+ProcessSizeMax=2G
+ExternalSizeMax=2G
+#JournalSizeMax=767M
+#MaxUse=
+#KeepFree=


We also need an easy way to make these values configurable during build, 
since machines may not have these kind of resources to offer and would 
like to use smaller value set.



diff --git a/meta/recipes-core/systemd/systemd_237.bb 
b/meta/recipes-core/systemd/systemd_237.bb
index 3efca33e73..db2848fd65 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -276,6 +276,11 @@ do_install() {
 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
 fi
 fi
+
+  # If coredump was enalbed, enable it in the config


Typo.


Thanks, I'll fix it.




+  if ${@bb.utils.contains('PACKAGECONFIG', 'coredump', 'true', 'false', d)}; 
then
+install -Dm 0755 ${FILE_DIRNAME}/${BPN}/coredump.conf 
${D}${sysconfdir}/systemd/


Installing from the meta layer directly to ${D} is not the typical
approach and may cause unexpected problems (e.g. the recipe won't get
rebuilt if the file is changed, etc).


What is the preferred approach?


Add the file the SRC_URI and then install from ${WORKDIR}. There are
many example of that if you read through recipes in oe-core.


Alistair




+  fi
  }


--
2.17.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

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


Re: [OE-core] [PATCH] systemd: Enable coredump if it is in PACKAGECONFIG

2018-07-16 Thread Andre McCurdy
On Mon, Jul 16, 2018 at 4:22 PM, Alistair Francis  wrote:
> On Mon, Jul 16, 2018 at 4:19 PM, Andre McCurdy  wrote:
>> On Mon, Jul 16, 2018 at 3:50 PM, Alistair Francis
>>  wrote:
>>> Previously if coredump was enabled in PACKAGECONFIG the user would still
>>> need to modify the conf file to enable it. Now the config will be
>>> enabled if coredump is enalbed in the PACKAGECONFIG.
>>>
>>> Signed-off-by: Alistair Francis 
>>> ---
>>>  .../systemd/systemd/coredump.conf | 21 +++
>>>  meta/recipes-core/systemd/systemd_237.bb  |  5 +
>>>  2 files changed, 26 insertions(+)
>>>  create mode 100644 meta/recipes-core/systemd/systemd/coredump.conf
>>>
>>> diff --git a/meta/recipes-core/systemd/systemd/coredump.conf 
>>> b/meta/recipes-core/systemd/systemd/coredump.conf
>>> new file mode 100644
>>> index 00..4cbc19cdc5
>>> --- /dev/null
>>> +++ b/meta/recipes-core/systemd/systemd/coredump.conf
>>> @@ -0,0 +1,21 @@
>>> +#  This file is part of systemd.
>>
>> If this file is part of systemd, why does it need to be added to
>> oe-core? Isn't there a copy somewhere in the systemd source directory
>> which could be used?
>
> The file is included by default, but by default the coredump config is 
> disabled.
>
> At first I was modifying the systemd source to enable it but I thought
> that this would be a better approach as it allows explicit editing
> instead of a diff which needs to be maintained.

A diff doesn't need to maintained until it fails to apply - and then
it generally NEEDS to be maintained, or at least reviewed.

If you unconditionally over-write a file then there's not warning when
your version becomes stale.

However, if you don't like patching, then an alternative could be to
use sed, e.g. something like:

  sed 's/^#\(\(Storage\|Compress\|ProcessSizeMax\|ExternalSizeMax\).*=.*\)/\1/'
-i ${D}${sysconfdir}/systemd/coredump.conf

>>> +#  systemd is free software; you can redistribute it and/or modify it
>>> +#  under the terms of the GNU Lesser General Public License as published by
>>> +#  the Free Software Foundation; either version 2.1 of the License, or
>>> +#  (at your option) any later version.
>>> +#
>>> +# Entries in this file show the compile time defaults.
>>> +# You can change settings by editing this file.
>>> +# Defaults can be restored by simply deleting this file.
>>> +#
>>> +# See coredump.conf(5) for details.
>>> +
>>> +[Coredump]
>>> +Storage=external
>>> +Compress=yes
>>> +ProcessSizeMax=2G
>>> +ExternalSizeMax=2G
>>> +#JournalSizeMax=767M
>>> +#MaxUse=
>>> +#KeepFree=
>>> diff --git a/meta/recipes-core/systemd/systemd_237.bb 
>>> b/meta/recipes-core/systemd/systemd_237.bb
>>> index 3efca33e73..db2848fd65 100644
>>> --- a/meta/recipes-core/systemd/systemd_237.bb
>>> +++ b/meta/recipes-core/systemd/systemd_237.bb
>>> @@ -276,6 +276,11 @@ do_install() {
>>> chown polkitd:root ${D}${datadir}/polkit-1/rules.d
>>> fi
>>> fi
>>> +
>>> +  # If coredump was enalbed, enable it in the config
>>
>> Typo.
>
> Thanks, I'll fix it.
>
>>
>>> +  if ${@bb.utils.contains('PACKAGECONFIG', 'coredump', 'true', 'false', 
>>> d)}; then
>>> +install -Dm 0755 ${FILE_DIRNAME}/${BPN}/coredump.conf 
>>> ${D}${sysconfdir}/systemd/
>>
>> Installing from the meta layer directly to ${D} is not the typical
>> approach and may cause unexpected problems (e.g. the recipe won't get
>> rebuilt if the file is changed, etc).
>
> What is the preferred approach?

Add the file the SRC_URI and then install from ${WORKDIR}. There are
many example of that if you read through recipes in oe-core.

> Alistair
>
>>
>>> +  fi
>>>  }
>>>
>>>
>>> --
>>> 2.17.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
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] systemd: Enable coredump if it is in PACKAGECONFIG

2018-07-16 Thread Alistair Francis
On Mon, Jul 16, 2018 at 4:19 PM, Andre McCurdy  wrote:
> On Mon, Jul 16, 2018 at 3:50 PM, Alistair Francis
>  wrote:
>> Previously if coredump was enabled in PACKAGECONFIG the user would still
>> need to modify the conf file to enable it. Now the config will be
>> enabled if coredump is enalbed in the PACKAGECONFIG.
>>
>> Signed-off-by: Alistair Francis 
>> ---
>>  .../systemd/systemd/coredump.conf | 21 +++
>>  meta/recipes-core/systemd/systemd_237.bb  |  5 +
>>  2 files changed, 26 insertions(+)
>>  create mode 100644 meta/recipes-core/systemd/systemd/coredump.conf
>>
>> diff --git a/meta/recipes-core/systemd/systemd/coredump.conf 
>> b/meta/recipes-core/systemd/systemd/coredump.conf
>> new file mode 100644
>> index 00..4cbc19cdc5
>> --- /dev/null
>> +++ b/meta/recipes-core/systemd/systemd/coredump.conf
>> @@ -0,0 +1,21 @@
>> +#  This file is part of systemd.
>
> If this file is part of systemd, why does it need to be added to
> oe-core? Isn't there a copy somewhere in the systemd source directory
> which could be used?

The file is included by default, but by default the coredump config is disabled.

At first I was modifying the systemd source to enable it but I thought
that this would be a better approach as it allows explicit editing
instead of a diff which needs to be maintained.

>
>> +#  systemd is free software; you can redistribute it and/or modify it
>> +#  under the terms of the GNU Lesser General Public License as published by
>> +#  the Free Software Foundation; either version 2.1 of the License, or
>> +#  (at your option) any later version.
>> +#
>> +# Entries in this file show the compile time defaults.
>> +# You can change settings by editing this file.
>> +# Defaults can be restored by simply deleting this file.
>> +#
>> +# See coredump.conf(5) for details.
>> +
>> +[Coredump]
>> +Storage=external
>> +Compress=yes
>> +ProcessSizeMax=2G
>> +ExternalSizeMax=2G
>> +#JournalSizeMax=767M
>> +#MaxUse=
>> +#KeepFree=
>> diff --git a/meta/recipes-core/systemd/systemd_237.bb 
>> b/meta/recipes-core/systemd/systemd_237.bb
>> index 3efca33e73..db2848fd65 100644
>> --- a/meta/recipes-core/systemd/systemd_237.bb
>> +++ b/meta/recipes-core/systemd/systemd_237.bb
>> @@ -276,6 +276,11 @@ do_install() {
>> chown polkitd:root ${D}${datadir}/polkit-1/rules.d
>> fi
>> fi
>> +
>> +  # If coredump was enalbed, enable it in the config
>
> Typo.

Thanks, I'll fix it.

>
>> +  if ${@bb.utils.contains('PACKAGECONFIG', 'coredump', 'true', 'false', 
>> d)}; then
>> +install -Dm 0755 ${FILE_DIRNAME}/${BPN}/coredump.conf 
>> ${D}${sysconfdir}/systemd/
>
> Installing from the meta layer directly to ${D} is not the typical
> approach and may cause unexpected problems (e.g. the recipe won't get
> rebuilt if the file is changed, etc).

What is the preferred approach?

Alistair

>
>> +  fi
>>  }
>>
>>
>> --
>> 2.17.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
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] systemd: Enable coredump if it is in PACKAGECONFIG

2018-07-16 Thread Andre McCurdy
On Mon, Jul 16, 2018 at 3:50 PM, Alistair Francis
 wrote:
> Previously if coredump was enabled in PACKAGECONFIG the user would still
> need to modify the conf file to enable it. Now the config will be
> enabled if coredump is enalbed in the PACKAGECONFIG.
>
> Signed-off-by: Alistair Francis 
> ---
>  .../systemd/systemd/coredump.conf | 21 +++
>  meta/recipes-core/systemd/systemd_237.bb  |  5 +
>  2 files changed, 26 insertions(+)
>  create mode 100644 meta/recipes-core/systemd/systemd/coredump.conf
>
> diff --git a/meta/recipes-core/systemd/systemd/coredump.conf 
> b/meta/recipes-core/systemd/systemd/coredump.conf
> new file mode 100644
> index 00..4cbc19cdc5
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/coredump.conf
> @@ -0,0 +1,21 @@
> +#  This file is part of systemd.

If this file is part of systemd, why does it need to be added to
oe-core? Isn't there a copy somewhere in the systemd source directory
which could be used?

> +#  systemd is free software; you can redistribute it and/or modify it
> +#  under the terms of the GNU Lesser General Public License as published by
> +#  the Free Software Foundation; either version 2.1 of the License, or
> +#  (at your option) any later version.
> +#
> +# Entries in this file show the compile time defaults.
> +# You can change settings by editing this file.
> +# Defaults can be restored by simply deleting this file.
> +#
> +# See coredump.conf(5) for details.
> +
> +[Coredump]
> +Storage=external
> +Compress=yes
> +ProcessSizeMax=2G
> +ExternalSizeMax=2G
> +#JournalSizeMax=767M
> +#MaxUse=
> +#KeepFree=
> diff --git a/meta/recipes-core/systemd/systemd_237.bb 
> b/meta/recipes-core/systemd/systemd_237.bb
> index 3efca33e73..db2848fd65 100644
> --- a/meta/recipes-core/systemd/systemd_237.bb
> +++ b/meta/recipes-core/systemd/systemd_237.bb
> @@ -276,6 +276,11 @@ do_install() {
> chown polkitd:root ${D}${datadir}/polkit-1/rules.d
> fi
> fi
> +
> +  # If coredump was enalbed, enable it in the config

Typo.

> +  if ${@bb.utils.contains('PACKAGECONFIG', 'coredump', 'true', 'false', d)}; 
> then
> +install -Dm 0755 ${FILE_DIRNAME}/${BPN}/coredump.conf 
> ${D}${sysconfdir}/systemd/

Installing from the meta layer directly to ${D} is not the typical
approach and may cause unexpected problems (e.g. the recipe won't get
rebuilt if the file is changed, etc).

> +  fi
>  }
>
>
> --
> 2.17.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] [PATCH] systemd: Enable coredump if it is in PACKAGECONFIG

2018-07-16 Thread Alistair Francis
Previously if coredump was enabled in PACKAGECONFIG the user would still
need to modify the conf file to enable it. Now the config will be
enabled if coredump is enalbed in the PACKAGECONFIG.

Signed-off-by: Alistair Francis 
---
 .../systemd/systemd/coredump.conf | 21 +++
 meta/recipes-core/systemd/systemd_237.bb  |  5 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/coredump.conf

diff --git a/meta/recipes-core/systemd/systemd/coredump.conf 
b/meta/recipes-core/systemd/systemd/coredump.conf
new file mode 100644
index 00..4cbc19cdc5
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/coredump.conf
@@ -0,0 +1,21 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+#
+# Entries in this file show the compile time defaults.
+# You can change settings by editing this file.
+# Defaults can be restored by simply deleting this file.
+#
+# See coredump.conf(5) for details.
+
+[Coredump]
+Storage=external
+Compress=yes
+ProcessSizeMax=2G
+ExternalSizeMax=2G
+#JournalSizeMax=767M
+#MaxUse=
+#KeepFree=
diff --git a/meta/recipes-core/systemd/systemd_237.bb 
b/meta/recipes-core/systemd/systemd_237.bb
index 3efca33e73..db2848fd65 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -276,6 +276,11 @@ do_install() {
chown polkitd:root ${D}${datadir}/polkit-1/rules.d
fi
fi
+
+  # If coredump was enalbed, enable it in the config
+  if ${@bb.utils.contains('PACKAGECONFIG', 'coredump', 'true', 'false', d)}; 
then
+install -Dm 0755 ${FILE_DIRNAME}/${BPN}/coredump.conf 
${D}${sysconfdir}/systemd/
+  fi
 }
 
 
-- 
2.17.1

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


Re: [OE-core] [PATCH] ndctl: Add the NDCTL package

2018-07-16 Thread Alistair Francis
On Mon, Jul 16, 2018 at 2:20 PM, Khem Raj  wrote:
>
>
> On Mon, Jul 16, 2018 at 2:07 PM Alistair Francis 
> wrote:
>>
>> Add the NDCTL package (the libnvdimm utility library). This is based
>> on the work from the meta-luv layer with a version bump.
>
>
> I am not sure if it is a core candidate as yet
> We can accept it into meta-oe and if it get useful for multiple
> architectures later we can propose it into oe-core

Ok, resubmitted to meta-oe.

Alistair

>
>>
>> Signed-off-by: Alistair Francis 
>> ---
>>  meta/recipes-core/ndctl/ndctl_git.bb | 34 
>>  1 file changed, 34 insertions(+)
>>  create mode 100644 meta/recipes-core/ndctl/ndctl_git.bb
>>
>> diff --git a/meta/recipes-core/ndctl/ndctl_git.bb
>> b/meta/recipes-core/ndctl/ndctl_git.bb
>> new file mode 100644
>> index 00..3bf54e74bf
>> --- /dev/null
>> +++ b/meta/recipes-core/ndctl/ndctl_git.bb
>> @@ -0,0 +1,34 @@
>> +SUMMARY = "libnvdimm utility library"
>> +DESCRIPTION = "Utility library for managing the libnvdimm \
>> +(non-volatile memory device) sub-system in the Linux kernel. \
>> +The LIBNVDIMM subsystem provides support for three types of \
>> +NVDIMMs, namely,PMEM, BLK, and NVDIMM devices that can \
>> +simultaneously support both PMEM and BLK mode access."
>> +HOMEPAGE =
>> "https://git.kernel.org/cgit/linux/kernel/git/nvdimm/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next;
>> +LICENSE = "GPLv2+"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=e66651809cac5da60c8b80e9e4e79e08"
>> +
>> +inherit autotools-brokensep pkgconfig module-base
>> +
>> +SRCREV = "0d6aeeabec9d271e08c12e4cf679b59946e20156"
>> +SRC_URI = "git://github.com/pmem/ndctl.git"
>> +
>> +DEPENDS = "virtual/kernel kmod udev json-c"
>> +
>> +PV = "v61+git${SRCPV}"
>> +S = "${WORKDIR}/git"
>> +
>> +EXTRA_OECONF += "--enable-test --enable-destructive --disable-docs"
>> +
>> +do_configure_prepend() {
>> +${S}/autogen.sh
>> +}
>> +
>> +do_install_append() {
>> +install -d ${D}${bindir}
>> +install -m 755 ${WORKDIR}/ndctl_runner ${D}${bindir}
>> +}
>> +
>> +COMPATIBLE_HOST='(x86_64).*'
>> +
>> +FILES_${PN} += "/usr/share/bash-completion/completions/ndctl"
>> --
>> 2.17.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
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] ndctl: Add the NDCTL package

2018-07-16 Thread Khem Raj
On Mon, Jul 16, 2018 at 2:07 PM Alistair Francis 
wrote:

> Add the NDCTL package (the libnvdimm utility library). This is based
> on the work from the meta-luv layer with a version bump.
>

I am not sure if it is a core candidate as yet
We can accept it into meta-oe and if it get useful for multiple
architectures later we can propose it into oe-core


> Signed-off-by: Alistair Francis 
> ---
>  meta/recipes-core/ndctl/ndctl_git.bb | 34 
>  1 file changed, 34 insertions(+)
>  create mode 100644 meta/recipes-core/ndctl/ndctl_git.bb
>
> diff --git a/meta/recipes-core/ndctl/ndctl_git.bb
> b/meta/recipes-core/ndctl/ndctl_git.bb
> new file mode 100644
> index 00..3bf54e74bf
> --- /dev/null
> +++ b/meta/recipes-core/ndctl/ndctl_git.bb
> @@ -0,0 +1,34 @@
> +SUMMARY = "libnvdimm utility library"
> +DESCRIPTION = "Utility library for managing the libnvdimm \
> +(non-volatile memory device) sub-system in the Linux kernel. \
> +The LIBNVDIMM subsystem provides support for three types of \
> +NVDIMMs, namely,PMEM, BLK, and NVDIMM devices that can \
> +simultaneously support both PMEM and BLK mode access."
> +HOMEPAGE = "
> https://git.kernel.org/cgit/linux/kernel/git/nvdimm/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next
> "
> +LICENSE = "GPLv2+"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=e66651809cac5da60c8b80e9e4e79e08"
> +
> +inherit autotools-brokensep pkgconfig module-base
> +
> +SRCREV = "0d6aeeabec9d271e08c12e4cf679b59946e20156"
> +SRC_URI = "git://github.com/pmem/ndctl.git"
> +
> +DEPENDS = "virtual/kernel kmod udev json-c"
> +
> +PV = "v61+git${SRCPV}"
> +S = "${WORKDIR}/git"
> +
> +EXTRA_OECONF += "--enable-test --enable-destructive --disable-docs"
> +
> +do_configure_prepend() {
> +${S}/autogen.sh
> +}
> +
> +do_install_append() {
> +install -d ${D}${bindir}
> +install -m 755 ${WORKDIR}/ndctl_runner ${D}${bindir}
> +}
> +
> +COMPATIBLE_HOST='(x86_64).*'
> +
> +FILES_${PN} += "/usr/share/bash-completion/completions/ndctl"
> --
> 2.17.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] [PATCH] ndctl: Add the NDCTL package

2018-07-16 Thread Alistair Francis
Add the NDCTL package (the libnvdimm utility library). This is based
on the work from the meta-luv layer with a version bump.

Signed-off-by: Alistair Francis 
---
 meta/recipes-core/ndctl/ndctl_git.bb | 34 
 1 file changed, 34 insertions(+)
 create mode 100644 meta/recipes-core/ndctl/ndctl_git.bb

diff --git a/meta/recipes-core/ndctl/ndctl_git.bb 
b/meta/recipes-core/ndctl/ndctl_git.bb
new file mode 100644
index 00..3bf54e74bf
--- /dev/null
+++ b/meta/recipes-core/ndctl/ndctl_git.bb
@@ -0,0 +1,34 @@
+SUMMARY = "libnvdimm utility library"
+DESCRIPTION = "Utility library for managing the libnvdimm \
+(non-volatile memory device) sub-system in the Linux kernel. \
+The LIBNVDIMM subsystem provides support for three types of \
+NVDIMMs, namely,PMEM, BLK, and NVDIMM devices that can \
+simultaneously support both PMEM and BLK mode access."
+HOMEPAGE = 
"https://git.kernel.org/cgit/linux/kernel/git/nvdimm/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next;
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e66651809cac5da60c8b80e9e4e79e08"
+
+inherit autotools-brokensep pkgconfig module-base
+
+SRCREV = "0d6aeeabec9d271e08c12e4cf679b59946e20156"
+SRC_URI = "git://github.com/pmem/ndctl.git"
+
+DEPENDS = "virtual/kernel kmod udev json-c"
+
+PV = "v61+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF += "--enable-test --enable-destructive --disable-docs"
+
+do_configure_prepend() {
+${S}/autogen.sh
+}
+
+do_install_append() {
+install -d ${D}${bindir}
+install -m 755 ${WORKDIR}/ndctl_runner ${D}${bindir}
+}
+
+COMPATIBLE_HOST='(x86_64).*'
+
+FILES_${PN} += "/usr/share/bash-completion/completions/ndctl"
-- 
2.17.1

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


[OE-core] [PATCH] dbus: Enable user-session package config when x11 is set

2018-07-16 Thread Alistair Francis
When x11 is set in DISTRO_FEATURES enable user-session in dbus as the
user is probably targeting a user session.

Signed-off-by: Alistair Francis 
---
 meta/recipes-core/dbus/dbus_1.12.8.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/dbus/dbus_1.12.8.bb 
b/meta/recipes-core/dbus/dbus_1.12.8.bb
index b3ddaafab5..7499b93244 100644
--- a/meta/recipes-core/dbus/dbus_1.12.8.bb
+++ b/meta/recipes-core/dbus/dbus_1.12.8.bb
@@ -102,7 +102,9 @@ EXTRA_OECONF = "--disable-tests \
 EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
 EXTRA_OECONF_append_class-native = " --disable-selinux"
 
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 
user-session', '', d)} \
+   ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+  "
 PACKAGECONFIG_class-native = ""
 PACKAGECONFIG_class-nativesdk = ""
 
-- 
2.17.1

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


[OE-core] [PATCH] populate_sdk_base: Use default value assignment for SDK_TITLE/SDKEXTPATH

2018-07-16 Thread Richard Purdie
This allows the user mode flexibility about centrally overriding these
rather than needing to do it on a per recipe basis.

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

diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index aae6786e586..7ffaf84a45d 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -63,8 +63,8 @@ SDK_PRE_INSTALL_COMMAND ?= ""
 SDK_POST_INSTALL_COMMAND ?= ""
 SDK_RELOCATE_AFTER_INSTALL ?= "1"
 
-SDKEXTPATH ?= "~/${@d.getVar('DISTRO')}_sdk"
-SDK_TITLE ?= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
+SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
+SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
 
 SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
 SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
-- 
2.17.1

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


Re: [OE-core] [HELP] ptest & ptest

2018-07-16 Thread nick83ola
Thanks I'll have a look at those


On Mon, 16 Jul 2018 at 15:19, Tim Orling  wrote:

>
> http://cgit.openembedded.org/meta-openembedded/tree/meta-python/recipes-devtools/python/python-cryptography_2.2.2.bb
>
> http://cgit.openembedded.org/meta-openembedded/tree/meta-python/recipes-devtools/python/python-pygpgme_0.3.bb
> On Mon, Jul 16, 2018 at 1:41 AM nick83ola  wrote:
>
>> Hi Alex,
>> thanks for your response.
>>
>> Do you or anyone else have an example about an actual python package that
>> use ptest (possibily using distutils/nose/py.test)?
>>
>> Thanks
>> Nick
>>
>> On Tue, 26 Jun 2018 at 16:07, Alexander Kanavin 
>> wrote:
>>
>>> The Yocto documentation has general information:
>>>
>>>
>>> https://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#testing-packages-with-ptest
>>>
>>> Alex
>>>
>>>
>>> 2018-06-26 14:57 GMT+02:00 nick83ola :
>>> > Hi all,
>>> >
>>> > I have a python3 package that launch a py.test test suite from
>>> > setup.py and I have created a recipe for it using setuptools3
>>> >
>>> > Anyone has some hint about how to add a ptest target to run the tests
>>> > into the final image (or better in a qemu test image)?
>>> >
>>> > there are some recipe/documentation that I can look at about creating
>>> > -ptest target for python packages?
>>> >
>>> > Regards
>>> > Nicola Lunghi
>>> > --
>>> > ___
>>> > 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
>>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [RFC 6/9] runqueue: Pass dependency ID to hash validate

2018-07-16 Thread Joshua Watt
If the dependency ID is being used to track task dependencies, the hash
validation function needs to know about it in order to properly validate
the hash.

TODO: This currently isn't going to be backward compatible with older
hashvalidate functions. Is that necessary, and if so are there any
suggestions for a good approach?

Signed-off-by: Joshua Watt 
---
 bitbake/lib/bb/runqueue.py | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 5922431bbe1..82dce426bd1 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1531,6 +1531,7 @@ class RunQueue:
 valid = []
 sq_hash = []
 sq_hashfn = []
+sq_depid = []
 sq_fn = []
 sq_taskname = []
 sq_task = []
@@ -1549,15 +1550,16 @@ class RunQueue:
 sq_fn.append(fn)
 sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
 sq_hash.append(self.rqdata.runtaskentries[tid].hash)
+sq_depid.append(self.rqdata.runtaskentries[tid].depid)
 sq_taskname.append(taskname)
 sq_task.append(tid)
-locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : 
sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.data }
+locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : 
sq_hash, "sq_hashfn" : sq_hashfn, "sq_depid" : sq_depid, "d" : self.cooker.data 
}
 try:
-call = self.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, 
d, siginfo=True)"
+call = self.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, 
sq_depid, d, siginfo=True)"
 valid = bb.utils.better_eval(call, locs)
 # Handle version with no siginfo parameter
 except TypeError:
-call = self.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, 
d)"
+call = self.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, 
sq_depid, d)"
 valid = bb.utils.better_eval(call, locs)
 for v in valid:
 valid_new.add(sq_task[v])
@@ -2269,6 +2271,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
 if self.rq.hashvalidate:
 sq_hash = []
 sq_hashfn = []
+sq_depid = []
 sq_fn = []
 sq_taskname = []
 sq_task = []
@@ -2300,10 +2303,11 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
 sq_fn.append(fn)
 sq_hashfn.append(self.rqdata.dataCaches[mc].hashfn[taskfn])
 sq_hash.append(self.rqdata.runtaskentries[tid].hash)
+sq_depid.append(self.rqdata.runtaskentries[tid].depid)
 sq_taskname.append(taskname)
 sq_task.append(tid)
-call = self.rq.hashvalidate + "(sq_fn, sq_task, sq_hash, 
sq_hashfn, d)"
-locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : 
sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.data }
+call = self.rq.hashvalidate + "(sq_fn, sq_task, sq_hash, 
sq_hashfn, sq_depid, d)"
+locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : 
sq_hash, "sq_hashfn" : sq_hashfn, "sq_depid": sq_depid, "d" : self.cooker.data }
 valid = bb.utils.better_eval(call, locs)
 
 valid_new = stamppresent
-- 
2.17.1

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


[OE-core] [RFC 8/9] hashserver: Add initial reference server

2018-07-16 Thread Joshua Watt
Adds an initial reference implementation of the hash server.

NOTE: This is my first dive into HTTP & REST technologies. Feedback is
appreciated. Also, I don't think it will be necessary for this reference
implementation to live in bitbake, and it can be moved to it's own
independent project if necessary?

Also, this server has some concurrency issues that I haven't tracked
down and will occasionally fail to record a new POST'd task with an
error indicating the database is locked. Based on some reading, I
believe this is because the server is using a sqlite backend, and it
would go away with a more production worthy backend. Anyway, it is good
enough for some preliminary testing.

Starting the server is simple and only requires pipenv to be installed:

 $ pipenv shell
 $ ./app.py

Signed-off-by: Joshua Watt 
---
 bitbake/contrib/hashserver/.gitignore |   2 +
 bitbake/contrib/hashserver/Pipfile|  15 ++
 bitbake/contrib/hashserver/app.py | 212 ++
 3 files changed, 229 insertions(+)
 create mode 100644 bitbake/contrib/hashserver/.gitignore
 create mode 100644 bitbake/contrib/hashserver/Pipfile
 create mode 100755 bitbake/contrib/hashserver/app.py

diff --git a/bitbake/contrib/hashserver/.gitignore 
b/bitbake/contrib/hashserver/.gitignore
new file mode 100644
index 000..030640a2b21
--- /dev/null
+++ b/bitbake/contrib/hashserver/.gitignore
@@ -0,0 +1,2 @@
+hashes.db
+Pipfile.lock
diff --git a/bitbake/contrib/hashserver/Pipfile 
b/bitbake/contrib/hashserver/Pipfile
new file mode 100644
index 000..29cfb41a907
--- /dev/null
+++ b/bitbake/contrib/hashserver/Pipfile
@@ -0,0 +1,15 @@
+[[source]]
+url = "https://pypi.org/simple;
+verify_ssl = true
+name = "pypi"
+
+[packages]
+flask = "*"
+flask-sqlalchemy = "*"
+marshmallow-sqlalchemy = "*"
+flask-marshmallow = "*"
+
+[dev-packages]
+
+[requires]
+python_version = "3.6"
diff --git a/bitbake/contrib/hashserver/app.py 
b/bitbake/contrib/hashserver/app.py
new file mode 100755
index 000..4fd2070fe92
--- /dev/null
+++ b/bitbake/contrib/hashserver/app.py
@@ -0,0 +1,212 @@
+#! /usr/bin/env python3
+#
+# BitBake Hash Server Reference Implementation
+#
+# Copyright (C) 2018 Garmin International
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+from flask import Flask, request, jsonify
+from flask_sqlalchemy import SQLAlchemy
+from flask_marshmallow import Marshmallow
+from sqlalchemy import desc, case, func
+import sqlalchemy
+import sqlite3
+import hashlib
+import datetime
+
+app = Flask(__name__)
+app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///hashes.db'
+app.config['SQLALCHEMY_TIMEOUT'] = 15
+
+# Order matters: Initialize SQLAlchemy before Marshmallow
+db = SQLAlchemy(app)
+ma = Marshmallow(app)
+
+@sqlalchemy.event.listens_for(sqlalchemy.engine.Engine, "connect")
+def set_sqlite_pragma(dbapi_connection, connection_record):
+cursor = dbapi_connection.cursor()
+cursor.execute("PRAGMA journal_mode=WAL")
+cursor.close()
+
+class TaskModel(db.Model):
+__tablename__ = 'tasks'
+
+id = db.Column(db.Integer, primary_key=True)
+taskhash = db.Column(db.String(), nullable=False)
+method = db.Column(db.String(), nullable=False)
+outhash = db.Column(db.String(), nullable=False)
+depid = db.Column(db.String(), nullable=False)
+owner = db.Column(db.String())
+created = db.Column(db.DateTime)
+PN = db.Column(db.String())
+PV = db.Column(db.String())
+PR = db.Column(db.String())
+task = db.Column(db.String())
+outhash_siginfo = db.Column(db.Text())
+
+__table_args__ = (
+db.UniqueConstraint('taskhash', 'method', 'outhash', 
name='unique_task'),
+# Make an index on taskhash and method for fast lookup
+db.Index('lookup_index', 'taskhash', 'method'),
+)
+
+def __init__(self, taskhash, method, outhash, depid, owner=None):
+self.taskhash = taskhash
+self.method = method
+self.outhash = outhash
+self.depid = depid
+self.owner = owner
+self.created = datetime.datetime.utcnow()
+self.task = None
+self.outhash_siginfo = None
+
+schemas = {}
+
+class TaskFullSchema(ma.ModelSchema):
+class Meta:
+model = TaskModel
+
+task_full_schema = TaskFullSchema()
+tasks_full_schema = TaskFullSchema(many=True)
+schemas['full'] = tasks_full_schema
+
+class 

[OE-core] [RFC 9/9] sstate: Implement hash equivalence sstate

2018-07-16 Thread Joshua Watt
Converts sstate so that it can use a hash equivalence server to
determine if a task really needs to be rebuilt, or if it can be restored
from a different (equivalent) sstate object.

The dependency IDs are cached persistently using persist_data. This has
a number of advantages:
 1) Dependency IDs can be cached between invocations of bitbake to
prevent needing to contact the server every time (which is slow)
 2) The value of each tasks dependency ID can easily be synchronized
between different threads, which will be useful if bitbake is
updated to do on the fly task re-hashing.

NOTE: No attempt whatsoever was made to implement any sort of
authentication to the server. Is this something that anyone cares about?
Do we imagine having a "public" server that maintains equivalencies, and
if so does it need some mechanism to authenticate the users that post
tasks to it? If so, does anyone have any ideas as to an acceptable
authentication mechanism?

Signed-off-by: Joshua Watt 
---
 meta/classes/sstate.bbclass | 100 --
 meta/conf/bitbake.conf  |   4 +-
 meta/lib/oe/sstatesig.py| 166 
 3 files changed, 261 insertions(+), 9 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index b11f56b799b..a5be4d93317 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -11,7 +11,7 @@ def generate_sstatefn(spec, hash, d):
 SSTATE_PKGARCH= "${PACKAGE_ARCH}"
 SSTATE_PKGSPEC= 
"sstate:${PN}:${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}:${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:"
 SSTATE_SWSPEC = "sstate:${PN}::${PV}:${PR}::${SSTATE_VERSION}:"
-SSTATE_PKGNAME= 
"${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PKGSPEC'), 
d.getVar('BB_TASKHASH'), d)}"
+SSTATE_PKGNAME= 
"${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PKGSPEC'), 
d.getVar('BB_DEPID'), d)}"
 SSTATE_PKG= "${SSTATE_DIR}/${SSTATE_PKGNAME}"
 SSTATE_EXTRAPATH   = ""
 SSTATE_EXTRAPATHWILDCARD = ""
@@ -75,6 +75,23 @@ SSTATE_SIG_PASSPHRASE ?= ""
 # Whether to verify the GnUPG signatures when extracting sstate archives
 SSTATE_VERIFY_SIG ?= "0"
 
+SSTATE_HASHEQUIV_METHOD ?= "OEOuthashBasic"
+SSTATE_HASHEQUIV_METHOD[doc] = "The function used to calculate the output hash 
\
+for a task, which in turn is used to determine equivalency. \
+"
+
+SSTATE_HASHEQUIV_SERVER ?= ""
+SSTATE_HASHEQUIV_SERVER[doc] = "The hash equivalence sever. For example, \
+'http://192.168.0.1:5000'. Do not include a trailing slash \
+"
+
+SSTATE_HASHEQUIV_REPORT_TASKDATA ?= "0"
+SSTATE_HASHEQUIV_REPORT_TASKDATA[doc] = "Report additional useful data to the \
+hash equivalency server, such as PN, PV, taskname, etc. This information \
+is very useful for developers looking at task data, but may leak sensitive 
\
+data if the equivalence server is public. \
+"
+
 python () {
 if bb.data.inherits_class('native', d):
 d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH', False))
@@ -626,7 +643,7 @@ def sstate_package(ss, d):
 return
 
 for f in (d.getVar('SSTATECREATEFUNCS') or '').split() + \
- ['sstate_create_package', 'sstate_sign_package'] + \
+ ['sstate_report_depid', 'sstate_create_package', 
'sstate_sign_package'] + \
  (d.getVar('SSTATEPOSTCREATEFUNCS') or '').split():
 # All hooks should run in SSTATE_BUILDDIR.
 bb.build.exec_func(f, d, (sstatebuild,))
@@ -743,6 +760,73 @@ python sstate_sign_package () {
d.getVar('SSTATE_SIG_PASSPHRASE'), armor=False)
 }
 
+def OEOuthashBasic(path, sigfile, task, d):
+import hashlib
+import stat
+
+def update_hash(s):
+s = s.encode('utf-8')
+h.update(s)
+if sigfile:
+sigfile.write(s)
+
+h = hashlib.sha1()
+prev_dir = os.getcwd()
+
+try:
+os.chdir(path)
+
+update_hash("OEOuthashBasic\n")
+
+# It is only currently useful to get equivalent hashes for things that
+# can be restored from sstate. Since the sstate object is named using
+# SSTATE_PKGSPEC and the task name, those should be included in the
+# output hash calculation.
+update_hash("SSTATE_PKGSPEC=%s\n" % d.getVar('SSTATE_PKGSPEC'))
+update_hash("task=%s\n" % task)
+
+for root, dirs, files in os.walk('.', topdown=True):
+# Sort directories and files to ensure consistent ordering
+dirs.sort()
+files.sort()
+
+for f in files:
+path = os.path.join(root, f)
+s = os.lstat(path)
+
+# Hash file path
+update_hash(path + '\n')
+
+# Hash file mode
+update_hash("\tmode=0x%x\n" % stat.S_IMODE(s.st_mode))
+update_hash("\ttype=0x%x\n" % stat.S_IFMT(s.st_mode))
+
+if stat.S_ISBLK(s.st_mode) or 

[OE-core] [RFC 7/9] classes/sstate: Handle depid in hash check

2018-07-16 Thread Joshua Watt
Handles the argument that passes task dependency IDs in the hash check
function, as it is now required by bitbake

Signed-off-by: Joshua Watt 
---
 meta/classes/sstate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 5a0722567a5..b11f56b799b 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -759,7 +759,7 @@ sstate_unpack_package () {
 
 BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
 
-def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
+def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, sq_depid, d, 
siginfo=False):
 
 ret = []
 missed = []
-- 
2.17.1

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


[OE-core] [RFC 5/9] runqueue: Pass dependency ID to task

2018-07-16 Thread Joshua Watt
The dependency ID is now passed to the task in the BB_DEPID variable

Signed-off-by: Joshua Watt 
---
 bitbake/bin/bitbake-worker |  7 ---
 bitbake/lib/bb/runqueue.py | 10 ++
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index cd687e6e433..37cbcdb369a 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -136,7 +136,7 @@ def sigterm_handler(signum, frame):
 os.killpg(0, signal.SIGTERM)
 sys.exit()
 
-def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, 
taskhash, appends, taskdepdata, extraconfigdata, quieterrors=False, 
dry_run_exec=False):
+def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, 
taskhash, depid, appends, taskdepdata, extraconfigdata, quieterrors=False, 
dry_run_exec=False):
 # We need to setup the environment BEFORE the fork, since
 # a fork() or exec*() activates PSEUDO...
 
@@ -235,6 +235,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, 
task, taskname, taskha
 
 the_data = bb_cache.loadDataFull(fn, appends)
 the_data.setVar('BB_TASKHASH', taskhash)
+the_data.setVar('BB_DEPID', depid)
 
 bb.utils.set_process_name("%s:%s" % (the_data.getVar("PN"), 
taskname.replace("do_", "")))
 
@@ -425,10 +426,10 @@ class BitbakeWorker(object):
 sys.exit(0)
 
 def handle_runtask(self, data):
-fn, task, taskname, taskhash, quieterrors, appends, taskdepdata, 
dry_run_exec = pickle.loads(data)
+fn, task, taskname, taskhash, depid, quieterrors, appends, 
taskdepdata, dry_run_exec = pickle.loads(data)
 workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname))
 
-pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, 
self.databuilder, self.workerdata, fn, task, taskname, taskhash, appends, 
taskdepdata, self.extraconfigdata, quieterrors, dry_run_exec)
+pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, 
self.databuilder, self.workerdata, fn, task, taskname, taskhash, depid, 
appends, taskdepdata, self.extraconfigdata, quieterrors, dry_run_exec)
 
 self.build_pids[pid] = task
 self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 97cc8a948af..5922431bbe1 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2011,6 +2011,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
 
 taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
 taskhash = self.rqdata.get_task_hash(task)
+depid = self.rqdata.get_task_depid(task)
 if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and 
not (self.cooker.configuration.dry_run or self.rqdata.setscene_enforce):
 if not mc in self.rq.fakeworker:
 try:
@@ -2020,10 +2021,10 @@ class RunQueueExecuteTasks(RunQueueExecute):
 self.rq.state = runQueueFailed
 self.stats.taskFailed()
 return True
-self.rq.fakeworker[mc].process.stdin.write(b"" + 
pickle.dumps((taskfn, task, taskname, taskhash, False, 
self.cooker.collection.get_file_appends(taskfn), taskdepdata, 
self.rqdata.setscene_enforce)) + b"")
+self.rq.fakeworker[mc].process.stdin.write(b"" + 
pickle.dumps((taskfn, task, taskname, taskhash, depid, False, 
self.cooker.collection.get_file_appends(taskfn), taskdepdata, 
self.rqdata.setscene_enforce)) + b"")
 self.rq.fakeworker[mc].process.stdin.flush()
 else:
-self.rq.worker[mc].process.stdin.write(b"" + 
pickle.dumps((taskfn, task, taskname, taskhash, False, 
self.cooker.collection.get_file_appends(taskfn), taskdepdata, 
self.rqdata.setscene_enforce)) + b"")
+self.rq.worker[mc].process.stdin.write(b"" + 
pickle.dumps((taskfn, task, taskname, taskhash, depid, False, 
self.cooker.collection.get_file_appends(taskfn), taskdepdata, 
self.rqdata.setscene_enforce)) + b"")
 self.rq.worker[mc].process.stdin.flush()
 
 self.build_stamps[task] = bb.build.stampfile(taskname, 
self.rqdata.dataCaches[mc], taskfn, noextra=True)
@@ -2433,13 +2434,14 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
 
 taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
 taskhash = self.rqdata.get_task_hash(task)
+depid = self.rqdata.get_task_depid(task)
 if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and 
not self.cooker.configuration.dry_run:
 if not mc in self.rq.fakeworker:
 self.rq.start_fakeworker(self, mc)
-self.rq.fakeworker[mc].process.stdin.write(b"" + 
pickle.dumps((taskfn, task, taskname, taskhash, True, 
self.cooker.collection.get_file_appends(taskfn), taskdepdata, 

[OE-core] [RFC 4/9] runqueue: Track task dependency ID

2018-07-16 Thread Joshua Watt
Requests the task dependency ID from siggen and tracks it

Signed-off-by: Joshua Watt 
---
 bitbake/lib/bb/runqueue.py | 25 +
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index f655614d1ce..97cc8a948af 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -346,6 +346,7 @@ class RunTaskEntry(object):
 self.depends = set()
 self.revdeps = set()
 self.hash = None
+self.depid = None
 self.task = None
 self.weight = 1
 
@@ -385,6 +386,9 @@ class RunQueueData:
 def get_task_hash(self, tid):
 return self.runtaskentries[tid].hash
 
+def get_task_depid(self, tid):
+return self.runtaskentries[tid].depid
+
 def get_user_idstring(self, tid, task_name_suffix = ""):
 return tid + task_name_suffix
 
@@ -1133,18 +1137,21 @@ class RunQueueData:
 if len(self.runtaskentries[tid].depends - dealtwith) == 0:
 dealtwith.add(tid)
 todeal.remove(tid)
-procdep = []
-for dep in self.runtaskentries[tid].depends:
-procdep.append(fn_from_tid(dep) + "." + 
taskname_from_tid(dep))
-(mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
-self.runtaskentries[tid].hash = 
bb.parse.siggen.get_taskhash(taskfn, taskname, procdep, self.dataCaches[mc])
-task = self.runtaskentries[tid].task
+self.prepare_task_hash(tid)
 
 bb.parse.siggen.writeout_file_checksum_cache()
 
 #self.dump_data()
 return len(self.runtaskentries)
 
+def prepare_task_hash(self, tid):
+procdep = []
+for dep in self.runtaskentries[tid].depends:
+procdep.append(fn_from_tid(dep) + "." + taskname_from_tid(dep))
+(mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
+self.runtaskentries[tid].hash = bb.parse.siggen.get_taskhash(taskfn, 
taskname, procdep, self.dataCaches[mc])
+self.runtaskentries[tid].depid = bb.parse.siggen.get_depid(fn + "." + 
taskname)
+
 def dump_data(self):
 """
 Dump some debug information on the internal data structures
@@ -2058,7 +2065,8 @@ class RunQueueExecuteTasks(RunQueueExecute):
 deps = self.rqdata.runtaskentries[revdep].depends
 provides = self.rqdata.dataCaches[mc].fn_provides[taskfn]
 taskhash = self.rqdata.runtaskentries[revdep].hash
-taskdepdata[revdep] = [pn, taskname, fn, deps, provides, 
taskhash]
+depid = self.rqdata.runtaskentries[revdep].depid
+taskdepdata[revdep] = [pn, taskname, fn, deps, provides, 
taskhash, depid]
 for revdep2 in deps:
 if revdep2 not in taskdepdata:
 additional.append(revdep2)
@@ -2495,7 +2503,8 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
 deps = getsetscenedeps(revdep)
 provides = self.rqdata.dataCaches[mc].fn_provides[taskfn]
 taskhash = self.rqdata.runtaskentries[revdep].hash
-taskdepdata[revdep] = [pn, taskname, fn, deps, provides, 
taskhash]
+depid = self.rqdata.runtaskentries[revdep].depid
+taskdepdata[revdep] = [pn, taskname, fn, deps, provides, 
taskhash, depid]
 for revdep2 in deps:
 if revdep2 not in taskdepdata:
 additional.append(revdep2)
-- 
2.17.1

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


[OE-core] [RFC 0/9] Hash Equivalency Server

2018-07-16 Thread Joshua Watt
These patches are a first pass at implementing a hash equivalence server
in bitbake & OE.

Apologies for cross-posting this to both the bitbake-devel and
openembedded-devel; this work necessarily intertwines both places, and
it is really necessary to look at both parts to get an idea of what is
going on. For convenience, the bitbake patches are listed first,
followed by the oe-core patches.

The basic premise is that any given task no longer hashes a dependent
task's taskhash to determine it's own taskhash, but instead hashes the
dependent task's "dependency ID" (which doesn't strictly need to be a
hash, but is for consistency. We can have the discussion as to whether
this should be called a "dependency hash" if anyone wants). This allows
multiple taskhashes to map to the same dependency ID, meaning that
trivial changes to a recipe that would change the taskhash don't
necessarily need to change the dependency ID, and thus don't need to
cause downstream tasks to be rebuilt (with caveats, see below).

In the absence of any interaction by the user, the dependency ID for a
task is just that task's taskhash, which effectively maintains the
current behavior. However, if the user enables the "OEEquivHash"
signature generator, they can direct it to look at a hash equivalency
server (of which a reference implementation is provided). The sstate
code will provide the server with an output hash that it calculates, and
the server will record all tasks with the same output hash as
"equivalent" and report the same dependency ID for them when requested.
When initializing tasks, bitbake can ask the server about the dependency
ID for new tasks it has never seen before and potentially skip
rebuilding, or restore the task from an equivalent sstate file. To
facilitate restoring tasks from sstate, sstate objects are now named
based on the tasks dependency ID instead of the taskhash (which, again
has no effect if the server is in use).

This patchset doesn't make any attempt to dynamically update task
dependency IDs after bitbake initializes the tasks, and as such there
are some cases where this isn't accelerating the build as much as it
possibly could. I think it will be possible to add support for this, but
this preliminary support needs to come first.

Some patches have additional NOTEs that indicate places where I wasn't
sure what to do.

You can also see these patches (and my first attempts at dynamic task
re-hashing) on the "jpew/hash-equivalence" branch in poky-contrib.

As always, thanks for your feedback and time

Joshua Watt (9):
  bitbake-worker: Pass taskhash as runtask parameter
  siggen: Split out stampfile hash fetch
  siggen: Split out task depend ID
  runqueue: Track task dependency ID
  runqueue: Pass dependency ID to task
  runqueue: Pass dependency ID to hash validate
  classes/sstate: Handle depid in hash check
  hashserver: Add initial reference server
  sstate: Implement hash equivalence sstate

 bitbake/bin/bitbake-worker|   9 +-
 bitbake/contrib/hashserver/.gitignore |   2 +
 bitbake/contrib/hashserver/Pipfile|  15 ++
 bitbake/contrib/hashserver/app.py | 212 ++
 bitbake/lib/bb/runqueue.py|  56 ---
 bitbake/lib/bb/siggen.py  |  20 ++-
 meta/classes/sstate.bbclass   | 102 +++--
 meta/conf/bitbake.conf|   4 +-
 meta/lib/oe/sstatesig.py  | 166 
 9 files changed, 544 insertions(+), 42 deletions(-)
 create mode 100644 bitbake/contrib/hashserver/.gitignore
 create mode 100644 bitbake/contrib/hashserver/Pipfile
 create mode 100755 bitbake/contrib/hashserver/app.py

--
2.17.1

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


[OE-core] [RFC 2/9] siggen: Split out stampfile hash fetch

2018-07-16 Thread Joshua Watt
The mechanism used to get the hash for a stamp file is split out so that
it can be overridden by derived classes

Signed-off-by: Joshua Watt 
---
 bitbake/lib/bb/siggen.py | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index ab228e4148e..d2dfcbc3fdb 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -331,6 +331,13 @@ class SignatureGeneratorBasic(SignatureGenerator):
 class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
 name = "basichash"
 
+def get_stampfile_hash(self, task):
+if task in self.taskhash:
+return self.taskhash[task]
+
+# If task is not in basehash, then error
+return self.basehash[task]
+
 def stampfile(self, stampbase, fn, taskname, extrainfo, clean=False):
 if taskname != "do_setscene" and taskname.endswith("_setscene"):
 k = fn + "." + taskname[:-9]
@@ -338,11 +345,9 @@ class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
 k = fn + "." + taskname
 if clean:
 h = "*"
-elif k in self.taskhash:
-h = self.taskhash[k]
 else:
-# If k is not in basehash, then error
-h = self.basehash[k]
+h = self.get_stampfile_hash(k)
+
 return ("%s.%s.%s.%s" % (stampbase, taskname, h, 
extrainfo)).rstrip('.')
 
 def stampcleanmask(self, stampbase, fn, taskname, extrainfo):
-- 
2.17.1

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


[OE-core] [RFC 3/9] siggen: Split out task depend ID

2018-07-16 Thread Joshua Watt
Abstracts the function to get the dependency ID for a task so it can
return something other that the taskhash

Signed-off-by: Joshua Watt 
---
 bitbake/lib/bb/siggen.py | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
index d2dfcbc3fdb..0b1393e21d5 100644
--- a/bitbake/lib/bb/siggen.py
+++ b/bitbake/lib/bb/siggen.py
@@ -41,6 +41,9 @@ class SignatureGenerator(object):
 def finalise(self, fn, d, varient):
 return
 
+def get_depid(self, task):
+return self.taskhash[task]
+
 def get_taskhash(self, fn, task, deps, dataCache):
 return "0"
 
@@ -206,7 +209,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
 continue
 if dep not in self.taskhash:
 bb.fatal("%s is not in taskhash, caller isn't calling in 
dependency order?", dep)
-data = data + self.taskhash[dep]
+data = data + self.get_depid(dep)
 self.runtaskdeps[k].append(dep)
 
 if task in dataCache.file_checksums[fn]:
@@ -281,7 +284,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
 data['file_checksum_values'] = [(os.path.basename(f), cs) for f,cs 
in self.file_checksum_values[k]]
 data['runtaskhashes'] = {}
 for dep in data['runtaskdeps']:
-data['runtaskhashes'][dep] = self.taskhash[dep]
+data['runtaskhashes'][dep] = self.get_depid(dep)
 data['taskhash'] = self.taskhash[k]
 
 taint = self.read_taint(fn, task, referencestamp)
-- 
2.17.1

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


[OE-core] [RFC 1/9] bitbake-worker: Pass taskhash as runtask parameter

2018-07-16 Thread Joshua Watt
Pass the task hash as a parameter to the 'runtask' message instead of
passing the entire dictionary of hashes when the worker is setup. This
is possible less efficient, but prevents the worker taskhashes from
being out of sync with the runqueue in the event that the taskhashes in
the runqueue change.

Signed-off-by: Joshua Watt 
---
 bitbake/bin/bitbake-worker |  8 
 bitbake/lib/bb/runqueue.py | 15 ++-
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index e925054b7f9..cd687e6e433 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -136,7 +136,7 @@ def sigterm_handler(signum, frame):
 os.killpg(0, signal.SIGTERM)
 sys.exit()
 
-def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, 
appends, taskdepdata, extraconfigdata, quieterrors=False, dry_run_exec=False):
+def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, 
taskhash, appends, taskdepdata, extraconfigdata, quieterrors=False, 
dry_run_exec=False):
 # We need to setup the environment BEFORE the fork, since
 # a fork() or exec*() activates PSEUDO...
 
@@ -234,7 +234,7 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, 
task, taskname, append
 ret = 0
 
 the_data = bb_cache.loadDataFull(fn, appends)
-the_data.setVar('BB_TASKHASH', workerdata["runq_hash"][task])
+the_data.setVar('BB_TASKHASH', taskhash)
 
 bb.utils.set_process_name("%s:%s" % (the_data.getVar("PN"), 
taskname.replace("do_", "")))
 
@@ -425,10 +425,10 @@ class BitbakeWorker(object):
 sys.exit(0)
 
 def handle_runtask(self, data):
-fn, task, taskname, quieterrors, appends, taskdepdata, dry_run_exec = 
pickle.loads(data)
+fn, task, taskname, taskhash, quieterrors, appends, taskdepdata, 
dry_run_exec = pickle.loads(data)
 workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname))
 
-pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, 
self.databuilder, self.workerdata, fn, task, taskname, appends, taskdepdata, 
self.extraconfigdata, quieterrors, dry_run_exec)
+pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, 
self.databuilder, self.workerdata, fn, task, taskname, taskhash, appends, 
taskdepdata, self.extraconfigdata, quieterrors, dry_run_exec)
 
 self.build_pids[pid] = task
 self.build_pipes[pid] = runQueueWorkerPipe(pipein, pipeout)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index ba9bebebcfe..f655614d1ce 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1207,17 +1207,12 @@ class RunQueue:
 bb.utils.nonblockingfd(worker.stdout)
 workerpipe = runQueuePipe(worker.stdout, None, self.cfgData, self, 
rqexec)
 
-runqhash = {}
-for tid in self.rqdata.runtaskentries:
-runqhash[tid] = self.rqdata.runtaskentries[tid].hash
-
 workerdata = {
 "taskdeps" : self.rqdata.dataCaches[mc].task_deps,
 "fakerootenv" : self.rqdata.dataCaches[mc].fakerootenv,
 "fakerootdirs" : self.rqdata.dataCaches[mc].fakerootdirs,
 "fakerootnoenv" : self.rqdata.dataCaches[mc].fakerootnoenv,
 "sigdata" : bb.parse.siggen.get_taskdata(),
-"runq_hash" : runqhash,
 "logdefaultdebug" : bb.msg.loggerDefaultDebugLevel,
 "logdefaultverbose" : bb.msg.loggerDefaultVerbose,
 "logdefaultverboselogs" : bb.msg.loggerVerboseLogs,
@@ -2008,6 +2003,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
 taskdepdata = self.build_taskdepdata(task)
 
 taskdep = self.rqdata.dataCaches[mc].task_deps[taskfn]
+taskhash = self.rqdata.get_task_hash(task)
 if 'fakeroot' in taskdep and taskname in taskdep['fakeroot'] and 
not (self.cooker.configuration.dry_run or self.rqdata.setscene_enforce):
 if not mc in self.rq.fakeworker:
 try:
@@ -2017,10 +2013,10 @@ class RunQueueExecuteTasks(RunQueueExecute):
 self.rq.state = runQueueFailed
 self.stats.taskFailed()
 return True
-self.rq.fakeworker[mc].process.stdin.write(b"" + 
pickle.dumps((taskfn, task, taskname, False, 
self.cooker.collection.get_file_appends(taskfn), taskdepdata, 
self.rqdata.setscene_enforce)) + b"")
+self.rq.fakeworker[mc].process.stdin.write(b"" + 
pickle.dumps((taskfn, task, taskname, taskhash, False, 
self.cooker.collection.get_file_appends(taskfn), taskdepdata, 
self.rqdata.setscene_enforce)) + b"")
 self.rq.fakeworker[mc].process.stdin.flush()
 else:
-self.rq.worker[mc].process.stdin.write(b"" + 
pickle.dumps((taskfn, task, taskname, False, 
self.cooker.collection.get_file_appends(taskfn), 

[OE-core] Yocto Project Unassigned Bugs - Help Needed

2018-07-16 Thread Jolley, Stephen K
All,



The triage team meets weekly and does its best to handle the bugs reported into 
the bugzilla. The numbers of people attending that meeting have fallen, as have 
the number of people available to help fix bugs. One of the things we hear 
users report is they don't know how to help. We (the triage team) are therefore 
going to start reporting out the currently 327 unassigned bugs.



We're hoping people may be able to spare some time now and again to help out 
with these.



Bugs are split into two types, "true bugs" where things don't work as they 
should and "enhancements" which are features we'd want to add to the system.



There are also roughly three different "priority" classes right now, "2.6", 
"2.99" and "Future", the more pressing/urgent issues being in "2.6".



Please review this link and if a bug is something you would be able to help 
with either take ownership of the bug, or send me (stephen.k.jol...@intel.com) 
an e-mail with the bug number you would like and I will assign it to you 
(please make sure you have a bugzilla account).



The list is at: https://wiki.yoctoproject.org/wiki/Bug_Triage#Unassigned_Bugs


Thanks,

Stephen K. Jolley
Yocto Project Program Manager
INTEL, MS JF1-255, 2111 N.E. 25th Avenue, Hillsboro, OR 97124
*Cell:(208) 244-4460
* Email: stephen.k.jol...@intel.com

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


[OE-core] [PATCH] oeqa/sdk/python: clean up Python test

2018-07-16 Thread Ross Burton
For the same reasons as the runtime Python test, clean up the SDK test.

Also port from Python 2 to Python 3, as that's what is supported now.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/files/test.py   |  6 --
 meta/lib/oeqa/sdk/cases/python.py | 35 ++-
 2 files changed, 10 insertions(+), 31 deletions(-)
 delete mode 100644 meta/lib/oeqa/files/test.py

diff --git a/meta/lib/oeqa/files/test.py b/meta/lib/oeqa/files/test.py
deleted file mode 100644
index f389225d72d..000
--- a/meta/lib/oeqa/files/test.py
+++ /dev/null
@@ -1,6 +0,0 @@
-import os
-
-os.system('touch /tmp/testfile.python')
-
-a = 9.01e+21 - 9.01e+21 + 0.01
-print("the value of a is %s" % a)
diff --git a/meta/lib/oeqa/sdk/cases/python.py 
b/meta/lib/oeqa/sdk/cases/python.py
index 72dfcc72bde..bd5f1f67be2 100644
--- a/meta/lib/oeqa/sdk/cases/python.py
+++ b/meta/lib/oeqa/sdk/cases/python.py
@@ -1,32 +1,17 @@
-import os
-import shutil
-import unittest
-
-from oeqa.core.utils.path import remove_safe
+import subprocess, unittest
 from oeqa.sdk.case import OESDKTestCase
 
 class PythonTest(OESDKTestCase):
 @classmethod
 def setUpClass(self):
-if not (self.tc.hasHostPackage("nativesdk-python") or
-self.tc.hasHostPackage("python-native")):
+if not (self.tc.hasHostPackage("nativesdk-python3") or
+self.tc.hasHostPackage("python3-native")):
 raise unittest.SkipTest("No python package in the SDK")
 
-for f in ['test.py']:
-shutil.copyfile(os.path.join(self.tc.files_dir, f),
-   os.path.join(self.tc.sdk_dir, f))
-
-def test_python_exists(self):
-self._run('which python')
-
-def test_python_stdout(self):
-output = self._run('python %s/test.py' % self.tc.sdk_dir)
-self.assertEqual(output.strip(), "the value of a is 0.01", 
msg="Incorrect output: %s" % output)
-
-def test_python_testfile(self):
-self._run('ls /tmp/testfile.python')
-
-@classmethod
-def tearDownClass(self):
-remove_safe("%s/test.py" % self.tc.sdk_dir)
-remove_safe("/tmp/testfile.python")
+def test_python3(self):
+try:
+cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, 
jbeyq', 'rot13'))\""
+output = self._run(cmd)
+self.assertEqual(output, "Hello, world\n")
+except subprocess.CalledProcessError as e:
+self.fail("Unexpected exit %d (output %s)" % (e.returncode, 
e.output))
-- 
2.11.0

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


Re: [OE-core] [PATCH] atk: add explicit gettext-native dependency

2018-07-16 Thread Alistair Francis
On Mon, Jul 16, 2018 at 8:30 AM, Ross Burton  wrote:
> In native builds we attempt to turn off i18n but this doesn't work in Meson
> yet[1] but as the gettext class reduces dependencies in native builds we need 
> to
> add gettext-native to DEPENDS explicitly.
>
> [1] https://github.com/mesonbuild/meson/issues/821
>
> Signed-off-by: Ross Burton 

This fixes the build issue for me.

Tested-by: Alistair Francis 

Alistair

> ---
>  meta/recipes-support/atk/atk_2.28.1.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/atk/atk_2.28.1.bb 
> b/meta/recipes-support/atk/atk_2.28.1.bb
> index a051247d8ff..d64df37f5de 100644
> --- a/meta/recipes-support/atk/atk_2.28.1.bb
> +++ b/meta/recipes-support/atk/atk_2.28.1.bb
> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = 
> "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
>  
> file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
>  
> file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
>
> -DEPENDS = "glib-2.0"
> +DEPENDS = "gettext-native glib-2.0"
>
>  GNOMEBASEBUILDCLASS = "meson"
>  inherit gnomebase gtk-doc gettext upstream-version-is-even 
> gobject-introspection
> --
> 2.11.0
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 6/6] oeqa/decorator: Improve reliability

2018-07-16 Thread Richard Purdie
Checking if the dependency had any failure is unreliable, for example
if the underlying data doesn't get transferred and the list is empty,
success of the dependency is assumed.

Since we now have success data available, change the code to use it.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/core/decorator/depends.py | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/meta/lib/oeqa/core/decorator/depends.py 
b/meta/lib/oeqa/core/decorator/depends.py
index 69c604d8f4b..109cc88cff9 100644
--- a/meta/lib/oeqa/core/decorator/depends.py
+++ b/meta/lib/oeqa/core/decorator/depends.py
@@ -63,13 +63,15 @@ def _order_test_case_by_depends(cases, depends):
 return [cases[case_id] for case_id in cases_ordered]
 
 def _skipTestDependency(case, depends):
-skipReasons = ['errors', 'failures', 'skipped']
-
-for reason in skipReasons:
-for test, _ in getattr(case.tc.results, reason):
-if test.id() in depends:
-raise SkipTest("Test case %s depends on %s and was in %s." \
-% (case.id(), test.id(), reason))
+for dep in depends:
+found = False
+for test, _ in case.tc.results.successes:
+if test.id() == dep:
+found = True
+break
+if not found:
+raise SkipTest("Test case %s depends on %s but it didn't 
pass/run." \
+% (case.id(), test.id()))
 
 @registerDecorator
 class OETestDepends(OETestDiscover):
-- 
2.17.1

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


[OE-core] [PATCH 5/6] testsdk: Enable multiprocess execution

2018-07-16 Thread Richard Purdie
This uses the new concurrenttest code to enable parallel test execution
if specified.

Signed-off-by: Richard Purdie 
---
 meta/classes/testsdk.bbclass | 7 ++-
 meta/lib/oeqa/sdk/context.py | 4 
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 2b5d66b1931..5df17bfa9e3 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -42,6 +42,8 @@ def testsdk_main(d):
 host_pkg_manifest = OESDKTestContextExecutor._load_manifest(
 d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
 
+processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or 
d.getVar("BB_NUMBER_THREADS")
+
 sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
 bb.utils.remove(sdk_dir, True)
 bb.utils.mkdirhier(sdk_dir)
@@ -65,7 +67,10 @@ def testsdk_main(d):
 import traceback
 bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
 
-result = tc.runTests()
+if processes:
+result = tc.runTests(processes=int(processes))
+else:
+result = tc.runTests()
 
 component = "%s %s" % (pn, OESDKTestContextExecutor.name)
 context_msg = "%s:%s" % (os.path.basename(tcname), 
os.path.basename(sdk_env))
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
index 82e4c19bfc1..7c091c0534c 100644
--- a/meta/lib/oeqa/sdk/context.py
+++ b/meta/lib/oeqa/sdk/context.py
@@ -65,6 +65,9 @@ class OESDKTestContextExecutor(OETestContextExecutor):
 sdk_rgroup.add_argument('--sdk-dir', required=False, action='store', 
 help='sdk installed directory')
 
+self.parser.add_argument('-j', '--num-processes', dest='processes', 
action='store',
+type=int, help="number of processes to execute in parallel 
with")
+
 @staticmethod
 def _load_manifest(manifest):
 pkg_manifest = {}
@@ -85,6 +88,7 @@ class OESDKTestContextExecutor(OETestContextExecutor):
 OESDKTestContextExecutor._load_manifest(args.target_manifest)
 self.tc_kwargs['init']['host_pkg_manifest'] = \
 OESDKTestContextExecutor._load_manifest(args.host_manifest)
+self.tc_kwargs['run']['processes'] = args.processes
 
 @staticmethod
 def _get_sdk_environs(sdk_dir):
-- 
2.17.1

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


[OE-core] [PATCH 1/6] oeqa: Add selftest parallelisation support

2018-07-16 Thread Richard Purdie
This allows oe-selftest to take a -j option which specifies how much test
parallelisation to use. Currently this is "module" based with each module
being split and run in a separate build directory. Further splitting could
be done but this seems a good compromise between test setup and parallelism.

You need python-testtools and python-subunit installed to use this but only
when the -j option is specified.

See notes posted to the openedmbedded-architecture list for more details
about the design choices here.

Some of this functionality may make more sense in the oeqa core ultimately.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/core/context.py   |  10 +-
 meta/lib/oeqa/core/runner.py|  24 +-
 meta/lib/oeqa/core/utils/concurrencytest.py | 254 
 meta/lib/oeqa/selftest/context.py   |   8 +-
 4 files changed, 288 insertions(+), 8 deletions(-)
 create mode 100644 meta/lib/oeqa/core/utils/concurrencytest.py

diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index 10481b44b61..8cdfbf834f3 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -58,14 +58,20 @@ class OETestContext(object):
 modules_required, filters)
 self.suites = self.loader.discover()
 
-def runTests(self, skips=[]):
+def runTests(self, processes=None, skips=[]):
 self.runner = self.runnerClass(self, descriptions=False, verbosity=2, 
buffer=True)
 
 # Dinamically skip those tests specified though arguments
 self.skipTests(skips)
 
 self._run_start_time = time.time()
-result = self.runner.run(self.suites)
+if processes:
+from oeqa.core.utils.concurrencytest import ConcurrentTestSuite
+
+concurrent_suite = ConcurrentTestSuite(self.suites, processes)
+result = self.runner.run(concurrent_suite)
+else:
+result = self.runner.run(self.suites)
 self._run_end_time = time.time()
 
 return result
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 219102c6b0f..6adbe3827b4 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -43,11 +43,17 @@ class OETestResult(_TestResult):
 super(OETestResult, self).__init__(*args, **kwargs)
 
 self.successes = []
+self.starttime = {}
+self.endtime = {}
+self.progressinfo = {}
 
 self.tc = tc
 self._tc_map_results()
 
 def startTest(self, test):
+# May have been set by concurrencytest
+if test.id() not in self.starttime:
+self.starttime[test.id()] = time.time()
 super(OETestResult, self).startTest(test)
 
 def _tc_map_results(self):
@@ -57,6 +63,12 @@ class OETestResult(_TestResult):
 self.tc._results['expectedFailures'] = self.expectedFailures
 self.tc._results['successes'] = self.successes
 
+def stopTest(self, test):
+self.endtime[test.id()] = time.time()
+super(OETestResult, self).stopTest(test)
+if test.id() in self.progressinfo:
+print(self.progressinfo[test.id()])
+
 def logSummary(self, component, context_msg=''):
 elapsed_time = self.tc._run_end_time - self.tc._run_start_time
 self.tc.logger.info("SUMMARY:")
@@ -141,12 +153,16 @@ class OETestResult(_TestResult):
 if hasattr(d, 'oeid'):
 oeid = d.oeid
 
+t = ""
+if case.id() in self.starttime and case.id() in self.endtime:
+t = " (" + "{0:.2f}".format(self.endtime[case.id()] - 
self.starttime[case.id()]) + "s)"
+
 if fail:
-self.tc.logger.info("RESULTS - %s - Testcase %s: %s" % 
(case.id(),
-oeid, desc))
+self.tc.logger.info("RESULTS - %s - Testcase %s: %s%s" % 
(case.id(),
+oeid, desc, t))
 else:
-self.tc.logger.info("RESULTS - %s - Testcase %s: %s" % 
(case.id(),
-oeid, 'UNKNOWN'))
+self.tc.logger.info("RESULTS - %s - Testcase %s: %s%s" % 
(case.id(),
+oeid, 'UNKNOWN', t))
 
 class OEListTestsResult(object):
 def wasSuccessful(self):
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py 
b/meta/lib/oeqa/core/utils/concurrencytest.py
new file mode 100644
index 000..850586516a4
--- /dev/null
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -0,0 +1,254 @@
+#!/usr/bin/env python3
+#
+# Modified for use in OE by Richard Purdie, 2018
+#
+# Modified by: Corey Goldberg, 2013
+#   License: GPLv2+
+#
+# Original code from:
+#   Bazaar (bzrlib.tests.__init__.py, v2.6, copied Jun 01 2013)
+#   Copyright (C) 2005-2011 Canonical Ltd
+#   License: GPLv2+
+
+import os
+import sys
+import traceback
+import unittest
+import subprocess
+import testtools
+import threading
+import time
+import io
+
+from queue import Queue
+from 

[OE-core] [PATCH 3/6] oeqa/runner: Simplify code

2018-07-16 Thread Richard Purdie
There doesn't appear to be any reason we need this _results indirection
any more so remove it.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/core/context.py   |  1 -
 meta/lib/oeqa/core/decorator/depends.py |  4 +---
 meta/lib/oeqa/core/runner.py| 15 +--
 meta/lib/oeqa/core/tests/test_data.py   |  4 ++--
 4 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index 8cdfbf834f3..f174c4bbcfc 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -27,7 +27,6 @@ class OETestContext(object):
 self.logger = logger
 self._registry = {}
 self._registry['cases'] = collections.OrderedDict()
-self._results = {}
 
 def _read_modules_from_manifest(self, manifest):
 if not os.path.exists(manifest):
diff --git a/meta/lib/oeqa/core/decorator/depends.py 
b/meta/lib/oeqa/core/decorator/depends.py
index 99eccc12685..69c604d8f4b 100644
--- a/meta/lib/oeqa/core/decorator/depends.py
+++ b/meta/lib/oeqa/core/decorator/depends.py
@@ -63,12 +63,10 @@ def _order_test_case_by_depends(cases, depends):
 return [cases[case_id] for case_id in cases_ordered]
 
 def _skipTestDependency(case, depends):
-results = case.tc._results
-
 skipReasons = ['errors', 'failures', 'skipped']
 
 for reason in skipReasons:
-for test, _ in results[reason]:
+for test, _ in getattr(case.tc.results, reason):
 if test.id() in depends:
 raise SkipTest("Test case %s depends on %s and was in %s." \
 % (case.id(), test.id(), reason))
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 6adbe3827b4..0f84a1d2803 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -47,8 +47,10 @@ class OETestResult(_TestResult):
 self.endtime = {}
 self.progressinfo = {}
 
+# Inject into tc so that TestDepends decorator can see results
+tc.results = self
+
 self.tc = tc
-self._tc_map_results()
 
 def startTest(self, test):
 # May have been set by concurrencytest
@@ -56,13 +58,6 @@ class OETestResult(_TestResult):
 self.starttime[test.id()] = time.time()
 super(OETestResult, self).startTest(test)
 
-def _tc_map_results(self):
-self.tc._results['failures'] = self.failures
-self.tc._results['errors'] = self.errors
-self.tc._results['skipped'] = self.skipped
-self.tc._results['expectedFailures'] = self.expectedFailures
-self.tc._results['successes'] = self.successes
-
 def stopTest(self, test):
 self.endtime[test.id()] = time.time()
 super(OETestResult, self).stopTest(test)
@@ -80,7 +75,7 @@ class OETestResult(_TestResult):
 msg = "%s - OK - All required tests passed" % component
 else:
 msg = "%s - FAIL - Required tests failed" % component
-skipped = len(self.tc._results['skipped'])
+skipped = len(self.skipped)
 if skipped: 
 msg += " (skipped=%d)" % skipped
 self.tc.logger.info(msg)
@@ -88,7 +83,7 @@ class OETestResult(_TestResult):
 def _getDetailsNotPassed(self, case, type, desc):
 found = False
 
-for (scase, msg) in self.tc._results[type]:
+for (scase, msg) in getattr(self, type):
 # XXX: When XML reporting is enabled scase is
 # xmlrunner.result._TestInfo instance instead of
 # string.
diff --git a/meta/lib/oeqa/core/tests/test_data.py 
b/meta/lib/oeqa/core/tests/test_data.py
index 320468cbe4a..21b6c68b8a4 100755
--- a/meta/lib/oeqa/core/tests/test_data.py
+++ b/meta/lib/oeqa/core/tests/test_data.py
@@ -21,7 +21,7 @@ class TestData(TestBase):
 
 tc = self._testLoader(modules=self.modules)
 self.assertEqual(False, tc.runTests().wasSuccessful())
-for test, data in tc._results['errors']:
+for test, data in tc.errors:
 expect = False
 if expectedException in data:
 expect = True
@@ -34,7 +34,7 @@ class TestData(TestBase):
 
 tc = self._testLoader(d=d, modules=self.modules)
 self.assertEqual(False, tc.runTests().wasSuccessful())
-for test, data in tc._results['failures']:
+for test, data in tc.failures:
 expect = False
 if expectedError in data:
 expect = True
-- 
2.17.1

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


[OE-core] [PATCH 2/6] oeqa/core/threaded: Remove in favour of using concurrenttests

2018-07-16 Thread Richard Purdie
We have several options for parallel processing in oeqa, parallel
execution of modules, threading and mulitple processes for the runners.

After much experimentation is appears the most scalable and least
invasive approach is multiple processes using concurrenttestsuite
from testtools. This means we can drop the current threading code
which is only used by the sdk test execution.

oeqa/decorator/depends: Remove threading code

Revert "oeqa/sdk: Enable usage of OEQA thread mode"
This reverts commit adc434c0636b7dea2ef70c8d2c8e61cdb5c703b1.

Revert "oeqa/core/tests: Add tests of OEQA Threaded mode"
This reverts commit a4eef558c9933eb32413b61ff80a11b51b40.

Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode"
This reverts commit d3d4ba902dee8b19fa1054330cffdf73f9b81fe7.

Signed-off-by: Richard Purdie 

Signed-off-by: Richard Purdie 
---
 meta/classes/testsdk.bbclass  |   4 -
 meta/lib/oeqa/core/decorator/depends.py   |   7 +-
 meta/lib/oeqa/core/decorator/oetimeout.py |  40 +--
 .../tests/cases/loader/threaded/threaded.py   |  12 -
 .../cases/loader/threaded/threaded_alone.py   |   8 -
 .../cases/loader/threaded/threaded_depends.py |  10 -
 .../cases/loader/threaded/threaded_module.py  |  12 -
 meta/lib/oeqa/core/tests/common.py|  10 -
 meta/lib/oeqa/core/tests/test_decorators.py   |  12 -
 meta/lib/oeqa/core/tests/test_loader.py   |  30 +-
 meta/lib/oeqa/core/threaded.py| 275 --
 meta/lib/oeqa/sdk/context.py  |   5 +-
 12 files changed, 14 insertions(+), 411 deletions(-)
 delete mode 100644 meta/lib/oeqa/core/tests/cases/loader/threaded/threaded.py
 delete mode 100644 
meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_alone.py
 delete mode 100644 
meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_depends.py
 delete mode 100644 
meta/lib/oeqa/core/tests/cases/loader/threaded/threaded_module.py
 delete mode 100644 meta/lib/oeqa/core/threaded.py

diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index e6e3c74bdb6..2b5d66b1931 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -24,8 +24,6 @@ def testsdk_main(d):
 from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
 from oeqa.utils import make_logger_bitbake_compatible
 
-bb.event.enable_threadlock()
-
 pn = d.getVar("PN")
 logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
 
@@ -99,8 +97,6 @@ def testsdkext_main(d):
 from oeqa.utils import avoid_paths_in_environ, 
make_logger_bitbake_compatible, subprocesstweak
 from oeqa.sdkext.context import OESDKExtTestContext, 
OESDKExtTestContextExecutor
 
-bb.event.enable_threadlock()
-
 pn = d.getVar("PN")
 logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
 
diff --git a/meta/lib/oeqa/core/decorator/depends.py 
b/meta/lib/oeqa/core/decorator/depends.py
index baa04341c71..99eccc12685 100644
--- a/meta/lib/oeqa/core/decorator/depends.py
+++ b/meta/lib/oeqa/core/decorator/depends.py
@@ -3,7 +3,6 @@
 
 from unittest import SkipTest
 
-from oeqa.core.threaded import OETestRunnerThreaded
 from oeqa.core.exception import OEQADependency
 
 from . import OETestDiscover, registerDecorator
@@ -64,11 +63,7 @@ def _order_test_case_by_depends(cases, depends):
 return [cases[case_id] for case_id in cases_ordered]
 
 def _skipTestDependency(case, depends):
-if isinstance(case.tc.runner, OETestRunnerThreaded):
-import threading
-results = case.tc._results[threading.get_ident()]
-else:
-results = case.tc._results
+results = case.tc._results
 
 skipReasons = ['errors', 'failures', 'skipped']
 
diff --git a/meta/lib/oeqa/core/decorator/oetimeout.py 
b/meta/lib/oeqa/core/decorator/oetimeout.py
index f85e7d97923..a247583f7f1 100644
--- a/meta/lib/oeqa/core/decorator/oetimeout.py
+++ b/meta/lib/oeqa/core/decorator/oetimeout.py
@@ -1,12 +1,8 @@
 # Copyright (C) 2016 Intel Corporation
 # Released under the MIT license (see COPYING.MIT)
 
-from . import OETestDecorator, registerDecorator
-
 import signal
-from threading import Timer
-
-from oeqa.core.threaded import OETestRunnerThreaded
+from . import OETestDecorator, registerDecorator
 from oeqa.core.exception import OEQATimeoutError
 
 @registerDecorator
@@ -14,32 +10,16 @@ class OETimeout(OETestDecorator):
 attrs = ('oetimeout',)
 
 def setUpDecorator(self):
-self.logger.debug("Setting up a %d second(s) timeout" % self.oetimeout)
-
-if isinstance(self.case.tc.runner, OETestRunnerThreaded):
-self.timeouted = False
-def _timeoutHandler():
-self.timeouted = True
-
-self.timer = Timer(self.oetimeout, _timeoutHandler)
-self.timer.start()
-else:
-timeout = self.oetimeout
-def _timeoutHandler(signum, frame):
-raise OEQATimeoutError("Timed out after %s 

[OE-core] [PATCH 4/6] oeqa: Remove xmlrunner

2018-07-16 Thread Richard Purdie
This isn't present on modern distros by default and doesn't work with
testtools, needing multiple code paths in the code. Remove it in favour
of finding a better replacement for results collection/analysis.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/core/runner.py | 54 ++--
 1 file changed, 9 insertions(+), 45 deletions(-)

diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 0f84a1d2803..6650a63ce73 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -7,16 +7,8 @@ import unittest
 import logging
 import re
 
-xmlEnabled = False
-try:
-import xmlrunner
-from xmlrunner.result import _XMLTestResult as _TestResult
-from xmlrunner.runner import XMLTestRunner as _TestRunner
-xmlEnabled = True
-except ImportError:
-# use the base runner instead
-from unittest import TextTestResult as _TestResult
-from unittest import TextTestRunner as _TestRunner
+from unittest import TextTestResult as _TestResult
+from unittest import TextTestRunner as _TestRunner
 
 class OEStreamLogger(object):
 def __init__(self, logger):
@@ -84,19 +76,10 @@ class OETestResult(_TestResult):
 found = False
 
 for (scase, msg) in getattr(self, type):
-# XXX: When XML reporting is enabled scase is
-# xmlrunner.result._TestInfo instance instead of
-# string.
-if xmlEnabled:
-if case.id() == scase.test_id:
-found = True
-break
-scase_str = scase.test_id
-else:
-if case.id() == scase.id():
-found = True
-break
-scase_str = str(scase.id())
+if case.id() == scase.id():
+found = True
+break
+scase_str = str(scase.id())
 
 # When fails at module or class level the class name is passed as 
string
 # so figure out to see if match
@@ -167,33 +150,14 @@ class OETestRunner(_TestRunner):
 streamLoggerClass = OEStreamLogger
 
 def __init__(self, tc, *args, **kwargs):
-if xmlEnabled:
-if not kwargs.get('output'):
-kwargs['output'] = os.path.join(os.getcwd(),
-'TestResults_%s_%s' % (time.strftime("%Y%m%d%H%M%S"), 
os.getpid()))
-
 kwargs['stream'] = self.streamLoggerClass(tc.logger)
 super(OETestRunner, self).__init__(*args, **kwargs)
 self.tc = tc
 self.resultclass = OETestResult
 
-# XXX: The unittest-xml-reporting package defines _make_result method 
instead
-# of _makeResult standard on unittest.
-if xmlEnabled:
-def _make_result(self):
-"""
-Creates a TestResult object which will be used to store
-information about the executed tests.
-"""
-# override in subclasses if necessary.
-return self.resultclass(self.tc,
-self.stream, self.descriptions, self.verbosity, 
self.elapsed_times
-)
-else:
-def _makeResult(self):
-return self.resultclass(self.tc, self.stream, self.descriptions,
-self.verbosity)
-
+def _makeResult(self):
+return self.resultclass(self.tc, self.stream, self.descriptions,
+self.verbosity)
 
 def _walk_suite(self, suite, func):
 for obj in suite:
-- 
2.17.1

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


Re: [OE-core] [PATCH] atk: add explicit gettext-native dependency

2018-07-16 Thread Burton, Ross
There's a bug upstream but non-trivial to resolve.

Ross

On 16 July 2018 at 17:17,   wrote:
> On Mon, 2018-07-16 at 16:30 +0100, Ross Burton wrote:
>> In native builds we attempt to turn off i18n but this doesn't work in
>> Meson
>> yet[1] but as the gettext class reduces dependencies in native builds
>> we need to
>> add gettext-native to DEPENDS explicitly.
>>
>> [1] https://github.com/mesonbuild/meson/issues/821
>>
>> Signed-off-by: Ross Burton 
>> ---
>>  meta/recipes-support/atk/atk_2.28.1.bb | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-support/atk/atk_2.28.1.bb b/meta/recipes-
>> support/atk/atk_2.28.1.bb
>> index a051247d8ff..d64df37f5de 100644
>> --- a/meta/recipes-support/atk/atk_2.28.1.bb
>> +++ b/meta/recipes-support/atk/atk_2.28.1.bb
>> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd00
>> 2f49e7bb854063f7e7 \
>>  file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9
>> b30f619ca8d819bc12d3 \
>>  file://atk/atk.h;endline=18;md5=fcd7710187e0eae4
>> 85e356c30d1b0c3b"
>>
>> -DEPENDS = "glib-2.0"
>> +DEPENDS = "gettext-native glib-2.0"
>>
>>  GNOMEBASEBUILDCLASS = "meson"
>>  inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-
>> introspection
>
> Can you at least comment this in the hope we can eventually drop this
> again please?
>
> gettext-native is a huge pain dependency wise and slows down builds
> significantly. Is there a way we could tweak meson to avoid this?
>
> Cheers,
>
> Richard
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] atk: add explicit gettext-native dependency

2018-07-16 Thread Richard Purdie
On Mon, 2018-07-16 at 16:30 +0100, Ross Burton wrote:
> In native builds we attempt to turn off i18n but this doesn't work in
> Meson
> yet[1] but as the gettext class reduces dependencies in native builds
> we need to
> add gettext-native to DEPENDS explicitly.
> 
> [1] https://github.com/mesonbuild/meson/issues/821
> 
> Signed-off-by: Ross Burton 
> ---
>  meta/recipes-support/atk/atk_2.28.1.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-support/atk/atk_2.28.1.bb b/meta/recipes-
> support/atk/atk_2.28.1.bb
> index a051247d8ff..d64df37f5de 100644
> --- a/meta/recipes-support/atk/atk_2.28.1.bb
> +++ b/meta/recipes-support/atk/atk_2.28.1.bb
> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd00
> 2f49e7bb854063f7e7 \
>  file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9
> b30f619ca8d819bc12d3 \
>  file://atk/atk.h;endline=18;md5=fcd7710187e0eae4
> 85e356c30d1b0c3b"
>  
> -DEPENDS = "glib-2.0"
> +DEPENDS = "gettext-native glib-2.0"
>  
>  GNOMEBASEBUILDCLASS = "meson"
>  inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-
> introspection

Can you at least comment this in the hope we can eventually drop this
again please?

gettext-native is a huge pain dependency wise and slows down builds
significantly. Is there a way we could tweak meson to avoid this?

Cheers,

Richard

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


Re: [OE-core] [PATCH 2/2] [meta] atk: Specify gettext-native dependency

2018-07-16 Thread Burton, Ross
Sent.

Ross

On 16 July 2018 at 08:56, Marko Lindqvist  wrote:
>  Sorry, I'm on vacation, so it would be good if someone else can do the patch.
>
>
>  - ML
>
>
> On 3 July 2018 at 17:37, Burton, Ross  wrote:
>> What was missing all along is that we're talking specifically about
>> atk-native here, which disables NLS explicitly.  As Meson doesn't yet
>> expose a way to turn off i18n we need to stop that.  For now, adding
>> USE_NLS=yes is a suitable workaround (and what glib already does).
>> Marko, can you send this patch?
>>
>> Arguably, meson.bbclass could do this, but that would be forcing a
>> gettext dependency on everything using Meson.
>>
>> Ross
>>
>>
>>
>> On 1 July 2018 at 19:20, Marko Lindqvist  wrote:
>>>  3) Adding 'USE_NLS = "yes"' to atk recipe fixes the problem for me.
>>>
>>>
>>>  - ML
>>>
>>>
>>> On 1 July 2018 at 21:03, Marko Lindqvist  wrote:
  I think the problem is not with INHIBIT_DEFAULT_DEPS, but with
 USE_NLS on the next couple of lines. With USE_NLS disabled, the
 automatic dependency is gettext-minimal-native (not providing
 xgettext, I think), and not gettext-native.

  1) 
 tmp-glibc/work/aarch64-oe-linux/atk/2.28.1-r0/recipe-sysroot-native/sysroot-providers/gettext-minimal-native
 is there
  2) Adding gettext-minimal-native as atk dependency does not fix the
 issue like adding gettext-native dependency does


  - ML


 On 30 June 2018 at 21:43, Marko Lindqvist  wrote:
>  This error happens to me with both qemux86 and qemuarm64. Haven't
> tested any others yet.
>
>
>  - ML
>
> On 15 June 2018 at 20:40, Alistair Francis  wrote:
>> On Mon, Jun 4, 2018 at 4:18 PM, Burton, Ross  
>> wrote:
>>> That implies that INHIBIT_DEFAULT_DEPS is also evaluating to true,
>>> which it shouldn't be in ATK.
>>>
>>> I'd definitely be checking if that is the case, and if you can
>>> replicate the failure with e.g. qemuarm.
>>
>> I can't replicate it with qemuarm and checking with bitbake -e I can't
>> see anywhere that the variable is set. Any ideas on what to try to
>> figure out how it is set?
>>
>> Alistair
>>
>>>
>>> Ross
>>>
>>> On 4 June 2018 at 19:46, Alistair Francis  wrote:
 On Mon, Jun 4, 2018 at 10:20 AM, Alexander Kanavin
  wrote:
> On 06/04/2018 08:17 PM, Alistair Francis wrote:
>>
>> On Mon, Jun 4, 2018 at 3:06 AM, Burton, Ross 
>> wrote:
>>>
>>> So why isn't the inherit gettext sufficient?
>>
>>
>> I'm not sure. Here is the error I see when compiling for RISC-V 
>> before
>> this patch:
>
>
> So is the error specific to risc-v? You should dig deeper in that 
> direction
> then.

 Ok, it looks like the line: if d.getVar('INHIBIT_DEFAULT_DEPS') and
 not oe.utils.inherits(d, 'cross-canadian'): is evaluating as true in
 gettext.bbclass so we don't depend on gettext-native.

 Do I need to ensure cross-canadian is set for RISC-V builds then?

 Alistair

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


[OE-core] [PATCH] atk: add explicit gettext-native dependency

2018-07-16 Thread Ross Burton
In native builds we attempt to turn off i18n but this doesn't work in Meson
yet[1] but as the gettext class reduces dependencies in native builds we need to
add gettext-native to DEPENDS explicitly.

[1] https://github.com/mesonbuild/meson/issues/821

Signed-off-by: Ross Burton 
---
 meta/recipes-support/atk/atk_2.28.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/atk/atk_2.28.1.bb 
b/meta/recipes-support/atk/atk_2.28.1.bb
index a051247d8ff..d64df37f5de 100644
--- a/meta/recipes-support/atk/atk_2.28.1.bb
+++ b/meta/recipes-support/atk/atk_2.28.1.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
 
file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
 
file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
 
-DEPENDS = "glib-2.0"
+DEPENDS = "gettext-native glib-2.0"
 
 GNOMEBASEBUILDCLASS = "meson"
 inherit gnomebase gtk-doc gettext upstream-version-is-even 
gobject-introspection
-- 
2.11.0

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


[OE-core] [PATCH 1/4] spdx.bbclass: Replace deprecated string.replace with str.replace

2018-07-16 Thread Olof Johansson
The string.replace function is removed in python3. Instead, the str
method "replace" should be used instead.

Signed-off-by: Olof Johansson 
---
 meta/classes/spdx.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index c5f544d2a4f..ab2eaa5c0c1 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -226,7 +226,7 @@ def run_fossology(foss_command, full_spdx):
 except subprocess.CalledProcessError as e:
 return None
 
-foss_output = string.replace(foss_output, '\r', '')
+foss_output = foss_output.replace('\r', '')
 
 # Package info
 package_info = {}
-- 
2.11.0

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


[OE-core] [PATCH 4/4] spdx.bbclass: Encode strings before passing to hashlib

2018-07-16 Thread Olof Johansson
In python3, passing a unicode object to hashlib will result in an
exception that encourages you to encode it first.

Signed-off-by: Olof Johansson 
---
 meta/classes/spdx.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index a3e22afc33d..fb78e274a8e 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -208,7 +208,7 @@ def hash_file(file_name):
 def hash_string(data):
 import hashlib
 sha1 = hashlib.sha1()
-sha1.update(data)
+sha1.update(data.encode('utf-8'))
 return sha1.hexdigest()
 
 def run_fossology(foss_command, full_spdx):
-- 
2.11.0

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


[OE-core] [PATCH 2/4] spdx.bbclass: Fix undefined variable error

2018-07-16 Thread Olof Johansson
The path variable is used in an error message a few lines later, but was
never defined.

Signed-off-by: Olof Johansson 
---
 meta/classes/spdx.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index ab2eaa5c0c1..9e374d70a6c 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -289,7 +289,8 @@ def create_spdx_doc(file_info, scanned_files):
 def get_ver_code(dirname):
 chksums = []
 for f_dir, f in list_files(dirname):
-hash = hash_file(os.path.join(dirname, f_dir, f))
+path = os.path.join(dirname, f_dir, f)
+hash = hash_file(path)
 if not hash is None:
 chksums.append(hash)
 else:
-- 
2.11.0

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


[OE-core] [PATCH 3/4] spdx.bbclass: Make use of bb.utils' sha1_file()

2018-07-16 Thread Olof Johansson
The same functionality already exists within bitbake, so avoid
duplicating.

Signed-off-by: Olof Johansson 
---
 meta/classes/spdx.bbclass | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index 9e374d70a6c..a3e22afc33d 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -202,13 +202,8 @@ def list_files(dir):
 return
 
 def hash_file(file_name):
-try:
-with open(file_name, 'rb') as f:
-data_string = f.read()
-sha1 = hash_string(data_string)
-return sha1
-except:
-return None
+from bb.utils import sha1_file
+return sha1_file(file_name)
 
 def hash_string(data):
 import hashlib
-- 
2.11.0

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


[OE-core] [PATCH 0/4] Small spdx.bbclass fixes

2018-07-16 Thread Olof Johansson
This patch series contain small adaptions, primarily for the spdx bbclasss to
work with Python3. But with that said, I was unable to get it working when it
came to interfacing with Fossology.

Olof Johansson (4):
  spdx.bbclass: Replace deprecated string.replace with str.replace
  spdx.bbclass: Fix undefined variable error
  spdx.bbclass: Make use of bb.utils' sha1_file()
  spdx.bbclass: Encode strings before passing to hashlib

 meta/classes/spdx.bbclass | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

-- 
2.11.0

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


Re: [OE-core] [HELP] ptest & ptest

2018-07-16 Thread Tim Orling
http://cgit.openembedded.org/meta-openembedded/tree/meta-python/recipes-devtools/python/python-cryptography_2.2.2.bb
http://cgit.openembedded.org/meta-openembedded/tree/meta-python/recipes-devtools/python/python-pygpgme_0.3.bb
On Mon, Jul 16, 2018 at 1:41 AM nick83ola  wrote:

> Hi Alex,
> thanks for your response.
>
> Do you or anyone else have an example about an actual python package that
> use ptest (possibily using distutils/nose/py.test)?
>
> Thanks
> Nick
>
> On Tue, 26 Jun 2018 at 16:07, Alexander Kanavin 
> wrote:
>
>> The Yocto documentation has general information:
>>
>>
>> https://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#testing-packages-with-ptest
>>
>> Alex
>>
>>
>> 2018-06-26 14:57 GMT+02:00 nick83ola :
>> > Hi all,
>> >
>> > I have a python3 package that launch a py.test test suite from
>> > setup.py and I have created a recipe for it using setuptools3
>> >
>> > Anyone has some hint about how to add a ptest target to run the tests
>> > into the final image (or better in a qemu test image)?
>> >
>> > there are some recipe/documentation that I can look at about creating
>> > -ptest target for python packages?
>> >
>> > Regards
>> > Nicola Lunghi
>> > --
>> > ___
>> > 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
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] gnutls: use HTTP instead of FTP

2018-07-16 Thread Ross Burton
HTTP is in general more reliable so use that in the SRC_URI.

Signed-off-by: Ross Burton 
---
 meta/recipes-support/gnutls/gnutls.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/gnutls/gnutls.inc 
b/meta/recipes-support/gnutls/gnutls.inc
index 7bcb9133ad9..98ec8d9667b 100644
--- a/meta/recipes-support/gnutls/gnutls.inc
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -17,7 +17,7 @@ DEPENDS_append_libc-musl = " argp-standalone"
 
 SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
 
-SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz;
+SRC_URI = 
"https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz;
 
 inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc
 
-- 
2.11.0

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


[OE-core] [PATCH] oeqa/runtime/python: clean up Python test

2018-07-16 Thread Ross Burton
Currently this is three test cases:

1) test_python_exists.  Fail if python3 isn't in PATH.
2) test_python_stdout.  Run a Python script and check the output is as expected
3) test_python_testfile.  Check that a file test_python_stdout wrote to exists.

(1) should be a setup and skip the test module if it isn't present.
(2) and (3) should be merged, there's no point copying over a two line Python
file, and the test doesn't verify that the file doesn't exist in the first
place.

Rewrite the test to check that Python is present in a class setup so the entire
test is skipped if it isn't and do some simple rot13 to verify that bytecode is
being executed correctly.

Signed-off-by: Ross Burton 
---
 meta/lib/oeqa/runtime/cases/python.py | 38 ---
 1 file changed, 8 insertions(+), 30 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/python.py 
b/meta/lib/oeqa/runtime/cases/python.py
index 3d6eb088024..4419a9f6394 100644
--- a/meta/lib/oeqa/runtime/cases/python.py
+++ b/meta/lib/oeqa/runtime/cases/python.py
@@ -1,43 +1,21 @@
-import os
-
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.oeid import OETestID
-from oeqa.runtime.decorator.package import OEHasPackage
 
 class PythonTest(OERuntimeTestCase):
-
 @classmethod
 def setUpClass(cls):
-src = os.path.join(cls.tc.files_dir, 'test.py')
-dst = '/tmp/test.py'
-cls.tc.target.copyTo(src, dst)
-
-@classmethod
-def tearDownClass(cls):
-dst = '/tmp/test.py'
-cls.tc.target.run('rm %s' % dst)
-
-@OETestID(1145)
-@OETestDepends(['ssh.SSHTest.test_ssh'])
-@OEHasPackage(['python3-core'])
-def test_python_exists(self):
-status, output = self.target.run('which python3')
-msg = 'Python binary not in PATH or not on target.'
-self.assertEqual(status, 0, msg=msg)
+import unittest
+if "python3-core" not in cls.tc.image_packages:
+raise unittest.SkipTest("Python3 not on target")
 
 @OETestID(965)
-@OETestDepends(['python.PythonTest.test_python_exists'])
-def test_python_stdout(self):
-status, output = self.target.run('python3 /tmp/test.py')
+@OETestDepends(['ssh.SSHTest.test_ssh'])
+def test_python3(self):
+cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 
'rot13'))\""
+status, output = self.target.run(cmd)
 msg = 'Exit status was not 0. Output: %s' % output
 self.assertEqual(status, 0, msg=msg)
 
 msg = 'Incorrect output: %s' % output
-self.assertEqual(output, "the value of a is 0.01", msg=msg)
-
-@OETestID(1146)
-@OETestDepends(['python.PythonTest.test_python_stdout'])
-def test_python_testfile(self):
-status, output = self.target.run('ls /tmp/testfile.python')
-self.assertEqual(status, 0, msg='Python test file generate failed.')
+self.assertEqual(output, "Hello, world", msg=msg)
-- 
2.11.0

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


[OE-core] [PATCH] perl: update to 5.24.4

2018-07-16 Thread Andrej Valek
 - fix CVE-2018-6797, CVE-2018-6798, CVE-2018-6913
 - remove patches, which are now included in update
 - refresh patches

Signed-off-by: Andrej Valek 
---
 ...perl-native_5.24.1.bb => perl-native_5.24.4.bb} |  4 +-
 ...depends_5.24.1.inc => perl-rdepends_5.24.4.inc} |  0
 .../perl/perl/CVE-2017-12837.patch | 32 
 .../perl/perl/CVE-2017-12883.patch | 44 
 meta/recipes-devtools/perl/perl/Makefile.SH.patch  | 12 ++---
 meta/recipes-devtools/perl/perl/config.sh  | 60 +++---
 .../perl/{perl_5.24.1.bb => perl_5.24.4.bb}|  6 +--
 7 files changed, 40 insertions(+), 118 deletions(-)
 rename meta/recipes-devtools/perl/{perl-native_5.24.1.bb => 
perl-native_5.24.4.bb} (96%)
 rename meta/recipes-devtools/perl/{perl-rdepends_5.24.1.inc => 
perl-rdepends_5.24.4.inc} (100%)
 delete mode 100644 meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
 delete mode 100644 meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
 rename meta/recipes-devtools/perl/{perl_5.24.1.bb => perl_5.24.4.bb} (98%)

diff --git a/meta/recipes-devtools/perl/perl-native_5.24.1.bb 
b/meta/recipes-devtools/perl/perl-native_5.24.4.bb
similarity index 96%
rename from meta/recipes-devtools/perl/perl-native_5.24.1.bb
rename to meta/recipes-devtools/perl/perl-native_5.24.4.bb
index 71f45890b0..90a1615551 100644
--- a/meta/recipes-devtools/perl/perl-native_5.24.1.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.24.4.bb
@@ -18,8 +18,8 @@ SRC_URI += "\
file://perl-5.26.1-guard_old_libcrypt_fix.patch \
   "
 
-SRC_URI[md5sum] = "af6a84c7c3e2b8b269c105a5db2f6d53"
-SRC_URI[sha256sum] = 
"03a77bac4505c270f1890ece75afc7d4b555090b41aa41ea478747e23b2afb3f"
+SRC_URI[md5sum] = "04622bc4d3941dc7eb571c52b7c02993"
+SRC_URI[sha256sum] = 
"7f080287ff64750270689843ae945f02159a33cb8f2fc910248c15befba5db84"
 
 inherit native
 
diff --git a/meta/recipes-devtools/perl/perl-rdepends_5.24.1.inc 
b/meta/recipes-devtools/perl/perl-rdepends_5.24.4.inc
similarity index 100%
rename from meta/recipes-devtools/perl/perl-rdepends_5.24.1.inc
rename to meta/recipes-devtools/perl/perl-rdepends_5.24.4.inc
diff --git a/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch 
b/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
deleted file mode 100644
index 0b59fcda3e..00
--- a/meta/recipes-devtools/perl/perl/CVE-2017-12837.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 73d7247ecab863ef26b5687a37ccc75d6144ad0f Mon Sep 17 00:00:00 2001
-From: Karl Williamson 
-Date: Tue, 17 Oct 2017 13:49:14 +0800
-Subject: [PATCH] fix CVE-2017-12837
-
-Signed-off-by: Karl Williamson 
-Signed-off-by: Steve Hay 
-
-CVE: CVE-2017-12837
-Upstream-Status: Backport
-https://perl5.git.perl.org/perl.git/commitdiff/96c83ed78aeea1a0496dd2b2d935869a822dc8a5
-
-Signed-off-by: Hongxu Jia 

- regcomp.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/regcomp.c b/regcomp.c
-index 5498d14..31ec383 100644
 a/regcomp.c
-+++ b/regcomp.c
-@@ -13021,6 +13021,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, 
U32 depth)
- goto loopdone;
- }
- p = RExC_parse;
-+RExC_parse = parse_start;
- if (ender > 0xff) {
- REQUIRE_UTF8(flagp);
- }
--- 
-1.8.3.1
-
diff --git a/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch 
b/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
deleted file mode 100644
index 5c1805f9e7..00
--- a/meta/recipes-devtools/perl/perl/CVE-2017-12883.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 40b3cdad3649334585cee8f4630ec9a025e62be6 Mon Sep 17 00:00:00 2001
-From: Karl Williamson 
-Date: Fri, 25 Aug 2017 11:33:58 -0600
-Subject: [PATCH] PATCH: [perl #131598]
-
-The cause of this is that the vFAIL macro uses RExC_parse, and that
-variable has just been changed in preparation for code after the vFAIL.
-The solution is to not change RExC_parse until after the vFAIL.
-
-This is a case where the macro hides stuff that can bite you.
-
-(cherry picked from commit 2be4edede4ae226e2eebd4eff28cedd2041f300f)
-
-Upstream-Status: Backport
-CVE: CVE-2017-12833
-Signed-off-by: Armin Kuster 
-

- regcomp.c | 6 --
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-Index: perl-5.24.1/regcomp.c
-===
 perl-5.24.1.orig/regcomp.c
-+++ perl-5.24.1/regcomp.c
-@@ -11918,14 +11918,16 @@ S_grok_bslash_N(pTHX_ RExC_state_t *pREx
-   }
- sv_catpv(substitute_parse, ")");
- 
--RExC_parse = RExC_start = RExC_adjusted_start = SvPV(substitute_parse,
-- len);
-+len = SvCUR(substitute_parse);
- 
-   /* Don't allow empty number */
-   if (len < (STRLEN) 8) {
- RExC_parse = endbrace;
-   vFAIL("Invalid hexadecimal number in \\N{U+...}");
-  

Re: [OE-core] [PATCH 3/3] oeqa/runtime/cases/rpm.py: workaround race condition

2018-07-16 Thread Burton, Ross
Still refusing to accept a "sleep 1" on a race:

1) a 1 second sleep just makes the race rarer, a loaded host and
you'll hit it again and want to push it to 2 seconds
2) Upstream fix at
https://github.com/systemd/systemd/commit/86d18f3b09ec984ef3732567af992adb2dc77a8a

Ross

On 16 July 2018 at 04:20, Chen Qi  wrote:
> With the recent change in new systemd version, it's possible that
> a user is deleted before stopping user-runtime-dir@xxx.service.
> See link below.
>
>   https://github.com/systemd/systemd/issues/9541
>
> Workaround this issue by delay for 1 second before deleting user.
>
> Signed-off-by: Chen Qi 
> ---
>  meta/lib/oeqa/runtime/cases/rpm.py | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/lib/oeqa/runtime/cases/rpm.py 
> b/meta/lib/oeqa/runtime/cases/rpm.py
> index 1e5e463..2f9dcad 100644
> --- a/meta/lib/oeqa/runtime/cases/rpm.py
> +++ b/meta/lib/oeqa/runtime/cases/rpm.py
> @@ -87,6 +87,12 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
>  self.assertEqual(status, 0, msg=msg)
>
>  def unset_up_test_user(u):
> +# Due to recent change in systemd, we need to sleep for a while
> +# to avoid unexpected failure of user-runtime-dir@1000.service
> +# See https://github.com/systemd/systemd/issues/9541
> +if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
> +self.target.run('sleep 1')
> +
>  status, output = self.target.run('userdel -r %s' % u)
>  msg = 'Failed to erase user: %s' % output
>  self.assertTrue(status == 0, msg=msg)
> --
> 1.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


Re: [OE-core] [meta-oe][poky][PATCH v2] systemd: resolved linked even if the option is disabled

2018-07-16 Thread ChenQi

Hi Nicola,

As I replied on poky mailing list to this patch, you need to first check 
the following three commits.


commit 00e4662e55f66570cae29240c22b4d74b79d3ca5
Author: Maxin B. John 
Date:   Mon Jun 12 18:10:21 2017 +0300

systemd: enable resolved and networkd

Enable systemd-resolved and systemd-networkd by default.
Make it co-exist with connman and  Fix associated problems
in read-only rootfs.

Fixes [YOCTO #11331]

(From OE-Core rev: d9b6d538e3d81ab0d5e7b7b6adecef555d782217)

Signed-off-by: Maxin B. John 
Signed-off-by: Richard Purdie 

commit 669edd04432f8e76e32bd7f34f4d9aa63eef4038
Author: Khem Raj 
Date:   Fri Dec 16 14:07:31 2016 -0800

systemd: point to correct resolv.conf when resolved is enabled

latest systemd has changed the resolved defaults which points to
127.0.0.53 port 53 on local network. If someone wants to use
host-local IP address then it can be pointed to copy in /lib/systemd

(From OE-Core rev: 99d1199fd0961f94732a1a533d66472ca17cf6f5)

Signed-off-by: Khem Raj 
Signed-off-by: Ross Burton 
Signed-off-by: Richard Purdie 

commit b80da02ce9b683f96393fe0ea1f5f1a5f1a07c89
Author: Christopher Larson 
Date:   Wed Nov 4 20:19:19 2015 -0700

systemd: arrange for volatile /etc/resolv.conf

On sysvinit systems, volatiles is configured to make 
/etc/resolv.conf symlink
to a file in a volatile path, which lets us write to 
/etc/resolv.conf for

read-only-rootfs. For systemd, this isn't set up unless we enable
systemd-resolved, which we don't by default. When it's not enabled, 
create the
/etc/resolv.conf symlink and ensure the volatile path is created on 
boot with

tmpfiles.d.

(From OE-Core rev: 7f087f161e8942bcd35f88999dfca418f01cd7fa)

Signed-off-by: Christopher Larson 
Signed-off-by: Ross Burton 
Signed-off-by: Richard Purdie 

Best Regards,
Chen Qi


On 07/16/2018 04:17 PM, Nicola Lunghi wrote:

From: Nicola Lunghi 

if resolved option is not selected the package systemd-resolved
is not installed so it cannot provide an alternative for
resolv.conf

In this recipe the previous check was instead reversing the check (note the !).

This patch avoid messing with resol.conf link if resolved is disabled in
the package config.

This in particular if we compile systemd with musl where systemd-resolved
cannot be compiled.

Signed-off-by: Nicola Lunghi 
---
  meta/recipes-core/systemd/systemd_237.bb | 8 +++-
  1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_237.bb 
b/meta/recipes-core/systemd/systemd_237.bb
index 3efca33e73..bd6dcef637 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -258,14 +258,11 @@ do_install() {
if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e 
"\$ad /run/systemd/netif/links 0755 root root -" 
${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
fi
-   if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', 
d)}; then
+   if ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', 
d)}; then
echo 'L! ${sysconfdir}/resolv.conf - - - - 
../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
echo 'd /run/systemd/resolve 0755 root root -' 
>>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
echo 'f /run/systemd/resolve/resolv.conf 0644 root root' 
>>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
ln -s ../run/systemd/resolve/resolv.conf 
${D}${sysconfdir}/resolv-conf.systemd
-   else
-   sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - 
../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
-   ln -s ../run/systemd/resolve/resolv.conf 
${D}${sysconfdir}/resolv-conf.systemd
fi
install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON 
${D}${systemd_unitdir}/systemd-sysv-install
  
@@ -539,7 +536,7 @@ python __anonymous() {

  # TODO:
  # u-a for runlevel and telinit
  
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"

+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
  
  ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"

  ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
@@ -565,6 +562,7 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
  ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
  ALTERNATIVE_PRIORITY[runlevel] ?= "300"
  
+ALTERNATIVE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"

  ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
  ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
  ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"



-- 
___

Re: [OE-core] [HELP] ptest & ptest

2018-07-16 Thread nick83ola
Hi Alex,
thanks for your response.

Do you or anyone else have an example about an actual python package that
use ptest (possibily using distutils/nose/py.test)?

Thanks
Nick

On Tue, 26 Jun 2018 at 16:07, Alexander Kanavin 
wrote:

> The Yocto documentation has general information:
>
>
> https://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#testing-packages-with-ptest
>
> Alex
>
>
> 2018-06-26 14:57 GMT+02:00 nick83ola :
> > Hi all,
> >
> > I have a python3 package that launch a py.test test suite from
> > setup.py and I have created a recipe for it using setuptools3
> >
> > Anyone has some hint about how to add a ptest target to run the tests
> > into the final image (or better in a qemu test image)?
> >
> > there are some recipe/documentation that I can look at about creating
> > -ptest target for python packages?
> >
> > Regards
> > Nicola Lunghi
> > --
> > ___
> > 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] [meta-oe][poky][PATCH v2] systemd: resolved linked even if the option is disabled

2018-07-16 Thread Nicola Lunghi
From: Nicola Lunghi 

if resolved option is not selected the package systemd-resolved
is not installed so it cannot provide an alternative for
resolv.conf

In this recipe the previous check was instead reversing the check (note the !).

This patch avoid messing with resol.conf link if resolved is disabled in
the package config.

This in particular if we compile systemd with musl where systemd-resolved
cannot be compiled.

Signed-off-by: Nicola Lunghi 
---
 meta/recipes-core/systemd/systemd_237.bb | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_237.bb 
b/meta/recipes-core/systemd/systemd_237.bb
index 3efca33e73..bd6dcef637 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -258,14 +258,11 @@ do_install() {
if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i 
-e "\$ad /run/systemd/netif/links 0755 root root -" 
${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
fi
-   if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', 
d)}; then
+   if ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', 
d)}; then
echo 'L! ${sysconfdir}/resolv.conf - - - - 
../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
echo 'd /run/systemd/resolve 0755 root root -' 
>>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
echo 'f /run/systemd/resolve/resolv.conf 0644 root root' 
>>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
ln -s ../run/systemd/resolve/resolv.conf 
${D}${sysconfdir}/resolv-conf.systemd
-   else
-   sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - 
- ../run/systemd/resolve/resolv.conf%g" 
${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
-   ln -s ../run/systemd/resolve/resolv.conf 
${D}${sysconfdir}/resolv-conf.systemd
fi
install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON 
${D}${systemd_unitdir}/systemd-sysv-install
 
@@ -539,7 +536,7 @@ python __anonymous() {
 # TODO:
 # u-a for runlevel and telinit
 
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
 
 ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
 ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
@@ -565,6 +562,7 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
 ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
 ALTERNATIVE_PRIORITY[runlevel] ?= "300"
 
+ALTERNATIVE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', 
'resolv-conf', '', d)}"
 ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
 ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
 ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
-- 
2.17.1

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


Re: [OE-core] [PATCH 2/2] [meta] atk: Specify gettext-native dependency

2018-07-16 Thread Marko Lindqvist
 Sorry, I'm on vacation, so it would be good if someone else can do the patch.


 - ML


On 3 July 2018 at 17:37, Burton, Ross  wrote:
> What was missing all along is that we're talking specifically about
> atk-native here, which disables NLS explicitly.  As Meson doesn't yet
> expose a way to turn off i18n we need to stop that.  For now, adding
> USE_NLS=yes is a suitable workaround (and what glib already does).
> Marko, can you send this patch?
>
> Arguably, meson.bbclass could do this, but that would be forcing a
> gettext dependency on everything using Meson.
>
> Ross
>
>
>
> On 1 July 2018 at 19:20, Marko Lindqvist  wrote:
>>  3) Adding 'USE_NLS = "yes"' to atk recipe fixes the problem for me.
>>
>>
>>  - ML
>>
>>
>> On 1 July 2018 at 21:03, Marko Lindqvist  wrote:
>>>  I think the problem is not with INHIBIT_DEFAULT_DEPS, but with
>>> USE_NLS on the next couple of lines. With USE_NLS disabled, the
>>> automatic dependency is gettext-minimal-native (not providing
>>> xgettext, I think), and not gettext-native.
>>>
>>>  1) 
>>> tmp-glibc/work/aarch64-oe-linux/atk/2.28.1-r0/recipe-sysroot-native/sysroot-providers/gettext-minimal-native
>>> is there
>>>  2) Adding gettext-minimal-native as atk dependency does not fix the
>>> issue like adding gettext-native dependency does
>>>
>>>
>>>  - ML
>>>
>>>
>>> On 30 June 2018 at 21:43, Marko Lindqvist  wrote:
  This error happens to me with both qemux86 and qemuarm64. Haven't
 tested any others yet.


  - ML

 On 15 June 2018 at 20:40, Alistair Francis  wrote:
> On Mon, Jun 4, 2018 at 4:18 PM, Burton, Ross  
> wrote:
>> That implies that INHIBIT_DEFAULT_DEPS is also evaluating to true,
>> which it shouldn't be in ATK.
>>
>> I'd definitely be checking if that is the case, and if you can
>> replicate the failure with e.g. qemuarm.
>
> I can't replicate it with qemuarm and checking with bitbake -e I can't
> see anywhere that the variable is set. Any ideas on what to try to
> figure out how it is set?
>
> Alistair
>
>>
>> Ross
>>
>> On 4 June 2018 at 19:46, Alistair Francis  wrote:
>>> On Mon, Jun 4, 2018 at 10:20 AM, Alexander Kanavin
>>>  wrote:
 On 06/04/2018 08:17 PM, Alistair Francis wrote:
>
> On Mon, Jun 4, 2018 at 3:06 AM, Burton, Ross 
> wrote:
>>
>> So why isn't the inherit gettext sufficient?
>
>
> I'm not sure. Here is the error I see when compiling for RISC-V before
> this patch:


 So is the error specific to risc-v? You should dig deeper in that 
 direction
 then.
>>>
>>> Ok, it looks like the line: if d.getVar('INHIBIT_DEFAULT_DEPS') and
>>> not oe.utils.inherits(d, 'cross-canadian'): is evaluating as true in
>>> gettext.bbclass so we don't depend on gettext-native.
>>>
>>> Do I need to ensure cross-canadian is set for RISC-V builds then?
>>>
>>> Alistair
>>>

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


[OE-core] [PATCH] sshd: add sshd.service

2018-07-16 Thread Zheng Ruoqin
Add sshd.service for user to start the sshd deamon.

Signed-off-by: Zheng Ruoqin 
---
 meta/recipes-connectivity/openssh/openssh/sshd.service | 16 
 meta/recipes-connectivity/openssh/openssh_7.7p1.bb |  2 ++
 2 files changed, 18 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssh/openssh/sshd.service

diff --git a/meta/recipes-connectivity/openssh/openssh/sshd.service 
b/meta/recipes-connectivity/openssh/openssh/sshd.service
new file mode 100644
index 000..eb87d32
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh/sshd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OpenSSH server daemon
+Documentation=man:sshd(8) man:sshd_config(5)
+After=network.target sshd-keygen.service
+Wants=sshd-keygen.service
+
+[Service]
+EnvironmentFile=/etc/sysconfig/sshd
+ExecStart=/usr/sbin/sshd -D $OPTIONS
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=on-failure
+RestartSec=42s
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/openssh/openssh_7.7p1.bb 
b/meta/recipes-connectivity/openssh/openssh_7.7p1.bb
index b3da5f6..def4062 100644
--- a/meta/recipes-connectivity/openssh/openssh_7.7p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_7.7p1.bb
@@ -17,6 +17,7 @@ SRC_URI = 
"http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
file://ssh_config \
file://init \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', 
'', d)} \
+   file://sshd.service \
file://sshd.socket \
file://sshd@.service \
file://sshdgenkeys.service \
@@ -111,6 +112,7 @@ do_install_append () {
echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> 
${D}${sysconfdir}/ssh/sshd_config_readonly
 
install -d ${D}${systemd_unitdir}/system
+   install -c -m 0644 ${WORKDIR}/sshd.service ${D}${systemd_unitdir}/system
install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_unitdir}/system
install -c -m 0644 ${WORKDIR}/sshd@.service 
${D}${systemd_unitdir}/system
install -c -m 0644 ${WORKDIR}/sshdgenkeys.service 
${D}${systemd_unitdir}/system
-- 
2.7.4



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


Re: [OE-core] devshell problems after distro upgrade openSUSE Leap 42.3 -> 15.0 (tmux only)

2018-07-16 Thread Steffen Sledz
On 04.07.2018 13:37, Steffen Sledz wrote:
> On 03.07.2018 08:04, Steffen Sledz wrote:
>> On 02.07.2018 20:25, Khem Raj wrote:
>>> On Sun, Jul 1, 2018 at 11:39 PM Steffen Sledz  wrote:

 After upgrading my build system from openSUSE Leap 42.3 to openSUSE Leap 
 15.0 a

   bitbake foo -c devshell

 no longer switches to the related work directory. The devshell is opened 
 in the original directory without any error or warning instead.

 Any hints what's wrong here or how I can debug this behaviour?

>>>
>>> which terminal are you using, probably some default behavior changes there ?
>>
>> Main terminal is xterm. No special settings for the devshell terminal, so 
>> tmux is started like before.
> 
> 
> After some more tests I can limit the problem to OE_TERMINAL="tmux". Other 
> terminals like screen or xterm work well.
> ...


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