Date   

Re: meta-openembedded maintainer ship change.

Manjukumar Harthikote Matha
 

Thanks Armin for all the work.
Thanks Khem

-Manju

-----Original Message-----
From: openembedded-core-bounces@...
[mailto:openembedded-core-bounces@...] On Behalf Of
akuster808
Sent: Tuesday, May 22, 2018 8:41 AM
To: OpenEmbedded Devel List <openembedded-devel@...>;
Patches and discussions about the oe-core layer <openembedded-
core@...>
Subject: [OE-core] meta-openembedded maintainer ship change.

Hello all,

After much thought, I have decided to step away from being the meta-
openembedded maintainer, patch wrangler and builder.  Khem Raj has kindly
stepped up to continue these activities. Maintaining this was consuming too much
of my free time and I need to focus on other things in the community.

Thanks for the opportunity to have served you.

Kind regards,

Armin


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


Re: [PATCH] qemuwrapper-cross: fix postinst failed warning

Changqing Li
 

On 05/30/2018 06:12 PM, Alexander Kanavin wrote:
2018-05-30 12:37 GMT+03:00 cli10 <changqing.li@...>:
if in the future,  some recipe inherit allarch,  but use @qemu_run_binary
directly,  not call qemuwrapper,

I think maybe still will met problem of get wrong base_libdir. so I think
maybe we should change qemu_wrapper_cmdline in

qemu.bbclass, like this:

-    return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " +
rootfs_path\
+    return "PSEUDO_UNLOAD=1 " + "qemuwrapper" + " " + qemu_options + " -L "
+ rootfs_path\
             + " -E LD_LIBRARY_PATH=" + ":".join(library_paths) + " "
qemu_binary is determined like this:

    qemu_binary = qemu_target_binary(data)
    if qemu_binary == "qemu-allarch":
        qemu_binary = "qemuwrapper"

So it will fall back to qemuwrapper if the recipe inherits allarch.

Besides, at this point it's a theoretical problem, right? We don't
even have a suitable allarch recipe to play with and see where things
work and where they don't, and whether the fallback to qemuwrapper
works correctly. If such recipe appears, we can look at the issue
again.

Alex

   yes,  thanks for your comments.
  
   Changqing
-- 
BRs

Sandy(Li Changqing)
+861084778653


[PATCH] dropbear: drop run time detection of read-only rootfs

Andre McCurdy
 

Previously, when dropbear was started via its init script, relocation
of DROPBEAR_RSAKEY_DIR to support read-only rootfs was handled at
run time from within the init script.

Update the init script to take advantage of the read-only rootfs
config setup by read_only_rootfs_hook() and therefore be consistent
with startup under systemd (where relocation of DROPBEAR_RSAKEY_DIR
is handled by the read_only_rootfs_hook() at build time).

Signed-off-by: Andre McCurdy <armccurdy@...>
---
meta/classes/rootfs-postcommands.bbclass | 5 +----
meta/recipes-core/dropbear/dropbear/init | 26 ++++++++------------------
2 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 5522209..221869e 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -112,14 +112,11 @@ read_only_rootfs_hook () {

# Also tweak the key location for dropbear in the same way.
if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then
- if [ -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then
- echo "DROPBEAR_RSAKEY_DIR=/etc/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
- else
+ if [ ! -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then
echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
fi
fi

-
if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
# Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then
diff --git a/meta/recipes-core/dropbear/dropbear/init b/meta/recipes-core/dropbear/dropbear/init
index f6e1c46..ffab7a2 100755
--- a/meta/recipes-core/dropbear/dropbear/init
+++ b/meta/recipes-core/dropbear/dropbear/init
@@ -17,8 +17,11 @@ NAME=dropbear
DESC="Dropbear SSH server"
PIDFILE=/var/run/dropbear.pid

+# These values may be replaced by those from /etc/default/dropbear
+DROPBEAR_RSAKEY_DIR="/etc/dropbear"
DROPBEAR_PORT=22
DROPBEAR_EXTRA_ARGS=
+DROPBEAR_RSAKEY_ARGS=
NO_START=0

set -e
@@ -28,32 +31,19 @@ test "$NO_START" = "0" || exit 0
test -x "$DAEMON" || exit 0
test ! -h /var/service/dropbear || exit 0

-readonly_rootfs=0
-for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }' </proc/mounts`; do
- case $flag in
- ro)
- readonly_rootfs=1
- ;;
- esac
-done
-
-if [ $readonly_rootfs = "1" ]; then
- mkdir -p /var/lib/dropbear
- DROPBEAR_RSAKEY_DEFAULT="/var/lib/dropbear/dropbear_rsa_host_key"
-else
- DROPBEAR_RSAKEY_DEFAULT="/etc/dropbear/dropbear_rsa_host_key"
-fi
-
test -z "$DROPBEAR_BANNER" || \
DROPBEAR_EXTRA_ARGS="$DROPBEAR_EXTRA_ARGS -b $DROPBEAR_BANNER"
test -n "$DROPBEAR_RSAKEY" || \
- DROPBEAR_RSAKEY=$DROPBEAR_RSAKEY_DEFAULT
+ DROPBEAR_RSAKEY="${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key"

gen_keys() {
if [ -f "$DROPBEAR_RSAKEY" -a ! -s "$DROPBEAR_RSAKEY" ]; then
rm $DROPBEAR_RSAKEY || true
fi
- test -f $DROPBEAR_RSAKEY || dropbearkey -t rsa -f $DROPBEAR_RSAKEY $DROPBEAR_RSAKEY_ARGS
+ if [ ! -f "$DROPBEAR_RSAKEY" ]; then
+ mkdir -p ${DROPBEAR_RSAKEY%/*}
+ dropbearkey -t rsa -f $DROPBEAR_RSAKEY $DROPBEAR_RSAKEY_ARGS
+ fi
}

case "$1" in
--
1.9.1


[PATCH 7/7] meson: enable nativesdk

Martin Kelly
 

Currently, we can't build meson into SDKs because we don't autogenerate
the required meson.cross file.

Enable this by using the post-relocate hooks and generating a
meson.cross file based on the SDK environment passed into the
post-relocate hook.

Signed-off-by: Martin Kelly <mkelly@...>
---
meta/recipes-devtools/meson/meson.inc | 23 +++++++
meta/recipes-devtools/meson/meson/meson-setup.py | 62 ++++++++++++++++++
meta/recipes-devtools/meson/meson/meson-wrapper | 14 ++++
meta/recipes-devtools/meson/meson_0.46.1.bb | 23 +------
.../meson/nativesdk-meson_0.46.1.bb | 74 ++++++++++++++++++++++
5 files changed, 174 insertions(+), 22 deletions(-)
create mode 100644 meta/recipes-devtools/meson/meson.inc
create mode 100755 meta/recipes-devtools/meson/meson/meson-setup.py
create mode 100755 meta/recipes-devtools/meson/meson/meson-wrapper
create mode 100644 meta/recipes-devtools/meson/nativesdk-meson_0.46.1.bb

diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
new file mode 100644
index 0000000000..cf5af430e6
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -0,0 +1,23 @@
+HOMEPAGE = "http://mesonbuild.com"
+SUMMARY = "A high performance build system"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz \
+ file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
+ file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
+ file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
+ file://0003-native_bindir.patch \
+ file://0004-make-ExternalProgram-get_path-a-bit-smarter.patch \
+ file://0005-commandrunner-make-run-handle-python-options.patch \
+ file://0006-mesonlib-handle-meson-exe-wrappers.patch \
+ "
+
+SRC_URI[md5sum] = "1698f6526574839de5dcdc45e3f7d582"
+SRC_URI[sha256sum] = "19497a03e7e5b303d8d11f98789a79aba59b5ad4a81bd00f4d099be0212cee78"
+UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
+
+inherit setuptools3
+
+RDEPENDS_${PN} = "ninja python3-core python3-modules"
diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py b/meta/recipes-devtools/meson/meson/meson-setup.py
new file mode 100755
index 0000000000..a9749eae9d
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/meson-setup.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+def bail(msg):
+ print(msg, file=sys.stderr)
+ sys.exit(1)
+
+_MARKER = '@@'
+def transform_line(line):
+ # Substitute any special markers of this form:
+ # @@ENV@@
+ # with the value of ENV, split into meson array syntax.
+ start = line.find(_MARKER)
+ if start == -1:
+ return line
+
+ end = line.rfind(_MARKER)
+ if end == start:
+ return line
+
+ # Lookup value of the env var.
+ var = line[start+len(_MARKER):end]
+ try:
+ val = os.environ[var]
+ except KeyError:
+ bail('cannot generate meson.cross; env var %s not set' % var)
+
+ # Transform into meson array.
+ val = ["'%s'" % x for x in val.split()]
+ val = ', '.join(val)
+ val = '[%s]' % val
+
+ before = line[:start]
+ after = line[end+len(_MARKER):]
+
+ return '%s%s%s' % (before, val, after)
+
+# Make sure this is really an SDK extraction environment.
+try:
+ sysroot = os.environ['OECORE_NATIVE_SYSROOT']
+except KeyError:
+ bail('OECORE_NATIVE_SYSROOT env var must be set')
+
+cross_file = os.path.join(sysroot, 'usr/share/meson/meson.cross')
+tmp_cross_file = '%s.tmp' % cross_file
+
+# Read through and transform the current meson.cross.
+lines = []
+with open(cross_file, 'r') as f:
+ for line in f:
+ lines.append(transform_line(line))
+
+# Write the transformed result to a tmp file and atomically rename it. In case
+# we crash during the file write, we don't want an invalid meson.cross file.
+with open(tmp_cross_file, 'w') as f:
+ for line in lines:
+ f.write(line)
+ f.flush()
+ os.fdatasync(f.fileno())
+os.rename(tmp_cross_file, cross_file)
diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper
new file mode 100755
index 0000000000..b2e00da513
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/meson-wrapper
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
+ echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2
+fi
+
+# If these are set to a cross-compile path, meson will get confused and try to
+# use them as native tools. Unset them to prevent this, as all the cross-compile
+# config is already in meson.cross.
+unset CC CXX CPP LD AR NM STRIP
+
+exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
+ --cross-file "$OECORE_NATIVE_SYSROOT/usr/share/meson/meson.cross" \
+ "$@"
diff --git a/meta/recipes-devtools/meson/meson_0.46.1.bb b/meta/recipes-devtools/meson/meson_0.46.1.bb
index a1c9035e85..897fa148d9 100644
--- a/meta/recipes-devtools/meson/meson_0.46.1.bb
+++ b/meta/recipes-devtools/meson/meson_0.46.1.bb
@@ -1,24 +1,3 @@
-HOMEPAGE = "http://mesonbuild.com"
-SUMMARY = "A high performance build system"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
-
-SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar.gz \
- file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
- file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
- file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
- file://0003-native_bindir.patch \
- file://0004-make-ExternalProgram-get_path-a-bit-smarter.patch \
- file://0005-commandrunner-make-run-handle-python-options.patch \
- file://0006-mesonlib-handle-meson-exe-wrappers.patch \
- "
-SRC_URI[md5sum] = "1698f6526574839de5dcdc45e3f7d582"
-SRC_URI[sha256sum] = "19497a03e7e5b303d8d11f98789a79aba59b5ad4a81bd00f4d099be0212cee78"
-UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
-
-inherit setuptools3
-
-RDEPENDS_${PN} = "ninja python3-core python3-modules"
+include meson.inc

BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.46.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.46.1.bb
new file mode 100644
index 0000000000..53503aa998
--- /dev/null
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.46.1.bb
@@ -0,0 +1,74 @@
+include meson.inc
+
+inherit nativesdk
+
+SRC_URI += "file://meson-setup.py \
+ file://meson-wrapper"
+
+def meson_array(var, d):
+ return "', '".join(d.getVar(var).split()).join(("'", "'"))
+
+# both are required but not used by meson
+MESON_SDK_ENDIAN = "bogus-endian"
+MESON_TARGET_ENDIAN = "bogus-endian"
+
+MESON_TOOLCHAIN_ARGS = "${BUILDSDK_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CFLAGS}"
+MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CXXFLAGS}"
+MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_LDFLAGS}"
+
+# This logic is similar but not identical to that in meson.bbclass, since it's
+# generating for an SDK rather than a cross-compile. Important differences are:
+# - We can't set vars like CC, CXX, etc. yet because they will be filled in with
+# real paths by meson-setup.sh when the SDK is extracted.
+# - Some overrides aren't needed, since the SDK injects paths that take care of
+# them.
+addtask write_config before do_install
+do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF"
+do_write_config() {
+ # This needs to be Py to split the args into single-element lists
+ cat >${WORKDIR}/meson.cross <<EOF
+[binaries]
+c = @@CC@@
+cpp = @@CXX@@
+ar = @@AR@@
+nm = @@NM@@
+ld = @@LD@@
+strip = @@STRIP@@
+pkgconfig = 'pkg-config'
+
+[properties]
+needs_exe_wrapper = true
+c_args = @@CFLAGS@@
+c_link_args = @@LDFLAGS@@
+cpp_args = @@CPPFLAGS@@
+cpp_link_args = @@LDFLAGS@@
+
+[host_machine]
+system = '${SDK_OS}'
+cpu_family = '${SDK_ARCH}'
+cpu = '${SDK_ARCH}'
+endian = '${MESON_SDK_ENDIAN}'
+EOF
+}
+
+do_install_append() {
+ install -d ${D}${datadir}/meson
+ install -m 0644 ${WORKDIR}/meson.cross ${D}${datadir}/meson/
+
+ install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
+ install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
+
+ # We need to wrap the real meson with a thin env setup wrapper.
+ mv ${D}${bindir}/meson ${D}${bindir}/meson.real
+ install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson
+}
+
+RDEPENDS_${PN} += "\
+ nativesdk-ninja \
+ nativesdk-python3-core \
+ nativesdk-python3-misc \
+ nativesdk-python3-modules \
+ "
+
+FILES_${PN} += "${datadir}/meson ${SDKPATHNATIVE}"
--
2.11.0


[PATCH 6/7] meson: handle exe wrappers

Martin Kelly
 

Add patches to enable meson to handle being wrapped with a shell script. This
will enable us to do so for supporting the SDK, which requires us to setup env
vars and point to a meson.cross file inside the SDK.

These patches are all merged upstream, so we can drop them soon.

Signed-off-by: Martin Kelly <mkelly@...>
---
...ke-ExternalProgram-get_path-a-bit-smarter.patch | 58 ++++++
...mandrunner-make-run-handle-python-options.patch | 53 +++++
.../0006-mesonlib-handle-meson-exe-wrappers.patch | 231 +++++++++++++++++++++
meta/recipes-devtools/meson/meson_0.46.1.bb | 3 +
4 files changed, 345 insertions(+)
create mode 100644 meta/recipes-devtools/meson/meson/0004-make-ExternalProgram-get_path-a-bit-smarter.patch
create mode 100644 meta/recipes-devtools/meson/meson/0005-commandrunner-make-run-handle-python-options.patch
create mode 100644 meta/recipes-devtools/meson/meson/0006-mesonlib-handle-meson-exe-wrappers.patch

diff --git a/meta/recipes-devtools/meson/meson/0004-make-ExternalProgram-get_path-a-bit-smarter.patch b/meta/recipes-devtools/meson/meson/0004-make-ExternalProgram-get_path-a-bit-smarter.patch
new file mode 100644
index 0000000000..fdab7e67dc
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0004-make-ExternalProgram-get_path-a-bit-smarter.patch
@@ -0,0 +1,58 @@
+From 2c0273abecbdcef8411a6e513c7435ca4e7bd620 Mon Sep 17 00:00:00 2001
+From: Martin Kelly <mkelly@...>
+Date: Tue, 24 Apr 2018 16:53:18 -0700
+Subject: [PATCH] make ExternalProgram get_path() a bit smarter
+
+Currently, ExternalProgram get_path() assumes the last component in the
+path is always the actual command path. However, this is not always
+right. For example, in the command "python -u", we should return
+"python" and not "-u". However, in other cases, like "python script.py",
+then the last component is the right one.
+
+The heuristic that seems to capture this is to use the last argument
+that is still a file. This means options get ignored, but "python
+script.py" still works. Let's use this heuristic, at least for now.
+
+Upstream-Status: Accepted [https://github.com/mesonbuild/meson/pull/3393]
+Should be in the 0.47.0 release.
+
+Signed-off-by: Martin Kelly <mkelly@...>
+---
+ mesonbuild/dependencies/base.py | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
+index f4f19c57..18f04892 100644
+--- a/mesonbuild/dependencies/base.py
++++ b/mesonbuild/dependencies/base.py
+@@ -745,6 +745,17 @@ class ExternalProgram:
+ self.command = listify(command)
+ else:
+ self.command = self._search(name, search_dir)
++
++ # Set path to be the last item that is actually a file (in order to
++ # skip options in something like ['python', '-u', 'file.py']. If we
++ # can't find any components, default to the last component of the path.
++ self.path = self.command[-1]
++ for i in range(len(self.command) - 1, -1, -1):
++ arg = self.command[i]
++ if arg is not None and os.path.isfile(arg):
++ self.path = arg
++ break
++
+ if not silent:
+ if self.found():
+ mlog.log('Program', mlog.bold(name), 'found:', mlog.green('YES'),
+@@ -892,11 +903,7 @@ class ExternalProgram:
+ return self.command[:]
+
+ def get_path(self):
+- if self.found():
+- # Assume that the last element is the full path to the script or
+- # binary being run
+- return self.command[-1]
+- return None
++ return self.path
+
+ def get_name(self):
+ return self.name
diff --git a/meta/recipes-devtools/meson/meson/0005-commandrunner-make-run-handle-python-options.patch b/meta/recipes-devtools/meson/meson/0005-commandrunner-make-run-handle-python-options.patch
new file mode 100644
index 0000000000..876ace22f8
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0005-commandrunner-make-run-handle-python-options.patch
@@ -0,0 +1,53 @@
+From 0f54849523c812bca57d2182af92afe58c44f850 Mon Sep 17 00:00:00 2001
+From: Martin Kelly <mkelly@...>
+Date: Tue, 24 Apr 2018 16:55:12 -0700
+Subject: [PATCH] commandrunner: make run handle python options
+
+Currently, commandrunner breaks when we give options to python because
+it assumes python commands are in the form "python script.py", rather
+than "python -u script.py" or "python -u -m module script.py". Extend it
+to be more resilient and correctly parse python options.
+
+Upstream-Status: Accepted [https://github.com/mesonbuild/meson/pull/3393]
+Should be in the 0.47.0 release.
+
+Signed-off-by: Martin Kelly <mkelly@...>
+---
+ mesonbuild/scripts/commandrunner.py | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/mesonbuild/scripts/commandrunner.py b/mesonbuild/scripts/commandrunner.py
+index fc65e5b6..5922c64e 100644
+--- a/mesonbuild/scripts/commandrunner.py
++++ b/mesonbuild/scripts/commandrunner.py
+@@ -59,9 +59,27 @@ def run(args):
+ subdir = args[2]
+ meson_command = args[3]
+ if 'python' in meson_command: # Hack.
+- meson_command = [meson_command, args[4]]
+- command = args[5]
+- arguments = args[6:]
++ # Handle any of these:
++ # python meson.py ...
++ # python -m mesonbuild.mesonmain ...
++ # python ARGS -m mesonbuild.mesonmain ...
++ # python -m mesonbuild.mesonmain ARGS ...
++ i = 4
++ while i < len(args):
++ arg = args[i]
++ # Skip past optional arguments.
++ if arg[0] == '-':
++ if arg == '-m':
++ # Skip past -m PYTHONFILE.
++ i += 2
++ else:
++ i += 1
++ else:
++ break
++ end = i
++ meson_command = args[3:end]
++ command = args[end]
++ arguments = args[end + 1:]
+ else:
+ meson_command = [meson_command]
+ command = args[4]
diff --git a/meta/recipes-devtools/meson/meson/0006-mesonlib-handle-meson-exe-wrappers.patch b/meta/recipes-devtools/meson/meson/0006-mesonlib-handle-meson-exe-wrappers.patch
new file mode 100644
index 0000000000..19901d3a97
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0006-mesonlib-handle-meson-exe-wrappers.patch
@@ -0,0 +1,231 @@
+From 3d86e7b48407bd85d96305ebc8aa48cb1131cad2 Mon Sep 17 00:00:00 2001
+From: Martin Kelly <mkelly@...>
+Date: Tue, 24 Apr 2018 16:57:18 -0700
+Subject: [PATCH] mesonlib: handle meson exe wrappers
+
+There are cases when it is useful to wrap the main meson executable with
+a script that sets up environment variables, passes --cross-file, etc.
+For example, in a Yocto SDK, we need to point to the right meson.cross
+so that everything "just works", and we need to alter CC, CXX, etc. In
+such cases, it can happen that the "meson" found in the path is actually
+a wrapper script that invokes the real meson, which may be in another
+location (e.g. "meson.real" or similar).
+
+Currently, in such a situation, meson gets confused because it tries to
+invoke itself using the "meson" executable (which points to the wrapper
+script) instead of the actual meson (which may be called "meson.real" or
+similar). In fact, the wrapper script is not necessarily even Python, so
+the whole thing fails.
+
+Fix this by using Python imports to directly find mesonmain.py instead
+of trying to detect it heuristically. In addition to fixing the wrapper
+issue, this should make the detection logic much more robust.
+
+Upstream-Status: Accepted [https://github.com/mesonbuild/meson/pull/3393]
+Should be in the 0.47.0 release.
+
+Signed-off-by: Martin Kelly <mkelly@...>
+---
+ meson.py | 9 ++-------
+ mesonbuild/mesonlib.py | 48 +-----------------------------------------------
+ mesonbuild/mesonmain.py | 8 ++++++++
+ run_cross_test.py | 2 ++
+ run_project_tests.py | 4 ++--
+ run_tests.py | 22 ++++++++++++++++++++++
+ run_unittests.py | 3 ++-
+ 7 files changed, 39 insertions(+), 57 deletions(-)
+
+diff --git a/meson.py b/meson.py
+index abbac6f4..8f944c7c 100755
+--- a/meson.py
++++ b/meson.py
+@@ -15,12 +15,7 @@
+ # limitations under the License.
+
+ from mesonbuild import mesonmain
+-import sys, os
+-
+-def main():
+- # Always resolve the command path so Ninja can find it for regen, tests, etc.
+- launcher = os.path.realpath(sys.argv[0])
+- return mesonmain.run(sys.argv[1:], launcher)
++import sys
+
+ if __name__ == '__main__':
+- sys.exit(main())
++ sys.exit(mesonmain.main())
+diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
+index 2a3b920b..0b9279c7 100644
+--- a/mesonbuild/mesonlib.py
++++ b/mesonbuild/mesonlib.py
+@@ -38,58 +38,12 @@ except Exception:
+
+ from glob import glob
+
+-def detect_meson_py_location():
+- c = sys.argv[0]
+- c_dir, c_fname = os.path.split(c)
+-
+- # get the absolute path to the <mesontool> folder
+- m_dir = None
+- if os.path.isabs(c):
+- # $ /foo/<mesontool>.py <args>
+- m_dir = c_dir
+- elif c_dir == '':
+- # $ <mesontool> <args> (gets run from /usr/bin/<mesontool>)
+- in_path_exe = shutil.which(c_fname)
+- if in_path_exe:
+- if not os.path.isabs(in_path_exe):
+- m_dir = os.getcwd()
+- c_fname = in_path_exe
+- else:
+- m_dir, c_fname = os.path.split(in_path_exe)
+- else:
+- m_dir = os.path.abspath(c_dir)
+-
+- # find meson in m_dir
+- if m_dir is not None:
+- for fname in ['meson', 'meson.py']:
+- m_path = os.path.join(m_dir, fname)
+- if os.path.exists(m_path):
+- return m_path
+-
+- # No meson found, which means that either:
+- # a) meson is not installed
+- # b) meson is installed to a non-standard location
+- # c) the script that invoked mesonlib is not the one of meson tools (e.g. run_unittests.py)
+- fname = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', 'meson.py'))
+- if os.path.exists(fname):
+- return fname
+- # If meson is still not found, we might be imported by out-of-source tests
+- # https://github.com/mesonbuild/meson/issues/3015
+- exe = shutil.which('meson')
+- if exe is None:
+- exe = shutil.which('meson.py')
+- if exe is not None:
+- return exe
+- # Give up.
+- raise RuntimeError('Could not determine how to run Meson. Please file a bug with details.')
+-
+ if os.path.basename(sys.executable) == 'meson.exe':
+ # In Windows and using the MSI installed executable.
+- meson_command = [sys.executable]
+ python_command = [sys.executable, 'runpython']
+ else:
+ python_command = [sys.executable]
+- meson_command = python_command + [detect_meson_py_location()]
++meson_command = python_command + ['-m', 'mesonbuild.mesonmain']
+
+ def is_ascii_string(astring):
+ try:
+diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
+index 2b6281d7..39d64d2f 100644
+--- a/mesonbuild/mesonmain.py
++++ b/mesonbuild/mesonmain.py
+@@ -381,3 +381,11 @@ def run(original_args, mainfile=None):
+ mlog.shutdown()
+
+ return 0
++
++def main():
++ # Always resolve the command path so Ninja can find it for regen, tests, etc.
++ launcher = os.path.realpath(sys.argv[0])
++ return run(sys.argv[1:], launcher)
++
++if __name__ == '__main__':
++ sys.exit(main())
+diff --git a/run_cross_test.py b/run_cross_test.py
+index e285e218..99230d1c 100755
+--- a/run_cross_test.py
++++ b/run_cross_test.py
+@@ -26,6 +26,7 @@ import sys, os
+
+ from run_project_tests import gather_tests, run_tests, StopException, setup_commands
+ from run_project_tests import failing_logs
++from run_tests import setup_pythonpath
+
+ def runtests(cross_file):
+ commontests = [('common', gather_tests('test cases/common'), False)]
+@@ -44,5 +45,6 @@ def runtests(cross_file):
+
+ if __name__ == '__main__':
+ setup_commands('ninja')
++ setup_pythonpath()
+ cross_file = sys.argv[1]
+ runtests(cross_file)
+diff --git a/run_project_tests.py b/run_project_tests.py
+index 8c02a9ee..0bf55cc0 100755
+--- a/run_project_tests.py
++++ b/run_project_tests.py
+@@ -33,7 +33,7 @@ import re
+ from run_unittests import get_fake_options, run_configure
+
+ from run_tests import get_backend_commands, get_backend_args_for_dir, Backend
+-from run_tests import ensure_backend_detects_changes
++from run_tests import ensure_backend_detects_changes, setup_pythonpath
+
+
+ class BuildStep(Enum):
+@@ -316,7 +316,7 @@ def _run_test(testdir, test_build_dir, install_dir, extra_args, compiler, backen
+ if pass_libdir_to_test(testdir):
+ gen_args += ['--libdir', 'lib']
+ gen_args += [testdir, test_build_dir] + flags + test_args + extra_args
+- (returncode, stdo, stde) = run_configure(meson_command, gen_args)
++ (returncode, stdo, stde) = run_configure(mesonlib.meson_command, gen_args)
+ try:
+ logfile = os.path.join(test_build_dir, 'meson-logs/meson-log.txt')
+ with open(logfile, encoding='utf-8', errors='ignore') as f:
+diff --git a/run_tests.py b/run_tests.py
+index 648e6ce1..731d864f 100755
+--- a/run_tests.py
++++ b/run_tests.py
+@@ -42,6 +42,28 @@ if mesonlib.is_windows() or mesonlib.is_cygwin():
+ else:
+ exe_suffix = ''
+
++def setup_pythonpath():
++ # Make sure python can import mesonbuild, even if we change directories as
++ # some tests do. Since sys.path is the final product of fairly complex code
++ # in site.py, it's hard to tell where each entry came from just by looking
++ # at sys.path, so we don't know if a given entry was set from a relative or
++ # absolute path. If an entry was set from a relative path, it won't
++ # continue to work if we change directories. Instead of trying to guess
++ # where a given entry came from, just add the known-good mesonbuild to
++ # PYTHONPATH so that it will continue to be importable from other
++ # directories.
++ import mesonbuild
++ meson_dir = os.path.dirname(os.path.abspath(mesonbuild.__file__))
++ meson_root = os.path.realpath(os.path.join(meson_dir, os.pardir))
++ try:
++ python_path = os.environ['PYTHONPATH']
++ except KeyError:
++ python_path = meson_root
++ else:
++ paths = python_path.split(os.pathsep) + [meson_root]
++ python_path = os.pathsep.join(paths)
++ os.environ['PYTHONPATH'] = python_path
++
+ def get_backend_args_for_dir(backend, builddir):
+ '''
+ Visual Studio backend needs to be given the solution to build
+diff --git a/run_unittests.py b/run_unittests.py
+index 6d4e0339..f5766613 100755
+--- a/run_unittests.py
++++ b/run_unittests.py
+@@ -47,7 +47,7 @@ import mesonbuild.modules.pkgconfig
+ from run_tests import exe_suffix, get_fake_options
+ from run_tests import get_builddir_target_args, get_backend_commands, Backend
+ from run_tests import ensure_backend_detects_changes, run_configure, meson_exe
+-from run_tests import should_run_linux_cross_tests
++from run_tests import should_run_linux_cross_tests, setup_pythonpath
+
+
+ def get_dynamic_section_entry(fname, entry):
+@@ -3180,6 +3180,7 @@ def unset_envs():
+
+ if __name__ == '__main__':
+ unset_envs()
++ setup_pythonpath()
+ cases = ['InternalTests', 'AllPlatformTests', 'FailureTests', 'PythonTests']
+ if not is_windows():
+ cases += ['LinuxlikeTests']
diff --git a/meta/recipes-devtools/meson/meson_0.46.1.bb b/meta/recipes-devtools/meson/meson_0.46.1.bb
index a18cab81f4..a1c9035e85 100644
--- a/meta/recipes-devtools/meson/meson_0.46.1.bb
+++ b/meta/recipes-devtools/meson/meson_0.46.1.bb
@@ -9,6 +9,9 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar
file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
file://0003-native_bindir.patch \
+ file://0004-make-ExternalProgram-get_path-a-bit-smarter.patch \
+ file://0005-commandrunner-make-run-handle-python-options.patch \
+ file://0006-mesonlib-handle-meson-exe-wrappers.patch \
"
SRC_URI[md5sum] = "1698f6526574839de5dcdc45e3f7d582"
SRC_URI[sha256sum] = "19497a03e7e5b303d8d11f98789a79aba59b5ad4a81bd00f4d099be0212cee78"
--
2.11.0


[PATCH 5/7] toolchain-shar-extract: pass env to post-relocate

Martin Kelly
 

It's useful for the post-relocate scripts to be able to see the SDK
environment, for example to see the values of CC, CXX etc. in order to
dynamically generate toolchain files.

To enable this, source the SDK environment script prior to calling the
relocate scripts.

Signed-off-by: Martin Kelly <mkelly@...>
---
meta/classes/toolchain-scripts.bbclass | 17 +++++++++++++----
meta/recipes-core/meta/meta-environment.bb | 5 +++--
2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index ae7bbef034..5f99fd8c03 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -118,11 +118,20 @@ EOF
}

toolchain_create_post_relocate_script() {
- script=$1
- rm -f $script
- touch $script
+ relocate_script=$1
+ sdk_script=$2
+ rm -f $relocate_script
+ touch $relocate_script
+
+ cat >> $relocate_script <<EOF
+# Source the SDK env script in case it is needed for the relocate scripts.
+. $sdk_script
+status=\$?
+if [ \$status != 0 ]; then
+ echo "\$0: Failed to source $sdk_script with status \$status"
+ exit \$status
+fi

- cat >> $script <<EOF
if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
\$s "\$1"
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index 09f757a087..74c0600c3d 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -51,12 +51,13 @@ create_sdk_files() {
# Setup site file for external use
toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}

- toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
+ sdk_script="${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
+ toolchain_create_sdk_env_script ${SDK_OUTPUT}/${sdk_script}

# Add version information
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}

- toolchain_create_post_relocate_script ${SDK_OUTPUT}/${SDKPATH}/post-relocate-setup.sh
+ toolchain_create_post_relocate_script ${SDK_OUTPUT}/${SDKPATH}/post-relocate-setup.sh ${sdk_script}
}

do_install() {
--
2.11.0


[PATCH 4/7] toolchain-shar-extract: print post-relocate error

Martin Kelly
 

Currently, if a post-relocate script fails, it fails silently. We should
be louder about this, as it likely indicates a broken SDK.

Print a message if a post-relocate script fails.

Signed-off-by: Martin Kelly <mkelly@...>
---
meta/classes/toolchain-scripts.bbclass | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index cbba07838a..ae7bbef034 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -126,6 +126,11 @@ toolchain_create_post_relocate_script() {
if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
\$s "\$1"
+ status=\$?
+ if [ \$status != 0 ]; then
+ echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2
+ exit \$status
+ fi
done
rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
fi
--
2.11.0


[PATCH 3/7] toolchain-shar-extract: allow non-sh post-relocate

Martin Kelly
 

Currently, we look only for scripts matching *.sh, which means we can't
write post-relocate scripts in other languages.

Expand this to allow any type of script.

Signed-off-by: Martin Kelly <mkelly@...>
---
meta/classes/toolchain-scripts.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 71da5e5409..cbba07838a 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -124,7 +124,7 @@ toolchain_create_post_relocate_script() {

cat >> $script <<EOF
if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
- for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*.sh; do
+ for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
\$s "\$1"
done
rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
--
2.11.0


[PATCH 2/7] nativesdk-python*: suppress user site dirs

Martin Kelly
 

Currently, $HOME/.local is being added into sys.path in the Python SDK
causing subtle host contamination. Suppress this by exporting
PYTHONNOUSERSITE = "1" as documented in PEP 370.

This issue occurred in the past for python*-native and was fixed
similarly in OE-core commit 8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f
("python*native.bbclass: suppress user site dirs").

Signed-off-by: Martin Kelly <mkelly@...>
---
meta/recipes-devtools/python/python-scons-native_3.0.1.bb | 2 +-
meta/recipes-devtools/python/python3_3.5.5.bb | 2 +-
meta/recipes-devtools/python/python_2.7.14.bb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/python/python-scons-native_3.0.1.bb b/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
index dae89ab5d2..68b63c9357 100644
--- a/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
+++ b/meta/recipes-devtools/python/python-scons-native_3.0.1.bb
@@ -4,5 +4,5 @@ DEPENDS = "python-native"
RDEPENDS_${PN} = ""

do_install_append() {
- create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}'
+ create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' PYTHONNOUSERSITE='1'
}
diff --git a/meta/recipes-devtools/python/python3_3.5.5.bb b/meta/recipes-devtools/python/python3_3.5.5.bb
index f893b846ad..4dae4fa4c6 100644
--- a/meta/recipes-devtools/python/python3_3.5.5.bb
+++ b/meta/recipes-devtools/python/python3_3.5.5.bb
@@ -176,7 +176,7 @@ do_install() {
}

do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+ create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
}

SSTATE_SCAN_FILES += "Makefile"
diff --git a/meta/recipes-devtools/python/python_2.7.14.bb b/meta/recipes-devtools/python/python_2.7.14.bb
index 41a8609b15..b923b9237b 100644
--- a/meta/recipes-devtools/python/python_2.7.14.bb
+++ b/meta/recipes-devtools/python/python_2.7.14.bb
@@ -130,7 +130,7 @@ do_install() {
}

do_install_append_class-nativesdk () {
- create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+ create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
}

SSTATE_SCAN_FILES += "Makefile"
--
2.11.0


[PATCH 1/7] meson.bbclass: refactor native override

Martin Kelly
 

The native override is specified in two different places, so let's move
it into a function to reduce code duplication.

Signed-off-by: Martin Kelly <mkelly@...>
---
meta/classes/meson.bbclass | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 2d7ee4fffc..5881765abb 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -90,7 +90,7 @@ meson_do_configure() {
fi
}

-meson_do_configure_prepend_class-target() {
+override_native_tools() {
# Set these so that meson uses the native tools for its build sanity tests,
# which require executables to be runnable. The cross file will still
# override these for the target build. Note that we do *not* set CFLAGS,
@@ -100,18 +100,15 @@ meson_do_configure_prepend_class-target() {
export CXX="${BUILD_CXX}"
export LD="${BUILD_LD}"
export AR="${BUILD_AR}"
+
+}
+
+meson_do_configure_prepend_class-target() {
+ override_native_tools
}

meson_do_configure_prepend_class-nativesdk() {
- # Set these so that meson uses the native tools for its build sanity tests,
- # which require executables to be runnable. The cross file will still
- # override these for the nativesdk build. Note that we do *not* set CFLAGS,
- # LDFLAGS, etc. as they will be slurped in by meson and applied to the
- # nativesdk build, causing errors.
- export CC="${BUILD_CC}"
- export CXX="${BUILD_CXX}"
- export LD="${BUILD_LD}"
- export AR="${BUILD_AR}"
+ override_native_tools
}

meson_do_configure_prepend_class-native() {
--
2.11.0


[PATCH 0/7] meson: implement nativesdk support

Martin Kelly
 

This patch series implements nativesdk support fer meson. In order to do so, it
adds a few features to the toolchain-shar-extract functionality, which enables a
script to run prior to the SDK being extracted. This is important because the
meson.cross file (which meson uses to find its cross toolchain) allows for only
absolute paths. Thus, it is important to customize those paths to point to the
SDK at SDK extraction time. For comparison, cmake did not need this
functionality because it supports referencing environment variables in the
toolchain file, so we can just reference the SDK root environment variables. The
meson maintainers did not want to take that approach, so this seemed like the
best option.

If curious, see the following threads for more background information:
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146210.html
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146225.html
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146236.html
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146241.html
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146261.html
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146262.html

Martin Kelly (7):
meson.bbclass: refactor native override
nativesdk-python*: suppress user site dirs
toolchain-shar-extract: allow non-sh post-relocate
toolchain-shar-extract: print post-relocate error
toolchain-shar-extract: pass env to post-relocate
meson: handle exe wrappers
meson: enable nativesdk

meta/classes/meson.bbclass | 17 +-
meta/classes/toolchain-scripts.bbclass | 24 ++-
meta/recipes-core/meta/meta-environment.bb | 5 +-
meta/recipes-devtools/meson/meson.inc | 23 ++
...ke-ExternalProgram-get_path-a-bit-smarter.patch | 58 ++++++
...mandrunner-make-run-handle-python-options.patch | 53 +++++
.../0006-mesonlib-handle-meson-exe-wrappers.patch | 231 +++++++++++++++++++++
meta/recipes-devtools/meson/meson/meson-setup.py | 62 ++++++
meta/recipes-devtools/meson/meson/meson-wrapper | 14 ++
meta/recipes-devtools/meson/meson_0.46.1.bb | 20 +-
.../meson/nativesdk-meson_0.46.1.bb | 74 +++++++
.../python/python-scons-native_3.0.1.bb | 2 +-
meta/recipes-devtools/python/python3_3.5.5.bb | 2 +-
meta/recipes-devtools/python/python_2.7.14.bb | 2 +-
14 files changed, 548 insertions(+), 39 deletions(-)
create mode 100644 meta/recipes-devtools/meson/meson.inc
create mode 100644 meta/recipes-devtools/meson/meson/0004-make-ExternalProgram-get_path-a-bit-smarter.patch
create mode 100644 meta/recipes-devtools/meson/meson/0005-commandrunner-make-run-handle-python-options.patch
create mode 100644 meta/recipes-devtools/meson/meson/0006-mesonlib-handle-meson-exe-wrappers.patch
create mode 100755 meta/recipes-devtools/meson/meson/meson-setup.py
create mode 100755 meta/recipes-devtools/meson/meson/meson-wrapper
create mode 100644 meta/recipes-devtools/meson/nativesdk-meson_0.46.1.bb

--
2.11.0


[PATCH] kernel-uimage.bbclass: introduce UBOOT_MKIMAGE_COMMANDS

Ming Liu
 

From: Ming Liu <liu.ming50@...>

It allows the end users to be able to override it to set their own
customized mkimage commands instead of a fixed uboot-mkimage command
with fixed parameters.

Also splits out normalize_entrypoint to be used by other tasks.

Signed-off-by: Ming Liu <liu.ming50@...>
---
meta/classes/kernel-uimage.bbclass | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass
index a3a3d33..4826427 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -20,16 +20,31 @@ python __anonymous () {
bb.build.addtask('do_uboot_mkimage', 'do_install', 'do_kernel_link_images', d)
}

-do_uboot_mkimage[dirs] += "${B}"
-do_uboot_mkimage() {
- uboot_prep_kimage
+normalize_entrypoint() {
+ local entrypoint=${UBOOT_ENTRYPOINT}
+ if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
+ entrypoint=`${HOST_PREFIX}nm ${B}/vmlinux | \
+ awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
+ fi
+ echo $entrypoint
+}

+uboot_make_kimage() {
ENTRYPOINT=${UBOOT_ENTRYPOINT}
if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
ENTRYPOINT=`${HOST_PREFIX}nm ${B}/vmlinux | \
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
fi

- uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} \
+ -e `normalize_entrypoint` -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
+}
+
+UBOOT_MKIMAGE_COMMANDS ?= "uboot_make_kimage"
+
+do_uboot_mkimage[dirs] += "${B}"
+do_uboot_mkimage() {
+ uboot_prep_kimage
+ ${UBOOT_MKIMAGE_COMMANDS}
rm -f linux.bin
}
--
2.7.4


[PATCH] kernel-uimage.bbclass: use boolean to check KEEPUIMAGE

Ming Liu
 

From: Ming Liu <liu.ming50@...>

It now accepts yes/on/1 as positive values.

Signed-off-by: Ming Liu <liu.ming50@...>
---
meta/classes/kernel-uimage.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass
index 1d8656e..a3a3d33 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -9,9 +9,9 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We override the variable here, since we need
# to build uImage using the kernel build system if and only if
- # KEEPUIMAGE == yes. Otherwise, we pack compressed vmlinux into
- # the uImage .
- if d.getVar("KEEPUIMAGE") != 'yes':
+ # KEEPUIMAGE == yes|1|on. Otherwise, we pack compressed vmlinux
+ # into the uImage.
+ if not oe.types.boolean(d.getVar("KEEPUIMAGE")):
typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or ""
if "uImage" in typeformake.split():
d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', typeformake.replace('uImage', 'vmlinux'))
--
2.7.4


Re: [PATCH v2 4/5] bitbake.conf: include ASNEEDED in TARGET_LDFLAGS directly

Khem Raj
 

On Wed, May 30, 2018 at 10:46 AM, Andre McCurdy <armccurdy@...> wrote:
On Tue, May 29, 2018 at 7:13 PM, Khem Raj <raj.khem@...> wrote:
On Tue, May 29, 2018 at 2:29 PM, Andre McCurdy <armccurdy@...> wrote:
Previously, ASNEEDED was appended to TARGET_LDFLAGS from
as-needed.inc via tcmode-default.inc and so may not have been enabled
for external toolchain builds or other configurations which over-ride
TCMODE (ie builds which do not include tcmode-default.inc).

Include ASNEEDED in TARGET_LDFLAGS directly from bitbake.conf to
ensure that the optimisation is applied to all builds (and for
consistency with the way that TARGET_LINK_HASH_STYLE is handled).
We have to be ensure that external toolchains can either override or support
--as-needed feature,
External toolchains can easily over-ride ASNEEDED if they need to.

since we may not be able to control what linker they use
or version of gnu ld they may deploy.
When was --as-needed first added to gnu ld? Do you know of an external
toolchain which might not support it?
If they have new enough binutils it should not be an issue. but I dont know
if there are such SDKs out there, thats where external toolchain makers can
help. Otherwise we can assume its fine.

From internal toolchains pov
this is a good change, but It would be good if some users of external toolchains
can chime in.


Re: [PATCH v2 4/5] bitbake.conf: include ASNEEDED in TARGET_LDFLAGS directly

Andre McCurdy
 

On Tue, May 29, 2018 at 7:13 PM, Khem Raj <raj.khem@...> wrote:
On Tue, May 29, 2018 at 2:29 PM, Andre McCurdy <armccurdy@...> wrote:
Previously, ASNEEDED was appended to TARGET_LDFLAGS from
as-needed.inc via tcmode-default.inc and so may not have been enabled
for external toolchain builds or other configurations which over-ride
TCMODE (ie builds which do not include tcmode-default.inc).

Include ASNEEDED in TARGET_LDFLAGS directly from bitbake.conf to
ensure that the optimisation is applied to all builds (and for
consistency with the way that TARGET_LINK_HASH_STYLE is handled).
We have to be ensure that external toolchains can either override or support
--as-needed feature,
External toolchains can easily over-ride ASNEEDED if they need to.

since we may not be able to control what linker they use
or version of gnu ld they may deploy.
When was --as-needed first added to gnu ld? Do you know of an external
toolchain which might not support it?

From internal toolchains pov
this is a good change, but It would be good if some users of external toolchains
can chime in.


Re: [PATCH] busybox: Enable FEATURE_MOUNT_NFS and use libtirpc

Andre McCurdy
 

On Thu, May 10, 2018 at 12:26 PM, Khem Raj <raj.khem@...> wrote:
On 5/10/18 12:16 PM, Martin Jansa wrote:

On second thought, this probably should be enabled using a config
fragment, since its not gonna link in another library it may not be
common case to justify for a default config.
That's true, I've enabled CONFIG_FEATURE_MOUNT_NFS mostly to show how to
reproduce the issue.

If there isn't interest to enable this by default, I'm fine with keeping
this
locally (to enable it only with our defconfig changes which enable it).
I think keeping it as a nfsmount.cfg which then can be applied via a
bbappend could be a good option. May be adding a PACKAGECONFIG to control
the -I flag and libtirpc dependency would be nice too
According to the busybox config help, CONFIG_FEATURE_MOUNT_NFS is only
required for kernel versions before 2.6.23. Do we officially support
kernels that old in oe-core? Or should this be in a .bbappend etc in
separate layer?

//config:config FEATURE_MOUNT_NFS
//config: bool "Support mounting NFS file systems on Linux < 2.6.23"
//config: default n
//config: depends on MOUNT
//config: select FEATURE_SYSLOG
//config: help
//config: Enable mounting of NFS file systems on Linux kernels prior
//config: to version 2.6.23. Note that in this case mounting of NFS
//config: over IPv6 will not be possible.
//config:
//config: Note that this option links in RPC support from libc,
//config: which is rather large (~10 kbytes on uclibc).


Re: [PATCH] busybox: Fix zlma segfaults

Khem Raj
 

The patch seems to be corrupt.

On Wed, May 30, 2018 at 7:48 AM, Andrej Valek <andrej.valek@...> wrote:
- fix multiple lzma segmentation faults
- patch includes multiple fixing commits with tests-cases

Signed-off-by: Andrej Valek <andrej.valek@...>
---
.../busybox/busybox/busybox-fix-unlzma-segfaults.patch | Bin 0 -> 6965 bytes
meta/recipes-core/busybox/busybox_1.27.2.bb | 1 +
2 files changed, 1 insertion(+)
create mode 100644 meta/recipes-core/busybox/busybox/busybox-fix-unlzma-segfaults.patch

diff --git a/meta/recipes-core/busybox/busybox/busybox-fix-unlzma-segfaults.patch b/meta/recipes-core/busybox/busybox/busybox-fix-unlzma-segfaults.patch
new file mode 100644
index 0000000000000000000000000000000000000000..405bfbcc58fc0cfadfb22ca2694d4a59ba9bf150
GIT binary patch
literal 6965
zcmd5>Ym6jS6&?bpT_m8vDA5ql_5$0z)m>dx-97!7nceMWXGycOy(=>dfn}*wSKaO@
zwjOO&_0G()CJ-egs6R}=7)_KA9uhSM_@RhI2@-!0{-~gVApX$!_~ip4g1DY@t7^J?
zrnh$%R%4}8k9*HO_uO;7d(OG1+x=jz?XBh&Nv%j~9rjzRaME^k2w1nH_w6tcgrhAF
z`n@3ZneIU7>&9`*?H+@C9+tzf7t{-dcE1})?TD4+vak>=dn+2YN=Db(ZJBe5T&*aA
zU|Vh7H<qmvtPaL9Gmb;M-{~+PEZ1bKcnABWqiZHJJg4Wg04Kl63YQ`1F~jOu2AHg4
zcy7n);y^AqbacxOAoOB>C#@cIESoJe-9)~Q-n9%N6HThyg}#dfl92`7HK8A{00w;n
z;R*u*w7yFs;SizY`8a<fndP~#vTPa4VB=I=0#up9+)xjxk1J1tW(c^D6WAPpZWy>E
z)EzD~^n_^XxtNO;K;Y=MjY5aZx(huoh_oWXVLilYaNU6wAR7m*V)blBCR(3Q=vb?`
zniY#kLl%U2L&xPwf^a0ZTz(NH>j!n%iw5j@eh5bs^L4Fo#CoxA3%FLt3JYXFy*OQ~
zPPf}tS*_L##W1U;Qr64m3M<uAxnk7xl3FWGw~yhnx^+<GQgIsZWc5X>>oPO%bvpU>
zS{)j$>9gD6M%`w|VHWLxU(yNs+7nm|7ZgZ1?=C?wtxgB>Exqq2#*R^1SU2ZnlfB1b
zLLQMFtKb}GOsTR`$;<e|#aHS|sa~!~a&mzvtFkPJqWC`8SMzc?Uz9;9*Gr{(u_{fM
zlxn%8RHkG0d-gzHQF8c+cclb-_6V@uat*t0GDxGw+HGk$J>1rAYw@n+9fBx`+pP|u
zq}yr3SuO*!-OWgn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td{|l$L|iug-k%uiL@{DlwpB6MsujXj`y0)LYY!c1Ep5?tV&*nDgYZOd(iYfE
zeYUNzdBpkH5@WcIZjDl{E|<^dJ`W$b5WVL^Q<qLXY2^;w^4-6D?1NKN7m-7yTj8>c
zjx437E@ZD=Kur^`E5`L6K5+2|#<h=YdkZ7<xc1SuPYr)gob!UI3#OV#y>IF~gx3*m
z^K<H!F~X_O2_t;OdB;e^bpu8!bu42i^)^hMc)@K$B6Y49`N^<}M&8%$mEeLu&yRV|
z9=y<oTZ>)mgzvRH$>V68evdF4%3-k>sg$L%T&Y#D)-W8oloHjq_?_1x;o2lN1cuK`
z+fli|^Vg_i<Q&IOj9*Sq$Qx$#BE~Op>J*-o$SLk7((MT=9(H&D!)UVN`NydczAPaP
z*}klj0C+F*;0aj#Ts+V`Jcr$R-+`Tii1&PlUIfwWQTblCA*o3oY2DI1%qx>45eW5=
z{CB|kY*?UA&O-cDLIDYb5z*y)AW6}G4;wwRy6YM|9F4{zKB$h7+3`+LyrVxD=((e?
z13JFv;4#o?<NpK{)iEr_<b&zyD7M~=$2^-NF+V^GB9C(zC*x2T=>eDh-_QWX!buv4
W{LcTI1|nRc&RzV|3pPQNK=mIff;bTX

literal 0
HcmV?d00001

diff --git a/meta/recipes-core/busybox/busybox_1.27.2.bb b/meta/recipes-core/busybox/busybox_1.27.2.bb
index 36a6342aaf..9f0393505a 100644
--- a/meta/recipes-core/busybox/busybox_1.27.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.27.2.bb
@@ -45,6 +45,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://CVE-2011-5325.patch \
file://CVE-2017-15873.patch \
file://busybox-CVE-2017-16544.patch \
+ file://busybox-fix-unlzma-segfaults.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "

--
2.11.0

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


Re: [PATCH 2/3] qemu: upgrade to 2.12.0

Alistair Francis
 

On Tue, May 29, 2018 at 7:16 PM, Khem Raj <raj.khem@...> wrote:
On Tue, May 29, 2018 at 4:14 PM, Alistair Francis <alistair23@...> wrote:
On Tue, May 29, 2018 at 1:40 PM, Martin Jansa <martin.jansa@...> wrote:
After removing ld-is-gold I was able to reproduce the issue.

Unfortunately removing the
meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
doesn't help with the hang, then I've tried to upgrade to latest SRCREV in
qemu master (currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)

Will try to bisect where it started to hang between 2.11.0 and 2.12.0, but
it might be faster if Alistair Francis can chime in as the author of this
patch, he might have better idea why it stopped working.
I'm not sure why it would stop working between the two releases.

I can't reproduce the hang, I just see this compilation error when
buidling webkitgtk with musl:

/scratch/alistair/yocto/oe-master/build/tmp-musl/work/core2-64-oe-linux-musl/webkitgtk/2.20.2-r0/webkitgtk-2.20.2/Source/WebCore/platform/graphics/OpenGLShims.h:23:10:
fatal error: GL/gl.h: No such file or directory
#include <GL/gl.h>
do you have opengl x11 in distro features ? these headers should come
from mesa-dev
Yep, after adding opengl it builds. I can't reproduce any hangs with
QEMU 2.12 on top of master. Are there other patches as well that are
contributing?

Alistair


[PATCH] busybox: Fix zlma segfaults

Andrej Valek
 

- fix multiple lzma segmentation faults
- patch includes multiple fixing commits with tests-cases

Signed-off-by: Andrej Valek <andrej.valek@...>
---
.../busybox/busybox/busybox-fix-unlzma-segfaults.patch | Bin 0 -> 6965 bytes
meta/recipes-core/busybox/busybox_1.27.2.bb | 1 +
2 files changed, 1 insertion(+)
create mode 100644 meta/recipes-core/busybox/busybox/busybox-fix-unlzma-segfaults.patch

diff --git a/meta/recipes-core/busybox/busybox/busybox-fix-unlzma-segfaults.patch b/meta/recipes-core/busybox/busybox/busybox-fix-unlzma-segfaults.patch
new file mode 100644
index 0000000000000000000000000000000000000000..405bfbcc58fc0cfadfb22ca2694d4a59ba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8>c
zjx437E@ZD=Kur^`E5`L6K5+2|#<h=YdkZ7<xc1SuPYr)gob!UI3#OV#y>IF~gx3*m
z^K<H!F~X_O2_t;OdB;e^bpu8!bu42i^)^hMc)@K$B6Y49`N^<}M&8%$mEeLu&yRV|
z9=y<oTZ>)mgzvRH$>V68evdF4%3-k>sg$L%T&Y#D)-W8oloHjq_?_1x;o2lN1cuK`
z+fli|^Vg_i<Q&IOj9*Sq$Qx$#BE~Op>J*-o$SLk7((MT=9(H&D!)UVN`NydczAPaP
z*}klj0C+F*;0aj#Ts+V`Jcr$R-+`Tii1&PlUIfwWQTblCA*o3oY2DI1%qx>45eW5=
z{CB|kY*?UA&O-cDLIDYb5z*y)AW6}G4;wwRy6YM|9F4{zKB$h7+3`+LyrVxD=((e?
z13JFv;4#o?<NpK{)iEr_<b&zyD7M~=$2^-NF+V^GB9C(zC*x2T=>eDh-_QWX!buv4
W{LcTI1|nRc&RzV|3pPQNK=mIff;bTX

literal 0
HcmV?d00001

diff --git a/meta/recipes-core/busybox/busybox_1.27.2.bb b/meta/recipes-core/busybox/busybox_1.27.2.bb
index 36a6342aaf..9f0393505a 100644
--- a/meta/recipes-core/busybox/busybox_1.27.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.27.2.bb
@@ -45,6 +45,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://CVE-2011-5325.patch \
file://CVE-2017-15873.patch \
file://busybox-CVE-2017-16544.patch \
+ file://busybox-fix-unlzma-segfaults.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "

--
2.11.0


[poky][PATCH] systemd: resolved linked even if the option is disabled

Nicola Lunghi
 

---------- Forwarded message ----------
From: nick83ola <nick83ola@...>
Date: 30 May 2018 at 14:24
Subject: [poky][PATCH] systemd: resolved linked even if the option is disabled
To: poky@...


systemd: resolved linked even if the option is disabled

in the do_install function in systemd recipe the condition to check
if the resolved option is selected is reversed (wrong !).
This is for example true if we compile systemd with musl instead of
glibc (every poky-image-minimal recipe).

Also no link should be created if the option is not selected
nor an ALTERNATIVE set.

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

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

@@ -537,7 +534,7 @@ python __anonymous() {
# TODO:
# u-a for runlevel and telinit

-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"

ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
@@ -563,6 +560,7 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
ALTERNATIVE_PRIORITY[runlevel] ?= "300"

+ALTERNATIVE_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
'resolved', 'resolv-conf', '', d)}"
ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
--
2.17.0




--

P.S. Le informazioni trasmesse attraverso la presente comunicazione
sono di esclusiva
spettanza dell'effettivo destinatario. Nel caso in cui le stesse
raggiungessero, per
qualunque motivo, soggetti non interessati, questi ultimi vorranno
darne immediata
notizia al mittente. In ogni caso, eventuali soggetti diversi dai
legittimi destinatari
della presente comunicazione e dei dati contenuti negli allegati, possono essere
sanzionati ai sensi del T.U. sul trattamento dei dati personali d.lgs.
196/2003, sia ai
sensi dell'art. 616 del Codice Penale che disciplina la violazione del
segreto sulla
corrispondenza.

62301 - 62320 of 174224