[OE-core] [PATCH] bitbake.conf: re-order DEBUG_PREFIX_MAP

2018-04-19 Thread Juro Bystricky
When specifying several -fdebug-prefix-map command line options to
gcc, they are evaluated right to left (last one first).
Normally, the order is irrelevant. However, when we try to map both:

recipe-sysroot-native
recipe-sysroot

the order matters. With the original order most of our debug packages contain
incorrect debug symbols.
Take for example /usr/bin/.debug/setfacl from acl-dbg:

$ strings setfacl | grep native
...
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include
-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include

Reordering the fdebug-prefix-map arguments will give us the correct paths:
/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/7.3.0/include

Note there may be additional an incorrect paths, such as:
/usr/src/debug/glibc/2.27-r0/recipe-sysroot-native/usr/lib/x86_64-poky-linux.gcc-cross-initial-x86_64/gcc/x86_64-poky-linux/7.3.0/include

But that one needs to be fixed in the recipe for glibc.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/conf/bitbake.conf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index ec3207c..bc962bb 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -597,9 +597,10 @@ EXTRA_OEMAKE_prepend_task-install = "${PARALLEL_MAKEINST} "
 ##
 # Optimization flags.
 ##
+# Beware: applied last to first
 DEBUG_PREFIX_MAP ?= 
"-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
- -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
  -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+ -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
 "
 DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
 
-- 
2.7.4

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


[OE-core] [PATCH v2] glib-2.0/glib.inc: fix broken mingw build

2018-04-19 Thread Juro Bystricky
mingw build was broken by the commit:
"glib-2.0/glib.inc: apply MLPREFIX renaming to all package classes"

When building for mingw, we encounter build errors such as:

  mv: cannot stat '/<...>/usr/libexec/gio-querymodules': No such file 
or directory

The mingw file that exists is "gio-querymodules.exe" instead of 
"gio-qeurymodules".
The fix is to append the names of executables by an OS specific EXEEXT.

[YOCTO #12679]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/glib-2.0/glib.inc | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/glib-2.0/glib.inc 
b/meta/recipes-core/glib-2.0/glib.inc
index b7c32e6..f645ed6 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -91,6 +91,9 @@ USE_NLS_class-target = "yes"
 USE_NLS_class-nativesdk = "yes"
 CACHED_CONFIGUREVARS_append_class-native = " ac_cv_path_MSGFMT=/bin/false"
 
+EXEEXT = ""
+EXEEXT_mingw32 = ".exe"
+
 do_install_append () {
if [ -f ${D}${bindir}/gtester-report ]; then
sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env 
python3|'
@@ -107,7 +110,7 @@ do_install_append () {
 
 # Make sure gio-querymodules is unique among multilibs
 if test "x${MLPREFIX}" != "x"; then
-mv ${D}${libexecdir}/gio-querymodules 
${D}${libexecdir}/${MLPREFIX}gio-querymodules
+mv ${D}${libexecdir}/gio-querymodules${EXEEXT} 
${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT}
 fi
 }
 
-- 
2.7.4

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


[OE-core] [PATCH v5] rootfs-postcommands.bbclass: improve binary reproducibility

2018-04-13 Thread Juro Bystricky
Conditionally support binary reproducibility of rootfs images.
If REPRODUCIBLE_TIMESTAMP_ROOTFS is specified then:

1. set /etc/timestamp to a reproducible value
2. set /etc/version to a reproducible value
3. set /etc/gconf: set mtime in all %gconf.xml to reproducible values

The reproducible value is taken from the variable REPRODUCIBLE_TIMESTAMP_ROOTFS.

[YOCTO #11176]
[YOCTO #12422]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/rootfs-postcommands.bbclass | 25 +++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index a4e627f..5522209 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -56,6 +56,7 @@ ROOTFS_POSTPROCESS_COMMAND_append_qemuall = 
"${SSH_DISABLE_DNS_LOOKUP}"
 SORT_PASSWD_POSTPROCESS_COMMAND ??= " sort_passwd; "
 python () {
 d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 
'${SORT_PASSWD_POSTPROCESS_COMMAND}')
+d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;')
 }
 
 systemd_create_users () {
@@ -256,10 +257,17 @@ python write_image_manifest () {
 os.symlink(os.path.basename(manifest_name), manifest_link)
 }
 
-# Can be use to create /etc/timestamp during image construction to give a 
reasonably
+# Can be used to create /etc/timestamp during image construction to give a 
reasonably
 # sane default time setting
 rootfs_update_timestamp () {
-   date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
+   if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
+   # Convert UTC into %4Y%2m%2d%2H%2M%2S
+   sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} 
+%4Y%2m%2d%2H%2M%2S`
+   else
+   sformatted=`date -u +%4Y%2m%2d%2H%2M%2S`
+   fi
+   echo $sformatted > ${IMAGE_ROOTFS}/etc/timestamp
+   bbnote "rootfs_update_timestamp: set /etc/timestamp to $sformatted"
 }
 
 # Prevent X from being started
@@ -328,3 +336,16 @@ python rootfs_log_check_recommends() {
 if 'unsatisfied recommendation for' in line:
 bb.warn('[log_check] %s: %s' % (d.getVar('PN'), line))
 }
+
+# Perform any additional adjustments needed to make rootf binary reproducible
+rootfs_reproducible () {
+   if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
+   # Convert UTC into %4Y%2m%2d%2H%2M%2S
+   sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} 
+%4Y%2m%2d%2H%2M%2S`
+   echo $sformatted > ${IMAGE_ROOTFS}/etc/version
+   bbnote "rootfs_reproducible: set /etc/version to $sformatted"
+
+   find ${IMAGE_ROOTFS}/etc/gconf -name '%gconf.xml' -print0 | 
xargs -0r \
+   sed -i -e 
's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g'
+   fi
+}
-- 
2.7.4

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


[OE-core] [PATCH] qemu_2.11.1.bb: support mingw build

2018-04-13 Thread Juro Bystricky
The patch chardev-connect-socket-to-a-spawned-command.patch calls
"socketpair". This function is missing in mingw, so the patch
needs to be modified accordingly (by conditional compilation using
_WIN32 macro where appropriate), otherwise we end up with a broken
mingw build.

While it is possible to simply remove the whole patch for mingw build
(via a .bbappend file in meta-mingw), it makes more sense to modify
the patch itself.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 ...ardev-connect-socket-to-a-spawned-command.patch | 46 +++---
 1 file changed, 31 insertions(+), 15 deletions(-)

diff --git 
a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
 
b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
index 32809d3..6e6bf95 100644
--- 
a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
+++ 
b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
@@ -54,10 +54,11 @@ diff --git a/chardev/char-socket.c b/chardev/char-socket.c
 index 53eda8ef00..f566107c35 100644
 --- a/chardev/char-socket.c
 +++ b/chardev/char-socket.c
-@@ -852,6 +852,66 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
+@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
  return false;
  }
  
++#ifndef _WIN32
 +static void chardev_open_socket_cmd(Chardev *chr,
 +const char *cmd,
 +Error **errp)
@@ -117,42 +118,49 @@ index 53eda8ef00..f566107c35 100644
 +object_unref(OBJECT(sioc));
 +}
 +}
++#endif
 +
  static void qmp_chardev_open_socket(Chardev *chr,
  ChardevBackend *backend,
  bool *be_opened,
-@@ -859,6 +919,7 @@ static void qmp_chardev_open_socket(Chardev *chr,
+@@ -859,6 +921,9 @@
  {
  SocketChardev *s = SOCKET_CHARDEV(chr);
  ChardevSocket *sock = backend->u.socket.data;
++#ifndef _WIN32
 +const char *cmd = sock->cmd;
++#endif
  bool do_nodelay = sock->has_nodelay ? sock->nodelay : false;
  bool is_listen  = sock->has_server  ? sock->server  : true;
  bool is_telnet  = sock->has_telnet  ? sock->telnet  : false;
-@@ -926,7 +987,12 @@ static void qmp_chardev_open_socket(Chardev *chr,
+@@ -925,7 +990,14 @@
+ } else if (reconnect > 0) {
  s->reconnect_time = reconnect;
  }
- 
--if (s->reconnect_time) {
+-
++#ifndef _WIN32
 +if (cmd) {
 +chardev_open_socket_cmd(chr, cmd, errp);
 +
 +/* everything ready (or failed permanently) before we return */
 +*be_opened = true;
-+} else if (s->reconnect_time) {
++} else
++#endif
+ if (s->reconnect_time) {
  sioc = qio_channel_socket_new();
  tcp_chr_set_client_ioc_name(chr, sioc);
- qio_channel_socket_connect_async(sioc, s->addr,
-@@ -985,11 +1051,22 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
+@@ -985,10 +1057,26 @@
  const char *host = qemu_opt_get(opts, "host");
  const char *port = qemu_opt_get(opts, "port");
  const char *tls_creds = qemu_opt_get(opts, "tls-creds");
++#ifndef _WIN32
 +const char *cmd = qemu_opt_get(opts, "cmd");
++#endif
  SocketAddressLegacy *addr;
  ChardevSocket *sock;
  
  backend->type = CHARDEV_BACKEND_KIND_SOCKET;
--if (!path) {
++#ifndef _WIN32
 +if (cmd) {
 +/*
 + * Here we have to ensure that no options are set which are 
incompatible with
@@ -163,24 +171,33 @@ index 53eda8ef00..f566107c35 100644
 +error_setg(errp, "chardev: socket: cmd does not support any 
additional options");
 +return;
 +}
-+} else if (!path) {
++} else
++#endif
+ if (!path) {
  if (!host) {
  error_setg(errp, "chardev: socket: no host given");
- return;
-@@ -1021,13 +1098,14 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
+@@ -1021,13 +1109,24 @@
  sock->has_reconnect = true;
  sock->reconnect = reconnect;
  sock->tls_creds = g_strdup(tls_creds);
++#ifndef _WIN32
 +sock->cmd = g_strdup(cmd);
++#endif
  
  addr = g_new0(SocketAddressLegacy, 1);
--if (path) {
++#ifndef _WIN32
 +if (path || cmd) {
++#else
+ if (path) {
++#endif
  UnixSocketAddress *q_unix;
  addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
  q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
--q_unix->path = g_strdup(path);
++#ifndef _WIN32
 +q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
++#else
+ q_unix->path = g_strdup(path);
++#endif
  } else {
  ad

[OE-core] [PATCH] glib-2.0/glib.inc: fix broken mingw build

2018-04-12 Thread Juro Bystricky
mingw build was broken by the commit:
"glib-2.0/glib.inc: apply MLPREFIX renaming to all package classes"

When building for mingw, we encounter build errors such as:

  mv: cannot stat '/<...>/usr/libexec/gio-querymodules': No such file 
or directory

The file that exists is actually "gio-querymodules.exe", but still there is no
good reason to rename it to "nativesdk-gio-querymodules.exe".
So for mingw we simply avoid renaming of the executable, by skippng the line:

  mv -v ${D}${libexecdir}/gio-querymodules 
${D}${libexecdir}/${MLPREFIX}gio-querymodules

[YOCTO #12679]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/glib-2.0/glib.inc | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/glib-2.0/glib.inc 
b/meta/recipes-core/glib-2.0/glib.inc
index b7c32e6..92ac19e 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -91,6 +91,9 @@ USE_NLS_class-target = "yes"
 USE_NLS_class-nativesdk = "yes"
 CACHED_CONFIGUREVARS_append_class-native = " ac_cv_path_MSGFMT=/bin/false"
 
+EXEEXT = ""
+EXEEXT_mingw32 = ".exe"
+
 do_install_append () {
if [ -f ${D}${bindir}/gtester-report ]; then
sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env 
python3|'
@@ -106,7 +109,7 @@ do_install_append () {
fi
 
 # Make sure gio-querymodules is unique among multilibs
-if test "x${MLPREFIX}" != "x"; then
+if test "x${MLPREFIX}" != "x" && test "${EXEEXT}" != ".exe"; then
 mv ${D}${libexecdir}/gio-querymodules 
${D}${libexecdir}/${MLPREFIX}gio-querymodules
 fi
 }
-- 
2.7.4

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


[OE-core] [PATCH 1/1] python-xcbgen_1.12: improve reproducibility

2018-04-06 Thread Juro Bystricky
In order to remove timestamps from all .pyc files we need to recompile
them with python3-native, as we cannot rely on the host python being
able to do that. Both python-native and python3-native derive the timestamp
from SOURCE_DATE_EPOCH if present.
However, building python3-native can be computationally expensive, so
we resort to python3-native only when building reproducible packages:
(BUILD_REPRODUCIBLE_BINARIES = '1'), otherwise we use the host python3.

[YOCTO #12543]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb 
b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
index 25a8373..02a42af 100644
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb
@@ -20,6 +20,11 @@ SRC_URI[sha256sum] = 
"5922aba4c664ab7899a29d92ea91a87aa4c1fc7eb5ee550325c3216c48
 
 inherit autotools pkgconfig
 
+# We prefer using host Python, but for reproducible builds we need to resort to
+# python3-native in order to have timestamps in compiled modules based on 
SOURCE_DATE_EPOCH.
+# We cannot assume host Python supports SOURCE_DATE_EPOCH.
+inherit ${@oe.utils.ifelse(d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1', 
'python3native', '')}
+
 # Force the use of Python 3 and a specific library path so we don't need to
 # depend on python3-native
 CACHED_CONFIGUREVARS += "PYTHON=python3 
am_cv_python_pythondir=${libdir}/xcb-proto"
-- 
2.7.4

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


[OE-core] [PATCH 0/1] python-xcbgen: improve reproducibility

2018-04-06 Thread Juro Bystricky
This patch addresses the last remaining non-reproducible package for
core-image-minimal (with current "sumo").

A short explanation:
When building core-image-minimal in two different folders with current "sumo"
(http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=sumo ) :

$ source oe-build-env build_1
local.conf:
PACKAGE_CLASSES="package_deb package_rpm package_ipk"
MACHINE="qemux86-64"
$ bitbake core-image-minimal

and

$ source oe-build-env build_2

local.conf:
PACKAGE_CLASSES="package_deb package_rpm package_ipk"
MACHINE="qemux86-64"

$ bitbake core-image-minimal

After binary comparing all packages in build_1/tmp/deploy/[ipk,rpm.deb] to
build_2/tmp/deploy/[ipk,rpm,deb], we get these results:

   IPK   DEB  RPM
Same: 000
Different: 3952 3952 3952
Total: 3952 3952 3952

Repeating the same with (same host):

$ source oe-build-env build_repro_1
local.conf:
PACKAGE_CLASSES="package_deb package_rpm package_ipk"
MACHINE="qemux86-64"
INHERIT+="reproducible_build"
$ bitbake core-image-minimal

and

$ source oe-build-env build_repro_2

local.conf:
PACKAGE_CLASSES="package_deb package_rpm package_ipk"
MACHINE="qemux86-64"
INHERIT+="reproducible_build"

$ bitbake core-image-minimal

After binary comparing all packages in build_repro_1/tmp/deploy/[ipk,rpm.deb] to
build_repro_2/tmp/deploy/[ipk,rpm,deb], we get these results:

   IPK   DEB  RPM
Same:  3951 3951 3951
Different:111
Total: 3952 3952 3952

The remaining package that does not build reproducibly is python-xcbgen.
This is because the package contains .pyc files which contain build-time 
timestamps.
The python files are compiled with host Python3, which may or may not support
SOURCE_DATE_EPOCH. However, both oe-core python-native and python3-native do 
support
SOURCE_DATE_EPOCH, so to build the package reproducibly all we need to do is
compile the python files with python3-native. Ideally, we would use 
python3-native
unconditionally, but building python3-native itself can be computationally 
quite expensive.
So, as a compromise, we use python3-native only when 
BUILD_REPRODUCIBLE_BINARIES = '1'
host Python3 otherwise.


Juro Bystricky (1):
  python-xcbgen_1.12: improve reproducibility

 meta/recipes-graphics/xorg-proto/xcb-proto_1.12.bb | 5 +
 1 file changed, 5 insertions(+)

-- 
2.7.4

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


[OE-core] [PATCH] hello-mod_0.1.bb: add RPROVIDES

2018-04-05 Thread Juro Bystricky
Although the package will get an automatic prefix "kernel-module", so
the package kernel-module-hello does exist, populating rootfs can
generate an error:
  - nothing provides kernel-module-hello ...

This is quite unfortunate, as this recipe is used as a sample.

Adding RPROVIDES_${PN} += "kernel-module-hello" to the recipe fixes
the problem.

[YOCTO #12641]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb 
b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
index b140b0a..3d33446 100644
--- a/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
+++ b/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
@@ -13,3 +13,5 @@ S = "${WORKDIR}"
 
 # The inherit of module.bbclass will automatically name module packages with
 # "kernel-module-" prefix as required by the oe-core build environment.
+
+RPROVIDES_${PN} += "kernel-module-hello"
-- 
2.7.4

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


[OE-core] [PATCH] linux-yocto_4.14.bb: fix for deterministic srcversion

2018-03-30 Thread Juro Bystricky
"srcversion" field inserted into module modinfo section contains a
sum of the source files which made it. However, this field can
be incorrect. Building the same module can end up having inconsistent
srcversion field eventhough the sources remain the same.

This basically negates the whole purpose of the field srcversion,
and breaks build reproducibility as well.

The problem is fairly easy reproduceable by comparing "srcversion" of
kernel modules built in a workplace of a short directory name with
"srcversion" of the same modules built in a workplace of a fairly long
directory name.

The reason for incorrect srcversion is that some source files can be
simply silently skipped from the checksum calculation due to limited
buffer space for line parsing.

[YOCTO #12544]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../modpost-srcversion-sometimes-incorrect.patch   | 48 ++
 meta/recipes-kernel/linux/linux-yocto_4.14.bb  |  4 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-kernel/linux/files/modpost-srcversion-sometimes-incorrect.patch

diff --git 
a/meta/recipes-kernel/linux/files/modpost-srcversion-sometimes-incorrect.patch 
b/meta/recipes-kernel/linux/files/modpost-srcversion-sometimes-incorrect.patch
new file mode 100644
index 000..1680293
--- /dev/null
+++ 
b/meta/recipes-kernel/linux/files/modpost-srcversion-sometimes-incorrect.patch
@@ -0,0 +1,48 @@
+"srcversion" field inserted into module modinfo section contains a
+sum of the source files which made it. However, this field can
+be incorrect. Building the same module can end up having inconsistent
+srcversion field eventhough the sources remain the same.
+This can be reproduced by building modules in a deeply nested directory,
+but other factors contribute as well.
+
+The reason for incorrect srcversion is that some source files can be
+simply silently skipped from the checksum calculation due to limited
+buffer space for line parsing.
+
+This patch addresses two issues:
+
+1. Allocates a larger line buffer (32k vs 4k).
+2. Issues a warning if a line length exceeds the line buffer.
+
+Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10318141/]
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
+index 9917f92..955f26e 100644
+--- a/scripts/mod/modpost.c
 b/scripts/mod/modpost.c
+@@ -385,9 +385,10 @@ void *grab_file(const char *filename, unsigned long *size)
+   * spaces in the beginning of the line is trimmed away.
+   * Return a pointer to a static buffer.
+   **/
++#define MODPOST_MAX_LINE 32768
+ char *get_next_line(unsigned long *pos, void *file, unsigned long size)
+ {
+-  static char line[4096];
++  static char line[MODPOST_MAX_LINE];
+   int skip = 1;
+   size_t len = 0;
+   signed char *p = (signed char *)file + *pos;
+@@ -402,8 +403,11 @@ char *get_next_line(unsigned long *pos, void *file, 
unsigned long size)
+   if (*p != '\n' && (*pos < size)) {
+   len++;
+   *s++ = *p++;
+-  if (len > 4095)
++  if (len > (sizeof(line)-1)) {
++  warn(" %s: line exceeds buffer size %zu bytes\n"
++   , __func__, sizeof(line));
+   break; /* Too long, stop */
++  }
+   } else {
+   /* End of string */
+   *s = '\0';
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.14.bb 
b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
index ba5e356..6c0a88f 100644
--- a/meta/recipes-kernel/linux/linux-yocto_4.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_4.14.bb
@@ -22,7 +22,9 @@ SRCREV_machine ?= "edc90f45a716ffe8e16cebaaf3b5db070af0280a"
 SRCREV_meta ?= "5f6c3e32365bffb1993c0c62abf2c5bb8916a57f"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \
-   
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}"
+   
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.14;destsuffix=${KMETA}
 \
+   file://modpost-srcversion-sometimes-incorrect.patch \
+   "
 
 LINUX_VERSION ?= "4.14.24"
 
-- 
2.7.4

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


[OE-core] [PATCH v2] libc6-dbg: improve reproducibility

2018-03-29 Thread Juro Bystricky
Prevent bison from generating #line comments containing build
host paths references.

[YOCTO #12625]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../glibc/0030-plural_c_no_preprocessor_lines.patch | 21 +
 meta/recipes-core/glibc/glibc_2.27.bb   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 
meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch

diff --git 
a/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch 
b/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
new file mode 100644
index 000..6f03e1c
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0030-plural_c_no_preprocessor_lines.patch
@@ -0,0 +1,21 @@
+Improve reproducibility:
+Do not put any #line preprocessor commands in bison generated files.
+These lines contain absolute paths containing file locations on
+the host build machine.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+diff --git a/intl/Makefile b/intl/Makefile
+index 2219717..a203780 100644
+--- a/intl/Makefile
 b/intl/Makefile
+@@ -151,7 +151,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
+ 
+ CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
+   -D'LOCALE_ALIAS_PATH="$(localedir)"'
+-BISONFLAGS = --yacc --name-prefix=__gettext --output
++BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
+ 
+ $(inst_localedir)/locale.alias: locale.alias $(+force)
+   $(do-install)
diff --git a/meta/recipes-core/glibc/glibc_2.27.bb 
b/meta/recipes-core/glibc/glibc_2.27.bb
index 4a461ab..772351a 100644
--- a/meta/recipes-core/glibc/glibc_2.27.bb
+++ b/meta/recipes-core/glibc/glibc_2.27.bb
@@ -44,6 +44,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \

file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \

file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \

file://0029-Replace-strncpy-with-memccpy-to-fix-Wstringop-trunca.patch \
+   file://0030-plural_c_no_preprocessor_lines.patch \
 "
 
 NATIVESDKFIXES ?= ""
-- 
2.7.4

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


[OE-core] [PATCH] libpcre-ptest: skip locale test

2018-03-29 Thread Juro Bystricky
If a fr_FR locale is found, it is automatically tested. The test
will fail if the locale is UTF-8, as the test blindly assumes
(and expects) a non-UTF fr_FR locale.
The remedy is to skip the test.

[YOCTO #12215]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-support/libpcre/libpcre_8.41.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-support/libpcre/libpcre_8.41.bb 
b/meta/recipes-support/libpcre/libpcre_8.41.bb
index 0eaed18..0187c08 100644
--- a/meta/recipes-support/libpcre/libpcre_8.41.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.41.bb
@@ -80,4 +80,8 @@ do_install_ptest() {
for i in RunTest RunGrepTest test-driver; \
  do cp ${S}/$i $t; \
done
+   # Skip the fr_FR locale test. If the locale fr_FR is found, it is 
tested.
+   # If not found, the test is skipped. The test program assumes fr_FR is 
non-UTF-8
+   # locale so the test fails if fr_FR is UTF-8 locale.
+   sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest 
 }
-- 
2.7.4

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


[OE-core] [PATCH] libc6-dbg: improve reproducibility

2018-03-29 Thread Juro Bystricky
Prevent bison from generating #line comments containing build
host paths references.

[YOCTO #12625]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../glibc/0029-plural_c_no_preprocessor_lines.patch | 21 +
 meta/recipes-core/glibc/glibc_2.27.bb   |  1 +
 2 files changed, 22 insertions(+)
 create mode 100644 
meta/recipes-core/glibc/glibc/0029-plural_c_no_preprocessor_lines.patch

diff --git 
a/meta/recipes-core/glibc/glibc/0029-plural_c_no_preprocessor_lines.patch 
b/meta/recipes-core/glibc/glibc/0029-plural_c_no_preprocessor_lines.patch
new file mode 100644
index 000..6f03e1c
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0029-plural_c_no_preprocessor_lines.patch
@@ -0,0 +1,21 @@
+Improve reproducibility:
+Do not put any #line preprocessor commands in bison generated files.
+These lines contain absolute paths containing file locations on
+the host build machine.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+diff --git a/intl/Makefile b/intl/Makefile
+index 2219717..a203780 100644
+--- a/intl/Makefile
 b/intl/Makefile
+@@ -151,7 +151,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
+ 
+ CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
+   -D'LOCALE_ALIAS_PATH="$(localedir)"'
+-BISONFLAGS = --yacc --name-prefix=__gettext --output
++BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
+ 
+ $(inst_localedir)/locale.alias: locale.alias $(+force)
+   $(do-install)
diff --git a/meta/recipes-core/glibc/glibc_2.27.bb 
b/meta/recipes-core/glibc/glibc_2.27.bb
index 827857d..f626467 100644
--- a/meta/recipes-core/glibc/glibc_2.27.bb
+++ b/meta/recipes-core/glibc/glibc_2.27.bb
@@ -43,6 +43,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0026-reset-dl_load_write_lock-after-forking.patch \

file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \

file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
+   file://0029-plural_c_no_preprocessor_lines.patch \
 "
 
 NATIVESDKFIXES ?= ""
-- 
2.7.4

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


[OE-core] [PATCH] distcc-doc_3.2: improve reproducibility

2018-03-20 Thread Juro Bystricky
Remove timestamps from metadata of gzip compressed files.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/distcc/distcc_3.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/distcc/distcc_3.2.bb 
b/meta/recipes-devtools/distcc/distcc_3.2.bb
index b6da65a..a634570 100644
--- a/meta/recipes-devtools/distcc/distcc_3.2.bb
+++ b/meta/recipes-devtools/distcc/distcc_3.2.bb
@@ -41,7 +41,9 @@ INITSCRIPT_NAME = "distcc"
 SYSTEMD_PACKAGES = "${PN}"
 SYSTEMD_SERVICE_${PN} = "distcc.service"
 
-do_install_append() {
+do_install() {
+# Improve reproducibility: compress w/o timestamps
+oe_runmake 'DESTDIR=${D}'  "GZIP_BIN=gzip -n" install
 install -d ${D}${sysconfdir}/init.d/
 install -d ${D}${sysconfdir}/default
 install -m 0755 ${WORKDIR}/distcc ${D}${sysconfdir}/init.d/
-- 
2.7.4

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


[OE-core] [PATCH] libical-dev_2.0: improve reproducibility

2018-03-20 Thread Juro Bystricky
Remove build host references from distributed files.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-support/libical/libical_2.0.0.bb | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-support/libical/libical_2.0.0.bb 
b/meta/recipes-support/libical/libical_2.0.0.bb
index dcc21cc..daa47ab 100644
--- a/meta/recipes-support/libical/libical_2.0.0.bb
+++ b/meta/recipes-support/libical/libical_2.0.0.bb
@@ -17,3 +17,10 @@ SRC_URI[sha256sum] = 
"654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf2
 UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases;
 
 inherit cmake pkgconfig
+
+do_install_append_class-target () {
+# Remove build host references
+sed -i \
+   -e 's,${STAGING_LIBDIR},${libdir},g' \
+   ${D}${libdir}/cmake/LibIcal/LibIcalTargets-noconfig.cmake
+}
-- 
2.7.4

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


[OE-core] [PATCH v5] reproducible_build.bbclass: support for binary reproducibility

2018-03-20 Thread Juro Bystricky
Setup environment for builds requiring binary reproducibility.
Determine and export SOURCE_DATE_EPOCH per each recipe.
This is a crucial step to achieve binary reproducibility.
The value for this variable (timestamp) is obtained after source code for
a recipe has been unpacked, but before it is patched. If the code sources
come from a GIT repo, we get the timestamp from the top commit. (GIT repo
does not preserve file mktime timestamps). Otherwise, if GIT repo is not
present, we try to get mtime from known files such as NEWS, ChangeLog, etc.
If this also fails, we go through all files and get the timestamp from the
youngest one. We create an individual timestamp for each recipe.
The timestamp is stored in the file '__source_date_epoch.txt' (in the folder
source-date-epoch_). Later on, each task reads this file and sets
the exported value of SOURCE_DATE_EPOCH to the value found in the file.

Uasge:

INHERIT += "reproducible_build"

[YOCTO#11178]
[YOCTO#11179]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/reproducible_build.bbclass | 150 
 1 file changed, 150 insertions(+)
 create mode 100644 meta/classes/reproducible_build.bbclass

diff --git a/meta/classes/reproducible_build.bbclass 
b/meta/classes/reproducible_build.bbclass
new file mode 100644
index 000..2df8053
--- /dev/null
+++ b/meta/classes/reproducible_build.bbclass
@@ -0,0 +1,150 @@
+#
+# reproducible_build.bbclass
+#
+# This bbclass is mainly responsible to determine SOURCE_DATE_EPOCH on a per 
recipe base.
+# We need to set a recipe specific SOURCE_DATE_EPOCH in each recipe 
environment for various tasks.
+# One way would be to modify all recipes one-by-one to specify 
SOURCE_DATE_EPOCH explicitly, 
+# but that is not realistic as there are hundreds (probably thousands) of 
recipes in various meta-layers.
+# Therefore we do it this class. 
+# After sources are unpacked but before they are patched, we try to determine 
the value for SOURCE_DATE_EPOCH.
+#
+# There are 4 ways to determine SOURCE_DATE_EPOCH:
+#
+# 1. Use value from __source_date_epoch.txt file if this file exists. 
+#This file was most likely created in the previous build by one of the 
following methods 2,3,4. 
+#In principle, it could actually provided by a recipe via SRC_URI
+#
+# If the file does not exist, first try to determine the value for 
SOURCE_DATE_EPOCH:
+#
+# 2. If we detected a folder .git, use .git last commit date timestamp, as git 
does not allow checking out
+#files and preserving their timestamps.
+#
+# 3. Use the mtime of "known" files such as NEWS, CHANGLELOG, ...
+#This will work fine for any well kept repository distributed via tarballs.
+#
+# 4. If the above steps fail, we need to check all package source files and 
use the youngest file of the source tree.
+#
+# Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the 
recipe ${WORKDIR}/source_date_epoch folder
+# in a text file "__source_date_epoch.txt'. If this file is found by other 
recipe task, the value is exported in
+# the SOURCE_DATE_EPOCH variable in the task environment. This is done in an 
anonymous python function, 
+# so SOURCE_DATE_EPOCH is guaranteed to exist for all tasks the may use it 
(do_configure, do_compile, do_package, ...)
+
+BUILD_REPRODUCIBLE_BINARIES ??= '1'
+inherit ${@oe.utils.ifelse(d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1', 
'reproducible_build_simple', '')}
+
+SDE_DIR ="${WORKDIR}/source-date-epoch"
+SDE_FILE = "${SDE_DIR}/__source_date_epoch.txt"
+
+SSTATETASKS += "do_deploy_source_date_epoch"
+
+do_deploy_source_date_epoch () {
+echo "Deploying SDE to ${SDE_DIR}."
+}
+
+python do_deploy_source_date_epoch_setscene () {
+sstate_setscene(d)
+}
+
+do_deploy_source_date_epoch[dirs] = "${SDE_DIR}"
+do_deploy_source_date_epoch[sstate-plaindirs] = "${SDE_DIR}"
+addtask do_deploy_source_date_epoch_setscene
+addtask do_deploy_source_date_epoch before do_configure after do_patch
+
+def get_source_date_epoch_known_files(d, path):
+source_date_epoch = 0
+known_files = set(["NEWS", "ChangeLog", "Changelog", "CHANGES"])
+for file in known_files:
+filepath = os.path.join(path,file)
+if os.path.isfile(filepath):
+mtime = int(os.path.getmtime(filepath))
+# There may be more than one "known_file" present, if so, use the 
youngest one
+if mtime > source_date_epoch:
+source_date_epoch = mtime
+return source_date_epoch
+
+def find_git_folder(path):
+exclude = set(["temp", "license-destdir", "patches", 
"recipe-sysroot-native", "recipe-sysroot", "pseudo", "build", "image", 
"sysroot-destdir"])
+for root, dirs, files in os.walk(path, topdown=True):
+dirs[:]

[OE-core] [rocko][PATCH] gcc6: Patch to fix broken gcc-sanitizers build

2018-03-13 Thread Juro Bystricky
Backport a patch to fix errors such as:
error: aggregate 'sigaltstack handler_stack' has incomplete type and cannot be 
defined

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/gcc/gcc-6.4.inc  |  1 +
 .../gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch | 90 ++
 2 files changed, 91 insertions(+)
 create mode 100644 
meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch

diff --git a/meta/recipes-devtools/gcc/gcc-6.4.inc 
b/meta/recipes-devtools/gcc/gcc-6.4.inc
index a2430a9..42eabef 100644
--- a/meta/recipes-devtools/gcc/gcc-6.4.inc
+++ b/meta/recipes-devtools/gcc/gcc-6.4.inc
@@ -93,6 +93,7 @@ BACKPORTS = "\

file://0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch \
file://0011-i386-Update-mfunction-return-for-return-with-pop.patch \
file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \
+   file://0013-gcc-sanitizers.patch \
 "
 
 SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232"
diff --git 
a/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch 
b/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
new file mode 100644
index 000..47bcd8e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.4/backport/0013-gcc-sanitizers.patch
@@ -0,0 +1,90 @@
+From 0fa7102d76376b27ae4bbc10848600aac6ed71d2 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 17 Jul 2017 19:41:08 +
+Subject: [PATCH]   Backported from mainline2017-07-14  Jakub
+ Jelinek  <ja...@redhat.com>
+
+   PR sanitizer/81066
+   * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
+   * sanitizer_common/sanitizer_linux.cc: Likewise.
+   * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
+   * tsan/tsan_platform_linux.cc: Likewise.
+
+[Romain cherry-pick on gcc-6-branch from gcc-7-branch]
+Signed-off-by: Romain Naour <romain.na...@gmail.com>
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 
138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+---
+ libsanitizer/sanitizer_common/sanitizer_linux.cc  | 3 +--
+ libsanitizer/sanitizer_common/sanitizer_linux.h   | 4 +---
+ libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
+ libsanitizer/tsan/tsan_platform_linux.cc  | 2 +-
+ 4 files changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc 
b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+index 2cefa20..223d9c6 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
 b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr 
arg4, uptr arg5) {
+ }
+ #endif
+ 
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+- struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
+ }
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h 
b/libsanitizer/sanitizer_common/sanitizer_linux.h
+index 4497702..1594058 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
 b/libsanitizer/sanitizer_common/sanitizer_linux.h
+@@ -19,7 +19,6 @@
+ #include "sanitizer_platform_limits_posix.h"
+ 
+ struct link_map;  // Opaque type returned by dlopen().
+-struct sigaltstack;
+ 
+ namespace __sanitizer {
+ // Dirent structure for getdents(). Note that this structure is different from
+@@ -28,8 +27,7 @@ struct linux_dirent;
+ 
+ // Syscall wrappers.
+ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int 
count);
+-uptr internal_sigaltstack(const struct sigaltstack* ss,
+-  struct sigaltstack* oss);
++uptr internal_sigaltstack(const void* ss, void* oss);
+ uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
+ __sanitizer_sigset_t *oldset);
+ void internal_sigfillset(__sanitizer_sigset_t *set);
+diff --git 
a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 
b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+index c919e4f..014162af 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
 b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+@@ -267,7 +267,7 @@ static int TracerThread(void* argument) {
+ 
+   // Alternate stack for signal handling.
+   InternalScopedBuffer handler_stack_memory(kHandlerStackSize);
+-  struct sigaltstack handler_stack;
++  stack_t handler_stack;
+   internal_memset(_stack, 0, sizeof(handler_stack));
+   handler_stack.ss_sp = handler_stack_memory.data();
+   handler_stack.

[OE-core] [PATCH] openssl_1.0.2n: improve reproducibility

2018-03-10 Thread Juro Bystricky
Improve reproducible build of:

openssl-staticdev
openssl-dbg
libcrypto

There are two main causes that prevent reproducible build, both related to
the generated file "buildinf.h":

1. "buildinf.h" contains build host CFLAGS, containing various build
   host references.  We need to pass sanitized CFLAGS to the script
   generating this file ("mkbuildinf.pl". )

2. We also need to modify the script "mkbuildinf.pl" itsel in order to
   generate a build timestamp based on SOURCE_DATE_EPOCH, if present in
   the environment.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../openssl-1.0.2n/reproducible-cflags.patch| 20 
 .../openssl-1.0.2n/reproducible-mkbuildinf.patch| 21 +
 meta/recipes-connectivity/openssl/openssl10.inc |  3 +++
 meta/recipes-connectivity/openssl/openssl_1.0.2n.bb |  5 +
 4 files changed, 49 insertions(+)
 create mode 100644 
meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-cflags.patch
 create mode 100644 
meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch

diff --git 
a/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-cflags.patch 
b/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-cflags.patch
new file mode 100644
index 000..2803cb0
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-cflags.patch
@@ -0,0 +1,20 @@
+Allow passing custom c-flags to mkbuildinf.pl in order to pass
+flags without any build host references
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+--- Makefile   2018-03-06 14:50:18.342138147 -0800
 Makefile   2018-03-06 15:24:04.794239071 -0800
+--- a/crypto/Makefile
 b/crypto/Makefile
+@@ -55,7 +55,7 @@
+ all: shared
+ 
+ buildinf.h: ../Makefile
+-  $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" 
>buildinf.h
++  $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC_INFO)" "$(PLATFORM)" >buildinf.h
+ 
+ x86cpuid.s:   x86cpuid.pl perlasm/x86asm.pl
+   $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
diff --git 
a/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch
 
b/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch
new file mode 100644
index 000..b556731
--- /dev/null
+++ 
b/meta/recipes-connectivity/openssl/openssl-1.0.2n/reproducible-mkbuildinf.patch
@@ -0,0 +1,21 @@
+If SOURCE_DATE_EPOCH is present in the environment, use it as build date.
+Also make sure to use UTC time.
+
+Upstream-Status: Backport [ 
https://github.com/openssl/openssl/blob/master/util/mkbuildinf.pl ]
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+--- mkbuildinf.pl  2018-03-06 14:20:09.438048058 -0800
 mkbuildinf.pl  2018-03-06 14:19:20.722045632 -0800
+--- a/util/mkbuildinf.pl
 b/util/mkbuildinf.pl
+@@ -3,7 +3,8 @@
+ my ($cflags, $platform) = @ARGV;
+ 
+ $cflags = "compiler: $cflags";
+-$date = localtime();
++my $date = gmtime($ENV{'SOURCE_DATE_EPOCH'} || time()) . " UTC";
++
+ print <<"END_OUTPUT";
+ #ifndef MK1MF_BUILD
+ /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */
diff --git a/meta/recipes-connectivity/openssl/openssl10.inc 
b/meta/recipes-connectivity/openssl/openssl10.inc
index 02a0e16..0598195 100644
--- a/meta/recipes-connectivity/openssl/openssl10.inc
+++ b/meta/recipes-connectivity/openssl/openssl10.inc
@@ -162,6 +162,9 @@ do_configure () {
 
 do_compile_prepend_class-target () {
 sed -i 's/\((OPENSSL=\)".*"/\1"openssl"/' Makefile
+oe_runmake depend
+   cc_sanitized=`echo "${CC} ${CFLAG}" | sed -e 
's,--sysroot=${STAGING_DIR_TARGET},,g' -e 's|${DEBUG_PREFIX_MAP}||g'`
+   oe_runmake CC_INFO="${cc_sanitized}"
 }
 
 do_compile () {
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb 
b/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb
index 32444c6..f07289d 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb
@@ -43,6 +43,11 @@ SRC_URI += "file://find.pl;subdir=openssl-${PV}/util/ \
file://0001-Fix-build-with-clang-using-external-assembler.patch \
file://0001-openssl-force-soft-link-to-avoid-rare-race.patch \
"
+
+SRC_URI_append_class-target = "\
+   file://reproducible-cflags.patch \
+   file://reproducible-mkbuildinf.patch \
+   "
 SRC_URI[md5sum] = "13bdc1b1d1ff39b6fd42a255e74676a4"
 SRC_URI[sha256sum] = 
"370babb75f278c39e0c50e8c4e7493bc0f18db6867478341a832a982fd15a8fe"
 
-- 
2.7.4

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


[OE-core] [PATCH] dbus-test-ptest: improve reproducibility

2018-03-10 Thread Juro Bystricky
Remove build host references from additional files.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/dbus/dbus-test_1.12.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/dbus/dbus-test_1.12.2.bb 
b/meta/recipes-core/dbus/dbus-test_1.12.2.bb
index 26556ed..dce047a 100644
--- a/meta/recipes-core/dbus/dbus-test_1.12.2.bb
+++ b/meta/recipes-core/dbus/dbus-test_1.12.2.bb
@@ -71,7 +71,7 @@ do_install_ptest() {
cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
 
# Remove build host references...
-   find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf 
\) -type f -exec \
+   find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf 
-o -name "*.aaprofile" \) -type f -exec \
sed -i \
 -e 's:${B}:${PTEST_PATH}:g' \
 {} +
-- 
2.7.4

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


[OE-core] [PATCH] reproducible_build_simple.bbclass: simple environment for reproducible binaries

2018-03-10 Thread Juro Bystricky
Export environmental variables needed for binary reproducibility with 
consistent values.

This class can be used either directly via:
INHERIT += "reproducible_build_simple"

or can be inherited by a more complex/complete bbclass, for example a bblass 
which
will crack SOURCE_DATE_EPOCH for each recipe.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/reproducible_build_simple.bbclass | 11 +++
 1 file changed, 11 insertions(+)
 create mode 100644 meta/classes/reproducible_build_simple.bbclass

diff --git a/meta/classes/reproducible_build_simple.bbclass 
b/meta/classes/reproducible_build_simple.bbclass
new file mode 100644
index 000..dd11cd9
--- /dev/null
+++ b/meta/classes/reproducible_build_simple.bbclass
@@ -0,0 +1,11 @@
+# Setup default environment for reproducible builds.
+
+BUILD_REPRODUCIBLE_BINARIES = "1"
+
+export PYTHONHASHSEED = "0"
+export PERL_HASH_SEED = "0"
+export TZ = 'UTC'
+export SOURCE_DATE_EPOCH ??= "1520598896"
+
+REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
+
-- 
2.7.4

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


[OE-core] [PATCH] BUILD_REPRODUCIBLE_BINARIES: use expanded value

2018-03-10 Thread Juro Bystricky
Replace the occurences of BUILD_REPRODUCIBLE_BINARIES with expanded
values ${BUILD_REPRODUCIBLE_BINARIES} so the variable does not need to be
exported.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/image-prelink.bbclass| 2 +-
 meta/classes/image.bbclass| 2 +-
 meta/classes/kernel.bbclass   | 2 +-
 meta/recipes-core/busybox/busybox.inc | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/classes/image-prelink.bbclass 
b/meta/classes/image-prelink.bbclass
index f3bb68b..6a8afa8 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -36,7 +36,7 @@ prelink_image () {
dynamic_loader=$(linuxloader)
 
# prelink!
-   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+   if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
bbnote " prelink: BUILD_REPRODUCIBLE_BINARIES..."
if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct `
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index ce78c43..1636eed 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -664,7 +664,7 @@ ROOTFS_PREPROCESS_COMMAND += 
"${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge'
 POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 
'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
 
 reproducible_final_image_task () {
-if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
 if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
 REPRODUCIBLE_TIMESTAMP_ROOTFS=`git log -1 --pretty=%ct`
 fi
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 321c0a4..d4ebc25 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -279,7 +279,7 @@ get_cc_option () {
 
 kernel_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
-   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+   if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
# kernel sources do not use do_unpack, so SOURCE_DATE_EPOCH may 
not
# be set
if [ "$SOURCE_DATE_EPOCH" = "0" ]; then
diff --git a/meta/recipes-core/busybox/busybox.inc 
b/meta/recipes-core/busybox/busybox.inc
index ac6d7ca..d1675c3 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -106,7 +106,7 @@ python () {
 }
 
 do_prepare_config () {
-   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+   if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
export KCONFIG_NOTIMESTAMP=1
fi
sed -e '/CONFIG_STATIC/d' \
@@ -146,7 +146,7 @@ do_configure () {
 
 do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
-   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+   if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
export KCONFIG_NOTIMESTAMP=1
fi
if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep 
"CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then
-- 
2.7.4

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


[OE-core] [morty][PATCH v2] gcc6.4 upgrade

2018-03-09 Thread Juro Bystricky
Second attempt. Added some more patches, mostly ARM specific.
AFAIK this patchset passed all x86-64 tests.

I also did some limited testing with meta-raspberrypi and musl library.

(raspberrypi did not build with v1 of the patchset)


Juro Bystricky (1):
  gcc6: Upgrade to 6.4.0 (latest stable series release)

 meta/conf/distro/include/tcmode-default.inc|2 +-
 ...et-71056-Don-t-use-vectorized-builtins-wh.patch |   92 -
 .../gcc/gcc-6.2/CVE-2016-4490.patch|  290 ---
 .../gcc/gcc-6.2/ubsan-fix-check-empty-string.patch |   28 -
 .../gcc/{gcc-6.2.inc => gcc-6.4.inc}   |   31 +-
 .../0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch |0
 .../{gcc-6.2 => gcc-6.4}/0002-uclibc-conf.patch|0
 .../0003-gcc-uclibc-locale-ctype_touplow_t.patch   |0
 .../{gcc-6.2 => gcc-6.4}/0004-uclibc-locale.patch  |0
 .../0005-uclibc-locale-no__x.patch |0
 .../0006-uclibc-locale-wchar_fix.patch |0
 .../0007-uclibc-locale-update.patch|0
 .../0008-missing-execinfo_h.patch  |0
 .../{gcc-6.2 => gcc-6.4}/0009-c99-snprintf.patch   |0
 .../0010-gcc-poison-system-directories.patch   |0
 .../0011-gcc-poison-dir-extend.patch   |0
 .../0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch |0
 .../0013-64-bit-multilib-hack.patch|0
 .../0014-optional-libstdc.patch|0
 ...0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch |0
 .../0016-COLLECT_GCC_OPTIONS.patch |0
 ...efaults.h-in-B-instead-of-S-and-t-oe-in-B.patch |0
 .../0018-fortran-cross-compile-hack.patch  |0
 .../0019-cpp-honor-sysroot.patch   |0
 .../0020-MIPS64-Default-to-N64-ABI.patch   |0
 ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch |0
 ...0022-gcc-Fix-argument-list-too-long-error.patch |0
 .../{gcc-6.2 => gcc-6.4}/0023-Disable-sdt.patch|0
 .../gcc/{gcc-6.2 => gcc-6.4}/0024-libtool.patch|0
 ...4-pass-fix-v4bx-to-linker-to-support-EABI.patch |0
 ...tilib-config-files-from-B-instead-of-usin.patch |0
 ...-libdir-from-.la-which-usually-points-to-.patch |0
 .../gcc/{gcc-6.2 => gcc-6.4}/0028-export-CPP.patch |0
 ...AltiVec-generation-on-powepc-linux-target.patch |0
 ...-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch |0
 ...Ensure-target-gcc-headers-can-be-included.patch |0
 ...-t-build-with-disable-dependency-tracking.patch |0
 ...h-host-directory-during-relink-if-inst_pr.patch |0
 ...IBS_DIR-replacement-instead-of-hardcoding.patch |0
 .../0035-aarch64-Add-support-for-musl-ldso.patch   |0
 ...ibcc1-fix-libcc1-s-install-path-and-rpath.patch |0
 ...-handle-sysroot-support-for-nativesdk-gcc.patch |0
 ...et-sysroot-gcc-version-specific-dirs-with.patch |0
 ...-various-_FOR_BUILD-and-related-variables.patch |0
 .../0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch|0
 .../{gcc-6.2 => gcc-6.4}/0041-ssp_nonshared.patch  |0
 ...c-libcpp-support-ffile-prefix-map-old-new.patch |0
 ...ug-prefix-map-to-replace-ffile-prefix-map.patch |0
 ...-fdebug-prefix-map-support-to-remap-sourc.patch |0
 ...45-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch |0
 ...bgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch |0
 ...e-alias-for-__cpu_indicator_init-instead-.patch |0
 .../gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch |   91 +
 .../gcc/gcc-6.4/0054_all_nopie-all-flags.patch |   22 +
 .../gcc/gcc-6.4/0055-unwind_h-glibc26.patch|  139 ++
 ...5-suppress-32-bit-aligned-ldrd-strd-peeph.patch |  194 ++
 ...001-enable-FL_LPAE-flag-for-armv7ve-cores.patch |   67 +
 ...ove-struct-ix86_frame-to-machine_function.patch |  247 +++
 ...ference-of-struct-ix86_frame-to-avoid-cop.patch |   74 +
 ...nst-reference-of-struct-ix86_frame-to-avo.patch |  131 ++
 .../backport/0004-x86-Add-mindirect-branch.patch   | 2154 
 .../backport/0005-x86-Add-mfunction-return.patch   | 1570 ++
 .../0006-x86-Add-mindirect-branch-register.patch   |  946 +
 .../0007-x86-Add-V-register-operand-modifier.patch |  139 ++
 ...w-mindirect-branch-mfunction-return-with-.patch |  304 +++
 ...VALID_REGNUM-in-indirect-thunk-processing.patch |  126 ++
 ...INVALID_REGNUM-as-invalid-register-number.patch |   46 +
 ...date-mfunction-return-for-return-with-pop.patch |  453 
 ...-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch | 1004 +
 ...5-suppress-32-bit-aligned-ldrd-strd-peeph.patch |  194 ++
 .../gcc/gcc-6.4/backport/CVE-2016-6131.patch   |  223 ++
 ...s-canadian_6.2.bb => gcc-cross-canadian_6.4.bb} |0
 ...oss-initial_6.2.bb => gcc-cross-initial_6.4.bb} |0
 .../gcc/{gcc-cross_6.2.bb => gcc-cross_6.4.bb} |0
 ...-initial_6.2.bb => gcc-crosssdk-initial_6.4.bb} |0
 .../{gcc-crosssdk_6.2.bb => gcc-crosssdk_6.4.bb}   |0
 .../gcc/{gcc-runtime_6.2.bb => gcc-runtim

[OE-core] [PATCH] e2fsprogs_1.43.8.bb: improve reproducibility

2018-03-02 Thread Juro Bystricky
Various builds of e2fsprogs 1.43.7 package locales which may or may
not have POT-Creation-Date removed. There is no obvious pattern, it
affects different locales each time, the build being non-deterministic.

The root cause was tracked to non-deterministic time stamps (as GIT does
not preserve file mktime), so some "make" rules sometimes fired, sometimes
did not.

The remedy is to explicitly "touch" files that cause non-deterministic build.

[YOCTO #12516]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
index ceaf171..4fa976d 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.8.bb
@@ -25,6 +25,9 @@ EXTRA_OECONF_darwin = "--libdir=${base_libdir} 
--sbindir=${base_sbindir} --enabl
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
 
+do_compile_prepend (){
+   find ${S}/po -type f -name "*.po" -exec touch {} +
+}
 
 do_install () {
oe_runmake 'DESTDIR=${D}' install
-- 
2.7.4

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


[OE-core] [PATCH] libjpeg-turbo: improve reproducibility

2018-03-01 Thread Juro Bystricky
Build date ends up embbedded in binary images, breaking reproducibility
of jpeg-tools and libturbojpeg. To enable reproducible builds, build date can be
specified during configuration, via "--with_build_date=".
If SOURCE_DATE_EPOCH is specified we configure libjpeg-turbo with this value as
build date. Although the build date is a generic string, we keep it in the same
format MMDD.

[YOCTO #12526]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb | 8 
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb 
b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
index 8809f2c..50a5ae0 100644
--- a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
+++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
@@ -40,6 +40,14 @@ EXTRA_OECONF_append_class-target = " 
${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf
 EXTRA_OECONF_append_class-target_powerpc = " 
${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
 EXTRA_OECONF_append_class-target_powerpc64 = " 
${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
 
+def get_build_time(d):
+if d.getVar('SOURCE_DATE_EPOCH') != None:
+import datetime
+return " --with-build-date="+ 
datetime.datetime.fromtimestamp(float(d.getVar('SOURCE_DATE_EPOCH'))).strftime("%Y%m%d")
+return ""
+
+EXTRA_OECONF_append_class-target = "${@get_build_time(d)}"
+
 PACKAGES =+ "jpeg-tools libturbojpeg"
 
 DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to 
access libjpeg functionality.  These tools allow for the compression, 
decompression, transformation and display of JPEG files and benchmarking of the 
libjpeg library."
-- 
2.7.4

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


[OE-core] [PATCH] dbus-test_1.12.2: various fixes

2018-02-27 Thread Juro Bystricky
The result of running dbus-test-ptest was a series of
various segfaults, interpreted as FAILs. This was a direct consequence
of the test suite loading the installed shared library libdbus-1.so, not the
one built along the test suite.

While we normally want to test against the installed libraries, we cannot
do this in this case as the test suite expects a library that is 
configured/compiled
differently from the installed one. We could configure the installed library
identically as the test suite expects, (and there should be no issues), however
this is not desirable for performance reasons.

Hence we need to use the library built along with the test suite.
Of course, running the test suite against its own library does not
test the installed library, however they are both built from the same
sources so that can give us some kind of indication.

The following changes were made:

1. Configure the test library as close as possible to the installed one,
   with some additional configuration options that are needed for testing.
   (Use dbus_1.12.2.bb recipe as a template)
2. Include the shared libraries in the package, use LD_LIBRARY_PATH during
   testing to load them instead of the installed ones.
3. Add a few more tests. (There are still some additional tests built that
   are not used, but they would have to be special-cased).
4. When evaluating the test results, differentiate between "FAIL" and "SKIP"

[YOCTO #10841]
[YOCTO #12277]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/dbus/dbus-test_1.12.2.bb | 30 ++
 meta/recipes-core/dbus/dbus/run-ptest  | 20 +---
 2 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-core/dbus/dbus-test_1.12.2.bb 
b/meta/recipes-core/dbus/dbus-test_1.12.2.bb
index c3891a3..a6a5ca2 100644
--- a/meta/recipes-core/dbus/dbus-test_1.12.2.bb
+++ b/meta/recipes-core/dbus/dbus-test_1.12.2.bb
@@ -34,25 +34,47 @@ EXTRA_OECONF = "--enable-tests \
 --enable-checks \
 --enable-asserts \
 --enable-verbose-mode \
+--enable-largefile \
 --disable-xml-docs \
 --disable-doxygen-docs \
 --disable-libaudit \
---disable-systemd \
---without-systemdsystemunitdir \
 --with-dbus-test-dir=${PTEST_PATH} \
 ${EXTRA_OECONF_X}"
 
+EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd 
--with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd 
--without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x 
--disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[user-session] = "--enable-user-session 
--with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
 do_install() {
 :
 }
 
 do_install_ptest() {
install -d ${D}${PTEST_PATH}/test
-   l="shell printf refs syslog marshal syntax corrupt dbus-daemon 
dbus-daemon-eavesdrop loopback relay"
+   l="shell printf refs syslog marshal syntax corrupt dbus-daemon 
dbus-daemon-eavesdrop loopback relay \
+  variant uid-permissions syntax spawn sd-activation names monitor 
message fdpass "
for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; 
done
+
l="bus bus-system bus-launch-helper"
for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; 
done
-   install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
+
cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+   install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
+
+   install -d ${D}${PTEST_PATH}/test/.libs
+   cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
+
+   # Remove build host references...
+   find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf 
\) -type f -exec \
+   sed -i \
+-e 's:${B}:${PTEST_PATH}:g' \
+{} +
 }
+
 RDEPENDS_${PN}-ptest += "bash"
diff --git a/meta/recipes-core/dbus/dbus/run-ptest 
b/meta/recipes-core/dbus/dbus/run-ptest
index c72d083..8a8970e 100755
--- a/meta/recipes-core/dbus/dbus/run-ptest
+++ b/meta/recipes-core/dbus/dbus/run-ptest
@@ -1,10 +1,24 @@
 #!/bin/sh
 
 output() {
-  if [ $? -eq 0 ]
+  retcode=$?
+  if [ $retcode -eq 0 ]
 then echo "PASS: $i"
-else echo "FAIL: $i"
+  elif [ $retcode -eq 77 ]
+then echo "SKIP: $i"
+  else echo "FAIL: $i"
   fi
 }
 
-for i in `ls test/test-*`; do ./$i ./test/data DBUS_TEST_HOMEDIR=./tes

[OE-core] [PATCH] autoconf-doc: improve reproducibility

2018-02-06 Thread Juro Bystricky
autoconf-doc package contains autoconf.info.
This file contains date when this file was created, i.e:

 "This manual (31 January 2018) .."

Therefore, two builds done on two different days will show different dates for
otherwise identical files, hence breaking reproducibility.
The date is obtained from mtime of "autoconf.texi", unfortunately we patch this
file and change the mtime as a consequence.
The date serves as a document version identifier, so preserving the original 
mtime of
"autoconf.texi" would be misleading, as we actually did modify the document on 
purpose.
The fix is to set the mtime of "autoconf.texi" based on SOURCE_DATE_EPOCH.

[YOCTO #12524]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/autoconf/autoconf.inc | 9 +
 1 file changed, 9 insertions(+)

diff --git a/meta/recipes-devtools/autoconf/autoconf.inc 
b/meta/recipes-devtools/autoconf/autoconf.inc
index df81bc6..f5156f7 100644
--- a/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/meta/recipes-devtools/autoconf/autoconf.inc
@@ -48,6 +48,15 @@ do_configure() {
oe_runconf
 }
 
+do_compile_prepend_class-target() {
+   # mtime of autoconf.texi will end up as embedded date in autoconf.info.
+   # We patch autoconf.texi, so that modifies mtime each time.
+   # To ensure reproducibility, set the mtime to SOURCE_DATE_EPOCH
+   if [ -n "${SOURCE_DATE_EPOCH}" ]; then
+   touch -d @${SOURCE_DATE_EPOCH} ${S}/doc/autoconf.texi
+   fi
+}
+
 do_install_append() {
 rm -rf ${D}${datadir}/emacs
 }
-- 
2.7.4

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


[OE-core] [PATCH] glibc: improve reproducibility with multilib

2018-02-05 Thread Juro Bystricky
Multilib builds specify several loaders which will end up embedded in
some binaries or script files. To support reproducible builds, we must
ensure the loaders are always in deterministic order.

[YOCTO #2655]
[YOCTO #12478]
[YOCTO #12480]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/glibc/glibc-ld.inc  | 4 ++--
 meta/recipes-core/glibc/glibc_2.26.bb | 8 +++-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-ld.inc 
b/meta/recipes-core/glibc/glibc-ld.inc
index c1d635d..607b27c 100644
--- a/meta/recipes-core/glibc/glibc-ld.inc
+++ b/meta/recipes-core/glibc/glibc-ld.inc
@@ -38,8 +38,8 @@ def glibc_dl_info(d):
 overrides = localdata.getVar("OVERRIDES", False) + 
":virtclass-multilib-" + item
 localdata.setVar("OVERRIDES", overrides)
 ld_append_if_tune_exists(localdata, infos, ld_info_all)
-infos['ldconfig'] = ','.join(infos['ldconfig'])
-infos['lddrewrite'] = ' '.join(infos['lddrewrite'])
+infos['ldconfig'] = ','.join(sorted(infos['ldconfig']))
+infos['lddrewrite'] = ' '.join(sorted(infos['lddrewrite']))
 return infos
 
 EGLIBC_KNOWN_INTERPRETER_NAMES = "${@glibc_dl_info(d)['ldconfig']}"
diff --git a/meta/recipes-core/glibc/glibc_2.26.bb 
b/meta/recipes-core/glibc/glibc_2.26.bb
index 7eb56b3..df520bd 100644
--- a/meta/recipes-core/glibc/glibc_2.26.bb
+++ b/meta/recipes-core/glibc/glibc_2.26.bb
@@ -133,12 +133,10 @@ do_compile () {
if [ -n "${RTLDLIST}" ]
then
prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 
's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
-   if [ "${prevrtld}" != "${RTLDLIST}" ]
-   then
-   sed -i ${B}/elf/ldd -e 
"s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
-   fi
+   # remove duplicate entries
+   newrtld=`echo "${prevrtld} ${RTLDLIST}" | xargs -n1 | sort -u | 
xargs`
+   sed -i ${B}/elf/ldd -e 
"s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#"
fi
-
 }
 
 # Use the host locale archive when built for nativesdk so that we don't need to
-- 
2.7.4

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


[OE-core] [PATCH] opkg-build: differentiate between compressorargs and zipargs

2018-02-05 Thread Juro Bystricky
control.tar.gz is always compressed with gzip.
If data.tar is compressed by a compressor other than gzip, control.tar.gz
may end up compressed with timestamp in the compressed image header.
This would result in packages that are not binary reproducible.

[YOCTO #11242]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 opkg-build | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/opkg-build b/opkg-build
index 7bfdd99..318f308 100755
--- a/opkg-build
+++ b/opkg-build
@@ -149,7 +149,8 @@ outer=ar
 noclean=0
 opkext=0
 compressor=gzip
-compressorargs="-9n"
+zipargs="-9n"
+compressorargs=""
 
 # Determine if tar supports the --format argument by checking the help output.
 #
@@ -223,13 +224,12 @@ done
 
 cext=$(compressor_ext $compressor)
 
+# pgzip requires -T to avoid timestamps on the gzip archive
+if gzip --help 2>&1 | grep -- "-T" > /dev/null; then
+   zipargs="-9nT"
+fi
 if [ $compressor = "gzip" ] ; then
-   # pgzip requires -T to avoid timestamps on the gzip archive
-   if gzip --help 2>&1 | grep -- "-T" > /dev/null; then
-   compressorargs="-9nT"
-   fi
-else
-   compressorargs=""
+   compressorargs=$zipargs
 fi
 
 shift $(($OPTIND - 1))
@@ -281,7 +281,7 @@ build_date="$(date --utc 
--date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
 
 echo $CONTROL > $tmp_dir/tarX
 ( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX 
-c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
-( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c 
$tarformat . | gzip $compressorargs > $tmp_dir/control.tar.gz )
+( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c 
$tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
 rm $tmp_dir/tarX
 
 echo "2.0" > $tmp_dir/debian-binary
@@ -296,7 +296,7 @@ rm -f $pkg_file
 if [ "$outer" = "ar" ] ; then
   ( cd $tmp_dir && ar -crf $pkg_file ./debian-binary ./control.tar.gz 
./data.tar.$cext )
 else
-  ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat 
./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $compressorargs > 
$pkg_file )
+  ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat 
./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
 fi
 
 rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
-- 
2.7.4

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


[OE-core] [PATCH] sanity.bbclass: modified error message

2018-01-30 Thread Juro Bystricky
Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/sanity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index d0f507e0..6716985 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -709,7 +709,7 @@ def sanity_check_locale(d):
 try:
 locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
 except locale.Error:
-raise_sanity_error("You system needs to support the en_US.UTF-8 
locale.", d)
+raise_sanity_error("Your system needs to support the en_US.UTF-8 
locale.", d)
 
 def check_sanity_everybuild(status, d):
 import os, stat
-- 
2.7.4

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


[OE-core] [PATCH 0/3] Unused patch files?

2018-01-29 Thread Juro Bystricky
There seem to be some patch files present in the repository  that are not 
referenced anywhere anymore.


Juro Bystricky (3):
  tzcode: remove unused patch files
  kexec-tools: remove unused patch file
  libcrypt: remove unused patch file

 .../files/0001-Fix-Makefile-quoting-bug.patch  | 174 -
 .../files/0002-Port-zdump-to-C90-snprintf.patch| 115 ---
 .../kexec/kexec-tools/kexec-aarch64.patch  | 801 -
 ...g-AArch32-CE-implementations-when-target-.patch |  96 ---
 4 files changed, 1186 deletions(-)
 delete mode 100644 
meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch
 delete mode 100644 
meta/recipes-extended/tzcode/files/0002-Port-zdump-to-C90-snprintf.patch
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
 delete mode 100644 
meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch

-- 
2.7.4

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


[OE-core] [PATCH 3/3] libcrypt: remove unused patch file

2018-01-29 Thread Juro Bystricky
Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 ...g-AArch32-CE-implementations-when-target-.patch | 96 --
 1 file changed, 96 deletions(-)
 delete mode 100644 
meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch

diff --git 
a/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
 
b/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
deleted file mode 100644
index 65b9fd4..000
--- 
a/meta/recipes-support/libgcrypt/files/0006-Fix-building-AArch32-CE-implementations-when-target-.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 4a7aa30ae9f3ce798dd886c2f2d4164c43027748 Mon Sep 17 00:00:00 2001
-From: Jussi Kivilinna <jussi.kivili...@iki.fi>
-Date: Sat, 29 Jul 2017 14:34:23 +0300
-Subject: [PATCH] Fix building AArch32 CE implementations when target is ARMv6
- arch
-
-* cipher/cipher-gcm-armv8-aarch32-ce.S: Select ARMv8 architecure.
-* cipher/rijndael-armv8-aarch32-ce.S: Ditto.
-* cipher/sha1-armv8-aarch32-ce.S: Ditto.
-* cipher/sha256-armv8-aarch32-ce.S: Ditto.
-* configure.ac (gcry_cv_gcc_inline_asm_aarch32_crypto): Ditto.
---
-
-Raspbian distribution defaults to ARMv6 architecture thus 'rbit'
-instruction is not available with default compiler flags. Patch
-adds explicit architecture selection for ARMv8 to enable 'rbit'
-usage with ARMv8/AArch32-CE assembly implementations of SHA,
-GHASH and AES.
-
-Reported-by: Chris Horry <zer...@gmail.com>
-Signed-off-by: Jussi Kivilinna <jussi.kivili...@iki.fi>
-
-Signed-off-by: Paul Barker <pbar...@toganlabs.com>
-Upstream-Status: Backport
-

- cipher/cipher-gcm-armv8-aarch32-ce.S | 1 +
- cipher/rijndael-armv8-aarch32-ce.S   | 1 +
- cipher/sha1-armv8-aarch32-ce.S   | 1 +
- cipher/sha256-armv8-aarch32-ce.S | 1 +
- configure.ac | 1 +
- 5 files changed, 5 insertions(+)
-
-diff --git a/cipher/cipher-gcm-armv8-aarch32-ce.S 
b/cipher/cipher-gcm-armv8-aarch32-ce.S
-index b61a7871..1de66a16 100644
 a/cipher/cipher-gcm-armv8-aarch32-ce.S
-+++ b/cipher/cipher-gcm-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
- defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
- 
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
- 
-diff --git a/cipher/rijndael-armv8-aarch32-ce.S 
b/cipher/rijndael-armv8-aarch32-ce.S
-index f375f673..5c8fa3c0 100644
 a/cipher/rijndael-armv8-aarch32-ce.S
-+++ b/cipher/rijndael-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
- defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO)
- 
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
- 
-diff --git a/cipher/sha1-armv8-aarch32-ce.S b/cipher/sha1-armv8-aarch32-ce.S
-index b0bc5ffe..bf2b233b 100644
 a/cipher/sha1-armv8-aarch32-ce.S
-+++ b/cipher/sha1-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
- defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA1)
- 
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
- 
-diff --git a/cipher/sha256-armv8-aarch32-ce.S 
b/cipher/sha256-armv8-aarch32-ce.S
-index 2041a237..2b17ab1b 100644
 a/cipher/sha256-armv8-aarch32-ce.S
-+++ b/cipher/sha256-armv8-aarch32-ce.S
-@@ -24,6 +24,7 @@
- defined(HAVE_GCC_INLINE_ASM_AARCH32_CRYPTO) && defined(USE_SHA256)
- 
- .syntax unified
-+.arch armv8-a
- .fpu crypto-neon-fp-armv8
- .arm
- 
-diff --git a/configure.ac b/configure.ac
-index 27faa7f4..66e7cd67 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -1619,6 +1619,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports 
AArch32 Crypto Extension i
-   AC_COMPILE_IFELSE([AC_LANG_SOURCE(
-   [[__asm__(
- ".syntax unified\n\t"
-+".arch armv8-a\n\t"
- ".arm\n\t"
- ".fpu crypto-neon-fp-armv8\n\t"
- 
--- 
-2.11.0
-
-- 
2.7.4

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


[OE-core] [PATCH 2/3] kexec-tools: remove unused patch file

2018-01-29 Thread Juro Bystricky
Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../kexec/kexec-tools/kexec-aarch64.patch  | 801 -
 1 file changed, 801 deletions(-)
 delete mode 100644 meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch

diff --git a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch 
b/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
deleted file mode 100644
index b03f582..000
--- a/meta/recipes-kernel/kexec/kexec-tools/kexec-aarch64.patch
+++ /dev/null
@@ -1,801 +0,0 @@
-From: Geoff Levand <ge...@infradead.org>
-Date: Mon, 15 Jul 2013 23:32:36 + (-0700)
-Subject: Add arm64 support
-X-Git-Url: 
https://git.linaro.org/gitweb?p=people%2Fgeoff%2Fkexec-tools.git;a=commitdiff_plain;h=fbf5ac6c2c70ec0f6da2b9ff563e573999752c01
-
-Add arm64 support
-
-Signed-off-by: Geoff Levand <ge...@infradead.org>
-
-Get patch from:
-https://fedorapeople.org/~hrw/aarch64/for-fedora/kexec-aarch64.patch
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.k...@windriver.com>

-

- configure.ac|3 
- kexec/Makefile  |1 
- kexec/arch/arm64/Makefile   |   13 +
- kexec/arch/arm64/crashdump-arm64.c  |  305 

- kexec/arch/arm64/include/arch/options.h |   26 ++
- kexec/arch/arm64/kexec-arm64.c  |  177 ++
- kexec/arch/arm64/kexec-arm64.h  |   20 ++
- kexec/arch/arm64/kexec-elf-arm64.c  |  114 +++
- kexec/kexec-syscall.h   |9 
- kexec/kexec.c   |2 
- purgatory/arch/arm64/Makefile   |7 
- 11 files changed, 675 insertions(+), 2 deletions(-)
-
-Index: kexec-tools-2.0.10/configure.ac
-===
 kexec-tools-2.0.10.orig/configure.ac
-+++ kexec-tools-2.0.10/configure.ac
-@@ -36,6 +36,9 @@ case $target_cpu in
-   ARCH="ppc64"
-   SUBARCH="LE"
-   ;;
-+  aarch64* )
-+  ARCH="arm64"
-+  ;;
-   arm* )
-   ARCH="arm"
-   ;;
-Index: kexec-tools-2.0.10/kexec/Makefile
-===
 kexec-tools-2.0.10.orig/kexec/Makefile
-+++ kexec-tools-2.0.10/kexec/Makefile
-@@ -71,6 +71,7 @@ KEXEC_SRCS   += $($(ARCH)_FS2DT)
- 
- include $(srcdir)/kexec/arch/alpha/Makefile
- include $(srcdir)/kexec/arch/arm/Makefile
-+include $(srcdir)/kexec/arch/arm64/Makefile
- include $(srcdir)/kexec/arch/i386/Makefile
- include $(srcdir)/kexec/arch/ia64/Makefile
- include $(srcdir)/kexec/arch/m68k/Makefile
-Index: kexec-tools-2.0.10/kexec/arch/arm64/Makefile
-===
 /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/Makefile
-@@ -0,0 +1,13 @@
-+
-+arm64_KEXEC_SRCS += \
-+  kexec/arch/arm64/kexec-arm64.c \
-+  kexec/arch/arm64/kexec-elf-arm64.c \
-+  kexec/arch/arm64/crashdump-arm64.c
-+
-+arm64_ARCH_REUSE_INITRD =
-+arm64_ADD_SEGMENT =
-+arm64_VIRT_TO_PHYS =
-+
-+dist += $(arm64_KEXEC_SRCS) \
-+  kexec/arch/arm64/Makefile \
-+  kexec/arch/arm64/kexec-arm64.h
-Index: kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c
-===
 /dev/null
-+++ kexec-tools-2.0.10/kexec/arch/arm64/crashdump-arm64.c
-@@ -0,0 +1,305 @@
-+/*
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation (version 2 of the License).
-+ */
-+
-+#include "../../kexec.h"
-+#include "../../kexec-elf.h"
-+#include "../../crashdump.h"
-+
-+int is_crashkernel_mem_reserved(void)
-+{
-+  return 0;
-+}
-+
-+#if 0
-+/*
-+ * Used to save various memory ranges/regions needed for the captured
-+ * kernel to boot. (lime memmap= option in other archs)
-+ */
-+static struct memory_range crash_memory_ranges[CRASH_MAX_MEMORY_RANGES];
-+struct memory_ranges usablemem_rgns = {
-+.size = 0,
-+.ranges = crash_memory_ranges,
-+};
-+
-+/* memory range reserved for crashkernel */
-+static struct memory_range crash_reserved_mem;
-+
-+static struct crash_elf_info elf_info = {
-+  .class  = ELFCLASS32,
-+  .data   = ELFDATA2LSB,
-+  .machine= EM_ARM,
-+  .page_offset= PAGE_OFFSET,
-+};
-+
-+unsigned long phys_offset;
-+
-+/**
-+ * crash_range_callback() - callback called for each iomem region
-+ * @data: not used
-+ * @nr: not used
-+ * @str: name of the memory region
-+ * @base: start address of the memory region
-+ * @length: size of the memory region
-+ *
-+ * This function is called once for each memory region found in /proc/iomem. 
It
-+ * locates system RAM and crashkernel reserved memory and places these 

[OE-core] [PATCH 1/3] tzcode: remove unused patch files

2018-01-29 Thread Juro Bystricky
Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../files/0001-Fix-Makefile-quoting-bug.patch  | 174 -
 .../files/0002-Port-zdump-to-C90-snprintf.patch| 115 --
 2 files changed, 289 deletions(-)
 delete mode 100644 
meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch
 delete mode 100644 
meta/recipes-extended/tzcode/files/0002-Port-zdump-to-C90-snprintf.patch

diff --git 
a/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch 
b/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch
deleted file mode 100644
index e49fa09..000
--- a/meta/recipes-extended/tzcode/files/0001-Fix-Makefile-quoting-bug.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From b520d20b8122a783f99f088758b78d928f70ee34 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <egg...@cs.ucla.edu>
-Date: Mon, 23 Oct 2017 11:42:45 -0700
-Subject: [PATCH] Fix Makefile quoting bug
-
-Problem with INSTALLARGS reported by Zefram in:
-https://mm.icann.org/pipermail/tz/2017-October/025360.html
-Fix similar problems too.
-* Makefile (ZIC_INSTALL, VALIDATE_ENV, CC, install)
-(INSTALL, version, INSTALLARGS, right_posix, posix_right)
-(check_public): Use apostrophes to prevent undesirable
-interpretation of names by the shell.  We still do not support
-directory names containing apostrophes or newlines, but this is
-good enough.
-
-Upstream-Status: Backport
-Signed-off-by: Armin Kuster <akus...@mvista.com>
-
-* NEWS: Mention this.

- Makefile | 64 
- NEWS |  8 
- 2 files changed, 40 insertions(+), 32 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c92edc0..97649ca 100644
 a/Makefile
-+++ b/Makefile
-@@ -313,7 +313,7 @@ ZFLAGS=
- 
- # How to use zic to install tz binary files.
- 
--ZIC_INSTALL=  $(ZIC) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
-+ZIC_INSTALL=  $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
- 
- # The name of a Posix-compliant 'awk' on your system.
- AWK=  awk
-@@ -341,8 +341,8 @@ SGML_CATALOG_FILES= \
- VALIDATE = nsgmls
- VALIDATE_FLAGS = -s -B -wall -wno-unused-param
- VALIDATE_ENV = \
--  SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
--  SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
-+  SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
-+  SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
-   SP_CHARSET_FIXED=YES \
-   SP_ENCODING=UTF-8
- 
-@@ -396,7 +396,7 @@ GZIPFLAGS= -9n
- #MAKE=make
- 
- cc=   cc
--CC=   $(cc) -DTZDIR=\"$(TZDIR)\"
-+CC=   $(cc) -DTZDIR='"$(TZDIR)"'
- 
- AR=   ar
- 
-@@ -473,29 +473,29 @@ all: tzselect yearistype zic zdump libtz.a 
$(TABDATA)
- ALL:  all date $(ENCHILADA)
- 
- install:  all $(DATA) $(REDO) $(MANS)
--  mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
--  $(DESTDIR)$(LIBDIR) \
--  $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
--  $(DESTDIR)$(MANDIR)/man8
-+  mkdir -p '$(DESTDIR)$(ETCDIR)' '$(DESTDIR)$(TZDIR)' \
-+  '$(DESTDIR)$(LIBDIR)' \
-+  '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
-+  '$(DESTDIR)$(MANDIR)/man8'
-   $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
--  cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
--  cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
--  cp libtz.a $(DESTDIR)$(LIBDIR)/.
--  $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
--  cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
--  cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
--  cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
-+  cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
-+  cp tzselect zic zdump '$(DESTDIR)$(ETCDIR)/.'
-+  cp libtz.a '$(DESTDIR)$(LIBDIR)/.'
-+  $(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a'
-+  cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.'
-+  cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.'
-+  cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.'
- 
- INSTALL:  ALL install date.1
--  mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
--  cp date $(DESTDIR)$(BINDIR)/.
--  cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.
-+  mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1'
-+  cp date '$(DESTDIR)$(BINDIR)/.'
-+  cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.'
- 
- version:  $(VERSION_DEPS)
-   { (type git) >/dev/null 2>&1 && \
- V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
-   --abbrev=7 --dirty` || \
--V=$(VERSION); } && \
-+V='$(VERSION)'; } && \
-   printf '%s\n' "$$

[OE-core] [PATCH] package_rpm.bbclass: improve reproducibility of RPM packages

2018-01-25 Thread Juro Bystricky
The RPM packages contain BUILDHOST based on the current build host.
This breaks reproducibility if the same package is build on two different hosts.
To improve reproducible builds, we always set BUILDHOST as "reproducible".

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/package_rpm.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b08608c..15fed01 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -669,6 +669,7 @@ python do_package_rpm () {
 cmd = cmd + " --define '_binary_payload w6T.xzdio'"
 cmd = cmd + " --define '_source_payload w6T.xzdio'"
 cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
+cmd = cmd + " --define '_buildhost reproducible'"
 if perfiledeps:
 cmd = cmd + " --define '__find_requires " + outdepends + "'"
 cmd = cmd + " --define '__find_provides " + outprovides + "'"
-- 
2.7.4

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


[OE-core] [PATCH] glibc-locale.inc: avoid duplicate packages

2018-01-22 Thread Juro Bystricky
PACKAGES_DYNAMIC contained an identical set of packages twice.
I suspect this was a result of global search/replace when moving
recipes from eglibc to glibc long time ago.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/glibc/glibc-locale.inc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-locale.inc 
b/meta/recipes-core/glibc/glibc-locale.inc
index 1a629fc..b3cb10b 100644
--- a/meta/recipes-core/glibc/glibc-locale.inc
+++ b/meta/recipes-core/glibc/glibc-locale.inc
@@ -39,7 +39,6 @@ PACKAGES = "localedef ${PN}-dbg"
 
 PACKAGES_DYNAMIC = "^locale-base-.* \
 ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* 
^glibc-binary-localedata-.* \
-^glibc-gconv-.*  ^glibc-charmap-.*  ^glibc-localedata-.*  
^glibc-binary-localedata-.* \
 ^${MLPREFIX}glibc-gconv$"
 
 # Create a glibc-binaries package
-- 
2.7.4

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


[OE-core] [PATCH v2] libc6: improve reproducibility

2018-01-22 Thread Juro Bystricky
Building various libraries (libc6, libc6-pic, libc6-staticdev, libc6-dbg, ...)
can be non-deterministic because they may be built with two different versions
of intl/plural.c. in two otherwise identical builds. We may or may not 
re-generate
the file plural.c from the file plural.y, based on bison being installed or not
and based on mtimes of those two files, as the Makefile contains:

plural.c: plural.y
$(BISON) $(BISONFLAGS) $@ $^

If the above rule does not fire, we use a "fallback" plural.c, otherwise
we use plural.c re-generated from plural.y.
The fix is to always require bison to be installed and unconditionally
re-generate plural.c. (This is achieved by touching plural.y).

[YOCTO #12291]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/glibc/glibc_2.26.bb | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc_2.26.bb 
b/meta/recipes-core/glibc/glibc_2.26.bb
index 04d9773..0ee5bdb 100644
--- a/meta/recipes-core/glibc/glibc_2.26.bb
+++ b/meta/recipes-core/glibc/glibc_2.26.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
   file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
   file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
 
-DEPENDS += "gperf-native"
+DEPENDS += "gperf-native bison-native"
 
 SRCREV ?= "77f921dac17c5fa99bd9e926d926c327982895f7"
 
@@ -103,6 +103,10 @@ do_configure () {
 # version check and doesn't really help with anything
 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
 find ${S} -name "configure" | xargs touch
+# "plural.c" may or may not get regenerated from "plural.y" so we
+# touch "plural.y" to make sure it does. (This should not be needed
+# for glibc version 2.26+)
+find ${S}/intl -name "plural.y" | xargs touch
 CPPFLAGS="" oe_runconf
 }
 
-- 
2.7.4

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


[OE-core] [PATCH] libc6: improve reproducibility

2018-01-12 Thread Juro Bystricky
Building various libraries (libc6, libc6-pic, libc6-staticdev, libc6-dbg, ...)
can be non-deterministic because they may be built with two different versions
of intl/plural.c. in two otherwise identical builds. We may or may not 
re-generate
the file plural.c from the file plural.y, based on bison being installed or not
and based on mtimes of those two files, as the Makefile contains:

plural.c: plural.y
$(BISON) $(BISONFLAGS) $@ $^

If the above rule does not fire, we use a "fallback" plural.c, otherwise
we use plural.c re-generated from plural.y.
The fix is to always require bison to be installed and unconditionally
re-generate plural.c. (This is achieved by touching plural.y).

[YOCTO #12291]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/glibc/glibc_2.26.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc_2.26.bb 
b/meta/recipes-core/glibc/glibc_2.26.bb
index 04d9773..4d9b23f 100644
--- a/meta/recipes-core/glibc/glibc_2.26.bb
+++ b/meta/recipes-core/glibc/glibc_2.26.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
   file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
   file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
 
-DEPENDS += "gperf-native"
+DEPENDS += "gperf-native bison-native"
 
 SRCREV ?= "77f921dac17c5fa99bd9e926d926c327982895f7"
 
@@ -103,6 +103,7 @@ do_configure () {
 # version check and doesn't really help with anything
 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
 find ${S} -name "configure" | xargs touch
+find ${S}/intl -name "plural.y" | xargs touch
 CPPFLAGS="" oe_runconf
 }
 
-- 
2.7.4

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


[OE-core] [PATCH v2] icu-dev: improve reproducibility

2018-01-12 Thread Juro Bystricky
Remove all build host references from several distributed files:
Makefile.inc, icu-config, pkgdata.inc

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-support/icu/icu.inc | 8 
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc
index 5cf7b11..b9ac59a 100644
--- a/meta/recipes-support/icu/icu.inc
+++ b/meta/recipes-support/icu/icu.inc
@@ -64,6 +64,14 @@ do_install_append_class-target() {
 rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
 icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat 
${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
 fi
+   
+   # Remove build host references...
+   sed -i  \
+   -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   ${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \
+   ${D}/${libdir}/${BPN}/${PV}/pkgdata.inc
 }
 
 PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
-- 
2.7.4

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


[OE-core] [PATCH] qemu-2.10.1.bb: support mingw build

2018-01-11 Thread Juro Bystricky
The patch chardev-connect-socket-to-a-spawned-command.patch calls
"socketpair". This function is missing in mingw, so the patch
needs to be modified accordingly, otherwise we end up with a broken
mingw build.
While it is possible to simply remove the patch on a recipe level for
mingw platform, it makes more sense to modify the patch itself.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 ...ardev-connect-socket-to-a-spawned-command.patch | 37 +-
 1 file changed, 29 insertions(+), 8 deletions(-)

diff --git 
a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
 
b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
index 49d4af2..4f85397 100644
--- 
a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
+++ 
b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
@@ -55,10 +55,11 @@ diff --git a/chardev/char-socket.c b/chardev/char-socket.c
 index 1ae730a4..c366a02a 100644
 --- a/chardev/char-socket.c
 +++ b/chardev/char-socket.c
-@@ -854,6 +854,66 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
+@@ -854,6 +854,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
  return false;
  }
  
++#ifndef _WIN32  
 +static void chardev_open_socket_cmd(Chardev *chr,
 +const char *cmd,
 +Error **errp)
@@ -118,42 +119,51 @@ index 1ae730a4..c366a02a 100644
 +object_unref(OBJECT(sioc));
 +}
 +}
++#endif
 +
  static void qmp_chardev_open_socket(Chardev *chr,
  ChardevBackend *backend,
  bool *be_opened,
-@@ -861,6 +921,7 @@ static void qmp_chardev_open_socket(Chardev *chr,
+@@ -861,6 +923,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
  {
  SocketChardev *s = SOCKET_CHARDEV(chr);
  ChardevSocket *sock = backend->u.socket.data;
++#ifndef _WIN32
 +const char *cmd = sock->cmd;
++#endif
  bool do_nodelay = sock->has_nodelay ? sock->nodelay : false;
  bool is_listen  = sock->has_server  ? sock->server  : true;
  bool is_telnet  = sock->has_telnet  ? sock->telnet  : false;
-@@ -928,7 +989,12 @@ static void qmp_chardev_open_socket(Chardev *chr,
+@@ -928,7 +993,15 @@ static void qmp_chardev_open_socket(Chardev *chr,
  s->reconnect_time = reconnect;
  }
  
 -if (s->reconnect_time) {
++#ifndef _WIN32
 +if (cmd) {
 +chardev_open_socket_cmd(chr, cmd, errp);
 +
 +/* everything ready (or failed permanently) before we return */
 +*be_opened = true;
-+} else if (s->reconnect_time) {
++} else
++#endif
++  if (s->reconnect_time) {
  sioc = qio_channel_socket_new();
  tcp_chr_set_client_ioc_name(chr, sioc);
  qio_channel_socket_connect_async(sioc, s->addr,
-@@ -987,11 +1053,22 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
+@@ -987,11 +1060,27 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
  const char *host = qemu_opt_get(opts, "host");
  const char *port = qemu_opt_get(opts, "port");
  const char *tls_creds = qemu_opt_get(opts, "tls-creds");
++#ifndef _WIN32
 +const char *cmd = qemu_opt_get(opts, "cmd");
++#endif
  SocketAddressLegacy *addr;
  ChardevSocket *sock;
  
  backend->type = CHARDEV_BACKEND_KIND_SOCKET;
 -if (!path) {
++#ifndef _WIN32
 +if (cmd) {
 +/*
 + * Here we have to ensure that no options are set which are 
incompatible with
@@ -164,24 +174,35 @@ index 1ae730a4..c366a02a 100644
 +error_setg(errp, "chardev: socket: cmd does not support any 
additional options");
 +return;
 +}
-+} else if (!path) {
++} else
++#endif
++  if (!path) {
  if (!host) {
  error_setg(errp, "chardev: socket: no host given");
  return;
-@@ -1023,13 +1100,14 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
+@@ -1023,13 +1112,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
  sock->has_reconnect = true;
  sock->reconnect = reconnect;
  sock->tls_creds = g_strdup(tls_creds);
++#ifndef _WIN32
 +sock->cmd = g_strdup(cmd);
++#endif
  
  addr = g_new0(SocketAddressLegacy, 1);
--if (path) {
++#ifndef _WIN32
 +if (path || cmd) {
++#else
+ if (path) {
++#endif
  UnixSocketAddress *q_unix;
  addr->type = SOCKET_ADDRESS_LEGACY_KIND_UNIX;
  q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
 -q_unix->path = g_strdup(path);
++#ifndef _WIN32
 +q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
++#else
++

[OE-core] [PATCH 1/2] icu-dbg: improve reproducibility

2018-01-07 Thread Juro Bystricky
Make sure build host references do not end up being compiled in the image.
This only affects libicutu and icu-dbg.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-support/icu/icu.inc | 9 +
 1 file changed, 9 insertions(+)

diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc
index 3fb16b0..5cf7b11 100644
--- a/meta/recipes-support/icu/icu.inc
+++ b/meta/recipes-support/icu/icu.inc
@@ -38,6 +38,15 @@ do_configure_prepend_libc-musl () {
 sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' ${S}/configure.ac
 }
 
+do_compile_prepend_class-target () {
+   # Make sure certain build host references do not end up being compiled
+   # in the image. This only affects libicutu and icu-dbg
+   sed  \
+   -e 's,DU_BUILD=,DU_BUILD_unused=,g' \
+   -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -i ${B}/tools/toolutil/Makefile
+}
+
 PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
 do_install_append_class-native() {
mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
-- 
2.7.4

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


[OE-core] [PATCH 2/2] icu-dev: improve reproducibility

2018-01-07 Thread Juro Bystricky
Remove all build host references from several distributed files:
Makefile.inc, icu-config, pkgdata.inc

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-support/icu/icu.inc | 8 
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc
index 5cf7b11..c41ea8a 100644
--- a/meta/recipes-support/icu/icu.inc
+++ b/meta/recipes-support/icu/icu.inc
@@ -64,6 +64,14 @@ do_install_append_class-target() {
 rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
 icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat 
${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
 fi
+   
+   # Remove build host references...
+   sed -i  \
+   -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   ${D}/usr/bin/icu-config ${D}/usr/lib/icu/${PV}/Makefile.inc \
+   ${D}/usr/lib/icu/${PV}/pkgdata.inc
 }
 
 PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
-- 
2.7.4

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


[OE-core] [PATCH 1/2] groff_1.22.3.bb: support SOURCE_DATE_EPOCH

2018-01-07 Thread Juro Bystricky
Patch backported from Debian:
https://sources.debian.net/src/groff/1.22.3-9/debian/patches/source-date-epoch.patch/

Various documents contain information such as:

%%Creator:​·​groff·​version·​1.​22.​3
%%CreationDate:​·​Sat·​Nov·​11·​01:​04:​26·​2017

The intent is to replace CreationDate by a value specified
by SOURCE_DATE_EPOCH (if present in environment).

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../groff/groff-1.22.3/source-date-epoch.patch | 286 +
 meta/recipes-extended/groff/groff_1.22.3.bb|   1 +
 2 files changed, 287 insertions(+)
 create mode 100644 
meta/recipes-extended/groff/groff-1.22.3/source-date-epoch.patch

diff --git a/meta/recipes-extended/groff/groff-1.22.3/source-date-epoch.patch 
b/meta/recipes-extended/groff/groff-1.22.3/source-date-epoch.patch
new file mode 100644
index 000..6349529
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.22.3/source-date-epoch.patch
@@ -0,0 +1,286 @@
+Patch backported (and slightly edited to build correctly) from Debian.
+https://sources.debian.net/src/groff/1.22.3-9/debian/patches/source-date-epoch.patch/
+
+From abc23bc9245e18468817f2838361c3a08f7521e2 Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwat...@debian.org>
+Date: Thu, 5 Nov 2015 11:47:34 +
+Subject: Implement `SOURCE_DATE_EPOCH' for reproducible builds.
+
+Author: Colin Watson <cjwat...@debian.org>
+Forwarded: yes
+Last-Update: 2015-11-05
+
+Patch-Name: source-date-epoch.patch
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+---
+ doc/groff.texinfo |  6 +
+ src/devices/grohtml/grohtml.man   |  7 ++
+ src/devices/grohtml/post-html.cpp |  5 ++--
+ src/devices/gropdf/gropdf.man |  7 ++
+ src/devices/gropdf/gropdf.pl  |  3 ++-
+ src/devices/grops/grops.man   |  7 ++
+ src/devices/grops/ps.cpp  |  3 ++-
+ src/include/curtime.h | 23 ++
+ src/libs/libgroff/Makefile.sub|  2 ++
+ src/libs/libgroff/curtime.cpp | 51 +++
+ src/roff/troff/input.cpp  |  3 ++-
+ 11 files changed, 112 insertions(+), 5 deletions(-)
+ create mode 100644 src/include/curtime.h
+ create mode 100644 src/libs/libgroff/curtime.cpp
+
+diff --git a/src/devices/grohtml/grohtml.man b/src/devices/grohtml/grohtml.man
+index 51eae224..4be4abbc 100644
+--- a/src/devices/grohtml/grohtml.man
 b/src/devices/grohtml/grohtml.man
+@@ -419,6 +419,13 @@ and
+ for more details.
+ .
+ .
++.TP
++.SM
++.B SOURCE_DATE_EPOCH
++A timestamp (expressed as seconds since the Unix epoch) to use as the
++creation timestamp in place of the current time.
++.
++.
+ .\" 
+ .SH BUGS
+ .\" 
+diff --git a/src/devices/grohtml/post-html.cpp 
b/src/devices/grohtml/post-html.cpp
+index fefbf014..b5fc5167 100644
+--- a/src/devices/grohtml/post-html.cpp
 b/src/devices/grohtml/post-html.cpp
+@@ -28,6 +28,7 @@ along with this program. If not, see 
<http://www.gnu.org/licenses/>. */
+ #include "html.h"
+ #include "html-text.h"
+ #include "html-table.h"
++#include "curtime.h"
+ 
+ #include 
+ 
+@@ -5013,7 +5014,7 @@ void html_printer::do_file_components (void)
+   .put_string(Version_string)
+   .end_comment();
+ 
+-  t = time(0);
++  t = current_time();
+   html.begin_comment("CreationDate: ")
+   .put_string(ctime(), strlen(ctime())-1)
+   .end_comment();
+@@ -5126,7 +5127,7 @@ html_printer::~html_printer()
+ .put_string(Version_string)
+ .end_comment();
+ 
+-  t = time(0);
++  t = current_time();
+   html.begin_comment("CreationDate: ")
+ .put_string(ctime(), strlen(ctime())-1)
+ .end_comment();
+diff --git a/src/devices/gropdf/gropdf.man b/src/devices/gropdf/gropdf.man
+index 3bbace6a..cc0c82f1 100644
+--- a/src/devices/gropdf/gropdf.man
 b/src/devices/gropdf/gropdf.man
+@@ -1029,6 +1029,13 @@ and
+ for more details.
+ .
+ .
++.TP
++.SM
++.B SOURCE_DATE_EPOCH
++A timestamp (expressed as seconds since the Unix epoch) to use as the
++creation timestamp in place of the current time.
++.
++.
+ .\" 
+ .SH FILES
+ .\" 
+diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
+index 035d1238..c25c4c67 100644
+--- a/src/devices/gropdf/gropdf.pl
 b/src/devices/gropdf/gropdf.pl
+@@ -239,13 +239,14 @@ elsif (exists($ppsz{$papersz}))
+ @defaultmb=@mediabox=(0,0,$ppsz{$papersz}->[0],$ppsz{$papersz}->[1]);
+ }
+ 
+-my (@dt)=localtime(time);
++my (@dt)=localtime($ENV{SOURCE_DATE_EPOCH} || time);
+ my $dt=PDFDate(\@dt);
+ 
+ my %info=('Creator' => &q

[OE-core] [PATCH 2/2] groff-doc: improve reproducibility

2018-01-07 Thread Juro Bystricky
Some examples used "random" numbers to generate random RGB colors.
This would break reproducible builds.
The issue was solved by a patch backported from Debian.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../groff-1.22.3/hdtbl-examples-less-random.patch  | 41 ++
 meta/recipes-extended/groff/groff_1.22.3.bb|  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 
meta/recipes-extended/groff/groff-1.22.3/hdtbl-examples-less-random.patch

diff --git 
a/meta/recipes-extended/groff/groff-1.22.3/hdtbl-examples-less-random.patch 
b/meta/recipes-extended/groff/groff-1.22.3/hdtbl-examples-less-random.patch
new file mode 100644
index 000..f9b4b21
--- /dev/null
+++ b/meta/recipes-extended/groff/groff-1.22.3/hdtbl-examples-less-random.patch
@@ -0,0 +1,41 @@
+Patch backported from Debian.
+https://sources.debian.net/src/groff/1.22.3-9/debian/patches/hdtbl-examples-less-random.patch/
+
+From b78ead018666fbee30624359caa4a294efb0c517 Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwat...@debian.org>
+Date: Fri, 6 Nov 2015 11:06:04 +
+Subject: Remove unnecessary randomness from example output
+
+The hdtbl examples don't need good randomness, as they're only example
+output; removing the process ID from consideration allows better
+integration with reproducible builds.
+
+Forwarded: no
+Last-Update: 2015-11-06
+
+Patch-Name: hdtbl-examples-less-random.patch
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+---
+ contrib/hdtbl/examples/common.roff | 6 +-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/contrib/hdtbl/examples/common.roff 
b/contrib/hdtbl/examples/common.roff
+index ddb6d4ac..9bd9f901 100644
+--- a/contrib/hdtbl/examples/common.roff
 b/contrib/hdtbl/examples/common.roff
+@@ -231,7 +231,11 @@ along with this program. If not, see 
<http://www.gnu.org/licenses/>.
+ .af mo 00
+ .af dy 00
+ .
+-.ds random-s1 \n[minutes]\n[seconds]\n[$$]\n[hours]\"
++.\" Since this just generates example output, we don't need good randomness;
++.\" basing this purely on the time and not on the process ID allows better
++.\" integration with reproducible builds.
++.\" .ds random-s1 \n[minutes]\n[seconds]\n[$$]\n[hours]\"
++.ds random-s1 \n[minutes]\n[seconds]\n[hours]\"
+ .\" prevent overflow
+ .substring random-s1 0 8
+ .
diff --git a/meta/recipes-extended/groff/groff_1.22.3.bb 
b/meta/recipes-extended/groff/groff_1.22.3.bb
index cce7a92..3a3633d 100644
--- a/meta/recipes-extended/groff/groff_1.22.3.bb
+++ b/meta/recipes-extended/groff/groff_1.22.3.bb
@@ -12,6 +12,7 @@ SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
file://0001-replace-perl-w-with-use-warnings.patch \
file://source-date-epoch.patch \
+   file://hdtbl-examples-less-random.patch \
 "
 
 SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
-- 
2.7.4

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


[OE-core] [PATCH 2/2] perl-ptest: various fixes

2018-01-07 Thread Juro Bystricky
Improve reproducibility: Remove all build host references from
distributed files.

Do not package non-linux OS related files.
Also remove some additional files not needed by run-ptest. (There are
probably still more files that can be removed, but as long as they
don't leak build host references they are harmless).

Fix the expected checksum of MakeMaker/lib/ExtUtils/Liblist/Kid.pm
to match the one expected: We modified the file, but did not
recalculate/update the file checksum accordingly.
(This fixes the only failing test.)

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/perl/perl-ptest.inc  | 32 +++---
 .../perl/perl/perl-test-customized.patch   |  2 +-
 meta/recipes-devtools/perl/perl_5.24.1.bb  |  1 +
 3 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/meta/recipes-devtools/perl/perl-ptest.inc 
b/meta/recipes-devtools/perl/perl-ptest.inc
index 1f549af..6a7a2d7 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -2,31 +2,43 @@ inherit ptest
 
 SRC_URI += "file://run-ptest \
"
-
 do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/usr\/local:${bindir}:g" -i cpan/version/t/*
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
-   tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile 
--exclude=makefile --exclude=hostperl \
+   tar -c --exclude='*.o' --exclude=libperl.so --exclude=Makefile 
--exclude=makefile --exclude=hostperl \
+   --exclude=cygwin --exclude=os2 --exclude=djgpp --exclude=qnx 
--exclude=symbian --exclude=haiku \
+   --exclude=vms --exclude=vos --exclude=NetWare --exclude=amigaos4  
--exclude=buildcustomize.pl \
+   --exclude='win32/config.*' --exclude=plan9 --exclude=README.plan9 
--exclude=perlplan9.pod --exclude=Configure \
+   --exclude=veryclean.sh --exclude=realclean.sh  
--exclude=getioctlsizes \
+   --exclude=dl_aix.xs --exclude=sdbm.3 --exclude='cflags.SH' 
--exclude=makefile.old \
--exclude=miniperl --exclude=generate_uudmap --exclude=patches 
* | ( cd ${D}${PTEST_PATH} && tar -x )
 
-   sed -i -e "s,${D},,g" \
+   ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
+
+   # Remove build host references from various scattered files...
+   find "${D}${PTEST_PATH}" \
+\( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name 
'*.pl' -o -name '*.sh' -o -name '*.pm' \
+-o -name 'h2xs' -o -name 'h2ph' \
+-o -name '*.h' -o -name 'config.sh-*' -o -name 'pod2man'  -o -name 
'pod2text' \) \
+   -type f -exec sed -i \
+  -e "s,${D},,g" \
   -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
   -e "s,-isystem${STAGING_INCDIR} ,,g" \
+  -e 's|${DEBUG_PREFIX_MAP}||g' \
+  -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
   -e "s,${STAGING_LIBDIR},${libdir},g" \
   -e "s,${STAGING_BINDIR},${bindir},g" \
   -e "s,${STAGING_INCDIR},${includedir},g" \
-  -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
   -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
   -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
-   ${D}${PTEST_PATH}/lib/Config.pm \
-   ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2man \
-   ${D}${PTEST_PATH}/cpan/podlators/scripts/pod2text
+  -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+  -e 's:${RECIPE_SYSROOT}::g' \
+   {} +
 
-   ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl
-   # Remove plan9 related stuff
-   rm -rf ${D}${PTEST_PATH}/plan9 ${D}${PTEST_PATH}/README.plan9 
${D}${PTEST_PATH}/pod/perlplan9.pod
+# Remove a useless timestamp...
+sed -i -e '/Autogenerated starting on/d' 
${D}${PTEST_PATH}/lib/unicore/mktables.lst
 }
 
 python populate_packages_prepend() {
diff --git a/meta/recipes-devtools/perl/perl/perl-test-customized.patch 
b/meta/recipes-devtools/perl/perl/perl-test-customized.patch
index 90e4dcd..1d9a56d 100644
--- a/meta/recipes-devtools/perl/perl/perl-test-customized.patch
+++ b/meta/recipes-devtools/perl/perl/perl-test-customized.patch
@@ -32,7 +32,7 @@ index defeae1..b5d3c46 100644
  ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist.pm 
0e1e4c25eddb999fec6c4dc66593f76db34cfd16
 -ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm 
bfd2aa00ca4ed251f342e1d1ad704abbaf5a615e
 -ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm 
5529ae3064365eafd99536621305d52f4ab31b45
-+ExtUtils::MakeMaker cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm 
d593

[OE-core] [PATCH 1/2] perl-dbg: improve reproducibility

2018-01-07 Thread Juro Bystricky
Remove various build host references scattered within
comments in numerous files that are distributed in the package.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/perl/perl_5.24.1.bb | 13 +
 1 file changed, 13 insertions(+)

diff --git a/meta/recipes-devtools/perl/perl_5.24.1.bb 
b/meta/recipes-devtools/perl/perl_5.24.1.bb
index 6b27b22..ab04624 100644
--- a/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -188,6 +188,19 @@ do_compile() {
 oe_runmake perl LD="${CCLD}"
 }
 
+do_compile_append_class-target() {
+# Remove build host references from numerous comments...
+find "${S}/cpan/Encode" -type f \
+\( -name '*.exh' -o -name '*.c' -o -name '*.h' \)\
+-exec sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' {} +
+sed -i -e 's:${RECIPE_SYSROOT}::g' ${S}/perl.h ${S}/pp.h
+sed -i -e 
's:${RECIPE_SYSROOT_NATIVE}/usr/bin/perl-native/perl${PV}.real:/usr/bin/perl${PV}:g'
  \
+${S}/cpan/Compress-Raw-Bzip2/constants.h \
+${S}/cpan/Compress-Raw-Zlib/constants.h \
+${S}/cpan/IPC-SysV/const-c.inc \
+${S}/dist/Time-HiRes/const-c.inc
+}
+
 do_install() {
#export hostperl="${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
oe_runmake install DESTDIR=${D}
-- 
2.7.4

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


[OE-core] [PATCH 5/5] openssl-ptest: improve reproducibility

2018-01-04 Thread Juro Bystricky
Remove buildhost references from Makefile and Configure.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-connectivity/openssl/openssl10.inc | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-connectivity/openssl/openssl10.inc 
b/meta/recipes-connectivity/openssl/openssl10.inc
index 4697755..bd96551 100644
--- a/meta/recipes-connectivity/openssl/openssl10.inc
+++ b/meta/recipes-connectivity/openssl/openssl10.inc
@@ -261,6 +261,12 @@ do_install_ptest () {
for d in ssltest_old v3ext x509aux; do
rm -rf ${D}${libdir}/${BPN}/ptest/test/$d
done
+
+   # Remove build host references
+   sed -i \
+   -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   ${D}${PTEST_PATH}/Makefile ${D}${PTEST_PATH}/Configure
 }
 
 do_install_append_class-native() {
-- 
2.7.4

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


[OE-core] [PATCH 2/5] gcc-runtime: improve reproducibility

2018-01-04 Thread Juro Bystricky
Remove various build host references from packages:

libstdc++
libstdc++-staticdev
gcc-runtime-dbg

The references are removoved by correctly setting various compiler
-fdebug-prefix-map settings. There are two main issues:
The default DEBUG_PREFIX_MAP variable references WORKDIR, however,
gcc sources are in a shared folder (work-shared)/
Additionally, DWARF info seems to store symlink names but gcc
seems to resolve symlink names referenced in -fdebug-prefix-map.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 12 
 1 file changed, 12 insertions(+)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc 
b/meta/recipes-devtools/gcc/gcc-runtime.inc
index d3d4bd3..7629fa5 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -34,6 +34,18 @@ RUNTIMETARGET_remove_libc-musl = "libmpx"
 # libmudflap
 # libgfortran needs separate recipe due to libquadmath dependency
 
+SLIB = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+SLIB_NEW = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+
+DEBUG_PREFIX_MAP_class-target = " \
+   -fdebug-prefix-map=${WORKDIR}/recipe-sysroot= \
+   -fdebug-prefix-map=${WORKDIR}/recipe-sysroot-native= \
+   -fdebug-prefix-map=${SLIB}=${SLIB_NEW} \
+   -fdebug-prefix-map=${SLIB}/include=${SLIB_NEW}/libstdc++-v3/../include \
+   -fdebug-prefix-map=${SLIB}/libiberty=${SLIB_NEW}/libstdc++-v3/../libiberty \
+   -fdebug-prefix-map=${B}=${SLIB_NEW} \
+   "
+
 do_configure () {
export CXX="${CXX} -nostdinc++ -nostdlib++"
for d in libgcc ${RUNTIMETARGET}; do
-- 
2.7.4

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


[OE-core] [PATCH 4/5] sed-ptest: improve reproducibility

2018-01-04 Thread Juro Bystricky
Remove build host references

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-extended/sed/sed_4.2.2.bb | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb 
b/meta/recipes-extended/sed/sed_4.2.2.bb
index e31bec2..f10e365 100644
--- a/meta/recipes-extended/sed/sed_4.2.2.bb
+++ b/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -42,6 +42,12 @@ do_compile_ptest() {
 
 do_install_ptest() {
oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} 
DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+   sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+   -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile
 }
 
 RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'/bin/sed', '', d)}"
-- 
2.7.4

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


[OE-core] [PATCH 3/5] attr-doc: improve reproducibility

2018-01-04 Thread Juro Bystricky
Use gzip compression without timestamps in the metadata.
(Use gzip -n).

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-support/attr/ea-acl.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/attr/ea-acl.inc 
b/meta/recipes-support/attr/ea-acl.inc
index e6f4c72..1339ecc 100644
--- a/meta/recipes-support/attr/ea-acl.inc
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -17,7 +17,7 @@ EXTRA_OECONF_append_class-target = "${@['', ' 
--disable-gettext '][(d.getVar('US
 EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
 
 do_install () {
-   oe_runmake install install-lib install-dev DIST_ROOT="${D}"
+   oe_runmake install install-lib install-dev DIST_ROOT="${D}" ZIP="gzip 
-n"
 }
 
 do_install_append_class-native () {
-- 
2.7.4

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


[OE-core] [PATCH 0/5] improve reproducibility of several packages

2018-01-04 Thread Juro Bystricky
The patches in this patch set are independent and can be applied in any 
order/subset.
They all allow building binary reproducible packages if built on
the same host. This is accomplished mostly by removing various
buil dhost information leaks or useless timestams.



Juro Bystricky (5):
  python3-dev: improve reproducibility
  gcc-runtime: improve reproducibility
  attr-doc: improve reproducibility
  sed-ptest: improve reproducibility
  openssl-ptest: improve reproducibility

 meta/recipes-connectivity/openssl/openssl10.inc |  6 ++
 meta/recipes-devtools/gcc/gcc-runtime.inc   | 12 
 meta/recipes-devtools/python/python3_3.5.3.bb   |  5 +
 meta/recipes-extended/sed/sed_4.2.2.bb  |  6 ++
 meta/recipes-support/attr/ea-acl.inc|  2 +-
 5 files changed, 30 insertions(+), 1 deletion(-)

-- 
2.7.4

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


[OE-core] [PATCH 1/5] python3-dev: improve reproducibility

2018-01-04 Thread Juro Bystricky
Remove remaining build host references from packaged files.

[#YOCTO 11472]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/python/python3_3.5.3.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/python/python3_3.5.3.bb 
b/meta/recipes-devtools/python/python3_3.5.3.bb
index b70915e..7f54ea4 100644
--- a/meta/recipes-devtools/python/python3_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3_3.5.3.bb
@@ -186,6 +186,11 @@ py_package_preprocess () {
install -m 0644 ${B}/Makefile.orig 
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
# Remove references to buildmachine paths in target Makefile and 
_sysconfigdata
sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e 
s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+   -e 's:${RECIPE_SYSROOT}::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \

${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
 \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-- 
2.7.4

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


[OE-core] [PATCH v2] package_rpm.bbclass: clamp timestamps

2018-01-04 Thread Juro Bystricky
Improve binary reproducibility of RPM packages.
Ensure timestamps in RPM packages are not later than the value
of SOURCE_DATE_EPOCH. If SOURCE_DATE_EPOCH is not set,
timestamps are not clamped.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/package_rpm.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 1deaf83..b08608c 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -668,6 +668,7 @@ python do_package_rpm () {
 cmd = cmd + " --define '_build_id_links none'"
 cmd = cmd + " --define '_binary_payload w6T.xzdio'"
 cmd = cmd + " --define '_source_payload w6T.xzdio'"
+cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
 if perfiledeps:
 cmd = cmd + " --define '__find_requires " + outdepends + "'"
 cmd = cmd + " --define '__find_provides " + outprovides + "'"
-- 
2.7.4

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


[OE-core] [PATCH 0/1] rpm_4.14.0: clamp timestamps

2018-01-02 Thread Juro Bystricky
The recipe for RPM has been upgraded to version 4.14.0.
This version introduced a new macro "clamp_mtime_to_source_date_epoch".
The macro allows the RPM packages to set buildtime and mtime of files to
values as specified by SOURCE_DATE_EPOCH. This, however, is not the enabled by 
default:
The default setting for "clamp_mtime_to_source_date_epoch" is "0".
This patch sets the macro to "1", thus allowing clamping of the timestamps.
As the user needs to jump through some hoops to set SOURCE_DATE_EPOCH in
the environment, clamping the timestamps is very likely what the user wants.

I am aware that the macro can be set on command line.
This would involve patching the file package_rpm.bbclass, something like:

cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"

However, I think a better approach was to patch the upgraded recipe for the RPM,
in order to keep package_rpm.bbclass as RPM version agnostic as possible.

I tested this patch by a simple test, adding to local.conf:

export SOURCE_DATE_EPOCH
SOURCE_DATE_EPOCH="0"
PACKAGE_CLASSES = "package_rpm package_deb"

Then I ran twice (in two different folders, same machine, different times, no 
SSTATE):

$ bitbake core-image-minimal

The build created 3952 target packages (RPM and Debian each).

Without this patch the binary package comparison for RPM packages was:

Same: 538
Different: 3414
Total: 3952

With the patch the results were substantially better (same numbers for RPM and 
Debian):

Same: 3917
Different: 35
Total: 3952

Few caveats:
You need two additional patches by Alex Kanavin:
"rpm: update to 4.14.0"
"package.bbclass: replace rpm/debugedit with dwarfsrcfiles"

The resulting numbers need to be taken with a grain of salt, as there are
addional factors that can cause different results.
I realize SOURCE_DATE_EPOCH should be determined based on source code,
instead of setting it to "0", but that is not crucial to test the patch.

Finally, RPM 4.14.0 supports yet another macro "_buildhost" which should be used
to define some kind of a "standard" buildhost name in order to improve
reproducibility. (Otherwise, I think, buildost is taken from /etc/hosts).
But that's a subject of a separate patch.


Juro Bystricky (1):
  rpm_4.14.0: clamp timestamps by default

 .../recipes-devtools/rpm/files/0001-support-sde.patch | 19 +++
 meta/recipes-devtools/rpm/rpm_4.14.0.bb   |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-support-sde.patch

-- 
2.7.4

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


[OE-core] [PATCH 1/1] rpm_4.14.0: clamp timestamps by default

2018-01-02 Thread Juro Bystricky
Improve reproducibility by making sure that timestamps
in built rpms are not later than the value of SOURCE_DATE_EPOCH as
found in the environment.
Timestamps as usual when SOURCE_DATE_EPOCH is not set.

[YOCTO #12425]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../recipes-devtools/rpm/files/0001-support-sde.patch | 19 +++
 meta/recipes-devtools/rpm/rpm_4.14.0.bb   |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-support-sde.patch

diff --git a/meta/recipes-devtools/rpm/files/0001-support-sde.patch 
b/meta/recipes-devtools/rpm/files/0001-support-sde.patch
new file mode 100644
index 000..b947c62d
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-support-sde.patch
@@ -0,0 +1,19 @@
+
+Improve reproducibility: clamp timestamps by default.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+diff --git a/macros.in b/macros.in
+index d086248..af39c4a 100644
+--- a/macros.in
 b/macros.in
+@@ -248,7 +248,7 @@ package or when debugging this package.\
+ # If true, make sure that timestamps in built rpms
+ # are not later than the value of SOURCE_DATE_EPOCH.
+ # Is ignored when SOURCE_DATE_EPOCH is not set.
+-%clamp_mtime_to_source_date_epoch 0
++%clamp_mtime_to_source_date_epoch 1
+ 
+ # The directory where newly built binary packages will be written.
+ %_rpmdir  %{_topdir}/RPMS
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.0.bb 
b/meta/recipes-devtools/rpm/rpm_4.14.0.bb
index e4e9c3e..83af18e 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.0.bb
@@ -40,6 +40,7 @@ SRC_URI = 
"git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \

file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \

file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
file://0001-perl-disable-auto-reqs.patch \
+   file://0001-support-sde.patch \
"
 
 PE = "1"
-- 
2.7.4

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


[OE-core] [PATCH 1/4] compiler-options.bbclass: provide and validate options

2017-12-13 Thread Juro Bystricky
As we may be using external toolchains, we cannot assume
various compiler options to be valid.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/compiler-options.bbclass | 24 
 1 file changed, 24 insertions(+)
 create mode 100644 meta/classes/compiler-options.bbclass

diff --git a/meta/classes/compiler-options.bbclass 
b/meta/classes/compiler-options.bbclass
new file mode 100644
index 000..fdd45e8
--- /dev/null
+++ b/meta/classes/compiler-options.bbclass
@@ -0,0 +1,24 @@
+
+# Some compiler options are not universal and using them when not
+# supported can cause build errors.
+#
+# Check for a compiler option -ffile-prefix-map.
+# This option is present in OE-core GCC, but may not be present when
+# using external toolchains.
+#
+# The option can remap any hard-coded __FILE__ typically containing build
+# host path to a reproducible value, with the absolute build-host path
+# stripped. This is essential in order to achieve reproducible builds.
+#
+# Typical usage:
+#
+#inherit compiler-options
+#cc_extra=$(file_prefix_map_option_supported ${CC})
+#oe_runmake CFLAGS="${CFLAGS} $cc_extra"
+#
+
+file_prefix_map_option_supported () {
+   if $1 -Q --help=joined | grep -q "\-ffile-prefix-map=

[OE-core] [PATCH 2/4] kernel.bbclass: use class compiler-options

2017-12-13 Thread Juro Bystricky
We use gcc option "-ffile-prefix-map" if available.
Remove the local code that detects the availability of this
compiler option (get_cc_option) and use a more generic code
imported from compiler-option.bbclass.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/kernel.bbclass | 15 +++
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 7ef4f47..32730b1 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,4 +1,4 @@
-inherit linux-kernel-base kernel-module-split
+inherit linux-kernel-base kernel-module-split compiler-options
 
 PROVIDES += "virtual/kernel"
 DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc 
kmod-native bc-native lzop-native"
@@ -244,15 +244,6 @@ python do_devshell_prepend () {
 
 addtask bundle_initramfs after do_install before do_deploy
 
-get_cc_option () {
-   # Check if KERNEL_CC supports the option "file-prefix-map".
-   # This option allows us to build images with __FILE__ values 
that do not
-   # contain the host build path.
-   if ${KERNEL_CC} -Q --help=joined | grep -q 
"\-ffile-prefix-map=

[OE-core] [PATCH 3/4] module.bbclass: improve reproducibility

2017-12-13 Thread Juro Bystricky
Use gcc option "-ffile-prefix-map" if available.
This will remap any hard-coded __FILE__ containing build host
path to a reproducible value, with the absolute build-host path
stripped.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/module.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 78d1b21..e0670bf 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -1,4 +1,4 @@
-inherit module-base kernel-module-split pkgconfig
+inherit module-base kernel-module-split pkgconfig compiler-options
 
 addtask make_scripts after do_prepare_recipe_sysroot before do_configure
 do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
@@ -40,9 +40,10 @@ python do_devshell_prepend () {
 
 module_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+   cc_extra=$(file_prefix_map_option_supported ${KERNEL_CC})
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
   KERNEL_VERSION=${KERNEL_VERSION}\
-  CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+  CC="${KERNEL_CC} $cc_extra" LD="${KERNEL_LD}" \
   AR="${KERNEL_AR}" \
   O=${STAGING_KERNEL_BUILDDIR} \
   KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
-- 
2.7.4

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


[OE-core] [PATCH 4/4] pulseaudio: improve reproducibility

2017-12-13 Thread Juro Bystricky
1. Remove build host references from CFLAGS in generated config.h file.
   They end up compiled in the image, but are only used for information.
2. Remove PA_BUILDDIR hardcoded references: safe to remove as we are guaranteed
   not to run from the build directory when the image is cross-compiled
3. Take care of any embedded __FILE__ strings, but only if the compiler supports
   -ffile-prefix-map option.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../pulseaudio/pulseaudio/no-builddir.patch| 74 ++
 .../pulseaudio/pulseaudio_11.1.bb  | 12 +++-
 2 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/no-builddir.patch

diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/no-builddir.patch 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/no-builddir.patch
new file mode 100644
index 000..fcef858
--- /dev/null
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/no-builddir.patch
@@ -0,0 +1,74 @@
+Improve reproducibility.
+Remove hard coded build host references (PA_BUILDDIR) from the cross-compiled
+image. For cross-compiled images we are guaranteed not to run from build 
directory.
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
+index f0ed0b4..94a56d3 100644
+--- a/src/daemon/daemon-conf.c
 b/src/daemon/daemon-conf.c
+@@ -153,11 +153,7 @@ pa_daemon_conf *pa_daemon_conf_new(void) {
+ c->dl_search_path = pa_sprintf_malloc("%s" PA_PATH_SEP "lib" PA_PATH_SEP 
"pulse-%d.%d" PA_PATH_SEP "modules",
+   pa_win32_get_toplevel(NULL), 
PA_MAJOR, PA_MINOR);
+ #else
+-if (pa_run_from_build_tree()) {
+-pa_log_notice("Detected that we are run from the build tree, fixing 
search path.");
+-c->dl_search_path = pa_xstrdup(PA_BUILDDIR);
+-} else
+-c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
++c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
+ #endif
+ 
+ return c;
+diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
+index 3dbf6b1..98cb738 100644
+--- a/src/modules/alsa/alsa-mixer.c
 b/src/modules/alsa/alsa-mixer.c
+@@ -2505,10 +2505,7 @@ static int path_verify(pa_alsa_path *p) {
+ }
+ 
+ static const char *get_default_paths_dir(void) {
+-if (pa_run_from_build_tree())
+-return PA_SRCDIR "/modules/alsa/mixer/paths/";
+-else
+-return PA_ALSA_PATHS_DIR;
++return PA_ALSA_PATHS_DIR;
+ }
+ 
+ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, 
pa_alsa_direction_t direction) {
+@@ -4383,9 +4380,7 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char 
*fname, const pa_channel
+ if (!fname)
+ fname = "default.conf";
+ 
+-fn = pa_maybe_prefix_path(fname,
+-  pa_run_from_build_tree() ? PA_SRCDIR 
"/modules/alsa/mixer/profile-sets/" :
+-  PA_ALSA_PROFILE_SETS_DIR);
++fn = pa_maybe_prefix_path(fname, PA_ALSA_PROFILE_SETS_DIR);
+ 
+ r = pa_config_parse(fn, NULL, items, NULL, false, ps);
+ pa_xfree(fn);
+diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
+index 873f86a..937bac6 100644
+--- a/src/pulsecore/core-util.c
 b/src/pulsecore/core-util.c
+@@ -3397,17 +3397,7 @@ void pa_reset_personality(void) {
+ }
+ 
+ bool pa_run_from_build_tree(void) {
+-char *rp;
+-static bool b = false;
+-
+-PA_ONCE_BEGIN {
+-if ((rp = pa_readlink("/proc/self/exe"))) {
+-b = pa_startswith(rp, PA_BUILDDIR);
+-pa_xfree(rp);
+-}
+-} PA_ONCE_END;
+-
+-return b;
++return false;
+ }
+ 
+ const char *pa_get_temp_dir(void) {
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb 
b/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb
index a50b5a0..c9c2d2d 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_11.1.bb
@@ -5,10 +5,20 @@ SRC_URI = 
"http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
file://0001-client-conf-Add-allow-autospawn-for-root.patch \
file://volatiles.04_pulse \
 "
+
+SRC_URI_append_class-target = " \
+   file://no-builddir.patch \
+"
+
 SRC_URI[md5sum] = "390de38231d5cdd6b43ada8939eb74f1"
 SRC_URI[sha256sum] = 
"f2521c525a77166189e3cb9169f75c2ee2b82fa3fcf9476024fbc2c3a6c9cd9e"
 
-do_compile_prepend() {
+inherit compiler-options
+
+do_compile() {
 mkdir -p ${S}/libltdl
+sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${B}/config.h
 cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+cc_extra=$(file_prefix_map_option_supported ${CC})
+oe_runmake CFLAGS="${CF

[OE-core] [PATCH 0/4] Refactor usage of gcc -ffile-prefix-map

2017-12-13 Thread Juro Bystricky
The gcc that comes with OE-core supports a compiler option -ffile-prefix-map.
This option is essential in order to support binary reproducibility of packages
built from sources containing absolute paths due to various __FILE__ macros.
These can contain absolute path names of source code files as encountered on
the build host machine.
This affects basically all 150+ packaged kernel-module*, out of tree modules
(everybody inheriting module.bbclass, i.e. lttng-modules) and potentially 
individual
recipes.

While this compiler options is very useful, the presence cannot be assumed as
we may be building using an external toolchain. The detection code was already 
present
in kernel.bbclass. Since we may want to use this option (if present) in 
additional places,
it makes sense putting the detection code in a separate bbclass as opposed to 
replicating it
each time.
Not being aware of any better place, I put the code into a new bbclass 
"compiler-options.bbclass"

This patchset refactors kernel.bbclass and module.bbclass to use the new 
compiler-options.bbclass.
For a good measure the patcheset also contains a modified recipe for pulsaudio, 
demonstrating
how to use the compiler-options in a recipe.


Juro Bystricky (4):
  compiler-options.bbclass: provide and validate options
  kernel.bbclass: use class compiler-options
  module.bbclass: improve reproducibility
  pulseaudio: improve reproducibility

 meta/classes/compiler-options.bbclass  | 24 +++
 meta/classes/kernel.bbclass| 15 +
 meta/classes/module.bbclass|  5 +-
 .../pulseaudio/pulseaudio/no-builddir.patch| 74 ++
 .../pulseaudio/pulseaudio_11.1.bb  | 12 +++-
 5 files changed, 115 insertions(+), 15 deletions(-)
 create mode 100644 meta/classes/compiler-options.bbclass
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/no-builddir.patch

-- 
2.7.4

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


[OE-core] [PATCH] ltp: improve reproducibility

2017-11-22 Thread Juro Bystricky
ltp package contains several gzipped files.
Improve reproducibility of the build by ensuring the gzipped files
do not contain timestamps in their headers.

https://wiki.debian.org/ReproducibleBuilds/TimestampsInGzipHeaders

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../ltp/ltp/0038-generate-reproducible-gzip.patch| 20 
 meta/recipes-extended/ltp/ltp_20170929.bb|  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0038-generate-reproducible-gzip.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0038-generate-reproducible-gzip.patch 
b/meta/recipes-extended/ltp/ltp/0038-generate-reproducible-gzip.patch
new file mode 100644
index 000..0153ace
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0038-generate-reproducible-gzip.patch
@@ -0,0 +1,20 @@
+Do not generate timestamps in gzipped file headers.
+The timestamps prevent reproducible build.
+
+Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/233]
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+diff --git a/testcases/network/generate.sh b/testcases/network/generate.sh
+index 00216a6..939f792 100755
+--- a/testcases/network/generate.sh
 b/testcases/network/generate.sh
+@@ -55,7 +55,7 @@ fi
+ if [ ! -e "bin.sm" ] ; then
+   cnt=0
+   while [ $cnt -lt 5 ] ; do
+-  gzip -1 -c ascii.sm >> "bin.sm"
++  gzip -1 -c -n ascii.sm >> "bin.sm"
+   cnt=$(($cnt + 1))
+   done
+ fi
diff --git a/meta/recipes-extended/ltp/ltp_20170929.bb 
b/meta/recipes-extended/ltp/ltp_20170929.bb
index 93a59b3..8a870b3 100644
--- a/meta/recipes-extended/ltp/ltp_20170929.bb
+++ b/meta/recipes-extended/ltp/ltp_20170929.bb
@@ -49,6 +49,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0035-fix-test_proc_kill-hang.patch \

file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
file://0037-ltp-fix-format-security-error.patch \
+   file://0038-generate-reproducible-gzip.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.7.4

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


[OE-core] [PATCH 2/4] grub-efi_2.02.bb: improve reproducibility

2017-11-16 Thread Juro Bystricky
Remove several build host references from modinfo.sh files.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-bsp/grub/grub-efi_2.02.bb | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/meta/recipes-bsp/grub/grub-efi_2.02.bb 
b/meta/recipes-bsp/grub/grub-efi_2.02.bb
index b949beb..44e32a8 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.02.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.02.bb
@@ -41,6 +41,16 @@ do_install_class-native() {
install -m 755 grub-mkimage ${D}${bindir}
 }
 
+do_install_append_class-target() {
+# Remove build host references...
+find "${D}" -name modinfo.sh -type f -exec \
+sed -i \
+-e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+-e 's|${DEBUG_PREFIX_MAP}||g' \
+-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+{} +
+}
+
 GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop 
iso9660 search"
 
 do_deploy() {
-- 
2.7.4

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


[OE-core] [PATCH 1/4] gnutls: improve reproducibility

2017-11-16 Thread Juro Bystricky
Sanitize generated config.h containing build host reference such as:

 #define POSIX_SHELL "/tmp/hosttools/bash"

The path for POSIX_SHELL is not only wrong for the cross-compiled target,
it also prevents reproducible build.

Prior the compilation we edit the value to:

 #define POSIX_SHELL "bash"

With this change we can build reproducible libgnutls-bin, libgnutls-dev
and libgnutls-dbg packages.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-support/gnutls/gnutls.inc | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-support/gnutls/gnutls.inc 
b/meta/recipes-support/gnutls/gnutls.inc
index 29b5dd6..5b45b27 100644
--- a/meta/recipes-support/gnutls/gnutls.inc
+++ b/meta/recipes-support/gnutls/gnutls.inc
@@ -53,6 +53,11 @@ do_configure_prepend() {
done
 }
 
+do_configure_append_class-target () {
+   # Remove build host references from config.h
+   sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${B}/config.h
+}
+
 PACKAGES =+ "${PN}-openssl ${PN}-xx"
 
 FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
-- 
2.7.4

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


[OE-core] [PATCH 3/4] x11perf: improve reproducibility

2017-11-16 Thread Juro Bystricky
Remove build host refeences.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb 
b/meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb
index 4e93558..a06aa26 100644
--- a/meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb
+++ b/meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb
@@ -13,6 +13,10 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=428ca4d67a41fcd4fc3283dce9bbda7e \
 
 PE = "1"
 
+do_install_append_class-target () {
+sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${bindir}/x11perfcomp
+}
+
 FILES_${PN} += "${libdir}/X11/x11perfcomp/*"
 
 SRC_URI[md5sum] = "f0b24e4d8beb622a419e8431e1c03cd7"
-- 
2.7.4

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


[OE-core] [PATCH 4/4] sudo: improve reproducibility

2017-11-16 Thread Juro Bystricky
Delete various build host references from the internally
generated file sudo_usage.h. The references get compiled into
executables, which leads to non-reproducible builds.
The removed references (configure options) were only used as part
of the sudo "usage", and even then only when ran as root.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-extended/sudo/sudo.inc | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-extended/sudo/sudo.inc 
b/meta/recipes-extended/sudo/sudo.inc
index 8c16d83..80ec0ae 100644
--- a/meta/recipes-extended/sudo/sudo.inc
+++ b/meta/recipes-extended/sudo/sudo.inc
@@ -27,6 +27,12 @@ EXTRA_OECONF_append_libc-musl = " --disable-hardening "
 
 # mksigname/mksiglist are used on build host to generate source files
 do_compile_prepend () {
+   # Remove build host references from sudo_usage.h
+   sed -i  \
+   -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's,--build=${BUILD_SYS},,g' \
+   -e 's,--host=${HOST_SYS},,g' \
+   ${B}/src/sudo_usage.h
oe_runmake SSP_CFLAGS="" SSP_LDFLAGS="" CC="$BUILD_CC" 
CFLAGS="$BUILD_CFLAGS" CPPFLAGS="$BUILD_CPPFLAGS -I${S}/include -I${S} -I${B}"  
-C lib/util mksigname mksiglist
 }
 
-- 
2.7.4

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


[OE-core] [PATCH 0/4] improve reproducibility of several packages

2017-11-16 Thread Juro Bystricky
These are independent patches with the same theme: leaking build host
information in various distributed files.


Juro Bystricky (4):
  gnutls: improve reproducibility
  grub-efi_2.02.bb: improve reproducibility
  x11perf: improve reproducibility
  sudo: improve reproducibility

 meta/recipes-bsp/grub/grub-efi_2.02.bb  | 10 ++
 meta/recipes-extended/sudo/sudo.inc |  6 ++
 meta/recipes-graphics/xorg-app/x11perf_1.6.0.bb |  4 
 meta/recipes-support/gnutls/gnutls.inc  |  5 +
 4 files changed, 25 insertions(+)

-- 
2.7.4

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


[OE-core] [PATCH] curl_7.54.1.bb: improve reproducibility

2017-10-30 Thread Juro Bystricky
Improve reproducible build of curl-dev and curl-dbg packages.

curl-dev: Correctly remove build host references from curl-config
curl-dbg: Do not generate time stamps in files generated by mkhelp.pl

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../curl/curl/reproducible-mkhelp.patch| 32 ++
 meta/recipes-support/curl/curl_7.54.1.bb   | 10 ++-
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/curl/curl/reproducible-mkhelp.patch

diff --git a/meta/recipes-support/curl/curl/reproducible-mkhelp.patch 
b/meta/recipes-support/curl/curl/reproducible-mkhelp.patch
new file mode 100644
index 000..268bbeb
--- /dev/null
+++ b/meta/recipes-support/curl/curl/reproducible-mkhelp.patch
@@ -0,0 +1,32 @@
+From 1fe92fd3dd64c7228f6ff41e3fc16c4f2392471a Mon Sep 17 00:00:00 2001
+From: Juro Bystricky <juro.bystri...@intel.com>
+Date: Fri, 27 Oct 2017 08:28:25 -0700
+Subject: mkhelp.pl: support reproducible build
+
+Do not generate line with the current date, such as:
+
+* Generation time: Tue Oct-24 18:01:41 2017
+
+This will improve reproducibility. The generated string is only
+part of a comment, so there should be no adverse consequences.
+
+Upstream-Status: Submitted [ https://github.com/curl/curl/pull/2026 ]
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+diff --git a/src/mkhelp.pl b/src/mkhelp.pl
+index 270daa2..757f024 100755
+--- a/src/mkhelp.pl
 b/src/mkhelp.pl
+@@ -102,11 +102,9 @@ while() {
+ }
+ close(READ);
+ 
+-$now = localtime;
+ print <http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
file://CVE-2017-1000101.patch \
 "
 
+SRC_URI_append_class-target = " \
+   file://reproducible-mkhelp.patch \
+"
+
 # curl likes to set -g0 in CFLAGS, so we stop it
 # from mucking around with debug options
 #
@@ -63,7 +67,11 @@ do_install_append() {
 
 do_install_append_class-target() {
# cleanup buildpaths from curl-config
-   sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/curl-config
+   sed -i \
+   -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   ${D}${bindir}/curl-config
 }
 
 PACKAGES =+ "lib${BPN}"
-- 
2.7.4

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


[OE-core] [PATCH] e2fsprogs-ptest: improve reproducibility

2017-10-25 Thread Juro Bystricky
Remove several Makefiles containing build host references.
While at it, also remove some additional files not needed for
testing.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
index 7fba8eb..00093cc 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb
@@ -109,4 +109,9 @@ do_install_ptest() {
cp -R --no-dereference --preserve=mode,links -v ${B}/tests 
${D}${PTEST_PATH}/test
cp -R --no-dereference --preserve=mode,links -v ${S}/tests/* 
${D}${PTEST_PATH}/test
sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
+
+   # Remove various files
+   find "${D}${PTEST_PATH}" -type f \
+   \( -name 'Makefile' -o -name 'Makefile.in' -o -name '*.o' -o -name 
'*.c' -o -name '*.h' \)\
+   -exec  rm -f {} +
 }
-- 
2.7.4

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


[OE-core] [PATCH] gobject-introspection: improve reproducibility

2017-10-24 Thread Juro Bystricky
Remove cross-compiler wrappers from the package, these contain numerous
build host references.
The wrappers are only needed for cross-compiling.

[YOCTO #11705]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../gobject-introspection/gobject-introspection_1.52.1.bb| 9 +
 1 file changed, 9 insertions(+)

diff --git 
a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb 
b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
index 605f02e..3fe71a3 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
@@ -177,3 +177,12 @@ gi_ldsoconf_sysroot_preprocess () {
echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" 
>> $dest
chmod 755 $dest
 }
+
+# Remove wrapper files from the package, only used for cross-compiling
+PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess"
+gi_package_preprocess() {
+   rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper
+   rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper
+   rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper
+   rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper
+}
-- 
2.7.4

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


[OE-core] [PATCH v2] gmp-6.1.2: add ptest support

2017-10-24 Thread Juro Bystricky
GMP library contains code highly optimized for the host processor.
The test suite for GMP is considered critical.
GMP is heavily used in cryptography, internet security applications,
GCC..., etc. Therefore it is only prudent to have a test suite available.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../gmp/gmp-6.1.2/avoid-parallel-tests.patch   | 28 ++
 meta/recipes-support/gmp/gmp-6.1.2/run-ptest   | 22 +
 meta/recipes-support/gmp/gmp_6.1.2.bb  | 21 
 3 files changed, 71 insertions(+)
 create mode 100644 
meta/recipes-support/gmp/gmp-6.1.2/avoid-parallel-tests.patch
 create mode 100644 meta/recipes-support/gmp/gmp-6.1.2/run-ptest

diff --git a/meta/recipes-support/gmp/gmp-6.1.2/avoid-parallel-tests.patch 
b/meta/recipes-support/gmp/gmp-6.1.2/avoid-parallel-tests.patch
new file mode 100644
index 000..abc33ef
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp-6.1.2/avoid-parallel-tests.patch
@@ -0,0 +1,28 @@
+
+The target buildtest-TESTS is only supported via serial-tests.
+We also need to add buildest-TESTS to AM_EXTRA_RECURSIVE_TARGETS,
+otherwise most tests will be not built.
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+
+--- a/configure.ac 2017-10-24 09:19:31.439004000 -0700
 b/configure.ac 2017-10-24 10:33:08.850059434 -0700
+@@ -77,7 +77,7 @@
+ dnl  Note that there's a copy of these options in the top-level Makefile.am,
+ dnl  so update there too if changing anything.
+ dnl
+-AM_INIT_AUTOMAKE([1.8 gnu no-dependencies])
++AM_INIT_AUTOMAKE([1.8 gnu no-dependencies serial-tests])
+ AC_CONFIG_HEADERS(config.h:config.in)
+ AM_MAINTAINER_MODE
+ 
+@@ -3936,3 +3936,6 @@
+  ;;
+esac
+ fi
++
++AM_EXTRA_RECURSIVE_TARGETS([buildtest-TESTS])
++
diff --git a/meta/recipes-support/gmp/gmp-6.1.2/run-ptest 
b/meta/recipes-support/gmp/gmp-6.1.2/run-ptest
new file mode 100644
index 000..ef4f76f
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp-6.1.2/run-ptest
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+passed=0
+failed=0
+
+output() {
+  if [ $? -eq 0 ]
+then 
+echo "PASS: $i"
+passed=$((passed + 1))
+else 
+echo "FAIL: $i"
+failed=$((failed + 1))
+  fi
+}
+
+cd tests
+for i in `ls *`; do ./$i ; output; done
+
+echo "=== Test Summary ==="
+echo "PASSED: ${passed}"
+echo "FAILED: ${failed}"
diff --git a/meta/recipes-support/gmp/gmp_6.1.2.bb 
b/meta/recipes-support/gmp/gmp_6.1.2.bb
index b008710..fa60dc7 100644
--- a/meta/recipes-support/gmp/gmp_6.1.2.bb
+++ b/meta/recipes-support/gmp/gmp_6.1.2.bb
@@ -14,6 +14,12 @@ SRC_URI = 
"https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \

file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
"
+   
+SRC_URI_append_class-target =" \
+   file://run-ptest \
+   file://avoid-parallel-tests.patch \
+   "
+   
 SRC_URI[md5sum] = "8ddbb26dc3bd4e2302984debba1406a5"
 SRC_URI[sha256sum] = 
"5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2"
 
@@ -34,6 +40,21 @@ do_install_prepend_class-target() {
 
 SSTATE_SCAN_FILES += "gmp.h"
 
+inherit ptest
+
+do_compile_ptest() {
+oe_runmake -C ${B}/tests buildtest-TESTS
+}
+
+do_install_ptest() {
+install -d ${D}${PTEST_PATH}/tests
+for i in `find ./tests -name '.libs' -d`; do
+find $i -type f -perm -111 -exec cp {} ${D}${PTEST_PATH}/tests \;
+done
+}
+
+RDEPENDS_${PN}-ptest += "bash"
+
 # Doesn't compile in MIPS16e mode due to use of hand-written
 # assembly
 MIPS_INSTRUCTION_SET = "mips"
-- 
2.7.4

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


[OE-core] [PATCH] gmp-6.1.2: add ptest support

2017-10-24 Thread Juro Bystricky
GMP library contains code highly optimized for the host processor.
The test suite for GMP is considered critical.
GMP is heavily used in cryptography, internet security applications,
GCC..., etc. Therefore it is only prudent to have a test suite available.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../gmp/gmp-6.1.2/avoid-parallel-tests.patch   | 18 ++
 meta/recipes-support/gmp/gmp-6.1.2/run-ptest   | 22 ++
 meta/recipes-support/gmp/gmp_6.1.2.bb  | 21 +
 3 files changed, 61 insertions(+)
 create mode 100644 
meta/recipes-support/gmp/gmp-6.1.2/avoid-parallel-tests.patch
 create mode 100644 meta/recipes-support/gmp/gmp-6.1.2/run-ptest

diff --git a/meta/recipes-support/gmp/gmp-6.1.2/avoid-parallel-tests.patch 
b/meta/recipes-support/gmp/gmp-6.1.2/avoid-parallel-tests.patch
new file mode 100644
index 000..1f05a3f
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp-6.1.2/avoid-parallel-tests.patch
@@ -0,0 +1,18 @@
+--- a/configure.ac 2017-10-24 09:19:31.439004000 -0700
 b/configure.ac 2017-10-24 10:33:08.850059434 -0700
+@@ -77,7 +77,7 @@
+ dnl  Note that there's a copy of these options in the top-level Makefile.am,
+ dnl  so update there too if changing anything.
+ dnl
+-AM_INIT_AUTOMAKE([1.8 gnu no-dependencies])
++AM_INIT_AUTOMAKE([1.8 gnu no-dependencies serial-tests])
+ AC_CONFIG_HEADERS(config.h:config.in)
+ AM_MAINTAINER_MODE
+ 
+@@ -3936,3 +3936,6 @@
+  ;;
+esac
+ fi
++
++AM_EXTRA_RECURSIVE_TARGETS([buildtest-TESTS])
++
diff --git a/meta/recipes-support/gmp/gmp-6.1.2/run-ptest 
b/meta/recipes-support/gmp/gmp-6.1.2/run-ptest
new file mode 100644
index 000..ef4f76f
--- /dev/null
+++ b/meta/recipes-support/gmp/gmp-6.1.2/run-ptest
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+passed=0
+failed=0
+
+output() {
+  if [ $? -eq 0 ]
+then 
+echo "PASS: $i"
+passed=$((passed + 1))
+else 
+echo "FAIL: $i"
+failed=$((failed + 1))
+  fi
+}
+
+cd tests
+for i in `ls *`; do ./$i ; output; done
+
+echo "=== Test Summary ==="
+echo "PASSED: ${passed}"
+echo "FAILED: ${failed}"
diff --git a/meta/recipes-support/gmp/gmp_6.1.2.bb 
b/meta/recipes-support/gmp/gmp_6.1.2.bb
index b008710..fa60dc7 100644
--- a/meta/recipes-support/gmp/gmp_6.1.2.bb
+++ b/meta/recipes-support/gmp/gmp_6.1.2.bb
@@ -14,6 +14,12 @@ SRC_URI = 
"https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \

file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
"
+   
+SRC_URI_append_class-target =" \
+   file://run-ptest \
+   file://avoid-parallel-tests.patch \
+   "
+   
 SRC_URI[md5sum] = "8ddbb26dc3bd4e2302984debba1406a5"
 SRC_URI[sha256sum] = 
"5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2"
 
@@ -34,6 +40,21 @@ do_install_prepend_class-target() {
 
 SSTATE_SCAN_FILES += "gmp.h"
 
+inherit ptest
+
+do_compile_ptest() {
+oe_runmake -C ${B}/tests buildtest-TESTS
+}
+
+do_install_ptest() {
+install -d ${D}${PTEST_PATH}/tests
+for i in `find ./tests -name '.libs' -d`; do
+find $i -type f -perm -111 -exec cp {} ${D}${PTEST_PATH}/tests \;
+done
+}
+
+RDEPENDS_${PN}-ptest += "bash"
+
 # Doesn't compile in MIPS16e mode due to use of hand-written
 # assembly
 MIPS_INSTRUCTION_SET = "mips"
-- 
2.7.4

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


[OE-core] [PATCH 1/1] util-linux-ptest: various fixes

2017-10-18 Thread Juro Bystricky
The original code enabled only a sub-set of all available tests.
It also copied executables to be tested into a local folder although
the executables were expected to be already installed in the image.
In addition, the original code copied libtool scripts instead of already
cross-compiled images.

This patch modifies some test scripts so there is no need to copy
images already installed: instead it tests images already installed.
As the executables are scattered in /bin, usr/bin, /sbin/ usr/sbin folders,
we use 'which' to determine the absolute path.
We also copy some cross-compiled tests that were previously missing.

By the virtue of not copying the libtools scripts we also managed
the achieve binary reproducible package, as previously leaked build host
info was contained in libtool scripts, which are not copied anymore.

[YOCTO #10953]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/util-linux/util-linux.inc | 45 +
 1 file changed, 26 insertions(+), 19 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 5c4694b..f0ffd25 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -304,7 +304,7 @@ python populate_packages_prepend() {
 }
 
 RDEPENDS_${PN}-bash-completion += "util-linux-lsblk"
-RDEPENDS_${PN}-ptest = "bash grep coreutils"
+RDEPENDS_${PN}-ptest = "bash grep coreutils which util-linux-blkid 
util-linux-fsck btrfs-tools"
 
 do_compile_ptest() {
 oe_runmake buildtest-TESTS
@@ -312,23 +312,30 @@ do_compile_ptest() {
 
 do_install_ptest() {
 mkdir -p ${D}${PTEST_PATH}/tests/ts
-find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
-cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
-cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
-cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
-cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
+find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} 
${D}${PTEST_PATH} \;
+find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} 
${D}${PTEST_PATH} \;
+find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} 
${D}${PTEST_PATH} \;
 
-list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock 
ipcs isosize login look md5 misc more namei paths schedutils script swapon"
-# The following tests are not installed  yet:
-# blkid scsi_debug module dependent
-# cramfs gcc dependent
-# eject gcc dependent
-# fdisk scsi_debug module and gcc dependent
-# lscpu gcc dependant
-# libmount uuidgen dependent
-# mount gcc dependant
-# partx blkid dependant
-for d in $list; do
-cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
-done
+cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/
+cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
+cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/
+cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH}
+
+# The original paths of executables to be tested point to a local folder 
containing
+# the executables. We want to test the installed executables, not the 
local copies.
+# So strip the paths, the executables will be located via "which"
+sed  -i \
+ -e '/^TS_CMD/ s|$top_builddir/||g' \
+ -e '/^TS_HELPER/ s|$top_builddir|${PTEST_PATH}|g' \
+ ${D}${PTEST_PATH}/tests/commands.sh
+
+# Change 'if [ ! -x "$1" ]' to 'if [ ! -x "`which $1 2>/dev/null`"]'
+sed -i -e \
+
'/^\tif[[:space:]]\[[[:space:]]![[:space:]]-x[[:space:]]"$1"/s|$1|`which $1 
2>/dev/null`|g' \
+ ${D}${PTEST_PATH}/tests/functions.sh
+
+# "kill -L" behaves differently than "/bin/kill -L" so we need an 
additional fix
+sed -i -e \
+ '/^TS_CMD_KILL/ s|kill|/bin/kill|g' \
+ ${D}${PTEST_PATH}/tests/commands.sh
 }
-- 
2.7.4

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


[OE-core] [PATCH 0/1] util-linux-ptest fixes

2017-10-18 Thread Juro Bystricky
This patch improves util-linux ptest package.
We don't manually disable any tests, so more tests are performed.
Also, we don't leak build host info into the package anymore, so the package
is now binary reproducible.

Results before (core-image-sato-sdk-ptest):

PASS:102
FAIL:21

Results after:

PASS: 340
FAIL: 11

The remaining failing tests can be addressed individually.
For example, "kill" fails 4 tests, but it is because we
don't test "kill" from util-linux but from util-procps.
If we select different "kill" alternative:

# update-alternatives --install /bin/kill kill /bin/kill/kill.util-linux 300

We will pass all "kill" tests as well, so we end up with only 7 failing tests.
There are about 59 tests that are skipped because some components are not 
installed
in core-image-sato-sdk-ptest.
(i.e. dmsetup, mdadm, scsi_debug_module, mkfs.cramfs, sntp, uuidgen, socat...)




Juro Bystricky (1):
  util-linux-ptest: various fixes

 meta/recipes-core/util-linux/util-linux.inc | 45 +
 1 file changed, 26 insertions(+), 19 deletions(-)

-- 
2.7.4

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


[OE-core] [PATCH] nettle-ptest: fix a failing test

2017-10-13 Thread Juro Bystricky
This patch changes the result of the nettle dlopen-test
from FAIL to PASS. The test used to fail because the test could not
find and load libnettle.so.
This patch fixes this by using absolute path instead of relative.

This was the only test out of 88 that used to fail.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 .../nettle/nettle-3.3/dlopen-test.patch  | 20 
 meta/recipes-support/nettle/nettle_3.3.bb|  4 
 2 files changed, 24 insertions(+)
 create mode 100644 meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch

diff --git a/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch 
b/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch
new file mode 100644
index 000..c4f0b7e
--- /dev/null
+++ b/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch
@@ -0,0 +1,20 @@
+Replace relative path of libnettle.so with absolute path so the test
+program can find it.
+Relative paths are not suitable, as the folder strucure for ptest
+is different from the one expected by the nettle testsuite.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+--- a/testsuite/dlopen-test.c  2016-10-01 00:28:38.0 -0700
 b/testsuite/dlopen-test.c  2017-10-13 11:08:57.227572860 -0700
+@@ -9,7 +9,7 @@
+ main (int argc UNUSED, char **argv UNUSED)
+ {
+ #if HAVE_LIBDL
+-  void *handle = dlopen ("../libnettle.so", RTLD_NOW);
++  void *handle = dlopen ("/usr/lib/libnettle.so", RTLD_NOW);
+   int (*get_version)(void);
+   if (!handle)
+ {
diff --git a/meta/recipes-support/nettle/nettle_3.3.bb 
b/meta/recipes-support/nettle/nettle_3.3.bb
index b76babf..3951678 100644
--- a/meta/recipes-support/nettle/nettle_3.3.bb
+++ b/meta/recipes-support/nettle/nettle_3.3.bb
@@ -11,5 +11,9 @@ SRC_URI += "\
 file://check-header-files-of-openssl-only-if-enable_.patch \
 "
 
+SRC_URI_append_class-target = "\
+file://dlopen-test.patch \
+"
+
 SRC_URI[md5sum] = "10f969f78a463704ae73529978148dbe"
 SRC_URI[sha256sum] = 
"46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e"
-- 
2.7.4

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


[OE-core] [PATCH] gawk-ptest: fix a failing test

2017-10-13 Thread Juro Bystricky
This patch changes the result of the "include" test
from FAIL to PASS. The test used to fail as the test prerequisite
was missing.
This was the only test out of 298 that used to fail.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-extended/gawk/gawk_4.1.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/gawk/gawk_4.1.4.bb 
b/meta/recipes-extended/gawk/gawk_4.1.4.bb
index 04451f7..995d37d 100644
--- a/meta/recipes-extended/gawk/gawk_4.1.4.bb
+++ b/meta/recipes-extended/gawk/gawk_4.1.4.bb
@@ -41,7 +41,7 @@ inherit ptest
 
 do_install_ptest() {
mkdir ${D}${PTEST_PATH}/test
-   for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: 
'{print $1}'` Maketests; \
+   for i in `grep -vE "@|^$|#|Gt-dummy" ${S}/test/Maketests |awk -F: 
'{print $1}'` Maketests inclib.awk; \
  do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
done
 }
-- 
2.7.4

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


[OE-core] [PATCH] e2fsprogs: modify ptest script

2017-10-06 Thread Juro Bystricky
e2fsprog testsuite used to log results into its own log file into
/usr/lib/e2fsprogs/ptest/test.log. Therefore console output was not available 
and
redirecting ptest-runner output into a log file would not capture output of any
individual tests. So overall the whole e2fsprogs testsuite consisting of about
300 tests was evaluated as a single test.

This patch ensures the e2fsprogs test_script output is not automatically 
redirected
while executing during run-ptest. Any redirection is up to the user.
Additionally, the results of tests are prefixed by more canonical "PASS:" FAIL:"
based on the actual test results.

Aditionally, remove various files created by the testsuite.

[YOCTO #12146]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest 
b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
index e02fc7f..ef10b08 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
@@ -1,11 +1,10 @@
 #!/bin/sh
 
 cd ./test
-./test_script &>../test.log
-if [ $? -eq 0 ]
-then
-   echo "PASS: e2fsprogs"
-   rm ../test.log
-else
-   echo "FAIL: e2fsprogs"
-fi
+./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e 
'/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /'
+rm -rf /var/volatile/tmp/*e2fsprogs*
+rm -f tmp-*
+rm -f *.tmp
+rm -f *.ok
+rm -f *.failed
+rm -f *.log
-- 
2.7.4

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


[OE-core] [PATCH] bash-ptest: install additional locales

2017-10-05 Thread Juro Bystricky
bash-ptest fails several tests. This patch fixes:

FAIL: run-intl

The test used to fail because of missing locales (fr_FR, de_DE)

[YOCTO #12145]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-extended/bash/bash.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index f6cb7e4..f5338c8 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -24,6 +24,8 @@ ALTERNATIVE_PRIORITY = "100"
 RDEPENDS_${PN} += "base-files"
 RDEPENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest_append_libc-glibc += " locale-base-fr-fr 
locale-base-de-de"
+DEPENDS_ptest_append_libc-glibc += " locale-base-fr-fr locale-base-de-de"
 
 USERADD_PACKAGES = "${PN}-ptest"
 USERADD_PARAM_${PN}-ptest = "--create-home --user-group test"
-- 
2.7.4

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


[OE-core] [PATCH] python-ptest: various fixes

2017-10-05 Thread Juro Bystricky
python-ptest needs python-tests package installed in order to
run any tests.
This patch adds python-tests as a runtime dependency, so the test suite
will be present in the image.
While in there, also removed several build host references.

[YOCTO #12144]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/python/python_2.7.13.bb | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python_2.7.13.bb 
b/meta/recipes-devtools/python/python_2.7.13.bb
index 4d73cd2..8770699 100644
--- a/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/meta/recipes-devtools/python/python_2.7.13.bb
@@ -154,7 +154,7 @@ FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
 PACKAGES += "${PN}-misc"
 FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
 RDEPENDS_${PN}-modules += "${PN}-misc"
-RDEPENDS_${PN}-ptest = "${PN}-modules"
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
 #inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so 
PACKAGES doesn't get overwritten
 inherit ptest
 
@@ -164,6 +164,16 @@ do_install_ptest() {
sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
 -e s:LIBDIR:${libdir}:g \
 -i ${D}${PTEST_PATH}/run-ptest
+
+   #Remove build host references
+   sed -i \
+   -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+   -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${RECIPE_SYSROOT}::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+   ${D}/${PTEST_PATH}/Makefile
 }
 
 # catch manpage
-- 
2.7.4

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


[OE-core] [PATCH v2] siteinfo: nios2-linux - remove wrong mutex info

2017-10-03 Thread Juro Bystricky
With the commit f4e8e9242c5df095b52688b083df3c9d36e7144b some nios2 builds
(uboot, core-image-minimal, etc) were broken due to db trying to use ARM 
instructions
in mutexes. The reason was db "configure" used the cached entry from nios2-linux
(which was incorrect). So the remedy was to remove the incorrect cached entry
and let db "configure" figure out which is the proper mutex to use.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/site/nios2-linux | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/site/nios2-linux b/meta/site/nios2-linux
index 2f4e570..5bae748 100644
--- a/meta/site/nios2-linux
+++ b/meta/site/nios2-linux
@@ -33,7 +33,6 @@ db_cv_path_sh=${db_cv_path_sh=/bin/sh}
 db_cv_path_strip=${db_cv_path_strip=/usr/bin/strip}
 db_cv_align_t=${db_cv_align_t='unsigned long long'}
 db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
-db_cv_mutex=${db_cv_mutex=ARM/gcc-assembly}
 db_cv_posixmutexes=${db_cv_posixmutexes=no}
 db_cv_uimutexes=${db_cv_uimutexes=no}
 
-- 
2.7.4

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


[OE-core] [PATCH] siteinfo: nios2-linux - remove wrong mutex info

2017-10-03 Thread Juro Bystricky
This fixes broken nios2 builds that involve db recipes.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/site/nios2-linux | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/site/nios2-linux b/meta/site/nios2-linux
index 2f4e570..5bae748 100644
--- a/meta/site/nios2-linux
+++ b/meta/site/nios2-linux
@@ -33,7 +33,6 @@ db_cv_path_sh=${db_cv_path_sh=/bin/sh}
 db_cv_path_strip=${db_cv_path_strip=/usr/bin/strip}
 db_cv_align_t=${db_cv_align_t='unsigned long long'}
 db_cv_alignp_t=${db_cv_alignp_t='unsigned long'}
-db_cv_mutex=${db_cv_mutex=ARM/gcc-assembly}
 db_cv_posixmutexes=${db_cv_posixmutexes=no}
 db_cv_uimutexes=${db_cv_uimutexes=no}
 
-- 
2.7.4

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


[OE-core] [PATCH] grub_2.02.bb: improve reproducibility

2017-09-25 Thread Juro Bystricky
Remove several build host references from modinfo.sh files.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-bsp/grub/grub_2.02.bb | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-bsp/grub/grub_2.02.bb 
b/meta/recipes-bsp/grub/grub_2.02.bb
index 57c6559..b8055e7 100644
--- a/meta/recipes-bsp/grub/grub_2.02.bb
+++ b/meta/recipes-bsp/grub/grub_2.02.bb
@@ -8,6 +8,13 @@ FILES_grub-editenv = "${bindir}/grub-editenv"
 
 do_install_append () {
 install -d ${D}${sysconfdir}/grub.d
+# Remove build host references...
+find "${D}" -name modinfo.sh -type f -exec \
+sed -i \
+-e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+-e 's|${DEBUG_PREFIX_MAP}||g' \
+-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+{} +
 }
 
 INSANE_SKIP_${PN} = "arch"
-- 
2.7.4

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


[OE-core] [PATCH 0/3] libxml2-ptest: various fixes

2017-09-25 Thread Juro Bystricky
This patch-set contains three independent patches for libxml2-ptest.
The first one removes all build host references from the libxml2-ptest package.
While testing this patch, I noticed that some test were failing, but for
unrelated reasons. I added two fixes that address two different causes of
failures. With these fixes we get 133 tests passed, 0 failed.
(Previously it was 36 passed 3 failed, or something like that)


Juro Bystricky (3):
  libxml2-ptest: improve reproducibility
  libxml2-ptest: support for encoding ISO-8859-5
  libxml2-ptest: set LC_ALL=en_US.UTF-8

 meta/recipes-core/libxml/libxml2/run-ptest |  1 +
 meta/recipes-core/libxml/libxml2_2.9.4.bb  | 15 +--
 2 files changed, 14 insertions(+), 2 deletions(-)

-- 
2.7.4

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


[OE-core] [PATCH 1/3] libxml2-ptest: improve reproducibility

2017-09-25 Thread Juro Bystricky
Remove various build host references from libxml-ptest package.

[YOCTO #11997]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/libxml/libxml2_2.9.4.bb | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/meta/recipes-core/libxml/libxml2_2.9.4.bb 
b/meta/recipes-core/libxml/libxml2_2.9.4.bb
index 107539b..15d5e36 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.4.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.4.bb
@@ -89,6 +89,17 @@ do_install_ptest () {
grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
xargs -0 sed -i -e 
's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
fi
+   #Remove build host references from various Makefiles
+   find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
+   sed -i \
+   -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+   -e 's:${RECIPE_SYSROOT}::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+   -e '/^RELDATE/d' \
+   {} +
 }
 
 do_install_append_class-native () {
-- 
2.7.4

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


[OE-core] [PATCH 2/3] libxml2-ptest: support for encoding ISO-8859-5

2017-09-25 Thread Juro Bystricky
This fixes the error:

./test/errors/759398.xml:1: parser error : Unsupported encoding ISO-8859-5

 ^
./test/errors/759398.xml : failed to parse
FAIL: Error cases stream regression tests

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/libxml/libxml2_2.9.4.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/libxml/libxml2_2.9.4.bb 
b/meta/recipes-core/libxml/libxml2_2.9.4.bb
index 15d5e36..ec2d25a 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.4.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.4.bb
@@ -53,11 +53,11 @@ RDEPENDS_${PN}-ptest += "make 
${@bb.utils.contains('PACKAGECONFIG', 'python', 'l
 
 RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 
'python3-core', '', d)}"
 
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us 
glibc-gconv-ibm1141"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us 
glibc-gconv-ibm1141 glibc-gconv-iso8859-5"
 
 export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
 
-# WARNING: zlib is require for RPM use
+# WARNING: zlib is required for RPM use
 EXTRA_OECONF = "--without-debug --without-legacy --with-catalog 
--without-docbook --with-c14n --without-lzma --with-fexceptions"
 EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n 
--without-lzma --with-zlib"
 EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n 
--without-lzma --with-zlib"
-- 
2.7.4

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


[OE-core] [PATCH 3/3] libxml2-ptest: set LC_ALL=en_US.UTF-8

2017-09-25 Thread Juro Bystricky
We need to specify UTF-8 in the environment to avoid an error
such as:

UnicodeEncodeError: 'ascii' codec can't encode character '\xe4'

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/libxml/libxml2/run-ptest | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/libxml/libxml2/run-ptest 
b/meta/recipes-core/libxml/libxml2/run-ptest
index 473d0b6..c313d83 100644
--- a/meta/recipes-core/libxml/libxml2/run-ptest
+++ b/meta/recipes-core/libxml/libxml2/run-ptest
@@ -1,3 +1,4 @@
 #!/bin/sh
 
+export LC_ALL=en_US.UTF-8
 make -k runtests
-- 
2.7.4

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


[OE-core] [PATCH] strace_4.18.bb: improve reproducibility

2017-09-20 Thread Juro Bystricky
Remove build host references from strace-ptest package.
Also removed some unneeded timestaps.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/strace/strace_4.18.bb | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/strace/strace_4.18.bb 
b/meta/recipes-devtools/strace/strace_4.18.bb
index bbb82a9..e8fd048 100644
--- a/meta/recipes-devtools/strace/strace_4.18.bb
+++ b/meta/recipes-devtools/strace/strace_4.18.bb
@@ -42,7 +42,16 @@ do_compile_ptest() {
 
 do_install_ptest() {
oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} 
DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
-   sed -i -e '/^src/s/strace.*[1-9]/ptest/' 
${D}/${PTEST_PATH}/${TESTDIR}/Makefile
+   sed -i -e '/^src/s/strace.*[1-9]/ptest/' \
+   -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+   -e 's:${RECIPE_SYSROOT}::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+   -e '/^DEB_CHANGELOGTIME/d' \
+   -e '/^RPM_CHANGELOGTIME/d' \
+   ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
 }
 
 BBCLASSEXTEND = "native"
-- 
2.7.4

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


[OE-core] [PATCH] gzip_1.8.bb: improve reproducibility

2017-09-20 Thread Juro Bystricky
Remove build host references from gzip-ptest package.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-extended/gzip/gzip_1.8.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-extended/gzip/gzip_1.8.bb 
b/meta/recipes-extended/gzip/gzip_1.8.bb
index a0dec14..d093207 100644
--- a/meta/recipes-extended/gzip/gzip_1.8.bb
+++ b/meta/recipes-extended/gzip/gzip_1.8.bb
@@ -27,6 +27,10 @@ do_install_ptest() {
 -e 's/^AWK = ..*/AWK = awk/'\
 -e 's/^srcdir = ..*/srcdir = \./'   \
 -e 's/^Makefile: ..*/Makefile: /'   \
+-e 's,--sysroot=${STAGING_DIR_TARGET},,g'   \
+-e 's|${DEBUG_PREFIX_MAP}||g' \
+-e 's:${HOSTTOOLS_DIR}/::g' \
+-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
 ${B}/tests/Makefile > ${D}${PTEST_PATH}/src/tests/Makefile
 }
 
-- 
2.7.4

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


[OE-core] [PATCH 1/1] gcc-6.3.inc: Use ucontext_t not struct ucontext.

2017-09-14 Thread Juro Bystricky
Use ucontext_t not struct ucontext in linux-unwind.h files.

Current glibc no longer gives the ucontext_t type the tag struct
ucontext, to conform with POSIX namespace rules.  This requires
various linux-unwind.h files in libgcc, that were previously using
struct ucontext, to be fixed to use ucontext_t instead.  This is
similar to the removal of the struct siginfo tag from siginfo_t some
years ago.

Backport of patches by Joseph Myers, taken from
https://gcc.gnu.org/viewcvs/gcc?limit_changes=0=revision=249957

[YOCTO #12083]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/gcc/gcc-6.3.inc  |   1 +
 .../gcc/gcc-6.3/0055-unwind_h-glibc26.patch| 139 +
 2 files changed, 140 insertions(+)
 create mode 100644 
meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch

diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc 
b/meta/recipes-devtools/gcc/gcc-6.3.inc
index 86b3e9f..ec6d8cd 100644
--- a/meta/recipes-devtools/gcc/gcc-6.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-6.3.inc
@@ -74,6 +74,7 @@ SRC_URI = "\

file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
file://0048-sync-gcc-stddef.h-with-musl.patch \
file://0054_all_nopie-all-flags.patch \
+   file://0055-unwind_h-glibc26.patch \
${BACKPORTS} \
 "
 BACKPORTS = "\
diff --git a/meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch 
b/meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch
new file mode 100644
index 000..c266cfe
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch
@@ -0,0 +1,139 @@
+Backport and edit of patches from:
+https://gcc.gnu.org/viewcvs/gcc?limit_changes=0=revision=249957
+by jsm28 (Joseph Myers)
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules.  This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead.  This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead.  As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
+
+--- branches/gcc-6-branch/libgcc/config/aarch64/linux-unwind.h 2017/07/04 
10:22:56 249956
+--- b/libgcc/config/aarch64/linux-unwind.h 2017/07/04 10:23:57 249957
+@@ -52,7 +52,7 @@
+   struct rt_sigframe
+   {
+ siginfo_t info;
+-struct ucontext uc;
++ucontext_t uc;
+   };
+ 
+   struct rt_sigframe *rt_;
+--- branches/gcc-6-branch/libgcc/config/alpha/linux-unwind.h   2017/07/04 
10:22:56 249956
+--- b/libgcc/config/alpha/linux-unwind.h   2017/07/04 10:23:57 249957
+@@ -51,7 +51,7 @@
+ {
+   struct rt_sigframe {
+   siginfo_t info;
+-  struct ucontext uc;
++  ucontext_t uc;
+   } *rt_ = context->cfa;
+   sc = _->uc.uc_mcontext;
+ }
+--- branches/gcc-6-branch/libgcc/config/bfin/linux-unwind.h2017/07/04 
10:22:56 249956
+--- b/libgcc/config/bfin/linux-unwind.h2017/07/04 10:23:57 249957
+@@ -52,7 +52,7 @@
+   void *puc;
+   char retcode[8];
+   siginfo_t info;
+-  struct ucontext uc;
++  ucontext_t uc;
+   } *rt_ = context->cfa;
+ 
+   /* The void * cast is necessary to avoid an aliasing warning.
+--- branches/gcc-6-branch/libgcc/config/i386/linux-unwind.h2017/07/04 
10:22:56 249956
+--- b/libgcc/config/i386/linux-unwind.h2017/07/04 10:23:57 249957
+@@ -58,7 +58,7 @@
+   if (*(unsigned char *)(pc+0) == 0x48
+   && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+-  struct ucontext *uc_ = context->cfa;
++  ucontext_t *uc_ = context->cfa;
+   /* The void * cast is necessary to avoid an aliasing warning.
+  The aliasing warning is correct, but should not be a problem
+  because it does not alias anything.  */
+@@ -138,7 +138,7 @@
+   siginfo_t *pinfo;
+   void *puc;
+   siginfo_t info;
+-  struct ucontext uc;
++  ucontext_t uc;
+   } *rt_ = context->cfa;
+   /* The void * cast is necessary to avoid an aliasing warning.
+  The aliasing warning is correct, but should not be a problem
+--- branches/gcc-6-branch/libgcc/config/m68k/linux-unwind.h2017/07/04 
10:22:56 249956
+--- b/libgcc/config/m68k/linux-unwind.h2017/07/04 10:23:57 249957
+@@ -33,7 +33,7 @@
+ /*  is unfortunately broken right now.  */
+ struct uw_ucontext {
+   unsigned long uc_flags;
+-  struct ucontext  *uc_link;
++  ucontext_t   *uc_link;
+   stack_t   uc_stack;
+   mcontext_tuc_mcontext;
+   unsign

[OE-core] [PATCH 0/1] gcc 6.3 with glib 2.26

2017-09-14 Thread Juro Bystricky
When one chooses to use gcc 6.3 with
GCCVERSION = "6.3%"
bitbake libgcc fails.

This patch fixes building this particular issue.
However, there is at least one more recipe that fails with gcc 6.3
(mesa_17.1.7.bb).

Juro Bystricky (1):
  gcc-6.3.inc: Use ucontext_t not struct ucontext.

 meta/recipes-devtools/gcc/gcc-6.3.inc  |   1 +
 .../gcc/gcc-6.3/0055-unwind_h-glibc26.patch| 139 +
 2 files changed, 140 insertions(+)
 create mode 100644 
meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch

-- 
2.7.4

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


[OE-core] [PATCH] qemurunner.py: wait for PID to appear in procfs

2017-09-12 Thread Juro Bystricky
We need QEMU PID in order to access "/proc//cmdline"
Having a valid QEMU PID does not mean we can access the proc entry
immediately, we need to wait for the /proc/ to appear
before we can access it.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/lib/oeqa/utils/qemurunner.py | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py 
b/meta/lib/oeqa/utils/qemurunner.py
index 9073315..427ae23 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -394,9 +394,10 @@ class QemuRunner:
 f = open(self.qemu_pidfile, 'r')
 qemu_pid = f.read()
 f.close()
-#logger.info("qemu_pid: %s" % qemu_pid)
-self.qemupid = int(qemu_pid)
-return True
+qemupid = int(qemu_pid)
+if os.path.exists("/proc/" + str(qemupid)):
+self.qemupid = qemupid
+return True
 return False
 
 def run_serial(self, command, raw=False, timeout=5):
-- 
2.7.4

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


[OE-core] [PATCH 1/1] qemurunner.py: refactor searching for QEMU PID

2017-09-06 Thread Juro Bystricky
Ask QEMU to store the QEMU process PID in a file, this way we don't
have to parse running processes and analyze descendents.
This is done via QEMU command line argument "-pidfile".

[YOCTO #12001]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/lib/oeqa/utils/qemurunner.py | 303 +-
 1 file changed, 136 insertions(+), 167 deletions(-)

diff --git a/meta/lib/oeqa/utils/qemurunner.py 
b/meta/lib/oeqa/utils/qemurunner.py
index 54312fb..c28c2ce 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -56,6 +56,7 @@ class QemuRunner:
 self.use_kvm = use_kvm
 
 self.runqemutime = 120
+self.qemu_pidfile = 'pidfile_'+str(os.getpid())
 self.host_dumper = HostDumper(dump_host_cmds, dump_dir)
 
 def create_socket(self):
@@ -143,7 +144,11 @@ class QemuRunner:
 if extra_bootparams:
 bootparams = bootparams + ' ' + extra_bootparams
 
-self.qemuparams = 'bootparams="{0}" qemuparams="-serial 
tcp:127.0.0.1:{1}"'.format(bootparams, threadport)
+# Ask QEMU to store the QEMU process PID in file, this way we don't 
have to parse running processes
+# and analyze descendents in order to determine it.
+if os.path.exists(self.qemu_pidfile):
+os.remove(self.qemu_pidfile)
+self.qemuparams = 'bootparams="{0}" qemuparams="-serial 
tcp:127.0.0.1:{1} -pidfile {2}"'.format(bootparams, threadport, 
self.qemu_pidfile)
 if qemuparams:
 self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + 
'\"'
 
@@ -199,125 +204,14 @@ class QemuRunner:
 self.stop()
 logger.info("Output from runqemu:\n%s" % 
self.getOutput(output))
 return False
-time.sleep(1)
+time.sleep(0.5)
 
-out = self.getOutput(output)
-netconf = False # network configuration is not required by default
-if self.is_alive():
-logger.info("qemu started in %s seconds - qemu procces pid is %s" 
% (time.time() - (endtime - self.runqemutime), self.qemupid))
-if get_ip:
-cmdline = ''
-with open('/proc/%s/cmdline' % self.qemupid) as p:
-cmdline = p.read()
-# It is needed to sanitize the data received
-# because is possible to have control characters
-cmdline = re_control_char.sub('', cmdline)
-try:
-ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", 
cmdline.split("ip=")[1])
-self.ip = ips[0]
-self.server_ip = ips[1]
-logger.info("qemu cmdline used:\n{}".format(cmdline))
-except (IndexError, ValueError):
-# Try to get network configuration from runqemu output
-match = re.match('.*Network configuration: 
([0-9.]+)::([0-9.]+):([0-9.]+)$.*',
- out, re.MULTILINE|re.DOTALL)
-if match:
-self.ip, self.server_ip, self.netmask = match.groups()
-# network configuration is required as we couldn't get 
it
-# from the runqemu command line, so qemu doesn't run 
kernel
-# and guest networking is not configured
-netconf = True
-else:
-logger.error("Couldn't get ip from qemu command line 
and runqemu output! "
- "Here is the qemu command line 
used:\n%s\n"
- "and output from runqemu:\n%s" % 
(cmdline, out))
-self._dump_host()
-self.stop()
-return False
-
-logger.info("Target IP: %s" % self.ip)
-logger.info("Server IP: %s" % self.server_ip)
-
-self.thread = LoggingThread(self.log, threadsock, logger)
-self.thread.start()
-if not self.thread.connection_established.wait(self.boottime):
-logger.error("Didn't receive a console connection from qemu. "
- "Here is the qemu command line used:\n%s\nand "
- "output from runqemu:\n%s" % (cmdline, out))
-self.stop_thread()
-return False
-
-logger.info("Output from runqemu:\n%s", out)
-logger.info("Waiting at most %d seconds for login banner" % 
self.boottime)
-endtime = time.time() + self.boottime
-socklist = [self.server_socket]
-reachedlogin =

[OE-core] [PATCH 0/1] qemurunner.py: simplify search for QEMU PID

2017-09-06 Thread Juro Bystricky
This patch greatly simplifies the code in qemurunner.py that tries to determine 
the PID
of the running qemu (started by qemurunner->runqemu->...->qemu-system-xxx)).
The original code needed to search and analyze all processes to determine which
"qemu-system-xxx" was a direct descendant of qemurunner.py. As it turns out,
qemu can readily report its own PID, if asked via the argument "-pidfile file".
The new code passes this argument and then simply loops waiting for "file" to 
appear
(with a timeout value as before). Once this happens, it reads the contents of 
the
file and reports the value (PID).
The file containing the qemu PIDis deleted after qemurunner terminates.

The patch was tested with :

$ bitbake core-image-sato -c testimage
$ oe-selftest --all

Juro Bystricky (1):
  qemurunner.py: refactor searching for QEMU PID

 meta/lib/oeqa/utils/qemurunner.py | 303 +-
 1 file changed, 136 insertions(+), 167 deletions(-)

-- 
2.7.4

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


[OE-core] [PATCH] qemu: upgrade to version 2.10.0

2017-08-31 Thread Juro Bystricky
Remove recipes for older versions.
Remove patches no longer needed.
Modify the patch "add-ptest-in-makefile.patch" for version 2.10.0

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 ...0001-osdep-Add-runtime-OFD-lock-detection.patch | 141 
 ...e-posix-Do-runtime-check-for-ofd-lock-API.patch |  71 --
 ...support-for-VM-suspend-resume-for-TPM-TIS.patch | 719 -
 .../qemu/qemu/add-ptest-in-makefile-v10.patch  |  28 +
 .../qemu/qemu/add-ptest-in-makefile.patch  |  28 -
 meta/recipes-devtools/qemu/qemu_2.10.0-rc2.bb  |  59 --
 meta/recipes-devtools/qemu/qemu_2.10.0.bb  |  58 ++
 meta/recipes-devtools/qemu/qemu_2.8.1.1.bb |  60 --
 8 files changed, 86 insertions(+), 1078 deletions(-)
 delete mode 100644 
meta/recipes-devtools/qemu/qemu/0001-osdep-Add-runtime-OFD-lock-detection.patch
 delete mode 100644 
meta/recipes-devtools/qemu/qemu/0002-file-posix-Do-runtime-check-for-ofd-lock-API.patch
 delete mode 100644 
meta/recipes-devtools/qemu/qemu/0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch
 create mode 100644 
meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu_2.10.0-rc2.bb
 create mode 100644 meta/recipes-devtools/qemu/qemu_2.10.0.bb
 delete mode 100644 meta/recipes-devtools/qemu/qemu_2.8.1.1.bb

diff --git 
a/meta/recipes-devtools/qemu/qemu/0001-osdep-Add-runtime-OFD-lock-detection.patch
 
b/meta/recipes-devtools/qemu/qemu/0001-osdep-Add-runtime-OFD-lock-detection.patch
deleted file mode 100644
index f83f0d2..000
--- 
a/meta/recipes-devtools/qemu/qemu/0001-osdep-Add-runtime-OFD-lock-detection.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From ca749954b09b89e22cd69c4949fb7e689b057963 Mon Sep 17 00:00:00 2001
-From: Fam Zheng <f...@redhat.com>
-Date: Fri, 11 Aug 2017 19:44:46 +0800
-Subject: [PATCH 1/2] osdep: Add runtime OFD lock detection
-
-Build time check of OFD lock is not sufficient and can cause image open
-errors when the runtime environment doesn't support it.
-
-Add a helper function to probe it at runtime, additionally. Also provide
-a qemu_has_ofd_lock() for callers to check the status.
-
-Signed-off-by: Fam Zheng <f...@redhat.com>
-Signed-off-by: Kevin Wolf <kw...@redhat.com>
-
-Upstream-Status: Backport
-Signed-off-by: Chen Qi <qi.c...@windriver.com>

- include/qemu/osdep.h |  1 +
- util/osdep.c | 66 
- 2 files changed, 57 insertions(+), 10 deletions(-)
-
-diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
-index 3b74f6fcb2..6855b94bbf 100644
 a/include/qemu/osdep.h
-+++ b/include/qemu/osdep.h
-@@ -357,6 +357,7 @@ int qemu_dup(int fd);
- int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive);
- int qemu_unlock_fd(int fd, int64_t start, int64_t len);
- int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive);
-+bool qemu_has_ofd_lock(void);
- 
- #if defined(__HAIKU__) && defined(__i386__)
- #define FMT_pid "%ld"
-diff --git a/util/osdep.c b/util/osdep.c
-index a2863c8e53..a479fedc4a 100644
 a/util/osdep.c
-+++ b/util/osdep.c
-@@ -38,14 +38,6 @@ extern int madvise(caddr_t, size_t, int);
- #include "qemu/error-report.h"
- #include "monitor/monitor.h"
- 
--#ifdef F_OFD_SETLK
--#define QEMU_SETLK F_OFD_SETLK
--#define QEMU_GETLK F_OFD_GETLK
--#else
--#define QEMU_SETLK F_SETLK
--#define QEMU_GETLK F_GETLK
--#endif
--
- static bool fips_enabled = false;
- 
- static const char *hw_version = QEMU_HW_VERSION;
-@@ -82,6 +74,10 @@ int qemu_madvise(void *addr, size_t len, int advice)
- }
- 
- #ifndef _WIN32
-+
-+static int fcntl_op_setlk = -1;
-+static int fcntl_op_getlk = -1;
-+
- /*
-  * Dups an fd and sets the flags
-  */
-@@ -149,6 +145,54 @@ static int qemu_parse_fdset(const char *param)
- return qemu_parse_fd(param);
- }
- 
-+static void qemu_probe_lock_ops(void)
-+{
-+if (fcntl_op_setlk == -1) {
-+#ifdef F_OFD_SETLK
-+int fd;
-+int ret;
-+struct flock fl = {
-+.l_whence = SEEK_SET,
-+.l_start  = 0,
-+.l_len= 0,
-+.l_type   = F_WRLCK,
-+};
-+
-+fd = open("/dev/null", O_RDWR);
-+if (fd < 0) {
-+fprintf(stderr,
-+"Failed to open /dev/null for OFD lock probing: %s\n",
-+strerror(errno));
-+fcntl_op_setlk = F_SETLK;
-+fcntl_op_getlk = F_GETLK;
-+return;
-+}
-+ret = fcntl(fd, F_OFD_GETLK, );
-+close(fd);
-+if (!ret) {
-+fcntl_op_setlk = F_OFD_SETLK;
-+fcntl_op_getlk = F_OFD_GETLK;
-+} else {
-+fcntl_op_setlk = F_SETLK;
-+fcntl_op_getlk = F_GETLK;
-+}
-+#else
-+fcntl_op_setlk

[OE-core] [PATCH 5/8] package_manager.py: improve reproducibility

2017-08-28 Thread Juro Bystricky
When creating Packages.gz, do not save the time stamp in the compressed
file metadata.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/lib/oe/package_manager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index d43d729..49058d7 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -232,7 +232,7 @@ class DpkgIndexer(Indexer):
 
 cmd = "cd %s; PSEUDO_UNLOAD=1 %s packages . > Packages;" % 
(arch_dir, apt_ftparchive)
 
-cmd += "%s -fc Packages > Packages.gz;" % gzip
+cmd += "%s -fcn Packages > Packages.gz;" % gzip
 
 with open(os.path.join(arch_dir, "Release"), "w+") as release:
 release.write("Label: %s\n" % arch)
-- 
2.7.4

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


[OE-core] [PATCH 8/8] qemuboot.bbclass: create deterministic qemuboot.conf file

2017-08-28 Thread Juro Bystricky
The lines in qemuboot.conf are in random order.
This patch fixes this by printing the lines in sorted order.
This makes it easier to compare two different builds for
any differences.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/qemuboot.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 0e21fc9..bd2f01d 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -87,7 +87,7 @@ python do_write_qemuboot_conf() {
 topdir="%s/"%(d.getVar('TOPDIR')).replace("//","/")
 cf = configparser.ConfigParser()
 cf.add_section('config_bsp')
-for k in qemuboot_vars(d):
+for k in sorted(qemuboot_vars(d)):
 # qemu-helper-native sysroot is not removed by rm_work and
 # contains all tools required by runqemu
 if k == 'STAGING_BINDIR_NATIVE':
-- 
2.7.4

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


[OE-core] [PATCH 7/8] image_types.bbclass: improve reproducibility of .gz files

2017-08-28 Thread Juro Bystricky
When compressing with "gzip", do not save the time stamp in
the compressed file metadata.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index e0368c7..9b646e9 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -268,7 +268,7 @@ COMPRESSIONTYPES ?= ""
 
 CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum 
sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 ${COMPRESSIONTYPES}"
 CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
-CONVERSION_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
+CONVERSION_CMD_gz = "gzip -f -9 -n -c 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
 CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
 CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} 
--check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
 CONVERSION_CMD_lz4 = "lz4 -9 -z ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} 
${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
-- 
2.7.4

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


[OE-core] [PATCH 3/8] flex_2.6.0.bb: remove build host references

2017-08-28 Thread Juro Bystricky
Remove build host references from flex-ptest package.

[YOCTO #11667]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-devtools/flex/flex_2.6.0.bb | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/flex/flex_2.6.0.bb 
b/meta/recipes-devtools/flex/flex_2.6.0.bb
index ab35b09..a906fe8 100644
--- a/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -55,7 +55,11 @@ do_install_ptest() {
cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
cp -r ${S}/tests/* ${D}${PTEST_PATH}
cp -r ${B}/tests/* ${D}${PTEST_PATH}
-   sed -e 's/^Makefile:/_Makefile:/' \
+   sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 
's/^Makefile:/_Makefile:/' \
-e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = 
\(.*\)/top_srcdir = ./' \
-e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = 
\(.*\)/top_builddir = ./' \
-i ${D}${PTEST_PATH}/Makefile
-- 
2.7.4

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


[OE-core] [PATCH 6/8] eudev_3.2.2: improve reproducibility

2017-08-28 Thread Juro Bystricky
Remove all host build references from the eudev-dbg package

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/udev/eudev_3.2.2.bb | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-core/udev/eudev_3.2.2.bb 
b/meta/recipes-core/udev/eudev_3.2.2.bb
index 47d958b..fcadfa3 100644
--- a/meta/recipes-core/udev/eudev_3.2.2.bb
+++ b/meta/recipes-core/udev/eudev_3.2.2.bb
@@ -50,6 +50,12 @@ do_install_append() {
rm -f ${D}${base_libdir}/udev/hid2hci
 }
 
+do_install_prepend_class-target () {
+   # Remove references to buildmachine
+   sed -i -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+   ${B}/src/udev/keyboard-keys-from-name.h
+}
+
 INITSCRIPT_NAME = "udev"
 INITSCRIPT_PARAMS = "start 04 S ."
 
-- 
2.7.4

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


[OE-core] [PATCH 4/8] diffutils_3.6.bb: remove build host references

2017-08-28 Thread Juro Bystricky
Remove build host references from diffutils-ptest package.

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-extended/diffutils/diffutils_3.6.bb | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/diffutils/diffutils_3.6.bb 
b/meta/recipes-extended/diffutils/diffutils_3.6.bb
index a2ea484..deadd62 100644
--- a/meta/recipes-extended/diffutils/diffutils_3.6.bb
+++ b/meta/recipes-extended/diffutils/diffutils_3.6.bb
@@ -24,7 +24,12 @@ do_install_ptest() {
install -D ${S}/build-aux/test-driver $t/build-aux/test-driver
cp -r ${S}/tests $t/
install ${B}/tests/Makefile $t/tests/
-   sed -e 's|^Makefile:|_Makefile:|' \
+   sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+   -e 's|^Makefile:|_Makefile:|' \
-e 's|bash|sh|' \
-e 's|^top_srcdir = \(.*\)|top_srcdir = ..\/|' \
-e 's|^srcdir = \(.*\)|srcdir = .|' \
-- 
2.7.4

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


[OE-core] [PATCH 1/8] zlib_1.2.11.bb: remove build host references

2017-08-28 Thread Juro Bystricky
Remove build host references from libz-ptest package.

[YOCTO #11668]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-core/zlib/zlib_1.2.11.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-core/zlib/zlib_1.2.11.bb 
b/meta/recipes-core/zlib/zlib_1.2.11.bb
index ba216f67..6410519 100644
--- a/meta/recipes-core/zlib/zlib_1.2.11.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.11.bb
@@ -45,6 +45,11 @@ do_install_ptest() {
install ${B}/minigzip   ${D}${PTEST_PATH}
install ${B}/examplesh  ${D}${PTEST_PATH}
install ${B}/minigzipsh ${D}${PTEST_PATH}
+
+   # Remove buildhost references...
+   sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+${D}${PTEST_PATH}/Makefile
 }
 
 # Move zlib shared libraries for target builds to $base_libdir so the library
-- 
2.7.4

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


[OE-core] [PATCH 0/8] reproducibility fixes

2017-08-28 Thread Juro Bystricky
Various simple patches that eliminate buildhost references from several
packages and improve the reproducibility/determinism when building 
package/images.



Juro Bystricky (8):
  zlib_1.2.11.bb: remove build host references
  bash.inc: improve reproducibility
  flex_2.6.0.bb: remove build host references
  diffutils_3.6.bb: remove build host references
  package_manager.py: improve reproducibility
  eudev_3.2.2: improve reproducibility
  image_types.bbclass: improve reproducibility of .gz files
  qemuboot.bbclass: create deterministic qemuboot.conf file

 meta/classes/image_types.bbclass |  2 +-
 meta/classes/qemuboot.bbclass|  2 +-
 meta/lib/oe/package_manager.py   |  2 +-
 meta/recipes-core/udev/eudev_3.2.2.bb|  6 ++
 meta/recipes-core/zlib/zlib_1.2.11.bb|  5 +
 meta/recipes-devtools/flex/flex_2.6.0.bb |  6 +-
 meta/recipes-extended/bash/bash.inc  | 22 +++---
 meta/recipes-extended/diffutils/diffutils_3.6.bb |  7 ++-
 8 files changed, 44 insertions(+), 8 deletions(-)

-- 
2.7.4

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


[OE-core] [PATCH 2/8] bash.inc: improve reproducibility

2017-08-28 Thread Juro Bystricky
Remove all host build references from the following bash packages:
bash-ptest, bash-bashbug, bash-dev, bash-loadable.

[YOCTO #11918]

Signed-off-by: Juro Bystricky <juro.bystri...@intel.com>
---
 meta/recipes-extended/bash/bash.inc | 22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index 92916d9..f6cb7e4 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -48,16 +48,32 @@ do_install_append () {
fi
 }
 do_install_append_class-target () {
-   # Clean host path in bashbug
+   # Clean buildhost references in bashbug
sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
-   -e "s,-I${WORKDIR}/\S* ,,g" ${D}${bindir}/bashbug
+   -e "s,-I${WORKDIR}/\S* ,,g" \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   ${D}${bindir}/bashbug
+
+   # Clean buildhost references in bash.pc
+   sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+${D}${libdir}/pkgconfig/bash.pc
+
+   # Clean buildhost references in Makefile.inc
+   sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+   -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
+   ${D}${libdir}/bash/Makefile.inc
 }
 
 do_install_ptest () {
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
cp ${B}/Makefile ${D}${PTEST_PATH}
 sed -i -e 's/^Makefile/_Makefile/' -e 
"s,--sysroot=${STAGING_DIR_TARGET},,g" \
-   -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" 
${D}${PTEST_PATH}/Makefile
+   -e 's|${DEBUG_PREFIX_MAP}||g' \
+   -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" \
+   -e 's:${HOSTTOOLS_DIR}/::g' \
+${D}${PTEST_PATH}/Makefile
 }
 
 pkg_postinst_${PN} () {
-- 
2.7.4

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


  1   2   3   >