diff options
Diffstat (limited to 'poky/meta/recipes-core')
55 files changed, 1156 insertions, 2399 deletions
diff --git a/poky/meta/recipes-core/busybox/busybox.inc b/poky/meta/recipes-core/busybox/busybox.inc index 5f1c473d5e..62dc839245 100644 --- a/poky/meta/recipes-core/busybox/busybox.inc +++ b/poky/meta/recipes-core/busybox/busybox.inc @@ -138,19 +138,26 @@ do_configure () { do_prepare_config merge_config.sh -m .config ${@" ".join(find_cfgs(d))} cml1_do_configure + + # Save a copy of .config and autoconf.h. + cp .config .config.orig + cp include/autoconf.h include/autoconf.h.orig } do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS export KCONFIG_NOTIMESTAMP=1 + # Ensure we start do_compile with the original .config and autoconf.h. + # These files should always have matching timestamps. + cp .config.orig .config + cp include/autoconf.h.orig include/autoconf.h + if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep "CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then + # Guard againt interrupted do_compile: clean temporary files. + rm -f .config.app.suid .config.app.nosuid .config.disable.apps .config.nonapps + # split the .config into two parts, and make two busybox binaries - if [ -e .config.orig ]; then - # Need to guard again an interrupted do_compile - restore any backup - cp .config.orig .config - fi - cp .config .config.orig oe_runmake busybox.cfg.suid oe_runmake busybox.cfg.nosuid @@ -187,15 +194,18 @@ do_compile() { bbfatal "busybox suid binary incorrectly provides /bin/sh" fi - # copy .config.orig back to .config, because the install process may check this file - cp .config.orig .config # cleanup - rm .config.orig .config.app.suid .config.app.nosuid .config.disable.apps .config.nonapps + rm .config.app.suid .config.app.nosuid .config.disable.apps .config.nonapps else oe_runmake busybox_unstripped cp busybox_unstripped busybox oe_runmake busybox.links fi + + # restore original .config and autoconf.h, because the install process + # may check these files + cp .config.orig .config + cp include/autoconf.h.orig include/autoconf.h } do_install () { diff --git a/poky/meta/recipes-core/dbus/dbus_1.14.4.bb b/poky/meta/recipes-core/dbus/dbus_1.14.4.bb index cf7f830f16..5f91ec2dc1 100644 --- a/poky/meta/recipes-core/dbus/dbus_1.14.4.bb +++ b/poky/meta/recipes-core/dbus/dbus_1.14.4.bb @@ -183,3 +183,5 @@ do_install:class-nativesdk() { rm -rf ${D}${localstatedir}/run } BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT += "d-bus_project:d-bus" diff --git a/poky/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch b/poky/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch deleted file mode 100644 index 042dccbb94..0000000000 --- a/poky/meta/recipes-core/dropbear/dropbear/0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 64292091fe3e8ea7c9bfe74af730b2ff5428bf10 Mon Sep 17 00:00:00 2001 -From: Matt Johnston <matt@ucc.asn.au> -Date: Sat, 23 Apr 2022 22:33:31 +0800 -Subject: [PATCH] Fix X11 build failure, use DROPBEAR_PRIO_LOWDELAY - -Upstream-Status: Backport - -Signed-off-by: Daniel Gomez <daniel@qtec.com> ---- - svr-x11fwd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/svr-x11fwd.c b/svr-x11fwd.c -index 353cb12..5d9e6a9 100644 ---- a/svr-x11fwd.c -+++ b/svr-x11fwd.c -@@ -206,7 +206,7 @@ void x11cleanup(struct ChanSess *chansess) { - } - - static int x11_inithandler(struct Channel *channel) { -- channel->prio = DROPBEAR_CHANNEL_PRIO_INTERACTIVE; -+ channel->prio = DROPBEAR_PRIO_LOWDELAY; - return 0; - } - --- -2.35.1 - diff --git a/poky/meta/recipes-core/dropbear/dropbear_2022.82.bb b/poky/meta/recipes-core/dropbear/dropbear_2022.83.bb index 4ed4c65cc1..0c7a8f4caa 100644 --- a/poky/meta/recipes-core/dropbear/dropbear_2022.82.bb +++ b/poky/meta/recipes-core/dropbear/dropbear_2022.83.bb @@ -21,9 +21,9 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \ file://dropbear.default \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \ - file://0007-Fix-X11-build-failure-use-DROPBEAR_PRIO_LOWDELAY.patch" + " -SRC_URI[sha256sum] = "3a038d2bbc02bf28bbdd20c012091f741a3ec5cbe460691811d714876aad75d1" +SRC_URI[sha256sum] = "bc5a121ffbc94b5171ad5ebe01be42746d50aa797c9549a4639894a16749443b" PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \ file://0006-dropbear-configuration-file.patch \ diff --git a/poky/meta/recipes-core/ell/ell_0.53.bb b/poky/meta/recipes-core/ell/ell_0.55.bb index 7817476030..7184701e4e 100644 --- a/poky/meta/recipes-core/ell/ell_0.53.bb +++ b/poky/meta/recipes-core/ell/ell_0.55.bb @@ -15,7 +15,7 @@ DEPENDS = "dbus" inherit autotools pkgconfig SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "a7d0df846af839bbea1b80f292166371070328854b3fa785b5c607fe600552ad" +SRC_URI[sha256sum] = "a7e1fd3e13d9083f80eb9787546add49fba5c3d9e9f166b06e2ff9fd8030dc6d" do_configure:prepend () { mkdir -p ${S}/build-aux diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/fix-errno.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/fix-errno.patch new file mode 100644 index 0000000000..144fe8bbd8 --- /dev/null +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/fix-errno.patch @@ -0,0 +1,31 @@ +From 6626765a79f125cf0ec9cdaefa51ceef718d41e7 Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro <mcatanzaro@redhat.com> +Date: Tue, 20 Dec 2022 17:10:41 -0600 +Subject: [PATCH] gthread-posix: need to #include <errno.h> + +a79c6af23eff5ee978db62e048828c9a992a1261 uses errno without the required +header. + + +(cherry picked from commit 03cb4261e00cf505790f4fd4e69f97b2ef4fcccd) + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/6626765a79f125cf0ec9cdaefa51ceef718d41e7] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + glib/gthreadprivate.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h +index 6eaf422753..f34368a7c2 100644 +--- a/glib/gthreadprivate.h ++++ b/glib/gthreadprivate.h +@@ -41,6 +41,7 @@ struct _GRealThread + /* system thread implementation (gthread-posix.c, gthread-win32.c) */ + + #if defined(HAVE_FUTEX) || defined(HAVE_FUTEX_TIME64) ++#include <errno.h> + #include <linux/futex.h> + #include <sys/syscall.h> + #include <unistd.h> +-- +GitLab diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch index 7723ac6672..168dc73290 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch @@ -1,4 +1,4 @@ -From 0da0b608fdbb144c39225233cbdd89995b76904b Mon Sep 17 00:00:00 2001 +From 2adfd458507c8c832955d6ffb9408d6c574b94f6 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@intel.com> Date: Fri, 11 Mar 2016 15:35:55 +0000 Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds @@ -19,7 +19,7 @@ Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gio/giomodule.c b/gio/giomodule.c -index f5dbb4555..c926e77a8 100644 +index f5dbb45..c926e77 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c @@ -58,6 +58,8 @@ diff --git a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.74.1.bb b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.74.4.bb index 8fd785a7fd..e5279e946c 100644 --- a/poky/meta/recipes-core/glib-2.0/glib-2.0_2.74.1.bb +++ b/poky/meta/recipes-core/glib-2.0/glib-2.0_2.74.4.bb @@ -18,10 +18,11 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch \ file://cpp-null.patch \ file://cpp-null2.patch \ + file://fix-errno.patch \ " SRC_URI:append:class-native = " file://relocate-modules.patch" -SRC_URI[sha256sum] = "0ab981618d1db47845e56417b0d7c123f81a3427b2b9c93f5a46ff5bbb964964" +SRC_URI[sha256sum] = "0e82da5ea129b4444227c7e4a9e598f7288d1994bf63f129c44b90cfd2432172" # Find any meson cross files in FILESPATH that are relevant for the current # build (using siteinfo) and add them to EXTRA_OEMESON. diff --git a/poky/meta/recipes-core/glibc/glibc-tests_2.36.bb b/poky/meta/recipes-core/glibc/glibc-tests_2.36.bb index c71c0831c6..bb6ef06162 100644 --- a/poky/meta/recipes-core/glibc/glibc-tests_2.36.bb +++ b/poky/meta/recipes-core/glibc/glibc-tests_2.36.bb @@ -16,7 +16,6 @@ python __anonymous() { d.setVar("PACKAGES", "${PN} ${PN}-ptest") d.setVar("PROVIDES", "${PN} ${PN}-ptest") - d.setVar("RPROVIDES", "${PN} ${PN}-ptest") bbclassextend = d.getVar("BBCLASSEXTEND").replace("nativesdk", "").strip() d.setVar("BBCLASSEXTEND", bbclassextend) @@ -29,6 +28,7 @@ python __anonymous() { RPROVIDES:${PN} = "${PN}" RRECOMMENDS:${PN} = "" RDEPENDS:${PN} = " glibc sed" +RDEPENDS:${PN}-ptest = "${PN}" DEPENDS += "sed" export oe_srcdir="${exec_prefix}/src/debug/glibc/${PV}/" diff --git a/poky/meta/recipes-core/glibc/glibc/0001-Linux-Add-ppoll-fortify-symbol-for-64-bit-time_t-BZ-.patch b/poky/meta/recipes-core/glibc/glibc/0001-Linux-Add-ppoll-fortify-symbol-for-64-bit-time_t-BZ-.patch new file mode 100644 index 0000000000..678dc2af2c --- /dev/null +++ b/poky/meta/recipes-core/glibc/glibc/0001-Linux-Add-ppoll-fortify-symbol-for-64-bit-time_t-BZ-.patch @@ -0,0 +1,528 @@ +From 69318192d16adc7d57adcd69fbbb1e3e107b2783 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Fri, 4 Nov 2022 16:02:52 -0300 +Subject: [PATCH] Linux: Add ppoll fortify symbol for 64 bit time_t (BZ# 29746) + +Similar to ppoll, the poll.h header needs to redirect the poll call +to a proper fortified ppoll with 64 bit time_t support. + +The implementation is straightforward, just need to add a similar +check as __poll_chk and call the 64 bit time_t ppoll version. The +debug fortify tests are also extended to cover 64 bit time_t for +affected ABIs. + +Unfortunately it requires an aditional symbol, which makes backport +tricky. One possibility is to add a static inline version if compiler +supports is and call abort instead of __chk_fail, so fortified version +will call __poll64 in the end. + +Another possibility is to just remove the fortify support for +_TIME_BITS=64. + +Checked on i686-linux-gnu. + +Upstream-Status: Backport + +Signed-off-by: Ola Nilsson <olani@axis.com> +--- + debug/Makefile | 41 ++++++++++++------ + include/sys/poll.h | 5 ++- + io/bits/poll2.h | 25 +++++++++++ + sysdeps/unix/sysv/linux/Versions | 5 +++ + sysdeps/unix/sysv/linux/arm/be/libc.abilist | 1 + + sysdeps/unix/sysv/linux/arm/le/libc.abilist | 1 + + sysdeps/unix/sysv/linux/csky/libc.abilist | 1 + + sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 + + sysdeps/unix/sysv/linux/i386/libc.abilist | 1 + + .../sysv/linux/m68k/coldfire/libc.abilist | 1 + + .../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + + .../sysv/linux/microblaze/be/libc.abilist | 1 + + .../sysv/linux/microblaze/le/libc.abilist | 1 + + .../sysv/linux/mips/mips32/fpu/libc.abilist | 1 + + .../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 + + .../sysv/linux/mips/mips64/n32/libc.abilist | 1 + + sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 + + .../linux/powerpc/powerpc32/fpu/libc.abilist | 1 + + .../powerpc/powerpc32/nofpu/libc.abilist | 1 + + sysdeps/unix/sysv/linux/ppoll.c | 3 +- + sysdeps/unix/sysv/linux/ppoll_chk.c | 42 +++++++++++++++++++ + .../unix/sysv/linux/s390/s390-32/libc.abilist | 1 + + sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 + + sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 + + .../sysv/linux/sparc/sparc32/libc.abilist | 1 + + 25 files changed, 125 insertions(+), 15 deletions(-) + create mode 100644 sysdeps/unix/sysv/linux/ppoll_chk.c + +diff --git a/debug/Makefile b/debug/Makefile +index 456b349c4d..075a135a2b 100644 +--- a/debug/Makefile ++++ b/debug/Makefile +@@ -120,8 +120,10 @@ CPPFLAGS-tst-read-chk-cancel.c += -D_FORTIFY_SOURCE=2 + # CFLAGS for the file. + + tests-all-chk = tst-fortify +-tests-c-chk = +-tests-cc-chk = ++tests-c-def-chk = ++tests-cc-def-chk = ++tests-c-time64-chk = ++tests-cc-time64-chk = + + CFLAGS-tst-fortify.c += -Wno-format -Wno-deprecated-declarations -Wno-error + +@@ -130,11 +132,11 @@ define cflags-default + endef + + define cflags-lfs +-CFLAGS-tst-fortify-$(1)-lfs-$(2).$(1) += -D_FILE_OFFSET_BITS=64 ++CFLAGS-tst-fortify-$(1)-lfs-$(2)-$(3).$(1) += -D_FILE_OFFSET_BITS=64 + endef + + define cflags-nongnu +-CFLAGS-tst-fortify-$(1)-nongnu-$(2).$(1) += -D_LARGEFILE64_SOURCE=1 ++CFLAGS-tst-fortify-$(1)-nongnu-$(2)-$(3).$(1) += -D_LARGEFILE64_SOURCE=1 + endef + + src-chk-nongnu = \#undef _GNU_SOURCE +@@ -145,12 +147,12 @@ src-chk-nongnu = \#undef _GNU_SOURCE + # And they also generate warnings from warning attributes, which + # cannot be disabled via pragmas, so require -Wno-error to be used. + define gen-chk-test +-tests-$(1)-chk += tst-fortify-$(1)-$(2)-$(3) +-CFLAGS-tst-fortify-$(1)-$(2)-$(3).$(1) += -D_FORTIFY_SOURCE=$(3) -Wno-format \ ++tests-$(1)-$(4)-chk += tst-fortify-$(1)-$(2)-$(3)-$(4) ++CFLAGS-tst-fortify-$(1)-$(2)-$(3)-$(4).$(1) += -D_FORTIFY_SOURCE=$(3) -Wno-format \ + -Wno-deprecated-declarations \ + -Wno-error +-$(eval $(call cflags-$(2),$(1),$(3))) +-$(objpfx)tst-fortify-$(1)-$(2)-$(3).$(1): tst-fortify.c Makefile ++$(eval $(call cflags-$(2),$(1),$(3),$(4))) ++$(objpfx)tst-fortify-$(1)-$(2)-$(3)-$(4).$(1): tst-fortify.c Makefile + ( echo "/* Autogenerated from Makefile. */"; \ + echo "$(src-chk-$(2))"; \ + echo "#include \"tst-fortify.c\"" ) > $$@.tmp +@@ -159,19 +161,29 @@ endef + + chk-extensions = c cc + chk-types = default lfs nongnu ++# 64 bit time_t implies LFS. ++chk-types-time64 = default nongnu + chk-levels = 1 2 3 + + $(foreach e,$(chk-extensions), \ + $(foreach t,$(chk-types), \ + $(foreach l,$(chk-levels), \ +- $(eval $(call gen-chk-test,$(e),$(t),$(l)))))) ++ $(eval $(call gen-chk-test,$(e),$(t),$(l),def))))) + +-tests-all-chk += $(tests-c-chk) $(tests-cc-chk) ++tests-all-chk += $(tests-c-def-chk) $(tests-cc-def-chk) ++ ++$(foreach e,$(chk-extensions), \ ++ $(foreach t,$(chk-types-time64), \ ++ $(foreach l,$(chk-levels), \ ++ $(eval $(call gen-chk-test,$(e),$(t),$(l),time64))))) ++ ++tests-all-time64-chk += $(tests-c-time64-chk) $(tests-cc-time64-chk) + + define link-cc + LDLIBS-$(1) = -lstdc++ + endef +-$(foreach t,$(tests-cc-chk), $(eval $(call link-cc,$(t)))) ++$(foreach t,$(tests-cc-def-chk), $(eval $(call link-cc,$(t)))) ++$(foreach t,$(tests-cc-time64-chk), $(eval $(call link-cc,$(t)))) + + # backtrace_symbols only works if we link with -rdynamic. backtrace + # requires unwind tables on most architectures. +@@ -201,6 +213,10 @@ tests = backtrace-tst \ + tst-realpath-chk \ + $(tests-all-chk) + ++tests-time64 += \ ++ $(tests-all-time64-chk) \ ++ # tests-time64 ++ + ifeq ($(have-ssp),yes) + tests += tst-ssp-1 + endif +@@ -210,7 +226,7 @@ tests += tst-read-chk-cancel + endif + + ifeq (,$(CXX)) +-tests-unsupported = $(tests-cc-chk) ++tests-unsupported = $(tests-cc-def-chk) $(test-cc-time64-chk) + endif + + extra-libs = libpcprofile +@@ -235,6 +251,7 @@ define chk-gen-locales + $(objpfx)$(1).out: $(gen-locales) + endef + $(foreach t, $(tests-all-chk), $(eval $(call chk-gen-locales,$(t)))) ++$(foreach t, $(tests-all-time64-chk), $(eval $(call chk-gen-locales,$(t)))) + endif + + sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,') +diff --git a/include/sys/poll.h b/include/sys/poll.h +index f904e21f89..228704fe79 100644 +--- a/include/sys/poll.h ++++ b/include/sys/poll.h +@@ -2,13 +2,16 @@ + # include <io/sys/poll.h> + + #ifndef _ISOMAC ++#include <include/struct___timespec64.h> ++ + extern int __poll (struct pollfd *__fds, unsigned long int __nfds, + int __timeout); + libc_hidden_proto (__poll) + libc_hidden_proto (ppoll) + + # if __TIMESIZE == 64 +-# define __ppoll64 __ppoll ++# define __ppoll64 ppoll ++# define __ppoll64_chk __ppoll_chk + # else + # include <time.h> + # include <signal.h> +diff --git a/io/bits/poll2.h b/io/bits/poll2.h +index 3679d8451a..90f5574969 100644 +--- a/io/bits/poll2.h ++++ b/io/bits/poll2.h +@@ -43,6 +43,30 @@ poll (struct pollfd *__fds, nfds_t __nfds, int __timeout) + + + #ifdef __USE_GNU ++# ifdef __USE_TIME_BITS64 ++extern int __REDIRECT (__ppoll64_alias, (struct pollfd *__fds, nfds_t __nfds, ++ const struct timespec *__timeout, ++ const __sigset_t *__ss), __ppoll64); ++extern int __ppoll64_chk (struct pollfd *__fds, nfds_t __nfds, ++ const struct timespec *__timeout, ++ const __sigset_t *__ss, __SIZE_TYPE__ __fdslen) ++ __attr_access ((__write_only__, 1, 2)); ++extern int __REDIRECT (__ppoll64_chk_warn, (struct pollfd *__fds, nfds_t __n, ++ const struct timespec *__timeout, ++ const __sigset_t *__ss, ++ __SIZE_TYPE__ __fdslen), ++ __ppoll64_chk) ++ __warnattr ("ppoll called with fds buffer too small file nfds entries"); ++ ++__fortify_function __fortified_attr_access (__write_only__, 1, 2) int ++ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, ++ const __sigset_t *__ss) ++{ ++ return __glibc_fortify (ppoll64, __nfds, sizeof (*__fds), ++ __glibc_objsize (__fds), ++ __fds, __nfds, __timeout, __ss); ++} ++# else + extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds, + const struct timespec *__timeout, + const __sigset_t *__ss), ppoll); +@@ -65,6 +89,7 @@ ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, + __glibc_objsize (__fds), + __fds, __nfds, __timeout, __ss); + } ++# endif + #endif + + __END_DECLS +diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions +index 65d2ceda2c..ca6eb1a49e 100644 +--- a/sysdeps/unix/sysv/linux/Versions ++++ b/sysdeps/unix/sysv/linux/Versions +@@ -313,6 +313,11 @@ libc { + process_madvise; + process_mrelease; + } ++ GLIBC_2.37 { ++%ifdef TIME64_NON_DEFAULT ++ __ppoll64_chk; ++%endif ++ } + GLIBC_PRIVATE { + # functions used in other libraries + __syscall_rt_sigqueueinfo; +diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist +index e0668a80cf..f28402fe03 100644 +--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist ++++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist +@@ -513,6 +513,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 _Exit F + GLIBC_2.4 _IO_2_1_stderr_ D 0xa0 + GLIBC_2.4 _IO_2_1_stdin_ D 0xa0 +diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist +index d28e7c60b7..e2f56880ed 100644 +--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist ++++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist +@@ -510,6 +510,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 _Exit F + GLIBC_2.4 _IO_2_1_stderr_ D 0xa0 + GLIBC_2.4 _IO_2_1_stdin_ D 0xa0 +diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist +index 922b05062f..319d92356e 100644 +--- a/sysdeps/unix/sysv/linux/csky/libc.abilist ++++ b/sysdeps/unix/sysv/linux/csky/libc.abilist +@@ -2669,3 +2669,4 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F +diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist +index 412144f94c..6450e17ebe 100644 +--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist ++++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist +@@ -2618,6 +2618,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 __confstr_chk F + GLIBC_2.4 __fgets_chk F + GLIBC_2.4 __fgets_unlocked_chk F +diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist +index 134393900a..0a24ec9afd 100644 +--- a/sysdeps/unix/sysv/linux/i386/libc.abilist ++++ b/sysdeps/unix/sysv/linux/i386/libc.abilist +@@ -2802,6 +2802,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 __confstr_chk F + GLIBC_2.4 __fgets_chk F + GLIBC_2.4 __fgets_unlocked_chk F +diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +index 0604029c68..16243a7a92 100644 +--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist ++++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +@@ -514,6 +514,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 _Exit F + GLIBC_2.4 _IO_2_1_stderr_ D 0x98 + GLIBC_2.4 _IO_2_1_stdin_ D 0x98 +diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +index af2be5c80d..564a553b27 100644 +--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist ++++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +@@ -2745,6 +2745,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 __confstr_chk F + GLIBC_2.4 __fgets_chk F + GLIBC_2.4 __fgets_unlocked_chk F +diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +index e090b8d48f..e850f47b21 100644 +--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist ++++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +@@ -2718,3 +2718,4 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F +diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +index 8c5b2db243..37178c503f 100644 +--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist ++++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +@@ -2715,3 +2715,4 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F +diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +index 68847134a2..3b30b31466 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist ++++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +@@ -2710,6 +2710,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 __confstr_chk F + GLIBC_2.4 __fgets_chk F + GLIBC_2.4 __fgets_unlocked_chk F +diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +index daa44e64fa..0e358570a2 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist ++++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +@@ -2708,6 +2708,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 __confstr_chk F + GLIBC_2.4 __fgets_chk F + GLIBC_2.4 __fgets_unlocked_chk F +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +index 6169188c96..59c598b98f 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +@@ -2716,6 +2716,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 __confstr_chk F + GLIBC_2.4 __fgets_chk F + GLIBC_2.4 __fgets_unlocked_chk F +diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist +index 58e9b486b0..463e01ab84 100644 +--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist ++++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist +@@ -2757,3 +2757,4 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +index 8c9ca32cbe..405d40d11c 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +@@ -2772,6 +2772,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 _IO_fprintf F + GLIBC_2.4 _IO_printf F + GLIBC_2.4 _IO_sprintf F +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +index 08a6604aab..ce89602b93 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +@@ -2805,6 +2805,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 _IO_fprintf F + GLIBC_2.4 _IO_printf F + GLIBC_2.4 _IO_sprintf F +diff --git a/sysdeps/unix/sysv/linux/ppoll.c b/sysdeps/unix/sysv/linux/ppoll.c +index 1105e29b00..2e173b931d 100644 +--- a/sysdeps/unix/sysv/linux/ppoll.c ++++ b/sysdeps/unix/sysv/linux/ppoll.c +@@ -67,7 +67,7 @@ __ppoll64 (struct pollfd *fds, nfds_t nfds, const struct __timespec64 *timeout, + libc_hidden_def (__ppoll64) + + int +-__ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, ++ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, + const sigset_t *sigmask) + { + struct __timespec64 ts64; +@@ -77,5 +77,4 @@ __ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, + return __ppoll64 (fds, nfds, timeout ? &ts64 : NULL, sigmask); + } + #endif +-strong_alias (__ppoll, ppoll) + libc_hidden_def (ppoll) +diff --git a/sysdeps/unix/sysv/linux/ppoll_chk.c b/sysdeps/unix/sysv/linux/ppoll_chk.c +new file mode 100644 +index 0000000000..65c4b56671 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/ppoll_chk.c +@@ -0,0 +1,42 @@ ++/* Fortify ppoll implementation. Linux version. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ <https://www.gnu.org/licenses/>. */ ++ ++#include <poll.h> ++ ++int ++__ppoll64_chk (struct pollfd *fds, nfds_t nfds, ++ const struct __timespec64 *tmo, const __sigset_t *ss, ++ __SIZE_TYPE__ fdslen) ++{ ++ if (fdslen / sizeof (*fds) < nfds) ++ __chk_fail (); ++ ++ return __ppoll64 (fds, nfds, tmo, ss); ++} ++ ++#if __TIMESIZE != 64 ++int ++__ppoll_chk (struct pollfd *fds, nfds_t nfds, const struct timespec *tmo, ++ const __sigset_t *ss, __SIZE_TYPE__ fdslen) ++{ ++ if (fdslen / sizeof (*fds) < nfds) ++ __chk_fail (); ++ ++ return ppoll (fds, nfds, tmo, ss); ++} ++#endif +diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +index 009f22931e..5ca051a9eb 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist ++++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +@@ -2770,6 +2770,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 _IO_fprintf F + GLIBC_2.4 _IO_printf F + GLIBC_2.4 _IO_sprintf F +diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist +index afb5bc37b1..5b48168ec6 100644 +--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist ++++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist +@@ -2625,6 +2625,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 __confstr_chk F + GLIBC_2.4 __fgets_chk F + GLIBC_2.4 __fgets_unlocked_chk F +diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist +index 2b53a3cf92..c42b39cea8 100644 +--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist ++++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist +@@ -2622,6 +2622,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 __confstr_chk F + GLIBC_2.4 __fgets_chk F + GLIBC_2.4 __fgets_unlocked_chk F +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +index 43b9844a99..5a0a662dee 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist ++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +@@ -2765,6 +2765,7 @@ GLIBC_2.36 pidfd_open F + GLIBC_2.36 pidfd_send_signal F + GLIBC_2.36 process_madvise F + GLIBC_2.36 process_mrelease F ++GLIBC_2.37 __ppoll64_chk F + GLIBC_2.4 _IO_fprintf F + GLIBC_2.4 _IO_printf F + GLIBC_2.4 _IO_sprintf F diff --git a/poky/meta/recipes-core/glibc/glibc_2.36.bb b/poky/meta/recipes-core/glibc/glibc_2.36.bb index 45bc784b33..3010f783ac 100644 --- a/poky/meta/recipes-core/glibc/glibc_2.36.bb +++ b/poky/meta/recipes-core/glibc/glibc_2.36.bb @@ -54,6 +54,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0023-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ file://0024-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ file://0025-startup-Force-O2.patch \ + file://0001-Linux-Add-ppoll-fortify-symbol-for-64-bit-time_t-BZ-.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}" 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 f3f2bb2da1..f16b12d20f 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 @@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx" inherit core-image setuptools3 -SRCREV ?= "4f942c272d4417b5b719df25b80a6a6b54669a73" +SRCREV ?= "dc9f64cc66a858c08e462b89ee96c715fc61c971" SRC_URI = "git://git.yoctoproject.org/poky;branch=master \ file://Yocto_Build_Appliance.vmx \ file://Yocto_Build_Appliance.vmxf \ diff --git a/poky/meta/recipes-core/kbd/kbd_2.5.1.bb b/poky/meta/recipes-core/kbd/kbd_2.5.1.bb index aa3ab6e121..7662b8f685 100644 --- a/poky/meta/recipes-core/kbd/kbd_2.5.1.bb +++ b/poky/meta/recipes-core/kbd/kbd_2.5.1.bb @@ -18,6 +18,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \ SRC_URI[sha256sum] = "ccdf452387a6380973d2927363e9cbb939fa2068915a6f937ff9d24522024683" +EXTRA_OECONF = "--disable-tests" PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ " diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.30.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.33.bb index ec9f9f4fa3..ec9f9f4fa3 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.30.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.33.bb diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt.inc b/poky/meta/recipes-core/libxcrypt/libxcrypt.inc index 2bdedcba6d..61b0381076 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt.inc +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt.inc @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSING;md5=c0a30e2b1502c55a7f37e412cd6c6a4b \ inherit autotools pkgconfig SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH};protocol=https" -SRCREV = "fee2687bad66e351a3dcc963a34ae80125923ff8" +SRCREV = "d7fe1ac04c326dba7e0440868889d1dccb41a175" SRCBRANCH ?= "develop" SRC_URI += "file://fix_cflags_handling.patch" diff --git a/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.30.bb b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.33.bb index 79dba2f6dc..79dba2f6dc 100644 --- a/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.30.bb +++ b/poky/meta/recipes-core/libxcrypt/libxcrypt_4.4.33.bb diff --git a/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch deleted file mode 100644 index 6d9ede6194..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch +++ /dev/null @@ -1,86 +0,0 @@ -From ea1993d1d9a18c5e61b9cb271892b0a48f508d32 Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt <pkj@axis.com> -Date: Fri, 9 Jun 2017 17:50:46 +0200 -Subject: [PATCH] Make ptest run the python tests if python is enabled - -One of the tests (tstLastError.py) needed a minor correction. It might -be due to the fact that the tests are forced to run with Python 3. - -Upstream-Status: Inappropriate [OE specific] -Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> ---- - Makefile.am | 2 +- - python/Makefile.am | 9 +++++++++ - python/tests/Makefile.am | 10 ++++++++++ - 3 files changed, 20 insertions(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index b428452b..dc18d6dd 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -203,9 +203,9 @@ install-ptest: - install $(check_PROGRAMS) $(DESTDIR)) - cp -r $(srcdir)/test $(DESTDIR) - cp -r $(srcdir)/result $(DESTDIR) -- cp -r $(srcdir)/python $(DESTDIR) - cp Makefile $(DESTDIR) - sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile -+ $(MAKE) -C python install-ptest - - runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ - testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) -diff --git a/python/Makefile.am b/python/Makefile.am -index 34aed96c..ba3ec6a4 100644 ---- a/python/Makefile.am -+++ b/python/Makefile.am -@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES) - - $(GENERATED): $(srcdir)/generator.py $(API_DESC) - $(PYTHON) $(srcdir)/generator.py $(srcdir) -+ -+install-ptest: -+ cp -r $(srcdir) $(DESTDIR) -+ sed -e 's|^Makefile:|_Makefile:|' \ -+ -e 's|^\(tests test:\) all|\1|' Makefile >$(DESTDIR)/python/Makefile -+ $(MAKE) -C tests install-ptest -+else -+install-ptest: - endif - -+.PHONY: tests test - tests test: all - cd tests && $(MAKE) tests -diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am -index 227e24df..3568c2d2 100644 ---- a/python/tests/Makefile.am -+++ b/python/tests/Makefile.am -@@ -59,6 +59,11 @@ XMLS= \ - CLEANFILES = core tmp.xml *.pyc - - if WITH_PYTHON -+install-ptest: -+ cp -r $(srcdir) $(DESTDIR)/python -+ sed -e 's|^Makefile:|_Makefile:|' \ -+ -e 's|^\(srcdir = \).*|\1.|' Makefile >$(DESTDIR)/python/tests/Makefile -+ - tests: $(PYTESTS) - @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done - @echo "## running Python regression tests" -@@ -70,9 +75,14 @@ tests: $(PYTESTS) - if [ "$$?" -ne 0 ] ; then \ - echo "-- $$test" ; \ - echo "$$log" ; \ -+ echo "FAIL: $$test"; \ - exit 1 ; \ -+ else \ -+ echo "PASS: $$test"; \ - fi ; \ - done) - else -+install-ptest: -+ - tests: - endif --- -2.25.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2/0001-Port-gentest.py-to-Python-3.patch b/poky/meta/recipes-core/libxml/libxml2/0001-Port-gentest.py-to-Python-3.patch deleted file mode 100644 index c6567ac878..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/0001-Port-gentest.py-to-Python-3.patch +++ /dev/null @@ -1,814 +0,0 @@ -From 2c20198b1ddb1bfb47269b8caf929ffb83748f78 Mon Sep 17 00:00:00 2001 -From: Nick Wellnhofer <wellnhofer@aevum.de> -Date: Thu, 21 Apr 2022 00:45:58 +0200 -Subject: [PATCH] Port gentest.py to Python 3 - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/343fc1421cdae097fa6c4cffeb1a065a40be6bbb] - -* fixes: - -make[1]: 'testReader' is up to date. - File "../libxml2-2.9.10/gentest.py", line 11 - print "libxml2 python bindings not available, skipping testapi.c generation" - ^ -SyntaxError: Missing parentheses in call to 'print'. Did you mean print("libxml2 python bindings not available, skipping testapi.c generation")? -make[1]: [Makefile:2078: testapi.c] Error 1 (ignored) - -... - -make[1]: 'testReader' is up to date. - File "../libxml2-2.9.10/gentest.py", line 271 - return 1 - ^ -TabError: inconsistent use of tabs and spaces in indentation -make[1]: [Makefile:2078: testapi.c] Error 1 (ignored) - -... - -aarch64-oe-linux-gcc: error: testapi.c: No such file or directory -aarch64-oe-linux-gcc: fatal error: no input files -compilation terminated. -make[1]: *** [Makefile:1275: testapi.o] Error 1 - -But there is still a bit mystery why it worked before, because check-am -calls gentest.py with $(PYTHON), so it ignores the shebang in the script -and libxml2 is using python3native (through python3targetconfig.bbclass) -so something like: - -libxml2/2.9.10-r0/recipe-sysroot-native/usr/bin/python3-native/python3 gentest.py - -But that still fails (now without SyntaxError) with: -libxml2 python bindings not available, skipping testapi.c generation - -because we don't have dependency on libxml2-native (to provide libxml2 -python bindings form python3native) and exported PYTHON_SITE_PACKAGES -might be useless (e.g. /usr/lib/python3.8/site-packages on Ubuntu-22.10 -which uses python 3.10 and there is no site-packages with libxml2) - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> - ---- - gentest.py | 421 ++++++++++++++++++++++++++--------------------------- - 1 file changed, 209 insertions(+), 212 deletions(-) - -diff --git a/gentest.py b/gentest.py -index b6cd866..af15a4f 100755 ---- a/gentest.py -+++ b/gentest.py -@@ -8,7 +8,7 @@ import string - try: - import libxml2 - except: -- print "libxml2 python bindings not available, skipping testapi.c generation" -+ print("libxml2 python bindings not available, skipping testapi.c generation") - sys.exit(0) - - if len(sys.argv) > 1: -@@ -227,7 +227,7 @@ extra_post_call = { - if (old != NULL) { - xmlUnlinkNode(old); - xmlFreeNode(old) ; old = NULL ; } -- ret_val = NULL;""", -+\t ret_val = NULL;""", - "xmlTextMerge": - """if ((first != NULL) && (first->type != XML_TEXT_NODE)) { - xmlUnlinkNode(second); -@@ -236,7 +236,7 @@ extra_post_call = { - """if ((ret_val != NULL) && (ret_val != ncname) && - (ret_val != prefix) && (ret_val != memory)) - xmlFree(ret_val); -- ret_val = NULL;""", -+\t ret_val = NULL;""", - "xmlNewDocElementContent": - """xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;""", - "xmlDictReference": "xmlDictFree(dict);", -@@ -268,29 +268,29 @@ modules = [] - def is_skipped_module(name): - for mod in skipped_modules: - if mod == name: -- return 1 -+ return 1 - return 0 - - def is_skipped_function(name): - for fun in skipped_functions: - if fun == name: -- return 1 -+ return 1 - # Do not test destructors -- if string.find(name, 'Free') != -1: -+ if name.find('Free') != -1: - return 1 - return 0 - - def is_skipped_memcheck(name): - for fun in skipped_memcheck: - if fun == name: -- return 1 -+ return 1 - return 0 - - missing_types = {} - def add_missing_type(name, func): - try: - list = missing_types[name] -- list.append(func) -+ list.append(func) - except: - missing_types[name] = [func] - -@@ -310,7 +310,7 @@ def add_missing_functions(name, module): - missing_functions_nr = missing_functions_nr + 1 - try: - list = missing_functions[module] -- list.append(name) -+ list.append(name) - except: - missing_functions[module] = [name] - -@@ -319,45 +319,45 @@ def add_missing_functions(name, module): - # - - def type_convert(str, name, info, module, function, pos): --# res = string.replace(str, " ", " ") --# res = string.replace(str, " ", " ") --# res = string.replace(str, " ", " ") -- res = string.replace(str, " *", "_ptr") --# res = string.replace(str, "*", "_ptr") -- res = string.replace(res, " ", "_") -+# res = str.replace(" ", " ") -+# res = str.replace(" ", " ") -+# res = str.replace(" ", " ") -+ res = str.replace(" *", "_ptr") -+# res = str.replace("*", "_ptr") -+ res = res.replace(" ", "_") - if res == 'const_char_ptr': -- if string.find(name, "file") != -1 or \ -- string.find(name, "uri") != -1 or \ -- string.find(name, "URI") != -1 or \ -- string.find(info, "filename") != -1 or \ -- string.find(info, "URI") != -1 or \ -- string.find(info, "URL") != -1: -- if string.find(function, "Save") != -1 or \ -- string.find(function, "Create") != -1 or \ -- string.find(function, "Write") != -1 or \ -- string.find(function, "Fetch") != -1: -- return('fileoutput') -- return('filepath') -+ if name.find("file") != -1 or \ -+ name.find("uri") != -1 or \ -+ name.find("URI") != -1 or \ -+ info.find("filename") != -1 or \ -+ info.find("URI") != -1 or \ -+ info.find("URL") != -1: -+ if function.find("Save") != -1 or \ -+ function.find("Create") != -1 or \ -+ function.find("Write") != -1 or \ -+ function.find("Fetch") != -1: -+ return('fileoutput') -+ return('filepath') - if res == 'void_ptr': - if module == 'nanoftp' and name == 'ctx': -- return('xmlNanoFTPCtxtPtr') -+ return('xmlNanoFTPCtxtPtr') - if function == 'xmlNanoFTPNewCtxt' or \ -- function == 'xmlNanoFTPConnectTo' or \ -- function == 'xmlNanoFTPOpen': -- return('xmlNanoFTPCtxtPtr') -+ function == 'xmlNanoFTPConnectTo' or \ -+ function == 'xmlNanoFTPOpen': -+ return('xmlNanoFTPCtxtPtr') - if module == 'nanohttp' and name == 'ctx': -- return('xmlNanoHTTPCtxtPtr') -- if function == 'xmlNanoHTTPMethod' or \ -- function == 'xmlNanoHTTPMethodRedir' or \ -- function == 'xmlNanoHTTPOpen' or \ -- function == 'xmlNanoHTTPOpenRedir': -- return('xmlNanoHTTPCtxtPtr'); -+ return('xmlNanoHTTPCtxtPtr') -+ if function == 'xmlNanoHTTPMethod' or \ -+ function == 'xmlNanoHTTPMethodRedir' or \ -+ function == 'xmlNanoHTTPOpen' or \ -+ function == 'xmlNanoHTTPOpenRedir': -+ return('xmlNanoHTTPCtxtPtr'); - if function == 'xmlIOHTTPOpen': -- return('xmlNanoHTTPCtxtPtr') -- if string.find(name, "data") != -1: -- return('userdata') -- if string.find(name, "user") != -1: -- return('userdata') -+ return('xmlNanoHTTPCtxtPtr') -+ if name.find("data") != -1: -+ return('userdata') -+ if name.find("user") != -1: -+ return('userdata') - if res == 'xmlDoc_ptr': - res = 'xmlDocPtr' - if res == 'xmlNode_ptr': -@@ -366,18 +366,18 @@ def type_convert(str, name, info, module, function, pos): - res = 'xmlDictPtr' - if res == 'xmlNodePtr' and pos != 0: - if (function == 'xmlAddChild' and pos == 2) or \ -- (function == 'xmlAddChildList' and pos == 2) or \ -+ (function == 'xmlAddChildList' and pos == 2) or \ - (function == 'xmlAddNextSibling' and pos == 2) or \ - (function == 'xmlAddSibling' and pos == 2) or \ - (function == 'xmlDocSetRootElement' and pos == 2) or \ - (function == 'xmlReplaceNode' and pos == 2) or \ - (function == 'xmlTextMerge') or \ -- (function == 'xmlAddPrevSibling' and pos == 2): -- return('xmlNodePtr_in'); -+ (function == 'xmlAddPrevSibling' and pos == 2): -+ return('xmlNodePtr_in'); - if res == 'const xmlBufferPtr': - res = 'xmlBufferPtr' - if res == 'xmlChar_ptr' and name == 'name' and \ -- string.find(function, "EatName") != -1: -+ function.find("EatName") != -1: - return('eaten_name') - if res == 'void_ptr*': - res = 'void_ptr_ptr' -@@ -393,7 +393,7 @@ def type_convert(str, name, info, module, function, pos): - res = 'debug_FILE_ptr'; - if res == 'int' and name == 'options': - if module == 'parser' or module == 'xmlreader': -- res = 'parseroptions' -+ res = 'parseroptions' - - return res - -@@ -402,28 +402,28 @@ known_param_types = [] - def is_known_param_type(name): - for type in known_param_types: - if type == name: -- return 1 -+ return 1 - return name[-3:] == 'Ptr' or name[-4:] == '_ptr' - - def generate_param_type(name, rtype): - global test - for type in known_param_types: - if type == name: -- return -+ return - for type in generated_param_types: - if type == name: -- return -+ return - - if name[-3:] == 'Ptr' or name[-4:] == '_ptr': - if rtype[0:6] == 'const ': -- crtype = rtype[6:] -- else: -- crtype = rtype -+ crtype = rtype[6:] -+ else: -+ crtype = rtype - - define = 0 -- if modules_defines.has_key(module): -- test.write("#ifdef %s\n" % (modules_defines[module])) -- define = 1 -+ if module in modules_defines: -+ test.write("#ifdef %s\n" % (modules_defines[module])) -+ define = 1 - test.write(""" - #define gen_nb_%s 1 - static %s gen_%s(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { -@@ -433,7 +433,7 @@ static void des_%s(int no ATTRIBUTE_UNUSED, %s val ATTRIBUTE_UNUSED, int nr ATTR - } - """ % (name, crtype, name, name, rtype)) - if define == 1: -- test.write("#endif\n\n") -+ test.write("#endif\n\n") - add_generated_param_type(name) - - # -@@ -445,7 +445,7 @@ known_return_types = [] - def is_known_return_type(name): - for type in known_return_types: - if type == name: -- return 1 -+ return 1 - return 0 - - # -@@ -471,7 +471,7 @@ def compare_and_save(): - try: - os.system("rm testapi.c; mv testapi.c.new testapi.c") - except: -- os.system("mv testapi.c.new testapi.c") -+ os.system("mv testapi.c.new testapi.c") - print("Updated testapi.c") - else: - print("Generated testapi.c is identical") -@@ -481,17 +481,17 @@ while line != "": - if line == "/* CUT HERE: everything below that line is generated */\n": - break; - if line[0:15] == "#define gen_nb_": -- type = string.split(line[15:])[0] -- known_param_types.append(type) -+ type = line[15:].split()[0] -+ known_param_types.append(type) - if line[0:19] == "static void desret_": -- type = string.split(line[19:], '(')[0] -- known_return_types.append(type) -+ type = line[19:].split('(')[0] -+ known_return_types.append(type) - test.write(line) - line = input.readline() - input.close() - - if line == "": -- print "Could not find the CUT marker in testapi.c skipping generation" -+ print("Could not find the CUT marker in testapi.c skipping generation") - test.close() - sys.exit(0) - -@@ -505,7 +505,7 @@ test.write("/* CUT HERE: everything below that line is generated */\n") - # - doc = libxml2.readFile(srcPref + 'doc/libxml2-api.xml', None, 0) - if doc == None: -- print "Failed to load doc/libxml2-api.xml" -+ print("Failed to load doc/libxml2-api.xml") - sys.exit(1) - ctxt = doc.xpathNewContext() - -@@ -519,9 +519,9 @@ for arg in args: - mod = arg.xpathEval('string(../@file)') - func = arg.xpathEval('string(../@name)') - if (mod not in skipped_modules) and (func not in skipped_functions): -- type = arg.xpathEval('string(@type)') -- if not argtypes.has_key(type): -- argtypes[type] = func -+ type = arg.xpathEval('string(@type)') -+ if type not in argtypes: -+ argtypes[type] = func - - # similarly for return types - rettypes = {} -@@ -531,8 +531,8 @@ for ret in rets: - func = ret.xpathEval('string(../@name)') - if (mod not in skipped_modules) and (func not in skipped_functions): - type = ret.xpathEval('string(@type)') -- if not rettypes.has_key(type): -- rettypes[type] = func -+ if type not in rettypes: -+ rettypes[type] = func - - # - # Generate constructors and return type handling for all enums -@@ -549,49 +549,49 @@ for enum in enums: - continue; - define = 0 - -- if argtypes.has_key(name) and is_known_param_type(name) == 0: -- values = ctxt.xpathEval("/api/symbols/enum[@type='%s']" % name) -- i = 0 -- vals = [] -- for value in values: -- vname = value.xpathEval('string(@name)') -- if vname == None: -- continue; -- i = i + 1 -- if i >= 5: -- break; -- vals.append(vname) -- if vals == []: -- print "Didn't find any value for enum %s" % (name) -- continue -- if modules_defines.has_key(module): -- test.write("#ifdef %s\n" % (modules_defines[module])) -- define = 1 -- test.write("#define gen_nb_%s %d\n" % (name, len(vals))) -- test.write("""static %s gen_%s(int no, int nr ATTRIBUTE_UNUSED) {\n""" % -- (name, name)) -- i = 1 -- for value in vals: -- test.write(" if (no == %d) return(%s);\n" % (i, value)) -- i = i + 1 -- test.write(""" return(0); -+ if (name in argtypes) and is_known_param_type(name) == 0: -+ values = ctxt.xpathEval("/api/symbols/enum[@type='%s']" % name) -+ i = 0 -+ vals = [] -+ for value in values: -+ vname = value.xpathEval('string(@name)') -+ if vname == None: -+ continue; -+ i = i + 1 -+ if i >= 5: -+ break; -+ vals.append(vname) -+ if vals == []: -+ print("Didn't find any value for enum %s" % (name)) -+ continue -+ if module in modules_defines: -+ test.write("#ifdef %s\n" % (modules_defines[module])) -+ define = 1 -+ test.write("#define gen_nb_%s %d\n" % (name, len(vals))) -+ test.write("""static %s gen_%s(int no, int nr ATTRIBUTE_UNUSED) {\n""" % -+ (name, name)) -+ i = 1 -+ for value in vals: -+ test.write(" if (no == %d) return(%s);\n" % (i, value)) -+ i = i + 1 -+ test.write(""" return(0); - } - - static void des_%s(int no ATTRIBUTE_UNUSED, %s val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) { - } - - """ % (name, name)); -- known_param_types.append(name) -+ known_param_types.append(name) - - if (is_known_return_type(name) == 0) and (name in rettypes): -- if define == 0 and modules_defines.has_key(module): -- test.write("#ifdef %s\n" % (modules_defines[module])) -- define = 1 -+ if define == 0 and (module in modules_defines): -+ test.write("#ifdef %s\n" % (modules_defines[module])) -+ define = 1 - test.write("""static void desret_%s(%s val ATTRIBUTE_UNUSED) { - } - - """ % (name, name)) -- known_return_types.append(name) -+ known_return_types.append(name) - if define == 1: - test.write("#endif\n\n") - -@@ -615,9 +615,9 @@ for file in headers: - # do not test deprecated APIs - # - desc = file.xpathEval('string(description)') -- if string.find(desc, 'DEPRECATED') != -1: -- print "Skipping deprecated interface %s" % name -- continue; -+ if desc.find('DEPRECATED') != -1: -+ print("Skipping deprecated interface %s" % name) -+ continue; - - test.write("#include <libxml/%s.h>\n" % name) - modules.append(name) -@@ -679,7 +679,7 @@ def generate_test(module, node): - # and store the information for the generation - # - try: -- args = node.xpathEval("arg") -+ args = node.xpathEval("arg") - except: - args = [] - t_args = [] -@@ -687,37 +687,37 @@ def generate_test(module, node): - for arg in args: - n = n + 1 - rtype = arg.xpathEval("string(@type)") -- if rtype == 'void': -- break; -- info = arg.xpathEval("string(@info)") -- nam = arg.xpathEval("string(@name)") -+ if rtype == 'void': -+ break; -+ info = arg.xpathEval("string(@info)") -+ nam = arg.xpathEval("string(@name)") - type = type_convert(rtype, nam, info, module, name, n) -- if is_known_param_type(type) == 0: -- add_missing_type(type, name); -- no_gen = 1 -+ if is_known_param_type(type) == 0: -+ add_missing_type(type, name); -+ no_gen = 1 - if (type[-3:] == 'Ptr' or type[-4:] == '_ptr') and \ -- rtype[0:6] == 'const ': -- crtype = rtype[6:] -- else: -- crtype = rtype -- t_args.append((nam, type, rtype, crtype, info)) -+ rtype[0:6] == 'const ': -+ crtype = rtype[6:] -+ else: -+ crtype = rtype -+ t_args.append((nam, type, rtype, crtype, info)) - - try: -- rets = node.xpathEval("return") -+ rets = node.xpathEval("return") - except: - rets = [] - t_ret = None - for ret in rets: - rtype = ret.xpathEval("string(@type)") -- info = ret.xpathEval("string(@info)") -+ info = ret.xpathEval("string(@info)") - type = type_convert(rtype, 'return', info, module, name, 0) -- if rtype == 'void': -- break -- if is_known_return_type(type) == 0: -- add_missing_type(type, name); -- no_gen = 1 -- t_ret = (type, rtype, info) -- break -+ if rtype == 'void': -+ break -+ if is_known_return_type(type) == 0: -+ add_missing_type(type, name); -+ no_gen = 1 -+ t_ret = (type, rtype, info) -+ break - - if no_gen == 0: - for t_arg in t_args: -@@ -733,7 +733,7 @@ test_%s(void) { - - if no_gen == 1: - add_missing_functions(name, module) -- test.write(""" -+ test.write(""" - /* missing type support */ - return(test_ret); - } -@@ -742,22 +742,22 @@ test_%s(void) { - return - - try: -- conds = node.xpathEval("cond") -- for cond in conds: -- test.write("#if %s\n" % (cond.get_content())) -- nb_cond = nb_cond + 1 -+ conds = node.xpathEval("cond") -+ for cond in conds: -+ test.write("#if %s\n" % (cond.get_content())) -+ nb_cond = nb_cond + 1 - except: - pass - - define = 0 -- if function_defines.has_key(name): -+ if name in function_defines: - test.write("#ifdef %s\n" % (function_defines[name])) -- define = 1 -+ define = 1 - - # Declare the memory usage counter - no_mem = is_skipped_memcheck(name) - if no_mem == 0: -- test.write(" int mem_base;\n"); -+ test.write(" int mem_base;\n"); - - # Declare the return value - if t_ret != None: -@@ -766,29 +766,29 @@ test_%s(void) { - # Declare the arguments - for arg in t_args: - (nam, type, rtype, crtype, info) = arg; -- # add declaration -- test.write(" %s %s; /* %s */\n" % (crtype, nam, info)) -- test.write(" int n_%s;\n" % (nam)) -+ # add declaration -+ test.write(" %s %s; /* %s */\n" % (crtype, nam, info)) -+ test.write(" int n_%s;\n" % (nam)) - test.write("\n") - - # Cascade loop on of each argument list of values - for arg in t_args: - (nam, type, rtype, crtype, info) = arg; -- # -- test.write(" for (n_%s = 0;n_%s < gen_nb_%s;n_%s++) {\n" % ( -- nam, nam, type, nam)) -+ # -+ test.write(" for (n_%s = 0;n_%s < gen_nb_%s;n_%s++) {\n" % ( -+ nam, nam, type, nam)) - - # log the memory usage - if no_mem == 0: -- test.write(" mem_base = xmlMemBlocks();\n"); -+ test.write(" mem_base = xmlMemBlocks();\n"); - - # prepare the call - i = 0; - for arg in t_args: - (nam, type, rtype, crtype, info) = arg; -- # -- test.write(" %s = gen_%s(n_%s, %d);\n" % (nam, type, nam, i)) -- i = i + 1; -+ # -+ test.write(" %s = gen_%s(n_%s, %d);\n" % (nam, type, nam, i)) -+ i = i + 1; - - # add checks to avoid out-of-bounds array access - i = 0; -@@ -797,7 +797,7 @@ test_%s(void) { - # assume that "size", "len", and "start" parameters apply to either - # the nearest preceding or following char pointer - if type == "int" and (nam == "size" or nam == "len" or nam == "start"): -- for j in range(i - 1, -1, -1) + range(i + 1, len(t_args)): -+ for j in (*range(i - 1, -1, -1), *range(i + 1, len(t_args))): - (bnam, btype) = t_args[j][:2] - if btype == "const_char_ptr" or btype == "const_xmlChar_ptr": - test.write( -@@ -806,42 +806,42 @@ test_%s(void) { - " continue;\n" - % (bnam, nam, bnam)) - break -- i = i + 1; -+ i = i + 1; - - # do the call, and clanup the result -- if extra_pre_call.has_key(name): -- test.write(" %s\n"% (extra_pre_call[name])) -+ if name in extra_pre_call: -+ test.write(" %s\n"% (extra_pre_call[name])) - if t_ret != None: -- test.write("\n ret_val = %s(" % (name)) -- need = 0 -- for arg in t_args: -- (nam, type, rtype, crtype, info) = arg -- if need: -- test.write(", ") -- else: -- need = 1 -- if rtype != crtype: -- test.write("(%s)" % rtype) -- test.write("%s" % nam); -- test.write(");\n") -- if extra_post_call.has_key(name): -- test.write(" %s\n"% (extra_post_call[name])) -- test.write(" desret_%s(ret_val);\n" % t_ret[0]) -+ test.write("\n ret_val = %s(" % (name)) -+ need = 0 -+ for arg in t_args: -+ (nam, type, rtype, crtype, info) = arg -+ if need: -+ test.write(", ") -+ else: -+ need = 1 -+ if rtype != crtype: -+ test.write("(%s)" % rtype) -+ test.write("%s" % nam); -+ test.write(");\n") -+ if name in extra_post_call: -+ test.write(" %s\n"% (extra_post_call[name])) -+ test.write(" desret_%s(ret_val);\n" % t_ret[0]) - else: -- test.write("\n %s(" % (name)); -- need = 0; -- for arg in t_args: -- (nam, type, rtype, crtype, info) = arg; -- if need: -- test.write(", ") -- else: -- need = 1 -- if rtype != crtype: -- test.write("(%s)" % rtype) -- test.write("%s" % nam) -- test.write(");\n") -- if extra_post_call.has_key(name): -- test.write(" %s\n"% (extra_post_call[name])) -+ test.write("\n %s(" % (name)); -+ need = 0; -+ for arg in t_args: -+ (nam, type, rtype, crtype, info) = arg; -+ if need: -+ test.write(", ") -+ else: -+ need = 1 -+ if rtype != crtype: -+ test.write("(%s)" % rtype) -+ test.write("%s" % nam) -+ test.write(");\n") -+ if name in extra_post_call: -+ test.write(" %s\n"% (extra_post_call[name])) - - test.write(" call_tests++;\n"); - -@@ -849,32 +849,32 @@ test_%s(void) { - i = 0; - for arg in t_args: - (nam, type, rtype, crtype, info) = arg; -- # This is a hack to prevent generating a destructor for the -- # 'input' argument in xmlTextReaderSetup. There should be -- # a better, more generic way to do this! -- if string.find(info, 'destroy') == -1: -- test.write(" des_%s(n_%s, " % (type, nam)) -- if rtype != crtype: -- test.write("(%s)" % rtype) -- test.write("%s, %d);\n" % (nam, i)) -- i = i + 1; -+ # This is a hack to prevent generating a destructor for the -+ # 'input' argument in xmlTextReaderSetup. There should be -+ # a better, more generic way to do this! -+ if info.find('destroy') == -1: -+ test.write(" des_%s(n_%s, " % (type, nam)) -+ if rtype != crtype: -+ test.write("(%s)" % rtype) -+ test.write("%s, %d);\n" % (nam, i)) -+ i = i + 1; - - test.write(" xmlResetLastError();\n"); - # Check the memory usage - if no_mem == 0: -- test.write(""" if (mem_base != xmlMemBlocks()) { -+ test.write(""" if (mem_base != xmlMemBlocks()) { - printf("Leak of %%d blocks found in %s", -- xmlMemBlocks() - mem_base); -- test_ret++; -+\t xmlMemBlocks() - mem_base); -+\t test_ret++; - """ % (name)); -- for arg in t_args: -- (nam, type, rtype, crtype, info) = arg; -- test.write(""" printf(" %%d", n_%s);\n""" % (nam)) -- test.write(""" printf("\\n");\n""") -- test.write(" }\n") -+ for arg in t_args: -+ (nam, type, rtype, crtype, info) = arg; -+ test.write(""" printf(" %%d", n_%s);\n""" % (nam)) -+ test.write(""" printf("\\n");\n""") -+ test.write(" }\n") - - for arg in t_args: -- test.write(" }\n") -+ test.write(" }\n") - - test.write(" function_tests++;\n") - # -@@ -882,7 +882,7 @@ test_%s(void) { - # - while nb_cond > 0: - test.write("#endif\n") -- nb_cond = nb_cond -1 -+ nb_cond = nb_cond -1 - if define == 1: - test.write("#endif\n") - -@@ -900,10 +900,10 @@ test_%s(void) { - for module in modules: - # gather all the functions exported by that module - try: -- functions = ctxt.xpathEval("/api/symbols/function[@file='%s']" % (module)) -+ functions = ctxt.xpathEval("/api/symbols/function[@file='%s']" % (module)) - except: -- print "Failed to gather functions from module %s" % (module) -- continue; -+ print("Failed to gather functions from module %s" % (module)) -+ continue; - - # iterate over all functions in the module generating the test - i = 0 -@@ -923,14 +923,14 @@ test_%s(void) { - # iterate over all functions in the module generating the call - for function in functions: - name = function.xpathEval('string(@name)') -- if is_skipped_function(name): -- continue -- test.write(" test_ret += test_%s();\n" % (name)) -+ if is_skipped_function(name): -+ continue -+ test.write(" test_ret += test_%s();\n" % (name)) - - # footer - test.write(""" - if (test_ret != 0) -- printf("Module %s: %%d errors\\n", test_ret); -+\tprintf("Module %s: %%d errors\\n", test_ret); - return(test_ret); - } - """ % (module)) -@@ -948,7 +948,7 @@ test.write(""" return(0); - } - """); - --print "Generated test for %d modules and %d functions" %(len(modules), nb_tests) -+print("Generated test for %d modules and %d functions" %(len(modules), nb_tests)) - - compare_and_save() - -@@ -960,11 +960,8 @@ for missing in missing_types.keys(): - n = len(missing_types[missing]) - missing_list.append((n, missing)) - --def compare_missing(a, b): -- return b[0] - a[0] -- --missing_list.sort(compare_missing) --print "Missing support for %d functions and %d types see missing.lst" % (missing_functions_nr, len(missing_list)) -+missing_list.sort(key=lambda a: a[0]) -+print("Missing support for %d functions and %d types see missing.lst" % (missing_functions_nr, len(missing_list))) - lst = open("missing.lst", "w") - lst.write("Missing support for %d types" % (len(missing_list))) - lst.write("\n") -@@ -974,9 +971,9 @@ for miss in missing_list: - for n in missing_types[miss[1]]: - i = i + 1 - if i > 5: -- lst.write(" ...") -- break -- lst.write(" %s" % (n)) -+ lst.write(" ...") -+ break -+ lst.write(" %s" % (n)) - lst.write("\n") - lst.write("\n") - lst.write("\n") 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 deleted file mode 100644 index ad719d4f5f..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch +++ /dev/null @@ -1,33 +0,0 @@ -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> - -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 - --runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ -- testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) -+runtests: - [ -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/fix-tests.patch b/poky/meta/recipes-core/libxml/libxml2/fix-tests.patch new file mode 100644 index 0000000000..80678efcfe --- /dev/null +++ b/poky/meta/recipes-core/libxml/libxml2/fix-tests.patch @@ -0,0 +1,222 @@ +Backport the following patches to fix the reader2 and runsuite test cases: + +b92768cd tests: Enable "runsuite" test +0ac8c15e python/tests/reader2: use absolute paths everywhere +b9ba5e1d python/tests/reader2: always exit(1) if a test fails + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/python/tests/reader2.py b/python/tests/reader2.py +index 65cecd47..6e6353b4 100755 +--- a/python/tests/reader2.py ++++ b/python/tests/reader2.py +@@ -6,7 +6,6 @@ + import sys + import glob + import os +-import string + import libxml2 + try: + import StringIO +@@ -20,103 +19,104 @@ libxml2.debugMemory(1) + + err = "" + basedir = os.path.dirname(os.path.realpath(__file__)) +-dir_prefix = os.path.join(basedir, "../../test/valid/") ++dir_prefix = os.path.realpath(os.path.join(basedir, "..", "..", "test", "valid")) ++ + # This dictionary reflects the contents of the files + # ../../test/valid/*.xml.err that are not empty, except that + # the file paths in the messages start with ../../test/ + + expect = { + '766956': +-"""../../test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';' ++"""{0}/dtds/766956.dtd:2: parser error : PEReference: expecting ';' + %ä%ent; + ^ +-../../test/valid/dtds/766956.dtd:2: parser error : Content error in the external subset ++{0}/dtds/766956.dtd:2: parser error : Content error in the external subset + %ä%ent; + ^ + Entity: line 1: + value + ^ +-""", ++""".format(dir_prefix), + '781333': +-"""../../test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got ++"""{0}/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got + <a/> + ^ +-../../test/valid/781333.xml:5: element a: validity error : Element a content does not follow the DTD, Expecting more child ++{0}/781333.xml:5: element a: validity error : Element a content does not follow the DTD, Expecting more child + + ^ +-""", ++""".format(dir_prefix), + 'cond_sect2': +-"""../../test/valid/dtds/cond_sect2.dtd:15: parser error : All markup of the conditional section is not in the same entity ++"""{0}/dtds/cond_sect2.dtd:15: parser error : All markup of the conditional section is not in the same entity + %ent; + ^ + Entity: line 1: + ]]> + ^ +-../../test/valid/dtds/cond_sect2.dtd:17: parser error : Content error in the external subset ++{0}/dtds/cond_sect2.dtd:17: parser error : Content error in the external subset + + ^ +-""", ++""".format(dir_prefix), + 'rss': +-"""../../test/valid/rss.xml:177: element rss: validity error : Element rss does not carry attribute version ++"""{0}/rss.xml:177: element rss: validity error : Element rss does not carry attribute version + </rss> + ^ +-""", ++""".format(dir_prefix), + 't8': +-"""../../test/valid/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration ++"""{0}/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration + + %defroot; %defmiddle; %deftest; + ^ + Entity: line 1: + <!ELEMENT root (middle) > + ^ +-../../test/valid/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration ++{0}/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration + + %defroot; %defmiddle; %deftest; + ^ + Entity: line 1: + <!ELEMENT middle (test) > + ^ +-../../test/valid/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration ++{0}/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration + + %defroot; %defmiddle; %deftest; + ^ + Entity: line 1: + <!ELEMENT test (#PCDATA) > + ^ +-""", ++""".format(dir_prefix), + 't8a': +-"""../../test/valid/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration ++"""{0}/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration + + %defroot;%defmiddle;%deftest; + ^ + Entity: line 1: + <!ELEMENT root (middle) > + ^ +-../../test/valid/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration ++{0}/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration + + %defroot;%defmiddle;%deftest; + ^ + Entity: line 1: + <!ELEMENT middle (test) > + ^ +-../../test/valid/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration ++{0}/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration + + %defroot;%defmiddle;%deftest; + ^ + Entity: line 1: + <!ELEMENT test (#PCDATA) > + ^ +-""", ++""".format(dir_prefix), + 'xlink': +-"""../../test/valid/xlink.xml:450: element termdef: validity error : ID dt-arc already defined ++"""{0}/xlink.xml:450: element termdef: validity error : ID dt-arc already defined + <p><termdef id="dt-arc" term="Arc">An <ter + ^ + validity error : attribute def line 199 references an unknown ID "dt-xlg" +-""", ++""".format(dir_prefix), + } + + # Add prefix_dir and extension to the keys +-expect = {"{}{}.xml".format(dir_prefix, key): val for key, val in expect.items()} ++expect = {os.path.join(dir_prefix, key + ".xml"): val for key, val in expect.items()} + + def callback(ctx, str): + global err +@@ -124,11 +124,12 @@ def callback(ctx, str): + libxml2.registerErrorHandler(callback, "") + + parsing_error_files = ["766956", "cond_sect2", "t8", "t8a"] +-expect_parsing_error = ["{}{}.xml".format(dir_prefix, f) for f in parsing_error_files] ++expect_parsing_error = [os.path.join(dir_prefix, f + ".xml") for f in parsing_error_files] + +-valid_files = glob.glob(dir_prefix + "*.x*") ++valid_files = glob.glob(os.path.join(dir_prefix, "*.x*")) + assert valid_files, "found no valid files in '{}'".format(dir_prefix) + valid_files.sort() ++failures = 0 + for file in valid_files: + err = "" + reader = libxml2.newTextReaderFilename(file) +@@ -142,9 +143,15 @@ for file in valid_files: + #sys.exit(1) + if (err): + if not(file in expect and err == expect[file]): ++ failures += 1 + print("Error: ", err) + if file in expect: + print("Expected: ", expect[file]) ++ ++if failures: ++ print("Failed %d tests" % failures) ++ sys.exit(1) ++ + # + # another separate test based on Stephane Bidoul one + # +@@ -337,9 +344,11 @@ while reader.Read() == 1: + if res != expect: + print("test5 failed: unexpected output") + print(res) ++ sys.exit(1) + if err != "": + print("test5 failed: validation error found") + print(err) ++ sys.exit(1) + + # + # cleanup +diff --git a/runsuite.c b/runsuite.c +index 483490a2..a522d24b 100644 +--- a/runsuite.c ++++ b/runsuite.c +@@ -1054,13 +1054,18 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { + old_tests = nb_tests; + old_leaks = nb_leaks; + xsdTest(); +- if ((nb_errors == old_errors) && (nb_leaks == old_leaks)) +- printf("Ran %d tests, no errors\n", nb_tests - old_tests); +- else +- printf("Ran %d tests, %d errors, %d leaks\n", +- nb_tests - old_tests, +- nb_errors - old_errors, +- nb_leaks - old_leaks); ++ printf("Ran %d tests, %d errors, %d leaks\n", ++ nb_tests - old_tests, ++ nb_errors - old_errors, ++ nb_leaks - old_leaks); ++ if (nb_errors - old_errors == 10) { ++ printf("10 errors were expected\n"); ++ nb_errors = old_errors; ++ } else { ++ printf("10 errors were expected, got %d errors\n", ++ nb_errors - old_errors); ++ nb_errors = old_errors + 1; ++ } + old_errors = nb_errors; + old_tests = nb_tests; + old_leaks = nb_leaks; diff --git a/poky/meta/recipes-core/libxml/libxml2/install-tests.patch b/poky/meta/recipes-core/libxml/libxml2/install-tests.patch new file mode 100644 index 0000000000..b770afbeb4 --- /dev/null +++ b/poky/meta/recipes-core/libxml/libxml2/install-tests.patch @@ -0,0 +1,38 @@ +Add a target to install the test suite. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@arm.com> + +From c7809dc6947324ea506a0c2bf132ecd37156f211 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Mon, 5 Dec 2022 17:02:32 +0000 +Subject: [PATCH] add yocto-specific install-ptest target + +--- + Makefile.am | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index 316109b1..15e100be 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -26,6 +26,16 @@ check_PROGRAMS = \ + testlimits \ + testrecurse + ++ptestdir=$(libexecdir) ++install-test-data: $(check_PROGRAMS) ++ install -d $(DESTDIR)$(ptestdir) $(DESTDIR)$(ptestdir)/python/ ++ for T in $(check_PROGRAMS); do \ ++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$T $(DESTDIR)$(ptestdir) ;\ ++ done ++ cp -r $(srcdir)/test $(DESTDIR)$(ptestdir) ++ cp -r $(srcdir)/result $(DESTDIR)$(ptestdir) ++ cp -r $(srcdir)/python/tests $(DESTDIR)$(ptestdir)/python ++ + bin_PROGRAMS = xmllint xmlcatalog + + nodist_bin_SCRIPTS = xml2-config +-- +2.34.1 + 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 cc9da88a29..639c80bd6c 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,26 +1,8 @@ -From 7196bce35954c4b46391cb0139aeb15ed628fa54 Mon Sep 17 00:00:00 2001 -From: Tony Tascioglu <tony.tascioglu@windriver.com> -Date: Fri, 14 May 2021 11:50:35 -0400 -Subject: [PATCH] AM_PATH_XML2 uses xml-config which we disable through +Change the AM_PATH_XML2 macros to use pkg-config instead of xml2-config. -binconfig-disabled.bbclass, so port it to use pkg-config instead. +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/d598d8af0913b6e3d4e61ffa62397a275b669dca] +Signed-off-by: Ross Burton <ross.burton@arm.com> -This cannot be upstreamed, as the original macro supports various -optional arguments which cannot be supported with a direct call -to pkg-config. - -Upstream-Status: Inappropriate [oe-core specific; see above] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -Rebase to 2.9.9 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - -Updated to apply cleanly to v2.9.12 -Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> - -Rebase to 2.9.14 -Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> ---- libxml.m4 | 189 ++---------------------------------------------------- 1 file changed, 5 insertions(+), 184 deletions(-) diff --git a/poky/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch b/poky/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch deleted file mode 100644 index 956ff3f33e..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch +++ /dev/null @@ -1,35 +0,0 @@ -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. - -Upstream-Status: Inappropriate [config] -Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> - -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 -@@ -808,7 +808,8 @@ dnl - - PYTHON_VERSION= - PYTHON_INCLUDES= --PYTHON_SITE_PACKAGES= -+# Allow this to be set externally -+#PYTHON_SITE_PACKAGES= - PYTHON_TESTS= - pythondir= - if test "$with_python" != "no" ; then --- -2.7.4 - diff --git a/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch b/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch deleted file mode 100644 index 66694af388..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/remove-fuzz-from-ptests.patch +++ /dev/null @@ -1,44 +0,0 @@ -From e49a0d4a8f3f725d6f683854e1cad36a3cd02962 Mon Sep 17 00:00:00 2001 -From: Tony Tascioglu <tony.tascioglu@windriver.com> -Date: Wed, 19 May 2021 19:43:56 -0400 -Subject: [PATCH] Remove fuzz testing from executing with ptests. - -Upstream version 2.9.12 introduced new fuzz-testing and a corresponding -folder fuzz. These tests are not required for ptests of this package. - -This patch removes the fuzz testing targets from the Makefile. -Otherwise, running the ptests will fail due to the invalid directory. - -Upstream-Status: Inappropriate [oe specific] -Signed-off-by: Tony Tascioglu <tony.tascioglu@windriver.com> ---- - Makefile.am | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index a9284b95..3d7b344d 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2,9 +2,9 @@ - - ACLOCAL_AMFLAGS = -I m4 - --SUBDIRS = include . doc example fuzz xstc $(PYTHON_SUBDIR) -+SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR) - --DIST_SUBDIRS = include . doc example fuzz python xstc -+DIST_SUBDIRS = include . doc example python xstc - - AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include - -@@ -210,7 +210,6 @@ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ - $(CHECKER) ./runxmlconf$(EXEEXT) - @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \ - $(MAKE) tests ; fi) -- @cd fuzz; $(MAKE) tests - - check: all runtests - --- -2.25.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2/run-ptest b/poky/meta/recipes-core/libxml/libxml2/run-ptest index c313d83263..f252a78f17 100644..100755 --- a/poky/meta/recipes-core/libxml/libxml2/run-ptest +++ b/poky/meta/recipes-core/libxml/libxml2/run-ptest @@ -1,4 +1,20 @@ #!/bin/sh +set -e + export LC_ALL=en_US.UTF-8 -make -k runtests + +# testModule isn't that useful and hard-codes buildtree, so we don't run that +TESTS="runtest runsuite testrecurse testchar testdict testThreads runxmlconf testapi" + +for T in $TESTS; do + echo Running $T + ./$T && echo PASS: $T || echo FAIL: $T +done + +if test -d python/tests; then + cd python/tests + for T in *.py; do + python3 ./$T && echo PASS: $T || echo FAIL: $T + done +fi diff --git a/poky/meta/recipes-core/libxml/libxml2/runtest.patch b/poky/meta/recipes-core/libxml/libxml2/runtest.patch deleted file mode 100644 index 42bb22cfd4..0000000000 --- a/poky/meta/recipes-core/libxml/libxml2/runtest.patch +++ /dev/null @@ -1,849 +0,0 @@ -From 6172ccd1e74bc181f5298f19e240234e12876abe Mon Sep 17 00:00:00 2001 -From: Tony Tascioglu <tony.tascioglu@windriver.com> -Date: Tue, 11 May 2021 11:57:46 -0400 -Subject: [PATCH] Add 'install-ptest' rule. - -Print a standard result line for each test. - -The patch needs a rework according to comments in the merge request. - -Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com> -Signed-off-by: Andrej Valek <andrej.valek@siemens.com> -Upstream-Status: Inappropriate [https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/137] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> -Signed-off-by: Tony Tascioglu <tony.tascioglu@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 05d1671f..ae622745 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -198,6 +198,15 @@ runxmlconf_LDADD= $(LDADDS) - #testOOM_DEPENDENCIES = $(DEPS) - #testOOM_LDADD= $(LDADDS) - -+install-ptest: -+ @(if [ -d .libs ] ; then cd .libs; fi; \ -+ install $(check_PROGRAMS) $(DESTDIR)) -+ cp -r $(srcdir)/test $(DESTDIR) -+ cp -r $(srcdir)/result $(DESTDIR) -+ cp -r $(srcdir)/python $(DESTDIR) -+ cp Makefile $(DESTDIR) -+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile -+ - runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ - testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) - [ -d test ] || $(LN_S) $(srcdir)/test . -diff --git a/runsuite.c b/runsuite.c -index d24b5ec3..f7ff2521 100644 ---- a/runsuite.c -+++ b/runsuite.c -@@ -1147,6 +1147,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { - - if (logfile != NULL) - fclose(logfile); -+ printf("%s: runsuite\n\n", (ret == 0) ? "PASS" : "FAIL"); - return(ret); - } - #else /* !SCHEMAS */ -diff --git a/runtest.c b/runtest.c -index ffa98d04..470f95cb 100644 ---- a/runtest.c -+++ b/runtest.c -@@ -4508,6 +4508,7 @@ launchTests(testDescPtr tst) { - xmlCharEncCloseFunc(ebcdicHandler); - xmlCharEncCloseFunc(eucJpHandler); - -+ printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc); - return(err); - } - -@@ -4588,6 +4589,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { - xmlCleanupParser(); - xmlMemoryDump(); - -+ printf("%s: runtest\n\n", (ret == 0) ? "PASS" : "FAIL"); - return(ret); - } - -diff --git a/runxmlconf.c b/runxmlconf.c -index 70f61017..e882b3a1 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); -+ printf("%s: runxmlconf\n", (ret == 0) ? "PASS" : "FAIL"); - return(ret); - } - -diff --git a/testapi.c b/testapi.c -index ff8b470d..52b51d78 100644 ---- a/testapi.c -+++ b/testapi.c -@@ -1246,49 +1246,91 @@ static int - testlibxml2(void) - { - int test_ret = 0; -- -- test_ret += test_HTMLparser(); -- test_ret += test_HTMLtree(); -- test_ret += test_SAX2(); -- test_ret += test_c14n(); -- test_ret += test_catalog(); -- test_ret += test_chvalid(); -- test_ret += test_debugXML(); -- test_ret += test_dict(); -- test_ret += test_encoding(); -- test_ret += test_entities(); -- test_ret += test_hash(); -- test_ret += test_list(); -- test_ret += test_nanoftp(); -- test_ret += test_nanohttp(); -- test_ret += test_parser(); -- test_ret += test_parserInternals(); -- test_ret += test_pattern(); -- test_ret += test_relaxng(); -- test_ret += test_schemasInternals(); -- test_ret += test_schematron(); -- test_ret += test_tree(); -- test_ret += test_uri(); -- test_ret += test_valid(); -- test_ret += test_xinclude(); -- test_ret += test_xmlIO(); -- test_ret += test_xmlautomata(); -- test_ret += test_xmlerror(); -- test_ret += test_xmlmodule(); -- test_ret += test_xmlreader(); -- test_ret += test_xmlregexp(); -- test_ret += test_xmlsave(); -- test_ret += test_xmlschemas(); -- test_ret += test_xmlschemastypes(); -- test_ret += test_xmlstring(); -- test_ret += test_xmlunicode(); -- test_ret += test_xmlwriter(); -- 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()); -+ printf("%s: HTMLtree\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_SAX2()); -+ printf("%s: SAX2\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_c14n()); -+ printf("%s: c14n\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_catalog()); -+ printf("%s: catalog\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_chvalid()); -+ printf("%s: chvalid\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_debugXML()); -+ printf("%s: debugXML\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_dict()); -+ printf("%s: dict\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_encoding()); -+ printf("%s: encoding\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_entities()); -+ printf("%s: entities\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_hash()); -+ printf("%s: hash\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_list()); -+ printf("%s: list\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_nanoftp()); -+ printf("%s: nanoftp\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_nanohttp()); -+ printf("%s: nanohttp\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_parser()); -+ printf("%s: parser\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_parserInternals()); -+ printf("%s: parserInternals\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_pattern()); -+ printf("%s: pattern\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_relaxng()); -+ printf("%s: relaxng\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_schemasInternals()); -+ printf("%s: schemasInternals\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_schematron()); -+ printf("%s: schematron\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_tree()); -+ printf("%s: tree\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_uri()); -+ printf("%s: uri\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_valid()); -+ printf("%s: valid\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xinclude()); -+ printf("%s: xinclude\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlIO()); -+ printf("%s: xmlIO\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlautomata()); -+ printf("%s: xmlautomata\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlerror()); -+ printf("%s: xmlerror\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlmodule()); -+ printf("%s: xmlmodule\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlreader()); -+ printf("%s: xmlreader\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlregexp()); -+ printf("%s: xmlregexp\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlsave()); -+ printf("%s: xmlsave\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlschemas()); -+ printf("%s: xmlschemas\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlschemastypes()); -+ printf("%s: xmlschemastypes\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlstring()); -+ printf("%s: xmlstring\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlunicode()); -+ printf("%s: xmlunicode\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xmlwriter()); -+ printf("%s: xmlwriter\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xpath()); -+ printf("%s: xpath\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xpathInternals()); -+ printf("%s: xpathInternals\n", (ret == 0) ? "PASS" : "FAIL"); -+ test_ret += (ret = test_xpointer()); -+ printf("%s: xpointer\n", (ret == 0) ? "PASS" : "FAIL"); - - printf("Total: %d functions, %d tests, %d errors\n", - function_tests, call_tests, test_ret); -+ -+ printf("%s: testapi\n\n", (test_ret == 0) ? "PASS" : "FAIL"); - return(test_ret); - } - -diff --git a/testchar.c b/testchar.c -index 6866a175..7bce0132 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'/>"; - --static void testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document, -+static int testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document, - int len, char *data, int forbid1, int forbid2) { - int i; - xmlDocPtr res; -@@ -37,33 +37,41 @@ static void testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document, - res = xmlReadMemory(document, len, "test", NULL, 0); - - if ((i == forbid1) || (i == forbid2)) { -- if ((lastError == 0) || (res != NULL)) -+ if ((lastError == 0) || (res != NULL)) { - fprintf(stderr, - "Failed to detect invalid char for Byte 0x%02X: %c\n", - i, i); -+ return(1); -+ } - } - - else if ((i == '<') || (i == '&')) { -- if ((lastError == 0) || (res != NULL)) -+ if ((lastError == 0) || (res != NULL)) { - fprintf(stderr, - "Failed to detect illegal char %c for Byte 0x%02X\n", i, i); -+ return(1); -+ } - } - else if (((i < 0x20) || (i >= 0x80)) && - (i != 0x9) && (i != 0xA) && (i != 0xD)) { -- if ((lastError != XML_ERR_INVALID_CHAR) && (res != NULL)) -+ if ((lastError != XML_ERR_INVALID_CHAR) && (res != NULL)) { - fprintf(stderr, - "Failed to detect invalid char for Byte 0x%02X\n", i); -+ return(1); -+ } - } - else if (res == NULL) { - fprintf(stderr, - "Failed to parse valid char for Byte 0x%02X : %c\n", i, i); -+ return(1); - } - if (res != NULL) - xmlFreeDoc(res); - } -+ return(0); - } - --static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, -+static int testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, - int len, char *data) { - int i, j; - xmlDocPtr res; -@@ -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)) { -- if ((lastError == 0) || (res != NULL)) -+ if ((lastError == 0) || (res != NULL)) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n", - i, j); -+ return(1); -+ } - } - - /* -@@ -91,10 +101,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, - * bits must be 10 - */ - else if ((i & 0x80) && ((j & 0xC0) != 0x80)) { -- if ((lastError == 0) || (res != NULL)) -+ if ((lastError == 0) || (res != NULL)) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n", - i, j); -+ return(1); -+ } - } - - /* -@@ -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)) { -- if ((lastError == 0) || (res != NULL)) -+ if ((lastError == 0) || (res != NULL)) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n", - i, j); -+ return(1); -+ } - } - - /* -@@ -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) { -- if ((lastError == 0) || (res != NULL)) -+ if ((lastError == 0) || (res != NULL)) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n", - i, j); -+ return(1); -+ } - } - - /* -@@ -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); -+ return(1); - } - if (res != NULL) - xmlFreeDoc(res); - } - } -+ return(0); - } - - /** -@@ -141,9 +159,10 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, - * CDATA in text or in attribute values. - */ - --static void testDocumentRanges(void) { -+static int testDocumentRanges(void) { - xmlParserCtxtPtr ctxt; - char *data; -+ int test_ret = 0; - - /* - * Set up a parsing context using the first document as -@@ -152,7 +171,7 @@ static void testDocumentRanges(void) { - ctxt = xmlNewParserCtxt(); - if (ctxt == NULL) { - fprintf(stderr, "Failed to allocate parser context\n"); -- return; -+ return(1); - } - - printf("testing 1 byte char in document: 1"); -@@ -163,7 +182,7 @@ static void testDocumentRanges(void) { - data[2] = ' '; - data[3] = ' '; - /* test 1 byte injection at beginning of area */ -- testDocumentRangeByte1(ctxt, &document1[0], strlen(document1), -+ test_ret += testDocumentRangeByte1(ctxt, &document1[0], strlen(document1), - data, -1, -1); - printf(" 2"); - fflush(stdout); -@@ -172,7 +191,7 @@ static void testDocumentRanges(void) { - data[2] = ' '; - data[3] = ' '; - /* test 1 byte injection at end of area */ -- testDocumentRangeByte1(ctxt, &document1[0], strlen(document1), -+ test_ret += testDocumentRangeByte1(ctxt, &document1[0], strlen(document1), - data + 3, -1, -1); - - printf(" 3"); -@@ -183,7 +202,7 @@ static void testDocumentRanges(void) { - data[2] = ' '; - data[3] = ' '; - /* test 1 byte injection at beginning of area */ -- testDocumentRangeByte1(ctxt, &document2[0], strlen(document2), -+ test_ret += testDocumentRangeByte1(ctxt, &document2[0], strlen(document2), - data, '\'', -1); - printf(" 4"); - fflush(stdout); -@@ -192,7 +211,7 @@ static void testDocumentRanges(void) { - data[2] = ' '; - data[3] = ' '; - /* test 1 byte injection at end of area */ -- testDocumentRangeByte1(ctxt, &document2[0], strlen(document2), -+ test_ret += testDocumentRangeByte1(ctxt, &document2[0], strlen(document2), - data + 3, '\'', -1); - printf(" done\n"); - -@@ -204,7 +223,7 @@ static void testDocumentRanges(void) { - data[2] = ' '; - data[3] = ' '; - /* test 2 byte injection at beginning of area */ -- testDocumentRangeByte2(ctxt, &document1[0], strlen(document1), -+ test_ret += testDocumentRangeByte2(ctxt, &document1[0], strlen(document1), - data); - printf(" 2"); - fflush(stdout); -@@ -213,7 +232,7 @@ static void testDocumentRanges(void) { - data[2] = ' '; - data[3] = ' '; - /* test 2 byte injection at end of area */ -- testDocumentRangeByte2(ctxt, &document1[0], strlen(document1), -+ test_ret += testDocumentRangeByte2(ctxt, &document1[0], strlen(document1), - data + 2); - - printf(" 3"); -@@ -224,7 +243,7 @@ static void testDocumentRanges(void) { - data[2] = ' '; - data[3] = ' '; - /* test 2 byte injection at beginning of area */ -- testDocumentRangeByte2(ctxt, &document2[0], strlen(document2), -+ test_ret += testDocumentRangeByte2(ctxt, &document2[0], strlen(document2), - data); - printf(" 4"); - fflush(stdout); -@@ -233,14 +252,15 @@ static void testDocumentRanges(void) { - data[2] = ' '; - data[3] = ' '; - /* test 2 byte injection at end of area */ -- testDocumentRangeByte2(ctxt, &document2[0], strlen(document2), -+ test_ret += testDocumentRangeByte2(ctxt, &document2[0], strlen(document2), - data + 2); - printf(" done\n"); - - xmlFreeParserCtxt(ctxt); -+ return(test_ret); - } - --static void testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) { -+static int testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) { - int i = 0; - int len, c; - -@@ -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 */ -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Byte 0x%02X\n", i); -+ return(1); -+ } - } else if (i == 0xD) { -- if ((c != 0xA) || (len != 1)) -+ if ((c != 0xA) || (len != 1)) { - fprintf(stderr, "Failed to convert char for Byte 0x%02X\n", i); -+ return(1); -+ } - } else if ((c != i) || (len != 1)) { - fprintf(stderr, "Failed to parse char for Byte 0x%02X\n", i); -+ return(1); - } - } -+ return(0); - } - --static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { -+static int testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { - int i, j; - int len, c; - -@@ -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)) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n", - i, j); -+ return(1); -+ } - } - - /* -@@ -295,10 +323,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { - * bits must be 10 - */ - else if ((i & 0x80) && ((j & 0xC0) != 0x80)) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n", - i, j, c); -+ return(1); -+ } - } - - /* -@@ -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)) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n", - i, j, c); -+ return(1); -+ } - } - - /* -@@ -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) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n", - i, j); -+ return(1); -+ } - } - - /* -@@ -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); -+ return(1); - } - - /* -@@ -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); -+ return(1); - } - } - } -+ return(0); - } - --static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { -+static int testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { - int i, j, k, K; - int len, c; - unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF}; -@@ -368,20 +405,24 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { - * at least 4 bytes, but we give only 3 ! - */ - if ((i & 0xF0) == 0xF0) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", - i, j, K, data[3]); -+ return(1); -+ } - } - - /* - * The second and the third bytes must start with 10 - */ - else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80)) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n", - i, j, K); -+ return(1); -+ } - } - - /* -@@ -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)) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n", - i, j, K); -+ return(1); -+ } - } - - /* -@@ -401,10 +444,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { - */ - else if (((value > 0xD7FF) && (value <0xE000)) || - ((value > 0xFFFD) && (value <0x10000))) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X\n", - value, i, j, K); -+ return(1); -+ } - } - - /* -@@ -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); -+ return(1); - } - - /* -@@ -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); -+ return(1); - } - } - } - } -+ return(0); - } - --static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { -+static int testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { - int i, j, k, K, l, L; - int len, c; - unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF}; -@@ -458,10 +506,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { - * at least 5 bytes, but we give only 4 ! - */ - if ((i & 0xF8) == 0xF8) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", - i, j, K, data[3]); -+ return(1); -+ } - } - - /* -@@ -469,10 +519,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { - */ - else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80) || - ((L & 0xC0) != 0x80)) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", - i, j, K, L); -+ return(1); -+ } - } - - /* -@@ -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)) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", - i, j, K, L); -+ return(1); -+ } - } - - /* -@@ -493,10 +547,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { - else if (((value > 0xD7FF) && (value <0xE000)) || - ((value > 0xFFFD) && (value <0x10000)) || - (value > 0x10FFFF)) { -- if (lastError != XML_ERR_INVALID_CHAR) -+ if (lastError != XML_ERR_INVALID_CHAR) { - fprintf(stderr, - "Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", - value, i, j, K, L); -+ return(1); -+ } - } - - /* -@@ -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); -+ return(1); - } - - /* -@@ -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); -+ return(1); - } - } - } - } - } -+ return(0); - } - - /** -@@ -530,11 +589,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { - * cover the full range of UTF-8 chars accepted by XML-1.0 - */ - --static void testCharRanges(void) { -+static int testCharRanges(void) { - char data[5]; - xmlParserCtxtPtr ctxt; - xmlParserInputBufferPtr buf; - xmlParserInputPtr input; -+ int test_ret = 0; - - memset(data, 0, 5); - -@@ -545,17 +605,19 @@ static void testCharRanges(void) { - ctxt = xmlNewParserCtxt(); - if (ctxt == NULL) { - fprintf(stderr, "Failed to allocate parser context\n"); -- return; -+ return(1); - } - buf = xmlParserInputBufferCreateStatic(data, sizeof(data), - XML_CHAR_ENCODING_NONE); - if (buf == NULL) { - fprintf(stderr, "Failed to allocate input buffer\n"); -+ test_ret = 1; - goto error; - } - input = xmlNewInputStream(ctxt); - if (input == NULL) { - xmlFreeParserInputBuffer(buf); -+ test_ret = 1; - goto error; - } - input->filename = NULL; -@@ -567,25 +629,28 @@ static void testCharRanges(void) { - - printf("testing char range: 1"); - fflush(stdout); -- testCharRangeByte1(ctxt, data); -+ test_ret += testCharRangeByte1(ctxt, data); - printf(" 2"); - fflush(stdout); -- testCharRangeByte2(ctxt, data); -+ test_ret += testCharRangeByte2(ctxt, data); - printf(" 3"); - fflush(stdout); -- testCharRangeByte3(ctxt, data); -+ test_ret += testCharRangeByte3(ctxt, data); - printf(" 4"); - fflush(stdout); -- testCharRangeByte4(ctxt, data); -+ test_ret += testCharRangeByte4(ctxt, data); - printf(" done\n"); - fflush(stdout); - - error: - xmlFreeParserCtxt(ctxt); -+ return(test_ret); - } - - int main(void) { - -+ int ret = 0; -+ - /* - * this initialize the library and check potential ABI mismatches - * between the version it was compiled for and the actual shared -@@ -602,8 +667,9 @@ int main(void) { - /* - * Run the tests - */ -- testCharRanges(); -- testDocumentRanges(); -+ ret += testCharRanges(); -+ ret += testDocumentRanges(); -+ printf("%s: testchar\n\n", (ret == 0) ? "PASS" : "FAIL"); - - /* - * Cleanup function for the XML library. -diff --git a/testdict.c b/testdict.c -index 40bebd05..114b9347 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 059116a6..f0bee68d 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 --git a/testrecurse.c b/testrecurse.c -index 0cbe25a6..3ecadb40 100644 ---- a/testrecurse.c -+++ b/testrecurse.c -@@ -892,6 +892,7 @@ launchTests(testDescPtr tst) { - err++; - } - } -+ printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc); - return(err); - } - -@@ -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.25.1 - diff --git a/poky/meta/recipes-core/libxml/libxml2_2.9.14.bb b/poky/meta/recipes-core/libxml/libxml2_2.10.3.bb index a2ed8d71bc..6b3dd3ec42 100644 --- a/poky/meta/recipes-core/libxml/libxml2_2.9.14.bb +++ b/poky/meta/recipes-core/libxml/libxml2_2.10.3.bb @@ -13,20 +13,16 @@ DEPENDS = "zlib virtual/libiconv" inherit gnomebase -SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=testtar \ - file://libxml-64bit.patch \ - file://runtest.patch \ +SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ file://run-ptest \ - file://python-sitepackages-dir.patch \ - file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \ - file://fix-execution-of-ptests.patch \ - file://remove-fuzz-from-ptests.patch \ + file://libxml-64bit.patch \ + file://fix-tests.patch \ + file://install-tests.patch \ file://libxml-m4-use-pkgconfig.patch \ - file://0001-Port-gentest.py-to-Python-3.patch \ " -SRC_URI[archive.sha256sum] = "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee" -SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" +SRC_URI[archive.sha256sum] = "5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c" +SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273" BINCONFIG = "${bindir}/xml2-config" @@ -44,7 +40,7 @@ inherit autotools pkgconfig binconfig-disabled ptest inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)} -RDEPENDS:${PN}-ptest += "bash make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" +RDEPENDS:${PN}-ptest += "bash make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" RDEPENDS:${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" @@ -55,13 +51,11 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-ebcdic-us \ locale-base-en-us \ " -export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}" - # WARNING: zlib is required for RPM use -EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions" -EXTRA_OECONF:class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" -EXTRA_OECONF:class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" -EXTRA_OECONF:linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --with-c14n --without-lzma --with-fexceptions" +EXTRA_OECONF:class-native = "--without-legacy --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF:class-nativesdk = "--without-legacy --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF:linuxstdbase = "--with-debug --with-legacy --with-c14n --without-lzma --with-zlib" python populate_packages:prepend () { # autonamer would call this libxml2-2, but we don't want that @@ -73,7 +67,6 @@ PACKAGE_BEFORE_PN += "${PN}-utils" PACKAGES += "${PN}-python" FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" -FILES:${PN}-dev += "${libdir}/xml2Conf.sh" FILES:${PN}-utils = "${bindir}/*" FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" @@ -82,39 +75,14 @@ do_configure:prepend () { find ${S}/xmlconf/ -type f -exec chmod -x {} \+ } -do_compile_ptest() { - # Make sure that testapi.c is newer than gentests.py, because - # with reproducible builds, they will both get e.g. Jan 1 1970 - # modification time from SOURCE_DATE_EPOCH and then check-am - # might try to rebuild_testapi, which will fail even with - # 0001-Port-gentest.py-to-Python-3.patch, because it needs - # libxml2 module (libxml2-native dependency and correctly - # set PYTHON_SITE_PACKAGES), it's easier to - # just rely on pre-generated testapi.c from the release - touch ${S}/testapi.c - - oe_runmake check-am -} - do_install_ptest () { + oe_runmake DESTDIR=${D} ptestdir=${PTEST_PATH} install-test-data + cp -r ${S}/xmlconf ${D}${PTEST_PATH} - if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then - sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \ - ${D}${PTEST_PATH}/python/tests/Makefile - grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python | - xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|' - fi - #Remove build host references from various Makefiles - find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ - sed -i \ - -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - -e 's:${RECIPE_SYSROOT}::g' \ - -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ - -e '/^RELDATE/d' \ - {} + + + if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + rm -rf ${D}${PTEST_DIR}/python + fi } do_install:append:class-native () { diff --git a/poky/meta/recipes-core/meta/cve-update-db-native.bb b/poky/meta/recipes-core/meta/cve-update-db-native.bb index 9b9dbbd75f..079f062f79 100644 --- a/poky/meta/recipes-core/meta/cve-update-db-native.bb +++ b/poky/meta/recipes-core/meta/cve-update-db-native.bb @@ -21,6 +21,8 @@ CVE_DB_UPDATE_INTERVAL ?= "86400" # Timeout for blocking socket operations, such as the connection attempt. CVE_SOCKET_TIMEOUT ?= "60" +CVE_DB_TEMP_FILE ?= "${CVE_CHECK_DB_DIR}/temp_nvdcve_1.1.db" + python () { if not bb.data.inherits_class("cve-check", d): raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.") @@ -32,25 +34,15 @@ python do_fetch() { """ import bb.utils import bb.progress - import sqlite3, urllib, urllib.parse, gzip - from datetime import date + import shutil bb.utils.export_proxies(d) - YEAR_START = 2002 - db_file = d.getVar("CVE_CHECK_DB_FILE") db_dir = os.path.dirname(db_file) + db_tmp_file = d.getVar("CVE_DB_TEMP_FILE") - cve_socket_timeout = int(d.getVar("CVE_SOCKET_TIMEOUT")) - - if os.path.exists("{0}-journal".format(db_file)): - # If a journal is present the last update might have been interrupted. In that case, - # just wipe any leftovers and force the DB to be recreated. - os.remove("{0}-journal".format(db_file)) - - if os.path.exists(db_file): - os.remove(db_file) + cleanup_db_download(db_file, db_tmp_file) # The NVD database changes once a day, so no need to update more frequently # Allow the user to force-update @@ -68,9 +60,60 @@ python do_fetch() { pass bb.utils.mkdirhier(db_dir) + if os.path.exists(db_file): + shutil.copy2(db_file, db_tmp_file) + + if update_db_file(db_tmp_file, d) == True: + # Update downloaded correctly, can swap files + shutil.move(db_tmp_file, db_file) + else: + # Update failed, do not modify the database + bb.note("CVE database update failed") + os.remove(db_tmp_file) +} + +do_fetch[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}" +do_fetch[file-checksums] = "" +do_fetch[vardeps] = "" + +def cleanup_db_download(db_file, db_tmp_file): + """ + Cleanup the download space from possible failed downloads + """ + + # Clean up the updates done on the main file + # Remove it only if a journal file exists - it means a complete re-download + if os.path.exists("{0}-journal".format(db_file)): + # If a journal is present the last update might have been interrupted. In that case, + # just wipe any leftovers and force the DB to be recreated. + os.remove("{0}-journal".format(db_file)) + + if os.path.exists(db_file): + os.remove(db_file) + + # Clean-up the temporary file downloads, we can remove both journal + # and the temporary database + if os.path.exists("{0}-journal".format(db_tmp_file)): + # If a journal is present the last update might have been interrupted. In that case, + # just wipe any leftovers and force the DB to be recreated. + os.remove("{0}-journal".format(db_tmp_file)) + + if os.path.exists(db_tmp_file): + os.remove(db_tmp_file) + +def update_db_file(db_tmp_file, d): + """ + Update the given database file + """ + import bb.utils, bb.progress + from datetime import date + import urllib, gzip, sqlite3 + + YEAR_START = 2002 + cve_socket_timeout = int(d.getVar("CVE_SOCKET_TIMEOUT")) # Connect to database - conn = sqlite3.connect(db_file) + conn = sqlite3.connect(db_tmp_file) initialize_db(conn) with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f: @@ -88,7 +131,7 @@ python do_fetch() { except urllib.error.URLError as e: cve_f.write('Warning: CVE db update error, Unable to fetch CVE data.\n\n') bb.warn("Failed to fetch CVE data (%s)" % e.reason) - return + return False if response: for l in response.read().decode("utf-8").splitlines(): @@ -98,7 +141,7 @@ python do_fetch() { break else: bb.warn("Cannot parse CVE metadata, update failed") - return + return False # Compare with current db last modified date cursor = conn.execute("select DATE from META where YEAR = ?", (year,)) @@ -119,7 +162,7 @@ python do_fetch() { except urllib.error.URLError as e: cve_f.write('Warning: CVE db update error, CVE data is outdated.\n\n') bb.warn("Cannot parse CVE data (%s), update failed" % e.reason) - return + return False else: bb.debug(2, "Already up to date (last modified %s)" % last_modified) # Update success, set the date to cve_check file. @@ -128,11 +171,7 @@ python do_fetch() { conn.commit() conn.close() -} - -do_fetch[lockfiles] += "${CVE_CHECK_DB_FILE_LOCK}" -do_fetch[file-checksums] = "" -do_fetch[vardeps] = "" + return True def initialize_db(conn): with conn: diff --git a/poky/meta/recipes-core/meta/uninative-tarball.bb b/poky/meta/recipes-core/meta/uninative-tarball.bb index a21d08b591..4aecf39b89 100644 --- a/poky/meta/recipes-core/meta/uninative-tarball.bb +++ b/poky/meta/recipes-core/meta/uninative-tarball.bb @@ -20,6 +20,7 @@ TOOLCHAIN_HOST_TASK = "\ nativesdk-libxcrypt-compat \ nativesdk-libnss-nis \ nativesdk-sdk-provides-dummy \ + nativesdk-libgcc \ " INHIBIT_DEFAULT_DEPS = "1" diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb index a72d87ea6f..7749495ec6 100644 --- a/poky/meta/recipes-core/musl/musl_git.bb +++ b/poky/meta/recipes-core/musl/musl_git.bb @@ -4,7 +4,7 @@ require musl.inc inherit linuxloader -SRCREV = "dc9285ad1dc19349c407072cc48ba70dab86de45" +SRCREV = "f47a8cdd250d9163fcfb39bf4e9d813957c0b187" BASEVER = "1.2.3" diff --git a/poky/meta/recipes-core/ncurses/ncurses_6.3+20220423.bb b/poky/meta/recipes-core/ncurses/ncurses_6.3+20220423.bb index ca5fa32572..fb8c11582b 100644 --- a/poky/meta/recipes-core/ncurses/ncurses_6.3+20220423.bb +++ b/poky/meta/recipes-core/ncurses/ncurses_6.3+20220423.bb @@ -10,7 +10,6 @@ SRCREV = "20db1fb41ec91cd8a1f528e770362092c5403378" S = "${WORKDIR}/git" EXTRA_OECONF += "--with-abi-version=5" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)$" -UPSTREAM_VERSION_UNKNOWN = "1" # This is needed when using patchlevel versions like 6.1+20181013 CVE_VERSION = "${@d.getVar("PV").split('+')[0]}.${@d.getVar("PV").split('+')[1]}" diff --git a/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch b/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch index 9e345f4dda..1b6687cfaf 100644 --- a/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch +++ b/poky/meta/recipes-core/ovmf/ovmf/0005-debug-prefix-map.patch @@ -1,7 +1,7 @@ -From 860bb1979f3578bb83257076fe0f3bd33f9d68bf Mon Sep 17 00:00:00 2001 +From 9f28dd5f183f6e4d2b023cd555bb30446ae5f618 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Mon, 14 Jun 2021 19:56:28 +0200 -Subject: [PATCH 5/6] debug prefix map +Subject: [PATCH] debug prefix map We want to pass ${DEBUG_PREFIX_MAP} to gcc commands and also pass in --debug-prefix-map to nasm (we carry a patch to nasm for this). The @@ -22,10 +22,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template -index 36241b6ede..947fbf2e8d 100755 +index c4e4c7ded0..058205da72 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template -@@ -1863,7 +1863,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N +@@ -1849,7 +1849,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N *_*_*_DTCPP_PATH = DEF(DTCPP_BIN)
*_*_*_DTC_PATH = DEF(DTC_BIN)
@@ -34,9 +34,9 @@ index 36241b6ede..947fbf2e8d 100755 DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe
DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
-@@ -1881,8 +1881,8 @@ DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _Ref - DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
+@@ -1871,8 +1871,8 @@ DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,Refere DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
+ DEFINE GCC_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
-DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h
-DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
@@ -45,7 +45,7 @@ index 36241b6ede..947fbf2e8d 100755 DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h
DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h
DEFINE GCC_ASLCC_FLAGS = -x c
-@@ -2027,7 +2027,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A +@@ -2026,7 +2026,7 @@ DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include A *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
*_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC48_IA32_OBJCOPY_FLAGS =
@@ -54,7 +54,7 @@ index 36241b6ede..947fbf2e8d 100755 DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os
RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable
-@@ -2055,7 +2055,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but +@@ -2054,7 +2054,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Os -Wno-unused-but *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
*_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC48_X64_OBJCOPY_FLAGS =
@@ -63,7 +63,7 @@ index 36241b6ede..947fbf2e8d 100755 DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os
RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable
-@@ -2167,7 +2167,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s +@@ -2166,7 +2166,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
*_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC49_IA32_OBJCOPY_FLAGS =
@@ -72,7 +72,7 @@ index 36241b6ede..947fbf2e8d 100755 DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os
RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
-@@ -2195,7 +2195,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but +@@ -2194,7 +2194,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Os -Wno-unused-but *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
*_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC49_X64_OBJCOPY_FLAGS =
@@ -81,7 +81,7 @@ index 36241b6ede..947fbf2e8d 100755 DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os
RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-set-variable -Wno-unused-const-variable
-@@ -2313,7 +2313,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 +@@ -2312,7 +2312,7 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
*_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
*_GCC5_IA32_OBJCOPY_FLAGS =
@@ -90,7 +90,7 @@ index 36241b6ede..947fbf2e8d 100755 DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
-@@ -2345,7 +2345,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl, +@@ -2344,7 +2344,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl, *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
*_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
*_GCC5_X64_OBJCOPY_FLAGS =
@@ -100,5 +100,5 @@ index 36241b6ede..947fbf2e8d 100755 DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
-- -2.32.0 +2.30.2 diff --git a/poky/meta/recipes-core/ovmf/ovmf_git.bb b/poky/meta/recipes-core/ovmf/ovmf_git.bb index d1bf8b080d..5ca0b49b69 100644 --- a/poky/meta/recipes-core/ovmf/ovmf_git.bb +++ b/poky/meta/recipes-core/ovmf/ovmf_git.bb @@ -26,8 +26,8 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ file://0006-reproducible.patch \ " -PV = "edk2-stable202208" -SRCREV = "ba0e0e4c6a174b71b18ccd6e47319cc45878893c" +PV = "edk2-stable202211" +SRCREV = "fff6d81270b57ee786ea18ad74f43149b9f03494" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)" inherit deploy diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb index d70aff22c7..104f3549d5 100644 --- a/poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb +++ b/poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb @@ -11,6 +11,11 @@ inherit packagegroup #PACKAGEFUNCS =+ 'generate_sdk_pkgs' +TARGET_TOOLCHAIN_LANGS ??= "${SDK_TOOLCHAIN_LANGS}" +TARGET_TOOLCHAIN_LANGS:remove:sdkmingw32 = "rust" +# libstd-rs doesn't build for mips n32 with compiler constraint errors +TARGET_TOOLCHAIN_LANGS:remove:mipsarchn32 = "rust" + RDEPENDS:packagegroup-core-sdk = "\ packagegroup-core-buildessential \ coreutils \ @@ -23,7 +28,10 @@ RDEPENDS:packagegroup-core-sdk = "\ less \ ldd \ file \ - tcl" + tcl \ + ${@bb.utils.contains('TARGET_TOOLCHAIN_LANGS', 'go', 'packagegroup-go-sdk-target', '', d)} \ + ${@bb.utils.contains('TARGET_TOOLCHAIN_LANGS', 'rust', 'packagegroup-rust-sdk-target', '', d)} \ +" SANITIZERS = "libasan-dev libubsan-dev" SANITIZERS:arc = "" diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb b/poky/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb new file mode 100644 index 0000000000..59874c4c2c --- /dev/null +++ b/poky/meta/recipes-core/packagegroups/packagegroup-rust-sdk-target.bb @@ -0,0 +1,14 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +SUMMARY = "Target packages for the Rust SDK" + +inherit packagegroup + +RDEPENDS:${PN} = " \ + rust \ + cargo \ +" diff --git a/poky/meta/recipes-core/psplash/files/psplash-start.service b/poky/meta/recipes-core/psplash/files/psplash-start.service index 36c2bb38e0..bec9368427 100644 --- a/poky/meta/recipes-core/psplash/files/psplash-start.service +++ b/poky/meta/recipes-core/psplash/files/psplash-start.service @@ -2,6 +2,7 @@ Description=Start psplash boot splash screen DefaultDependencies=no RequiresMountsFor=/run +ConditionFileIsExecutable=/usr/bin/psplash [Service] Type=notify diff --git a/poky/meta/recipes-core/psplash/files/psplash-systemd.service b/poky/meta/recipes-core/psplash/files/psplash-systemd.service index 082207f232..e93e3deb35 100644 --- a/poky/meta/recipes-core/psplash/files/psplash-systemd.service +++ b/poky/meta/recipes-core/psplash/files/psplash-systemd.service @@ -4,6 +4,7 @@ DefaultDependencies=no After=psplash-start.service Requires=psplash-start.service RequiresMountsFor=/run +ConditionFileIsExecutable=/usr/bin/psplash [Service] ExecStart=/usr/bin/psplash-systemd diff --git a/poky/meta/recipes-core/systemd/systemd-boot_251.8.bb b/poky/meta/recipes-core/systemd/systemd-boot_252.4.bb index b67706b731..b67706b731 100644 --- a/poky/meta/recipes-core/systemd/systemd-boot_251.8.bb +++ b/poky/meta/recipes-core/systemd/systemd-boot_252.4.bb diff --git a/poky/meta/recipes-core/systemd/systemd.inc b/poky/meta/recipes-core/systemd/systemd.inc index 3bb6b0efe6..9d747ef64d 100644 --- a/poky/meta/recipes-core/systemd/systemd.inc +++ b/poky/meta/recipes-core/systemd/systemd.inc @@ -14,8 +14,8 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" -SRCREV = "ae8b249af4acb055f920134f2ac584c4cbc86e3b" -SRCBRANCH = "v251-stable" +SRCREV = "4b48117716f84751dc6c8ee16c94de9858eaef4f" +SRCBRANCH = "v252-stable" SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ " diff --git a/poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch b/poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch index bce1ca4563..6496280dda 100644 --- a/poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch +++ b/poky/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch @@ -47,8 +47,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src/udev/udev-builtin-net_id.c | 2 +- 37 files changed, 44 insertions(+), 42 deletions(-) -diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c -index b346a50d78..7884d4c1cd 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -5,7 +5,7 @@ @@ -60,8 +58,6 @@ index b346a50d78..7884d4c1cd 100644 #include <linux/if_infiniband.h> #include "sd-dhcp6-client.h" -diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c -index 8ff0eb1360..7e06b8d57d 100644 --- a/src/network/netdev/bareudp.c +++ b/src/network/netdev/bareudp.c @@ -2,7 +2,7 @@ @@ -73,8 +69,6 @@ index 8ff0eb1360..7e06b8d57d 100644 #include "bareudp.h" #include "netlink-util.h" -diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c -index 15f3aee3a6..ec76428436 100644 --- a/src/network/netdev/batadv.c +++ b/src/network/netdev/batadv.c @@ -3,7 +3,7 @@ @@ -86,8 +80,6 @@ index 15f3aee3a6..ec76428436 100644 #include "batadv.h" #include "fileio.h" -diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c -index 5d94aa1d68..4e379a326d 100644 --- a/src/network/netdev/bond.c +++ b/src/network/netdev/bond.c @@ -1,7 +1,7 @@ @@ -99,8 +91,6 @@ index 5d94aa1d68..4e379a326d 100644 #include "alloc-util.h" #include "bond.h" -diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c -index b974f2ae0a..9a5f18d556 100644 --- a/src/network/netdev/bridge.c +++ b/src/network/netdev/bridge.c @@ -2,7 +2,7 @@ @@ -112,8 +102,6 @@ index b974f2ae0a..9a5f18d556 100644 #include <linux/if_bridge.h> #include "bridge.h" -diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c -index 00df1d2787..77b506b422 100644 --- a/src/network/netdev/dummy.c +++ b/src/network/netdev/dummy.c @@ -1,6 +1,6 @@ @@ -124,8 +112,6 @@ index 00df1d2787..77b506b422 100644 #include "dummy.h" -diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c -index 224c17e979..fb79cc13f6 100644 --- a/src/network/netdev/geneve.c +++ b/src/network/netdev/geneve.c @@ -2,7 +2,7 @@ @@ -137,8 +123,6 @@ index 224c17e979..fb79cc13f6 100644 #include "alloc-util.h" #include "conf-parser.h" -diff --git a/src/network/netdev/ifb.c b/src/network/netdev/ifb.c -index d7ff44cb9e..e037629ae4 100644 --- a/src/network/netdev/ifb.c +++ b/src/network/netdev/ifb.c @@ -1,7 +1,7 @@ @@ -150,8 +134,6 @@ index d7ff44cb9e..e037629ae4 100644 #include "ifb.h" -diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c -index e0ff9e8c62..ab085c1f6d 100644 --- a/src/network/netdev/ipoib.c +++ b/src/network/netdev/ipoib.c @@ -1,6 +1,6 @@ @@ -162,8 +144,6 @@ index e0ff9e8c62..ab085c1f6d 100644 #include <linux/if_link.h> #include "ipoib.h" -diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c -index d15766cd7b..60728b4f94 100644 --- a/src/network/netdev/ipvlan.c +++ b/src/network/netdev/ipvlan.c @@ -2,7 +2,7 @@ @@ -175,8 +155,6 @@ index d15766cd7b..60728b4f94 100644 #include "conf-parser.h" #include "ipvlan.h" -diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c -index f1a566a9ca..1f37927a83 100644 --- a/src/network/netdev/macsec.c +++ b/src/network/netdev/macsec.c @@ -1,7 +1,7 @@ @@ -188,8 +166,6 @@ index f1a566a9ca..1f37927a83 100644 #include <linux/if_ether.h> #include <linux/if_macsec.h> #include <linux/genetlink.h> -diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c -index c41be6e78f..ee2660c5bf 100644 --- a/src/network/netdev/macvlan.c +++ b/src/network/netdev/macvlan.c @@ -2,7 +2,7 @@ @@ -201,8 +177,6 @@ index c41be6e78f..ee2660c5bf 100644 #include "conf-parser.h" #include "macvlan.h" -diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c -index 8e7fe11c18..701ab2bd69 100644 --- a/src/network/netdev/netdev.c +++ b/src/network/netdev/netdev.c @@ -2,7 +2,7 @@ @@ -214,8 +188,6 @@ index 8e7fe11c18..701ab2bd69 100644 #include <unistd.h> #include "alloc-util.h" -diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c -index 15d5c132f9..a3ffa48b15 100644 --- a/src/network/netdev/netdevsim.c +++ b/src/network/netdev/netdevsim.c @@ -1,6 +1,6 @@ @@ -226,8 +198,6 @@ index 15d5c132f9..a3ffa48b15 100644 #include "netdevsim.h" -diff --git a/src/network/netdev/nlmon.c b/src/network/netdev/nlmon.c -index ff372092e6..eef66811f4 100644 --- a/src/network/netdev/nlmon.c +++ b/src/network/netdev/nlmon.c @@ -1,6 +1,6 @@ @@ -238,8 +208,6 @@ index ff372092e6..eef66811f4 100644 #include "nlmon.h" -diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c -index 97e534fe99..0302c1cb94 100644 --- a/src/network/netdev/tunnel.c +++ b/src/network/netdev/tunnel.c @@ -2,7 +2,7 @@ @@ -251,8 +219,6 @@ index 97e534fe99..0302c1cb94 100644 #include <linux/if_tunnel.h> #include <linux/ip.h> #include <linux/ip6_tunnel.h> -diff --git a/src/network/netdev/vcan.c b/src/network/netdev/vcan.c -index 380547ee1e..137c1adf8a 100644 --- a/src/network/netdev/vcan.c +++ b/src/network/netdev/vcan.c @@ -1,6 +1,6 @@ @@ -263,8 +229,6 @@ index 380547ee1e..137c1adf8a 100644 #include "vcan.h" -diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c -index c946e81fc0..d1a6be73f9 100644 --- a/src/network/netdev/veth.c +++ b/src/network/netdev/veth.c @@ -3,7 +3,7 @@ @@ -276,8 +240,6 @@ index c946e81fc0..d1a6be73f9 100644 #include <linux/veth.h> #include "netlink-util.h" -diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c -index af3e77963e..efa4b0a164 100644 --- a/src/network/netdev/vlan.c +++ b/src/network/netdev/vlan.c @@ -2,7 +2,7 @@ @@ -289,8 +251,6 @@ index af3e77963e..efa4b0a164 100644 #include <linux/if_vlan.h> #include "parse-util.h" -diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c -index b1b6707441..1c6d1982e1 100644 --- a/src/network/netdev/vrf.c +++ b/src/network/netdev/vrf.c @@ -2,7 +2,7 @@ @@ -302,8 +262,6 @@ index b1b6707441..1c6d1982e1 100644 #include "vrf.h" -diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c -index a0ba048eb1..875f2e5901 100644 --- a/src/network/netdev/vxcan.c +++ b/src/network/netdev/vxcan.c @@ -1,7 +1,7 @@ @@ -315,8 +273,6 @@ index a0ba048eb1..875f2e5901 100644 #include "vxcan.h" -diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c -index 30b0855598..a065158801 100644 --- a/src/network/netdev/vxlan.c +++ b/src/network/netdev/vxlan.c @@ -2,7 +2,7 @@ @@ -328,8 +284,6 @@ index 30b0855598..a065158801 100644 #include "conf-parser.h" #include "alloc-util.h" -diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c -index 88f668753a..5fc753384b 100644 --- a/src/network/netdev/wireguard.c +++ b/src/network/netdev/wireguard.c @@ -6,7 +6,7 @@ @@ -341,8 +295,6 @@ index 88f668753a..5fc753384b 100644 #include <linux/ipv6_route.h> #include "sd-resolve.h" -diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c -index ef5e735b2b..419afd75f2 100644 --- a/src/network/netdev/xfrm.c +++ b/src/network/netdev/xfrm.c @@ -1,6 +1,6 @@ @@ -353,8 +305,6 @@ index ef5e735b2b..419afd75f2 100644 #include "missing_network.h" #include "xfrm.h" -diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c -index 10025a97ae..a0239ea83a 100644 --- a/src/network/networkd-bridge-mdb.c +++ b/src/network/networkd-bridge-mdb.c @@ -1,7 +1,5 @@ @@ -374,8 +324,6 @@ index 10025a97ae..a0239ea83a 100644 #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U -diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c -index 7996960bd1..e870b9ba26 100644 --- a/src/network/networkd-dhcp-common.c +++ b/src/network/networkd-dhcp-common.c @@ -1,7 +1,8 @@ @@ -387,9 +335,7 @@ index 7996960bd1..e870b9ba26 100644 +#include <net/if.h> #include "bus-error.h" - #include "dhcp-identifier.h" -diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c -index 7be9713d46..e830fcd575 100644 + #include "bus-locator.h" --- a/src/network/networkd-dhcp-prefix-delegation.c +++ b/src/network/networkd-dhcp-prefix-delegation.c @@ -1,7 +1,5 @@ @@ -409,8 +355,6 @@ index 7be9713d46..e830fcd575 100644 bool link_dhcp_pd_is_enabled(Link *link) { assert(link); -diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c -index 9acfd17d49..3108289602 100644 --- a/src/network/networkd-dhcp-server.c +++ b/src/network/networkd-dhcp-server.c @@ -1,7 +1,7 @@ @@ -422,8 +366,6 @@ index 9acfd17d49..3108289602 100644 #include <linux/if.h> #include "sd-dhcp-server.h" -diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c -index cb9c428ae9..a35d58f3f1 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -3,7 +3,7 @@ @@ -435,21 +377,17 @@ index cb9c428ae9..a35d58f3f1 100644 #include "alloc-util.h" #include "dhcp-client-internal.h" -diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c -index dc09171afe..5b93ef3dd4 100644 --- a/src/network/networkd-ipv6ll.c +++ b/src/network/networkd-ipv6ll.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ - + #include <linux/if.h> -#include <linux/if_arp.h> +//#include <linux/if_arp.h> - + #include "in-addr-util.h" #include "networkd-address.h" -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 63679505f7..825ea76ff2 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -3,7 +3,7 @@ @@ -461,8 +399,6 @@ index 63679505f7..825ea76ff2 100644 #include <linux/if_link.h> #include <linux/netdevice.h> #include <sys/socket.h> -diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c -index efe407fedb..46a086cdf5 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -6,7 +6,7 @@ @@ -471,11 +407,9 @@ index efe407fedb..46a086cdf5 100644 #include <linux/if.h> -#include <linux/if_arp.h> +//#include <linux/if_arp.h> - + #include "sd-ndisc.h" - -diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c -index 934fed3b7f..fdb89313dd 100644 + --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -1,9 +1,5 @@ @@ -499,8 +433,6 @@ index 934fed3b7f..fdb89313dd 100644 int route_new(Route **ret) { _cleanup_(route_freep) Route *route = NULL; -diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c -index e00cc1e589..e392c7e1a2 100644 --- a/src/network/networkd-setlink.c +++ b/src/network/networkd-setlink.c @@ -2,7 +2,7 @@ @@ -512,8 +444,6 @@ index e00cc1e589..e392c7e1a2 100644 #include <linux/if_bridge.h> #include "missing_network.h" -diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h -index cf20b6dba5..c3a46dda11 100644 --- a/src/shared/linux/ethtool.h +++ b/src/shared/linux/ethtool.h @@ -16,7 +16,8 @@ @@ -526,8 +456,6 @@ index cf20b6dba5..c3a46dda11 100644 #ifndef __KERNEL__ #include <limits.h> /* for INT_MAX */ -diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c -index f56c5646c1..5af28ff119 100644 --- a/src/shared/netif-util.c +++ b/src/shared/netif-util.c @@ -1,7 +1,7 @@ @@ -539,8 +467,6 @@ index f56c5646c1..5af28ff119 100644 #include "arphrd-util.h" #include "device-util.h" -diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c -index f2ea2a7cd5..fe60a0744d 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -18,7 +18,7 @@ diff --git a/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch index a19a025559..2a033b134e 100644 --- a/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch +++ b/poky/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -29,7 +29,7 @@ diff --git a/units/meson.build b/units/meson.build index a9bf28f6d9..11d3644168 100644 --- a/units/meson.build +++ b/units/meson.build -@@ -63,8 +63,7 @@ units = [ +@@ -62,8 +62,7 @@ units = [ ['poweroff.target', '', (with_runlevels ? 'runlevel0.target' : '')], ['printer.target', ''], @@ -64,7 +64,7 @@ diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in index 96f595ad72..7c010bb224 100644 --- a/units/systemd-binfmt.service.in +++ b/units/systemd-binfmt.service.in -@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm +@@ -14,6 +14,7 @@ Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems DefaultDependencies=no Conflicts=shutdown.target diff --git a/poky/meta/recipes-core/systemd/systemd/0001-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch b/poky/meta/recipes-core/systemd/systemd/0001-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch new file mode 100644 index 0000000000..c02d495d31 --- /dev/null +++ b/poky/meta/recipes-core/systemd/systemd/0001-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch @@ -0,0 +1,42 @@ +From 5b5675913e2dbe6c5acda935b5814a8991829ec5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 8 Nov 2022 13:31:34 -0800 +Subject: [PATCH 2/2] test-bus-error: strerror() is assumed to be GNU specific version mark it so + +Upstream-Status: Inappropriate [Upstream systemd only supports glibc] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/libsystemd/sd-bus/test-bus-error.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/src/libsystemd/sd-bus/test-bus-error.c ++++ b/src/libsystemd/sd-bus/test-bus-error.c +@@ -99,7 +99,9 @@ TEST(error) { + assert_se(!sd_bus_error_is_set(&error)); + assert_se(sd_bus_error_set_errno(&error, EBUSY) == -EBUSY); + assert_se(streq(error.name, "System.Error.EBUSY")); ++#ifdef __GLIBC__ + assert_se(streq(error.message, STRERROR(EBUSY))); ++#endif + assert_se(sd_bus_error_has_name(&error, "System.Error.EBUSY")); + assert_se(sd_bus_error_get_errno(&error) == EBUSY); + assert_se(sd_bus_error_is_set(&error)); +--- a/src/test/test-errno-util.c ++++ b/src/test/test-errno-util.c +@@ -4,7 +4,7 @@ + #include "stdio-util.h" + #include "string-util.h" + #include "tests.h" +- ++#ifdef __GLIBC__ + TEST(strerror_not_threadsafe) { + /* Just check that strerror really is not thread-safe. */ + log_info("strerror(%d) → %s", 200, strerror(200)); +@@ -46,5 +46,6 @@ TEST(STRERROR_OR_ELSE) { + log_info("STRERROR_OR_ELSE(EPERM, \"EOF\") → %s", STRERROR_OR_EOF(EPERM)); + log_info("STRERROR_OR_ELSE(-EPERM, \"EOF\") → %s", STRERROR_OR_EOF(-EPERM)); + } ++#endif /* __GLIBC__ */ + + DEFINE_TEST_MAIN(LOG_INFO); diff --git a/poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch b/poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch index 58767c7c35..e6abaadfcb 100644 --- a/poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch +++ b/poky/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch @@ -13,11 +13,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src/shared/mkdir-label.c | 1 + 1 file changed, 1 insertion(+) -diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c -index 5b1ac5d1e0..fa5802b894 100644 --- a/src/shared/mkdir-label.c +++ b/src/shared/mkdir-label.c -@@ -6,6 +6,7 @@ +@@ -7,6 +7,7 @@ #include "selinux-util.h" #include "smack-util.h" #include "user-util.h" 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 0c85f2bcbe..f9c7ced947 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 @@ -22,11 +22,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> create mode 100644 src/basic/parse-printf-format.c create mode 100644 src/basic/parse-printf-format.h -diff --git a/meson.build b/meson.build -index 36cbfa4893..30b5305b89 100644 --- a/meson.build +++ b/meson.build -@@ -694,6 +694,7 @@ endif +@@ -739,6 +739,7 @@ endif foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h', @@ -34,11 +32,9 @@ index 36cbfa4893..30b5305b89 100644 'sys/auxv.h', 'valgrind/memcheck.h', 'valgrind/valgrind.h', -diff --git a/src/basic/meson.build b/src/basic/meson.build -index 9b89fdcdea..0b1ef91016 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build -@@ -336,6 +336,11 @@ endforeach +@@ -337,6 +337,11 @@ endforeach basic_sources += generated_gperf_headers @@ -50,9 +46,6 @@ index 9b89fdcdea..0b1ef91016 100644 ############################################################ arch_list = [ -diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c -new file mode 100644 -index 0000000000..49437e5445 --- /dev/null +++ b/src/basic/parse-printf-format.c @@ -0,0 +1,273 @@ @@ -329,9 +322,6 @@ index 0000000000..49437e5445 + + return last; +} -diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h -new file mode 100644 -index 0000000000..47be7522d7 --- /dev/null +++ b/src/basic/parse-printf-format.h @@ -0,0 +1,57 @@ @@ -392,8 +382,6 @@ index 0000000000..47be7522d7 +size_t parse_printf_format(const char *fmt, size_t n, int *types); + +#endif /* HAVE_PRINTF_H */ -diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h -index 69d7062ec6..f55c5aab2c 100644 --- a/src/basic/stdio-util.h +++ b/src/basic/stdio-util.h @@ -1,13 +1,13 @@ @@ -409,10 +397,8 @@ index 69d7062ec6..f55c5aab2c 100644 #include "memory-util.h" +#include "parse-printf-format.h" - #define snprintf_ok(buf, len, fmt, ...) \ - ({ \ -diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c -index 1e10ed5524..e6ceba54f9 100644 + #define snprintf_ok(buf, len, fmt, ...) \ + ({ \ --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c @@ -2,7 +2,6 @@ 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 9e02666698..2c33033e91 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 @@ -72,11 +72,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/udev/udev-rules.c | 1 + 52 files changed, 63 insertions(+) -diff --git a/meson.build b/meson.build -index 30b5305b89..0189ef8ce6 100644 --- a/meson.build +++ b/meson.build -@@ -512,6 +512,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] +@@ -557,6 +557,7 @@ foreach ident : ['secure_getenv', '__sec endforeach foreach ident : [ @@ -84,8 +82,6 @@ index 30b5305b89..0189ef8ce6 100644 ['memfd_create', '''#include <sys/mman.h>'''], ['gettid', '''#include <sys/types.h> #include <unistd.h>'''], -diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c -index a4e5d77f6c..fc12da4c53 100644 --- a/src/backlight/backlight.c +++ b/src/backlight/backlight.c @@ -20,6 +20,7 @@ @@ -94,10 +90,8 @@ index a4e5d77f6c..fc12da4c53 100644 #include "util.h" +#include "missing_stdlib.h" - static int help(void) { - _cleanup_free_ char *link = NULL; -diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index b03cc70e2e..f4615ffce1 100644 + #define PCI_CLASS_GRAPHICS_CARD 0x30000 + --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -37,6 +37,7 @@ @@ -108,8 +102,6 @@ index b03cc70e2e..f4615ffce1 100644 static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { _cleanup_free_ char *fs = NULL; -diff --git a/src/basic/env-util.c b/src/basic/env-util.c -index 885967e7f3..d0b7dc845e 100644 --- a/src/basic/env-util.c +++ b/src/basic/env-util.c @@ -19,6 +19,7 @@ @@ -120,8 +112,6 @@ index 885967e7f3..d0b7dc845e 100644 /* We follow bash for the character set. Different shells have different rules. */ #define VALID_BASH_ENV_NAME_CHARS \ -diff --git a/src/basic/log.c b/src/basic/log.c -index 12071e2ebd..15254c7bbc 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -36,6 +36,7 @@ @@ -132,8 +122,6 @@ index 12071e2ebd..15254c7bbc 100644 #define SNDBUF_SIZE (8*1024*1024) -diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h -index 8c76f93eb2..9068bfb4f0 100644 --- a/src/basic/missing_stdlib.h +++ b/src/basic/missing_stdlib.h @@ -11,3 +11,15 @@ @@ -152,8 +140,6 @@ index 8c76f93eb2..9068bfb4f0 100644 + (char *)memcpy(__new, __old, __len); \ + }) +#endif -diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c -index 51a0d74e87..03569f71f8 100644 --- a/src/basic/mkdir.c +++ b/src/basic/mkdir.c @@ -15,6 +15,7 @@ @@ -164,8 +150,6 @@ index 51a0d74e87..03569f71f8 100644 int mkdir_safe_internal( const char *path, -diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c -index 82a33a6829..d947774b40 100644 --- a/src/basic/mountpoint-util.c +++ b/src/basic/mountpoint-util.c @@ -13,6 +13,7 @@ @@ -176,8 +160,6 @@ index 82a33a6829..d947774b40 100644 #include "mountpoint-util.h" #include "nulstr-util.h" #include "parse-util.h" -diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c -index 2888ab6523..d941afec2d 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c @@ -18,6 +18,7 @@ @@ -188,8 +170,6 @@ index 2888ab6523..d941afec2d 100644 int parse_boolean(const char *v) { if (!v) -diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c -index 6fb8c40e7a..c4b59e8518 100644 --- a/src/basic/path-lookup.c +++ b/src/basic/path-lookup.c @@ -16,6 +16,7 @@ @@ -200,8 +180,6 @@ index 6fb8c40e7a..c4b59e8518 100644 int xdg_user_runtime_dir(char **ret, const char *suffix) { const char *e; -diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c -index cab9d0eaea..5f6ca258e9 100644 --- a/src/basic/percent-util.c +++ b/src/basic/percent-util.c @@ -3,6 +3,7 @@ @@ -212,8 +190,6 @@ index cab9d0eaea..5f6ca258e9 100644 static int parse_parts_value_whole(const char *p, const char *symbol) { const char *pc, *n; -diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c -index 410b8a3eb5..f2c4355609 100644 --- a/src/basic/proc-cmdline.c +++ b/src/basic/proc-cmdline.c @@ -15,6 +15,7 @@ @@ -224,8 +200,6 @@ index 410b8a3eb5..f2c4355609 100644 int proc_cmdline(char **ret) { const char *e; -diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c -index 65f96abb06..e485a0196b 100644 --- a/src/basic/procfs-util.c +++ b/src/basic/procfs-util.c @@ -12,6 +12,7 @@ @@ -236,8 +210,6 @@ index 65f96abb06..e485a0196b 100644 int procfs_get_pid_max(uint64_t *ret) { _cleanup_free_ char *value = NULL; -diff --git a/src/basic/time-util.c b/src/basic/time-util.c -index b659d6905d..020112be24 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -26,6 +26,7 @@ @@ -248,8 +220,6 @@ index b659d6905d..020112be24 100644 static clockid_t map_clock_id(clockid_t c) { -diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c -index d9c901d73b..79a035274c 100644 --- a/src/boot/bless-boot.c +++ b/src/boot/bless-boot.c @@ -22,6 +22,7 @@ @@ -260,8 +230,6 @@ index d9c901d73b..79a035274c 100644 static char **arg_path = NULL; -diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c -index f0d8759e85..b4c1053e64 100644 --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c @@ -21,6 +21,7 @@ @@ -272,8 +240,6 @@ index f0d8759e85..b4c1053e64 100644 #include "socket-util.h" BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); -diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c -index 5c499e5d06..e7ab1bb9a5 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -44,6 +44,7 @@ @@ -284,8 +250,6 @@ index 5c499e5d06..e7ab1bb9a5 100644 BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); -diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c -index 32a2ec0ff9..36be2511e4 100644 --- a/src/core/dbus-util.c +++ b/src/core/dbus-util.c @@ -9,6 +9,7 @@ @@ -296,11 +260,9 @@ index 32a2ec0ff9..36be2511e4 100644 int bus_property_get_triggered_unit( sd_bus *bus, -diff --git a/src/core/execute.c b/src/core/execute.c -index 2762b10287..a8aeec7f6e 100644 --- a/src/core/execute.c +++ b/src/core/execute.c -@@ -103,6 +103,7 @@ +@@ -104,6 +104,7 @@ #include "unit-serialize.h" #include "user-util.h" #include "utmp-wtmp.h" @@ -308,8 +270,6 @@ index 2762b10287..a8aeec7f6e 100644 #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) -diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c -index f4488dd692..1d331a7ee2 100644 --- a/src/core/kmod-setup.c +++ b/src/core/kmod-setup.c @@ -11,6 +11,7 @@ @@ -320,8 +280,6 @@ index f4488dd692..1d331a7ee2 100644 #if HAVE_KMOD #include "module-util.h" -diff --git a/src/core/service.c b/src/core/service.c -index 9f7af9dffb..3ec5e30c8b 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -42,6 +42,7 @@ @@ -331,9 +289,7 @@ index 9f7af9dffb..3ec5e30c8b 100644 +#include "missing_stdlib.h" #define service_spawn(...) service_spawn_internal(__func__, __VA_ARGS__) - -diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c -index c6e201ecf2..ab034475e2 100644 + --- a/src/coredump/coredump-vacuum.c +++ b/src/coredump/coredump-vacuum.c @@ -17,6 +17,7 @@ @@ -344,11 +300,9 @@ index c6e201ecf2..ab034475e2 100644 #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ -diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c -index 9b32383a76..f8d3397a06 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c -@@ -29,6 +29,7 @@ +@@ -32,6 +32,7 @@ #include "util.h" #include "virt.h" #include "volatile-util.h" @@ -356,8 +310,6 @@ index 9b32383a76..f8d3397a06 100644 typedef enum MountPointFlags { MOUNT_NOAUTO = 1 << 0, -diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c -index 3e3646e45f..6a8fc60f6d 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -24,6 +24,7 @@ @@ -368,11 +320,9 @@ index 3e3646e45f..6a8fc60f6d 100644 #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" -diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c -index cff34fd585..a5003e47e9 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c -@@ -74,6 +74,7 @@ +@@ -70,6 +70,7 @@ #include "unit-name.h" #include "user-util.h" #include "varlink.h" @@ -380,20 +330,16 @@ index cff34fd585..a5003e47e9 100644 #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ -diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c -index 96529b422b..ddb5e9c698 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c -@@ -20,6 +20,7 @@ +@@ -19,6 +19,7 @@ #include "strv.h" #include "time-util.h" #include "utf8.h" +#include "missing_stdlib.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 909dfe4d3a..254b7ce866 100644 + static int message_parse_fields(sd_bus_message *m); --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/sd-bus/bus-objects.c @@ -11,6 +11,7 @@ @@ -404,8 +350,6 @@ index 909dfe4d3a..254b7ce866 100644 static int node_vtable_get_userdata( sd_bus *bus, -diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c -index 14951ccb33..b7f86ca501 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -28,6 +28,7 @@ @@ -416,11 +360,9 @@ index 14951ccb33..b7f86ca501 100644 #define SNDBUF_SIZE (8*1024*1024) -diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c -index 9e1d29cc1d..8c3165f0ce 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c -@@ -43,6 +43,7 @@ +@@ -44,6 +44,7 @@ #include "string-util.h" #include "strv.h" #include "user-util.h" @@ -428,8 +370,6 @@ index 9e1d29cc1d..8c3165f0ce 100644 #define log_debug_bus_message(m) \ do { \ -diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c -index 317653bedc..d028216c48 100644 --- a/src/libsystemd/sd-bus/test-bus-benchmark.c +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c @@ -14,6 +14,7 @@ @@ -440,8 +380,6 @@ index 317653bedc..d028216c48 100644 #define MAX_SIZE (2*1024*1024) -diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c -index 7a6cc4aca3..b7f7cd65c5 100644 --- a/src/libsystemd/sd-journal/sd-journal.c +++ b/src/libsystemd/sd-journal/sd-journal.c @@ -41,6 +41,7 @@ @@ -452,23 +390,9 @@ index 7a6cc4aca3..b7f7cd65c5 100644 #define JOURNAL_FILES_MAX 7168 -diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c -index 10d2ed7aec..4fbe3f6b4a 100644 ---- a/src/locale/keymap-util.c -+++ b/src/locale/keymap-util.c -@@ -24,6 +24,7 @@ - #include "string-util.h" - #include "strv.h" - #include "tmpfile-util.h" -+#include "missing_stdlib.h" - - static bool startswith_comma(const char *s, const char *prefix) { - s = startswith(s, prefix); -diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c -index 5bd7efc3e8..282899601e 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include "locale-util.h" #include "login-util.h" #include "macro.h" @@ -476,8 +400,6 @@ index 5bd7efc3e8..282899601e 100644 #include "pam-util.h" #include "parse-util.h" #include "path-util.h" -diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c -index 063ad08d80..f9823a433b 100644 --- a/src/network/generator/network-generator.c +++ b/src/network/generator/network-generator.c @@ -13,6 +13,7 @@ @@ -488,8 +410,6 @@ index 063ad08d80..f9823a433b 100644 /* # .network -diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c -index 1f58bf3ed4..8457a3b0e3 100644 --- a/src/nspawn/nspawn-settings.c +++ b/src/nspawn/nspawn-settings.c @@ -17,6 +17,7 @@ @@ -500,8 +420,6 @@ index 1f58bf3ed4..8457a3b0e3 100644 Settings *settings_new(void) { Settings *s; -diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c -index c64e79bdff..eda26b0b9a 100644 --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c @@ -21,6 +21,7 @@ @@ -512,8 +430,6 @@ index c64e79bdff..eda26b0b9a 100644 static void setup_logging_once(void) { static pthread_once_t once = PTHREAD_ONCE_INIT; -diff --git a/src/portable/portable.c b/src/portable/portable.c -index 0e6461ba93..54148d5924 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -39,6 +39,7 @@ @@ -524,20 +440,16 @@ index 0e6461ba93..54148d5924 100644 /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was * dropped there by the portable service logic and b) for which image it was dropped there. */ -diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c -index 5b3ceeff36..d36d1d57ae 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c -@@ -43,6 +43,7 @@ - #include "utf8.h" +@@ -46,6 +46,7 @@ + #include "varlink.h" #include "verb-log-control.h" #include "verbs.h" +#include "missing_stdlib.h" static int arg_family = AF_UNSPEC; static int arg_ifindex = 0; -diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c -index 8b4f66b22e..5926e4c61b 100644 --- a/src/shared/bus-get-properties.c +++ b/src/shared/bus-get-properties.c @@ -4,6 +4,7 @@ @@ -548,11 +460,9 @@ index 8b4f66b22e..5926e4c61b 100644 int bus_property_get_bool( sd_bus *bus, -diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c -index 87c0334fec..402ab3493b 100644 --- a/src/shared/bus-unit-procs.c +++ b/src/shared/bus-unit-procs.c -@@ -10,6 +10,7 @@ +@@ -11,6 +11,7 @@ #include "sort-util.h" #include "string-util.h" #include "terminal-util.h" @@ -560,8 +470,6 @@ index 87c0334fec..402ab3493b 100644 struct CGroupInfo { char *cgroup_path; -diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c -index dcce530c99..faf5a5bda0 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -49,6 +49,7 @@ @@ -572,8 +480,6 @@ index dcce530c99..faf5a5bda0 100644 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { assert(message); -diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c -index 4a2b7684bc..ee6d687c58 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -21,6 +21,7 @@ @@ -583,12 +489,10 @@ index 4a2b7684bc..ee6d687c58 100644 +#include "missing_stdlib.h" static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { - sd_event *e = userdata; -diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c -index f54b187a1b..299758c7e4 100644 + sd_event *e = ASSERT_PTR(userdata); --- a/src/shared/dns-domain.c +++ b/src/shared/dns-domain.c -@@ -17,6 +17,7 @@ +@@ -18,6 +18,7 @@ #include "string-util.h" #include "strv.h" #include "utf8.h" @@ -596,8 +500,6 @@ index f54b187a1b..299758c7e4 100644 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 c6caf9330a..ebe33bd44a 100644 --- a/src/shared/journal-importer.c +++ b/src/shared/journal-importer.c @@ -15,6 +15,7 @@ @@ -608,8 +510,6 @@ index c6caf9330a..ebe33bd44a 100644 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 cf83eb6bca..e672a003a3 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -42,6 +42,7 @@ @@ -620,8 +520,6 @@ index cf83eb6bca..e672a003a3 100644 /* 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 f75ef62d2d..530001a821 100644 --- a/src/shared/pager.c +++ b/src/shared/pager.c @@ -26,6 +26,7 @@ @@ -632,20 +530,6 @@ index f75ef62d2d..530001a821 100644 static pid_t pager_pid = 0; -diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c -index 1b4396a34c..c2f72b185f 100644 ---- a/src/shared/uid-range.c -+++ b/src/shared/uid-range.c -@@ -14,6 +14,7 @@ - #include "stat-util.h" - #include "uid-range.h" - #include "user-util.h" -+#include "missing_stdlib.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 7e9ab19666..56f619e54e 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -26,6 +26,7 @@ @@ -656,8 +540,6 @@ index 7e9ab19666..56f619e54e 100644 #define BUFFER_SIZE (256 * 1024) -diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c -index cc9a7cb838..a679614a47 100644 --- a/src/test/test-hexdecoct.c +++ b/src/test/test-hexdecoct.c @@ -7,6 +7,7 @@ @@ -668,8 +550,6 @@ index cc9a7cb838..a679614a47 100644 #include "tests.h" TEST(hexchar) { -diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c -index ae92e45205..1e6f3205cb 100644 --- a/src/udev/udev-builtin-path_id.c +++ b/src/udev/udev-builtin-path_id.c @@ -22,6 +22,7 @@ @@ -680,11 +560,9 @@ index ae92e45205..1e6f3205cb 100644 _printf_(2,3) static void path_prepend(char **path, const char *fmt, ...) { -diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c -index a60e4f294c..571c43765b 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c -@@ -35,6 +35,7 @@ +@@ -34,6 +34,7 @@ #include "udev-util.h" #include "udev-watch.h" #include "user-util.h" @@ -692,8 +570,6 @@ index a60e4f294c..571c43765b 100644 typedef struct Spawn { sd_device *device; -diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c -index 1a384d6b38..0089833e3f 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -34,6 +34,7 @@ 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 eeaaac1b9a..2a5770c515 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 @@ -23,8 +23,6 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> src/tmpfiles/tmpfiles.c | 10 ++++++++++ 3 files changed, 38 insertions(+) -diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c -index e026b29478..815e56ef68 100644 --- a/src/basic/glob-util.c +++ b/src/basic/glob-util.c @@ -12,6 +12,12 @@ @@ -48,7 +46,7 @@ index e026b29478..815e56ef68 100644 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ assert(!(flags & GLOB_ALTDIRFUNC)); -@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { +@@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag pglob->gl_lstat = lstat; if (!pglob->gl_stat) pglob->gl_stat = stat; @@ -63,13 +61,11 @@ index e026b29478..815e56ef68 100644 if (k == GLOB_NOMATCH) return -ENOENT; if (k == GLOB_NOSPACE) -diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c -index ec8b74f48f..d99a6095df 100644 --- a/src/test/test-glob-util.c +++ b/src/test/test-glob-util.c -@@ -13,6 +13,12 @@ - #include "tests.h" - #include "tmpfile-util.h" +@@ -34,6 +34,12 @@ TEST(glob_first) { + assert_se(first == NULL); + } +/* Don't fail if the standard library + * doesn't provide brace expansion */ @@ -80,7 +76,7 @@ index ec8b74f48f..d99a6095df 100644 TEST(glob_exists) { char name[] = "/tmp/test-glob_exists.XXXXXX"; int fd = -1; -@@ -40,11 +46,13 @@ TEST(glob_no_dot) { +@@ -61,11 +67,13 @@ TEST(glob_no_dot) { const char *fn; _cleanup_globfree_ glob_t g = { @@ -94,7 +90,7 @@ index ec8b74f48f..d99a6095df 100644 }; int r; -@@ -52,11 +60,19 @@ TEST(glob_no_dot) { +@@ -73,11 +81,19 @@ TEST(glob_no_dot) { assert_se(mkdtemp(template)); fn = strjoina(template, "/*"); @@ -114,13 +110,11 @@ index ec8b74f48f..d99a6095df 100644 assert_se(r == GLOB_NOMATCH); (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); -diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index fcab51c208..fdef1807ae 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c -@@ -67,6 +67,12 @@ - #include "umask-util.h" +@@ -71,6 +71,12 @@ #include "user-util.h" + #include "virt.h" +/* Don't fail if the standard library + * doesn't provide brace expansion */ @@ -131,7 +125,7 @@ index fcab51c208..fdef1807ae 100644 /* 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 * properly owned directories beneath /tmp, /var/tmp, /run, which are -@@ -1934,7 +1940,9 @@ finish: +@@ -2174,7 +2180,9 @@ finish: static int glob_item(Item *i, action_t action) { _cleanup_globfree_ glob_t g = { @@ -140,8 +134,8 @@ index fcab51c208..fdef1807ae 100644 +#endif }; int r = 0, k; - -@@ -1953,7 +1961,9 @@ static int glob_item(Item *i, action_t action) { + +@@ -2194,7 +2202,9 @@ static int glob_item(Item *i, action_t a static int glob_item_recursively(Item *i, fdaction_t action) { _cleanup_globfree_ glob_t g = { @@ -150,3 +144,4 @@ index fcab51c208..fdef1807ae 100644 +#endif }; int r = 0, k; + diff --git a/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch index 3a47d09e8a..aac4ad49d7 100644 --- a/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ b/poky/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch @@ -27,11 +27,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> src/core/execute.c | 4 ++-- 3 files changed, 9 insertions(+), 15 deletions(-) -diff --git a/src/basic/format-util.h b/src/basic/format-util.h -index 8719df3e29..9becc96066 100644 --- a/src/basic/format-util.h +++ b/src/basic/format-util.h -@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); +@@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32 # error Unknown timex member size #endif @@ -46,11 +44,9 @@ index 8719df3e29..9becc96066 100644 #if SIZEOF_DEV_T == 8 # define DEV_FMT "%" PRIu64 -diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c -index 33dfde9d6c..e018fd81fd 100644 --- a/src/basic/rlimit-util.c +++ b/src/basic/rlimit-util.c -@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { +@@ -44,7 +44,7 @@ int setrlimit_closest(int resource, cons fixed.rlim_max == highest.rlim_max) return 0; @@ -59,7 +55,7 @@ index 33dfde9d6c..e018fd81fd 100644 return RET_NERRNO(setrlimit(resource, &fixed)); } -@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { +@@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *r if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) r = free_and_strdup(&s, "infinity"); else if (rl->rlim_cur >= RLIM_INFINITY) @@ -86,11 +82,9 @@ index 33dfde9d6c..e018fd81fd 100644 return 1; } -diff --git a/src/core/execute.c b/src/core/execute.c -index fccfb9268c..90f00e10a5 100644 --- a/src/core/execute.c +++ b/src/core/execute.c -@@ -5633,9 +5633,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { +@@ -5869,9 +5869,9 @@ void exec_context_dump(const ExecContext for (unsigned i = 0; i < RLIM_NLIMITS; i++) if (c->rlimit[i]) { fprintf(f, "%sLimit%s: " RLIM_FMT "\n", diff --git a/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch index e1a2512ec3..6367adce07 100644 --- a/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ b/poky/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch @@ -31,11 +31,9 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> src/shared/base-filesystem.c | 6 +++--- 2 files changed, 23 insertions(+), 4 deletions(-) -diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h -index 0bbb3f6298..3dc494dbfb 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h -@@ -46,8 +46,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); +@@ -47,8 +47,27 @@ int futimens_opath(int fd, const struct int fd_warn_permissions(const char *path, int fd); int stat_warn_permissions(const char *path, const struct stat *st); @@ -63,12 +61,10 @@ index 0bbb3f6298..3dc494dbfb 100644 + RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0)) int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); - int touch(const char *path); -diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c -index 6dacc1d20a..909a6818f6 100644 + --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c -@@ -131,7 +131,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -131,7 +131,7 @@ int base_filesystem_create(const char *r return log_error_errno(errno, "Failed to open root file system: %m"); for (size_t i = 0; i < ELEMENTSOF(table); i++) { @@ -77,7 +73,7 @@ index 6dacc1d20a..909a6818f6 100644 continue; if (table[i].target) { -@@ -139,7 +139,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -139,7 +139,7 @@ int base_filesystem_create(const char *r /* check if one of the targets exists */ NULSTR_FOREACH(s, table[i].target) { @@ -86,7 +82,7 @@ index 6dacc1d20a..909a6818f6 100644 continue; /* check if a specific file exists at the target path */ -@@ -150,7 +150,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { +@@ -150,7 +150,7 @@ int base_filesystem_create(const char *r if (!p) return log_oom(); diff --git a/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch index 7b22d6214f..3228f1716b 100644 --- a/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/poky/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch @@ -14,13 +14,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> src/machine/machine-dbus.c | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c -index 8f11afd65b..a2b57deb7a 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c -@@ -10,6 +10,11 @@ - #include <libgen.h> - #undef basename +@@ -4,6 +4,11 @@ + #include <sys/mount.h> + #include <sys/wait.h> +#if !defined(__GLIBC__) +#include <string.h> diff --git a/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index e5e592a837..da56d8b4b6 100644 --- a/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/poky/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch @@ -24,11 +24,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> src/basic/process-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 6980e0c4f6..45ec26ea45 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c -@@ -1460,7 +1460,7 @@ int set_oom_score_adjust(int value) { +@@ -1466,7 +1466,7 @@ int set_oom_score_adjust(int value) { xsprintf(t, "%i", value); return write_string_file("/proc/self/oom_score_adj", t, diff --git a/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch index c563982607..7533fde1e1 100644 --- a/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ b/poky/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch @@ -24,11 +24,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> src/libsystemd/sd-journal/journal-send.c | 5 +++++ 2 files changed, 10 insertions(+) -diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c -index bdfa145ab7..61928f4bf3 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c -@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { +@@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_er return; errno = 0; @@ -41,11 +39,23 @@ index bdfa145ab7..61928f4bf3 100644 if (errno == ERANGE || strlen(x) >= k - 1) { free(m); k *= 2; -diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c -index e6ceba54f9..285ebbc9ef 100644 +@@ -594,8 +599,12 @@ const char* _bus_error_message(const sd_ + + if (e && e->message) + return e->message; +- ++#ifndef __GLIBC__ ++ strerror_r(abs(error), buf, ERRNO_BUF_LEN); ++ return buf; ++#else + return strerror_r(abs(error), buf, ERRNO_BUF_LEN); ++#endif + } + + static bool map_ok(const sd_bus_error_map *map) { --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c -@@ -370,7 +370,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove +@@ -381,7 +381,12 @@ static int fill_iovec_perror_and_send(co char* j; errno = 0; diff --git a/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch b/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch index 00131de7d0..6edab0dfe2 100644 --- a/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch +++ b/poky/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch @@ -43,11 +43,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> src/vconsole/vconsole-setup.c | 2 +- 21 files changed, 39 insertions(+), 40 deletions(-) -diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index f4615ffce1..07cb8ed669 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c -@@ -399,7 +399,7 @@ int cg_kill_kernel_sigkill(const char *controller, const char *path) { +@@ -399,7 +399,7 @@ int cg_kill_kernel_sigkill(const char *c if (r < 0) return r; @@ -56,7 +54,7 @@ index f4615ffce1..07cb8ed669 100644 if (r < 0) return r; -@@ -805,7 +805,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -805,7 +805,7 @@ int cg_install_release_agent(const char sc = strstrip(contents); if (isempty(sc)) { @@ -65,7 +63,7 @@ index f4615ffce1..07cb8ed669 100644 if (r < 0) return r; } else if (!path_equal(sc, agent)) -@@ -823,7 +823,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { +@@ -823,7 +823,7 @@ int cg_install_release_agent(const char sc = strstrip(contents); if (streq(sc, "0")) { @@ -74,7 +72,7 @@ index f4615ffce1..07cb8ed669 100644 if (r < 0) return r; -@@ -850,7 +850,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -850,7 +850,7 @@ int cg_uninstall_release_agent(const cha if (r < 0) return r; @@ -83,7 +81,7 @@ index f4615ffce1..07cb8ed669 100644 if (r < 0) return r; -@@ -860,7 +860,7 @@ int cg_uninstall_release_agent(const char *controller) { +@@ -860,7 +860,7 @@ int cg_uninstall_release_agent(const cha if (r < 0) return r; @@ -92,7 +90,7 @@ index f4615ffce1..07cb8ed669 100644 if (r < 0) return r; -@@ -1730,7 +1730,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri +@@ -1730,7 +1730,7 @@ int cg_set_attribute(const char *control if (r < 0) return r; @@ -101,11 +99,9 @@ index f4615ffce1..07cb8ed669 100644 } int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { -diff --git a/src/basic/namespace-util.c b/src/basic/namespace-util.c -index b9120a5ed0..78e460b75f 100644 --- a/src/basic/namespace-util.c +++ b/src/basic/namespace-util.c -@@ -202,12 +202,12 @@ int userns_acquire(const char *uid_map, const char *gid_map) { +@@ -220,12 +220,12 @@ int userns_acquire(const char *uid_map, freeze(); xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); @@ -120,11 +116,9 @@ index b9120a5ed0..78e460b75f 100644 if (r < 0) return log_error_errno(r, "Failed to write GID map: %m"); -diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c -index e485a0196b..8bff210356 100644 --- a/src/basic/procfs-util.c +++ b/src/basic/procfs-util.c -@@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limit) { +@@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limi * 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 */ @@ -140,11 +134,9 @@ index e485a0196b..8bff210356 100644 if (r < 0) { uint64_t threads_max; -diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c -index b66a6622ae..8d1c93008a 100644 --- a/src/basic/sysctl-util.c +++ b/src/basic/sysctl-util.c -@@ -58,7 +58,7 @@ int sysctl_write(const char *property, const char *value) { +@@ -58,7 +58,7 @@ int sysctl_write(const char *property, c log_debug("Setting '%s' to '%s'", p, value); @@ -153,11 +145,9 @@ index b66a6622ae..8d1c93008a 100644 } int sysctl_writef(const char *property, const char *format, ...) { -diff --git a/src/basic/util.c b/src/basic/util.c -index d7ef382737..31c35118d1 100644 --- a/src/basic/util.c +++ b/src/basic/util.c -@@ -168,7 +168,7 @@ void disable_coredumps(void) { +@@ -134,7 +134,7 @@ void disable_coredumps(void) { if (detect_container() > 0) return; @@ -166,8 +156,6 @@ index d7ef382737..31c35118d1 100644 if (r < 0) log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); } -diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c -index 18231c2618..6c598d55c8 100644 --- a/src/binfmt/binfmt.c +++ b/src/binfmt/binfmt.c @@ -29,7 +29,7 @@ static bool arg_unregister = false; @@ -179,7 +167,7 @@ index 18231c2618..6c598d55c8 100644 } static int apply_rule(const char *filename, unsigned line, const char *rule) { -@@ -59,7 +59,7 @@ static int apply_rule(const char *filename, unsigned line, const char *rule) { +@@ -59,7 +59,7 @@ static int apply_rule(const char *filena if (r >= 0) log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename); @@ -197,24 +185,20 @@ index 18231c2618..6c598d55c8 100644 if (r < 0) log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); else -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 9282b1ff20..7781e0f8eb 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c -@@ -4182,7 +4182,7 @@ int unit_cgroup_freezer_action(Unit *u, FreezerAction action) { - else - u->freezer_state = FREEZER_THAWING; +@@ -4210,7 +4210,7 @@ int unit_cgroup_freezer_action(Unit *u, + u->freezer_state = FREEZER_THAWING; + } - r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER); + r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0); if (r < 0) return r; -diff --git a/src/core/main.c b/src/core/main.c -index 409b84a006..b1631e57ce 100644 --- a/src/core/main.c +++ b/src/core/main.c -@@ -1374,7 +1374,7 @@ static int bump_unix_max_dgram_qlen(void) { +@@ -1404,7 +1404,7 @@ static int bump_unix_max_dgram_qlen(void if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) return 0; @@ -223,7 +207,7 @@ index 409b84a006..b1631e57ce 100644 "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); if (r < 0) return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, -@@ -1646,7 +1646,7 @@ static void initialize_core_pattern(bool skip_setup) { +@@ -1676,7 +1676,7 @@ static void initialize_core_pattern(bool if (getpid_cached() != 1) return; @@ -232,11 +216,9 @@ index 409b84a006..b1631e57ce 100644 if (r < 0) 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 f88cb80834..68055fb64a 100644 --- a/src/core/smack-setup.c +++ b/src/core/smack-setup.c -@@ -320,17 +320,17 @@ int mac_smack_setup(bool *loaded_policy) { +@@ -320,17 +320,17 @@ int mac_smack_setup(bool *loaded_policy) } #if HAVE_SMACK_RUN_LABEL @@ -258,8 +240,6 @@ index f88cb80834..68055fb64a 100644 if (r < 0) log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); #endif -diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c -index 1c7d9179d8..3ae78ee580 100644 --- a/src/hibernate-resume/hibernate-resume.c +++ b/src/hibernate-resume/hibernate-resume.c @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) { @@ -271,24 +251,20 @@ index 1c7d9179d8..3ae78ee580 100644 if (r < 0) { log_error_errno(r, "Failed to write '" DEVNUM_FORMAT_STR "' to /sys/power/resume: %m", DEVNUM_FORMAT_VAL(st.st_rdev)); return EXIT_FAILURE; -diff --git a/src/home/homework.c b/src/home/homework.c -index 0014a7f598..ec3e9caa1c 100644 --- a/src/home/homework.c +++ b/src/home/homework.c @@ -278,7 +278,7 @@ static void drop_caches_now(void) { - * details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but not - * more. */ + * for details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but + * not more. */ - r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER); + r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0); if (r < 0) log_warning_errno(r, "Failed to drop caches, ignoring: %m"); else -diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c -index aaf951ced8..45a9d70f0d 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c -@@ -2215,7 +2215,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, +@@ -2444,7 +2444,7 @@ _public_ int sd_device_set_sysattr_value if (!value) return -ENOMEM; @@ -297,11 +273,9 @@ index aaf951ced8..45a9d70f0d 100644 if (r < 0) { /* On failure, clear cache entry, as we do not know how it fails. */ device_remove_cached_sysattr_value(device, sysattr); -diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c -index 9e6379ae7b..546a03a7f5 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) { +@@ -123,7 +123,7 @@ int sync_cgroup(pid_t pid, CGroupUnified fn = strjoina(tree, cgroup, "/cgroup.procs"); sprintf(pid_string, PID_FMT, pid); @@ -310,11 +284,9 @@ index 9e6379ae7b..546a03a7f5 100644 if (r < 0) { log_error_errno(r, "Failed to move process: %m"); goto finish; -diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index c5fd978395..fefe8a21e5 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -2759,7 +2759,7 @@ static int reset_audit_loginuid(void) { +@@ -2762,7 +2762,7 @@ static int reset_audit_loginuid(void) { if (streq(p, "4294967295")) return 0; @@ -341,8 +313,6 @@ index c5fd978395..fefe8a21e5 100644 if (r < 0) return log_error_errno(r, "Failed to write GID map: %m"); -diff --git a/src/shared/binfmt-util.c b/src/shared/binfmt-util.c -index 724d7f27d9..dd725cff92 100644 --- a/src/shared/binfmt-util.c +++ b/src/shared/binfmt-util.c @@ -26,7 +26,7 @@ int disable_binfmt(void) { @@ -354,11 +324,9 @@ index 724d7f27d9..dd725cff92 100644 if (r < 0) return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); -diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c -index a1fabc73c1..c5c8fc417e 100644 --- a/src/shared/cgroup-setup.c +++ b/src/shared/cgroup-setup.c -@@ -344,7 +344,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { +@@ -350,7 +350,7 @@ int cg_attach(const char *controller, co xsprintf(c, PID_FMT "\n", pid); @@ -367,7 +335,7 @@ index a1fabc73c1..c5c8fc417e 100644 if (r == -EOPNOTSUPP && cg_is_threaded(controller, path) > 0) /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */ return -EUCLEAN; -@@ -879,7 +879,7 @@ int cg_enable_everywhere( +@@ -887,7 +887,7 @@ int cg_enable_everywhere( return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); } @@ -376,22 +344,18 @@ index a1fabc73c1..c5c8fc417e 100644 if (r < 0) { 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/shared/coredump-util.c b/src/shared/coredump-util.c -index a0b648bf79..13f921390d 100644 --- a/src/shared/coredump-util.c +++ b/src/shared/coredump-util.c -@@ -70,5 +70,5 @@ int set_coredump_filter(uint64_t value) { +@@ -70,5 +70,5 @@ int set_coredump_filter(uint64_t value) sprintf(t, "0x%"PRIx64, value); return write_string_file("/proc/self/coredump_filter", t, - WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); + WRITE_STRING_FILE_VERIFY_ON_FAILURE); } -diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c -index 0df1778cb2..3b9a0c934e 100644 --- a/src/shared/smack-util.c +++ b/src/shared/smack-util.c -@@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { +@@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const return 0; p = procfs_file_alloca(pid, "attr/current"); @@ -400,11 +364,9 @@ index 0df1778cb2..3b9a0c934e 100644 if (r < 0) return r; -diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 7064f3a905..8f2a7d9da2 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c -@@ -46,7 +46,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca +@@ -50,7 +50,7 @@ static int write_hibernate_location_info assert(hibernate_location->swap); xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno)); @@ -413,7 +375,7 @@ index 7064f3a905..8f2a7d9da2 100644 if (r < 0) return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m", hibernate_location->swap->device, resume_str); -@@ -73,7 +73,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca +@@ -77,7 +77,7 @@ static int write_hibernate_location_info } xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); @@ -422,7 +384,7 @@ index 7064f3a905..8f2a7d9da2 100644 if (r < 0) return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m", hibernate_location->swap->device, offset_str); -@@ -89,7 +89,7 @@ static int write_mode(char **modes) { +@@ -93,7 +93,7 @@ static int write_mode(char **modes) { STRV_FOREACH(mode, modes) { int k; @@ -431,7 +393,7 @@ index 7064f3a905..8f2a7d9da2 100644 if (k >= 0) return 0; -@@ -110,7 +110,7 @@ static int write_state(FILE **f, char **states) { +@@ -114,7 +114,7 @@ static int write_state(FILE **f, char ** STRV_FOREACH(state, states) { int k; @@ -440,11 +402,9 @@ index 7064f3a905..8f2a7d9da2 100644 if (k >= 0) return 0; log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); -diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c -index cd858c9cca..0feb9669a0 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c -@@ -2335,7 +2335,6 @@ static int udev_rule_apply_token_to_event( +@@ -2354,7 +2354,6 @@ static int udev_rule_apply_token_to_even log_rule_debug(dev, rules, "ATTR '%s' writing '%s'", buf, value); r = write_string_file(buf, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | @@ -452,11 +412,9 @@ index cd858c9cca..0feb9669a0 100644 WRITE_STRING_FILE_AVOID_NEWLINE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); if (r < 0) -diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index 50930d4af3..5efd5d3728 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c -@@ -108,7 +108,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { +@@ -108,7 +108,7 @@ static int toggle_utf8_vc(const char *na static int toggle_utf8_sysfs(bool utf8) { int r; diff --git a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch index 2c56838644..45778541c3 100644 --- a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch +++ b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch @@ -17,8 +17,6 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/shared/userdb.c | 7 ++++++- 3 files changed, 30 insertions(+), 1 deletion(-) -diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c -index 88b8fc2f8f..a819d41bac 100644 --- a/src/shared/user-record-nss.c +++ b/src/shared/user-record-nss.c @@ -331,8 +331,10 @@ int nss_group_to_group_record( @@ -48,7 +46,7 @@ index 88b8fc2f8f..a819d41bac 100644 r = json_build(&g->json, JSON_BUILD_OBJECT( JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), -@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re +@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou assert(ret_sgrp); assert(ret_buffer); @@ -56,7 +54,7 @@ index 88b8fc2f8f..a819d41bac 100644 for (;;) { _cleanup_free_ char *buf = NULL; struct sgrp sgrp, *result; -@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re +@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou buflen *= 2; buf = mfree(buf); } @@ -122,8 +120,6 @@ index 88b8fc2f8f..a819d41bac 100644 if (r < 0) return r; -diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h -index 22ab04d6ee..4e52e7a911 100644 --- a/src/shared/user-record-nss.h +++ b/src/shared/user-record-nss.h @@ -2,7 +2,11 @@ @@ -138,11 +134,9 @@ index 22ab04d6ee..4e52e7a911 100644 #include <pwd.h> #include <shadow.h> -diff --git a/src/shared/userdb.c b/src/shared/userdb.c -index 0eddd382e6..d506b8e263 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c -@@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { +@@ -1044,13 +1044,15 @@ int groupdb_iterator_get(UserDBIterator if (gr) { _cleanup_free_ char *buffer = NULL; bool incomplete = false; @@ -159,7 +153,7 @@ index 0eddd382e6..d506b8e263 100644 if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { r = nss_sgrp_for_group(gr, &sgrp, &buffer); if (r < 0) { -@@ -1065,6 +1067,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { +@@ -1063,6 +1065,9 @@ int groupdb_iterator_get(UserDBIterator } r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); diff --git a/poky/meta/recipes-core/systemd/systemd_251.8.bb b/poky/meta/recipes-core/systemd/systemd_252.4.bb index 5fb0e86982..7c3c78a364 100644 --- a/poky/meta/recipes-core/systemd/systemd_251.8.bb +++ b/poky/meta/recipes-core/systemd/systemd_252.4.bb @@ -49,6 +49,7 @@ SRC_URI_MUSL = "\ file://0001-pass-correct-parameters-to-getdents64.patch \ file://0002-Add-sys-stat.h-for-S_IFDIR.patch \ file://0001-Adjust-for-musl-headers.patch \ + file://0001-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \ " PAM_PLUGINS = " \ @@ -109,7 +110,7 @@ PACKAGECONFIG:remove:libc-musl = " \ # https://github.com/seccomp/libseccomp/issues/347 PACKAGECONFIG:remove:mipsarch = "seccomp" -CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " +TARGET_CC_ARCH:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 -D_LARGEFILE64_SOURCE" # Some of the dependencies are weak-style recommends - if not available at runtime, # systemd won't fail but the library-related feature will be skipped with a warning. @@ -144,7 +145,7 @@ PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" # importd requires journal-upload/xz/zlib/bzip2/gcrypt -PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" +PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false,glib-2.0" # Update NAT firewall rules PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" @@ -528,12 +529,15 @@ FILES:${PN}-extra-utils = "\ ${bindir}/systemd-stdio-bridge \ ${base_bindir}/systemd-ask-password \ ${base_bindir}/systemd-tty-ask-password-agent \ + ${systemd_system_unitdir}/initrd.target.wants/systemd-pcrphase-initrd.path \ ${systemd_system_unitdir}/systemd-ask-password-console.path \ ${systemd_system_unitdir}/systemd-ask-password-console.service \ ${systemd_system_unitdir}/systemd-ask-password-wall.path \ ${systemd_system_unitdir}/systemd-ask-password-wall.service \ ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-console.path \ ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-wall.path \ + ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase.path \ + ${systemd_system_unitdir}/sysinit.target.wants/systemd-pcrphase-sysinit.path \ ${systemd_system_unitdir}/multi-user.target.wants/systemd-ask-password-wall.path \ ${rootlibexecdir}/systemd/systemd-resolve-host \ ${rootlibexecdir}/systemd/systemd-ac-power \ @@ -541,12 +545,17 @@ FILES:${PN}-extra-utils = "\ ${rootlibexecdir}/systemd/systemd-bus-proxyd \ ${systemd_system_unitdir}/systemd-bus-proxyd.service \ ${systemd_system_unitdir}/systemd-bus-proxyd.socket \ + ${rootlibexecdir}/systemd/systemd-measure \ + ${rootlibexecdir}/systemd/systemd-pcrphase \ ${rootlibexecdir}/systemd/systemd-socket-proxyd \ ${rootlibexecdir}/systemd/systemd-reply-password \ ${rootlibexecdir}/systemd/systemd-sleep \ ${rootlibexecdir}/systemd/system-sleep \ ${systemd_system_unitdir}/systemd-hibernate.service \ ${systemd_system_unitdir}/systemd-hybrid-sleep.service \ + ${systemd_system_unitdir}/systemd-pcrphase-initrd.service \ + ${systemd_system_unitdir}/systemd-pcrphase.service \ + ${systemd_system_unitdir}/systemd-pcrphase-sysinit.service \ ${systemd_system_unitdir}/systemd-suspend.service \ ${systemd_system_unitdir}/sleep.target \ ${rootlibexecdir}/systemd/systemd-initctl \ @@ -602,6 +611,7 @@ FILES:${PN} = " ${base_bindir}/* \ ${sysconfdir}/resolv-conf.systemd \ ${sysconfdir}/X11/xinit/xinitrc.d/* \ ${rootlibexecdir}/systemd/* \ + ${rootlibdir}/systemd/libsystemd-core* \ ${libdir}/pam.d \ ${nonarch_libdir}/pam.d \ ${systemd_unitdir}/* \ @@ -616,6 +626,7 @@ FILES:${PN} = " ${base_bindir}/* \ ${bindir}/timedatectl \ ${bindir}/bootctl \ ${bindir}/oomctl \ + ${bindir}/userdbctl \ ${exec_prefix}/lib/tmpfiles.d/*.conf \ ${exec_prefix}/lib/systemd \ ${exec_prefix}/lib/modules-load.d \ @@ -658,7 +669,7 @@ INSANE_SKIP:${PN}-dbg += "libdir" INSANE_SKIP:${PN}-doc += " libdir" INSANE_SKIP:libsystemd-shared += "libdir" -FILES:libsystemd-shared = "${rootlibexecdir}/systemd/libsystemd-shared*.so" +FILES:libsystemd-shared = "${rootlibdir}/systemd/libsystemd-shared*.so" RPROVIDES:udev = "hotplug" diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.38.1.bb b/poky/meta/recipes-core/util-linux/util-linux_2.38.1.bb index 50ecc106dd..9ea7a04e8a 100644 --- a/poky/meta/recipes-core/util-linux/util-linux_2.38.1.bb +++ b/poky/meta/recipes-core/util-linux/util-linux_2.38.1.bb @@ -107,6 +107,7 @@ PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" PACKAGECONFIG[pcre2] = ",,libpcre2" PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" PACKAGECONFIG[chfn-chsh] = "--enable-chfn-chsh,--disable-chfn-chsh," +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" |