diff options
Diffstat (limited to 'poky/meta/recipes-core')
71 files changed, 1585 insertions, 1117 deletions
diff --git a/poky/meta/recipes-core/base-files/base-files_3.0.14.bb b/poky/meta/recipes-core/base-files/base-files_3.0.14.bb index a1639db83..4b4027f18 100644 --- a/poky/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/poky/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -134,15 +134,16 @@ do_install () { install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd ln -sf /proc/mounts ${D}${sysconfdir}/mtab -} -DISTRO_VERSION[vardepsexclude] += "DATE" -do_install_basefilesissue () { + # deal with hostname if [ "${hostname}" ]; then echo ${hostname} > ${D}${sysconfdir}/hostname echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts fi +} +DISTRO_VERSION[vardepsexclude] += "DATE" +do_install_basefilesissue () { install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} if [ -n "${DISTRO_NAME}" ]; then printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue diff --git a/poky/meta/recipes-core/base-passwd/base-passwd/kvm.patch b/poky/meta/recipes-core/base-passwd/base-passwd/kvm.patch new file mode 100644 index 000000000..113d5151e --- /dev/null +++ b/poky/meta/recipes-core/base-passwd/base-passwd/kvm.patch @@ -0,0 +1,23 @@ +From 6355278b9f744291864c373a32a8da8f84aaaf37 Mon Sep 17 00:00:00 2001 +From: Jacob Kroon <jacob.kroon@gmail.com> +Date: Wed, 30 Jan 2019 04:53:48 +0000 +Subject: [PATCH] Add kvm group + +Upstream-Status: Pending +Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> +--- + group.master | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/group.master b/group.master +index cea9d60..5b62284 100644 +--- a/group.master ++++ b/group.master +@@ -34,6 +34,7 @@ utmp:*:43: + video:*:44: + sasl:*:45: + plugdev:*:46: ++kvm:*:47: + staff:*:50: + games:*:60: + shutdown:*:70: diff --git a/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb index c6be1c1d0..d1aab0918 100644 --- a/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb +++ b/poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb @@ -12,7 +12,8 @@ SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar file://noshadow.patch \ file://input.patch \ file://disable-docs.patch \ - " + file://kvm.patch \ + " SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421" SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36" diff --git a/poky/meta/recipes-core/busybox/busybox.inc b/poky/meta/recipes-core/busybox/busybox.inc index c9d25ff1c..174ce5a8c 100644 --- a/poky/meta/recipes-core/busybox/busybox.inc +++ b/poky/meta/recipes-core/busybox/busybox.inc @@ -347,24 +347,12 @@ do_install () { fi } +PTEST_BINDIR = "1" + do_install_ptest () { cp -r ${B}/testsuite ${D}${PTEST_PATH}/ cp ${B}/.config ${D}${PTEST_PATH}/ ln -s /bin/busybox ${D}${PTEST_PATH}/busybox - - mkdir ${D}${PTEST_PATH}/bin - if [ "${BUSYBOX_SPLIT_SUID}" = "1" ]; then - while read link; do - ln -s ${base_bindir}/busybox.suid ${D}${PTEST_PATH}/bin/$(basename $link) - done <${D}${sysconfdir}/busybox.links.suid - while read link; do - ln -s ${base_bindir}/busybox.nosuid ${D}${PTEST_PATH}/bin/$(basename $link) - done <${D}${sysconfdir}/busybox.links.nosuid - else - while read link; do - ln -s ${base_bindir}/busybox ${D}${PTEST_PATH}/bin/$(basename $link) - done <${D}${sysconfdir}/busybox.links - fi } inherit update-alternatives diff --git a/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch b/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch new file mode 100644 index 000000000..d22db4a66 --- /dev/null +++ b/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch @@ -0,0 +1,39 @@ +From a4e03fbb4d82f91069d96005405f89c45b8fd157 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Wed, 17 Apr 2019 09:24:37 +0800 +Subject: [PATCH] dc.tests: fix two test case to also depend on DC_BIG + +Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2019-April/087205.html] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + testsuite/dc.tests | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/testsuite/dc.tests b/testsuite/dc.tests +index 1708a48..8c3af41 100755 +--- a/testsuite/dc.tests ++++ b/testsuite/dc.tests +@@ -41,6 +41,9 @@ testing "dc complex without spaces (multiple args)" \ + "16\n" \ + "" "" + ++optional FEATURE_DC_BIG ++# All tests below depend on FEATURE_DC_BIG ++ + testing "dc read" \ + "dc -finput" \ + "2\n9\n1\n" \ +@@ -51,9 +54,6 @@ testing "dc read string" \ + "2\nstr\n1\n" \ + "1?2\nf" "[str]\n" + +-optional FEATURE_DC_BIG +-# All tests below depend on FEATURE_DC_BIG +- + testing "dc '>a' (conditional execute string) 1" \ + "dc" \ + "1\n9\n" \ +-- +2.7.4 + diff --git a/poky/meta/recipes-core/busybox/busybox/defconfig b/poky/meta/recipes-core/busybox/busybox/defconfig index 493db28e8..0b27fcd4b 100644 --- a/poky/meta/recipes-core/busybox/busybox/defconfig +++ b/poky/meta/recipes-core/busybox/busybox/defconfig @@ -989,7 +989,6 @@ CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" # CONFIG_FEATURE_UDHCP_PORT is not set CONFIG_UDHCP_DEBUG=0 CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 -# CONFIG_FEATURE_UDHCP_RFC3397 is not set # CONFIG_FEATURE_UDHCP_8021Q is not set CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b" diff --git a/poky/meta/recipes-core/busybox/busybox_1.30.1.bb b/poky/meta/recipes-core/busybox/busybox_1.30.1.bb index 164f3ab3c..ba76755d7 100644 --- a/poky/meta/recipes-core/busybox/busybox_1.30.1.bb +++ b/poky/meta/recipes-core/busybox/busybox_1.30.1.bb @@ -44,6 +44,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-testsuite-check-uudecode-before-using-it.patch \ file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \ file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \ + file://0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch \ " SRC_URI_append_libc-musl = " file://musl.cfg " diff --git a/poky/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch b/poky/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch new file mode 100644 index 000000000..77770093c --- /dev/null +++ b/poky/meta/recipes-core/coreutils/coreutils/strtod_fix_clash_with_strtold.patch @@ -0,0 +1,56 @@ +From 0562b040fa17f1722ba2b3096067b45d0582ca53 Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Mon, 11 Mar 2019 16:40:29 -0700 +Subject: [PATCH] strtod: fix clash with strtold + +Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817). +* lib/strtod.c (compute_minus_zero, minus_zero): +Simplify by remving the macro / external variable, +and having just a function. User changed. This avoids +the need for an external variable that might clash. + +Upstream-Status: Backport [rhel5] + +Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> + +--- + ChangeLog | 9 +++++++++ + lib/strtod.c | 11 +++++------ + 2 files changed, 14 insertions(+), 6 deletions(-) + +diff --git a/lib/strtod.c b/lib/strtod.c +index b9eaa51b4..69b1564e1 100644 +--- a/lib/strtod.c ++++ b/lib/strtod.c +@@ -294,16 +294,15 @@ parse_number (const char *nptr, + ICC 10.0 has a bug when optimizing the expression -zero. + The expression -MIN * MIN does not work when cross-compiling + to PowerPC on Mac OS X 10.5. */ +-#if defined __hpux || defined __sgi || defined __ICC + static DOUBLE +-compute_minus_zero (void) ++minus_zero (void) + { ++#if defined __hpux || defined __sgi || defined __ICC + return -MIN * MIN; +-} +-# define minus_zero compute_minus_zero () + #else +-DOUBLE minus_zero = -0.0; ++ return -0.0; + #endif ++} + + /* Convert NPTR to a DOUBLE. If ENDPTR is not NULL, a pointer to the + character after the last one used in the number is put in *ENDPTR. */ +@@ -479,6 +478,6 @@ STRTOD (const char *nptr, char **endptr) + /* Special case -0.0, since at least ICC miscompiles negation. We + can't use copysign(), as that drags in -lm on some platforms. */ + if (!num && negative) +- return minus_zero; ++ return minus_zero (); + return negative ? -num : num; + } +-- +2.20.1 + diff --git a/poky/meta/recipes-core/coreutils/coreutils_8.30.bb b/poky/meta/recipes-core/coreutils/coreutils_8.31.bb index 8f4ee5571..4a74f619a 100644 --- a/poky/meta/recipes-core/coreutils/coreutils_8.30.bb +++ b/poky/meta/recipes-core/coreutils/coreutils_8.31.bb @@ -6,7 +6,7 @@ HOMEPAGE = "http://www.gnu.org/software/coreutils/" BUGTRACKER = "http://debbugs.gnu.org/coreutils" LICENSE = "GPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\ - file://src/ls.c;beginline=1;endline=15;md5=dbe356a88b09c29232b083d1ff8ac82a" + file://src/ls.c;beginline=1;endline=15;md5=c456f9896277a0543e3866777ccc0255" DEPENDS = "gmp libcap" DEPENDS_class-native = "" @@ -20,8 +20,10 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ file://0001-local.mk-fix-cross-compiling-problem.patch \ " -SRC_URI[md5sum] = "ab06d68949758971fe744db66b572816" -SRC_URI[sha256sum] = "e831b3a86091496cdba720411f9748de81507798f6130adeaef872d206e1b057" +SRC_URI_append_libc-musl = "file://strtod_fix_clash_with_strtold.patch" + +SRC_URI[md5sum] = "0009a224d8e288e8ec406ef0161f9293" +SRC_URI[sha256sum] = "ff7a9c918edce6b4f4b2725e3f9b37b0c4d193531cac49a48b56c4d0d3a9e9fd" EXTRA_OECONF_class-native = "--without-gmp" EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}" diff --git a/poky/meta/recipes-core/dbus/dbus-test_1.12.12.bb b/poky/meta/recipes-core/dbus/dbus-test_1.12.12.bb index f4131926c..f95b31a86 100644 --- a/poky/meta/recipes-core/dbus/dbus-test_1.12.12.bb +++ b/poky/meta/recipes-core/dbus/dbus-test_1.12.12.bb @@ -7,7 +7,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ DEPENDS = "dbus glib-2.0" -RDEPENDS_${PN} += "make" RDEPENDS_${PN}-dev = "" SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ @@ -33,13 +32,14 @@ EXTRA_OECONF = "--enable-tests \ --enable-installed-tests \ --enable-checks \ --enable-asserts \ - --enable-verbose-mode \ --enable-largefile \ --disable-xml-docs \ --disable-doxygen-docs \ --disable-libaudit \ --with-dbus-test-dir=${PTEST_PATH} \ - ${EXTRA_OECONF_X}" + ${EXTRA_OECONF_X} \ + --enable-embedded-tests \ + " EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl" @@ -50,6 +50,7 @@ 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" +PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,," do_install() { : @@ -58,12 +59,17 @@ 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 \ - variant uid-permissions syntax spawn sd-activation names monitor message fdpass " + variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service" 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 -d ${D}${PTEST_PATH}/bus + install ${B}/bus/.libs/dbus-daemon-launch-helper-test ${D}${PTEST_PATH}/bus + + install ${B}/test/test-segfault ${D}${PTEST_PATH}/test + cp -r ${B}/test/data ${D}${PTEST_PATH}/test install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test @@ -78,6 +84,7 @@ do_install_ptest() { sed -i -e 's;@PTEST_PATH@;${PTEST_PATH};g' ${D}${PTEST_PATH}/run-ptest } -RDEPENDS_${PN}-ptest += "bash" +RDEPENDS_${PN}-ptest += "bash make dbus" +RDEPENDS_${PN}-ptest_remove = "${PN}" PRIVATE_LIBS_${PN}-ptest = "libdbus-1.so.3" diff --git a/poky/meta/recipes-core/dbus/dbus/run-ptest b/poky/meta/recipes-core/dbus/dbus/run-ptest index 353ba1e90..cf2e68fa0 100755 --- a/poky/meta/recipes-core/dbus/dbus/run-ptest +++ b/poky/meta/recipes-core/dbus/dbus/run-ptest @@ -17,8 +17,16 @@ export LD_LIBRARY_PATH=@PTEST_PATH@/test/.libs files=`ls test/test-*` for i in $files - do - ./$i ./test/data >/dev/null - output - done +do + #these programs are used by testcase test-bus, don't run here + if [ $i = "test/test-service" ] \ + || [ $i = "test/test-shell-service" ] \ + || [ $i = "test/test-segfault" ] + then + continue + fi + + ./$i ./test/data >/dev/null 2>&1 + output +done diff --git a/poky/meta/recipes-core/dropbear/dropbear.inc b/poky/meta/recipes-core/dropbear/dropbear.inc index 3fbdb5e82..25376038f 100644 --- a/poky/meta/recipes-core/dropbear/dropbear.inc +++ b/poky/meta/recipes-core/dropbear/dropbear.inc @@ -34,6 +34,8 @@ RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS inherit autotools update-rc.d systemd +CVE_PRODUCT = "dropbear_ssh" + INITSCRIPT_NAME = "dropbear" INITSCRIPT_PARAMS = "defaults 10" diff --git a/poky/meta/recipes-core/dropbear/dropbear_2019.77.bb b/poky/meta/recipes-core/dropbear/dropbear_2019.77.bb deleted file mode 100644 index d2a71ba64..000000000 --- a/poky/meta/recipes-core/dropbear/dropbear_2019.77.bb +++ /dev/null @@ -1,4 +0,0 @@ -require dropbear.inc - -SRC_URI[md5sum] = "5d4f0256c5d13820b0a3eaadb1a0bc1a" -SRC_URI[sha256sum] = "d91f78ebe633be1d071fd1b7e5535b9693794048b019e9f4bea257e1992b458d" diff --git a/poky/meta/recipes-core/dropbear/dropbear_2019.78.bb b/poky/meta/recipes-core/dropbear/dropbear_2019.78.bb new file mode 100644 index 000000000..d2cd8161b --- /dev/null +++ b/poky/meta/recipes-core/dropbear/dropbear_2019.78.bb @@ -0,0 +1,4 @@ +require dropbear.inc + +SRC_URI[md5sum] = "a972c85ed678ad0fdcb7844e1294fb54" +SRC_URI[sha256sum] = "525965971272270995364a0eb01f35180d793182e63dd0b0c3eb0292291644a4" diff --git a/poky/meta/recipes-core/ell/ell_0.20.bb b/poky/meta/recipes-core/ell/ell_0.20.bb new file mode 100644 index 000000000..81caa80fa --- /dev/null +++ b/poky/meta/recipes-core/ell/ell_0.20.bb @@ -0,0 +1,22 @@ +SUMMARY = "Embedded Linux Library" +DESCRIPTION = "The Embedded Linux Library (ELL) provides core, \ +low-level functionality for system daemons. It typically has no \ +dependencies other than the Linux kernel, C standard library, and \ +libdl (for dynamic linking). While ELL is designed to be efficient \ +and compact enough for use on embedded Linux platforms, it is not \ +limited to resource-constrained systems." +SECTION = "libs" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=fb504b67c50331fc78734fed90fb0e09" + +DEPENDS = "dbus" + +inherit autotools pkgconfig + +SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz" +SRC_URI[md5sum] = "920189f5be4ee4cd72d610baeb20da65" +SRC_URI[sha256sum] = "d4aa08915f4058ecaab509dffbe22665d71dba6fe9626caff63c0e5f4b78a394" + +do_configure_prepend () { + mkdir -p ${S}/build-aux +} diff --git a/poky/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest b/poky/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest new file mode 100644 index 000000000..f17f3c87a --- /dev/null +++ b/poky/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh +# +#This script is used to run gettext test suites +cd tests + +make -k runtest-TESTS top_srcdir=.. srcdir=. abs_srcdir=$PWD top_builddir=$PWD/../ abs_top_srcdir=$PWD/../ | cat diff --git a/poky/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch b/poky/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch new file mode 100644 index 000000000..31ff9138a --- /dev/null +++ b/poky/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch @@ -0,0 +1,58 @@ +From c4b1f3a0c7b7c40b343be9b95deb84e0485643be Mon Sep 17 00:00:00 2001 +From: "Hongjun.Yang" <hongjun.yang@windriver.com> +Date: Thu, 28 Jul 2016 12:36:15 +0800 +Subject: [PATCH] fix for ptest + +Add serial-tests support, ptest need it + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + configure.ac | 2 +- + gettext-runtime/configure.ac | 2 +- + gettext-tools/configure.ac | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5e996fa..880581f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -23,7 +23,7 @@ AC_INIT([gettext], + [bug-gnu-gettext@gnu.org]) + AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) + AC_CONFIG_AUX_DIR([build-aux]) +-AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests dist-xz dist-lzip]) ++AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests dist-xz dist-lzip]) + + dnl Override automake's tar command used for creating distributions. + am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"' +diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac +index e9299b6..d4f5528 100644 +--- a/gettext-runtime/configure.ac ++++ b/gettext-runtime/configure.ac +@@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], + [bug-gnu-gettext@gnu.org]) + AC_CONFIG_SRCDIR([intl/dcigettext.c]) + AC_CONFIG_AUX_DIR([../build-aux]) +-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) ++AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) + AC_CONFIG_HEADERS([config.h]) + + dnl Installation directories. +diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac +index 920eeb6..c507434 100644 +--- a/gettext-tools/configure.ac ++++ b/gettext-tools/configure.ac +@@ -22,7 +22,7 @@ AC_INIT([gettext-tools], + [bug-gnu-gettext@gnu.org]) + AC_CONFIG_SRCDIR([src/msgfmt.c]) + AC_CONFIG_AUX_DIR([../build-aux]) +-AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) ++AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) + AC_CONFIG_HEADERS([config.h]) + + dnl Installation directories. +-- +2.1.4 + diff --git a/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb index 404972439..30121ad23 100644 --- a/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb +++ b/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb @@ -22,12 +22,14 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ file://use-pkgconfig.patch \ file://fix-CVE-2018-18751.patch \ + file://run-ptest \ + file://serial-tests-config.patch \ " SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092" SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43" -inherit autotools texinfo pkgconfig +inherit autotools texinfo pkgconfig ptest EXTRA_OECONF += "--without-lispdir \ --disable-csharp \ @@ -129,4 +131,58 @@ do_install_append_class-native () { } +do_compile_ptest() { + cd ${B}/gettext-tools/tests/ + sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_PROGRAMS)' Makefile + oe_runmake buildtest-TESTS + cd - +} + +do_install_ptest() { + if [ ${PTEST_ENABLED} = "1" ]; then + mkdir -p ${D}${PTEST_PATH}/tests + mkdir -p ${D}${PTEST_PATH}/src + mkdir -p ${D}${PTEST_PATH}/po + mkdir -p ${D}${PTEST_PATH}/misc + cp -rf ${S}/gettext-tools/tests/* ${D}${PTEST_PATH}/tests + cp -rf ${B}/gettext-tools/tests/.libs/* ${D}${PTEST_PATH}/tests + cp -rf ${B}/gettext-runtime/intl/.libs/libgnuintl.so.8* ${D}${libdir}/ + cp -rf ${B}/gettext-tools/tests/Makefile ${D}${PTEST_PATH}/tests + sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile + sed -i -e 's:CONFIG_SHELL=.*:& LOCALE_FR='fr_FR.iso88591' LOCALE_FR_UTF8='fr_FR.utf8' LOCALE_JA='ja_JP.eucjp':g' \ + -e 's:lang-c lang-c++:lang-c++:g' ${D}${PTEST_PATH}/tests/Makefile + install ${S}/gettext-tools/src/msgunfmt.tcl ${D}${PTEST_PATH}/src + install ${S}/gettext-tools/src/project-id ${D}${PTEST_PATH}/src + install ${B}/gettext-runtime/src/gettext.sh ${D}${PTEST_PATH}/src + install ${B}/gettext-runtime/src/ngettext ${D}${PTEST_PATH}/src + install ${B}/gettext-runtime/src/envsubst ${D}${PTEST_PATH}/src + install ${B}/gettext-runtime/src/gettext ${D}${PTEST_PATH}/src + install ${B}/gettext-tools/src/.libs/cldr-plurals ${D}${PTEST_PATH}/src + install ${S}/gettext-tools/po/gettext-tools.pot ${D}${PTEST_PATH}/po + install ${B}/gettext-tools/misc/* ${D}${PTEST_PATH}/misc + find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; + chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \ + ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2 + fi +} + +RDEPENDS_${PN}-ptest += "make" +RDEPENDS_${PN}-ptest_append_libc-glibc = "\ + glibc-gconv-big5 \ + glibc-charmap-big5 \ + glibc-gconv-cp1251 \ + glibc-charmap-cp1251 \ + glibc-charmap-iso-8859-9 \ + glibc-gconv-iso8859-9 \ + glibc-charmap-koi8-r \ + glibc-gconv-koi8-r \ + glibc-gconv-iso8859-2 \ + glibc-charmap-iso-8859-2 \ + glibc-gconv-euc-kr \ + glibc-charmap-euc-kr \ +" + +INSANE_SKIP_${PN}-ptest += "ldflags" +INSANE_SKIP_${PN}-ptest += "rpaths" + BBCLASSEXTEND = "native nativesdk" diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/fix-nl-abaltmon.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/fix-nl-abaltmon.patch new file mode 100644 index 000000000..c36a397fe --- /dev/null +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/fix-nl-abaltmon.patch @@ -0,0 +1,104 @@ +Fix the last few remaining bugs in glib's date/locale code. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 93d8482384ebc5c7d1f3d92b0190db0371269663 Mon Sep 17 00:00:00 2001 +From: Rafal Luzynski <digitalfreak@lingonborough.com> +Date: Fri, 10 May 2019 00:40:27 +0200 +Subject: [PATCH] build: Fix a typo in the test whether _NL_ABALTMON_n is + supported + +The correct spelling is "_NL_ABALTMON_n" rather than "_NL_ALTMON_n". +The typo made Meson build think that _NL_ABALTMON_n constants are +not supported which was totally wrong. This made g_date_time_format() +output incorrect abbreviated month names in some languages. +The old configure.ac script was correct here. + +Bug introduced in commit be4f96b6502c01d2a51d60b7a669c8ef82e22a4d. + +Closes: #1759 +--- + meson.build | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/meson.build b/meson.build +index c5d2ce5f8..08fa40ac5 100644 +--- a/meson.build ++++ b/meson.build +@@ -1002,20 +1002,20 @@ if cc.links('''#ifndef _GNU_SOURCE + #include <langinfo.h> + int main (int argc, char ** argv) { + char *str; +- str = nl_langinfo (_NL_ALTMON_1); +- str = nl_langinfo (_NL_ALTMON_2); +- str = nl_langinfo (_NL_ALTMON_3); +- str = nl_langinfo (_NL_ALTMON_4); +- str = nl_langinfo (_NL_ALTMON_5); +- str = nl_langinfo (_NL_ALTMON_6); +- str = nl_langinfo (_NL_ALTMON_7); +- str = nl_langinfo (_NL_ALTMON_8); +- str = nl_langinfo (_NL_ALTMON_9); +- str = nl_langinfo (_NL_ALTMON_10); +- str = nl_langinfo (_NL_ALTMON_11); +- str = nl_langinfo (_NL_ALTMON_12); ++ str = nl_langinfo (_NL_ABALTMON_1); ++ str = nl_langinfo (_NL_ABALTMON_2); ++ str = nl_langinfo (_NL_ABALTMON_3); ++ str = nl_langinfo (_NL_ABALTMON_4); ++ str = nl_langinfo (_NL_ABALTMON_5); ++ str = nl_langinfo (_NL_ABALTMON_6); ++ str = nl_langinfo (_NL_ABALTMON_7); ++ str = nl_langinfo (_NL_ABALTMON_8); ++ str = nl_langinfo (_NL_ABALTMON_9); ++ str = nl_langinfo (_NL_ABALTMON_10); ++ str = nl_langinfo (_NL_ABALTMON_11); ++ str = nl_langinfo (_NL_ABALTMON_12); + return 0; +- }''', name : 'nl_langinfo (_NL_ALTMON_n)') ++ }''', name : 'nl_langinfo (_NL_ABALTMON_n)') + glib_conf.set('HAVE_LANGINFO_ABALTMON', 1) + endif + +-- +2.18.1 + +From 35c28be32762d5af6b93cb6a3420c5977f7bf599 Mon Sep 17 00:00:00 2001 +From: Rafal Luzynski <digitalfreak@lingonborough.com> +Date: Mon, 13 May 2019 23:11:28 +0200 +Subject: [PATCH] tests: Update month name check for Greek locale +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Update the abbreviated month name in the test to match the actual +translation. Otherwise the test fails with false positive. + +Vocabulary: + +July (nominative) - Greek: Ιούλιος (abbreviated: Ιούλ) +Of July (genitive) - Greek: Ιουλίου (abbreviated: Ιουλ) + +This is similar to commit 4d215e006ee69bd7a993bf853722993433adbf9a +and commit 7fe793e125c316ac34edd8158df5a132cb044bc1. + +Closes #1776 +--- + glib/tests/date.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/glib/tests/date.c b/glib/tests/date.c +index 8eb28712b..ff13ad101 100644 +--- a/glib/tests/date.c ++++ b/glib/tests/date.c +@@ -388,7 +388,7 @@ test_month_names (void) + TEST_DATE ( 1, 4, 2018, "%OB %Y", "Απρίλιος 2018"); + TEST_DATE ( 1, 5, 2018, "%OB %Y", "Μάιος 2018"); + TEST_DATE ( 1, 6, 2018, "%OB %Y", "Ιούνιος 2018"); +- TEST_DATE (16, 7, 2018, "%e %b %Y", "16 Ιούλ 2018"); ++ TEST_DATE (16, 7, 2018, "%e %b %Y", "16 Ιουλ 2018"); + TEST_DATE ( 1, 8, 2018, "%Ob %Y", "Αύγ 2018"); + } + else +-- +2.18.1 diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb index 733a2d46d..d749be34e 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb @@ -17,6 +17,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ file://0001-meson.build-do-not-hardcode-linux-as-the-host-system.patch \ file://0001-meson-do-a-build-time-check-for-strlcpy-before-attem.patch \ + file://fix-nl-abaltmon.patch \ file://glib-meson.cross \ " diff --git a/poky/meta/recipes-core/glib-2.0/glib.inc b/poky/meta/recipes-core/glib-2.0/glib.inc index 574bb3855..82107a8a1 100644 --- a/poky/meta/recipes-core/glib-2.0/glib.inc +++ b/poky/meta/recipes-core/glib-2.0/glib.inc @@ -30,11 +30,7 @@ LEAD_SONAME = "libglib-2.0.*" inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check -GTKDOC_ENABLE_FLAG = "-Dgtk_doc=true" -GTKDOC_DISABLE_FLAG = "-Dgtk_doc=false" - -EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \ - '${GTKDOC_DISABLE_FLAG}', d)} " +GTKDOC_MESON_OPTION = "gtk_doc" # This avoids the need to depend on target python3, which in case of mingw is not even possible. # meson's python configuration pokes into python3 configuration, so this provides the native config to it. @@ -144,6 +140,7 @@ CODEGEN_PYTHON_RDEPENDS_mingw32 = "" RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" RDEPENDS_${PN}-ptest += "\ + libgcc \ dbus \ gnome-desktop-testing \ tzdata \ @@ -152,6 +149,14 @@ RDEPENDS_${PN}-ptest += "\ tzdata-europe \ tzdata-posix \ shared-mime-info \ + ${PN}-locale-ja \ + ${PN}-locale-fr \ + ${PN}-locale-el \ + ${PN}-locale-hr \ + ${PN}-locale-lt \ + ${PN}-locale-pl \ + ${PN}-locale-ru \ + ${PN}-locale-th \ " RDEPENDS_${PN}-ptest_append_libc-glibc = "\ @@ -177,5 +182,7 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = "\ locale-base-fr-fr \ locale-base-es-es \ locale-base-en-gb \ + locale-base-en-us \ locale-base-pl-pl \ + locale-base-pl-pl.iso-8859-2 \ " diff --git a/poky/meta/recipes-core/glib-networking/glib-networking_2.58.0.bb b/poky/meta/recipes-core/glib-networking/glib-networking_2.60.1.bb index f3190e1ca..09af229d6 100644 --- a/poky/meta/recipes-core/glib-networking/glib-networking_2.58.0.bb +++ b/poky/meta/recipes-core/glib-networking/glib-networking_2.60.1.bb @@ -9,15 +9,15 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" SECTION = "libs" DEPENDS = "glib-2.0" -SRC_URI[archive.md5sum] = "75b14b7e73a67753be9ce307751c661d" -SRC_URI[archive.sha256sum] = "bdfa0255e031b8ee003cc283002536b77ee76450105f1dc6ab066b9bf4330068" +SRC_URI[archive.md5sum] = "83321ffc3c336894b8a5bc18db3fe58d" +SRC_URI[archive.sha256sum] = "d71c6b2faa5ac29100314f08a1be020a2afd0291f025614c0af0d17b14435d92" PACKAGECONFIG ??= "gnutls" -PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" -PACKAGECONFIG[libproxy] = "-Dlibproxy_support=true,-Dlibproxy_support=false,libproxy" +PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls" +PACKAGECONFIG[libproxy] = "-Dlibproxy=enabled,-Dlibproxy=disabled,libproxy" -EXTRA_OEMESON = "-Dgnome_proxy_support=false" +EXTRA_OEMESON = "-Dgnome_proxy=disabled" GNOMEBASEBUILDCLASS = "meson" inherit gnomebase gettext upstream-version-is-even gio-module-cache diff --git a/poky/meta/recipes-core/glibc/glibc_2.29.bb b/poky/meta/recipes-core/glibc/glibc_2.29.bb index 9184c5932..073d1533e 100644 --- a/poky/meta/recipes-core/glibc/glibc_2.29.bb +++ b/poky/meta/recipes-core/glibc/glibc_2.29.bb @@ -110,7 +110,7 @@ do_configure () { do_compile () { # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging - unset LDFLAGS + LDFLAGS="-fuse-ld=bfd" base_do_compile echo "Adjust ldd script" if [ -n "${RTLDLIST}" ] diff --git a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb index a59334f51..3302a86da 100644 --- a/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb +++ b/poky/meta/recipes-core/images/build-appliance-image_15.0.0.bb @@ -22,7 +22,7 @@ IMAGE_FSTYPES = "wic.vmdk" inherit core-image module-base setuptools3 -SRCREV ?= "c96d8de352f242f70ff9c166508c3d0e50199874" +SRCREV ?= "5c504dd014a1bd3e6b3fea528a11aca7dff4d931" SRC_URI = "git://git.yoctoproject.org/poky \ file://Yocto_Build_Appliance.vmx \ file://Yocto_Build_Appliance.vmxf \ diff --git a/poky/meta/recipes-core/initrdscripts/files/init-live.sh b/poky/meta/recipes-core/initrdscripts/files/init-live.sh index 65183d7ee..b20660b60 100644..100755 --- a/poky/meta/recipes-core/initrdscripts/files/init-live.sh +++ b/poky/meta/recipes-core/initrdscripts/files/init-live.sh @@ -28,8 +28,7 @@ udev_daemon() { _UDEV_DAEMON=`udev_daemon` early_setup() { - mkdir -p /proc - mkdir -p /sys + mkdir -p /proc /sys /run /var/run mount -t proc proc /proc mount -t sysfs sysfs /sys mount -t devtmpfs none /dev @@ -37,9 +36,6 @@ early_setup() { # support modular kernel modprobe isofs 2> /dev/null - mkdir -p /run - mkdir -p /var/run - $_UDEV_DAEMON --daemon udevadm trigger --action=add } diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.4.bb index 3b9af6d73..b44c07b4d 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.4.bb @@ -4,26 +4,28 @@ HOMEPAGE = "https://github.com/besser82/libxcrypt" SECTION = "libs" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM ?= "file://LICENSING;md5=be275bc7f91642efe7709a8ae7a1433b \ - file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ + file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ " inherit autotools pkgconfig -PV = "4.4.2" -# v4.4.2 -SRCREV ?= "cf6abf18083566ec1612af27982a5160c9e0f137" -SRCBRANCH ?= "develop" +PV = "4.4.4" -SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH} \ - " +SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}" +SRCREV = "3b251d4e1af66aa7697c4ac96c689f996fa90c32" +SRCBRANCH ?= "develop" PROVIDES = "virtual/crypt" -FILES_${PN} = "${libdir}/libcrypt*.so.* ${libdir}/libcrypt-*.so ${libdir}/libowcrypt*.so.* ${libdir}/libowcrypt-*.so" +FILES_${PN} = "${libdir}/libcrypt*.so.* \ + ${libdir}/libcrypt-*.so \ + ${libdir}/libowcrypt*.so.* \ + ${libdir}/libowcrypt-*.so \ +" S = "${WORKDIR}/git" -BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE} -std=gnu99" +BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error=missing-attributes" CPPFLAGS_append_class-nativesdk = " -Wno-error=missing-attributes" diff --git a/poky/meta/recipes-core/libxml/libxml2/0001-Fix-infinite-loop-in-LZMA-decompression.patch b/poky/meta/recipes-core/libxml/libxml2/0001-Fix-infinite-loop-in-LZMA-decompression.patch deleted file mode 100644 index 16c229574..000000000 --- a/poky/meta/recipes-core/libxml/libxml2/0001-Fix-infinite-loop-in-LZMA-decompression.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 28a9dc642ffd759df1e48be247a114f440a6c16e Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Mon, 30 Jul 2018 13:14:11 +0200 -Subject: [PATCH] Fix infinite loop in LZMA decompression -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Check the liblzma error code more thoroughly to avoid infinite loops. - -Closes: https://gitlab.gnome.org/GNOME/libxml2/issues/13 -Closes: https://bugzilla.gnome.org/show_bug.cgi?id=794914 - -This is CVE-2018-9251 and CVE-2018-14567. - -Thanks to Dongliang Mu and Simon Wörner for the reports. - -CVE: CVE-2018-9251 -CVE: CVE-2018-14567 -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/commit/2240fbf5912054af025fb6e01e26375100275e74] -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - xzlib.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/xzlib.c b/xzlib.c -index a839169..0ba88cf 100644 ---- a/xzlib.c -+++ b/xzlib.c -@@ -562,6 +562,10 @@ xz_decomp(xz_statep state) - "internal error: inflate stream corrupt"); - return -1; - } -+ /* -+ * FIXME: Remapping a couple of error codes and falling through -+ * to the LZMA error handling looks fragile. -+ */ - if (ret == Z_MEM_ERROR) - ret = LZMA_MEM_ERROR; - if (ret == Z_DATA_ERROR) -@@ -587,6 +591,11 @@ xz_decomp(xz_statep state) - xz_error(state, LZMA_PROG_ERROR, "compression error"); - return -1; - } -+ if ((state->how != GZIP) && -+ (ret != LZMA_OK) && (ret != LZMA_STREAM_END)) { -+ xz_error(state, ret, "lzma error"); -+ return -1; -+ } - } while (strm->avail_out && ret != LZMA_STREAM_END); - - /* update available output and crc check value */ --- -2.7.4 - diff --git a/poky/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch b/poky/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch deleted file mode 100644 index 42a4b0ed6..000000000 --- a/poky/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch +++ /dev/null @@ -1,65 +0,0 @@ -Upstream-Status: Backport -CVE: CVE-2017-8872 -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 123234f2cfcd9e9b9f83047eee1dc17b4c3f4407 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Tue, 11 Sep 2018 14:52:07 +0200 -Subject: [PATCH] Free input buffer in xmlHaltParser - -This avoids miscalculation of available bytes. - -Thanks to Yunho Kim for the report. - -Closes: #26 ---- - parser.c | 5 +++++ - result/errors/759573.xml.err | 17 +++++++---------- - 2 files changed, 12 insertions(+), 10 deletions(-) - -diff --git a/parser.c b/parser.c -index ca9fde2c..5813a664 100644 ---- a/parser.c -+++ b/parser.c -@@ -12462,7 +12462,12 @@ xmlHaltParser(xmlParserCtxtPtr ctxt) { - ctxt->input->free((xmlChar *) ctxt->input->base); - ctxt->input->free = NULL; - } -+ if (ctxt->input->buf != NULL) { -+ xmlFreeParserInputBuffer(ctxt->input->buf); -+ ctxt->input->buf = NULL; -+ } - ctxt->input->cur = BAD_CAST""; -+ ctxt->input->length = 0; - ctxt->input->base = ctxt->input->cur; - ctxt->input->end = ctxt->input->cur; - } -diff --git a/result/errors/759573.xml.err b/result/errors/759573.xml.err -index 554039f6..38ef5c40 100644 ---- a/result/errors/759573.xml.err -+++ b/result/errors/759573.xml.err -@@ -21,14 +21,11 @@ Entity: line 1: - ^ - ./test/errors/759573.xml:1: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration - --<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '%<![INCLUDE[000%ஸ00 -- ^ -+ -+^ - ./test/errors/759573.xml:1: parser error : DOCTYPE improperly terminated --<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '%<![INCLUDE[000%ஸ00 -- ^ --./test/errors/759573.xml:1: parser error : StartTag: invalid element name --<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '%<![INCLUDE[000%ஸ00 -- ^ --./test/errors/759573.xml:1: parser error : Extra content at the end of the document --<?h?><!DOCTYPEt[<!ELEMENT t (A)><!ENTITY % xx '%<![INCLUDE[000%ஸ00 -- ^ -+ -+^ -+./test/errors/759573.xml:1: parser error : Start tag expected, '<' not found -+ -+^ --- -2.11.0 - diff --git a/poky/meta/recipes-core/libxml/libxml2/fix-CVE-2018-14404.patch b/poky/meta/recipes-core/libxml/libxml2/fix-CVE-2018-14404.patch deleted file mode 100644 index 21668e25a..000000000 --- a/poky/meta/recipes-core/libxml/libxml2/fix-CVE-2018-14404.patch +++ /dev/null @@ -1,45 +0,0 @@ -libxml2-2.9.8: Fix CVE-2018-14404 - -[No upstream tracking] -- https://gitlab.gnome.org/GNOME/libxml2/issues/5 - -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901817 - -- https://bugzilla.redhat.com/show_bug.cgi?id=1595985 - -xpath: Fix nullptr deref with XPath logic ops - -If the XPath stack is corrupted, for example by a misbehaving extension -function, the "and" and "or" XPath operators could dereference NULL -pointers. Check that the XPath stack isn't empty and optimize the -logic operators slightly. - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/commit/a436374994c47b12d5de1b8b1d191a098fa23594] -CVE: CVE-2018-14404 -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> - -diff --git a/xpath.c b/xpath.c -index f440696..75cac5c 100644 ---- a/xpath.c -+++ b/xpath.c -@@ -13297,9 +13297,8 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) - return(0); - } - xmlXPathBooleanFunction(ctxt, 1); -- arg1 = valuePop(ctxt); -- arg1->boolval &= arg2->boolval; -- valuePush(ctxt, arg1); -+ if (ctxt->value != NULL) -+ ctxt->value->boolval &= arg2->boolval; - xmlXPathReleaseObject(ctxt->context, arg2); - return (total); - case XPATH_OP_OR: -@@ -13323,9 +13322,8 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) - return(0); - } - xmlXPathBooleanFunction(ctxt, 1); -- arg1 = valuePop(ctxt); -- arg1->boolval |= arg2->boolval; -- valuePush(ctxt, arg1); -+ if (ctxt->value != NULL) -+ ctxt->value->boolval |= arg2->boolval; - xmlXPathReleaseObject(ctxt->context, arg2); - return (total); - case XPATH_OP_EQUAL: diff --git a/poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch b/poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch index 51a9e1935..ad719d4f5 100644 --- a/poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch +++ b/poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch @@ -1,14 +1,23 @@ -Make sure that Makefile doesn't try to compile these tests again -on the target where the source dependencies won't be available. +From 395c0f53ec226aaabedb166e6b3a7f8590b95a5f Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Sat, 11 May 2019 20:39:15 +0800 +Subject: [PATCH] Make sure that Makefile doesn't try to compile these tests + again on the target where the source dependencies won't be available. Upstream-Status: Inappropriate [cross-compile specific] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> -Index: libxml2-2.9.7/Makefile.am -=================================================================== ---- libxml2-2.9.7.orig/Makefile.am -+++ libxml2-2.9.7/Makefile.am +Rebase to 2.9.9 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Makefile.am | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 8f4e43d..5edb930 100644 +--- a/Makefile.am ++++ b/Makefile.am @@ -211,8 +211,7 @@ install-ptest: sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile $(MAKE) -C python install-ptest @@ -19,3 +28,6 @@ Index: libxml2-2.9.7/Makefile.am [ -d test ] || $(LN_S) $(srcdir)/test . [ -d result ] || $(LN_S) $(srcdir)/result . $(CHECKER) ./runtest$(EXEEXT) && \ +-- +2.7.4 + diff --git a/poky/meta/recipes-core/libxml/libxml2/libxml-64bit.patch b/poky/meta/recipes-core/libxml/libxml2/libxml-64bit.patch index 1147017b6..fd8e469dd 100644 --- a/poky/meta/recipes-core/libxml/libxml2/libxml-64bit.patch +++ b/poky/meta/recipes-core/libxml/libxml2/libxml-64bit.patch @@ -1,14 +1,19 @@ -Upstream-Status: Backport [from debian: bugs.debian.org/439843] +From 056b14345b1abd76a761ab14538f1bc21302781a Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Sat, 11 May 2019 20:26:51 +0800 +Subject: [PATCH] libxml 64bit +Upstream-Status: Backport [from debian: bugs.debian.org/439843] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- - libxml.h | 3 +++ + libxml.h | 3 +++ 1 file changed, 3 insertions(+) ---- libxml2-2.6.29.orig/libxml.h -+++ libxml2-2.6.29/libxml.h -@@ -11,10 +11,13 @@ - - #ifndef NO_LARGEFILE_SOURCE +diff --git a/libxml.h b/libxml.h +index 64e30f7..4e80d90 100644 +--- a/libxml.h ++++ b/libxml.h +@@ -15,6 +15,9 @@ #ifndef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE #endif @@ -18,5 +23,6 @@ Upstream-Status: Backport [from debian: bugs.debian.org/439843] #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif - #endif - +-- +2.7.4 + diff --git a/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch index d9ed1516f..e6998f6e6 100644 --- a/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch +++ b/poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch @@ -1,11 +1,20 @@ -AM_PATH_XML2 uses xml-config which we disable through +From 43edc9a445ed66cceb7533eadeef242940b4592c Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Sat, 11 May 2019 20:37:12 +0800 +Subject: [PATCH] AM_PATH_XML2 uses xml-config which we disable through binconfig-disabled.bbclass, so port it to use pkg-config instead. Upstream-Status: Pending Signed-off-by: Ross Burton <ross.burton@intel.com> +Rebase to 2.9.9 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + libxml.m4 | 186 ++------------------------------------------------------------ + 1 file changed, 5 insertions(+), 181 deletions(-) + diff --git a/libxml.m4 b/libxml.m4 -index 68cd824..5fa0a9b 100644 +index 2d7a6f5..1c53585 100644 --- a/libxml.m4 +++ b/libxml.m4 @@ -1,188 +1,12 @@ @@ -202,3 +211,6 @@ index 68cd824..5fa0a9b 100644 - AC_SUBST(XML_LIBS) - rm -f conf.xmltest ]) +-- +2.7.4 + diff --git a/poky/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch b/poky/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch index e83c8325e..956ff3f33 100644 --- a/poky/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch +++ b/poky/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch @@ -1,4 +1,7 @@ -Allow us to pass in PYTHON_SITE_PACKAGES +From b038c3452667ed17ddb0e791cd7bdc7f8774ac29 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Sat, 11 May 2019 20:35:20 +0800 +Subject: [PATCH] Allow us to pass in PYTHON_SITE_PACKAGES The python binary used when building for nativesdk doesn't give us the correct path here so we need to be able to specify it ourselves. @@ -6,16 +9,18 @@ correct path here so we need to be able to specify it ourselves. Upstream-Status: Inappropriate [config] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> -Rebase to 2.9.2 +Rebase to 2.9.9 + Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac +index ca911f3..3bbd654 100644 --- a/configure.ac +++ b/configure.ac -@@ -813,7 +813,8 @@ dnl +@@ -808,7 +808,8 @@ dnl PYTHON_VERSION= PYTHON_INCLUDES= @@ -26,5 +31,5 @@ diff --git a/configure.ac b/configure.ac pythondir= if test "$with_python" != "no" ; then -- -1.9.1 +2.7.4 diff --git a/poky/meta/recipes-core/libxml/libxml2/runtest.patch b/poky/meta/recipes-core/libxml/libxml2/runtest.patch index 544dc0583..0dbb353c0 100644 --- a/poky/meta/recipes-core/libxml/libxml2/runtest.patch +++ b/poky/meta/recipes-core/libxml/libxml2/runtest.patch @@ -1,14 +1,28 @@ -Add 'install-ptest' rule. -Print a standard result line for each test. +Add 'install-ptest' rule. Print a standard result line for +each test. Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com> Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Upstream-Status: Backport -diff -uNr a/Makefile.am b/Makefile.am ---- a/Makefile.am 2017-12-02 09:58:10.000000000 +0100 -+++ b/Makefile.am 2018-03-20 08:27:34.360505864 +0100 -@@ -202,6 +202,15 @@ +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + Makefile.am | 9 ++++ + runsuite.c | 1 + + runtest.c | 2 + + runxmlconf.c | 1 + + testapi.c | 122 ++++++++++++++++++++++++++++++--------------- + testchar.c | 156 +++++++++++++++++++++++++++++++++++++++++----------------- + testdict.c | 1 + + testlimits.c | 1 + + testrecurse.c | 2 + + 9 files changed, 210 insertions(+), 85 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 9c630be..7cfd04b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -202,6 +202,15 @@ runxmlconf_LDADD= $(LDADDS) #testOOM_DEPENDENCIES = $(DEPS) #testOOM_LDADD= $(LDADDS) @@ -24,10 +38,11 @@ diff -uNr a/Makefile.am b/Makefile.am runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) [ -d test ] || $(LN_S) $(srcdir)/test . -diff -uNr a/runsuite.c b/runsuite.c ---- a/runsuite.c 2016-06-07 12:04:14.000000000 +0200 -+++ b/runsuite.c 2018-03-20 08:27:57.478817247 +0100 -@@ -1162,6 +1162,7 @@ +diff --git a/runsuite.c b/runsuite.c +index aaab13e..9ba2c5d 100644 +--- a/runsuite.c ++++ b/runsuite.c +@@ -1162,6 +1162,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { if (logfile != NULL) fclose(logfile); @@ -35,20 +50,19 @@ diff -uNr a/runsuite.c b/runsuite.c return(ret); } #else /* !SCHEMAS */ -diff -uNr a/runtest.c b/runtest.c ---- a/runtest.c 2017-11-13 22:00:17.000000000 +0100 -+++ b/runtest.c 2018-03-20 08:28:50.859047551 +0100 -@@ -4496,7 +4496,8 @@ - } - +diff --git a/runtest.c b/runtest.c +index addda5c..8ba5d59 100644 +--- a/runtest.c ++++ b/runtest.c +@@ -4501,6 +4501,7 @@ launchTests(testDescPtr tst) { xmlCharEncCloseFunc(ebcdicHandler); -- -+ + xmlCharEncCloseFunc(eucJpHandler); + + printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc); return(err); } -@@ -4573,6 +4574,7 @@ +@@ -4577,6 +4578,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { xmlCleanupParser(); xmlMemoryDump(); @@ -56,10 +70,11 @@ diff -uNr a/runtest.c b/runtest.c return(ret); } -diff -uNr a/runxmlconf.c b/runxmlconf.c ---- a/runxmlconf.c 2016-06-07 12:04:14.000000000 +0200 -+++ b/runxmlconf.c 2018-03-20 08:29:17.944862893 +0100 -@@ -595,6 +595,7 @@ +diff --git a/runxmlconf.c b/runxmlconf.c +index cef20f4..4f291fb 100644 +--- a/runxmlconf.c ++++ b/runxmlconf.c +@@ -595,6 +595,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { if (logfile != NULL) fclose(logfile); @@ -67,15 +82,15 @@ diff -uNr a/runxmlconf.c b/runxmlconf.c return(ret); } -diff -uNr a/testapi.c b/testapi.c ---- a/testapi.c 2018-01-25 07:39:15.000000000 +0100 -+++ b/testapi.c 2018-03-20 09:08:35.323980145 +0100 -@@ -1246,49 +1246,91 @@ +diff --git a/testapi.c b/testapi.c +index 4a751e2..7ccc066 100644 +--- a/testapi.c ++++ b/testapi.c +@@ -1246,49 +1246,91 @@ static int testlibxml2(void) { int test_ret = 0; -+ int ret = 0; - +- - test_ret += test_HTMLparser(); - test_ret += test_HTMLtree(); - test_ret += test_SAX2(); @@ -115,6 +130,8 @@ diff -uNr a/testapi.c b/testapi.c - test_ret += test_xpath(); - test_ret += test_xpathInternals(); - test_ret += test_xpointer(); ++ int ret = 0; ++ + test_ret += (ret = test_HTMLparser()); + printf("%s: HTMLparser\n", (ret == 0) ? "PASS" : "FAIL"); + test_ret += (ret = test_HTMLtree()); @@ -201,20 +218,11 @@ diff -uNr a/testapi.c b/testapi.c return(test_ret); } -diff -uNr a/testdict.c b/testdict.c ---- a/testdict.c 2016-06-07 12:04:14.000000000 +0200 -+++ b/testdict.c 2018-03-20 08:59:16.864275812 +0100 -@@ -440,5 +440,6 @@ - clean_strings(); - xmlCleanupParser(); - xmlMemoryDump(); -+ printf("%s: testdict\n\n", (ret == 0) ? "PASS" : "FAIL"); - return(ret); - } -diff -uNr a/testchar.c b/testchar.c ---- a/testchar.c 2016-06-07 12:04:14.000000000 +0200 -+++ b/testchar.c 2018-03-20 09:11:20.383573912 +0100 -@@ -23,7 +23,7 @@ +diff --git a/testchar.c b/testchar.c +index 0d08792..f555d3b 100644 +--- a/testchar.c ++++ b/testchar.c +@@ -23,7 +23,7 @@ static void errorHandler(void *unused, xmlErrorPtr err) { char document1[100] = "<doc>XXXX</doc>"; char document2[100] = "<doc foo='XXXX'/>"; @@ -223,7 +231,7 @@ diff -uNr a/testchar.c b/testchar.c int len, char *data, int forbid1, int forbid2) { int i; xmlDocPtr res; -@@ -37,33 +37,41 @@ +@@ -37,33 +37,41 @@ static void testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document, res = xmlReadMemory(document, len, "test", NULL, 0); if ((i == forbid1) || (i == forbid2)) { @@ -269,7 +277,7 @@ diff -uNr a/testchar.c b/testchar.c int len, char *data) { int i, j; xmlDocPtr res; -@@ -80,10 +88,12 @@ +@@ -80,10 +88,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, /* if first bit of first char is set, then second bit must too */ if ((i & 0x80) && ((i & 0x40) == 0)) { @@ -283,7 +291,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -91,10 +101,12 @@ +@@ -91,10 +101,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, * bits must be 10 */ else if ((i & 0x80) && ((j & 0xC0) != 0x80)) { @@ -297,7 +305,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -102,10 +114,12 @@ +@@ -102,10 +114,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, * than 0x80, i.e. one of bits 5 to 1 of i must be set */ else if ((i & 0x80) && ((i & 0x1E) == 0)) { @@ -311,7 +319,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -113,10 +127,12 @@ +@@ -113,10 +127,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, * at least 3 bytes, but we give only 2 ! */ else if ((i & 0xE0) == 0xE0) { @@ -325,7 +333,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -125,11 +141,13 @@ +@@ -125,11 +141,13 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, else if ((lastError != 0) || (res == NULL)) { fprintf(stderr, "Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j); @@ -339,7 +347,7 @@ diff -uNr a/testchar.c b/testchar.c } /** -@@ -141,9 +159,10 @@ +@@ -141,9 +159,10 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, * CDATA in text or in attribute values. */ @@ -351,7 +359,7 @@ diff -uNr a/testchar.c b/testchar.c /* * Set up a parsing context using the first document as -@@ -152,7 +171,7 @@ +@@ -152,7 +171,7 @@ static void testDocumentRanges(void) { ctxt = xmlNewParserCtxt(); if (ctxt == NULL) { fprintf(stderr, "Failed to allocate parser context\n"); @@ -360,7 +368,7 @@ diff -uNr a/testchar.c b/testchar.c } printf("testing 1 byte char in document: 1"); -@@ -163,7 +182,7 @@ +@@ -163,7 +182,7 @@ static void testDocumentRanges(void) { data[2] = ' '; data[3] = ' '; /* test 1 byte injection at beginning of area */ @@ -369,7 +377,7 @@ diff -uNr a/testchar.c b/testchar.c data, -1, -1); printf(" 2"); fflush(stdout); -@@ -172,7 +191,7 @@ +@@ -172,7 +191,7 @@ static void testDocumentRanges(void) { data[2] = ' '; data[3] = ' '; /* test 1 byte injection at end of area */ @@ -378,7 +386,7 @@ diff -uNr a/testchar.c b/testchar.c data + 3, -1, -1); printf(" 3"); -@@ -183,7 +202,7 @@ +@@ -183,7 +202,7 @@ static void testDocumentRanges(void) { data[2] = ' '; data[3] = ' '; /* test 1 byte injection at beginning of area */ @@ -387,7 +395,7 @@ diff -uNr a/testchar.c b/testchar.c data, '\'', -1); printf(" 4"); fflush(stdout); -@@ -192,7 +211,7 @@ +@@ -192,7 +211,7 @@ static void testDocumentRanges(void) { data[2] = ' '; data[3] = ' '; /* test 1 byte injection at end of area */ @@ -396,7 +404,7 @@ diff -uNr a/testchar.c b/testchar.c data + 3, '\'', -1); printf(" done\n"); -@@ -204,7 +223,7 @@ +@@ -204,7 +223,7 @@ static void testDocumentRanges(void) { data[2] = ' '; data[3] = ' '; /* test 2 byte injection at beginning of area */ @@ -405,7 +413,7 @@ diff -uNr a/testchar.c b/testchar.c data); printf(" 2"); fflush(stdout); -@@ -213,7 +232,7 @@ +@@ -213,7 +232,7 @@ static void testDocumentRanges(void) { data[2] = ' '; data[3] = ' '; /* test 2 byte injection at end of area */ @@ -414,7 +422,7 @@ diff -uNr a/testchar.c b/testchar.c data + 2); printf(" 3"); -@@ -224,7 +243,7 @@ +@@ -224,7 +243,7 @@ static void testDocumentRanges(void) { data[2] = ' '; data[3] = ' '; /* test 2 byte injection at beginning of area */ @@ -423,7 +431,7 @@ diff -uNr a/testchar.c b/testchar.c data); printf(" 4"); fflush(stdout); -@@ -233,14 +252,15 @@ +@@ -233,14 +252,15 @@ static void testDocumentRanges(void) { data[2] = ' '; data[3] = ' '; /* test 2 byte injection at end of area */ @@ -441,7 +449,7 @@ diff -uNr a/testchar.c b/testchar.c int i = 0; int len, c; -@@ -255,19 +275,25 @@ +@@ -255,19 +275,25 @@ static void testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) { c = xmlCurrentChar(ctxt, &len); if ((i == 0) || (i >= 0x80)) { /* we must see an error there */ @@ -470,7 +478,7 @@ diff -uNr a/testchar.c b/testchar.c int i, j; int len, c; -@@ -284,10 +310,12 @@ +@@ -284,10 +310,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { /* if first bit of first char is set, then second bit must too */ if ((i & 0x80) && ((i & 0x40) == 0)) { @@ -484,7 +492,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -295,10 +323,12 @@ +@@ -295,10 +323,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { * bits must be 10 */ else if ((i & 0x80) && ((j & 0xC0) != 0x80)) { @@ -498,7 +506,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -306,10 +336,12 @@ +@@ -306,10 +336,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { * than 0x80, i.e. one of bits 5 to 1 of i must be set */ else if ((i & 0x80) && ((i & 0x1E) == 0)) { @@ -512,7 +520,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -317,10 +349,12 @@ +@@ -317,10 +349,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { * at least 3 bytes, but we give only 2 ! */ else if ((i & 0xE0) == 0xE0) { @@ -526,7 +534,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -329,6 +363,7 @@ +@@ -329,6 +363,7 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { else if ((lastError != 0) || (len != 2)) { fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X\n", i, j); @@ -534,7 +542,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -338,12 +373,14 @@ +@@ -338,12 +373,14 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X: expect %d got %d\n", i, j, ((j & 0x3F) + ((i & 0x1F) << 6)), c); @@ -550,7 +558,7 @@ diff -uNr a/testchar.c b/testchar.c int i, j, k, K; int len, c; unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF}; -@@ -368,20 +405,24 @@ +@@ -368,20 +405,24 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { * at least 4 bytes, but we give only 3 ! */ if ((i & 0xF0) == 0xF0) { @@ -577,7 +585,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -390,10 +431,12 @@ +@@ -390,10 +431,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { * the 6th byte of data[1] must be set */ else if (((i & 0xF) == 0) && ((j & 0x20) == 0)) { @@ -591,7 +599,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -401,10 +444,12 @@ +@@ -401,10 +444,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { */ else if (((value > 0xD7FF) && (value <0xE000)) || ((value > 0xFFFD) && (value <0x10000))) { @@ -605,7 +613,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -414,6 +459,7 @@ +@@ -414,6 +459,7 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n", i, j, K); @@ -613,7 +621,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -423,13 +469,15 @@ +@@ -423,13 +469,15 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n", i, j, data[2], value, c); @@ -630,7 +638,7 @@ diff -uNr a/testchar.c b/testchar.c int i, j, k, K, l, L; int len, c; unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF}; -@@ -458,10 +506,12 @@ +@@ -458,10 +506,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { * at least 5 bytes, but we give only 4 ! */ if ((i & 0xF8) == 0xF8) { @@ -644,7 +652,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -469,10 +519,12 @@ +@@ -469,10 +519,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { */ else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80) || ((L & 0xC0) != 0x80)) { @@ -658,7 +666,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -481,10 +533,12 @@ +@@ -481,10 +533,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { * the 6 or 5th byte of j must be set */ else if (((i & 0x7) == 0) && ((j & 0x30) == 0)) { @@ -672,7 +680,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -493,10 +547,12 @@ +@@ -493,10 +547,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { else if (((value > 0xD7FF) && (value <0xE000)) || ((value > 0xFFFD) && (value <0x10000)) || (value > 0x10FFFF)) { @@ -686,7 +694,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -506,6 +562,7 @@ +@@ -506,6 +562,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n", i, j, K); @@ -694,7 +702,7 @@ diff -uNr a/testchar.c b/testchar.c } /* -@@ -515,11 +572,13 @@ +@@ -515,11 +572,13 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n", i, j, data[2], value, c); @@ -708,7 +716,7 @@ diff -uNr a/testchar.c b/testchar.c } /** -@@ -530,11 +589,12 @@ +@@ -530,11 +589,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { * cover the full range of UTF-8 chars accepted by XML-1.0 */ @@ -722,7 +730,7 @@ diff -uNr a/testchar.c b/testchar.c memset(data, 0, 5); -@@ -545,17 +605,19 @@ +@@ -545,17 +605,19 @@ static void testCharRanges(void) { ctxt = xmlNewParserCtxt(); if (ctxt == NULL) { fprintf(stderr, "Failed to allocate parser context\n"); @@ -743,7 +751,7 @@ diff -uNr a/testchar.c b/testchar.c goto error; } input->filename = NULL; -@@ -567,25 +629,28 @@ +@@ -567,25 +629,28 @@ static void testCharRanges(void) { printf("testing char range: 1"); fflush(stdout); @@ -776,7 +784,7 @@ diff -uNr a/testchar.c b/testchar.c /* * this initialize the library and check potential ABI mismatches * between the version it was compiled for and the actual shared -@@ -602,8 +667,9 @@ +@@ -602,8 +667,9 @@ int main(void) { /* * Run the tests */ @@ -788,20 +796,33 @@ diff -uNr a/testchar.c b/testchar.c /* * Cleanup function for the XML library. -diff -uNr a/testlimits.c b/testlimits.c ---- a/testlimits.c 2016-11-07 09:41:40.000000000 +0100 -+++ b/testlimits.c 2018-03-20 08:59:38.965581280 +0100 -@@ -1634,5 +1634,6 @@ +diff --git a/testdict.c b/testdict.c +index 40bebd0..114b934 100644 +--- a/testdict.c ++++ b/testdict.c +@@ -440,5 +440,6 @@ int main(void) + clean_strings(); + xmlCleanupParser(); + xmlMemoryDump(); ++ printf("%s: testdict\n\n", (ret == 0) ? "PASS" : "FAIL"); + return(ret); + } +diff --git a/testlimits.c b/testlimits.c +index 68c94db..1584434 100644 +--- a/testlimits.c ++++ b/testlimits.c +@@ -1634,5 +1634,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { xmlCleanupParser(); xmlMemoryDump(); + printf("%s: testlimits\n", (ret == 0) ? "PASS" : "FAIL"); return(ret); } -diff -uNr a/testrecurse.c b/testrecurse.c ---- a/testrecurse.c 2017-10-26 09:54:40.000000000 +0200 -+++ b/testrecurse.c 2018-03-20 09:00:46.781628749 +0100 -@@ -892,6 +892,7 @@ +diff --git a/testrecurse.c b/testrecurse.c +index f95ae1c..74c8f8b 100644 +--- a/testrecurse.c ++++ b/testrecurse.c +@@ -892,6 +892,7 @@ launchTests(testDescPtr tst) { err++; } } @@ -809,10 +830,13 @@ diff -uNr a/testrecurse.c b/testrecurse.c return(err); } -@@ -961,5 +962,6 @@ +@@ -961,5 +962,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { xmlCleanupParser(); xmlMemoryDump(); + printf("%s: testrecurse\n\n", (ret == 0) ? "PASS" : "FAIL"); return(ret); } +-- +2.7.4 + diff --git a/poky/meta/recipes-core/libxml/libxml2_2.9.8.bb b/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb index 62643bc76..c38f883e4 100644 --- a/poky/meta/recipes-core/libxml/libxml2_2.9.8.bb +++ b/poky/meta/recipes-core/libxml/libxml2_2.9.9.bb @@ -20,13 +20,10 @@ SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \ file://libxml-m4-use-pkgconfig.patch \ file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \ file://fix-execution-of-ptests.patch \ - file://fix-CVE-2017-8872.patch \ - file://fix-CVE-2018-14404.patch \ - file://0001-Fix-infinite-loop-in-LZMA-decompression.patch \ " -SRC_URI[libtar.md5sum] = "b786e353e2aa1b872d70d5d1ca0c740d" -SRC_URI[libtar.sha256sum] = "0b74e51595654f958148759cfef0993114ddccccbb6f31aee018f3558e8e2732" +SRC_URI[libtar.md5sum] = "c04a5a0a042eaa157e8e8c9eabe76bd6" +SRC_URI[libtar.sha256sum] = "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871" SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a" SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" diff --git a/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb index 85472a825..50182decf 100644 --- a/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb +++ b/poky/meta/recipes-core/meta/target-sdk-provides-dummy.bb @@ -52,3 +52,5 @@ DUMMYPROVIDES = "\ " require dummy-sdk-package.inc + +SSTATE_DUPWHITELIST += "${PKGDATA_DIR}/${PN} ${PKGDATA_DIR}/runtime/${PN}" diff --git a/poky/meta/recipes-core/musl/musl/0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch b/poky/meta/recipes-core/musl/musl/0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch new file mode 100644 index 000000000..4d48d6165 --- /dev/null +++ b/poky/meta/recipes-core/musl/musl/0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch @@ -0,0 +1,36 @@ +From 19cbebc3fa33c6a1a71a6036da4d67c98f859f06 Mon Sep 17 00:00:00 2001 +From: Adrian Bunk <bunk@stusta.de> +Date: Wed, 15 May 2019 16:08:33 +0300 +Subject: unistd.h: Add TEMP_FAILURE_RETRY + +Signed-off-by: Adrian Bunk <bunk@stusta.de> +Upstream-Status: Inappropriate [oe-specific] +--- + include/unistd.h | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/include/unistd.h b/include/unistd.h +index 9485da7a..8a75af57 100644 +--- a/include/unistd.h ++++ b/include/unistd.h +@@ -460,6 +460,17 @@ int eaccess(const char *, int); + #define _CS_V6_ENV 1148 + #define _CS_V7_ENV 1149 + ++#ifdef _GNU_SOURCE ++#ifndef TEMP_FAILURE_RETRY ++# define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++#endif ++ + #ifdef __cplusplus + } + #endif +-- +2.20.1 + diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb index 2d8dab90d..2b433aed8 100644 --- a/poky/meta/recipes-core/musl/musl_git.bb +++ b/poky/meta/recipes-core/musl/musl_git.bb @@ -4,9 +4,9 @@ require musl.inc inherit linuxloader -SRCREV = "43e7efb46555f13a556d92944ac05c19b8929b60" +SRCREV = "65c8be380431eebe4d70d130bd38563f8df9a7d7" -BASEVER = "1.1.21" +BASEVER = "1.1.22" PV = "${BASEVER}+git${SRCPV}" @@ -15,6 +15,7 @@ PV = "${BASEVER}+git${SRCPV}" SRC_URI = "git://git.musl-libc.org/musl \ file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \ + file://0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch \ " S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb b/poky/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb index ef6ca9879..928c47742 100644 --- a/poky/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb +++ b/poky/meta/recipes-core/ncurses/ncurses_6.1+20181013.bb @@ -8,4 +8,4 @@ SRC_URI += "file://0001-tic-hang.patch \ SRCREV = "7a97a7f937762ba342d5b2fd7cd090885a809835" S = "${WORKDIR}/git" EXTRA_OECONF += "--with-abi-version=5 --cache-file=${B}/config.cache" -UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)" +UPSTREAM_CHECK_GITTAGREGEX = "upstream/(?P<pver>\d+(\.\d+)+(\+\d+)*)" diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-base.bb b/poky/meta/recipes-core/packagegroups/packagegroup-base.bb index 442201c9e..cae704aa2 100644 --- a/poky/meta/recipes-core/packagegroups/packagegroup-base.bb +++ b/poky/meta/recipes-core/packagegroups/packagegroup-base.bb @@ -21,7 +21,6 @@ PACKAGES = ' \ ${@bb.utils.contains("MACHINE_FEATURES", "apm", "packagegroup-base-apm", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "ext2", "packagegroup-base-ext2", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "vfat", "packagegroup-base-vfat", "", d)} \ - ${@bb.utils.contains("MACHINE_FEATURES", "irda", "packagegroup-base-irda", "",d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "packagegroup-base-keyboard", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "pci", "packagegroup-base-pci", "",d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "pcmcia", "packagegroup-base-pcmcia", "", d)} \ @@ -63,7 +62,6 @@ RDEPENDS_packagegroup-base = "\ ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'packagegroup-base-alsa', '',d)} \ ${@bb.utils.contains('COMBINED_FEATURES', 'ext2', 'packagegroup-base-ext2', '',d)} \ ${@bb.utils.contains('COMBINED_FEATURES', 'vfat', 'packagegroup-base-vfat', '',d)} \ - ${@bb.utils.contains('COMBINED_FEATURES', 'irda', 'packagegroup-base-irda', '',d)} \ ${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'packagegroup-base-pci', '',d)} \ ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'packagegroup-base-pcmcia', '',d)} \ ${@bb.utils.contains('COMBINED_FEATURES', 'usbgadget', 'packagegroup-base-usbgadget', '',d)} \ @@ -221,23 +219,6 @@ RRECOMMENDS_packagegroup-base-bluetooth = "\ ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-dtl1-cs', '',d)} \ " -SUMMARY_packagegroup-base-irda = "IrDA support" -RDEPENDS_packagegroup-base-irda = "\ - irda-utils" - -RRECOMMENDS_packagegroup-base-irda = "\ - kernel-module-pxaficp-ir \ - kernel-module-irda \ - kernel-module-ircomm \ - kernel-module-ircomm-tty \ - kernel-module-irlan \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ppp', 'kernel-module-irnet', '',d)} \ - kernel-module-irport \ - kernel-module-irtty \ - kernel-module-irtty-sir \ - kernel-module-sir-dev \ - ${@bb.utils.contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-ir-usb', '',d)} " - SUMMARY_packagegroup-base-usbgadget = "USB gadget support" RRECOMMENDS_packagegroup-base-usbgadget = "\ kernel-module-pxa27x_udc \ diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb b/poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb index d551147b5..3b430c081 100644 --- a/poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb +++ b/poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb @@ -16,3 +16,9 @@ RDEPENDS_${PN} = "\ ${@all_multilib_tune_values(d, 'GDB')} \ meta-environment-${MACHINE} \ " + +# When TUNE_ARCH changes but MACHINE does not (for example when a machine definition is updated), +# cross-canadian.bbclass prevents variable dependency propagation to TRANSLATED_TARGET_ARCH +# This will result in erroneous reuse of previous sstate packages. The following line +# establishes a direct dependency instead. +do_package[vardeps] += "TUNE_ARCH" diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb index b296db545..f206cee37 100644 --- a/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +++ b/poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb @@ -189,7 +189,6 @@ RDEPENDS_packagegroup-self-hosted-graphics = "\ libx11-dev \ adwaita-icon-theme \ xdg-utils \ - epiphany \ l3afpad \ pcmanfm \ vte \ diff --git a/poky/meta/recipes-core/systemd/systemd-boot_241.bb b/poky/meta/recipes-core/systemd/systemd-boot_242.bb index 56e68a3d4..56e68a3d4 100644 --- a/poky/meta/recipes-core/systemd/systemd-boot_241.bb +++ b/poky/meta/recipes-core/systemd/systemd-boot_242.bb diff --git a/poky/meta/recipes-core/systemd/systemd-conf/journald.conf b/poky/meta/recipes-core/systemd/systemd-conf/journald.conf new file mode 100644 index 000000000..fd4d969fa --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd-conf/journald.conf @@ -0,0 +1,3 @@ +[Journal] +ForwardToSyslog=yes +RuntimeMaxUse=64M diff --git a/poky/meta/recipes-core/systemd/systemd-conf/logind.conf b/poky/meta/recipes-core/systemd/systemd-conf/logind.conf new file mode 100644 index 000000000..bf7f6920f --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd-conf/logind.conf @@ -0,0 +1,2 @@ +[Login] +KillUserProcesses=yes diff --git a/poky/meta/recipes-core/systemd/systemd-conf/system.conf b/poky/meta/recipes-core/systemd/systemd-conf/system.conf new file mode 100644 index 000000000..554cab26c --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd-conf/system.conf @@ -0,0 +1,2 @@ +[Manager] +DefaultMemoryAccounting=yes diff --git a/poky/meta/recipes-core/systemd/systemd-conf/system.conf-qemuall b/poky/meta/recipes-core/systemd/systemd-conf/system.conf-qemuall new file mode 100644 index 000000000..741be27cb --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd-conf/system.conf-qemuall @@ -0,0 +1,3 @@ +[Manager] +# Change DefaultTimeoutStartSec from 90s to 240s +DefaultTimeoutStartSec = 240s diff --git a/poky/meta/recipes-core/systemd/systemd-conf_241.bb b/poky/meta/recipes-core/systemd/systemd-conf_241.bb deleted file mode 100644 index 9bb27fd96..000000000 --- a/poky/meta/recipes-core/systemd/systemd-conf_241.bb +++ /dev/null @@ -1,53 +0,0 @@ -require systemd.inc - -SUMMARY = "Systemd system configuration" -DESCRIPTION = "Systemd may require slightly different configuration for \ -different machines. For example, qemu machines require a longer \ -DefaultTimeoutStartSec setting." - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -CONFFILES_${PN} = "${sysconfdir}/machine-id \ -${sysconfdir}/systemd/coredump.conf \ -${sysconfdir}/systemd/journald.conf \ -${sysconfdir}/systemd/logind.conf \ -${sysconfdir}/systemd/system.conf \ -${sysconfdir}/systemd/user.conf" - -FILES_${PN} = "${sysconfdir}/machine-id ${sysconfdir}/systemd" - -do_configure[noexec] = '1' -do_compile[noexec] = '1' - -do_install() { - rm -rf ${D}/${sysconfdir}/systemd - install -d ${D}/${sysconfdir}/systemd - - # Create machine-id - # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable - touch ${D}${sysconfdir}/machine-id - - install -m 0644 ${S}/src/coredump/coredump.conf ${D}${sysconfdir}/systemd/coredump.conf - - install -m 0644 ${S}/src/journal/journald.conf ${D}${sysconfdir}/systemd/journald.conf - # Enable journal to forward message to syslog daemon - sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf - # Set the maximium size of runtime journal to 64M as default - sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf - - install -m 0644 ${S}/src/login/logind.conf.in ${D}${sysconfdir}/systemd/logind.conf - # Set KILL_USER_PROCESSES to yes - sed -i -e 's/@KILL_USER_PROCESSES@/yes/' ${D}${sysconfdir}/systemd/logind.conf - - install -m 0644 ${S}/src/core/system.conf.in ${D}${sysconfdir}/systemd/system.conf - # Set MEMORY_ACCOUNTING_DEFAULT to yes - sed -i -e 's/@MEMORY_ACCOUNTING_DEFAULT@/yes/' ${D}${sysconfdir}/systemd/system.conf - - install -m 0644 ${S}/src/core/user.conf ${D}${sysconfdir}/systemd/user.conf -} - -# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 -do_install_append_qemuall() { - # Change DefaultTimeoutStartSec from 90s to 240s - echo "DefaultTimeoutStartSec = 240s" >> ${D}${sysconfdir}/systemd/system.conf -} diff --git a/poky/meta/recipes-core/systemd/systemd-conf_242.bb b/poky/meta/recipes-core/systemd/systemd-conf_242.bb new file mode 100644 index 000000000..96beea53a --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd-conf_242.bb @@ -0,0 +1,32 @@ +SUMMARY = "Systemd system configuration" +DESCRIPTION = "Systemd may require slightly different configuration for \ +different machines. For example, qemu machines require a longer \ +DefaultTimeoutStartSec setting." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "\ + file://journald.conf \ + file://logind.conf \ + file://system.conf \ + file://system.conf-qemuall \ +" + +do_install() { + install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf + install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf + install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf +} + +# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 +do_install_append_qemuall() { + install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +FILES_${PN} = "\ + ${systemd_unitdir}/journald.conf.d/ \ + ${systemd_unitdir}/logind.conf.d/ \ + ${systemd_unitdir}/system.conf.d/ \ +" diff --git a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl index 2bc648961..8d7b3ba32 100755 --- a/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/poky/meta/recipes-core/systemd/systemd-systemctl/systemctl @@ -1,196 +1,314 @@ -#!/bin/sh -echo "Started $0 $*" - -ROOT= - -# parse command line params -action= -while [ $# != 0 ]; do - opt="$1" - - case "$opt" in - enable) - shift - - action="$opt" - services="$1" - cmd_args="1" - shift - ;; - disable) - shift - - action="$opt" - services="$1" - cmd_args="1" - shift - ;; - mask) - shift - - action="$opt" - services="$1" - cmd_args="1" - shift - ;; - preset) - shift - - action="$opt" - services="$1" - cmd_args="1" - shift - ;; - --root=*) - ROOT=${opt##--root=} - cmd_args="0" - shift - ;; - *) - if [ "$cmd_args" = "1" ]; then - services="$services $opt" - shift - else - echo "'$opt' is an unkown option; exiting with error" - exit 1 - fi - ;; - esac -done -if [ "$action" = "preset" -a "$service_file" = "" ]; then - services=$(for f in `find $ROOT/etc/systemd/system $ROOT/lib/systemd/system $ROOT/usr/lib/systemd/system -type f 2>1`; do basename $f; done) - services="$services $opt" - presetall=1 -fi - -for service in $services; do - if [ "$presetall" = "1" ]; then - action="preset" - fi - if [ "$action" = "mask" ]; then - if [ ! -d $ROOT/etc/systemd/system/ ]; then - mkdir -p $ROOT/etc/systemd/system/ - fi - cmd="ln -s /dev/null $ROOT/etc/systemd/system/$service" - echo "$cmd" - $cmd - exit 0 - fi - - service_base_file=`echo $service | sed 's/\(@\).*\(\.[^.]\+\)/\1\2/'` - if [ -z `echo $service | sed '/@/p;d'` ]; then - echo "Try to find location of $service..." - service_template=false - else - echo "Try to find location of template $service_base_file of instance $service..." - service_template=true - instance_specified=`echo $service | sed 's/^.\+@\(.*\)\.[^.]\+/\1/'` - fi - - # find service file - for p in $ROOT/etc/systemd/system \ - $ROOT/lib/systemd/system \ - $ROOT/usr/lib/systemd/system; do - if [ -e $p/$service_base_file ]; then - service_file=$p/$service_base_file - service_file=${service_file##$ROOT} - fi - done - if [ -z "$service_file" ]; then - echo "'$service_base_file' couldn't be found; exiting with error" - exit 1 - fi - echo "Found $service in $service_file" - - # If any new unit types are added to systemd they should be added - # to this regular expression. - unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|target\.wants\|path\|timer\|snapshot\)\s*$' - if [ "$action" = "preset" ]; then - action=`egrep -sh $service $ROOT/etc/systemd/user-preset/*.preset | cut -f1 -d' '` - if [ -z "$action" ]; then - globalpreset=`egrep -sh '\*' $ROOT/etc/systemd/user-preset/*.preset | cut -f1 -d' '` - if [ -n "$globalpreset" ]; then - action="$globalpreset" - else - action="enable" - fi - fi - fi - # create the required symbolic links - wanted_by=$(sed '/^WantedBy[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \ - | tr ',' '\n' \ - | grep "$unit_types_re") - - required_by=$(sed '/^RequiredBy[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \ - | tr ',' '\n' \ - | grep "$unit_types_re") - - for dependency in WantedBy RequiredBy; do - if [ "$dependency" = "WantedBy" ]; then - suffix="wants" - dependency_list="$wanted_by" - elif [ "$dependency" = "RequiredBy" ]; then - suffix="requires" - dependency_list="$required_by" - fi - for r in $dependency_list; do - echo "$dependency=$r found in $service" - if [ -n "$instance_specified" ]; then - # substitute wildcards in the dependency - r=`echo $r | sed "s/%i/$instance_specified/g"` - fi - - if [ "$action" = "enable" ]; then - enable_service=$service - if [ "$service_template" = true -a -z "$instance_specified" ]; then - default_instance=$(sed '/^DefaultInstance[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file") - if [ -z $default_instance ]; then - echo "Template unit without instance or DefaultInstance directive, nothing to enable" - continue - else - echo "Found DefaultInstance $default_instance, enabling it" - enable_service=$(echo $service | sed "s/@/@$(echo $default_instance | sed 's/\\/\\\\/g')/") - fi - fi - mkdir -p $ROOT/etc/systemd/system/$r.$suffix - ln -s $service_file $ROOT/etc/systemd/system/$r.$suffix/$enable_service - echo "Enabled $enable_service for $r." - else - if [ "$service_template" = true -a -z "$instance_specified" ]; then - disable_service="$ROOT/etc/systemd/system/$r.$suffix/`echo $service | sed 's/@/@*/'`" - else - disable_service="$ROOT/etc/systemd/system/$r.$suffix/$service" - fi - rm -f $disable_service - [ -d $ROOT/etc/systemd/system/$r.$suffix ] && rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.$suffix - echo "Disabled ${disable_service##$ROOT/etc/systemd/system/$r.$suffix/} for $r." - fi - done - done - - # create the required symbolic 'Alias' links - alias=$(sed '/^Alias[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \ - | tr ',' '\n' \ - | grep "$unit_types_re") - - for r in $alias; do - if [ "$action" = "enable" ]; then - mkdir -p $ROOT/etc/systemd/system - ln -s $service_file $ROOT/etc/systemd/system/$r - echo "Enabled $service for $alias." - else - rm -f $ROOT/etc/systemd/system/$r - echo "Disabled $service for $alias." - fi - done - - # call us for the other required scripts - also=$(sed '/^Also[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \ - | tr ',' '\n') - for a in $also; do - echo "Also=$a found in $service" - if [ "$action" = "enable" ]; then - $0 --root=$ROOT enable $a - fi - done -done +#!/usr/bin/env python3 +"""systemctl: subset of systemctl used for image construction + +Mask/preset systemd units +""" + +import argparse +import fnmatch +import os +import re +import sys + +from collections import namedtuple +from pathlib import Path + +version = 1.0 + +ROOT = Path("/") +SYSCONFDIR = Path("etc") +BASE_LIBDIR = Path("lib") +LIBDIR = Path("usr", "lib") + +locations = list() + + +class SystemdFile(): + """Class representing a single systemd configuration file""" + def __init__(self, root, path): + self.sections = dict() + self._parse(root, path) + + def _parse(self, root, path): + """Parse a systemd syntax configuration file + + Args: + path: A pathlib.Path object pointing to the file + + """ + skip_re = re.compile(r"^\s*([#;]|$)") + section_re = re.compile(r"^\s*\[(?P<section>.*)\]") + kv_re = re.compile(r"^\s*(?P<key>[^\s]+)\s*=\s*(?P<value>.*)") + section = None + + if path.is_symlink(): + try: + path.resolve() + except FileNotFoundError: + # broken symlink, try relative to root + path = root / Path(os.readlink(str(path))).relative_to(ROOT) + + with path.open() as f: + for line in f: + if skip_re.match(line): + continue + + line = line.rstrip("\n") + m = section_re.match(line) + if m: + section = dict() + self.sections[m.group('section')] = section + continue + + while line.endswith("\\"): + line += f.readline().rstrip("\n") + + m = kv_re.match(line) + k = m.group('key') + v = m.group('value') + if k not in section: + section[k] = list() + section[k].extend(v.split()) + + def get(self, section, prop): + """Get a property from section + + Args: + section: Section to retrieve property from + prop: Property to retrieve + + Returns: + List representing all properties of type prop in section. + + Raises: + KeyError: if ``section`` or ``prop`` not found + """ + return self.sections[section][prop] + + +class Presets(): + """Class representing all systemd presets""" + def __init__(self, scope, root): + self.directives = list() + self._collect_presets(scope, root) + + def _parse_presets(self, presets): + """Parse presets out of a set of preset files""" + skip_re = re.compile(r"^\s*([#;]|$)") + directive_re = re.compile(r"^\s*(?P<action>enable|disable)\s+(?P<unit_name>(.+))") + + Directive = namedtuple("Directive", "action unit_name") + for preset in presets: + with preset.open() as f: + for line in f: + m = directive_re.match(line) + if m: + directive = Directive(action=m.group('action'), + unit_name=m.group('unit_name')) + self.directives.append(directive) + elif skip_re.match(line): + pass + else: + sys.exit("Unparsed preset line in {}".format(preset)) + + def _collect_presets(self, scope, root): + """Collect list of preset files""" + presets = dict() + for location in locations: + paths = (root / location / scope).glob("*.preset") + for path in paths: + # earlier names override later ones + if path.name not in presets: + presets[path.name] = path + + self._parse_presets([v for k, v in sorted(presets.items())]) + + def state(self, unit_name): + """Return state of preset for unit_name + + Args: + presets: set of presets + unit_name: name of the unit + + Returns: + None: no matching preset + `enable`: unit_name is enabled + `disable`: unit_name is disabled + """ + for directive in self.directives: + if fnmatch.fnmatch(unit_name, directive.unit_name): + return directive.action + + return None + + +def add_link(path, target): + try: + path.parent.mkdir(parents=True) + except FileExistsError: + pass + if not path.is_symlink(): + print("ln -s {} {}".format(target, path)) + path.symlink_to(target) + + +class SystemdUnitNotFoundError(Exception): + pass + + +class SystemdUnit(): + def __init__(self, root, unit): + self.root = root + self.unit = unit + self.config = None + + def _path_for_unit(self, unit): + for location in locations: + path = self.root / location / "system" / unit + if path.exists(): + return path + + raise SystemdUnitNotFoundError(self.root, unit) + + def _process_deps(self, config, service, location, prop, dirstem): + systemdir = self.root / SYSCONFDIR / "systemd" / "system" + + target = ROOT / location.relative_to(self.root) + try: + for dependent in config.get('Install', prop): + wants = systemdir / "{}.{}".format(dependent, dirstem) / service + add_link(wants, target) + + except KeyError: + pass + + def enable(self): + # if we're enabling an instance, first extract the actual instance + # then figure out what the template unit is + template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit) + if template: + instance = template.group('instance') + unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1) + else: + instance = None + unit = self.unit + + path = self._path_for_unit(unit) + + if path.is_symlink(): + # ignore aliases + return + + config = SystemdFile(self.root, path) + if instance == "": + try: + default_instance = config.get('Install', 'DefaultInstance')[0] + except KeyError: + # no default instance, so nothing to enable + return + + service = self.unit.replace("@.", + "@{}.".format(default_instance)) + else: + service = self.unit + + self._process_deps(config, service, path, 'WantedBy', 'wants') + self._process_deps(config, service, path, 'RequiredBy', 'requires') + + try: + for also in config.get('Install', 'Also'): + SystemdUnit(self.root, also).enable() + + except KeyError: + pass + + systemdir = self.root / SYSCONFDIR / "systemd" / "system" + target = ROOT / path.relative_to(self.root) + try: + for dest in config.get('Install', 'Alias'): + alias = systemdir / dest + add_link(alias, target) + + except KeyError: + pass + + def mask(self): + systemdir = self.root / SYSCONFDIR / "systemd" / "system" + add_link(systemdir / self.unit, "/dev/null") + + +def collect_services(root): + """Collect list of service files""" + services = set() + for location in locations: + paths = (root / location / "system").glob("*") + for path in paths: + if path.is_dir(): + continue + services.add(path.name) + + return services + + +def preset_all(root): + presets = Presets('system-preset', root) + services = collect_services(root) + + for service in services: + state = presets.state(service) + + if state == "enable" or state is None: + SystemdUnit(root, service).enable() + + # If we populate the systemd links we also create /etc/machine-id, which + # allows systemd to boot with the filesystem read-only before generating + # a real value and then committing it back. + # + # For the stateless configuration, where /etc is generated at runtime + # (for example on a tmpfs), this script shouldn't run at all and we + # allow systemd to completely populate /etc. + (root / SYSCONFDIR / "machine-id").touch() + + +def main(): + if sys.version_info < (3, 4, 0): + sys.exit("Python 3.4 or greater is required") + + parser = argparse.ArgumentParser() + parser.add_argument('command', nargs=1, choices=['enable', 'mask', + 'preset-all']) + parser.add_argument('service', nargs=argparse.REMAINDER) + parser.add_argument('--root') + parser.add_argument('--preset-mode', + choices=['full', 'enable-only', 'disable-only'], + default='full') + + args = parser.parse_args() + + root = Path(args.root) if args.root else ROOT + + locations.append(SYSCONFDIR / "systemd") + # Handle the usrmerge case by ignoring /lib when it's a symlink + if not (root / BASE_LIBDIR).is_symlink(): + locations.append(BASE_LIBDIR / "systemd") + locations.append(LIBDIR / "systemd") + + command = args.command[0] + if command == "mask": + for service in args.service: + SystemdUnit(root, service).mask() + elif command == "enable": + for service in args.service: + SystemdUnit(root, service).enable() + elif command == "preset-all": + if len(args.service) != 0: + sys.exit("Too many arguments.") + if args.preset_mode != "enable-only": + sys.exit("Only enable-only is supported as preset-mode.") + preset_all(root) + else: + raise RuntimeError() + + +if __name__ == '__main__': + main() diff --git a/poky/meta/recipes-core/systemd/systemd.inc b/poky/meta/recipes-core/systemd/systemd.inc index 5bd88ed6e..3a353b009 100644 --- a/poky/meta/recipes-core/systemd/systemd.inc +++ b/poky/meta/recipes-core/systemd/systemd.inc @@ -14,8 +14,8 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" -SRCREV = "c1f8ff8d0de7e303b8004b02a0a47d4cc103a7f8" -SRCBRANCH = "v241-stable" +SRCREV = "db2e367bfc3b119609f837eb973d915f6c550b2f" +SRCBRANCH = "v242-stable" SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch b/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch index a6857b1f4..68ca604d6 100644 --- a/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch +++ b/poky/meta/recipes-core/systemd/systemd/0001-do-not-disable-buffer-in-writing-files.patch @@ -14,6 +14,8 @@ This is specific to musl. Upstream-Status: Inappropriate [musl] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +[Rebased for v242] +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> --- src/basic/cgroup-util.c | 14 +++++++------- src/basic/procfs-util.c | 4 ++-- @@ -25,21 +27,20 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> src/hibernate-resume/hibernate-resume.c | 2 +- src/libsystemd/sd-device/sd-device.c | 2 +- src/login/logind-dbus.c | 2 +- - src/network/networkd-ipv6-proxy-ndp.c | 2 +- - src/network/networkd-link.c | 18 +++++++++--------- src/nspawn/nspawn-cgroup.c | 2 +- src/nspawn/nspawn.c | 6 +++--- + src/shared/sysctl-util.c | 2 +- src/sleep/sleep.c | 12 ++++++------ src/udev/udevadm-trigger.c | 2 +- src/udev/udevd.c | 6 +++--- src/vconsole/vconsole-setup.c | 2 +- - 18 files changed, 48 insertions(+), 48 deletions(-) + 17 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index 8ce7ccb..b633226 100644 +index fc28109..44fe985 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c -@@ -818,7 +818,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { +@@ -822,7 +822,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { xsprintf(c, PID_FMT "\n", pid); @@ -48,7 +49,7 @@ index 8ce7ccb..b633226 100644 if (r < 0) return r; -@@ -1100,7 +1100,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -1104,7 +1104,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { sc = strstrip(contents); if (isempty(sc)) { @@ -57,7 +58,7 @@ index 8ce7ccb..b633226 100644 if (r < 0) return r; } else if (!path_equal(sc, agent)) -@@ -1118,7 +1118,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -1122,7 +1122,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { sc = strstrip(contents); if (streq(sc, "0")) { @@ -66,7 +67,7 @@ index 8ce7ccb..b633226 100644 if (r < 0) return r; -@@ -1145,7 +1145,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -1149,7 +1149,7 @@ int cg_uninstall_release_agent(const char *controller) { if (r < 0) return r; @@ -75,7 +76,7 @@ index 8ce7ccb..b633226 100644 if (r < 0) return r; -@@ -1155,7 +1155,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -1159,7 +1159,7 @@ int cg_uninstall_release_agent(const char *controller) { if (r < 0) return r; @@ -84,7 +85,7 @@ index 8ce7ccb..b633226 100644 if (r < 0) return r; -@@ -2012,7 +2012,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri +@@ -2016,7 +2016,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri if (r < 0) return r; @@ -93,7 +94,7 @@ index 8ce7ccb..b633226 100644 } int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { -@@ -2660,7 +2660,7 @@ int cg_enable_everywhere( +@@ -2664,7 +2664,7 @@ int cg_enable_everywhere( return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); } @@ -103,10 +104,10 @@ index 8ce7ccb..b633226 100644 log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c -index 42ce53d..5751253 100644 +index 7aaf95b..25fc3de 100644 --- a/src/basic/procfs-util.c +++ b/src/basic/procfs-util.c -@@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) { +@@ -85,13 +85,13 @@ int procfs_tasks_set_limit(uint64_t limit) { * decrease it, as threads-max is the much more relevant sysctl. */ if (limit > pid_max-1) { sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ @@ -136,10 +137,10 @@ index 123d00e..e7ea78f 100644 return r; diff --git a/src/basic/util.c b/src/basic/util.c -index e577c93..3c64f91 100644 +index 93d610b..97dca64 100644 --- a/src/basic/util.c +++ b/src/basic/util.c -@@ -631,7 +631,7 @@ void disable_coredumps(void) { +@@ -294,7 +294,7 @@ void disable_coredumps(void) { if (detect_container() > 0) return; @@ -149,10 +150,10 @@ index e577c93..3c64f91 100644 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); } diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c -index af31f09..eec5738 100644 +index 66e2f01..5daa43b 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c -@@ -47,7 +47,7 @@ static int delete_rule(const char *rule) { +@@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { if (!fn) return log_oom(); @@ -161,7 +162,7 @@ index af31f09..eec5738 100644 } static int apply_rule(const char *rule) { -@@ -55,7 +55,7 @@ static int apply_rule(const char *rule) { +@@ -56,7 +56,7 @@ static int apply_rule(const char *rule) { (void) delete_rule(rule); @@ -170,7 +171,7 @@ index af31f09..eec5738 100644 if (r < 0) return log_error_errno(r, "Failed to add binary format: %m"); -@@ -212,7 +212,7 @@ static int run(int argc, char *argv[]) { +@@ -213,7 +213,7 @@ static int run(int argc, char *argv[]) { } /* Flush out all rules */ @@ -180,10 +181,10 @@ index af31f09..eec5738 100644 STRV_FOREACH(f, files) { k = apply_file(*f, true); diff --git a/src/core/main.c b/src/core/main.c -index 561f956..db6f113 100644 +index 46db471..726ccaf 100644 --- a/src/core/main.c +++ b/src/core/main.c -@@ -1468,7 +1468,7 @@ static int bump_unix_max_dgram_qlen(void) { +@@ -1469,7 +1469,7 @@ static int bump_unix_max_dgram_qlen(void) { if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) return 0; @@ -192,7 +193,7 @@ index 561f956..db6f113 100644 if (r < 0) return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); -@@ -1683,7 +1683,7 @@ static void initialize_core_pattern(bool skip_setup) { +@@ -1684,7 +1684,7 @@ static void initialize_core_pattern(bool skip_setup) { if (getpid_cached() != 1) return; @@ -202,10 +203,10 @@ index 561f956..db6f113 100644 log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); } diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c -index 49b37ae..c96eedc 100644 +index cd7fb01..077e861 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c -@@ -350,17 +350,17 @@ int mac_smack_setup(bool *loaded_policy) { +@@ -351,17 +351,17 @@ int mac_smack_setup(bool *loaded_policy) { } #ifdef SMACK_RUN_LABEL @@ -241,10 +242,10 @@ index 17e7cd1..87a7667 100644 log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); return EXIT_FAILURE; diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c -index 2a69f2e..9d55340 100644 +index c2315c0..00f81b4 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c -@@ -1836,7 +1836,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, +@@ -1852,7 +1852,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, if (!value) return -ENOMEM; @@ -254,10 +255,10 @@ index 2a69f2e..9d55340 100644 if (r == -ELOOP) return -EINVAL; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c -index 8ab498f..d27ef9c 100644 +index 2cebcce..7111fc1 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c -@@ -1231,7 +1231,7 @@ static int trigger_device(Manager *m, sd_device *d) { +@@ -1285,7 +1285,7 @@ static int trigger_device(Manager *m, sd_device *d) { if (!t) return -ENOMEM; @@ -266,109 +267,11 @@ index 8ab498f..d27ef9c 100644 } return 0; -diff --git a/src/network/networkd-ipv6-proxy-ndp.c b/src/network/networkd-ipv6-proxy-ndp.c -index f594b27..c283cc3 100644 ---- a/src/network/networkd-ipv6-proxy-ndp.c -+++ b/src/network/networkd-ipv6-proxy-ndp.c -@@ -43,7 +43,7 @@ static int ipv6_proxy_ndp_set(Link *link) { - v = ipv6_proxy_ndp_is_needed(link); - p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/proxy_ndp"); - -- r = write_string_file(p, one_zero(v), WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, one_zero(v), WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot configure proxy NDP for interface: %m"); - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 22392d7..e0ed551 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -274,7 +274,7 @@ static int link_enable_ipv6(Link *link) { - - p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/disable_ipv6"); - -- r = write_string_file(p, one_zero(disabled), WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, one_zero(disabled), WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m", - enable_disable(!disabled), link->ifname); -@@ -1272,7 +1272,7 @@ static int link_set_proxy_arp(Link *link) { - - p = strjoina("/proc/sys/net/ipv4/conf/", link->ifname, "/proxy_arp"); - -- r = write_string_file(p, one_zero(link->network->proxy_arp), WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, one_zero(link->network->proxy_arp), WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot configure proxy ARP for interface: %m"); - -@@ -2541,7 +2541,7 @@ static int link_set_ipv4_forward(Link *link) { - * primarily to keep IPv4 and IPv6 packet forwarding behaviour - * somewhat in sync (see below). */ - -- r = write_string_file("/proc/sys/net/ipv4/ip_forward", "1", WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/net/ipv4/ip_forward", "1", WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot turn on IPv4 packet forwarding, ignoring: %m"); - -@@ -2563,7 +2563,7 @@ static int link_set_ipv6_forward(Link *link) { - * same behaviour there and also propagate the setting from - * one to all, to keep things simple (see above). */ - -- r = write_string_file("/proc/sys/net/ipv6/conf/all/forwarding", "1", WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file("/proc/sys/net/ipv6/conf/all/forwarding", "1", WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot configure IPv6 packet forwarding, ignoring: %m"); - -@@ -2583,7 +2583,7 @@ static int link_set_ipv6_privacy_extensions(Link *link) { - p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/use_tempaddr"); - xsprintf(buf, "%u", (unsigned) link->network->ipv6_privacy_extensions); - -- r = write_string_file(p, buf, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, buf, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot configure IPv6 privacy extension for interface: %m"); - -@@ -2607,7 +2607,7 @@ static int link_set_ipv6_accept_ra(Link *link) { - p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/accept_ra"); - - /* We handle router advertisements ourselves, tell the kernel to GTFO */ -- r = write_string_file(p, "0", WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, "0", WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot disable kernel IPv6 accept_ra for interface: %m"); - -@@ -2635,7 +2635,7 @@ static int link_set_ipv6_dad_transmits(Link *link) { - p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/dad_transmits"); - xsprintf(buf, "%i", link->network->ipv6_dad_transmits); - -- r = write_string_file(p, buf, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, buf, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot set IPv6 dad transmits for interface: %m"); - -@@ -2663,7 +2663,7 @@ static int link_set_ipv6_hop_limit(Link *link) { - p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/hop_limit"); - xsprintf(buf, "%i", link->network->ipv6_hop_limit); - -- r = write_string_file(p, buf, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, buf, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot set IPv6 hop limit for interface: %m"); - -@@ -2689,7 +2689,7 @@ static int link_set_ipv6_mtu(Link *link) { - - xsprintf(buf, "%" PRIu32, link->network->ipv6_mtu); - -- r = write_string_file(p, buf, WRITE_STRING_FILE_DISABLE_BUFFER); -+ r = write_string_file(p, buf, 0); - if (r < 0) - log_link_warning_errno(link, r, "Cannot set IPv6 MTU for interface: %m"); - diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c -index 97fa092..b841f51 100644 +index 168125d..dd0ab79 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c -@@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { +@@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { (void) mkdir_parents(fn, 0755); sprintf(pid_string, PID_FMT, pid); @@ -378,10 +281,10 @@ index 97fa092..b841f51 100644 log_error_errno(r, "Failed to move process: %m"); goto finish; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index e0c2d71..213790c 100644 +index 3b0ecb1..a1b5240 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -2117,7 +2117,7 @@ static int reset_audit_loginuid(void) { +@@ -2341,7 +2341,7 @@ static int reset_audit_loginuid(void) { if (streq(p, "4294967295")) return 0; @@ -390,7 +293,7 @@ index e0c2d71..213790c 100644 if (r < 0) { log_error_errno(r, "Failed to reset audit login UID. This probably means that your kernel is too\n" -@@ -3195,13 +3195,13 @@ static int setup_uid_map(pid_t pid) { +@@ -3531,13 +3531,13 @@ static int setup_uid_map(pid_t pid) { xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, arg_uid_shift, arg_uid_range); @@ -406,11 +309,24 @@ index e0c2d71..213790c 100644 if (r < 0) return log_error_errno(r, "Failed to write GID map: %m"); +diff --git a/src/shared/sysctl-util.c b/src/shared/sysctl-util.c +index 9be4055..f935cde 100644 +--- a/src/shared/sysctl-util.c ++++ b/src/shared/sysctl-util.c +@@ -73,7 +73,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c + + log_debug("Setting '%s' to '%s'", p, value); + +- return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); ++ return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); + } + + int sysctl_read(const char *property, char **content) { diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 5b7984a..bf818aa 100644 +index 11aabaf..6aa5d37 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c -@@ -43,7 +43,7 @@ static int write_hibernate_location_info(void) { +@@ -48,7 +48,7 @@ static int write_hibernate_location_info(void) { /* if it's a swap partition, we just write the disk to /sys/power/resume */ if (streq(type, "partition")) { @@ -419,7 +335,7 @@ index 5b7984a..bf818aa 100644 if (r < 0) return log_debug_errno(r, "Faileed to write partitoin device to /sys/power/resume: %m"); -@@ -79,12 +79,12 @@ static int write_hibernate_location_info(void) { +@@ -84,12 +84,12 @@ static int write_hibernate_location_info(void) { offset = fiemap->fm_extents[0].fe_physical / page_size(); xsprintf(offset_str, "%" PRIu64, offset); @@ -434,7 +350,7 @@ index 5b7984a..bf818aa 100644 if (r < 0) return log_debug_errno(r, "Failed to write device '%s': %m", device_str); -@@ -98,7 +98,7 @@ static int write_mode(char **modes) { +@@ -103,7 +103,7 @@ static int write_mode(char **modes) { STRV_FOREACH(mode, modes) { int k; @@ -443,7 +359,7 @@ index 5b7984a..bf818aa 100644 if (k >= 0) return 0; -@@ -117,7 +117,7 @@ static int write_state(FILE **f, char **states) { +@@ -122,7 +122,7 @@ static int write_state(FILE **f, char **states) { STRV_FOREACH(state, states) { int k; @@ -452,7 +368,7 @@ index 5b7984a..bf818aa 100644 if (k >= 0) return 0; log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); -@@ -212,7 +212,7 @@ static int rtc_write_wake_alarm(uint64_t sec) { +@@ -217,7 +217,7 @@ static int rtc_write_wake_alarm(uint64_t sec) { xsprintf(buf, "%" PRIu64, sec); @@ -462,10 +378,10 @@ index 5b7984a..bf818aa 100644 return log_error_errno(r, "Failed to write '%s' to /sys/class/rtc/rtc0/wakealarm: %m", buf); diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c -index 9532946..2e576bb 100644 +index b7dafb7..bab4907 100644 --- a/src/udev/udevadm-trigger.c +++ b/src/udev/udevadm-trigger.c -@@ -42,7 +42,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se +@@ -43,7 +43,7 @@ static int exec_list(sd_device_enumerator *e, const char *action, Set *settle_se if (!filename) return log_oom(); @@ -475,10 +391,10 @@ index 9532946..2e576bb 100644 log_debug_errno(r, "Failed to write '%s' to '%s', ignoring: %m", action, filename); continue; diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index 0303f36..687d009 100644 +index 140ec35..33063a9 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c -@@ -1218,7 +1218,7 @@ static int synthesize_change(sd_device *dev) { +@@ -1185,7 +1185,7 @@ static int synthesize_change(sd_device *dev) { */ log_debug("Device '%s' is closed, synthesising 'change'", devname); strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); @@ -487,7 +403,7 @@ index 0303f36..687d009 100644 FOREACH_DEVICE(e, d) { const char *t, *n, *s; -@@ -1233,7 +1233,7 @@ static int synthesize_change(sd_device *dev) { +@@ -1200,7 +1200,7 @@ static int synthesize_change(sd_device *dev) { log_debug("Device '%s' is closed, synthesising partition '%s' 'change'", devname, n); strscpyl(filename, sizeof(filename), s, "/uevent", NULL); @@ -496,7 +412,7 @@ index 0303f36..687d009 100644 } return 0; -@@ -1241,7 +1241,7 @@ static int synthesize_change(sd_device *dev) { +@@ -1208,7 +1208,7 @@ static int synthesize_change(sd_device *dev) { log_debug("Device %s is closed, synthesising 'change'", devname); strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); @@ -506,10 +422,10 @@ index 0303f36..687d009 100644 return 0; } diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index ebdeba3..aa879e6 100644 +index 67dc2e4..01b83d0 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c -@@ -114,7 +114,7 @@ static int toggle_utf8(const char *name, int fd, bool utf8) { +@@ -116,7 +116,7 @@ static int toggle_utf8(const char *name, int fd, bool utf8) { static int toggle_utf8_sysfs(bool utf8) { int r; @@ -519,5 +435,5 @@ index ebdeba3..aa879e6 100644 return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); -- -2.7.4 +2.11.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dep-for-various-targets-t.patch b/poky/meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dep-for-various-targets-t.patch deleted file mode 100644 index 01936f285..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dep-for-various-targets-t.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 9f86d8769ab830a724c84f849975b5595e26b47c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> -Date: Sun, 24 Feb 2019 22:49:38 +0100 -Subject: [PATCH] meson: declare version.h as dep for various targets that - include build.h - -Should fix #11565. - -Upstream-Status: Backport - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - meson.build | 19 +++++++++++++------ - src/core/meson.build | 3 ++- - src/udev/meson.build | 1 + - 3 files changed, 16 insertions(+), 7 deletions(-) - -diff --git a/meson.build b/meson.build -index 30df834..232f3e1 100644 ---- a/meson.build -+++ b/meson.build -@@ -1637,7 +1637,8 @@ exe = executable('systemd-analyze', - include_directories : includes, - link_with : [libcore, - libshared], -- dependencies : [threads, -+ dependencies : [versiondep, -+ threads, - librt, - libseccomp, - libselinux, -@@ -2183,7 +2184,8 @@ if conf.get('ENABLE_IMPORTD') == 1 - systemd_pull_sources, - include_directories : includes, - link_with : [libshared], -- dependencies : [libcurl, -+ dependencies : [versiondep, -+ libcurl, - libz, - libbzip2, - libxz, -@@ -2232,7 +2234,8 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1 - systemd_journal_upload_sources, - include_directories : includes, - link_with : [libshared], -- dependencies : [threads, -+ dependencies : [versiondep, -+ threads, - libcurl, - libgnutls, - libxz, -@@ -2558,6 +2561,7 @@ exe = executable('systemd-stdio-bridge', - 'src/stdio-bridge/stdio-bridge.c', - include_directories : includes, - link_with : [libshared], -+ dependencies : [versiondep], - install_rpath : rootlibexecdir, - install : true) - public_programs += exe -@@ -2641,7 +2645,8 @@ exe = executable('systemd-udevd', - link_with : [libudev_core, - libsystemd_network, - libudev_static], -- dependencies : [threads, -+ dependencies : [versiondep, -+ threads, - libkmod, - libidn, - libacl, -@@ -2658,7 +2663,8 @@ exe = executable('udevadm', - link_with : [libudev_core, - libsystemd_network, - libudev_static], -- dependencies : [threads, -+ dependencies : [versiondep, -+ threads, - libkmod, - libidn, - libacl, -@@ -2798,7 +2804,8 @@ foreach tuple : tests - sources, - include_directories : incs, - link_with : link_with, -- dependencies : dependencies, -+ dependencies : [versiondep, -+ dependencies], - c_args : defs, - build_by_default : want_tests != 'false', - install_rpath : rootlibexecdir, -diff --git a/src/core/meson.build b/src/core/meson.build -index 85021bd..88fb093 100644 ---- a/src/core/meson.build -+++ b/src/core/meson.build -@@ -150,7 +150,8 @@ libcore = static_library( - load_fragment_gperf_c, - load_fragment_gperf_nulstr_c, - include_directories : includes, -- dependencies : [threads, -+ dependencies : [versiondep, -+ threads, - librt, - libseccomp, - libpam, -diff --git a/src/udev/meson.build b/src/udev/meson.build -index 9d3f6d1..973a75e 100644 ---- a/src/udev/meson.build -+++ b/src/udev/meson.build -@@ -180,6 +180,7 @@ foreach prog : [['ata_id/ata_id.c'], - prog, - include_directories : includes, - c_args : ['-DLOG_REALM=LOG_REALM_UDEV'], -+ dependencies : [versiondep], - link_with : [libudev_static], - install_rpath : udev_rpath, - install : true, --- -2.7.4 - diff --git a/poky/meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dependency-for-systemd.patch b/poky/meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dependency-for-systemd.patch deleted file mode 100644 index 8874dff9a..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0001-meson-declare-version.h-as-dependency-for-systemd.patch +++ /dev/null @@ -1,32 +0,0 @@ -From e14d724a932a255eec4d60b08e128519c33e88ee Mon Sep 17 00:00:00 2001 -From: Michael Olbrich <m.olbrich@pengutronix.de> -Date: Mon, 25 Feb 2019 11:59:23 +0100 -Subject: [PATCH] meson: declare version.h as dependency for systemd - -This is a followup to #11815 and adds the last missing dependency. -With this #11565 is hopefully really fixed. - -Upstream-Status: Backport - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - meson.build | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 232f3e1..70148be 100644 ---- a/meson.build -+++ b/meson.build -@@ -1618,7 +1618,8 @@ executable('systemd', - include_directories : includes, - link_with : [libcore, - libshared], -- dependencies : [threads, -+ dependencies : [versiondep, -+ threads, - librt, - libseccomp, - libselinux, --- -2.7.4 - diff --git a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch index 36e0699da..c6213ab88 100644 --- a/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch +++ b/poky/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch @@ -8,20 +8,23 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> [Rebased for v241] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +[Rebased for v242] +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> --- - src/basic/util.h | 14 -------------- + src/basic/sort-util.h | 14 -------------- src/libsystemd/sd-hwdb/hwdb-util.c | 19 ++++++++++++++----- src/shared/format-table.c | 36 ++++++++++++++++++++++++------------ 3 files changed, 38 insertions(+), 31 deletions(-) -diff --git a/src/basic/util.h b/src/basic/util.h -index dc33d66..9f6a6ce 100644 ---- a/src/basic/util.h -+++ b/src/basic/util.h -@@ -116,20 +116,6 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn +diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h +index e029f8646e..27d68b341c 100644 +--- a/src/basic/sort-util.h ++++ b/src/basic/sort-util.h +@@ -54,17 +54,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn + int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ }) - +- -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { - if (nmemb <= 1) - return; @@ -35,15 +38,11 @@ index dc33d66..9f6a6ce 100644 - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ - qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ - }) -- - /* Normal memcpy requires src to be nonnull. We do nothing if n is 0. */ - static inline void memcpy_safe(void *dst, const void *src, size_t n) { - if (n == 0) diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c -index f852967..b570ce1 100644 +index c83575c7c8..72f8f3a050 100644 --- a/src/libsystemd/sd-hwdb/hwdb-util.c +++ b/src/libsystemd/sd-hwdb/hwdb-util.c -@@ -126,9 +126,13 @@ static void trie_free(struct trie *trie) { +@@ -128,9 +128,13 @@ static void trie_free(struct trie *trie) { DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); @@ -60,7 +59,7 @@ index f852967..b570ce1 100644 } static int trie_node_add_value(struct trie *trie, struct trie_node *node, -@@ -156,7 +160,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, +@@ -158,7 +162,10 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, .value_off = v, }; @@ -72,7 +71,7 @@ index f852967..b570ce1 100644 if (val) { /* At this point we have 2 identical properties on the same match-string. * Since we process files in order, we just replace the previous value. */ -@@ -182,7 +189,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, +@@ -184,7 +191,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, .line_number = line_number, }; node->values_count++; @@ -84,10 +83,10 @@ index f852967..b570ce1 100644 } diff --git a/src/shared/format-table.c b/src/shared/format-table.c -index 7d52980..75dbfe1 100644 +index a5c0a99b08..d595cbe372 100644 --- a/src/shared/format-table.c +++ b/src/shared/format-table.c -@@ -848,31 +848,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t +@@ -850,31 +850,33 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t return CMP(index_a, index_b); } @@ -131,7 +130,7 @@ index 7d52980..75dbfe1 100644 } /* Order identical lines by the order there were originally added in */ -@@ -1105,7 +1107,12 @@ int table_print(Table *t, FILE *f) { +@@ -1107,7 +1109,12 @@ int table_print(Table *t, FILE *f) { for (i = 0; i < n_rows; i++) sorted[i] = i * t->n_columns; @@ -145,7 +144,7 @@ index 7d52980..75dbfe1 100644 } if (t->display_map) -@@ -1532,7 +1539,12 @@ int table_to_json(Table *t, JsonVariant **ret) { +@@ -1534,7 +1541,12 @@ int table_to_json(Table *t, JsonVariant **ret) { for (i = 0; i < n_rows; i++) sorted[i] = i * t->n_columns; @@ -160,5 +159,5 @@ index 7d52980..75dbfe1 100644 if (t->display_map) -- -2.7.4 +2.11.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch index 5246b4b26..2e39f7a2e 100644 --- a/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch +++ b/poky/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch @@ -9,14 +9,16 @@ is not provided. Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +[Rebased for v242] +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> --- src/basic/missing_type.h | 9 +++++++++ - src/basic/util.h | 1 + + src/basic/sort-util.h | 1 + src/journal/catalog.c | 1 + 3 files changed, 11 insertions(+) diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h -index bf8a6ca..c487e65 100644 +index bf8a6caa1b..2134fe5095 100644 --- a/src/basic/missing_type.h +++ b/src/basic/missing_type.h @@ -10,3 +10,12 @@ @@ -32,30 +34,30 @@ index bf8a6ca..c487e65 100644 +#define __COMPAR_FN_T +typedef int (*__compar_fn_t)(const void *, const void *); +#endif -diff --git a/src/basic/util.h b/src/basic/util.h -index 9f6a6ce..2c5dc32 100644 ---- a/src/basic/util.h -+++ b/src/basic/util.h -@@ -26,6 +26,7 @@ - #include "format-util.h" +diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h +index e029f86..7247d40 100644 +--- a/src/basic/sort-util.h ++++ b/src/basic/sort-util.h +@@ -4,6 +4,7 @@ + #include <stdlib.h> + #include "macro.h" - #include "time-util.h" +#include "missing.h" - size_t page_size(void) _pure_; - #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) + void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, + __compar_d_fn_t compar, void *arg); diff --git a/src/journal/catalog.c b/src/journal/catalog.c -index 4062f12..034e00c 100644 +index 7beffc1e1a..4818a2e5cc 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c -@@ -26,6 +26,7 @@ +@@ -29,6 +29,7 @@ + #include "string-util.h" #include "strv.h" #include "tmpfile-util.h" - #include "util.h" +#include "missing.h" const char * const catalog_file_dirs[] = { "/usr/local/lib/systemd/catalog/", -- -2.7.4 +2.11.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch index bb738e22c..fa8217e3d 100644 --- a/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/poky/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch @@ -20,10 +20,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> create mode 100644 src/basic/parse-printf-format.h diff --git a/meson.build b/meson.build -index 3386546..44b24ee 100644 +index 79195c9748..0bffbf29c5 100644 --- a/meson.build +++ b/meson.build -@@ -667,6 +667,7 @@ foreach header : ['crypt.h', +@@ -685,6 +685,7 @@ foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h', 'linux/can/vxcan.h', @@ -32,10 +32,10 @@ index 3386546..44b24ee 100644 'valgrind/memcheck.h', 'valgrind/valgrind.h', diff --git a/src/basic/meson.build b/src/basic/meson.build -index e5852f3..2192a0c 100644 +index 91e0df3d2f..a732b554da 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build -@@ -284,6 +284,11 @@ foreach item : [['af', af_list_txt, 'af', ''], +@@ -298,6 +298,11 @@ foreach item : [['af', af_list_txt, 'af', ''], endforeach basic_sources += generated_gperf_headers @@ -49,7 +49,7 @@ index e5852f3..2192a0c 100644 'gcrypt-util.h') diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c new file mode 100644 -index 0000000..49437e5 +index 0000000000..49437e5445 --- /dev/null +++ b/src/basic/parse-printf-format.c @@ -0,0 +1,273 @@ @@ -328,7 +328,7 @@ index 0000000..49437e5 +} diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h new file mode 100644 -index 0000000..47be752 +index 0000000000..47be7522d7 --- /dev/null +++ b/src/basic/parse-printf-format.h @@ -0,0 +1,57 @@ @@ -390,7 +390,7 @@ index 0000000..47be752 + +#endif /* HAVE_PRINTF_H */ diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h -index dc67b6e..cf8d514 100644 +index c3b9448d4f..2937aa13b1 100644 --- a/src/basic/stdio-util.h +++ b/src/basic/stdio-util.h @@ -1,13 +1,13 @@ @@ -403,13 +403,13 @@ index dc67b6e..cf8d514 100644 #include <sys/types.h> #include "macro.h" - #include "util.h" + #include "memory-util.h" +#include "parse-printf-format.h" #define snprintf_ok(buf, len, fmt, ...) \ ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c -index 8618454..3fea912 100644 +index 5ef11fa1a4..6384ab620c 100644 --- a/src/journal/journal-send.c +++ b/src/journal/journal-send.c @@ -2,7 +2,6 @@ @@ -421,13 +421,13 @@ index 8618454..3fea912 100644 #include <sys/socket.h> #include <sys/un.h> @@ -21,6 +20,7 @@ + #include "stdio-util.h" #include "string-util.h" #include "tmpfile-util.h" - #include "util.h" +#include "parse-printf-format.h" #define SNDBUF_SIZE (8*1024*1024) -- -2.7.4 +2.11.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch b/poky/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch index 2123052ff..5312083fd 100644 --- a/poky/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch +++ b/poky/meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch @@ -38,8 +38,8 @@ index a1458e9..3ba4b6b4 100644 ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" # watch metadata changes, caused by tools closing the device node which was opened for writing --ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*", OPTIONS+="watch" -+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*|hd*", OPTIONS+="watch" +-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*|nbd*", OPTIONS+="watch" ++ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|dasd*|nbd*|hd*", OPTIONS+="watch" -- 2.7.4 diff --git a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch index f20897b5f..a2e25a97d 100644 --- a/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/poky/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch @@ -9,21 +9,45 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +[Rebased for v242] +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> --- - meson.build | 1 + - src/basic/missing_stdlib.h | 12 ++++++++++++ - src/basic/mkdir.c | 1 + - src/basic/parse-util.c | 1 + - src/basic/procfs-util.c | 1 + - src/shared/pager.c | 1 + - src/shared/uid-range.c | 1 + - 7 files changed, 18 insertions(+) + meson.build | 1 + + src/backlight/backlight.c | 1 + + src/basic/env-util.c | 1 + + src/basic/missing_stdlib.h | 12 ++++++++++++ + src/basic/mkdir.c | 1 + + src/basic/parse-util.c | 1 + + src/basic/proc-cmdline.c | 1 + + src/basic/procfs-util.c | 1 + + src/basic/time-util.c | 1 + + src/core/dbus-cgroup.c | 1 + + src/core/dbus-util.c | 1 + + src/core/kmod-setup.c | 1 + + src/core/service.c | 1 + + src/journal/journalctl.c | 1 + + src/libsystemd/sd-bus/bus-message.c | 1 + + src/libsystemd/sd-bus/bus-objects.c | 1 + + src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + + src/locale/keymap-util.c | 1 + + src/nspawn/nspawn-settings.c | 1 + + src/shared/dns-domain.c | 1 + + src/shared/journal-importer.c | 1 + + src/shared/logs-show.c | 1 + + src/shared/pager.c | 1 + + src/shared/path-lookup.c | 1 + + src/shared/uid-range.c | 1 + + src/socket-proxy/socket-proxyd.c | 1 + + src/test/test-hexdecoct.c | 1 + + src/udev/udev-builtin-path_id.c | 1 + + src/udev/udev-rules.c | 1 + + 29 files changed, 40 insertions(+) diff --git a/meson.build b/meson.build -index 44b24ee..70fb218 100644 +index 79195c9..80d9564 100644 --- a/meson.build +++ b/meson.build -@@ -558,6 +558,7 @@ foreach ident : [ +@@ -572,6 +572,7 @@ foreach ident : [ #include <unistd.h>'''], ['explicit_bzero' , '''#include <string.h>'''], ['reallocarray', '''#include <malloc.h>'''], @@ -31,8 +55,32 @@ index 44b24ee..70fb218 100644 ] have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE') +diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c +index dfd6805..c2b2ace 100644 +--- a/src/backlight/backlight.c ++++ b/src/backlight/backlight.c +@@ -17,6 +17,7 @@ + #include "string-util.h" + #include "strv.h" + #include "util.h" ++#include "missing.h" + + static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) { + const char *subsystem, *sysname, *value; +diff --git a/src/basic/env-util.c b/src/basic/env-util.c +index fd449dc..e2b0722 100644 +--- a/src/basic/env-util.c ++++ b/src/basic/env-util.c +@@ -16,6 +16,7 @@ + #include "string-util.h" + #include "strv.h" + #include "utf8.h" ++#include "missing.h" + + #define VALID_CHARS_ENV_NAME \ + DIGITS LETTERS \ diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h -index c0ffe86..d50274b 100644 +index 188a8d4..1e16ec2 100644 --- a/src/basic/missing_stdlib.h +++ b/src/basic/missing_stdlib.h @@ -11,3 +11,15 @@ @@ -52,10 +100,10 @@ index c0ffe86..d50274b 100644 + }) +#endif diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c -index 4bb65d5..3038ab9 100644 +index 6b82eab..51c6b78 100644 --- a/src/basic/mkdir.c +++ b/src/basic/mkdir.c -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include "stat-util.h" #include "stdio-util.h" #include "user-util.h" @@ -75,6 +123,18 @@ index 87724af..d9c53bc 100644 int parse_boolean(const char *v) { if (!v) +diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c +index 1670001..b51feaa 100644 +--- a/src/basic/proc-cmdline.c ++++ b/src/basic/proc-cmdline.c +@@ -15,6 +15,7 @@ + #include "string-util.h" + #include "util.h" + #include "virt.h" ++#include "missing.h" + + int proc_cmdline(char **ret) { + const char *e; diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c index 7aaf95b..42ce53d 100644 --- a/src/basic/procfs-util.c @@ -87,30 +147,258 @@ index 7aaf95b..42ce53d 100644 int procfs_tasks_get_limit(uint64_t *ret) { _cleanup_free_ char *value = NULL; +diff --git a/src/basic/time-util.c b/src/basic/time-util.c +index daf952b..374b97f 100644 +--- a/src/basic/time-util.c ++++ b/src/basic/time-util.c +@@ -28,6 +28,7 @@ + #include "string-util.h" + #include "strv.h" + #include "time-util.h" ++#include "missing.h" + + static clockid_t map_clock_id(clockid_t c) { + +diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c +index 4615aea..bc1364f 100644 +--- a/src/core/dbus-cgroup.c ++++ b/src/core/dbus-cgroup.c +@@ -15,6 +15,7 @@ + #include "fileio.h" + #include "limits-util.h" + #include "path-util.h" ++#include "missing.h" + + static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy); + +diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c +index f4fbb72..0a1e3b5 100644 +--- a/src/core/dbus-util.c ++++ b/src/core/dbus-util.c +@@ -7,6 +7,7 @@ + #include "unit-printf.h" + #include "user-util.h" + #include "unit.h" ++#include "missing.h" + + int bus_property_get_triggered_unit( + sd_bus *bus, +diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c +index a91cfeb..a459610 100644 +--- a/src/core/kmod-setup.c ++++ b/src/core/kmod-setup.c +@@ -11,6 +11,7 @@ + #include "kmod-setup.h" + #include "macro.h" + #include "string-util.h" ++#include "missing.h" + + #if HAVE_KMOD + #include <libkmod.h> +diff --git a/src/core/service.c b/src/core/service.c +index 0289990..0e725b5 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -42,6 +42,7 @@ + #include "unit.h" + #include "utf8.h" + #include "util.h" ++#include "missing.h" + + static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { + [SERVICE_DEAD] = UNIT_INACTIVE, +diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c +index 0048909..0e85eb7 100644 +--- a/src/journal/journalctl.c ++++ b/src/journal/journalctl.c +@@ -67,6 +67,7 @@ + #include "tmpfile-util.h" + #include "unit-name.h" + #include "user-util.h" ++#include "missing.h" + + #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) + +diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c +index 427d42f..b050568 100644 +--- a/src/libsystemd/sd-bus/bus-message.c ++++ b/src/libsystemd/sd-bus/bus-message.c +@@ -21,6 +21,7 @@ + #include "strv.h" + #include "time-util.h" + #include "utf8.h" ++#include "missing.h" + + static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); + +diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c +index d9fc256..e9c6932 100644 +--- a/src/libsystemd/sd-bus/bus-objects.c ++++ b/src/libsystemd/sd-bus/bus-objects.c +@@ -13,6 +13,7 @@ + #include "set.h" + #include "string-util.h" + #include "strv.h" ++#include "missing.h" + + static int node_vtable_get_userdata( + sd_bus *bus, +diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c +index 8de0a85..4fd0a2e 100644 +--- a/src/libsystemd/sd-bus/test-bus-benchmark.c ++++ b/src/libsystemd/sd-bus/test-bus-benchmark.c +@@ -14,6 +14,7 @@ + #include "missing_resource.h" + #include "time-util.h" + #include "util.h" ++#include "missing.h" + + #define MAX_SIZE (2*1024*1024) + +diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c +index b8bd181..fe0cae0 100644 +--- a/src/locale/keymap-util.c ++++ b/src/locale/keymap-util.c +@@ -23,6 +23,7 @@ + #include "string-util.h" + #include "strv.h" + #include "tmpfile-util.h" ++#include "missing.h" + + static bool startswith_comma(const char *s, const char *prefix) { + s = startswith(s, prefix); +diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c +index 476cb07..91e28de 100644 +--- a/src/nspawn/nspawn-settings.c ++++ b/src/nspawn/nspawn-settings.c +@@ -16,6 +16,7 @@ + #include "strv.h" + #include "user-util.h" + #include "util.h" ++#include "missing.h" + + Settings *settings_new(void) { + Settings *s; +diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c +index 4b31cb3..989ebf3 100644 +--- a/src/shared/dns-domain.c ++++ b/src/shared/dns-domain.c +@@ -24,6 +24,7 @@ + #include "string-util.h" + #include "strv.h" + #include "utf8.h" ++#include "missing.h" + + int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { + const char *n; +diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c +index 8638cd3..d03774a 100644 +--- a/src/shared/journal-importer.c ++++ b/src/shared/journal-importer.c +@@ -13,6 +13,7 @@ + #include "parse-util.h" + #include "string-util.h" + #include "unaligned.h" ++#include "missing.h" + + enum { + IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ +diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c +index 5fb736f..19cb165 100644 +--- a/src/shared/logs-show.c ++++ b/src/shared/logs-show.c +@@ -38,6 +38,7 @@ + #include "time-util.h" + #include "utf8.h" + #include "util.h" ++#include "missing.h" + + /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ + #define PRINT_LINE_THRESHOLD 3 diff --git a/src/shared/pager.c b/src/shared/pager.c -index bf2597e..fa9e321 100644 +index 2abb0f6..a00c95f 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c -@@ -24,6 +24,7 @@ - #include "string-util.h" +@@ -25,6 +25,7 @@ #include "strv.h" #include "terminal-util.h" + #include "util.h" +#include "missing.h" static pid_t pager_pid = 0; +diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c +index 442fde7..0eb1188 100644 +--- a/src/shared/path-lookup.c ++++ b/src/shared/path-lookup.c +@@ -20,6 +20,7 @@ + #include "tmpfile-util.h" + #include "user-util.h" + #include "util.h" ++#include "missing.h" + + int xdg_user_runtime_dir(char **ret, const char *suffix) { + const char *e; diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c -index 5fa7bd2..9c63b9e 100644 +index 7cb7d8a..8b12b91 100644 --- a/src/shared/uid-range.c +++ b/src/shared/uid-range.c @@ -9,6 +9,7 @@ + #include "sort-util.h" #include "uid-range.h" #include "user-util.h" - #include "util.h" +#include "missing.h" static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { assert(range); +diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c +index abbbc9f..6179b58 100644 +--- a/src/socket-proxy/socket-proxyd.c ++++ b/src/socket-proxy/socket-proxyd.c +@@ -28,6 +28,7 @@ + #include "socket-util.h" + #include "string-util.h" + #include "util.h" ++#include "missing.h" + + #define BUFFER_SIZE (256 * 1024) + +diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c +index 5221742..a05e778 100644 +--- a/src/test/test-hexdecoct.c ++++ b/src/test/test-hexdecoct.c +@@ -6,6 +6,7 @@ + #include "hexdecoct.h" + #include "macro.h" + #include "string-util.h" ++#include "missing.h" + + static void test_hexchar(void) { + assert_se(hexchar(0xa) == 'a'); +diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c +index 7ce1c56..cc19b8e 100644 +--- a/src/udev/udev-builtin-path_id.c ++++ b/src/udev/udev-builtin-path_id.c +@@ -23,6 +23,7 @@ + #include "strv.h" + #include "sysexits.h" + #include "udev-builtin.h" ++#include "missing.h" + + _printf_(2,3) + static void path_prepend(char **path, const char *fmt, ...) { +diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c +index ee87d7c..9aced10 100644 +--- a/src/udev/udev-rules.c ++++ b/src/udev/udev-rules.c +@@ -40,6 +40,7 @@ + #include "udev.h" + #include "user-util.h" + #include "util.h" ++#include "missing.h" + + #define PREALLOC_TOKEN 2048 + #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") -- -2.7.4 +2.11.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch b/poky/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch new file mode 100644 index 000000000..33f482ae9 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0006-network-remove-redunant-link-name-in-message.patch @@ -0,0 +1,41 @@ +From 9e6940858c7dbdd56b297bdf49f58d623e3430b7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> +Date: Tue, 7 May 2019 13:46:55 +0200 +Subject: [PATCH] network: remove redunant link name in message + +Fixes #12454. + +gcc was complaining that the link->ifname argument is NULL. Adding +assert(link->ifname) right before the call has no effect. It seems that +gcc is confused by the fact that log_link_warning_errno() internally +calls log_object(), with link->ifname passed as the object. log_object() +is also a macro and is does a check whether the passed object is NULL. +So we have a check if something is NULL right next an unconditional use +of it where it cannot be NULL. I think it's a bug in gcc. + +Anyway, we don't need to use link->ifname here. log_object() already prepends +the object name to the message. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: backport [https://github.com/systemd/systemd/commit/c98b3545008d8e984ab456dcf79787418fcbfe13] +--- + src/network/networkd-link.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c +index 3e334c8d29..a158c01bbd 100644 +--- a/src/network/networkd-link.c ++++ b/src/network/networkd-link.c +@@ -321,8 +321,7 @@ static int link_enable_ipv6(Link *link) { + + r = sysctl_write_ip_property_boolean(AF_INET6, link->ifname, "disable_ipv6", disabled); + if (r < 0) +- log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m", +- enable_disable(!disabled), link->ifname); ++ log_link_warning_errno(link, r, "Cannot %s IPv6: %m", enable_disable(!disabled)); + else + log_link_info(link, "IPv6 successfully %sd", enable_disable(!disabled)); + +-- +2.21.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch index 765e4767f..aa2b4cbcf 100644 --- a/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch +++ b/poky/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch @@ -16,28 +16,29 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- - src/basic/glob-util.c | 12 +++++++++++- - src/test/test-glob-util.c | 17 +++++++++++++++-- - src/tmpfiles/tmpfiles.c | 9 +++++++++ - 3 files changed, 35 insertions(+), 3 deletions(-) + src/basic/glob-util.c | 13 ++++++++++++- + src/test/test-glob-util.c | 16 ++++++++++++++++ + src/tmpfiles/tmpfiles.c | 10 ++++++++++ + 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c -index 9fac676..962d8b9 100644 +index 32c53f8..ae358d9 100644 --- a/src/basic/glob-util.c +++ b/src/basic/glob-util.c -@@ -10,6 +10,11 @@ - #include "macro.h" +@@ -13,6 +13,12 @@ #include "path-util.h" #include "strv.h" + +/* Don't fail if the standard library + * doesn't provide brace expansion */ +#ifndef GLOB_BRACE +#define GLOB_BRACE 0 +#endif - ++ static void closedir_wrapper(void* v) { (void) closedir(v); -@@ -18,6 +23,7 @@ static void closedir_wrapper(void* v) { + } +@@ -20,6 +26,7 @@ static void closedir_wrapper(void* v) { int safe_glob(const char *path, int flags, glob_t *pglob) { int k; @@ -45,7 +46,7 @@ index 9fac676..962d8b9 100644 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ assert(!(flags & GLOB_ALTDIRFUNC)); -@@ -31,10 +37,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { +@@ -33,10 +40,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { pglob->gl_lstat = lstat; if (!pglob->gl_stat) pglob->gl_stat = stat; @@ -62,26 +63,25 @@ index 9fac676..962d8b9 100644 return -ENOENT; if (k == GLOB_NOSPACE) diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c -index b4f4144..955b3ba 100644 +index b4f4144..f0d474e 100644 --- a/src/test/test-glob-util.c +++ b/src/test/test-glob-util.c -@@ -12,6 +12,11 @@ - #include "macro.h" +@@ -13,6 +13,12 @@ #include "rm-rf.h" #include "tmpfile-util.h" + +/* Don't fail if the standard library + * doesn't provide brace expansion */ +#ifndef GLOB_BRACE +#define GLOB_BRACE 0 +#endif - ++ static void test_glob_exists(void) { char name[] = "/tmp/test-glob_exists.XXXXXX"; -@@ -38,25 +43,33 @@ static void closedir_wrapper(void* v) { - static void test_glob_no_dot(void) { - char template[] = "/tmp/test-glob-util.XXXXXXX"; + int fd = -1; +@@ -40,11 +46,13 @@ static void test_glob_no_dot(void) { const char *fn; -- + _cleanup_globfree_ glob_t g = { +#ifdef GLOB_ALTDIRFUNC .gl_closedir = closedir_wrapper, @@ -91,9 +91,9 @@ index b4f4144..955b3ba 100644 .gl_stat = stat, +#endif }; -- - int r; + int r; +@@ -52,11 +60,19 @@ static void test_glob_no_dot(void) { assert_se(mkdtemp(template)); fn = strjoina(template, "/*"); @@ -114,22 +114,23 @@ index b4f4144..955b3ba 100644 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index b66765b..11dbbf4 100644 +index d9d1cc1..477d1e3 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c -@@ -60,6 +60,11 @@ +@@ -63,6 +63,12 @@ #include "umask-util.h" #include "user-util.h" - #include "util.h" + +/* Don't fail if the standard library + * doesn't provide brace expansion */ +#ifndef GLOB_BRACE +#define GLOB_BRACE 0 +#endif - ++ /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates * them in the file system. This is intended to be used to create -@@ -1853,7 +1858,9 @@ finish: + * properly owned directories beneath /tmp, /var/tmp, /run, which are +@@ -1839,7 +1845,9 @@ finish: static int glob_item(Item *i, action_t action) { _cleanup_globfree_ glob_t g = { @@ -139,7 +140,7 @@ index b66765b..11dbbf4 100644 }; int r = 0, k; char **fn; -@@ -1873,7 +1880,9 @@ static int glob_item(Item *i, action_t action) { +@@ -1859,7 +1867,9 @@ static int glob_item(Item *i, action_t action) { static int glob_item_recursively(Item *i, fdaction_t action) { _cleanup_globfree_ glob_t g = { @@ -150,5 +151,5 @@ index b66765b..11dbbf4 100644 int r = 0, k; char **fn; -- -2.7.4 +2.11.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/poky/meta/recipes-core/systemd/systemd/0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch deleted file mode 100644 index 57cb5f373..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 6a2cadd6b70cb40ac74fc0d0f8557b914bd38ac2 Mon Sep 17 00:00:00 2001 -From: Chen Qi <Qi.Chen@windriver.com> -Date: Mon, 2 Jul 2018 13:22:41 +0800 -Subject: [PATCH 09/24] socket-util: don't fail if libc doesn't support IDN - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Emil Renner Berthing <systemd@esmil.dk> -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/basic/socket-util.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c -index 91bf801..c445fea 100644 ---- a/src/basic/socket-util.c -+++ b/src/basic/socket-util.c -@@ -33,6 +33,16 @@ - #include "utf8.h" - #include "util.h" - -+/* Don't fail if the standard library -+ * doesn't support IDN */ -+#ifndef NI_IDN -+#define NI_IDN 0 -+#endif -+ -+#ifndef NI_IDN_USE_STD3_ASCII_RULES -+#define NI_IDN_USE_STD3_ASCII_RULES 0 -+#endif -+ - #if ENABLE_IDN - # define IDN_FLAGS NI_IDN - #else --- -2.7.4 - diff --git a/poky/meta/recipes-core/systemd/systemd/0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch b/poky/meta/recipes-core/systemd/systemd/0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch deleted file mode 100644 index 874c17c42..000000000 --- a/poky/meta/recipes-core/systemd/systemd/0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e5a48f84db58ffb9128383eaefc123b5829523e5 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 23 Oct 2017 12:33:22 -0700 -Subject: [PATCH 13/24] test-hexdecoct.c: Include missing.h for strndupa - -Upstream-Status: Inappropriate [musl specific] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/test/test-hexdecoct.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c -index 5221742..a05e778 100644 ---- a/src/test/test-hexdecoct.c -+++ b/src/test/test-hexdecoct.c -@@ -6,6 +6,7 @@ - #include "hexdecoct.h" - #include "macro.h" - #include "string-util.h" -+#include "missing.h" - - static void test_hexchar(void) { - assert_se(hexchar(0xa) == 'a'); --- -2.7.4 - diff --git a/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index 05e6ded71..b54635e8a 100644 --- a/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/poky/meta/recipes-core/systemd/systemd/0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch @@ -22,10 +22,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index aec2daf..7b4aabf 100644 +index f773eea..79af915 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c -@@ -1538,7 +1538,7 @@ int set_oom_score_adjust(int value) { +@@ -1546,7 +1546,7 @@ int set_oom_score_adjust(int value) { sprintf(t, "%i", value); return write_string_file("/proc/self/oom_score_adj", t, @@ -33,7 +33,8 @@ index aec2daf..7b4aabf 100644 + WRITE_STRING_FILE_VERIFY_ON_FAILURE); } - static const char *const ioprio_class_table[] = { + int cpus_in_affinity_mask(void) { -- -2.7.4 +2.11.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch b/poky/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch index a8c53c931..cdddf8389 100644 --- a/poky/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch +++ b/poky/meta/recipes-core/systemd/systemd/0021-avoid-redefinition-of-prctl_mm_map-structure.patch @@ -11,8 +11,7 @@ Upstream-Status: Inappropriate [musl specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- src/basic/missing_prctl.h | 2 ++ - src/basic/util.h | 3 ++- - 2 files changed, 4 insertions(+), 1 deletion(-) + 1 file changed, 2 insertions(+) diff --git a/src/basic/missing_prctl.h b/src/basic/missing_prctl.h index f80cd17..47e4893 100644 @@ -28,20 +27,6 @@ index f80cd17..47e4893 100644 /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ #ifndef PR_CAP_AMBIENT -diff --git a/src/basic/util.h b/src/basic/util.h -index 2c5dc32..f721184 100644 ---- a/src/basic/util.h -+++ b/src/basic/util.h -@@ -26,7 +26,8 @@ - #include "format-util.h" - #include "macro.h" - #include "time-util.h" --#include "missing.h" -+#include "missing_stdlib.h" -+#include "missing_type.h" - - size_t page_size(void) _pure_; - #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) -- -2.7.4 +2.11.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch b/poky/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch index c2ae2bbb7..0e5629d37 100644 --- a/poky/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch +++ b/poky/meta/recipes-core/systemd/systemd/0024-test-json.c-define-M_PIl.patch @@ -14,11 +14,11 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 1 file changed, 4 insertions(+) diff --git a/src/test/test-json.c b/src/test/test-json.c -index fdf1b4f..fa541f8 100644 +index 9b8a2a9..efc746c 100644 --- a/src/test/test-json.c +++ b/src/test/test-json.c -@@ -10,6 +10,10 @@ - #include "strv.h" +@@ -11,6 +11,10 @@ + #include "tests.h" #include "util.h" +#ifndef M_PIl @@ -29,5 +29,5 @@ index fdf1b4f..fa541f8 100644 unsigned line = 0, column = 0; void *state = NULL; -- -2.7.4 +2.11.0 diff --git a/poky/meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch b/poky/meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch new file mode 100644 index 000000000..bae9d3eaa --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0025-fs-utilh-add-missing-sys-stat-include.patch @@ -0,0 +1,30 @@ +From 2560a6b7b9adc5bd5dec0f87c2e3025ced8a2af2 Mon Sep 17 00:00:00 2001 +From: Andrej Valek <andrej.valek@siemens.com> +Date: Thu, 18 Apr 2019 10:47:11 +0200 +Subject: [PATCH] fs-utilh: add missing sys/stat include + +fix error: +| error: passing argument 5 of 'chase_symlinks_and_stat' from incompatible pointer type [-Werror=incompatible-pointer-types] + +Signed-off-by: Andrej Valek <andrej.valek@siemens.com> + +Upstream-Status: Pending +--- + src/basic/fs-util.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h +index b965120..e2fdfff 100644 +--- a/src/basic/fs-util.h ++++ b/src/basic/fs-util.h +@@ -8,6 +8,7 @@ + #include <stdint.h> + #include <sys/inotify.h> + #include <sys/types.h> ++#include <sys/stat.h> + #include <unistd.h> + + #include "errno-util.h" +-- +2.11.0 + diff --git a/poky/meta/recipes-core/systemd/systemd/99-default.preset b/poky/meta/recipes-core/systemd/systemd/99-default.preset new file mode 100644 index 000000000..1f29b5059 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/99-default.preset @@ -0,0 +1 @@ +disable * diff --git a/poky/meta/recipes-core/systemd/systemd_241.bb b/poky/meta/recipes-core/systemd/systemd_242.bb index bfbfc8133..20714fc70 100644 --- a/poky/meta/recipes-core/systemd/systemd_241.bb +++ b/poky/meta/recipes-core/systemd/systemd_242.bb @@ -22,8 +22,8 @@ SRC_URI += "file://touchscreen.rules \ file://0003-implment-systemd-sysv-install-for-OE.patch \ file://0004-rules-whitelist-hd-devices.patch \ file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ - file://0001-meson-declare-version.h-as-dep-for-various-targets-t.patch \ - file://0001-meson-declare-version.h-as-dependency-for-systemd.patch \ + file://0006-network-remove-redunant-link-name-in-message.patch \ + file://99-default.preset \ " # patches needed by musl @@ -36,11 +36,9 @@ SRC_URI_MUSL = "file://0001-Use-getenv-when-secure-versions-are-not-available.pa file://0006-Include-netinet-if_ether.h.patch \ file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \ file://0008-add-missing-FTW_-macros-for-musl.patch \ - file://0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \ file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ file://0011-Use-uintmax_t-for-handling-rlim_t.patch \ file://0012-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \ - file://0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch \ file://0014-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ file://0015-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ file://0016-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ @@ -52,6 +50,7 @@ SRC_URI_MUSL = "file://0001-Use-getenv-when-secure-versions-are-not-available.pa file://0022-include-sys-wait.h-to-avoid-compile-failure.patch \ file://0023-socket-util.h-include-string.h.patch \ file://0024-test-json.c-define-M_PIl.patch \ + file://0025-fs-utilh-add-missing-sys-stat-include.patch \ file://0001-do-not-disable-buffer-in-writing-files.patch \ " @@ -68,10 +67,10 @@ PACKAGECONFIG ??= " \ acl \ backlight \ binfmt \ - firstboot \ gshadow \ hibernate \ hostnamed \ + idn \ ima \ kmod \ localed \ @@ -96,6 +95,7 @@ PACKAGECONFIG ??= " \ PACKAGECONFIG_remove_libc-musl = " \ gshadow \ + idn \ localed \ myhostname \ nss \ @@ -117,6 +117,7 @@ PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" +PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid" PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup" PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" @@ -129,6 +130,7 @@ PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" +PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" # importd requires curl/xz/zlib/bzip2/gcrypt PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" @@ -144,7 +146,7 @@ PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4" PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd" -PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false" +PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false" PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false" @@ -193,6 +195,7 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \ -Drootlibdir=${rootlibdir} \ -Drootprefix=${rootprefix} \ -Dsysvrcnd-path=${sysconfdir} \ + -Ddefault-locale=C \ " # Hardcode target binary paths to avoid using paths from sysroot @@ -277,17 +280,13 @@ do_install() { fi fi - # conf files are handled by systemd-conf - rm -f ${D}${sysconfdir}/machine-id - rm -f ${D}${sysconfdir}/systemd/coredump.conf - rm -f ${D}${sysconfdir}/systemd/journald.conf - rm -f ${D}${sysconfdir}/systemd/logind.conf - rm -f ${D}${sysconfdir}/systemd/system.conf - rm -f ${D}${sysconfdir}/systemd/user.conf - # duplicate udevadm for postinst script install -d ${D}${libexecdir} ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm + + # install default policy for presets + # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto + install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset } @@ -406,12 +405,15 @@ SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket" FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ + ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ ${base_bindir}/machinectl \ ${bindir}/systemd-nspawn \ ${nonarch_libdir}/systemd/import-pubring.gpg \ ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \ ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \ ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \ + ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \ + ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \ ${systemd_system_unitdir}/machine.slice \ ${systemd_system_unitdir}/machines.target \ ${systemd_system_unitdir}/org.freedesktop.import1.busname \ @@ -483,6 +485,15 @@ FILES_${PN}-extra-utils = "\ ${rootlibexecdir}/systemd/systemd-cgroups-agent \ " +CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \ + ${sysconfdir}/systemd/journald.conf \ + ${sysconfdir}/systemd/logind.conf \ + ${sysconfdir}/systemd/system.conf \ + ${sysconfdir}/systemd/user.conf \ + ${sysconfdir}/systemd/resolved.conf \ + ${sysconfdir}/systemd/timesyncd.conf \ +" + FILES_${PN} = " ${base_bindir}/* \ ${base_sbindir}/shutdown \ ${base_sbindir}/halt \ @@ -546,13 +557,14 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ $ RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck" RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" -RDEPENDS_${PN} += "volatile-binds update-rc.d systemd-conf" +RDEPENDS_${PN} += "volatile-binds update-rc.d" RRECOMMENDS_${PN} += "systemd-extra-utils \ systemd-compat-units udev-hwdb \ e2fsprogs-e2fsck \ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ os-release \ + systemd-conf \ " INSANE_SKIP_${PN} += "dev-so libdir" @@ -566,6 +578,7 @@ RPROVIDES_udev = "hotplug" RDEPENDS_udev-hwdb += "udev" FILES_udev += "${base_sbindir}/udevd \ + ${rootlibexecdir}/systemd/network/99-default.link \ ${rootlibexecdir}/systemd/systemd-udevd \ ${rootlibexecdir}/udev/accelerometer \ ${rootlibexecdir}/udev/ata_id \ diff --git a/poky/meta/recipes-core/util-linux/util-linux.inc b/poky/meta/recipes-core/util-linux/util-linux.inc index 18c3af240..34255a2de 100644 --- a/poky/meta/recipes-core/util-linux/util-linux.inc +++ b/poky/meta/recipes-core/util-linux/util-linux.inc @@ -142,7 +142,7 @@ RDEPENDS_${PN}_class-nativesdk = "" RPROVIDES_${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev ${PN}-libuuid-dev" RDEPENDS_${PN}-bash-completion += "${PN}-lsblk" -RDEPENDS_${PN}-ptest = "bash grep coreutils which btrfs-tools ${PN}" +RDEPENDS_${PN}-ptest = "bash grep coreutils which btrfs-tools ${PN} sed" RDEPENDS_${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" ALLOW_EMPTY_${PN}-swaponoff = "1" @@ -284,6 +284,7 @@ ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" BBCLASSEXTEND = "native nativesdk" +PTEST_BINDIR = "1" do_compile_ptest() { oe_runmake buildtest-TESTS } @@ -312,8 +313,8 @@ do_install_ptest() { '/^\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 + # Running "kill" without the the complete path would use the shell's built-in kill sed -i -e \ - '/^TS_CMD_KILL/ s|kill|/bin/kill|g' \ + '/^TS_CMD_KILL/ s|kill|${PTEST_PATH}/bin/kill|g' \ ${D}${PTEST_PATH}/tests/commands.sh } diff --git a/poky/meta/recipes-core/util-linux/util-linux/run-ptest b/poky/meta/recipes-core/util-linux/util-linux/run-ptest index fbc2f9b56..03248325b 100644 --- a/poky/meta/recipes-core/util-linux/util-linux/run-ptest +++ b/poky/meta/recipes-core/util-linux/util-linux/run-ptest @@ -1,5 +1,9 @@ #!/bin/sh +current_path=$(readlink -f $0) +export bindir=$(dirname $current_path) +export PATH=$bindir/bin:$PATH + cd tests || exit 1 comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort) @@ -16,7 +20,7 @@ res=0 count=0 for ts in $comps; do - $ts | sed '{ + $ts | sed -u '{ s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/ |