diff options
Diffstat (limited to 'meta/recipes-core')
161 files changed, 2011 insertions, 2510 deletions
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile index bded3757cc..5e8393c91c 100644 --- a/meta/recipes-core/base-files/base-files/profile +++ b/meta/recipes-core/base-files/base-files/profile @@ -58,7 +58,7 @@ resize() { fi # only do this for /dev/tty[A-z] which are typically # serial ports - if [ $FIRSTTIMESETUP -eq 1 -a $SHLVL -eq 1 ] ; then + if [ $FIRSTTIMESETUP -eq 1 -a ${SHLVL:-1} -eq 1 ] ; then case $(tty 2>/dev/null) in /dev/tty[A-z]*) resize >/dev/null;; esac diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 9fab53ce63..1b6e9671e4 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -25,7 +25,8 @@ SRC_URI = "file://rotation \ " SRC_URI:append:libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', ' file://0001-add-nss-resolve-to-nsswitch.patch', '', d)}" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" INHIBIT_DEFAULT_DEPS = "1" @@ -113,23 +114,23 @@ do_install () { ln -snf ../run ${D}${localstatedir}/run ln -snf ../run/lock ${D}${localstatedir}/lock - install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts + install -m 0644 ${S}/hosts ${D}${sysconfdir}/hosts ${BASEFILESISSUEINSTALL} - rotation=`cat ${WORKDIR}/rotation` + rotation=`cat ${S}/rotation` if [ "$rotation" != "0" ]; then - install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation + install -m 0644 ${S}/rotation ${D}${sysconfdir}/rotation fi - install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab - install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile + install -m 0644 ${S}/fstab ${D}${sysconfdir}/fstab + install -m 0644 ${S}/profile ${D}${sysconfdir}/profile sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile - install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells - install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile - install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc - install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf - install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd + install -m 0644 ${S}/shells ${D}${sysconfdir}/shells + install -m 0755 ${S}/share/dot.profile ${D}${sysconfdir}/skel/.profile + install -m 0755 ${S}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc + install -m 0644 ${S}/host.conf ${D}${sysconfdir}/host.conf + install -m 0644 ${S}/motd ${D}${sysconfdir}/motd ln -sf /proc/mounts ${D}${sysconfdir}/mtab @@ -145,12 +146,12 @@ do_install () { } do_install:append:libc-glibc () { - install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf + install -m 0644 ${S}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf } DISTRO_VERSION[vardepsexclude] += "DATE" do_install_basefilesissue () { - install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} + install -m 644 ${S}/issue* ${D}${sysconfdir} if [ -n "${DISTRO_NAME}" ]; then printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net diff --git a/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb b/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb index 6904a91930..4ffc44c808 100644 --- a/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb @@ -4,7 +4,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;m SRC_URI = "file://inittab" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" INHIBIT_DEFAULT_DEPS = "1" @@ -14,7 +15,7 @@ do_compile() { do_install() { install -d ${D}${sysconfdir} - install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + install -D -m 0644 ${S}/inittab ${D}${sysconfdir}/inittab CONSOLES="${SERIAL_CONSOLES}" for s in $CONSOLES diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index f5d7c3f9c8..67a9111e5b 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -114,7 +114,7 @@ do_prepare_config () { export KCONFIG_NOTIMESTAMP=1 sed -e '/CONFIG_STATIC/d' \ - < ${WORKDIR}/defconfig > ${S}/.config + < ${UNPACKDIR}/defconfig > ${S}/.config echo "# CONFIG_STATIC is not set" >> .config for i in 'CROSS' 'DISTRO FEATURES'; do echo "### $i"; done >> \ ${S}/.config @@ -280,67 +280,67 @@ do_install () { fi if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then - install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog - install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf - install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf + install -m 0755 ${UNPACKDIR}/syslog ${D}${sysconfdir}/init.d/syslog + install -m 644 ${UNPACKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf + install -m 644 ${UNPACKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf fi if grep -q "CONFIG_CROND=y" ${B}/.config; then - install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ + install -m 0755 ${UNPACKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ fi if grep -q "CONFIG_HTTPD=y" ${B}/.config; then - install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ + install -m 0755 ${UNPACKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/ install -d ${D}/srv/www fi if grep -q "CONFIG_UDHCPD=y" ${B}/.config; then - install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ + install -m 0755 ${UNPACKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/ fi if grep -q "CONFIG_HWCLOCK=y" ${B}/.config; then - install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ + install -m 0755 ${UNPACKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/ fi if grep -q "CONFIG_UDHCPC=y" ${B}/.config; then install -d ${D}${sysconfdir}/udhcpc.d install -d ${D}${datadir}/udhcpc - install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default + install -m 0755 ${UNPACKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default sed -i "s:/SBIN_DIR/:${base_sbindir}/:" ${D}${sysconfdir}/udhcpc.d/50default - install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script + install -m 0755 ${UNPACKDIR}/default.script ${D}${datadir}/udhcpc/default.script fi if grep -q "CONFIG_INETD=y" ${B}/.config; then - install -m 0755 ${WORKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN} + install -m 0755 ${UNPACKDIR}/inetd ${D}${sysconfdir}/init.d/inetd.${BPN} sed -i "s:/usr/sbin/:${sbindir}/:" ${D}${sysconfdir}/init.d/inetd.${BPN} - install -m 0644 ${WORKDIR}/inetd.conf ${D}${sysconfdir}/ + install -m 0644 ${UNPACKDIR}/inetd.conf ${D}${sysconfdir}/ fi if grep -q "CONFIG_MDEV=y" ${B}/.config; then - install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/mdev + install -m 0755 ${UNPACKDIR}/mdev ${D}${sysconfdir}/init.d/mdev if grep "CONFIG_FEATURE_MDEV_CONF=y" ${B}/.config; then - install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf + install -m 644 ${UNPACKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf install -d ${D}${sysconfdir}/mdev - install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev - install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev + install -m 0755 ${UNPACKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev + install -m 0755 ${UNPACKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev fi fi if grep -q "CONFIG_INIT=y" ${B}/.config && ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','busybox','true','false',d)}; then - install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS - install -D -m 0755 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK - install -D -m 0755 ${WORKDIR}/rcS.default ${D}${sysconfdir}/default/rcS + install -D -m 0755 ${UNPACKDIR}/rcS ${D}${sysconfdir}/init.d/rcS + install -D -m 0755 ${UNPACKDIR}/rcK ${D}${sysconfdir}/init.d/rcK + install -D -m 0755 ${UNPACKDIR}/rcS.default ${D}${sysconfdir}/default/rcS fi if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then if grep -q "CONFIG_KLOGD=y" ${B}/.config; then install -d ${D}${systemd_system_unitdir} - sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \ + sed 's,@base_sbindir@,${base_sbindir},g' < ${UNPACKDIR}/busybox-klogd.service.in \ > ${D}${systemd_system_unitdir}/busybox-klogd.service fi if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then install -d ${D}${systemd_system_unitdir} - sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \ + sed 's,@base_sbindir@,${base_sbindir},g' < ${UNPACKDIR}/busybox-syslog.service.in \ > ${D}${systemd_system_unitdir}/busybox-syslog.service if [ ! -e ${D}${systemd_system_unitdir}/busybox-klogd.service ] ; then sed -i '/klog/d' ${D}${systemd_system_unitdir}/busybox-syslog.service fi - if [ -f ${WORKDIR}/busybox-syslog.default ] ; then + if [ -f ${UNPACKDIR}/busybox-syslog.default ] ; then install -d ${D}${sysconfdir}/default - install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog + install -m 0644 ${UNPACKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog fi fi fi diff --git a/meta/recipes-core/busybox/busybox/0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch b/meta/recipes-core/busybox/busybox/0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch index 4635250170..ceb3ad7250 100644 --- a/meta/recipes-core/busybox/busybox/0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch +++ b/meta/recipes-core/busybox/busybox/0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch @@ -5,7 +5,7 @@ Subject: [PATCH 1/2] libbb: sockaddr2str: ensure only printable characters are returned for the hostname part CVE: CVE-2022-28391 -Upstream-Status: Pending +Upstream-Status: Submitted [https://bugs.busybox.net/show_bug.cgi?id=15001] Signed-off-by: Ariadne Conill <ariadne@dereferenced.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> --- diff --git a/meta/recipes-core/busybox/busybox/0002-nslookup-sanitize-all-printed-strings-with-printable.patch b/meta/recipes-core/busybox/busybox/0002-nslookup-sanitize-all-printed-strings-with-printable.patch index 0d7409ddc3..1dbc3388a4 100644 --- a/meta/recipes-core/busybox/busybox/0002-nslookup-sanitize-all-printed-strings-with-printable.patch +++ b/meta/recipes-core/busybox/busybox/0002-nslookup-sanitize-all-printed-strings-with-printable.patch @@ -8,7 +8,7 @@ Otherwise, terminal sequences can be injected, which enables various terminal in attacks from DNS results. CVE: CVE-2022-28391 -Upstream-Status: Pending +Upstream-Status: Submitted [https://bugs.busybox.net/show_bug.cgi?id=15001] Signed-off-by: Ariadne Conill <ariadne@dereferenced.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> --- diff --git a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch deleted file mode 100644 index 948932a3e8..0000000000 --- a/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 53626cd06a3ef05ed847daea802ef0aa9661caa7 Mon Sep 17 00:00:00 2001 -From: Anders Darander <anders@chargestorm.se> -Date: Thu, 3 Nov 2011 08:51:31 +0100 -Subject: [PATCH] busybox-udhcpc-no_deconfig.patch - -Upstream-Status: Pending - -Add a new option -D to the udhcpc client that allows for -dhcp renewal to occur without having to down the interface -in the process. - -Signed-off-by: Greg Moffatt <greg.moffatt@windriver.com> - -Updated to latest Busybox 1.17.3 - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> - -Updated to Busybox 1.18.4 -option spec is changed - -Signed-off-by: Qing He <qing.he@intel.com> - -Updated to Busybox 1.19.3 - -Signed-off-by: Anders Darander <anders@chargestorm.se> - -Fixed options -b, -a and -P. - -Signed-off-by: Andreas Oberritter <obi@opendreambox.org> ---- - networking/udhcp/dhcpc.c | 29 ++++++++++++++++------ - 1 file changed, 21 insertions(+), 8 deletions(-) - -Index: busybox-1.34.0/networking/udhcp/dhcpc.c -=================================================================== ---- busybox-1.34.0.orig/networking/udhcp/dhcpc.c -+++ busybox-1.34.0/networking/udhcp/dhcpc.c -@@ -48,6 +48,8 @@ - }; - #endif - -+/* option whether to down the interface when reconfiguring */ -+static int allow_deconfig = 1; - - /* "struct client_data_t client_data" is in bb_common_bufsiz1 */ - -@@ -100,8 +102,10 @@ - OPT_x = 1 << 16, - OPT_f = 1 << 17, - OPT_B = 1 << 18, -+ OPT_D = 1 << 19, - /* The rest has variable bit positions, need to be clever */ - OPTBIT_B = 18, -+ OPTBIT_D = 19, - USE_FOR_MMU( OPTBIT_b,) - IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,) - IF_FEATURE_UDHCP_PORT( OPTBIT_P,) -@@ -587,7 +591,8 @@ - - static void d4_run_script_deconfig(void) - { -- d4_run_script(NULL, "deconfig"); -+ if (allow_deconfig) -+ d4_run_script(NULL, "deconfig"); - } - - /*** Sending/receiving packets ***/ -@@ -1244,7 +1249,7 @@ - /* Parse command line */ - opt = getopt32long(argv, "^" - /* O,x: list; -T,-t,-A take numeric param */ -- "CV:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fB" -+ "CV:F:i:np:qRr:s:T:+t:+SA:+O:*ox:*fBD" - USE_FOR_MMU("b") - IF_FEATURE_UDHCPC_ARPING("a::") - IF_FEATURE_UDHCP_PORT("P:") -@@ -1361,6 +1366,10 @@ - logmode |= LOGMODE_SYSLOG; - } - -+ if (opt & OPT_D) { -+ allow_deconfig = 0; -+ } -+ - /* Create pidfile */ - write_pidfile(client_data.pidfile); - /* Goes to stdout (unless NOMMU) and possibly syslog */ diff --git a/meta/recipes-core/busybox/busybox_1.36.1.bb b/meta/recipes-core/busybox/busybox_1.36.1.bb index 06eb9eb999..373a6b7781 100644 --- a/meta/recipes-core/busybox/busybox_1.36.1.bb +++ b/meta/recipes-core/busybox/busybox_1.36.1.bb @@ -2,7 +2,6 @@ require busybox.inc SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://0001-depmod-Ignore-.debug-directories.patch \ - file://busybox-udhcpc-no_deconfig.patch \ file://find-touchscreen.sh \ file://busybox-cron \ file://busybox-httpd \ diff --git a/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch b/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch index 66f9a716c9..97a6357ab9 100644 --- a/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch +++ b/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch @@ -1,4 +1,7 @@ -Subject: local.mk: fix cross compiling problem +From 7cb2d20cfa2a27191255031d231cd41917dcffe8 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Mon, 26 Dec 2016 16:10:35 +0800 +Subject: [PATCH] local.mk: fix cross compiling problem We meet the following error when cross compiling. | Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually). Stop. @@ -12,15 +15,12 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/local.mk b/src/local.mk -index 36dfa4e..c5898cc 100644 +index 96ee941..cdd47d6 100644 --- a/src/local.mk +++ b/src/local.mk -@@ -649,4 +649,4 @@ cu_install_program = @INSTALL_PROGRAM@ +@@ -704,4 +704,4 @@ cu_install_program = @INSTALL@ else cu_install_program = src/ginstall endif -INSTALL = $(cu_install_program) -c +INSTALL_PROGRAM = $(cu_install_program) --- -2.1.0 - diff --git a/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch b/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch deleted file mode 100644 index e6c84be3c4..0000000000 --- a/meta/recipes-core/coreutils/coreutils/0001-posixtm-pacify-clang-18.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 67c298c36f69b6906840b7584be06b7b5f33f829 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <eggert@cs.ucla.edu> -Date: Tue, 16 Jan 2024 17:21:08 -0800 -Subject: [PATCH] posixtm: pacify clang 18 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Problem reported by Khem Raj in: -https://lists.gnu.org/r/bug-gnulib/2024-01/msg00045.html -* lib/posixtm.c (posixtime): Pacify clang 18 by converting bool to int. -Arguably this is a bug in draft C2x, since the non-pointer args to -ckd_add should promote just like any other expressions do; -but that’s not clang’s fault. - -Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gnulib/2024-01/msg00046.html] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - ChangeLog | 10 ++++++++++ - lib/posixtm.c | 2 +- - 2 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/lib/posixtm.c b/lib/posixtm.c -index ef9f55f873..a072c7cad0 100644 ---- a/lib/posixtm.c -+++ b/lib/posixtm.c -@@ -191,7 +191,7 @@ posixtime (time_t *p, const char *s, unsigned int syntax_bits) - | (tm0.tm_min ^ tm1.tm_min) - | (tm0.tm_sec ^ tm1.tm_sec))) - { -- if (ckd_add (&t, t, leapsec)) -+ if (ckd_add (&t, t, +leapsec)) - return false; - *p = t; - return true; --- -2.43.0 - diff --git a/meta/recipes-core/coreutils/coreutils/CVE-2024-0684.patch b/meta/recipes-core/coreutils/coreutils/CVE-2024-0684.patch deleted file mode 100644 index 0c68e2dce0..0000000000 --- a/meta/recipes-core/coreutils/coreutils/CVE-2024-0684.patch +++ /dev/null @@ -1,39 +0,0 @@ -From c4c5ed8f4e9cd55a12966d4f520e3a13101637d9 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <eggert@cs.ucla.edu> -Date: Tue, 16 Jan 2024 13:48:32 -0800 -Subject: [PATCH 1/1] split: do not shrink hold buffer -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -Content-Transfer-Encoding: 8bit - -* src/split.c (line_bytes_split): Do not shrink hold buffer. -If it’s large for this batch it’s likely to be large for the next -batch, and for ‘split’ it’s not worth the complexity/CPU hassle to -shrink it. Do not assume hold_size can be bufsize. - -CVE: CVE-2024-0684 -Upstream-Status: Backport [https://github.com/coreutils/coreutils/commit/c4c5ed8f4e9cd55a12966d4f520e3a13101637d9] -Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> ---- - src/split.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/split.c b/src/split.c -index 64020c859..037960a59 100644 ---- a/src/split.c -+++ b/src/split.c -@@ -809,10 +809,7 @@ line_bytes_split (intmax_t n_bytes, char *buf, idx_t bufsize) - { - cwrite (n_out == 0, hold, n_hold); - n_out += n_hold; -- if (n_hold > bufsize) -- hold = xirealloc (hold, bufsize); - n_hold = 0; -- hold_size = bufsize; - } - - /* Output to eol if present. */ --- -2.11.4.GIT - - diff --git a/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch index 1a8a9b9983..718de0ab78 100644 --- a/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch +++ b/meta/recipes-core/coreutils/coreutils/remove-usr-local-lib-from-m4.patch @@ -1,4 +1,4 @@ -From a26530083a29eeee910bfd606ecc621acecd547a Mon Sep 17 00:00:00 2001 +From f53ffb5b27ab7d4a4c62df00ebd6a1a6936d1709 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 3 Aug 2011 14:12:30 -0700 Subject: [PATCH] coreutils: Fix build on uclibc @@ -12,16 +12,15 @@ and make life easier for cross compilation process. Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Inappropriate [Upstream does care for AIX while we may not] - --- m4/getloadavg.m4 | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 -index 8e96965..63782a2 100644 +index 9d0236f..68f7c52 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 -@@ -41,18 +41,6 @@ AC_CHECK_FUNC([getloadavg], [], +@@ -46,18 +46,6 @@ if test $ac_cv_func_getloadavg != yes; then [LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes]) fi diff --git a/meta/recipes-core/coreutils/coreutils_9.4.bb b/meta/recipes-core/coreutils/coreutils_9.5.bb index fc51adcd5b..178dadc3c5 100644 --- a/meta/recipes-core/coreutils/coreutils_9.4.bb +++ b/meta/recipes-core/coreutils/coreutils_9.5.bb @@ -6,7 +6,7 @@ HOMEPAGE = "http://www.gnu.org/software/coreutils/" BUGTRACKER = "http://debbugs.gnu.org/coreutils" LICENSE = "GPL-3.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ - file://src/ls.c;beginline=1;endline=15;md5=b720a8b317035d66c555fc6d89e3674c \ + file://src/ls.c;beginline=1;endline=15;md5=9ac94aaed7fd46fd8df7147a9e3410cb \ " DEPENDS = "gmp libcap" DEPENDS:class-native = "" @@ -16,14 +16,12 @@ inherit autotools gettext texinfo SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ file://remove-usr-local-lib-from-m4.patch \ file://0001-local.mk-fix-cross-compiling-problem.patch \ - file://0001-posixtm-pacify-clang-18.patch \ - file://CVE-2024-0684.patch \ file://run-ptest \ " -SRC_URI[sha256sum] = "ea613a4cf44612326e917201bbbcdfbd301de21ffc3b59b6e5c07e040b275e52" +SRC_URI[sha256sum] = "cd328edeac92f6a665de9f323c93b712af1858bc2e0d88f3f7100469470a1b8a" # http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v8.27-101-gf5d7c0842 -# +# CVE_STATUS[CVE-2016-2781] = "disputed: runcon is not really a sandbox command, use `runcon ... setsid ...` to avoid this particular issue." EXTRA_OECONF:class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}" @@ -78,6 +76,11 @@ RDEPENDS:coreutils:class-target += "${@bb.utils.contains('PACKAGECONFIG', 'singl # regardless of whether single-binary is in effect. RPROVIDES:coreutils += "${@bb.utils.contains('PACKAGECONFIG', 'single-binary', 'coreutils-stdbuf', '', d)}" +# put getlimits into coreutils-getlimits, because other ptest packages such as +# findutils-ptest may need this command. Note that getlimits is a noinst_PROGRAM +PACKAGE_BEFORE_PN:class-target += "${PN}-getlimits" +FILES:${PN}-getlimits = "${bindir}/getlimits" + # Let aclocal use the relative path for the m4 file rather than the # absolute since coreutils has a lot of m4 files, otherwise there might # be an "Argument list too long" error when it is built in a long/deep @@ -111,6 +114,9 @@ do_install:append() { # in update-alternatives to fail, therefore use lbracket - the name used # for the actual source file. mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN} + + # this getlimits noinst_PROGRAM would possibly be needed by other ptest packages + install ${B}/src/getlimits ${D}/${bindir} } inherit update-alternatives @@ -169,7 +175,7 @@ BBCLASSEXTEND = "native nativesdk" inherit ptest -RDEPENDS:${PN}-ptest += "bash findutils gawk liberror-perl make perl perl-modules python3-core sed shadow" +RDEPENDS:${PN}-ptest += "bash findutils gawk make perl perl-modules python3-core sed shadow" # -dev automatic dependencies fails as we don't want libmodule-build-perl-dev, its too heavy # may need tweaking if DEPENDS changes @@ -206,7 +212,6 @@ do_install_ptest () { # Tweak test d_type-check to use python3 instead of python sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check - install ${B}/src/getlimits ${D}/${bindir} # handle multilib sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest @@ -218,4 +223,4 @@ do_install_ptest:append:libc-musl () { sed -i -e '/tests\/dd\/no-allocate.sh/d' ${D}${PTEST_PATH}/Makefile sed -i -e '/tests\/split\/line-bytes.sh/d' ${D}${PTEST_PATH}/Makefile } -FILES:${PN}-ptest += "${bindir}/getlimits" +RDEPENDS:${PN}-ptest += "${PN}-getlimits" diff --git a/meta/recipes-core/dbus/dbus_1.14.10.bb b/meta/recipes-core/dbus/dbus_1.14.10.bb index 4fe7af7512..6a08f6984e 100644 --- a/meta/recipes-core/dbus/dbus_1.14.10.bb +++ b/meta/recipes-core/dbus/dbus_1.14.10.bb @@ -129,8 +129,8 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/init.d - sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh - install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 + sed 's:@bindir@:${bindir}:' < ${UNPACKDIR}/dbus-1.init > ${S}/dbus-1.init.sh + install -m 0755 ${S}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 install -d ${D}${sysconfdir}/default/volatiles echo "d messagebus messagebus 0755 /run/dbus none" \ > ${D}${sysconfdir}/default/volatiles/99_dbus diff --git a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch index 99adcfd770..9c1dd3f606 100644 --- a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch +++ b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch @@ -1,15 +1,18 @@ -Subject: [PATCH 1/6] urandom-xauth-changes-to-options.h +From cdc6a4a57a86d8116a92a5d905993e65cf723556 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard@openedhand.com> +Date: Wed, 31 Aug 2005 10:45:47 +0000 +Subject: [PATCH] urandom-xauth-changes-to-options.h Upstream-Status: Inappropriate [configuration] --- - default_options.h | 2 +- + src/default_options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/default_options.h b/default_options.h -index 349338c..5ffac25 100644 ---- a/default_options.h -+++ b/default_options.h -@@ -289,7 +289,7 @@ group1 in Dropbear server too */ +diff --git a/src/default_options.h b/src/default_options.h +index 6e970bb..ccc8b47 100644 +--- a/src/default_options.h ++++ b/src/default_options.h +@@ -311,7 +311,7 @@ group1 in Dropbear server too */ /* The command to invoke for xauth when using X11 forwarding. * "-q" for quiet */ @@ -18,6 +21,3 @@ index 349338c..5ffac25 100644 /* If you want to enable running an sftp server (such as the one included with --- -2.25.1 - diff --git a/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch b/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch index 32c3ea5f08..6743f506e9 100644 --- a/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch +++ b/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch @@ -1,7 +1,7 @@ -From b8cece92ba19aa77ac013ea161bfe4c7147747c9 Mon Sep 17 00:00:00 2001 +From 253ca01f0fc50dbaeb2ff8bcece0c34256eba94f Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen <jussi.kukkonen@intel.com> Date: Wed, 2 Dec 2015 11:36:02 +0200 -Subject: Enable pam +Subject: [PATCH] Enable pam We need modify file default_options.h besides enabling pam in configure if we want dropbear to support pam. @@ -11,14 +11,14 @@ Upstream-Status: Pending Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> --- - default_options.h | 4 ++-- + src/default_options.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/default_options.h b/default_options.h -index 0e3d027..349338c 100644 ---- a/default_options.h -+++ b/default_options.h -@@ -210,7 +210,7 @@ group1 in Dropbear server too */ +diff --git a/src/default_options.h b/src/default_options.h +index ccc8b47..12768d1 100644 +--- a/src/default_options.h ++++ b/src/default_options.h +@@ -228,7 +228,7 @@ group1 in Dropbear server too */ /* Authentication Types - at least one required. RFC Draft requires pubkey auth, and recommends password */ @@ -27,7 +27,7 @@ index 0e3d027..349338c 100644 /* Note: PAM auth is quite simple and only works for PAM modules which just do * a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c). -@@ -218,7 +218,7 @@ group1 in Dropbear server too */ +@@ -236,7 +236,7 @@ group1 in Dropbear server too */ * but there's an interface via a PAM module. It won't work for more complex * PAM challenge/response. * You can't enable both PASSWORD and PAM. */ @@ -36,6 +36,3 @@ index 0e3d027..349338c 100644 /* ~/.ssh/authorized_keys authentication. * You must define DROPBEAR_SVR_PUBKEY_AUTH in order to use plugins. */ --- -2.25.1 - diff --git a/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch b/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch index deed78ffb9..44861088cc 100644 --- a/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch +++ b/meta/recipes-core/dropbear/dropbear/0006-dropbear-configuration-file.patch @@ -1,4 +1,4 @@ -From e3a5db1b6d3f6382a15b2266458c26c645a10f18 Mon Sep 17 00:00:00 2001 +From 16b147f97f0938cddb55ec1c90bc919c13f26fc0 Mon Sep 17 00:00:00 2001 From: Mingli Yu <Mingli.Yu@windriver.com> Date: Thu, 6 Sep 2018 15:54:00 +0800 Subject: [PATCH] dropbear configuration file @@ -12,14 +12,14 @@ Signed-off-by: Maxin B. John <maxin.john@enea.com> Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> --- - svr-authpam.c | 2 +- + src/svr-authpam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/svr-authpam.c b/svr-authpam.c -index d201bc9..165ec5c 100644 ---- a/svr-authpam.c -+++ b/svr-authpam.c -@@ -223,7 +223,7 @@ void svr_auth_pam(int valid_user) { +diff --git a/src/svr-authpam.c b/src/svr-authpam.c +index ec14632..026102f 100644 +--- a/src/svr-authpam.c ++++ b/src/svr-authpam.c +@@ -224,7 +224,7 @@ void svr_auth_pam(int valid_user) { } /* Init pam */ @@ -28,6 +28,3 @@ index d201bc9..165ec5c 100644 dropbear_log(LOG_WARNING, "pam_start() failed, rc=%d, %s", rc, pam_strerror(pamHandlep, rc)); goto cleanup; --- -2.7.4 - diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2023-36328.patch b/meta/recipes-core/dropbear/dropbear/CVE-2023-36328.patch deleted file mode 100644 index ec50d69816..0000000000 --- a/meta/recipes-core/dropbear/dropbear/CVE-2023-36328.patch +++ /dev/null @@ -1,144 +0,0 @@ -From beba892bc0d4e4ded4d667ab1d2a94f4d75109a9 Mon Sep 17 00:00:00 2001 -From: czurnieden <czurnieden@gmx.de> -Date: Fri, 8 Sep 2023 10:07:32 +0000 -Subject: [PATCH] Fix possible integer overflow - -CVE: CVE-2023-36328 - -Upstream-Status: Backport [https://github.com/libtom/libtommath/commit/beba892bc0d4e4ded4d667ab1d2a94f4d75109a9] - -Signed-off-by: Yogita Urade <yogita.urade@windriver.com> ---- - libtommath/bn_mp_2expt.c | 4 ++++ - libtommath/bn_mp_grow.c | 4 ++++ - libtommath/bn_mp_init_size.c | 5 +++++ - libtommath/bn_mp_mul_2d.c | 4 ++++ - libtommath/bn_s_mp_mul_digs.c | 4 ++++ - libtommath/bn_s_mp_mul_digs_fast.c | 4 ++++ - libtommath/bn_s_mp_mul_high_digs.c | 4 ++++ - libtommath/bn_s_mp_mul_high_digs_fast.c | 4 ++++ - 8 files changed, 33 insertions(+) - -diff --git a/libtommath/bn_mp_2expt.c b/libtommath/bn_mp_2expt.c -index 0ae3df1..ca6fbc3 100644 ---- a/libtommath/bn_mp_2expt.c -+++ b/libtommath/bn_mp_2expt.c -@@ -12,6 +12,10 @@ mp_err mp_2expt(mp_int *a, int b) - { - mp_err err; - -+ if (b < 0) { -+ return MP_VAL; -+ } -+ - /* zero a as per default */ - mp_zero(a); - -diff --git a/libtommath/bn_mp_grow.c b/libtommath/bn_mp_grow.c -index 9e904c5..2b16826 100644 ---- a/libtommath/bn_mp_grow.c -+++ b/libtommath/bn_mp_grow.c -@@ -9,6 +9,10 @@ mp_err mp_grow(mp_int *a, int size) - int i; - mp_digit *tmp; - -+ if (size < 0) { -+ return MP_VAL; -+ } -+ - /* if the alloc size is smaller alloc more ram */ - if (a->alloc < size) { - /* reallocate the array a->dp -diff --git a/libtommath/bn_mp_init_size.c b/libtommath/bn_mp_init_size.c -index d622687..5fefa96 100644 ---- a/libtommath/bn_mp_init_size.c -+++ b/libtommath/bn_mp_init_size.c -@@ -6,6 +6,11 @@ - /* init an mp_init for a given size */ - mp_err mp_init_size(mp_int *a, int size) - { -+ -+ if (size < 0) { -+ return MP_VAL; -+ } -+ - size = MP_MAX(MP_MIN_PREC, size); - - /* alloc mem */ -diff --git a/libtommath/bn_mp_mul_2d.c b/libtommath/bn_mp_mul_2d.c -index 87354de..2744163 100644 ---- a/libtommath/bn_mp_mul_2d.c -+++ b/libtommath/bn_mp_mul_2d.c -@@ -9,6 +9,10 @@ mp_err mp_mul_2d(const mp_int *a, int b, mp_int *c) - mp_digit d; - mp_err err; - -+ if (b < 0) { -+ return MP_VAL; -+ } -+ - /* copy */ - if (a != c) { - if ((err = mp_copy(a, c)) != MP_OKAY) { -diff --git a/libtommath/bn_s_mp_mul_digs.c b/libtommath/bn_s_mp_mul_digs.c -index 64509d4..2d2f5b0 100644 ---- a/libtommath/bn_s_mp_mul_digs.c -+++ b/libtommath/bn_s_mp_mul_digs.c -@@ -16,6 +16,10 @@ mp_err s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs) - mp_word r; - mp_digit tmpx, *tmpt, *tmpy; - -+ if (digs < 0) { -+ return MP_VAL; -+ } -+ - /* can we use the fast multiplier? */ - if ((digs < MP_WARRAY) && - (MP_MIN(a->used, b->used) < MP_MAXFAST)) { -diff --git a/libtommath/bn_s_mp_mul_digs_fast.c b/libtommath/bn_s_mp_mul_digs_fast.c -index b2a287b..d6dd3cc 100644 ---- a/libtommath/bn_s_mp_mul_digs_fast.c -+++ b/libtommath/bn_s_mp_mul_digs_fast.c -@@ -26,6 +26,10 @@ mp_err s_mp_mul_digs_fast(const mp_int *a, const mp_int *b, mp_int *c, int digs) - mp_digit W[MP_WARRAY]; - mp_word _W; - -+ if (digs < 0) { -+ return MP_VAL; -+ } -+ - /* grow the destination as required */ - if (c->alloc < digs) { - if ((err = mp_grow(c, digs)) != MP_OKAY) { -diff --git a/libtommath/bn_s_mp_mul_high_digs.c b/libtommath/bn_s_mp_mul_high_digs.c -index 2bb2a50..c9dd355 100644 ---- a/libtommath/bn_s_mp_mul_high_digs.c -+++ b/libtommath/bn_s_mp_mul_high_digs.c -@@ -15,6 +15,10 @@ mp_err s_mp_mul_high_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs) - mp_word r; - mp_digit tmpx, *tmpt, *tmpy; - -+ if (digs < 0) { -+ return MP_VAL; -+ } -+ - /* can we use the fast multiplier? */ - if (MP_HAS(S_MP_MUL_HIGH_DIGS_FAST) - && ((a->used + b->used + 1) < MP_WARRAY) -diff --git a/libtommath/bn_s_mp_mul_high_digs_fast.c b/libtommath/bn_s_mp_mul_high_digs_fast.c -index a2c4fb6..afe3e4b 100644 ---- a/libtommath/bn_s_mp_mul_high_digs_fast.c -+++ b/libtommath/bn_s_mp_mul_high_digs_fast.c -@@ -19,6 +19,10 @@ mp_err s_mp_mul_high_digs_fast(const mp_int *a, const mp_int *b, mp_int *c, int - mp_digit W[MP_WARRAY]; - mp_word _W; - -+ if (digs < 0) { -+ return MP_VAL; -+ } -+ - /* grow the destination as required */ - pa = a->used + b->used; - if (c->alloc < pa) { --- -2.35.5 diff --git a/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch b/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch index 5c60868ed8..a20781d31d 100644 --- a/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch +++ b/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch @@ -1,4 +1,4 @@ -From c347ece05a7fdbf50d76cb136b9ed45caed333f6 Mon Sep 17 00:00:00 2001 +From c8a0c8e87b772576f3a431c3b4cacaf5aa001dcc Mon Sep 17 00:00:00 2001 From: Joseph Reynolds <joseph.reynolds1@ibm.com> Date: Thu, 20 Jun 2019 16:29:15 -0500 Subject: [PATCH] dropbear: new feature: disable-weak-ciphers @@ -10,14 +10,14 @@ and we want to support the stong algorithms. Upstream-Status: Inappropriate [configuration] Signed-off-by: Joseph Reynolds <joseph.reynolds1@ibm.com> --- - default_options.h | 2 +- + src/default_options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/default_options.h b/default_options.h -index d417588..bc5200f 100644 ---- a/default_options.h -+++ b/default_options.h -@@ -180,7 +180,7 @@ IMPORTANT: Some options will require "make clean" after changes */ +diff --git a/src/default_options.h b/src/default_options.h +index 12768d1..2b07497 100644 +--- a/src/default_options.h ++++ b/src/default_options.h +@@ -197,7 +197,7 @@ IMPORTANT: Some options will require "make clean" after changes */ * Small systems should generally include either curve25519 or ecdh for performance. * curve25519 is less widely supported but is faster */ @@ -26,6 +26,3 @@ index d417588..bc5200f 100644 #define DROPBEAR_DH_GROUP14_SHA256 1 #define DROPBEAR_DH_GROUP16 0 #define DROPBEAR_CURVE25519 1 --- -2.25.1 - diff --git a/meta/recipes-core/dropbear/dropbear_2022.83.bb b/meta/recipes-core/dropbear/dropbear_2024.85.bb index 528eff1a10..54001414d0 100644 --- a/meta/recipes-core/dropbear/dropbear_2022.83.bb +++ b/meta/recipes-core/dropbear/dropbear_2024.85.bb @@ -21,10 +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://CVE-2023-36328.patch \ " -SRC_URI[sha256sum] = "bc5a121ffbc94b5171ad5ebe01be42746d50aa797c9549a4639894a16749443b" +SRC_URI[sha256sum] = "86b036c433a69d89ce51ebae335d65c47738ccf90d13e5eb0fea832e556da502" PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \ file://0006-dropbear-configuration-file.patch \ @@ -77,7 +76,7 @@ do_install() { ${D}${sbindir} \ ${D}${localstatedir} - install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear + install -m 0644 ${UNPACKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear install -m 0755 dropbearmulti ${D}${sbindir}/ @@ -95,18 +94,18 @@ do_install() { -e 's,/usr/sbin,${sbindir},g' \ -e 's,/var,${localstatedir},g' \ -e 's,/usr/bin,${bindir},g' \ - -e 's,/usr,${prefix},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/dropbear + -e 's,/usr,${prefix},g' ${UNPACKDIR}/init > ${D}${sysconfdir}/init.d/dropbear chmod 755 ${D}${sysconfdir}/init.d/dropbear if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then install -d ${D}${sysconfdir}/pam.d - install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/ + install -m 0644 ${UNPACKDIR}/dropbear ${D}${sysconfdir}/pam.d/ fi # deal with systemd unit files install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/dropbear@.service ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/dropbear.socket ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/dropbearkey.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/dropbear@.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/dropbear.socket ${D}${systemd_system_unitdir} sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ -e 's,@BINDIR@,${bindir},g' \ -e 's,@SBINDIR@,${sbindir},g' \ diff --git a/meta/recipes-core/ell/ell_0.63.bb b/meta/recipes-core/ell/ell_0.66.bb index 7ecb63a478..899e2f6849 100644 --- a/meta/recipes-core/ell/ell_0.63.bb +++ b/meta/recipes-core/ell/ell_0.66.bb @@ -15,8 +15,4 @@ DEPENDS = "dbus" inherit autotools pkgconfig SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/libs/${BPN}/${BPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "7397c76996d7646b9917ebf016cd67586b10166295af2e0e18cdb5b8f6659965" - -do_configure:prepend () { - mkdir -p ${S}/build-aux -} +SRC_URI[sha256sum] = "7a78b757080ed6518c1c4fa26ad6a7a3d6e4e385386a20b6fb52379e7d1ffa36" diff --git a/meta/recipes-core/gettext/gettext-minimal-native_0.22.5.bb b/meta/recipes-core/gettext/gettext-minimal-native_0.22.5.bb index db1bbb7e68..96acf9bb9f 100644 --- a/meta/recipes-core/gettext/gettext-minimal-native_0.22.5.bb +++ b/meta/recipes-core/gettext/gettext-minimal-native_0.22.5.bb @@ -13,7 +13,7 @@ INHIBIT_DEFAULT_DEPS = "1" INHIBIT_AUTOTOOLS_DEPS = "1" LICENSE = "FSF-Unlimited" -LIC_FILES_CHKSUM = "file://../COPYING;md5=4bd090a20bfcd1a18f1f79837b5e3e91" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/COPYING;md5=4bd090a20bfcd1a18f1f79837b5e3e91" inherit native diff --git a/meta/recipes-core/gettext/gettext/0001-intl-Fix-build-failure-with-make-j.patch b/meta/recipes-core/gettext/gettext/0001-intl-Fix-build-failure-with-make-j.patch new file mode 100644 index 0000000000..144259dd3f --- /dev/null +++ b/meta/recipes-core/gettext/gettext/0001-intl-Fix-build-failure-with-make-j.patch @@ -0,0 +1,35 @@ +From 97a6a63ad61949663283f5fad68c9d5fb9be1f15 Mon Sep 17 00:00:00 2001 +From: Bruno Haible <bruno@clisp.org> +Date: Tue, 12 Sep 2023 11:33:41 +0200 +Subject: [PATCH] intl: Fix build failure with "make -j". + +Reported by Christian Weisgerber <naddy@mips.inka.de> at +<https://lists.gnu.org/archive/html/bug-gettext/2023-09/msg00005.html>. + +* gettext-runtime/intl/Makefile.am (langprefs.lo, log.lo): Depend on gettextP.h +and its subordinate includes. + +Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=97a6a63ad61949663283f5fad68c9d5fb9be1f15] +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + gettext-runtime/intl/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gettext-runtime/intl/Makefile.am b/gettext-runtime/intl/Makefile.am +index da7abb758..9e56978bc 100644 +--- a/gettext-runtime/intl/Makefile.am ++++ b/gettext-runtime/intl/Makefile.am +@@ -387,8 +387,8 @@ dngettext.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo + ngettext.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h + plural.lo: ../config.h $(srcdir)/plural-exp.h $(PLURAL_DEPS) + plural-exp.lo: ../config.h $(srcdir)/plural-exp.h +-langprefs.lo: ../config.h +-log.lo: ../config.h ++langprefs.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h ++log.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h + printf.lo: ../config.h + setlocale.lo: ../config.h $(srcdir)/gettextP.h libgnuintl.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h + version.lo: ../config.h libgnuintl.h +-- +2.25.1 + diff --git a/meta/recipes-core/gettext/gettext_0.22.5.bb b/meta/recipes-core/gettext/gettext_0.22.5.bb index 1a66d37916..7eeb1a86fd 100644 --- a/meta/recipes-core/gettext/gettext_0.22.5.bb +++ b/meta/recipes-core/gettext/gettext_0.22.5.bb @@ -28,6 +28,7 @@ SRC_URI += " \ file://serial-tests-config.patch \ file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \ file://0001-init-env.in-do-not-add-C-CXX-parameters.patch \ + file://0001-intl-Fix-build-failure-with-make-j.patch \ " inherit autotools texinfo pkgconfig ptest diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch b/meta/recipes-core/glib-2.0/files/0001-Do-not-write-bindir-into-pkg-config-files.patch index 8e6598fbef..10568b7c9f 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch +++ b/meta/recipes-core/glib-2.0/files/0001-Do-not-write-bindir-into-pkg-config-files.patch @@ -1,26 +1,30 @@ -From e7077aa23bfcd31a8e72e39dc93ce4f854678376 Mon Sep 17 00:00:00 2001 +From 10b08af6c7dcb03f954da29b6c4f9636b8796f30 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 15 Feb 2019 11:17:27 +0100 -Subject: [PATCH] Do not write $bindir into pkg-config files +Subject: [PATCH] Do not prefix executables with $bindir in pkg-config files -This would otherwise break when using the files to build other target +This would otherwise break when using the executables to build other target components (we need to rely on PATH containing the paths to utilities, rather than use target paths). Upstream-Status: Inappropriate [upstream wants the paths in .pc files] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- - gio/meson.build | 16 ++++++++-------- - glib/meson.build | 6 +++--- - 2 files changed, 11 insertions(+), 11 deletions(-) + gio/meson.build | 17 +++++++++-------- + glib/meson.build | 7 ++++--- + 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/gio/meson.build b/gio/meson.build -index 5f91586..1a95f4f 100644 +index 77cba7b..25d709e 100644 --- a/gio/meson.build +++ b/gio/meson.build -@@ -884,14 +884,14 @@ pkg.generate(libgio, +@@ -883,17 +883,18 @@ libgio_dep = declare_dependency(link_with : libgio, + pkg.generate(libgio, + requires : ['glib-2.0', 'gobject-2.0'], + variables : [ ++ 'bindir=' + '${prefix}' / get_option('bindir'), + 'schemasdir=' + '${datadir}' / schemas_subdir, 'dtdsdir=' + '${datadir}' / dtds_subdir, - 'bindir=' + '${prefix}' / get_option('bindir'), 'giomoduledir=' + pkgconfig_giomodulesdir, - 'gio=' + '${bindir}' / 'gio', - 'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules', @@ -42,16 +46,17 @@ index 5f91586..1a95f4f 100644 version : glib_version, install_dir : glib_pkgconfigreldir, diff --git a/glib/meson.build b/glib/meson.build -index c26a35e..1d8ca6b 100644 +index d2efeba..5f5841d 100644 --- a/glib/meson.build +++ b/glib/meson.build -@@ -447,9 +447,9 @@ pkg.generate(libglib, +@@ -447,9 +447,10 @@ pkg.generate(libglib, + subdirs : ['glib-2.0'], + extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, variables : [ - 'bindir=' + '${prefix}' / get_option('bindir'), - 'datadir=' + '${prefix}' / get_option('datadir'), - 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal', - 'gobject_query=' + '${bindir}' / 'gobject-query', - 'glib_mkenums=' + '${bindir}' / 'glib-mkenums', ++ 'bindir=' + '${prefix}' / get_option('bindir'), + 'glib_genmarshal=glib-genmarshal', + 'gobject_query=gobject-query', + 'glib_mkenums=glib-mkenums', diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch b/meta/recipes-core/glib-2.0/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch index eb9dfdbcf9..b9c9706fc4 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch +++ b/meta/recipes-core/glib-2.0/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch @@ -1,4 +1,4 @@ -From 9a5d4bf65b658d744d610ee27ecd2ae65b14b158 Mon Sep 17 00:00:00 2001 +From 55c49c51d8db5af15132653003d2b65a5215eebf Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 15 Mar 2014 22:42:29 -0700 Subject: [PATCH] Fix DATADIRNAME on uclibc/Linux diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch b/meta/recipes-core/glib-2.0/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch index ad69f7ec65..bc539fe3e8 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch +++ b/meta/recipes-core/glib-2.0/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch @@ -1,4 +1,4 @@ -From 4933aef791857a5aac650b60af800778658b875b Mon Sep 17 00:00:00 2001 +From 53333cf3ec787cb7e60585237327390e2ca89f4c Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen <jussi.kukkonen@intel.com> Date: Tue, 22 Mar 2016 15:14:58 +0200 Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM @@ -13,10 +13,10 @@ Upstream-Status: Inappropriate [OE specific] 1 file changed, 1 insertion(+) diff --git a/gio/meson.build b/gio/meson.build -index f9fdf6e..5f91586 100644 +index 59c2b0f..77cba7b 100644 --- a/gio/meson.build +++ b/gio/meson.build -@@ -1005,6 +1005,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu +@@ -1007,6 +1007,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu c_args : gio_c_args, # intl.lib is not compatible with SAFESEH link_args : noseh_link_args, diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/meta/recipes-core/glib-2.0/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch index 0e3a62af6a..5e543339d8 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch +++ b/meta/recipes-core/glib-2.0/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch @@ -1,4 +1,4 @@ -From 8ae2e9c2a04e089306693a021149dc6b7d1bd679 Mon Sep 17 00:00:00 2001 +From 3db055ce8029372096be534c5cfc385f068bab17 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 12 Jun 2015 17:08:46 +0300 Subject: [PATCH] Remove the warning about deprecated paths in schemas diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch b/meta/recipes-core/glib-2.0/files/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch index aee2986033..aa7127b65b 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch +++ b/meta/recipes-core/glib-2.0/files/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch @@ -1,4 +1,4 @@ -From 878e51f82100c698236fda0e069e14ea9249350c Mon Sep 17 00:00:00 2001 +From 97b4f18c65c52c9e6412ecf8affc22f6f42d3465 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 8 Jan 2020 18:22:46 +0100 Subject: [PATCH] gio/tests/resources.c: comment out a build host-only test @@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/resources.c b/gio/tests/resources.c -index f567914..b21b616 100644 +index f7dc039..f708876 100644 --- a/gio/tests/resources.c +++ b/gio/tests/resources.c @@ -1068,7 +1068,7 @@ main (int argc, diff --git a/meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch b/meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch new file mode 100644 index 0000000000..7be9cd8b84 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch @@ -0,0 +1,88 @@ +From f1beef5c2d09fae3a5e5a314f984cb3f20abe732 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Tue, 23 Apr 2024 11:24:34 +0200 +Subject: [PATCH] girepository/introspection: correctly install .gir files into + custom locations provided via meson option + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4020] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + girepository/introspection/meson.build | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/girepository/introspection/meson.build b/girepository/introspection/meson.build +index 9405686..862ca61 100644 +--- a/girepository/introspection/meson.build ++++ b/girepository/introspection/meson.build +@@ -49,6 +49,7 @@ glib_gir = gnome.generate_gir(libglib, + export_packages: 'glib-2.0', + header: 'glib.h', + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libgobject_dep, + ], +@@ -76,6 +77,7 @@ if host_system == 'windows' + header: 'glib.h', + includes: [ glib_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libgobject_dep, + ], +@@ -104,6 +106,7 @@ else + header: 'glib.h', + includes: [ glib_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libgobject_dep, + ], +@@ -137,6 +140,7 @@ gobject_gir = gnome.generate_gir(libgobject, + header: 'glib-object.h', + includes: [ glib_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + env: gi_gen_env_variables, + extra_args: gir_args + [ + '-DGOBJECT_COMPILATION', +@@ -162,6 +166,7 @@ gmodule_gir = gnome.generate_gir(libgmodule, + header: 'gmodule.h', + includes: [ glib_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libglib_dep, + ], +@@ -224,6 +229,7 @@ gio_gir = gnome.generate_gir(libgio, + header: 'gio/gio.h', + includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libglib_dep, + libgobject_dep, +@@ -249,6 +255,7 @@ if host_system == 'windows' + header: 'gio/gio.h', + includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libglib_dep, + libgobject_dep, +@@ -277,6 +284,7 @@ else + header: 'gio/gio.h', + includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libglib_dep, + libgobject_dep, +@@ -314,6 +322,7 @@ girepository_gir = gnome.generate_gir(libgirepository, + header: 'girepository/girepository.h', + includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep ], + extra_args: gir_args + libgirepository_gir_args, + ) diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch b/meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch index 0b10269114..3a8d3596b0 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch +++ b/meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch @@ -1,4 +1,4 @@ -From b4b523160ef550a53705fcc45ac6e10d086ce491 Mon Sep 17 00:00:00 2001 +From f04ea29f9f96892ada81bd0acfcef70183138229 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 12 Oct 2019 17:46:26 -0700 Subject: [PATCH] meson: Run atomics test on clang as well @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 6ee775e..8bc5fa7 100644 +index 257afb5..5caa6e6 100644 --- a/meson.build +++ b/meson.build -@@ -1938,7 +1938,7 @@ atomicdefine = ''' +@@ -2024,7 +2024,7 @@ atomicdefine = ''' # We know that we can always use real ("lock free") atomic operations with MSVC if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops') have_atomic_lock_free = true diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch b/meta/recipes-core/glib-2.0/files/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch index 14dcb278e0..9be04960aa 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch +++ b/meta/recipes-core/glib-2.0/files/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch @@ -1,4 +1,4 @@ -From 294f3e6e9a0a9f4733e85ed6810d1b743055370b Mon Sep 17 00:00:00 2001 +From a63c865aa9a24f3230e8e2bcb5bce88f179c7e2b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex@linutronix.de> Date: Sat, 16 Sep 2023 22:28:27 +0200 Subject: [PATCH] meson.build: do not enable pidfd features on native glib @@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de> 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build -index 8bc5fa7..df1fa60 100644 +index 5caa6e6..688f214 100644 --- a/meson.build +++ b/meson.build -@@ -981,7 +981,8 @@ if cc.links('''#include <sys/syscall.h> +@@ -1022,7 +1022,8 @@ if cc.links('''#include <sys/syscall.h> waitid (P_PIDFD, 0, &child_info, WEXITED | WNOHANG); return 0; }''', name : 'pidfd_open(2) system call') diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/meta/recipes-core/glib-2.0/files/0010-Do-not-hardcode-python-path-into-various-tools.patch index 6dff5179c7..4dec252c1f 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch +++ b/meta/recipes-core/glib-2.0/files/0010-Do-not-hardcode-python-path-into-various-tools.patch @@ -1,4 +1,4 @@ -From 50636758c73e5e61212a8f801c6c602b8aab5ba7 Mon Sep 17 00:00:00 2001 +From dc7f09c4f52638a70768c528d186da6f83dedc97 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 3 Oct 2017 10:45:55 +0300 Subject: [PATCH] Do not hardcode python path into various tools @@ -32,7 +32,7 @@ index aa5af43..56e8e2e 100755 # pylint: disable=too-many-lines, missing-docstring, invalid-name diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in -index 353e53a..8ed6c39 100755 +index e10b910..4b619f8 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -1,4 +1,4 @@ diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common b/meta/recipes-core/glib-2.0/files/meson.cross.d/common index 0d7c5fa3f8..0d7c5fa3f8 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc index 3049e5116e..3049e5116e 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux index adad7e62ee..adad7e62ee 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw index 75f911ba1e..75f911ba1e 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl index 3049e5116e..3049e5116e 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/meta/recipes-core/glib-2.0/files/relocate-modules.patch index 3e79bbf679..a1ff198aa6 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +++ b/meta/recipes-core/glib-2.0/files/relocate-modules.patch @@ -1,4 +1,4 @@ -From f40e89b3852df37959606ee13b1a14ade81fa886 Mon Sep 17 00:00:00 2001 +From 0133aeabd37a9137722abd86039d7d0797b5896f 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 @@ -18,10 +18,10 @@ Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 1 file changed, 7 deletions(-) diff --git a/gio/giomodule.c b/gio/giomodule.c -index 17fabe6..8021208 100644 +index 1e14955..3c09bb5 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c -@@ -1271,11 +1271,6 @@ get_gio_module_dir (void) +@@ -1259,11 +1259,6 @@ get_gio_module_dir (void) g_free (install_dir); #else module_dir = g_strdup (GIO_MODULE_DIR); @@ -33,7 +33,7 @@ index 17fabe6..8021208 100644 #include <dlfcn.h> { g_autofree gchar *path = NULL; -@@ -1294,8 +1289,6 @@ get_gio_module_dir (void) +@@ -1282,8 +1277,6 @@ get_gio_module_dir (void) } } } diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/files/run-ptest index 831bc3b91f..831bc3b91f 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest +++ b/meta/recipes-core/glib-2.0/files/run-ptest diff --git a/meta/recipes-core/glib-2.0/files/skip-timeout.patch b/meta/recipes-core/glib-2.0/files/skip-timeout.patch new file mode 100644 index 0000000000..0f8b51294b --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/skip-timeout.patch @@ -0,0 +1,29 @@ +From ac75f5d9206e52eec64fef0db4cd91b58a764c99 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Thu, 28 Mar 2024 16:27:09 +0000 +Subject: [PATCH] Skip /timeout/rounding test + +This test is sensitive to load because it expects certain timeout operations +to succeed in specific time periods. Whilst these timeouts are fairly large, +they're still exceeded inside a qemu on a loaded system. + +https://bugzilla.yoctoproject.org/show_bug.cgi?id=14464 + +Upstream-Status: Inappropriate [OE-specific] +Signed-off-by: Ross Burton <ross.burton@arm.com> +--- + glib/tests/timeout.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c +index 1ae3f3a..85a715b 100644 +--- a/glib/tests/timeout.c ++++ b/glib/tests/timeout.c +@@ -214,7 +214,6 @@ main (int argc, char *argv[]) + g_test_add_func ("/timeout/seconds-once", test_seconds_once); + g_test_add_func ("/timeout/weeks-overflow", test_weeks_overflow); + g_test_add_func ("/timeout/far-future-ready-time", test_far_future_ready_time); +- g_test_add_func ("/timeout/rounding", test_rounding); + + return g_test_run (); + } diff --git a/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.2.bb b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.2.bb new file mode 100644 index 0000000000..7da2838265 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.2.bb @@ -0,0 +1,5 @@ +require glib.inc +PACKAGES = "" +PACKAGECONFIG = "" + + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch deleted file mode 100644 index 32b4cea409..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch +++ /dev/null @@ -1,80 +0,0 @@ -From c0733f7a91dfe13152abc60c5a3064456b3e9d63 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 13 Feb 2019 15:32:05 +0100 -Subject: [PATCH] Set host_machine correctly when building with mingw32 - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - gio/tests/meson.build | 8 ++++---- - glib/tests/meson.build | 2 +- - meson.build | 3 +++ - 3 files changed, 8 insertions(+), 5 deletions(-) - -diff --git a/gio/tests/meson.build b/gio/tests/meson.build -index 4ef3343..e498e7e 100644 ---- a/gio/tests/meson.build -+++ b/gio/tests/meson.build -@@ -29,7 +29,7 @@ endif - - test_cpp_args = test_c_args - --if host_machine.system() == 'windows' -+if host_system == 'windows' - common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] - endif - -@@ -230,7 +230,7 @@ if have_dbus_daemon - endif - - # Test programs buildable on UNIX only --if host_machine.system() != 'windows' -+if host_system != 'windows' - gio_tests += { - 'file' : {}, - 'gdbus-peer-object-manager' : {}, -@@ -562,7 +562,7 @@ if host_machine.system() != 'windows' - endif # unix - - # Test programs buildable on Windows only --if host_machine.system() == 'windows' -+if host_system == 'windows' - gio_tests += {'win32-streams' : {}} - endif - -@@ -632,7 +632,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' - } - endif - --if host_machine.system() != 'windows' -+if host_system != 'windows' - test_extra_programs += { - 'gdbus-example-unix-fd-client' : { - 'install' : false, -diff --git a/glib/tests/meson.build b/glib/tests/meson.build -index d80c86e..5329cda 100644 ---- a/glib/tests/meson.build -+++ b/glib/tests/meson.build -@@ -216,7 +216,7 @@ if glib_conf.has('HAVE_EVENTFD') - } - endif - --if host_machine.system() == 'windows' -+if host_system == 'windows' - if winsock2.found() - glib_tests += { - 'gpoll' : { -diff --git a/meson.build b/meson.build -index 813c9b7..6ee775e 100644 ---- a/meson.build -+++ b/meson.build -@@ -54,6 +54,9 @@ else - endif - - host_system = host_machine.system() -+if host_system == 'mingw32' -+ host_system = 'windows' -+endif - - if host_system == 'darwin' - ios_test_code = '''#include <TargetConditionals.h> diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch deleted file mode 100644 index b11c283e6d..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch +++ /dev/null @@ -1,34 +0,0 @@ -From a8eb944a10353403241608a084787f6efcbb2eb7 Mon Sep 17 00:00:00 2001 -From: Jordan Williams <jordan@jwillikers.com> -Date: Fri, 1 Dec 2023 09:53:50 -0600 -Subject: [PATCH] Switch from the deprecated distutils module to the packaging - module - -The distutils module was removed in Python 3.12. - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291] - -Signed-off-by: Martin Jansa <martin.jansa@gmail.com> ---- - gio/gdbus-2.0/codegen/utils.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py -index 0204610..08f1ba9 100644 ---- a/gio/gdbus-2.0/codegen/utils.py -+++ b/gio/gdbus-2.0/codegen/utils.py -@@ -19,7 +19,7 @@ - # - # Author: David Zeuthen <davidz@redhat.com> - --import distutils.version -+import packaging.version - import os - import sys - -@@ -166,4 +166,4 @@ def version_cmp_key(key): - v = str(key[0]) - else: - v = "0" -- return (distutils.version.LooseVersion(v), key[1]) -+ return (packaging.version.Version(v), key[1]) diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch deleted file mode 100644 index bdfbd55899..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch +++ /dev/null @@ -1,54 +0,0 @@ -From cce3ae98a2c1966719daabff5a4ec6cf94a846f6 Mon Sep 17 00:00:00 2001 -From: Philip Withnall <pwithnall@gnome.org> -Date: Mon, 26 Feb 2024 16:55:44 +0000 -Subject: [PATCH] tests: Remove variable-length lookbehind tests for GRegex -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -PCRE2 10.43 has now introduced support for variable-length lookbehind, -so these tests now fail if GLib is built against PCRE2 10.43 or higher. - -See -https://github.com/PCRE2Project/pcre2/blob/e8db6fa7137f4c6f66cb87e0a3c9467252ec1ef7/ChangeLog#L94. - -Rather than making the tests conditional on the version of PCRE2 in use, -just remove them. They are mostly testing the PCRE2 code rather than -any code in GLib, so don’t have much value. - -This should fix CI runs on msys2-mingw32, which updated to PCRE2 10.43 2 -days ago. - -Signed-off-by: Philip Withnall <pwithnall@gnome.org> - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/cce3ae98a2c1966719daabff5a4ec6cf94a846f6] -Signed-off-by: Alexander Kanavin <alex@linutronix.de> ---- - glib/tests/regex.c | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/glib/tests/regex.c b/glib/tests/regex.c -index 1082526292..d7a698ec67 100644 ---- a/glib/tests/regex.c -+++ b/glib/tests/regex.c -@@ -1885,16 +1885,6 @@ test_lookbehind (void) - g_match_info_free (match); - g_regex_unref (regex); - -- regex = g_regex_new ("(?<!dogs?|cats?) x", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error); -- g_assert (regex == NULL); -- g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND); -- g_clear_error (&error); -- -- regex = g_regex_new ("(?<=ab(c|de)) foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error); -- g_assert (regex == NULL); -- g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND); -- g_clear_error (&error); -- - regex = g_regex_new ("(?<=abc|abde)foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error); - g_assert (regex); - g_assert_no_error (error); --- -GitLab - - diff --git a/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch b/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch deleted file mode 100644 index 4f38509da6..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch +++ /dev/null @@ -1,361 +0,0 @@ -From ce840b6b111e1e109e511f6833d6aa419e2b723a Mon Sep 17 00:00:00 2001 -From: Philip Withnall <philip@tecnocode.co.uk> -Date: Tue, 23 Jan 2024 11:16:52 +0000 -Subject: [PATCH] Merge branch '2887-memory-monitor-tests' into 'main' - -tests: Fix race condition in memory-monitor-dbus.test - -Closes #2887 - -See merge request GNOME/glib!3844 - -Hopefully these commits fix the occasional failures we've been seeing: -https://bugzilla.yoctoproject.org/show_bug.cgi?id=15362 - -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@arm.com> ---- - gio/tests/memory-monitor-dbus.py.in | 64 +++++++++++++------- - gio/tests/memory-monitor-portal.py.in | 54 ++++++++++------- - gio/tests/power-profile-monitor-dbus.py.in | 35 ++++++----- - gio/tests/power-profile-monitor-portal.py.in | 34 ++++++----- - 4 files changed, 113 insertions(+), 74 deletions(-) - -diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in -index bf32918..7aae01e 100755 ---- a/gio/tests/memory-monitor-dbus.py.in -+++ b/gio/tests/memory-monitor-dbus.py.in -@@ -16,7 +16,6 @@ import sys - import subprocess - import fcntl - import os --import time - - import taptestrunner - -@@ -57,53 +56,74 @@ try: - fcntl.fcntl(self.p_mock.stdout, fcntl.F_SETFL, flags | os.O_NONBLOCK) - self.last_warning = -1 - self.dbusmock = dbus.Interface(self.obj_lmm, dbusmock.MOCK_IFACE) -+ -+ try: -+ self.wait_for_bus_object('org.freedesktop.LowMemoryMonitor', -+ '/org/freedesktop/LowMemoryMonitor', -+ system_bus=True) -+ except: -+ raise -+ - self.memory_monitor = Gio.MemoryMonitor.dup_default() -+ assert("GMemoryMonitorDBus" in str(self.memory_monitor)) - self.memory_monitor.connect("low-memory-warning", self.memory_warning_cb) - self.mainloop = GLib.MainLoop() - self.main_context = self.mainloop.get_context() - -+ # The LowMemoryMonitor API is stateless: it doesn’t expose any -+ # properties, just a warning signal. Emit the signal in a loop until -+ # the GMemoryMonitor instance has initialised and synchronised to -+ # the right state. -+ def emit_warning(level): -+ self.dbusmock.EmitWarning(level) -+ return GLib.SOURCE_CONTINUE -+ -+ idle_id = GLib.idle_add(emit_warning, 0) -+ while self.last_warning != 0: -+ self.main_context.iteration(True) -+ GLib.source_remove(idle_id) -+ - def tearDown(self): - self.p_mock.terminate() - self.p_mock.wait() - -- def assertEventually(self, condition, message=None, timeout=50): -+ def assertEventually(self, condition, message=None, timeout=5): - '''Assert that condition function eventually returns True. - -- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is -+ Timeout is in seconds, defaulting to 5 seconds. message is - printed on failure. - ''' -- while timeout >= 0: -- context = GLib.MainContext.default() -- while context.iteration(False): -- pass -- if condition(): -- break -- timeout -= 1 -- time.sleep(0.1) -- else: -- self.fail(message or 'timed out waiting for ' + str(condition)) -+ if not message: -+ message = 'timed out waiting for ' + str(condition) -+ -+ def timed_out_cb(message): -+ self.fail(message) -+ return GLib.SOURCE_REMOVE -+ -+ timeout_source = GLib.timeout_source_new_seconds(timeout) -+ timeout_source.set_callback(timed_out_cb, message) -+ timeout_source.attach(self.main_context) -+ -+ while not condition(): -+ self.main_context.iteration(True) -+ -+ timeout_source.destroy() - - def memory_warning_cb(self, monitor, level): -+ print("Received memory warning signal, level", level) - self.last_warning = level - self.main_context.wakeup() - - def test_low_memory_warning_signal(self): - '''LowMemoryWarning signal''' - -- # Wait 2 seconds -- timeout = 2 -- while timeout > 0: -- time.sleep(0.5) -- timeout -= 0.5 -- self.main_context.iteration(False) -- - self.dbusmock.EmitWarning(100) - # Wait 2 seconds or until warning -- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20) -+ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 2) - - self.dbusmock.EmitWarning(255) - # Wait 2 seconds or until warning -- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20) -+ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 2) - - except ImportError as e: - @unittest.skip("Cannot import %s" % e.name) -diff --git a/gio/tests/memory-monitor-portal.py.in b/gio/tests/memory-monitor-portal.py.in -index 748cee8..f570508 100755 ---- a/gio/tests/memory-monitor-portal.py.in -+++ b/gio/tests/memory-monitor-portal.py.in -@@ -16,7 +16,6 @@ import sys - import subprocess - import fcntl - import os --import time - - import taptestrunner - -@@ -80,26 +79,44 @@ try: - self.mainloop = GLib.MainLoop() - self.main_context = self.mainloop.get_context() - -+ # The LowMemoryMonitor API is stateless: it doesn’t expose any -+ # properties, just a warning signal. Emit the signal in a loop until -+ # the GMemoryMonitor instance has initialised and synchronised to -+ # the right state. -+ def emit_warning(level): -+ self.dbusmock.EmitWarning(level) -+ return GLib.SOURCE_CONTINUE -+ -+ idle_id = GLib.idle_add(self.emit_warning, 0) -+ while self.last_warning != 0: -+ self.main_context.iteration(True) -+ GLib.source_remove(idle_id) -+ - def tearDown(self): - self.p_mock.terminate() - self.p_mock.wait() - -- def assertEventually(self, condition, message=None, timeout=50): -+ def assertEventually(self, condition, message=None, timeout=5): - '''Assert that condition function eventually returns True. - -- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is -+ Timeout is in seconds, defaulting to 5 seconds. message is - printed on failure. - ''' -- while timeout >= 0: -- context = GLib.MainContext.default() -- while context.iteration(False): -- pass -- if condition(): -- break -- timeout -= 1 -- time.sleep(0.1) -- else: -- self.fail(message or 'timed out waiting for ' + str(condition)) -+ if not message: -+ message = 'timed out waiting for ' + str(condition) -+ -+ def timed_out_cb(message): -+ self.fail(message) -+ return GLib.SOURCE_REMOVE -+ -+ timeout_source = GLib.timeout_source_new_seconds(timeout) -+ timeout_source.set_callback(timed_out_cb, message) -+ timeout_source.attach(self.main_context) -+ -+ while not condition(): -+ self.main_context.iteration(True) -+ -+ timeout_source.destroy() - - def portal_memory_warning_cb(self, monitor, level): - self.last_warning = level -@@ -108,20 +125,13 @@ try: - def test_low_memory_warning_portal_signal(self): - '''LowMemoryWarning signal''' - -- # Wait 2 seconds -- timeout = 2 -- while timeout > 0: -- time.sleep(0.5) -- timeout -= 0.5 -- self.main_context.iteration(False) -- - self.dbusmock.EmitWarning(100) - # Wait 2 seconds or until warning -- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20) -+ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 2) - - self.dbusmock.EmitWarning(255) - # Wait 2 seconds or until warning -- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20) -+ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 2) - - except ImportError as e: - @unittest.skip("Cannot import %s" % e.name) -diff --git a/gio/tests/power-profile-monitor-dbus.py.in b/gio/tests/power-profile-monitor-dbus.py.in -index 06e594f..f955afc 100755 ---- a/gio/tests/power-profile-monitor-dbus.py.in -+++ b/gio/tests/power-profile-monitor-dbus.py.in -@@ -16,7 +16,6 @@ import sys - import subprocess - import fcntl - import os --import time - - import taptestrunner - -@@ -58,6 +57,7 @@ try: - self.power_saver_enabled = False - self.dbus_props = dbus.Interface(self.obj_ppd, dbus.PROPERTIES_IFACE) - self.power_profile_monitor = Gio.PowerProfileMonitor.dup_default() -+ assert("GPowerProfileMonitorDBus" in str(self.power_profile_monitor)) - self.power_profile_monitor.connect("notify::power-saver-enabled", self.power_saver_enabled_cb) - self.mainloop = GLib.MainLoop() - self.main_context = self.mainloop.get_context() -@@ -66,22 +66,27 @@ try: - self.p_mock.terminate() - self.p_mock.wait() - -- def assertEventually(self, condition, message=None, timeout=50): -+ def assertEventually(self, condition, message=None, timeout=5): - '''Assert that condition function eventually returns True. - -- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is -+ Timeout is in seconds, defaulting to 5 seconds. message is - printed on failure. - ''' -- while timeout >= 0: -- context = GLib.MainContext.default() -- while context.iteration(False): -- pass -- if condition(): -- break -- timeout -= 1 -- time.sleep(0.1) -- else: -- self.fail(message or 'timed out waiting for ' + str(condition)) -+ if not message: -+ message = 'timed out waiting for ' + str(condition) -+ -+ def timed_out_cb(message): -+ self.fail(message) -+ return GLib.SOURCE_REMOVE -+ -+ timeout_source = GLib.timeout_source_new_seconds(timeout) -+ timeout_source.set_callback(timed_out_cb, message) -+ timeout_source.attach(self.main_context) -+ -+ while not condition(): -+ self.main_context.iteration(True) -+ -+ timeout_source.destroy() - - def power_saver_enabled_cb(self, spec, data): - self.power_saver_enabled = self.power_profile_monitor.get_power_saver_enabled() -@@ -92,10 +97,10 @@ try: - - self.assertEqual(self.power_profile_monitor.get_power_saver_enabled(), False) - self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('power-saver', variant_level=1)) -- self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 10) -+ self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 1) - - self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('balanced', variant_level=1)) -- self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 10) -+ self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 1) - - except ImportError as e: - @unittest.skip("Cannot import %s" % e.name) -diff --git a/gio/tests/power-profile-monitor-portal.py.in b/gio/tests/power-profile-monitor-portal.py.in -index 09e9a45..ad2abf6 100755 ---- a/gio/tests/power-profile-monitor-portal.py.in -+++ b/gio/tests/power-profile-monitor-portal.py.in -@@ -16,7 +16,6 @@ import sys - import subprocess - import fcntl - import os --import time - - import taptestrunner - -@@ -90,22 +89,27 @@ try: - self.p_mock.terminate() - self.p_mock.wait() - -- def assertEventually(self, condition, message=None, timeout=50): -+ def assertEventually(self, condition, message=None, timeout=5): - '''Assert that condition function eventually returns True. - -- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is -+ Timeout is in seconds, defaulting to 5 seconds. message is - printed on failure. - ''' -- while timeout >= 0: -- context = GLib.MainContext.default() -- while context.iteration(False): -- pass -- if condition(): -- break -- timeout -= 1 -- time.sleep(0.1) -- else: -- self.fail(message or 'timed out waiting for ' + str(condition)) -+ if not message: -+ message = 'timed out waiting for ' + str(condition) -+ -+ def timed_out_cb(message): -+ self.fail(message) -+ return GLib.SOURCE_REMOVE -+ -+ timeout_source = GLib.timeout_source_new_seconds(timeout) -+ timeout_source.set_callback(timed_out_cb, message) -+ timeout_source.attach(self.main_context) -+ -+ while not condition(): -+ self.main_context.iteration(True) -+ -+ timeout_source.destroy() - - def power_saver_enabled_cb(self, spec, data): - self.power_saver_enabled = self.power_profile_monitor.get_power_saver_enabled() -@@ -116,10 +120,10 @@ try: - - self.assertEqual(self.power_profile_monitor.get_power_saver_enabled(), False) - self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('power-saver', variant_level=1)) -- self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 10) -+ self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 1) - - self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('balanced', variant_level=1)) -- self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 10) -+ self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 1) - - def test_power_profile_power_saver_enabled_portal_default(self): - '''power-saver-enabled property default value''' diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb deleted file mode 100644 index f0fd057be7..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb +++ /dev/null @@ -1,56 +0,0 @@ -require glib.inc - -PE = "1" - -SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ - file://run-ptest \ - file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ - file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ - file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ - file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ - file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ - file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ - file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ - file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ - file://0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch \ - file://memory-monitor.patch \ - file://fix-regex.patch \ - " -SRC_URI:append:class-native = " file://relocate-modules.patch \ - file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ - " - -SRC_URI[sha256sum] = "24b8e0672dca120cc32d394bccb85844e732e04fe75d18bb0573b2dbc7548f63" - -# Find any meson cross files in FILESPATH that are relevant for the current -# build (using siteinfo) and add them to EXTRA_OEMESON. -inherit siteinfo -def find_meson_cross_files(d): - if bb.data.inherits_class('native', d): - return "" - - thisdir = os.path.normpath(d.getVar("THISDIR")) - import collections - sitedata = siteinfo_data(d) - # filename -> found - files = collections.OrderedDict() - for path in d.getVar("FILESPATH").split(":"): - for element in sitedata: - filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) - sanitized_path = filename.replace(thisdir, "${THISDIR}") - if sanitized_path == filename: - if os.path.exists(filename): - bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir)) - continue - files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) - - items = ["--cross-file=" + k for k,v in files.items() if v] - d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) - items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] - d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) - -python () { - find_meson_cross_files(d) -} diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.80.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.80.2.bb new file mode 100644 index 0000000000..ef80cc47cf --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.80.2.bb @@ -0,0 +1,2 @@ +require glib.inc + diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index fac8875d84..690d1c162c 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc @@ -28,21 +28,26 @@ PACKAGES += "${PN}-codegen ${PN}-utils" LEAD_SONAME = "libglib-2.0.*" -inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data - -GTKDOC_MESON_OPTION = "gtk_doc" +inherit meson gettext gi-docgen pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data S = "${WORKDIR}/glib-${PV}" +GIDOCGEN_MESON_OPTION = "documentation" + PACKAGECONFIG ??= "libmount \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'introspection', '', d)} \ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG:class-native = "" + PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" -PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" +PACKAGECONFIG[manpages] = "-Dman-pages=enabled, -Dman-pages=disabled, python3-docutils-native" PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils" PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" +PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,gobject-introspection-native gobject-introspection glib-2.0-initial" EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" +EXTRA_OEMESON:append:class-target = " ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''}" do_configure:prepend() { sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in @@ -53,14 +58,16 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS} \ ${libexecdir}/*gio-querymodules \ ${libexecdir}/*gio-launch-desktop \ ${datadir}/glib-2.0/dtds \ - ${datadir}/glib-2.0/schemas" - + ${datadir}/glib-2.0/schemas \ + ${libdir}/girepository-*/*.typelib \ +" FILES:${PN}-dev += "${libdir}/glib-2.0/include \ ${libdir}/gio/modules/lib*${SOLIBSDEV} \ ${libdir}/gio/modules/*.la \ ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ ${datadir}/glib-2.0/schemas/gschema.dtd \ ${datadir}/glib-2.0/valgrind/glib.supp \ + ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir \ ${datadir}/gettext/its" FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ @@ -204,3 +211,56 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\ locale-base-pl-pl.iso-8859-2 \ locale-base-tr-tr \ " + +PE = "1" + +SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ + file://run-ptest \ + file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ + file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ + file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ + file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ + file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ + file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ + file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ + file://skip-timeout.patch \ + file://0001-girepository-introspection-correctly-install-.gir-fi.patch \ + " +SRC_URI:append:class-native = " file://relocate-modules.patch \ + file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ + " + +SRC_URI[sha256sum] = "b9cfb6f7a5bd5b31238fd5d56df226b2dda5ea37611475bf89f6a0f9400fe8bd" + +# Find any meson cross files in FILESPATH that are relevant for the current +# build (using siteinfo) and add them to EXTRA_OEMESON. +inherit siteinfo +def find_meson_cross_files(d): + if bb.data.inherits_class('native', d): + return "" + + thisdir = os.path.normpath(d.getVar("THISDIR")) + import collections + sitedata = siteinfo_data(d) + # filename -> found + files = collections.OrderedDict() + for path in d.getVar("FILESPATH").split(":"): + for element in sitedata: + filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) + sanitized_path = filename.replace(thisdir, "${THISDIR}") + if sanitized_path == filename: + if os.path.exists(filename): + bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir)) + continue + files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) + + items = ["--cross-file=" + k for k,v in files.items() if v] + d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) + items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] + d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) + +python () { + find_meson_cross_files(d) +} diff --git a/meta/recipes-core/glibc/glibc-common.inc b/meta/recipes-core/glibc/glibc-common.inc index b9516e77f0..91a3f5bcd5 100644 --- a/meta/recipes-core/glibc/glibc-common.inc +++ b/meta/recipes-core/glibc/glibc-common.inc @@ -2,7 +2,7 @@ SUMMARY = "GLIBC (GNU C Library)" DESCRIPTION = "The GNU C Library is used as the system C library in most systems with the Linux kernel." HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" SECTION = "libs" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LICENSE = "GPL-2.0-only & LGPL-2.1-or-later" LIC_FILES_CHKSUM ?= "file://LICENSES;md5=f77e878d320e99e94ae9a4aea7f491d1 \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 1ef987be0a..0c5e3b4c3d 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc @@ -69,9 +69,9 @@ inherit multilib_header do_install() { oe_runmake install_root=${D} install - install -Dm 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ld.so.conf + install -Dm 0644 ${UNPACKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/ld.so.conf install -d ${D}${localedir} - make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" + make -f ${UNPACKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED" # get rid of some broken files... for i in ${GLIBC_BROKEN_LOCALES}; do sed -i "/$i/d" ${WORKDIR}/SUPPORTED @@ -101,7 +101,7 @@ do_install() { install -d ${D}${localstatedir}/db/nscd install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf - install -m 0755 ${WORKDIR}/makedbs.sh ${D}${localstatedir}/db + install -m 0755 ${UNPACKDIR}/makedbs.sh ${D}${localstatedir}/db sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd sed -i "s|\(enable-cache\t\+netgroup\t\+\)yes|\1no|" ${D}${sysconfdir}/nscd.conf diff --git a/meta/recipes-core/glibc/glibc-testsuite_2.39.bb b/meta/recipes-core/glibc/glibc-testsuite_2.39.bb index 2e076f4b0f..3a2764e40b 100644 --- a/meta/recipes-core/glibc/glibc-testsuite_2.39.bb +++ b/meta/recipes-core/glibc/glibc-testsuite_2.39.bb @@ -18,7 +18,7 @@ TOOLCHAIN_TEST_HOST_PORT ??= "2222" do_check[nostamp] = "1" do_check[network] = "1" do_check:append () { - chmod 0755 ${WORKDIR}/check-test-wrapper + chmod 0755 ${UNPACKDIR}/check-test-wrapper oe_runmake -i \ QEMU_SYSROOT="${RECIPE_SYSROOT}" \ @@ -26,7 +26,7 @@ do_check:append () { SSH_HOST="${TOOLCHAIN_TEST_HOST}" \ SSH_HOST_USER="${TOOLCHAIN_TEST_HOST_USER}" \ SSH_HOST_PORT="${TOOLCHAIN_TEST_HOST_PORT}" \ - test-wrapper="${WORKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \ + test-wrapper="${UNPACKDIR}/check-test-wrapper ${TOOLCHAIN_TEST_TARGET}" \ check } diff --git a/meta/recipes-core/glibc/glibc-version.inc b/meta/recipes-core/glibc/glibc-version.inc index 618a574566..20125e4339 100644 --- a/meta/recipes-core/glibc/glibc-version.inc +++ b/meta/recipes-core/glibc/glibc-version.inc @@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.39/master" PV = "2.39+git" -SRCREV_glibc ?= "1b9c1a0047fb26a65a9b2a7b8cd977243f7d353c" +SRCREV_glibc ?= "c7c3f5bf80ae86b34501f473f1a9fc545c911b7f" SRCREV_localedef ?= "fab74f31b3811df543e24b6de47efdf45b538abc" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git;protocol=https" diff --git a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb index be49ca4cb7..b760230aec 100644 --- a/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb +++ b/meta/recipes-core/glibc/glibc-y2038-tests_2.39.bb @@ -76,7 +76,7 @@ do_install_ptest_base () { done install -d ${D}${PTEST_PATH} - cp ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/ + cp ${UNPACKDIR}/run-ptest ${D}${PTEST_PATH}/ } diff --git a/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch b/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch index 066c3b1ea2..9bdfa76318 100644 --- a/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch +++ b/meta/recipes-core/glibc/glibc/0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch @@ -11,16 +11,15 @@ Upstream-Status: Inappropriate [ OE-Specific ] Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - sysdeps/aarch64/bits/wordsize.h | 8 ++++++-- - sysdeps/arm/bits/wordsize.h | 1 + - 2 files changed, 7 insertions(+), 2 deletions(-) - create mode 120000 sysdeps/arm/bits/wordsize.h + sysdeps/aarch64/bits/wordsize.h | 11 +++++++++-- + sysdeps/arm/bits/wordsize.h | 22 +--------------------- + 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h -index 118e59172d..b4b0692eb5 100644 +index 118e59172d..ff86359fe8 100644 --- a/sysdeps/aarch64/bits/wordsize.h +++ b/sysdeps/aarch64/bits/wordsize.h -@@ -17,12 +17,16 @@ +@@ -17,12 +17,19 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ @@ -33,12 +32,42 @@ index 118e59172d..b4b0692eb5 100644 # define __WORDSIZE32_SIZE_ULONG 1 # define __WORDSIZE32_PTRDIFF_LONG 1 +#else -+# define __WORDSIZE 32 -+# define __WORDSIZE32_SIZE_ULONG 0 -+# define __WORDSIZE32_PTRDIFF_LONG 0 ++#define __WORDSIZE 32 ++#define __WORDSIZE_TIME64_COMPAT32 1 ++#define __WORDSIZE32_SIZE_ULONG 0 ++#define __WORDSIZE32_PTRDIFF_LONG 0 #endif ++#ifdef __aarch64__ #define __WORDSIZE_TIME64_COMPAT32 0 ++#endif +diff --git a/sysdeps/arm/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h +deleted file mode 100644 +index 6ecbfe7c86..0000000000 +--- a/sysdeps/arm/bits/wordsize.h ++++ /dev/null +@@ -1,21 +0,0 @@ +-/* Copyright (C) 1999-2024 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/>. */ +- +-#define __WORDSIZE 32 +-#define __WORDSIZE_TIME64_COMPAT32 1 +-#define __WORDSIZE32_SIZE_ULONG 0 +-#define __WORDSIZE32_PTRDIFF_LONG 0 diff --git a/sysdeps/arm/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h new file mode 120000 index 0000000000..4c4a788ec2 diff --git a/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch b/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch deleted file mode 100644 index f6523c5498..0000000000 --- a/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 73c26018ed0ecd9c807bb363cc2c2ab4aca66a82 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy <szabolcs.nagy@arm.com> -Date: Wed, 13 Mar 2024 14:34:14 +0000 -Subject: [PATCH] aarch64: fix check for SVE support in assembler - -Due to GCC bug 110901 -mcpu can override -march setting when compiling -asm code and thus a compiler targetting a specific cpu can fail the -configure check even when binutils gas supports SVE. - -The workaround is that explicit .arch directive overrides both -mcpu -and -march, and since that's what the actual SVE memcpy uses the -configure check should use that too even if the GCC issue is fixed -independently. - -Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=73c26018ed0ecd9c807bb363cc2c2ab4aca66a82] -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Reviewed-by: Florian Weimer <fweimer@redhat.com> ---- - sysdeps/aarch64/configure | 5 +++-- - sysdeps/aarch64/configure.ac | 5 +++-- - 2 files changed, 6 insertions(+), 4 deletions(-) - mode change 100644 => 100755 sysdeps/aarch64/configure - -diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure -old mode 100644 -new mode 100755 -index ca57edce47..9606137e8d ---- a/sysdeps/aarch64/configure -+++ b/sysdeps/aarch64/configure -@@ -325,9 +325,10 @@ then : - printf %s "(cached) " >&6 - else $as_nop - cat > conftest.s <<\EOF -- ptrue p0.b -+ .arch armv8.2-a+sve -+ ptrue p0.b - EOF --if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5' -+if { ac_try='${CC-cc} -c conftest.s 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? -diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac -index 27874eceb4..56d12d661d 100644 ---- a/sysdeps/aarch64/configure.ac -+++ b/sysdeps/aarch64/configure.ac -@@ -90,9 +90,10 @@ LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs]) - # Check if asm support armv8.2-a+sve - AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl - cat > conftest.s <<\EOF -- ptrue p0.b -+ .arch armv8.2-a+sve -+ ptrue p0.b - EOF --if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then -+if AC_TRY_COMMAND(${CC-cc} -c conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_aarch64_sve_asm=yes - else - libc_cv_aarch64_sve_asm=no --- -2.44.0 - diff --git a/meta/recipes-core/glibc/glibc/0023-qemu-stale-process.patch b/meta/recipes-core/glibc/glibc/0023-qemu-stale-process.patch new file mode 100644 index 0000000000..c0a467fcec --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0023-qemu-stale-process.patch @@ -0,0 +1,45 @@ +glibc: Skip 2 qemu tests that can hang in oe-selftest + +qemumips and qemuppc were leaving stale processes behind after +running glibc oe-selftest. During analysis, it was found that +it was due to "tst-scm_rights" and "tst-scm_rights-time64" tests. +Disable them so that there are no stale processes left behind. + +[YOCTO #15423] +https://bugzilla.yoctoproject.org/show_bug.cgi?id=15423 + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> +--- +diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile +--- a/sysdeps/unix/sysv/linux/Makefile 2024-03-18 01:15:49.019202881 -0700 ++++ b/sysdeps/unix/sysv/linux/Makefile 2024-03-14 06:26:18.581404107 -0700 +@@ -222,7 +222,6 @@ + tst-process_mrelease \ + tst-quota \ + tst-rlimit-infinity \ +- tst-scm_rights \ + tst-sigtimedwait \ + tst-sync_file_range \ + tst-sysconf-iov_max \ +@@ -233,6 +232,8 @@ + tst-timerfd \ + tst-ttyname-direct \ + tst-ttyname-namespace \ ++ # Skip this test to avoid stale qemu process ++ # tst-scm_rights \ + # tests + + # process_madvise requires CAP_SYS_ADMIN. +@@ -270,9 +271,10 @@ + tst-ntp_gettimex-time64 \ + tst-ppoll-time64 \ + tst-prctl-time64 \ +- tst-scm_rights-time64 \ + tst-sigtimedwait-time64 \ + tst-timerfd-time64 \ ++ # Skip this test to avoid stale qemu process ++ # tst-scm_rights-time64 \ + # tests-time64 + + tests-clone-internal = \ diff --git a/meta/recipes-core/glibc/glibc_2.39.bb b/meta/recipes-core/glibc/glibc_2.39.bb index b203060064..2484ae1cd9 100644 --- a/meta/recipes-core/glibc/glibc_2.39.bb +++ b/meta/recipes-core/glibc/glibc_2.39.bb @@ -16,6 +16,10 @@ CVE_STATUS[CVE-2019-1010025] = "disputed: \ Allows for ASLR bypass so can bypass some hardening, not an exploit in itself, may allow \ easier access for another. 'ASLR bypass itself is not a vulnerability.'" +CVE_STATUS_GROUPS += "CVE_STATUS_STABLE_BACKPORTS" +CVE_STATUS_STABLE_BACKPORTS = "CVE-2024-2961 CVE-2024-33599 CVE-2024-33600 CVE-2024-33601 CVE-2024-33602" +CVE_STATUS_STABLE_BACKPORTS[status] = "cpe-stable-backport: fix available in used git hash" + DEPENDS += "gperf-native bison-native" NATIVESDKFIXES ?= "" @@ -48,7 +52,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch \ file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ - file://0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch \ + file://0023-qemu-stale-process.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}" diff --git a/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb b/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb index 16425ea9e4..c7004ab41d 100644 --- a/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb +++ b/meta/recipes-core/ifupdown/ifupdown_0.8.41.bb @@ -35,7 +35,7 @@ do_install () { # If volatiles are used, then we'll also need /run/network there too. install -d ${D}/etc/default/volatiles - install -m 0644 ${WORKDIR}/99_network ${D}/etc/default/volatiles + install -m 0644 ${UNPACKDIR}/99_network ${D}/etc/default/volatiles install -m 0755 ifup ${D}${base_sbindir}/ ln ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifdown diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb index 6e222dfaa7..520d4f1f5f 100644 --- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb +++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb @@ -26,7 +26,7 @@ inherit core-image setuptools3 features_check REQUIRED_DISTRO_FEATURES += "xattr" -SRCREV ?= "cf69c6843fb62ab2ebee361f3d1a1141f1a6b01a" +SRCREV ?= "06cba9abc4dcb630142be7606f5272be8bcb2e36" SRC_URI = "git://git.yoctoproject.org/poky;branch=master \ file://Yocto_Build_Appliance.vmx \ file://Yocto_Build_Appliance.vmxf \ @@ -44,10 +44,10 @@ IMAGE_CMD:ext4:append () { fakeroot do_populate_poky_src () { # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo # will become invalid in the target. - rm -rf ${WORKDIR}/git/.git - rm -f ${WORKDIR}/git/.gitignore + rm -rf ${UNPACKDIR}/git/.git + rm -f ${UNPACKDIR}/git/.gitignore - cp -R ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky + cp -R ${UNPACKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads @@ -58,10 +58,10 @@ fakeroot do_populate_poky_src () { fi # Place the README_VirtualBox_Guest_Additions file in builders home folder. - cp ${WORKDIR}/README_VirtualBox_Guest_Additions.txt ${IMAGE_ROOTFS}/home/builder/ + cp ${UNPACKDIR}/README_VirtualBox_Guest_Additions.txt ${IMAGE_ROOTFS}/home/builder/ # Place the README_VirtualBox_Toaster file in builders home folder. - cp ${WORKDIR}/README_VirtualBox_Toaster.txt ${IMAGE_ROOTFS}/home/builder/ + cp ${UNPACKDIR}/README_VirtualBox_Toaster.txt ${IMAGE_ROOTFS}/home/builder/ echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf echo "export LC_ALL=en_US.utf8" >> ${IMAGE_ROOTFS}/home/builder/.bashrc @@ -129,10 +129,15 @@ python () { d.delVarFlag("do_unpack", "noexec") } +# ${S} doesn't exist for us +do_qa_unpack() { + return +} + create_bundle_files () { cd ${WORKDIR} mkdir -p Yocto_Build_Appliance - cp *.vmx* Yocto_Build_Appliance + cp ${UNPACKDIR}/*.vmx* Yocto_Build_Appliance ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.wic.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.wic.vhdx Yocto_Build_Appliance/Yocto_Build_Appliance.vhdx ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.wic.vhd Yocto_Build_Appliance/Yocto_Build_Appliance.vhd diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces index e617fcf69b..3d0f0c6768 100644 --- a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces +++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/interfaces @@ -14,10 +14,11 @@ iface wlan0 inet dhcp iface atml0 inet dhcp # Wired or wireless interfaces including predictable names -auto /eth0 +auto eth0 iface eth0 inet dhcp iface eth1 inet dhcp +# Busybox ifupdown won't process /en* correctly auto /en*=eth iface eth inet dhcp diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb index 409b1c0403..ddf9d1b311 100644 --- a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb +++ b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb @@ -3,7 +3,7 @@ DESCRIPTION = "This package provides high level tools to configure network inter HOMEPAGE = "http://packages.debian.org/ifupdown" SECTION = "base" LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://${WORKDIR}/copyright;md5=3dd6192d306f582dee7687da3d8748ab" +LIC_FILES_CHKSUM = "file://${S}/copyright;md5=3dd6192d306f582dee7687da3d8748ab" inherit update-rc.d @@ -15,7 +15,8 @@ SRC_URI = "file://copyright \ file://interfaces \ file://nfsroot" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install () { install -d ${D}${sysconfdir}/init.d \ @@ -23,9 +24,9 @@ do_install () { ${D}${sysconfdir}/network/if-up.d \ ${D}${sysconfdir}/network/if-down.d \ ${D}${sysconfdir}/network/if-post-down.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/networking - install -m 0644 ${WORKDIR}/interfaces ${D}${sysconfdir}/network/interfaces - install -m 0755 ${WORKDIR}/nfsroot ${D}${sysconfdir}/network/if-pre-up.d + install -m 0755 ${S}/init ${D}${sysconfdir}/init.d/networking + install -m 0644 ${S}/interfaces ${D}${sysconfdir}/network/interfaces + install -m 0755 ${S}/nfsroot ${D}${sysconfdir}/network/if-pre-up.d } do_install:append:qemuall () { diff --git a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb index 198459f2b2..ec3544c67a 100644 --- a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb @@ -3,11 +3,11 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = "file://init-boot.sh" - -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { - install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init + install -m 0755 ${S}/init-boot.sh ${D}/init # Create device nodes expected by some kernels in initramfs # before even executing /init. diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init index 567694aff7..e3d8caa0e1 100755 --- a/meta/recipes-core/initrdscripts/initramfs-framework/init +++ b/meta/recipes-core/initrdscripts/initramfs-framework/init @@ -54,17 +54,20 @@ debug() { } # Prints a message and start a endless loop +# Force reboot if init_fatal_reboot bootparam is set fatal() { - echo $1 >/dev/console - echo >/dev/console - - if [ -n "$bootparam_init_fatal_sh" ]; then - sh - else - while [ "true" ]; do - sleep 3600 - done - fi + echo $1 >/dev/console + echo >/dev/console + + if [ -n "$bootparam_init_fatal_reboot" ]; then + reboot -f + elif [ -n "$bootparam_init_fatal_sh" ]; then + sh + else + while [ "true" ]; do + sleep 3600 + done + fi } # Variables shared amoung modules diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb index 39ea51ccbd..bb4984366d 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb @@ -20,37 +20,38 @@ SRC_URI = "file://init \ file://overlayroot \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d ${D}/init.d # base - install -m 0755 ${WORKDIR}/init ${D}/init - install -m 0755 ${WORKDIR}/nfsrootfs ${D}/init.d/85-nfsrootfs - install -m 0755 ${WORKDIR}/rootfs ${D}/init.d/90-rootfs - install -m 0755 ${WORKDIR}/finish ${D}/init.d/99-finish + install -m 0755 ${S}/init ${D}/init + install -m 0755 ${S}/nfsrootfs ${D}/init.d/85-nfsrootfs + install -m 0755 ${S}/rootfs ${D}/init.d/90-rootfs + install -m 0755 ${S}/finish ${D}/init.d/99-finish # exec - install -m 0755 ${WORKDIR}/exec ${D}/init.d/89-exec + install -m 0755 ${S}/exec ${D}/init.d/89-exec # mdev - install -m 0755 ${WORKDIR}/mdev ${D}/init.d/01-mdev + install -m 0755 ${S}/mdev ${D}/init.d/01-mdev # udev - install -m 0755 ${WORKDIR}/udev ${D}/init.d/01-udev + install -m 0755 ${S}/udev ${D}/init.d/01-udev # e2fs - install -m 0755 ${WORKDIR}/e2fs ${D}/init.d/10-e2fs + install -m 0755 ${S}/e2fs ${D}/init.d/10-e2fs # debug - install -m 0755 ${WORKDIR}/debug ${D}/init.d/00-debug + install -m 0755 ${S}/debug ${D}/init.d/00-debug # lvm - install -m 0755 ${WORKDIR}/lvm ${D}/init.d/09-lvm + install -m 0755 ${S}/lvm ${D}/init.d/09-lvm # overlayroot needs to run after rootfs module but before finish - install -m 0755 ${WORKDIR}/overlayroot ${D}/init.d/91-overlayroot + install -m 0755 ${S}/overlayroot ${D}/init.d/91-overlayroot # Create device nodes expected by some kernels in initramfs # before even executing /init. diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb index 847dbc0472..40046f30a7 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb @@ -5,11 +5,11 @@ DEPENDS = "virtual/kernel" RDEPENDS:${PN} = "busybox-mdev" SRC_URI = "file://init-live.sh" - -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { - install -m 0755 ${WORKDIR}/init-live.sh ${D}/init + install -m 0755 ${S}/init-live.sh ${D}/init install -d ${D}/dev mknod -m 622 ${D}/dev/console c 5 1 } diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb index b3b991b8fd..7851cc9605 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb @@ -5,11 +5,11 @@ DEPENDS = "virtual/kernel" RDEPENDS:${PN} = "udev udev-extraconf" SRC_URI = "file://init-live.sh" - -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { - install -m 0755 ${WORKDIR}/init-live.sh ${D}/init + install -m 0755 ${S}/init-live.sh ${D}/init install -d ${D}/dev mknod -m 622 ${D}/dev/console c 5 1 } diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb index 495eccbeda..31291bcdf2 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb @@ -5,10 +5,11 @@ SRC_URI = "file://init-install-efi-testfs.sh" RDEPENDS:${PN} = "parted e2fsprogs-mke2fs dosfstools" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { - install -m 0755 ${WORKDIR}/init-install-efi-testfs.sh ${D}/install-efi.sh + install -m 0755 ${S}/init-install-efi-testfs.sh ${D}/install-efi.sh } INHIBIT_DEFAULT_DEPS = "1" diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb index e10faadfbe..ff3b5622db 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb @@ -3,14 +3,14 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = "file://init-install-efi.sh" - RDEPENDS:${PN} = "parted e2fsprogs-mke2fs dosfstools util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}" RRECOMMENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { - install -m 0755 ${WORKDIR}/init-install-efi.sh ${D}/install-efi.sh + install -m 0755 ${S}/init-install-efi.sh ${D}/install-efi.sh } # While this package maybe an allarch due to it being a diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb index d347e323b3..19f05f9fec 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb @@ -5,10 +5,11 @@ SRC_URI = "file://init-install-testfs.sh" RDEPENDS:${PN} = "grub parted e2fsprogs-mke2fs" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { - install -m 0755 ${WORKDIR}/init-install-testfs.sh ${D}/install.sh + install -m 0755 ${S}/init-install-testfs.sh ${D}/install.sh } INHIBIT_DEFAULT_DEPS = "1" diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb index 9046d06c02..1d489e2b64 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb @@ -3,14 +3,14 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = "file://init-install.sh" - -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" RDEPENDS:${PN} = "grub parted e2fsprogs-mke2fs util-linux-blkid ${VIRTUAL-RUNTIME_base-utils}" RRECOMMENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}" do_install() { - install -m 0755 ${WORKDIR}/init-install.sh ${D}/install.sh + install -m 0755 ${S}/init-install.sh ${D}/install.sh } # While this package maybe an allarch due to it being a diff --git a/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb index b7499644f0..bb3f275f26 100644 --- a/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-module-install-efi_1.0.bb @@ -7,11 +7,12 @@ RRECOMMENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}" SRC_URI = "file://init-install-efi.sh" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d ${D}/init.d - install -m 0755 ${WORKDIR}/init-install-efi.sh ${D}/init.d/install-efi.sh + install -m 0755 ${S}/init-install-efi.sh ${D}/init.d/install-efi.sh } FILES:${PN} = "/init.d/install-efi.sh" diff --git a/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb index 11db7124af..b87e59f347 100644 --- a/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-module-install_1.0.bb @@ -12,11 +12,12 @@ COMPATIBLE_HOST:armv7ve = 'null' SRC_URI = "file://init-install.sh" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d ${D}/init.d - install -m 0755 ${WORKDIR}/init-install.sh ${D}/init.d/install.sh + install -m 0755 ${S}/init-install.sh ${D}/init.d/install.sh } FILES:${PN} = "/init.d/install.sh" diff --git a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb index 48a779e9aa..4d9ef79a63 100644 --- a/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-module-setup-live_1.0.bb @@ -9,11 +9,12 @@ inherit allarch FILESEXTRAPATHS:prepend := "${THISDIR}/initramfs-framework:" SRC_URI = "file://setup-live" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d ${D}/init.d - install -m 0755 ${WORKDIR}/setup-live ${D}/init.d/80-setup-live + install -m 0755 ${S}/setup-live ${D}/init.d/80-setup-live } FILES:${PN} = "/init.d/80-setup-live" diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index e61ac554f3..65f97a0af2 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb @@ -35,7 +35,8 @@ SRC_URI = "file://functions \ ${@bb.utils.contains('DISTRO_FEATURES','selinux','file://sushell','',d)} \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" SRC_URI:append:arm = " file://alignment.sh" SRC_URI:append:armeb = " file://alignment.sh" @@ -61,9 +62,9 @@ HALTARGS ?= "-d -f" VARLIBMOUNTARGS ?= "" do_configure() { - sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/halt - sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/reboot - sed -i -e "s:SED_VARLIBMOUNTARGS:${VARLIBMOUNTARGS}:g" ${WORKDIR}/read-only-rootfs-hook.sh + sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${S}/halt + sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${S}/reboot + sed -i -e "s:SED_VARLIBMOUNTARGS:${VARLIBMOUNTARGS}:g" ${S}/read-only-rootfs-hook.sh } do_install () { @@ -84,27 +85,27 @@ do_install () { # Holds state information pertaining to urandom install -d ${D}${localstatedir}/lib/urandom - install -m 0644 ${WORKDIR}/functions ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/checkroot.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/halt ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/hostname.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/mountall.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/mountnfs.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/reboot ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/rmnologin.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/sendsigs ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/single ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/urandom ${D}${sysconfdir}/init.d + install -m 0644 ${S}/functions ${D}${sysconfdir}/init.d + install -m 0755 ${S}/bootmisc.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/checkroot.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/halt ${D}${sysconfdir}/init.d + install -m 0755 ${S}/hostname.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/mountall.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/mountnfs.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/reboot ${D}${sysconfdir}/init.d + install -m 0755 ${S}/rmnologin.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/sendsigs ${D}${sysconfdir}/init.d + install -m 0755 ${S}/single ${D}${sysconfdir}/init.d + install -m 0755 ${S}/umountnfs.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/urandom ${D}${sysconfdir}/init.d sed -i ${D}${sysconfdir}/init.d/urandom -e 's,/var/,${localstatedir}/,g;s,/etc/,${sysconfdir}/,g' - install -m 0755 ${WORKDIR}/devpts.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/devpts ${D}${sysconfdir}/default - install -m 0755 ${WORKDIR}/sysfs.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core + install -m 0755 ${S}/devpts.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/devpts ${D}${sysconfdir}/default + install -m 0755 ${S}/sysfs.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/populate-volatile.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/save-rtc.sh ${D}${sysconfdir}/init.d + install -m 0644 ${S}/volatiles ${D}${sysconfdir}/default/volatiles/00_core if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = True ]; then sed -i -e '\@^d root root 0755 /var/volatile/log none$@ a\l root root 0755 /var/log /var/volatile/log' \ ${D}${sysconfdir}/default/volatiles/00_core @@ -112,22 +113,22 @@ do_install () { if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then sed -i -e "/\<tmp\>/d" ${D}${sysconfdir}/default/volatiles/00_core fi - install -m 0755 ${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/ + install -m 0755 ${S}/dmesg.sh ${D}${sysconfdir}/init.d + install -m 0644 ${S}/logrotate-dmesg.conf ${D}${sysconfdir}/ if [ "${TARGET_ARCH}" = "arm" ]; then - install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d + install -m 0755 ${S}/alignment.sh ${D}${sysconfdir}/init.d fi if ${@bb.utils.contains('DISTRO_FEATURES','selinux','true','false',d)}; then install -d ${D}/${base_sbindir} - install -m 0755 ${WORKDIR}/sushell ${D}/${base_sbindir} + install -m 0755 ${S}/sushell ${D}/${base_sbindir} fi # # Install device dependent scripts # - install -m 0755 ${WORKDIR}/banner.sh ${D}${sysconfdir}/init.d/banner.sh - install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d/umountfs + install -m 0755 ${S}/banner.sh ${D}${sysconfdir}/init.d/banner.sh + install -m 0755 ${S}/umountfs ${D}${sysconfdir}/init.d/umountfs # # Create runlevel links # diff --git a/meta/recipes-core/kbd/kbd/0001-Remove-non-free-Agafari-fonts.patch b/meta/recipes-core/kbd/kbd/0001-Remove-non-free-Agafari-fonts.patch new file mode 100644 index 0000000000..de279b55f9 --- /dev/null +++ b/meta/recipes-core/kbd/kbd/0001-Remove-non-free-Agafari-fonts.patch @@ -0,0 +1,73 @@ +From b757e6842f9631757f0d1a6b3833aabffa9ffeee Mon Sep 17 00:00:00 2001 +From: Alexey Gladkov <legion@kernel.org> +Date: Thu, 29 Feb 2024 17:38:37 +0100 +Subject: [PATCH] Remove non-free Agafari fonts + +Based on legal analysis, we are removing non-free fonts for now. If we +can change the license of these fonts, we will return them back. + +From: Stanislav Brabec <sbrabec@suse.com> +Date: Wed, 28 Feb 2024 16:47:54 +0100 +Subject: kbd: Legal problems of Agafari fonts + + The data/consolefonts/README.Ethiopic contains a notice: + Agafari: + Donated by the Ethiopian Science and Technology Commission + <ncic@padis.gn.apc.org> or <ncic@telecom.net.et> and may be redistributed + for non-commercial use under Unix environments only. + + According to our legal review, it makes impossible to distribute these + fonts as part of any commercial products, and even makes it impossible to + distribute kbd sources as part of any commercial product services. + + Additionally, it makes the whole kbd package incompatible with GPL, so the + COPYING file (created during build of the tarball) cannot declare GPL + version 2. It also violates section 6 of GPL (no further restrictions). + + That is why several GNU/Linux distributions exclude Agafari from the + release. To be on a safe side, SUSE even decided to repack any source + tarballs before putting it to their servers. + + This was probably reported to the former kbd maintainer about 20 years ago, + but nothing changed over years. + + That is why I recommend removing Agafari fonts and removing the reference + to them from README.Ethiopic. Alternatively, you can ask the Ethiopian + Science and Technology Commission for re-licensing. + +Signed-off-by: Alexey Gladkov <legion@kernel.org> + +Upstream-Status: Backport [https://github.com/legionus/kbd/commit/b757e6842f9631757f0d1a6b3833aabffa9ffeee] + +[do_configure prepend added to remove binary files] + +Signed-off-by: Peter Marko <peter.marko@siemens.com> +--- + data/consolefonts/Agafari-12.psfu | Bin 7989 -> 0 bytes + data/consolefonts/Agafari-14.psfu | Bin 9013 -> 0 bytes + data/consolefonts/Agafari-16.psfu | Bin 10037 -> 0 bytes + data/consolefonts/README.Ethiopic | 5 ----- + 4 files changed, 5 deletions(-) + delete mode 100644 data/consolefonts/Agafari-12.psfu + delete mode 100644 data/consolefonts/Agafari-14.psfu + delete mode 100644 data/consolefonts/Agafari-16.psfu + +diff --git a/data/consolefonts/README.Ethiopic b/data/consolefonts/README.Ethiopic +index 7502722..2810797 100644 +--- a/data/consolefonts/README.Ethiopic ++++ b/data/consolefonts/README.Ethiopic +@@ -14,11 +14,6 @@ Ethiopic fonts: + restrictions below: + + +-Agafari: +- Donated by the Ethiopian Science and Technology Commission +- <ncic@padis.gn.apc.org> or <ncic@telecom.net.et> and may be redistributed +- for non-commercial use under Unix environments only. +- + Goha and GohaClassic: + Donated by Yitna Firdyiwek <ybf2u@virgina.edu> of GohaTibeb Associates + and may be redistributed without restriction under the GNU GPL 2.0. +-- +2.30.2 + diff --git a/meta/recipes-core/kbd/kbd_2.6.4.bb b/meta/recipes-core/kbd/kbd_2.6.4.bb index 790055aa96..2331b51e59 100644 --- a/meta/recipes-core/kbd/kbd_2.6.4.bb +++ b/meta/recipes-core/kbd/kbd_2.6.4.bb @@ -1,9 +1,19 @@ SUMMARY = "Keytable files and keyboard utilities" HOMEPAGE = "http://www.kbd-project.org/" DESCRIPTION = "The kbd project contains tools for managing Linux console (Linux console, virtual terminals, keyboard, etc.) – mainly, what they do is loading console fonts and keyboard maps." -# everything minus console-fonts is GPL-2.0-or-later -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +# consolefonts and keymaps contain also some public domain and author notice licenses +LICENSE = "GPL-2.0-or-later & LGPL-2.0-or-later & GPL-3.0-or-later" +LIC_FILES_CHKSUM = " \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://data/keymaps/pine/en.map;beginline=2;endline=15;md5=20914a59c0546a7b77ebf959bc88ad5d \ +" +LICENSE:${PN} = "GPL-2.0-or-later & LGPL-2.0-or-later" +LICENSE:${PN}-consolefonts = "GPL-2.0-or-later" +LICENSE:${PN}-consoletrans = "GPL-2.0-or-later" +LICENSE:${PN}-keymaps-pine = "GPL-3.0-or-later" +LICENSE:${PN}-keymaps = "GPL-2.0-or-later" +LICENSE:${PN}-unimaps = "GPL-2.0-or-later" inherit autotools gettext pkgconfig @@ -14,6 +24,7 @@ RPROVIDES:${PN} = "console-tools" RCONFLICTS:${PN} = "console-tools" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \ + file://0001-Remove-non-free-Agafari-fonts.patch \ " SRC_URI[sha256sum] = "519f8d087aecca7e0a33cd084bef92c066eb19731666653dcc70c9d71aa40926" @@ -24,13 +35,22 @@ PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam," -PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans" +PACKAGES += "${PN}-consolefonts ${PN}-keymaps-pine ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans" FILES:${PN}-consolefonts = "${datadir}/consolefonts" FILES:${PN}-consoletrans = "${datadir}/consoletrans" +FILES:${PN}-keymaps-pine = "${datadir}/keymaps/pine" FILES:${PN}-keymaps = "${datadir}/keymaps" FILES:${PN}-unimaps = "${datadir}/unimaps" +RRECOMMENDS:${PN}-keymaps = "${PN}-keymaps-pine" + +# remove this when upgrading to newer version which has integrated +# https://github.com/legionus/kbd/commit/b757e6842f9631757f0d1a6b3833aabffa9ffeee +do_configure:prepend() { + rm -rf ${S}/data/consolefonts/Agafari-1* +} + do_install:append () { if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)}" = "yes" ] \ && [ -f ${D}${sysconfdir}/pam.d/vlock ]; then diff --git a/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch b/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch new file mode 100644 index 0000000000..4b743f9b33 --- /dev/null +++ b/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch @@ -0,0 +1,37 @@ +From 592dcdcf243576bd2517d3da9bc18990de08e37e Mon Sep 17 00:00:00 2001 +From: Kamalesh Babulal <kamalesh.babulal@oracle.com> +Date: Mon, 27 Nov 2023 20:07:33 +0530 +Subject: [PATCH 1/1] include/Makefile: install systemd.h by default + +Install systemd.h header file by default, as we have stub and defined +versions of the systemd functions for both non-systemd and systemd +enabled configurations. This will help packagers to ship package +without systemd support (--enable-systemd=no). + +Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com> +Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> + +Upstream-Status: Backport [https://github.com/libcgroup/libcgroup/commit/592dcdcf243576bd2517d3da9bc18990de08e37e] + +Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com> +--- + include/Makefile.am | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/include/Makefile.am b/include/Makefile.am +index 23cebaac..4cb05529 100644 +--- a/include/Makefile.am ++++ b/include/Makefile.am +@@ -2,8 +2,4 @@ + nobase_include_HEADERS = libcgroup.h libcgroup/error.h libcgroup/init.h \ + libcgroup/groups.h libcgroup/tasks.h \ + libcgroup/iterators.h libcgroup/config.h \ +- libcgroup/log.h libcgroup/tools.h +- +-if WITH_SYSTEMD +-nobase_include_HEADERS += libcgroup/systemd.h +-endif ++ libcgroup/log.h libcgroup/tools.h libcgroup/systemd.h +-- +2.39.2 + diff --git a/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb b/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb index 4b4f19e36f..a1d27c7e7f 100644 --- a/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb +++ b/meta/recipes-core/libcgroup/libcgroup_3.1.0.bb @@ -13,6 +13,7 @@ DEPENDS = "bison-native flex-native" DEPENDS:append:libc-musl = " fts" SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ + file://0001-include-Makefile-install-systemd.h-by-default.patch \ " UPSTREAM_CHECK_URI = "https://github.com/libcgroup/libcgroup/tags" diff --git a/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.36.bb b/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.36.bb index d5546ce9ba..30ec6a4674 100644 --- a/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.36.bb +++ b/meta/recipes-core/libxcrypt/libxcrypt-compat_4.4.36.bb @@ -1,5 +1,5 @@ # -# This provides libcrypto.so.1 which contains obsolete APIs, needed for uninative in particular +# This provides libcrypt.so.1 which contains obsolete APIs, needed for uninative in particular # require libxcrypt.inc diff --git a/meta/recipes-core/libxml/libxml2_2.12.5.bb b/meta/recipes-core/libxml/libxml2_2.12.7.bb index 47c1a72e77..84601c282f 100644 --- a/meta/recipes-core/libxml/libxml2_2.12.5.bb +++ b/meta/recipes-core/libxml/libxml2_2.12.7.bb @@ -20,7 +20,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testt file://install-tests.patch \ " -SRC_URI[archive.sha256sum] = "a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21" +SRC_URI[archive.sha256sum] = "24ae78ff1363a973e6d8beba941a7945da2ac056e19b53956aeb6927fd6cfb56" SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273" # Disputed as a security issue, but fixed in d39f780 diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb index 6b679489fd..92fbda335d 100644 --- a/meta/recipes-core/meta/buildtools-tarball.bb +++ b/meta/recipes-core/meta/buildtools-tarball.bb @@ -11,8 +11,11 @@ TOOLCHAIN_HOST_TASK ?= "\ nativesdk-python3-git \ nativesdk-python3-jinja2 \ nativesdk-python3-testtools \ + nativesdk-python3-pip \ + nativesdk-python3-setuptools \ nativesdk-python3-subunit \ nativesdk-python3-pyyaml \ + nativesdk-python3-websockets \ nativesdk-ncurses-terminfo-base \ nativesdk-chrpath \ nativesdk-tar \ diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb index 7eebcaf11a..0fd01fdb64 100644 --- a/meta/recipes-core/meta/uninative-tarball.bb +++ b/meta/recipes-core/meta/uninative-tarball.bb @@ -58,6 +58,8 @@ fakeroot archive_sdk() { DEST="./${SDK_ARCH}-${SDK_OS}" mv sysroots/${SDK_SYS} $DEST rm sysroots -rf + # There is a check in meta/files/toolchain-shar-extract.sh -- make sure to + # keep that check up to date if changing the `1024` patchelf --set-interpreter ${@''.join('a' for n in range(1024))} $DEST/usr/bin/patchelf mv $DEST/usr/bin/patchelf $DEST/usr/bin/patchelf-uninative ${SDK_ARCHIVE_CMD} diff --git a/meta/recipes-core/musl/bsd-headers.bb b/meta/recipes-core/musl/bsd-headers.bb index 887a816031..7d0bdee870 100644 --- a/meta/recipes-core/musl/bsd-headers.bb +++ b/meta/recipes-core/musl/bsd-headers.bb @@ -15,7 +15,8 @@ do_compile[noexec] = "1" INHIBIT_DEFAULT_DEPS = "1" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -Dm 0644 ${S}/sys-queue.h ${D}${includedir}/sys/queue.h diff --git a/meta/recipes-core/musl/libc-test_git.bb b/meta/recipes-core/musl/libc-test_git.bb index 619a959fd2..f55a125a89 100644 --- a/meta/recipes-core/musl/libc-test_git.bb +++ b/meta/recipes-core/musl/libc-test_git.bb @@ -50,7 +50,7 @@ do_install () { } do_install_ptest_base:append() { - install -Dm 0755 ${WORKDIR}/run-libc-ptests ${D}${PTEST_PATH}/run-libc-ptests + install -Dm 0755 ${UNPACKDIR}/run-libc-ptests ${D}${PTEST_PATH}/run-libc-ptests } COMPATIBLE_HOST = "null" diff --git a/meta/recipes-core/musl/libssp-nonshared.bb b/meta/recipes-core/musl/libssp-nonshared.bb index 3faf8f00c3..e9f652fc3e 100644 --- a/meta/recipes-core/musl/libssp-nonshared.bb +++ b/meta/recipes-core/musl/libssp-nonshared.bb @@ -17,7 +17,8 @@ DEPENDS = "virtual/${TARGET_PREFIX}binutils \ do_configure[noexec] = "1" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile() { ${CC} ${CPPFLAGS} ${CFLAGS} -fPIE -c stack_chk.c -o stack_chk.o diff --git a/meta/recipes-core/musl/musl-legacy-error.bb b/meta/recipes-core/musl/musl-legacy-error.bb index 5ce5a233ab..11a838a6e8 100644 --- a/meta/recipes-core/musl/musl-legacy-error.bb +++ b/meta/recipes-core/musl/musl-legacy-error.bb @@ -13,7 +13,8 @@ do_compile[noexec] = "1" INHIBIT_DEFAULT_DEPS = "1" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -Dm 0644 ${S}/error.h -t ${D}${includedir} diff --git a/meta/recipes-core/ncurses/files/0001-Fix-CVE-2023-29491.patch b/meta/recipes-core/ncurses/files/0001-Fix-CVE-2023-29491.patch deleted file mode 100644 index 1232c8c2a8..0000000000 --- a/meta/recipes-core/ncurses/files/0001-Fix-CVE-2023-29491.patch +++ /dev/null @@ -1,462 +0,0 @@ -From 3d54a41f12e9aa059f06e66e72d872f2283395b6 Mon Sep 17 00:00:00 2001 -From: Chen Qi <Qi.Chen@windriver.com> -Date: Sun, 30 Jul 2023 21:14:00 -0700 -Subject: [PATCH] Fix CVE-2023-29491 - -CVE: CVE-2023-29491 - -Upstream-Status: Backport [http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff;h=eb51b1ea1f75a0ec17c9c5937cb28df1e8eeec56] - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - ncurses/tinfo/lib_tgoto.c | 10 +++- - ncurses/tinfo/lib_tparm.c | 116 ++++++++++++++++++++++++++++++++----- - ncurses/tinfo/read_entry.c | 3 + - progs/tic.c | 6 ++ - progs/tparm_type.c | 9 +++ - progs/tparm_type.h | 2 + - progs/tput.c | 61 ++++++++++++++++--- - 7 files changed, 185 insertions(+), 22 deletions(-) - -diff --git a/ncurses/tinfo/lib_tgoto.c b/ncurses/tinfo/lib_tgoto.c -index 9cf5e100..c50ed4df 100644 ---- a/ncurses/tinfo/lib_tgoto.c -+++ b/ncurses/tinfo/lib_tgoto.c -@@ -207,6 +207,14 @@ tgoto(const char *string, int x, int y) - result = tgoto_internal(string, x, y); - else - #endif -- result = TIPARM_2(string, y, x); -+ if ((result = TIPARM_2(string, y, x)) == NULL) { -+ /* -+ * Because termcap did not provide a more general solution such as -+ * tparm(), it was necessary to handle single-parameter capabilities -+ * using tgoto(). The internal _nc_tiparm() function returns a NULL -+ * for that case; retry for the single-parameter case. -+ */ -+ result = TIPARM_1(string, y); -+ } - returnPtr(result); - } -diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c -index d9bdfd8f..a10a3877 100644 ---- a/ncurses/tinfo/lib_tparm.c -+++ b/ncurses/tinfo/lib_tparm.c -@@ -1086,6 +1086,64 @@ tparam_internal(TPARM_STATE *tps, const char *string, TPARM_DATA *data) - return (TPS(out_buff)); - } - -+#ifdef CUR -+/* -+ * Only a few standard capabilities accept string parameters. The others that -+ * are parameterized accept only numeric parameters. -+ */ -+static bool -+check_string_caps(TPARM_DATA *data, const char *string) -+{ -+ bool result = FALSE; -+ -+#define CHECK_CAP(name) (VALID_STRING(name) && !strcmp(name, string)) -+ -+ /* -+ * Disallow string parameters unless we can check them against a terminal -+ * description. -+ */ -+ if (cur_term != NULL) { -+ int want_type = 0; -+ -+ if (CHECK_CAP(pkey_key)) -+ want_type = 2; /* function key #1, type string #2 */ -+ else if (CHECK_CAP(pkey_local)) -+ want_type = 2; /* function key #1, execute string #2 */ -+ else if (CHECK_CAP(pkey_xmit)) -+ want_type = 2; /* function key #1, transmit string #2 */ -+ else if (CHECK_CAP(plab_norm)) -+ want_type = 2; /* label #1, show string #2 */ -+ else if (CHECK_CAP(pkey_plab)) -+ want_type = 6; /* function key #1, type string #2, show string #3 */ -+#if NCURSES_XNAMES -+ else { -+ char *check; -+ -+ check = tigetstr("Cs"); -+ if (CHECK_CAP(check)) -+ want_type = 1; /* style #1 */ -+ -+ check = tigetstr("Ms"); -+ if (CHECK_CAP(check)) -+ want_type = 3; /* storage unit #1, content #2 */ -+ } -+#endif -+ -+ if (want_type == data->tparm_type) { -+ result = TRUE; -+ } else { -+ T(("unexpected string-parameter")); -+ } -+ } -+ return result; -+} -+ -+#define ValidCap() (myData.tparm_type == 0 || \ -+ check_string_caps(&myData, string)) -+#else -+#define ValidCap() 1 -+#endif -+ - #if NCURSES_TPARM_VARARGS - - NCURSES_EXPORT(char *) -@@ -1100,7 +1158,7 @@ tparm(const char *string, ...) - tps->tname = "tparm"; - #endif /* TRACE */ - -- if (tparm_setup(cur_term, string, &myData) == OK) { -+ if (tparm_setup(cur_term, string, &myData) == OK && ValidCap()) { - va_list ap; - - va_start(ap, string); -@@ -1135,7 +1193,7 @@ tparm(const char *string, - tps->tname = "tparm"; - #endif /* TRACE */ - -- if (tparm_setup(cur_term, string, &myData) == OK) { -+ if (tparm_setup(cur_term, string, &myData) == OK && ValidCap()) { - - myData.param[0] = a1; - myData.param[1] = a2; -@@ -1166,7 +1224,7 @@ tiparm(const char *string, ...) - tps->tname = "tiparm"; - #endif /* TRACE */ - -- if (tparm_setup(cur_term, string, &myData) == OK) { -+ if (tparm_setup(cur_term, string, &myData) == OK && ValidCap()) { - va_list ap; - - va_start(ap, string); -@@ -1179,7 +1237,25 @@ tiparm(const char *string, ...) - } - - /* -- * The internal-use flavor ensures that the parameters are numbers, not strings -+ * The internal-use flavor ensures that parameters are numbers, not strings. -+ * In addition to ensuring that they are numbers, it ensures that the parameter -+ * count is consistent with intended usage. -+ * -+ * Unlike the general-purpose tparm/tiparm, these internal calls are fairly -+ * well defined: -+ * -+ * expected == 0 - not applicable -+ * expected == 1 - set color, or vertical/horizontal addressing -+ * expected == 2 - cursor addressing -+ * expected == 4 - initialize color or color pair -+ * expected == 9 - set attributes -+ * -+ * Only for the last case (set attributes) should a parameter be optional. -+ * Also, a capability which calls for more parameters than expected should be -+ * ignored. -+ * -+ * Return a null if the parameter-checks fail. Otherwise, return a pointer to -+ * the formatted capability string. - */ - NCURSES_EXPORT(char *) - _nc_tiparm(int expected, const char *string, ...) -@@ -1189,22 +1265,36 @@ _nc_tiparm(int expected, const char *string, ...) - char *result = NULL; - - _nc_tparm_err = 0; -+ T((T_CALLED("_nc_tiparm(%d, %s, ...)"), expected, _nc_visbuf(string))); - #ifdef TRACE - tps->tname = "_nc_tiparm"; - #endif /* TRACE */ - -- if (tparm_setup(cur_term, string, &myData) == OK -- && myData.num_actual <= expected -- && myData.tparm_type == 0) { -- va_list ap; -+ if (tparm_setup(cur_term, string, &myData) == OK && ValidCap()) { -+ if (myData.num_actual == 0) { -+ T(("missing parameter%s, expected %s%d", -+ expected > 1 ? "s" : "", -+ expected == 9 ? "up to " : "", -+ expected)); -+ } else if (myData.num_actual > expected) { -+ T(("too many parameters, have %d, expected %d", -+ myData.num_actual, -+ expected)); -+ } else if (expected != 9 && myData.num_actual != expected) { -+ T(("expected %d parameters, have %d", -+ myData.num_actual, -+ expected)); -+ } else { -+ va_list ap; - -- va_start(ap, string); -- tparm_copy_valist(&myData, FALSE, ap); -- va_end(ap); -+ va_start(ap, string); -+ tparm_copy_valist(&myData, FALSE, ap); -+ va_end(ap); - -- result = tparam_internal(tps, string, &myData); -+ result = tparam_internal(tps, string, &myData); -+ } - } -- return result; -+ returnPtr(result); - } - - /* -diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c -index 2b1875ed..341337d2 100644 ---- a/ncurses/tinfo/read_entry.c -+++ b/ncurses/tinfo/read_entry.c -@@ -323,6 +323,9 @@ _nc_read_termtype(TERMTYPE2 *ptr, char *buffer, int limit) - || bool_count < 0 - || num_count < 0 - || str_count < 0 -+ || bool_count > BOOLCOUNT -+ || num_count > NUMCOUNT -+ || str_count > STRCOUNT - || str_size < 0) { - returnDB(TGETENT_NO); - } -diff --git a/progs/tic.c b/progs/tic.c -index 93a0b491..888927e2 100644 ---- a/progs/tic.c -+++ b/progs/tic.c -@@ -2270,9 +2270,15 @@ check_1_infotocap(const char *name, NCURSES_CONST char *value, int count) - - _nc_reset_tparm(NULL); - switch (actual) { -+ case Str: -+ result = TPARM_1(value, strings[1]); -+ break; - case Num_Str: - result = TPARM_2(value, numbers[1], strings[2]); - break; -+ case Str_Str: -+ result = TPARM_2(value, strings[1], strings[2]); -+ break; - case Num_Str_Str: - result = TPARM_3(value, numbers[1], strings[2], strings[3]); - break; -diff --git a/progs/tparm_type.c b/progs/tparm_type.c -index 3da4a077..644aa62a 100644 ---- a/progs/tparm_type.c -+++ b/progs/tparm_type.c -@@ -47,6 +47,7 @@ tparm_type(const char *name) - {code, {longname} }, \ - {code, {ti} }, \ - {code, {tc} } -+#define XD(code, onlyname) TD(code, onlyname, onlyname, onlyname) - TParams result = Numbers; - /* *INDENT-OFF* */ - static const struct { -@@ -58,6 +59,10 @@ tparm_type(const char *name) - TD(Num_Str, "pkey_xmit", "pfx", "px"), - TD(Num_Str, "plab_norm", "pln", "pn"), - TD(Num_Str_Str, "pkey_plab", "pfxl", "xl"), -+#if NCURSES_XNAMES -+ XD(Str, "Cs"), -+ XD(Str_Str, "Ms"), -+#endif - }; - /* *INDENT-ON* */ - -@@ -80,12 +85,16 @@ guess_tparm_type(int nparam, char **p_is_s) - case 1: - if (!p_is_s[0]) - result = Numbers; -+ if (p_is_s[0]) -+ result = Str; - break; - case 2: - if (!p_is_s[0] && !p_is_s[1]) - result = Numbers; - if (!p_is_s[0] && p_is_s[1]) - result = Num_Str; -+ if (p_is_s[0] && p_is_s[1]) -+ result = Str_Str; - break; - case 3: - if (!p_is_s[0] && !p_is_s[1] && !p_is_s[2]) -diff --git a/progs/tparm_type.h b/progs/tparm_type.h -index 7c102a30..af5bcf0f 100644 ---- a/progs/tparm_type.h -+++ b/progs/tparm_type.h -@@ -45,8 +45,10 @@ - typedef enum { - Other = -1 - ,Numbers = 0 -+ ,Str - ,Num_Str - ,Num_Str_Str -+ ,Str_Str - } TParams; - - extern TParams tparm_type(const char *name); -diff --git a/progs/tput.c b/progs/tput.c -index 4cd0c5ba..41508b72 100644 ---- a/progs/tput.c -+++ b/progs/tput.c -@@ -1,5 +1,5 @@ - /**************************************************************************** -- * Copyright 2018-2021,2022 Thomas E. Dickey * -+ * Copyright 2018-2022,2023 Thomas E. Dickey * - * Copyright 1998-2016,2017 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * -@@ -47,12 +47,15 @@ - #include <transform.h> - #include <tty_settings.h> - --MODULE_ID("$Id: tput.c,v 1.99 2022/02/26 23:19:31 tom Exp $") -+MODULE_ID("$Id: tput.c,v 1.102 2023/04/08 16:26:36 tom Exp $") - - #define PUTS(s) fputs(s, stdout) - - const char *_nc_progname = "tput"; - -+static bool opt_v = FALSE; /* quiet, do not show warnings */ -+static bool opt_x = FALSE; /* clear scrollback if possible */ -+ - static bool is_init = FALSE; - static bool is_reset = FALSE; - static bool is_clear = FALSE; -@@ -81,6 +84,7 @@ usage(const char *optstring) - KEEP(" -S << read commands from standard input") - KEEP(" -T TERM use this instead of $TERM") - KEEP(" -V print curses-version") -+ KEEP(" -v verbose, show warnings") - KEEP(" -x do not try to clear scrollback") - KEEP("") - KEEP("Commands:") -@@ -148,7 +152,7 @@ exit_code(int token, int value) - * Returns nonzero on error. - */ - static int --tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) -+tput_cmd(int fd, TTY * settings, int argc, char **argv, int *used) - { - NCURSES_CONST char *name; - char *s; -@@ -231,7 +235,9 @@ tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) - } else if (VALID_STRING(s)) { - if (argc > 1) { - int k; -+ int narg; - int analyzed; -+ int provided; - int popcount; - long numbers[1 + NUM_PARM]; - char *strings[1 + NUM_PARM]; -@@ -271,14 +277,45 @@ tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) - - popcount = 0; - _nc_reset_tparm(NULL); -+ /* -+ * Count the number of numeric parameters which are provided. -+ */ -+ provided = 0; -+ for (narg = 1; narg < argc; ++narg) { -+ char *ending = NULL; -+ long check = strtol(argv[narg], &ending, 10); -+ if (check < 0 || ending == argv[narg] || *ending != '\0') -+ break; -+ provided = narg; -+ } - switch (paramType) { -+ case Str: -+ s = TPARM_1(s, strings[1]); -+ analyzed = 1; -+ if (provided == 0 && argc >= 1) -+ provided++; -+ break; -+ case Str_Str: -+ s = TPARM_2(s, strings[1], strings[2]); -+ analyzed = 2; -+ if (provided == 0 && argc >= 1) -+ provided++; -+ if (provided == 1 && argc >= 2) -+ provided++; -+ break; - case Num_Str: - s = TPARM_2(s, numbers[1], strings[2]); - analyzed = 2; -+ if (provided == 1 && argc >= 2) -+ provided++; - break; - case Num_Str_Str: - s = TPARM_3(s, numbers[1], strings[2], strings[3]); - analyzed = 3; -+ if (provided == 1 && argc >= 2) -+ provided++; -+ if (provided == 2 && argc >= 3) -+ provided++; - break; - case Numbers: - analyzed = _nc_tparm_analyze(NULL, s, p_is_s, &popcount); -@@ -316,7 +353,13 @@ tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used) - if (analyzed < popcount) { - analyzed = popcount; - } -- *used += analyzed; -+ if (opt_v && (analyzed != provided)) { -+ fprintf(stderr, "%s: %s parameters for \"%s\"\n", -+ _nc_progname, -+ (analyzed < provided ? "extra" : "missing"), -+ argv[0]); -+ } -+ *used += provided; - } - - /* use putp() in order to perform padding */ -@@ -339,7 +382,6 @@ main(int argc, char **argv) - int used; - TTY old_settings; - TTY tty_settings; -- bool opt_x = FALSE; /* clear scrollback if possible */ - bool is_alias; - bool need_tty; - -@@ -348,7 +390,7 @@ main(int argc, char **argv) - - term = getenv("TERM"); - -- while ((c = getopt(argc, argv, is_alias ? "T:Vx" : "ST:Vx")) != -1) { -+ while ((c = getopt(argc, argv, is_alias ? "T:Vvx" : "ST:Vvx")) != -1) { - switch (c) { - case 'S': - cmdline = FALSE; -@@ -361,6 +403,9 @@ main(int argc, char **argv) - case 'V': - puts(curses_version()); - ExitProgram(EXIT_SUCCESS); -+ case 'v': /* verbose */ -+ opt_v = TRUE; -+ break; - case 'x': /* do not try to clear scrollback */ - opt_x = TRUE; - break; -@@ -404,7 +449,7 @@ main(int argc, char **argv) - usage(NULL); - while (argc > 0) { - tty_settings = old_settings; -- code = tput_cmd(fd, &tty_settings, opt_x, argc, argv, &used); -+ code = tput_cmd(fd, &tty_settings, argc, argv, &used); - if (code != 0) - break; - argc -= used; -@@ -439,7 +484,7 @@ main(int argc, char **argv) - while (argnum > 0) { - int code; - tty_settings = old_settings; -- code = tput_cmd(fd, &tty_settings, opt_x, argnum, argnow, &used); -+ code = tput_cmd(fd, &tty_settings, argnum, argnow, &used); - if (code != 0) { - if (result == 0) - result = ErrSystem(0); /* will return value >4 */ --- -2.40.0 - diff --git a/meta/recipes-core/ncurses/files/0001-Updating-reset-code-ncurses-6.4-patch-20231104.patch b/meta/recipes-core/ncurses/files/0001-Updating-reset-code-ncurses-6.4-patch-20231104.patch deleted file mode 100644 index 121db6bffe..0000000000 --- a/meta/recipes-core/ncurses/files/0001-Updating-reset-code-ncurses-6.4-patch-20231104.patch +++ /dev/null @@ -1,499 +0,0 @@ -From 135d37072755704b8d018e5de74e62ff3f28c930 Mon Sep 17 00:00:00 2001 -From: Thomas E. Dickey <dickey@invisible-island.net> -Date: Sun, 5 Nov 2023 05:54:54 +0530 -Subject: [PATCH] Updating reset code - ncurses 6.4 - patch 20231104 - -+ modify reset command to avoid altering clocal if the terminal uses a - modem (prompted by discussion with Werner Fink, Michal Suchanek, - OpenSUSE #1201384, Debian #60377). -+ build-fixes for --with-caps variations. -+ correct a couple of section-references in INSTALL. - -Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> - -Upstream-Status: Backport [https://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff;h=135d37072755704b8d018e5de74e62ff3f28c930] - -Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com> ---- - INSTALL | 8 +- - include/curses.events | 2 +- - ncurses/tinfo/lib_tparm.c | 2 + - progs/reset_cmd.c | 281 +++++++++++++++++++++----------------- - progs/tabs.c | 10 +- - progs/tic.c | 4 + - 6 files changed, 176 insertions(+), 131 deletions(-) - -diff --git a/INSTALL b/INSTALL -index d9c1dd12..d0a39af0 100644 ---- a/INSTALL -+++ b/INSTALL -@@ -47,7 +47,7 @@ If you are converting from BSD curses and do not have root access, be sure - to read the BSD CONVERSION NOTES section below. - - If you are trying to build applications using gpm with ncurses, --read the USING NCURSES WITH GPM section below. -+read the USING GPM section below. - - If you are cross-compiling, see the note below on BUILDING WITH A CROSS-COMPILER. - -@@ -79,7 +79,7 @@ INSTALLATION PROCEDURE: - The --prefix option to configure changes the root directory for installing - ncurses. The default is normally in subdirectories of /usr/local, except - for systems where ncurses is normally installed as a system library (see -- "IF YOU ARE A SYSTEM INTEGRATOR"). Use --prefix=/usr to replace your -+ "FOR SYSTEM INTEGRATORS"). Use --prefix=/usr to replace your - default curses distribution. - - The package gets installed beneath the --prefix directory as follows: -@@ -176,7 +176,7 @@ INSTALLATION PROCEDURE: - You can make curses and terminfo fall back to an existing file of termcap - definitions by configuring with --enable-termcap. If you do this, the - library will search /etc/termcap before the terminfo database, and will -- also interpret the contents of the TERM environment variable. See the -+ also interpret the contents of the $TERM environment variable. See the - section BSD CONVERSION NOTES below. - - 3. Type `make'. Ignore any warnings, no error messages should be produced. -@@ -1231,7 +1231,7 @@ CONFIGURE OPTIONS: - Specify a search-list of terminfo directories which will be compiled - into the ncurses library (default: DATADIR/terminfo) - -- This is a colon-separated list, like the TERMINFO_DIRS environment -+ This is a colon-separated list, like the $TERMINFO_DIRS environment - variable. - - --with-termlib[=XXX] -diff --git a/include/curses.events b/include/curses.events -index 25a2583f..468bde18 100644 ---- a/include/curses.events -+++ b/include/curses.events -@@ -50,6 +50,6 @@ typedef struct - extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */ - extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */ - --#define KEY_EVENT 0633 /* We were interrupted by an event */ -+#define KEY_EVENT 0634 /* We were interrupted by an event */ - - #endif /* NCURSES_WGETCH_EVENTS */ -diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c -index a10a3877..cd972c0f 100644 ---- a/ncurses/tinfo/lib_tparm.c -+++ b/ncurses/tinfo/lib_tparm.c -@@ -1113,8 +1113,10 @@ check_string_caps(TPARM_DATA *data, const char *string) - want_type = 2; /* function key #1, transmit string #2 */ - else if (CHECK_CAP(plab_norm)) - want_type = 2; /* label #1, show string #2 */ -+#ifdef pkey_plab - else if (CHECK_CAP(pkey_plab)) - want_type = 6; /* function key #1, type string #2, show string #3 */ -+#endif - #if NCURSES_XNAMES - else { - char *check; -diff --git a/progs/reset_cmd.c b/progs/reset_cmd.c -index eff3af72..aec4b077 100644 ---- a/progs/reset_cmd.c -+++ b/progs/reset_cmd.c -@@ -75,6 +75,9 @@ MODULE_ID("$Id: reset_cmd.c,v 1.28 2021/10/02 18:08:44 tom Exp $") - # endif - #endif - -+#define set_flags(target, mask) target |= mask -+#define clear_flags(target, mask) target &= ~((unsigned)(mask)) -+ - static FILE *my_file; - - static bool use_reset = FALSE; /* invoked as reset */ -@@ -188,6 +191,79 @@ out_char(int c) - #define reset_char(item, value) \ - tty_settings->c_cc[item] = CHK(tty_settings->c_cc[item], value) - -+/* -+ * Simplify ifdefs -+ */ -+#ifndef BSDLY -+#define BSDLY 0 -+#endif -+#ifndef CRDLY -+#define CRDLY 0 -+#endif -+#ifndef ECHOCTL -+#define ECHOCTL 0 -+#endif -+#ifndef ECHOKE -+#define ECHOKE 0 -+#endif -+#ifndef ECHOPRT -+#define ECHOPRT 0 -+#endif -+#ifndef FFDLY -+#define FFDLY 0 -+#endif -+#ifndef IMAXBEL -+#define IMAXBEL 0 -+#endif -+#ifndef IUCLC -+#define IUCLC 0 -+#endif -+#ifndef IXANY -+#define IXANY 0 -+#endif -+#ifndef NLDLY -+#define NLDLY 0 -+#endif -+#ifndef OCRNL -+#define OCRNL 0 -+#endif -+#ifndef OFDEL -+#define OFDEL 0 -+#endif -+#ifndef OFILL -+#define OFILL 0 -+#endif -+#ifndef OLCUC -+#define OLCUC 0 -+#endif -+#ifndef ONLCR -+#define ONLCR 0 -+#endif -+#ifndef ONLRET -+#define ONLRET 0 -+#endif -+#ifndef ONOCR -+#define ONOCR 0 -+#endif -+#ifndef OXTABS -+#define OXTABS 0 -+#endif -+#ifndef TAB3 -+#define TAB3 0 -+#endif -+#ifndef TABDLY -+#define TABDLY 0 -+#endif -+#ifndef TOSTOP -+#define TOSTOP 0 -+#endif -+#ifndef VTDLY -+#define VTDLY 0 -+#endif -+#ifndef XCASE -+#define XCASE 0 -+#endif -+ - /* - * Reset the terminal mode bits to a sensible state. Very useful after - * a child program dies in raw mode. -@@ -195,6 +271,10 @@ out_char(int c) - void - reset_tty_settings(int fd, TTY * tty_settings, int noset) - { -+ unsigned mask; -+#ifdef TIOCMGET -+ int modem_bits; -+#endif - GET_TTY(fd, tty_settings); - - #ifdef TERMIOS -@@ -228,106 +308,65 @@ reset_tty_settings(int fd, TTY * tty_settings, int noset) - reset_char(VWERASE, CWERASE); - #endif - -- tty_settings->c_iflag &= ~((unsigned) (IGNBRK -- | PARMRK -- | INPCK -- | ISTRIP -- | INLCR -- | IGNCR --#ifdef IUCLC -- | IUCLC --#endif --#ifdef IXANY -- | IXANY --#endif -- | IXOFF)); -- -- tty_settings->c_iflag |= (BRKINT -- | IGNPAR -- | ICRNL -- | IXON --#ifdef IMAXBEL -- | IMAXBEL --#endif -- ); -- -- tty_settings->c_oflag &= ~((unsigned) (0 --#ifdef OLCUC -- | OLCUC --#endif --#ifdef OCRNL -- | OCRNL --#endif --#ifdef ONOCR -- | ONOCR --#endif --#ifdef ONLRET -- | ONLRET --#endif --#ifdef OFILL -- | OFILL --#endif --#ifdef OFDEL -- | OFDEL --#endif --#ifdef NLDLY -- | NLDLY --#endif --#ifdef CRDLY -- | CRDLY --#endif --#ifdef TABDLY -- | TABDLY --#endif --#ifdef BSDLY -- | BSDLY --#endif --#ifdef VTDLY -- | VTDLY --#endif --#ifdef FFDLY -- | FFDLY --#endif -- )); -- -- tty_settings->c_oflag |= (OPOST --#ifdef ONLCR -- | ONLCR --#endif -- ); -- -- tty_settings->c_cflag &= ~((unsigned) (CSIZE -- | CSTOPB -- | PARENB -- | PARODD -- | CLOCAL)); -- tty_settings->c_cflag |= (CS8 | CREAD); -- tty_settings->c_lflag &= ~((unsigned) (ECHONL -- | NOFLSH --#ifdef TOSTOP -- | TOSTOP --#endif --#ifdef ECHOPTR -- | ECHOPRT --#endif --#ifdef XCASE -- | XCASE --#endif -- )); -- -- tty_settings->c_lflag |= (ISIG -- | ICANON -- | ECHO -- | ECHOE -- | ECHOK --#ifdef ECHOCTL -- | ECHOCTL --#endif --#ifdef ECHOKE -- | ECHOKE --#endif -- ); --#endif -+ clear_flags(tty_settings->c_iflag, (IGNBRK -+ | PARMRK -+ | INPCK -+ | ISTRIP -+ | INLCR -+ | IGNCR -+ | IUCLC -+ | IXANY -+ | IXOFF)); -+ -+ set_flags(tty_settings->c_iflag, (BRKINT -+ | IGNPAR -+ | ICRNL -+ | IXON -+ | IMAXBEL)); -+ -+ clear_flags(tty_settings->c_oflag, (0 -+ | OLCUC -+ | OCRNL -+ | ONOCR -+ | ONLRET -+ | OFILL -+ | OFDEL -+ | NLDLY -+ | CRDLY -+ | TABDLY -+ | BSDLY -+ | VTDLY -+ | FFDLY)); -+ -+ set_flags(tty_settings->c_oflag, (OPOST -+ | ONLCR)); -+ -+ mask = (CSIZE | CSTOPB | PARENB | PARODD); -+#ifdef TIOCMGET -+ /* leave clocal alone if this appears to use a modem */ -+ if (ioctl(fd, TIOCMGET, &modem_bits) == -1) -+ mask |= CLOCAL; -+#else -+ /* cannot check - use the behavior from tset */ -+ mask |= CLOCAL; -+#endif -+ clear_flags(tty_settings->c_cflag, mask); -+ -+ set_flags(tty_settings->c_cflag, (CS8 | CREAD)); -+ clear_flags(tty_settings->c_lflag, (ECHONL -+ | NOFLSH -+ | TOSTOP -+ | ECHOPRT -+ | XCASE)); -+ -+ set_flags(tty_settings->c_lflag, (ISIG -+ | ICANON -+ | ECHO -+ | ECHOE -+ | ECHOK -+ | ECHOCTL -+ | ECHOKE)); -+#endif /* TERMIOS */ - - if (!noset) { - SET_TTY(fd, tty_settings); -@@ -402,29 +441,23 @@ set_conversions(TTY * tty_settings) - #if defined(EXP_WIN32_DRIVER) - /* FIXME */ - #else --#ifdef ONLCR -- tty_settings->c_oflag |= ONLCR; --#endif -- tty_settings->c_iflag |= ICRNL; -- tty_settings->c_lflag |= ECHO; --#ifdef OXTABS -- tty_settings->c_oflag |= OXTABS; --#endif /* OXTABS */ -+ set_flags(tty_settings->c_oflag, ONLCR); -+ set_flags(tty_settings->c_iflag, ICRNL); -+ set_flags(tty_settings->c_lflag, ECHO); -+ set_flags(tty_settings->c_oflag, OXTABS); - - /* test used to be tgetflag("NL") */ - if (VALID_STRING(newline) && newline[0] == '\n' && !newline[1]) { - /* Newline, not linefeed. */ --#ifdef ONLCR -- tty_settings->c_oflag &= ~((unsigned) ONLCR); --#endif -- tty_settings->c_iflag &= ~((unsigned) ICRNL); -+ clear_flags(tty_settings->c_oflag, ONLCR); -+ clear_flags(tty_settings->c_iflag, ICRNL); - } --#ifdef OXTABS -+#if OXTABS - /* test used to be tgetflag("pt") */ - if (VALID_STRING(set_tab) && VALID_STRING(clear_all_tabs)) -- tty_settings->c_oflag &= ~OXTABS; -+ clear_flags(tty_settings->c_oflag, OXTABS); - #endif /* OXTABS */ -- tty_settings->c_lflag |= (ECHOE | ECHOK); -+ set_flags(tty_settings->c_lflag, (ECHOE | ECHOK)); - #endif - } - -@@ -490,7 +523,7 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings) - bool need_flush = FALSE; - - (void) old_settings; --#ifdef TAB3 -+#if TAB3 - if (old_settings != 0 && - old_settings->c_oflag & (TAB3 | ONLCR | OCRNL | ONLRET)) { - old_settings->c_oflag &= (TAB3 | ONLCR | OCRNL | ONLRET); -@@ -512,22 +545,22 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings) - - if (VALID_STRING(clear_margins)) { - need_flush |= sent_string(clear_margins); -- } else -+ } - #if defined(set_lr_margin) -- if (VALID_STRING(set_lr_margin)) { -+ else if (VALID_STRING(set_lr_margin)) { - need_flush |= sent_string(TIPARM_2(set_lr_margin, 0, columns - 1)); -- } else -+ } - #endif - #if defined(set_left_margin_parm) && defined(set_right_margin_parm) -- if (VALID_STRING(set_left_margin_parm) -- && VALID_STRING(set_right_margin_parm)) { -+ else if (VALID_STRING(set_left_margin_parm) -+ && VALID_STRING(set_right_margin_parm)) { - need_flush |= sent_string(TIPARM_1(set_left_margin_parm, 0)); - need_flush |= sent_string(TIPARM_1(set_right_margin_parm, - columns - 1)); -- } else -+ } - #endif -- if (VALID_STRING(set_left_margin) -- && VALID_STRING(set_right_margin)) { -+ else if (VALID_STRING(set_left_margin) -+ && VALID_STRING(set_right_margin)) { - need_flush |= to_left_margin(); - need_flush |= sent_string(set_left_margin); - if (VALID_STRING(parm_right_cursor)) { -diff --git a/progs/tabs.c b/progs/tabs.c -index 7378d116..d904330b 100644 ---- a/progs/tabs.c -+++ b/progs/tabs.c -@@ -370,7 +370,9 @@ do_set_margin(int margin, bool no_op) - } - tputs(set_left_margin, 1, putch); - } -- } else if (VALID_STRING(set_left_margin_parm)) { -+ } -+#if defined(set_left_margin_parm) && defined(set_right_margin_parm) -+ else if (VALID_STRING(set_left_margin_parm)) { - result = TRUE; - if (!no_op) { - if (VALID_STRING(set_right_margin_parm)) { -@@ -379,12 +381,16 @@ do_set_margin(int margin, bool no_op) - tputs(TIPARM_2(set_left_margin_parm, margin, max_cols), 1, putch); - } - } -- } else if (VALID_STRING(set_lr_margin)) { -+ } -+#endif -+#if defined(set_lr_margin) -+ else if (VALID_STRING(set_lr_margin)) { - result = TRUE; - if (!no_op) { - tputs(TIPARM_2(set_lr_margin, margin, max_cols), 1, putch); - } - } -+#endif - return result; - } - -diff --git a/progs/tic.c b/progs/tic.c -index 888927e2..78b568fa 100644 ---- a/progs/tic.c -+++ b/progs/tic.c -@@ -3142,6 +3142,7 @@ guess_ANSI_VTxx(TERMTYPE2 *tp) - * In particular, any ECMA-48 terminal should support these, though the details - * for u9 are implementation dependent. - */ -+#if defined(user6) && defined(user7) && defined(user8) && defined(user9) - static void - check_user_6789(TERMTYPE2 *tp) - { -@@ -3177,6 +3178,9 @@ check_user_6789(TERMTYPE2 *tp) - break; - } - } -+#else -+#define check_user_6789(tp) /* nothing */ -+#endif - - /* other sanity-checks (things that we don't want in the normal - * logic that reads a terminfo entry) --- -2.40.0 diff --git a/meta/recipes-core/ncurses/files/0001-tic-hang.patch b/meta/recipes-core/ncurses/files/0001-tic-hang.patch index f98a943e5c..8cb92a3939 100644 --- a/meta/recipes-core/ncurses/files/0001-tic-hang.patch +++ b/meta/recipes-core/ncurses/files/0001-tic-hang.patch @@ -1,7 +1,7 @@ -From 168ba7a681be73ac024438e33e14fde1d5aea97d Mon Sep 17 00:00:00 2001 +From a51a53f0eecfd4d083aba8dfcd47c65e93978ff1 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Fri, 30 Mar 2018 10:02:24 +0800 -Subject: [PATCH 1/2] tic hang +Subject: [PATCH] tic hang Upstream-Status: Inappropriate [configuration] @@ -17,10 +17,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/misc/terminfo.src b/misc/terminfo.src -index 84f4810..6b385ec 100644 +index 5d575b8e..f9cc6880 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src -@@ -5562,12 +5562,11 @@ konsole-xf3x|KDE console window with keyboard for XFree86 3.x xterm, +@@ -6518,12 +6518,11 @@ konsole-xf3x|KDE console window with keyboard for XFree86 3.x xterm, # The value for kbs (see konsole-vt100) reflects local customization rather # than the settings used for XFree86 xterm. konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm, @@ -38,6 +38,3 @@ index 84f4810..6b385ec 100644 # Obsolete: vt100.keymap # KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but --- -1.8.3.1 - diff --git a/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch b/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch index 66f26c06ab..11ca66c8e8 100644 --- a/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch +++ b/meta/recipes-core/ncurses/files/0002-configure-reproducible.patch @@ -1,4 +1,4 @@ -From ec87e53066a9942e9aaba817d71268342f5e83b9 Mon Sep 17 00:00:00 2001 +From 63cf58044f4ab3297c5a2d0e132e87ebfa80c753 Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Wed, 16 Aug 2017 14:45:27 +0800 Subject: [PATCH] configure: reproducible @@ -13,16 +13,15 @@ Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Rebase to 6.1 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 421cf859..a1b7840d 100755 +index 488d93fc..005d44e2 100755 --- a/configure +++ b/configure -@@ -5072,7 +5072,7 @@ else +@@ -5129,7 +5129,7 @@ else ;; (*) cf_cv_ar_flags=unknown diff --git a/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch b/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch index a15694d4d4..d89399bbe5 100644 --- a/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch +++ b/meta/recipes-core/ncurses/files/0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch @@ -1,4 +1,4 @@ -From 10cd0c12a6e14fb4f0498c299c1dd32720b710da Mon Sep 17 00:00:00 2001 +From 5962a5ee2885f67a396f7e8955ac1bbd7f15d4aa Mon Sep 17 00:00:00 2001 From: Nathan Rossi <nathan@nathanrossi.com> Date: Mon, 14 Dec 2020 13:39:02 +1000 Subject: [PATCH] gen-pkgconfig.in: Do not include LDFLAGS in generated pc @@ -10,13 +10,12 @@ includes build host specific paths and options (e.g. uninative and Upstream-Status: Inappropriate [OE Specific] Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> - --- misc/gen-pkgconfig.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in -index a45dd54f..85273054 100644 +index 89a5cd4a..07d94d17 100644 --- a/misc/gen-pkgconfig.in +++ b/misc/gen-pkgconfig.in @@ -83,7 +83,7 @@ if [ "$includedir" != "/usr/include" ]; then diff --git a/meta/recipes-core/ncurses/files/exit_prototype.patch b/meta/recipes-core/ncurses/files/exit_prototype.patch index fd961512e0..299852d2c0 100644 --- a/meta/recipes-core/ncurses/files/exit_prototype.patch +++ b/meta/recipes-core/ncurses/files/exit_prototype.patch @@ -1,28 +1,27 @@ -From 4a769a441d7e57a23017c3037cde3e53fb9f35fe Mon Sep 17 00:00:00 2001 +From af798dceafec8a9ea3f83fc250d784511ca0a29c Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Tue, 30 Aug 2022 15:58:32 -0700 Subject: [PATCH] Add needed headers for including mbstate_t and exit() Upstream-Status: Inappropriate [Reconfigure will solve it] Signed-off-by: Khem Raj <raj.khem@gmail.com> - --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure -index f377f551..163f8899 100755 +index 005d44e2..72fa6c23 100755 --- a/configure +++ b/configure -@@ -3423,6 +3423,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" +@@ -3462,6 +3462,7 @@ rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF - #line 3424 "configure" + #line 3463 "configure" #include "confdefs.h" +#include <stdlib.h> $ac_declaration int main (void) -@@ -13111,6 +13112,7 @@ cat >"conftest.$ac_ext" <<_ACEOF +@@ -13533,6 +13534,7 @@ cat >"conftest.$ac_ext" <<_ACEOF #include <stdlib.h> #include <stdarg.h> #include <stdio.h> diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc index 761b6a3d31..f5e37b94da 100644 --- a/meta/recipes-core/ncurses/ncurses.inc +++ b/meta/recipes-core/ncurses/ncurses.inc @@ -2,7 +2,7 @@ SUMMARY = "The New Curses library" DESCRIPTION = "SVr4 and XSI-Curses compatible curses library and terminfo tools including tic, infocmp, captoinfo. Supports color, multiple highlights, forms-drawing characters, and automatic recognition of keypad and function-key sequences. Extensions include resizable windows and mouse support on both xterm and Linux console using the gpm library." HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=c5a4600fdef86384c41ca33ecc70a4b8;endline=27" +LIC_FILES_CHKSUM = "file://COPYING;md5=6f291ee54551d9d8d992ecd623fe4bc7;endline=27" SECTION = "libs" DEPENDS = "ncurses-native" DEPENDS:class-native = "" @@ -13,15 +13,13 @@ BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config \ inherit autotools binconfig-disabled multilib_header pkgconfig # Upstream has useful patches at times at ftp://invisible-island.net/ncurses/ -SRC_URI = "git://github.com/mirror/ncurses.git;protocol=https;branch=master" +SRC_URI = "git://github.com/ThomasDickey/ncurses-snapshots.git;protocol=https;branch=master" EXTRA_AUTORECONF = "-I m4" CACHED_CONFIGUREVARS = "cf_cv_func_nanosleep=yes" CACHED_CONFIGUREVARS:append:linux = " cf_cv_working_poll=yes" -EXTRASITECONFIG = "CFLAGS='${CFLAGS} -I${SYSROOT_DESTDIR}${includedir}'" - # Whether to enable separate widec libraries; must be 'true' or 'false' # # TODO: remove this variable when widec is supported in every setup? diff --git a/meta/recipes-core/ncurses/ncurses_6.4.bb b/meta/recipes-core/ncurses/ncurses_6.5.bb index 2c621525f9..2e3ee337ea 100644 --- a/meta/recipes-core/ncurses/ncurses_6.4.bb +++ b/meta/recipes-core/ncurses/ncurses_6.5.bb @@ -4,14 +4,12 @@ SRC_URI += "file://0001-tic-hang.patch \ file://0002-configure-reproducible.patch \ file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \ file://exit_prototype.patch \ - file://0001-Fix-CVE-2023-29491.patch \ - file://0001-Updating-reset-code-ncurses-6.4-patch-20231104.patch \ " # commit id corresponds to the revision in package version -SRCREV = "79b9071f2be20a24c7be031655a5638f6032f29f" +SRCREV = "1c55d64d9d3e00399a21f04e9cac1e472ab5f70a" S = "${WORKDIR}/git" EXTRA_OECONF += "--with-abi-version=5" -UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)$" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+_\d+)$" # 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/meta/recipes-core/ncurses/site_config/headers b/meta/recipes-core/ncurses/site_config/headers deleted file mode 100644 index 087b7bfd5e..0000000000 --- a/meta/recipes-core/ncurses/site_config/headers +++ /dev/null @@ -1,5 +0,0 @@ -curses.h -ncurses/curses.h -ncurses.h -ncurses/termcap.h - diff --git a/meta/recipes-core/newlib/libgloss_git.bb b/meta/recipes-core/newlib/libgloss_git.bb index 7e34e33c7a..3c97a7f296 100644 --- a/meta/recipes-core/newlib/libgloss_git.bb +++ b/meta/recipes-core/newlib/libgloss_git.bb @@ -6,7 +6,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/libgloss:" SRC_URI:append = " file://libgloss-build-without-nostdinc.patch" SRC_URI:append:powerpc = " file://fix-rs6000-crt0.patch" -SRC_URI:append:powerpc = " file://fix-rs6000-cflags.patch" do_configure() { ${S}/libgloss/configure ${EXTRA_OECONF} diff --git a/meta/recipes-core/newlib/newlib.inc b/meta/recipes-core/newlib/newlib.inc index 6113f5e831..34b0f3f747 100644 --- a/meta/recipes-core/newlib/newlib.inc +++ b/meta/recipes-core/newlib/newlib.inc @@ -28,6 +28,14 @@ B = "${WORKDIR}/build" ## disable stdlib TARGET_CC_ARCH:append = " -nostdlib" +# Both the C library and the application should share the same mcmodel. +# Use the medium-any code model for the RISC-V 64 bit implementation, +# since medlow can only access addresses below 0x80000000 and RAM +# starts at 0x80000000 on RISC-V 64 +# Keep RISC-V 32 using -mcmodel=medlow (symbols lie between -2GB:2GB) +TARGET_CFLAGS:append:qemuriscv64 = " -mcmodel=medany" + + EXTRA_OECONF = " \ --build=${BUILD_SYS} \ --target=${TARGET_SYS} \ diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb index 3dc031d3b6..35ca8d1834 100644 --- a/meta/recipes-core/ovmf/ovmf_git.bb +++ b/meta/recipes-core/ovmf/ovmf_git.bb @@ -26,10 +26,24 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \ file://0004-reproducible.patch \ " -PV = "edk2-stable202308" -SRCREV = "819cfc6b42a68790a23509e4fcc58ceb70e1965e" +PV = "edk2-stable202402" +SRCREV = "edc6681206c1a8791981a2f911d2fb8b3d2f5768" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)" +CVE_PRODUCT = "edk2" +CVE_VERSION = "${@d.getVar('PV').split('stable')[1]}" + +CVE_STATUS[CVE-2014-8271] = "fixed-version: Fixed in svn_16280, which is an unusual versioning breaking version comparison." +CVE_STATUS[CVE-2014-4859] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2014-4860] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2019-14553] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2019-14559] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2019-14562] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2019-14563] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2019-14575] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2019-14586] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2019-14587] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." + inherit deploy PARALLEL_MAKE = "" diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb index d96d2f5fff..fecc3334ea 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb @@ -37,4 +37,6 @@ RDEPENDS:${PN} = "\ RRECOMMENDS:${PN} = "\ ${VIRTUAL-RUNTIME_base-utils-syslog} \ ${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS} \ - ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "init-ifupdown", "", d)}" + ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "init-ifupdown", "", d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit pni-names", "ifupdown", "", d)} \ + " diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 40937098e6..30cf61a2cb 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb @@ -80,7 +80,7 @@ python do_compile () { import subprocess # Build a separate executable for each splash image - workdir = d.getVar('WORKDIR') + workdir = d.getVar('UNPACKDIR') convertscript = "%s/make-image-header.sh" % d.getVar('S') destfile = "%s/psplash-poky-img.h" % d.getVar('B') localfiles = d.getVar('SPLASH_LOCALPATHS').split() @@ -103,7 +103,7 @@ python do_compile () { do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh + install -m 0755 ${UNPACKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh # make fifo for psplash install -d ${D}/mnt @@ -112,8 +112,8 @@ do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_system_unitdir} - install -m 644 ${WORKDIR}/psplash-start.service ${D}/${systemd_system_unitdir} - install -m 644 ${WORKDIR}/psplash-systemd.service ${D}/${systemd_system_unitdir} + install -m 644 ${UNPACKDIR}/psplash-start.service ${D}/${systemd_system_unitdir} + install -m 644 ${UNPACKDIR}/psplash-systemd.service ${D}/${systemd_system_unitdir} fi install -d ${D}${bindir} diff --git a/meta/recipes-core/readline/readline.inc b/meta/recipes-core/readline/readline.inc index 4aefc5636d..555bd0876f 100644 --- a/meta/recipes-core/readline/readline.inc +++ b/meta/recipes-core/readline/readline.inc @@ -38,7 +38,7 @@ do_install:append () { rmdir ${D}${datadir}/${BPN} || true install -m 0755 -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc + install -m 0644 ${UNPACKDIR}/inputrc ${D}${sysconfdir}/inputrc } BBCLASSEXTEND = "native nativesdk" @@ -54,4 +54,4 @@ ALTERNATIVE_LINK_NAME[history.3] = "${mandir}/man3/history.3" # OpenSuse injects versions into libreadline leading to conficits between our native one and theirs # see their spec file for where this is injected. Extra versioning is harmless so we just do the same. SRC_URI:append:class-native = " file://rl-native.map" -LDFLAGS:append:class-native = " -Wl,--version-script=${WORKDIR}/rl-native.map" +LDFLAGS:append:class-native = " -Wl,--version-script=${UNPACKDIR}/rl-native.map" diff --git a/meta/recipes-core/readline/readline/readline82-001.patch b/meta/recipes-core/readline/readline/readline82-001.patch new file mode 100644 index 0000000000..4e9839db9c --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-001.patch @@ -0,0 +1,45 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-001 + +Bug-Reported-by: Kan-Ru Chen <koster@debian.org> +Bug-Reference-ID: +Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109 + +Bug-Description: + +Starting a readline application with an invalid locale specification for +LC_ALL/LANG/LC_CTYPE can cause it crash on the first call to readline. + +Patch (apply with `patch -p0'): + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/nls.c 2022-08-15 09:38:51.000000000 -0400 +--- nls.c 2022-10-05 09:23:22.000000000 -0400 +*************** +*** 142,145 **** +--- 142,149 ---- + lspec = ""; + ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */ ++ if (ret == 0 || *ret == 0) ++ ret = setlocale (LC_CTYPE, (char *)NULL); ++ if (ret == 0 || *ret == 0) ++ ret = RL_DEFAULT_LOCALE; + #else + ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec; + +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 0 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 1 diff --git a/meta/recipes-core/readline/readline/readline82-002.patch b/meta/recipes-core/readline/readline/readline82-002.patch new file mode 100644 index 0000000000..5629685dc1 --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-002.patch @@ -0,0 +1,51 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-002 + +Bug-Reported-by: srobertson@peratonlabs.com +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00049.html + +Bug-Description: + +It's possible for readline to try to zero out a line that's not null- +terminated, leading to a memory fault. + +Patch (apply with `patch -p0'): + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/display.c 2022-04-05 10:47:31.000000000 -0400 +--- display.c 2022-12-13 13:11:22.000000000 -0500 +*************** +*** 2684,2692 **** + + if (visible_line) +! { +! temp = visible_line; +! while (*temp) +! *temp++ = '\0'; +! } + rl_on_new_line (); + forced_display++; +--- 2735,2740 ---- + + if (visible_line) +! memset (visible_line, 0, line_size); +! + rl_on_new_line (); + forced_display++; +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 1 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 2 diff --git a/meta/recipes-core/readline/readline/readline82-003.patch b/meta/recipes-core/readline/readline/readline82-003.patch new file mode 100644 index 0000000000..61570bf4f4 --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-003.patch @@ -0,0 +1,46 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-003 + +Bug-Reported-by: Stefan Klinger <readline-gnu.org@stefan-klinger.de> +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-08/msg00018.html + +Bug-Description: + +Patch (apply with `patch -p0'): + +The custom color prefix that readline uses to color possible completions +must have a leading `.'. + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/colors.c 2021-12-08 11:38:25.000000000 -0500 +--- colors.c 2023-08-28 16:40:04.000000000 -0400 +*************** +*** 74,78 **** + static void restore_default_color (void); + +! #define RL_COLOR_PREFIX_EXTENSION "readline-colored-completion-prefix" + + COLOR_EXT_TYPE *_rl_color_ext_list = 0; +--- 74,78 ---- + static void restore_default_color (void); + +! #define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix" + + COLOR_EXT_TYPE *_rl_color_ext_list = 0; +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 2 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 3 diff --git a/meta/recipes-core/readline/readline/readline82-004.patch b/meta/recipes-core/readline/readline/readline82-004.patch new file mode 100644 index 0000000000..cedc3d0fe4 --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-004.patch @@ -0,0 +1,68 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-004 + +Bug-Reported-by: Henry Bent <henry.r.bent@gmail.com> +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00044.html + +Bug-Description: + +Patch (apply with `patch -p0'): + +There are systems that supply one of select or pselect, but not both. + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/input.c 2022-04-08 15:43:24.000000000 -0400 +--- input.c 2022-11-28 09:41:08.000000000 -0500 +*************** +*** 152,156 **** +--- 152,158 ---- + int _rl_timeout_init (void); + int _rl_timeout_sigalrm_handler (void); ++ #if defined (RL_TIMEOUT_USE_SELECT) + int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *); ++ #endif + + static void _rl_timeout_handle (void); +*************** +*** 249,253 **** + int chars_avail, k; + char input; +! #if defined(HAVE_SELECT) + fd_set readfds, exceptfds; + struct timeval timeout; +--- 251,255 ---- + int chars_avail, k; + char input; +! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + fd_set readfds, exceptfds; + struct timeval timeout; +*************** +*** 806,810 **** + unsigned char c; + int fd; +! #if defined (HAVE_PSELECT) + sigset_t empty_set; + fd_set readfds; +--- 815,819 ---- + unsigned char c; + int fd; +! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT) + sigset_t empty_set; + fd_set readfds; +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 3 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 4 diff --git a/meta/recipes-core/readline/readline/readline82-005.patch b/meta/recipes-core/readline/readline/readline82-005.patch new file mode 100644 index 0000000000..69c2e4f77a --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-005.patch @@ -0,0 +1,53 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-005 + +Bug-Reported-by: Simon Marchi <simon.marchi@polymtl.ca> +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-09/msg00005.html + +Bug-Description: + +If an application is using readline in callback mode, and a signal arrives +after readline checks for it in rl_callback_read_char() but before it +restores the application's signal handlers, it won't get processed until the +next time the application calls rl_callback_read_char(). Readline needs to +check for and resend any pending signals after restoring the application's +signal handlers. + +Patch (apply with `patch -p0'): + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/callback.c 2022-04-29 12:02:56.000000000 -0400 +--- callback.c 2022-10-11 10:59:06.000000000 -0400 +*************** +*** 116,120 **** + do { \ + if (rl_persistent_signal_handlers == 0) \ +! rl_clear_signals (); \ + return; \ + } while (0) +--- 116,123 ---- + do { \ + if (rl_persistent_signal_handlers == 0) \ +! { \ +! rl_clear_signals (); \ +! if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ +! } \ + return; \ + } while (0) +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 4 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 5 diff --git a/meta/recipes-core/readline/readline/readline82-006.patch b/meta/recipes-core/readline/readline/readline82-006.patch new file mode 100644 index 0000000000..d66afe82c9 --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-006.patch @@ -0,0 +1,102 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-006 + +Bug-Reported-by: Tom de Vries <tdevries@suse.de> +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-09/msg00001.html + +Bug-Description: + +This is a variant of the same issue as the one fixed by patch 5. In this +case, the signal arrives and is pending before readline calls rl_getc(). +When this happens, the pending signal will be handled by the loop, but may +alter or destroy some state that the callback uses. Readline needs to treat +this case the same way it would if a signal interrupts pselect/select, so +compound operations like searches and reading numeric arguments get cleaned +up properly. + +Patch (apply with `patch -p0'): + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/input.c 2022-12-22 16:15:48.000000000 -0500 +--- input.c 2023-01-10 11:53:45.000000000 -0500 +*************** +*** 812,816 **** + rl_getc (FILE *stream) + { +! int result; + unsigned char c; + int fd; +--- 812,816 ---- + rl_getc (FILE *stream) + { +! int result, ostate, osig; + unsigned char c; + int fd; +*************** +*** 823,828 **** +--- 823,842 ---- + while (1) + { ++ osig = _rl_caught_signal; ++ ostate = rl_readline_state; ++ + RL_CHECK_SIGNALS (); + ++ #if defined (READLINE_CALLBACKS) ++ /* Do signal handling post-processing here, but just in callback mode ++ for right now because the signal cleanup can change some of the ++ callback state, and we need to either let the application have a ++ chance to react or abort some current operation that gets cleaned ++ up by rl_callback_sigcleanup(). If not, we'll just run through the ++ loop again. */ ++ if (osig != 0 && (ostate & RL_STATE_CALLBACK)) ++ goto postproc_signal; ++ #endif ++ + /* We know at this point that _rl_caught_signal == 0 */ + +*************** +*** 888,891 **** +--- 902,908 ---- + + handle_error: ++ osig = _rl_caught_signal; ++ ostate = rl_readline_state; ++ + /* If the error that we received was EINTR, then try again, + this is simply an interrupted system call to read (). We allow +*************** +*** 928,933 **** +--- 945,959 ---- + #endif /* SIGALRM */ + ++ postproc_signal: ++ /* POSIX says read(2)/pselect(2)/select(2) don't return EINTR for any ++ reason other than being interrupted by a signal, so we can safely ++ call the application's signal event hook. */ + if (rl_signal_event_hook) + (*rl_signal_event_hook) (); ++ #if defined (READLINE_CALLBACKS) ++ else if (osig == SIGINT && (ostate & RL_STATE_CALLBACK) && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG))) ++ /* just these cases for now */ ++ _rl_abort_internal (); ++ #endif + } + } +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 5 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 6 diff --git a/meta/recipes-core/readline/readline/readline82-007.patch b/meta/recipes-core/readline/readline/readline82-007.patch new file mode 100644 index 0000000000..9fa1ccb552 --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-007.patch @@ -0,0 +1,51 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-007 + +Bug-Reported-by: Kevin Pulo <kev@pulo.com.au> +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-11/msg00002.html + +Bug-Description: + +If readline is called with no prompt, it should display a newline if return +is typed on an empty line. It should still suppress the final newline if +return is typed on the last (empty) line of a multi-line command. + +Patch (apply with `patch -p0'): + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/display.c 2022-04-05 10:47:31.000000000 -0400 +--- display.c 2022-12-13 13:11:22.000000000 -0500 +*************** +*** 3342,3348 **** + &last_face[_rl_screenwidth - 1 + woff], 1); + } +! _rl_vis_botlin = 0; +! if (botline_length > 0 || _rl_last_c_pos > 0) + rl_crlf (); + fflush (rl_outstream); + rl_display_fixed++; +--- 3394,3400 ---- + &last_face[_rl_screenwidth - 1 + woff], 1); + } +! if ((_rl_vis_botlin == 0 && botline_length == 0) || botline_length > 0 || _rl_last_c_pos > 0) + rl_crlf (); ++ _rl_vis_botlin = 0; + fflush (rl_outstream); + rl_display_fixed++; +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 6 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 7 diff --git a/meta/recipes-core/readline/readline/readline82-008.patch b/meta/recipes-core/readline/readline/readline82-008.patch new file mode 100644 index 0000000000..660cb1e00b --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-008.patch @@ -0,0 +1,80 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-008 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +Add missing prototypes for several function declarations. + +Patch (apply with `patch -p0'): + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/text.c Wed Oct 27 11:03:59 2021 +--- text.c Thu Nov 16 16:24:58 2023 +*************** +*** 1765,1770 **** + #if defined (READLINE_CALLBACKS) + static int +! _rl_char_search_callback (data) +! _rl_callback_generic_arg *data; + { + _rl_callback_func = 0; +--- 1765,1769 ---- + #if defined (READLINE_CALLBACKS) + static int +! _rl_char_search_callback (_rl_callback_generic_arg *data) + { + _rl_callback_func = 0; +*** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022 +--- bind.c Thu Nov 16 16:25:17 2023 +*************** +*** 1168,1174 **** + + static int +! parse_comparison_op (s, indp) +! const char *s; +! int *indp; + { + int i, peekc, op; +--- 1168,1172 ---- + + static int +! parse_comparison_op (const char *s, int *indp) + { + int i, peekc, op; +*** ../readline-8.2-patched/rltty.c Fri Feb 18 11:14:22 2022 +--- rltty.c Thu Nov 16 16:25:36 2023 +*************** +*** 81,86 **** + to get the tty settings. */ + static void +! set_winsize (tty) +! int tty; + { + #if defined (TIOCGWINSZ) +--- 81,85 ---- + to get the tty settings. */ + static void +! set_winsize (int tty) + { + #if defined (TIOCGWINSZ) + +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 7 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 8 diff --git a/meta/recipes-core/readline/readline/readline82-009.patch b/meta/recipes-core/readline/readline/readline82-009.patch new file mode 100644 index 0000000000..1fcf7b3535 --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-009.patch @@ -0,0 +1,76 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-009 + +Bug-Reported-by: Stefan H. Holek <stefan@epy.co.at> +Bug-Reference-ID: <50F8DA45-B7F3-4DE1-AB94-19AE42649CDC@epy.co.at> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00021.html + +Bug-Description: + +Fix issue where the directory name portion of the word to be completed (the +part that is passed to opendir()) requires both tilde expansion and dequoting. +Readline only performed tilde expansion in this case, so filename completion +would fail. + +Patch (apply with `patch -p0'): + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/complete.c 2022-04-05 10:47:06.000000000 -0400 +--- complete.c 2022-10-26 15:08:51.000000000 -0400 +*************** +*** 2527,2531 **** + xfree (dirname); + dirname = temp; +! tilde_dirname = 1; + } + +--- 2527,2532 ---- + xfree (dirname); + dirname = temp; +! if (*dirname != '~') +! tilde_dirname = 1; /* indicate successful tilde expansion */ + } + +*************** +*** 2546,2554 **** + users_dirname = savestring (dirname); + } +! else if (tilde_dirname == 0 && rl_completion_found_quote && rl_filename_dequoting_function) + { +! /* delete single and double quotes */ + xfree (dirname); +! dirname = savestring (users_dirname); + } + directory = opendir (dirname); +--- 2547,2560 ---- + users_dirname = savestring (dirname); + } +! else if (rl_completion_found_quote && rl_filename_dequoting_function) + { +! /* We already ran users_dirname through the dequoting function. +! If tilde_dirname == 1, we successfully performed tilde expansion +! on dirname. Now we need to reconcile those results. We either +! just copy the already-dequoted users_dirname or tilde expand it +! if we tilde-expanded dirname. */ +! temp = tilde_dirname ? tilde_expand (users_dirname) : savestring (users_dirname); + xfree (dirname); +! dirname = temp; + } + directory = opendir (dirname); + +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 8 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 9 diff --git a/meta/recipes-core/readline/readline/readline82-010.patch b/meta/recipes-core/readline/readline/readline82-010.patch new file mode 100644 index 0000000000..6152953e91 --- /dev/null +++ b/meta/recipes-core/readline/readline/readline82-010.patch @@ -0,0 +1,70 @@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 8.2 +Patch-ID: readline82-010 + +Bug-Reported-by: Martin Castillo <castilma@uni-bremen.de> +Bug-Reference-ID: <2d42153b-cf65-caba-dff1-cd3bc6268c7e@uni-bremen.de> +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-01/msg00000.html + +Bug-Description: + +Fix the case where text to be completed from the line buffer (quoted) is +compared to the common prefix of the possible matches (unquoted) and the +quoting makes the former appear to be longer than the latter. Readline +assumes the match doesn't add any characters to the word and doesn't display +multiple matches. + +Patch (apply with `patch -p0'): + +Upstream-Status: Submitted [https://ftp.gnu.org/gnu/readline/readline-8.2-patches/] +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +*** ../readline-8.2-patched/complete.c Tue Apr 5 10:47:06 2022 +--- complete.c Sat Jan 7 14:19:45 2023 +*************** +*** 2032,2038 **** + text = rl_copy_text (start, end); + matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); + /* nontrivial_lcd is set if the common prefix adds something to the word + being completed. */ +! nontrivial_lcd = matches && compare_match (text, matches[0]) != 0; + if (what_to_do == '!' || what_to_do == '@') + tlen = strlen (text); +--- 2038,2060 ---- + text = rl_copy_text (start, end); + matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); ++ /* If TEXT contains quote characters, it will be dequoted as part of ++ generating the matches, and the matches will not contain any quote ++ characters. We need to dequote TEXT before performing the comparison. ++ Since compare_match performs the dequoting, and we only want to do it ++ once, we don't call compare_matches after dequoting TEXT; we call ++ strcmp directly. */ + /* nontrivial_lcd is set if the common prefix adds something to the word + being completed. */ +! if (rl_filename_completion_desired && rl_filename_quoting_desired && +! rl_completion_found_quote && rl_filename_dequoting_function) +! { +! char *t; +! t = (*rl_filename_dequoting_function) (text, rl_completion_quote_character); +! xfree (text); +! text = t; +! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; +! } +! else +! nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; + if (what_to_do == '!' || what_to_do == '@') + tlen = strlen (text); + +*** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 9 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 10 diff --git a/meta/recipes-core/readline/readline_8.2.bb b/meta/recipes-core/readline/readline_8.2.bb index 3a47297fe1..f0dba31251 100644 --- a/meta/recipes-core/readline/readline_8.2.bb +++ b/meta/recipes-core/readline/readline_8.2.bb @@ -2,4 +2,16 @@ require readline.inc SRC_URI += " file://norpath.patch" +SRC_URI += "file://readline82-001.patch;striplevel=0 \ + file://readline82-002.patch;striplevel=0 \ + file://readline82-003.patch;striplevel=0 \ + file://readline82-004.patch;striplevel=0 \ + file://readline82-005.patch;striplevel=0 \ + file://readline82-006.patch;striplevel=0 \ + file://readline82-007.patch;striplevel=0 \ + file://readline82-008.patch;striplevel=0 \ + file://readline82-009.patch;striplevel=0 \ + file://readline82-010.patch;striplevel=0 \ + " + SRC_URI[archive.sha256sum] = "3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35" diff --git a/meta/recipes-core/seatd/seatd_0.8.0.bb b/meta/recipes-core/seatd/seatd_0.8.0.bb index 14c5b1b7ae..df5fe35f98 100644 --- a/meta/recipes-core/seatd/seatd_0.8.0.bb +++ b/meta/recipes-core/seatd/seatd_0.8.0.bb @@ -26,7 +26,7 @@ PACKAGECONFIG[systemd] = ",,systemd" do_install:append() { if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then - install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/seatd + install -Dm755 ${UNPACKDIR}/init ${D}/${sysconfdir}/init.d/seatd fi } diff --git a/meta/recipes-core/systemd/systemd-boot-native_255.4.bb b/meta/recipes-core/systemd/systemd-boot-native_255.6.bb index 73db59b14e..73db59b14e 100644 --- a/meta/recipes-core/systemd/systemd-boot-native_255.4.bb +++ b/meta/recipes-core/systemd/systemd-boot-native_255.6.bb diff --git a/meta/recipes-core/systemd/systemd-boot_255.4.bb b/meta/recipes-core/systemd/systemd-boot_255.6.bb index 4ee25ee72f..4ee25ee72f 100644 --- a/meta/recipes-core/systemd/systemd-boot_255.4.bb +++ b/meta/recipes-core/systemd/systemd-boot_255.6.bb diff --git a/meta/recipes-core/systemd/systemd-bootconf_1.00.bb b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb index 19637546a9..0ec49365d0 100644 --- a/meta/recipes-core/systemd/systemd-bootconf_1.00.bb +++ b/meta/recipes-core/systemd/systemd-bootconf_1.00.bb @@ -7,7 +7,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit systemd-boot-cfg -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" LABELS = "boot" diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb index c03d97f9c9..b929545823 100644 --- a/meta/recipes-core/systemd/systemd-compat-units.bb +++ b/meta/recipes-core/systemd/systemd-compat-units.bb @@ -5,7 +5,8 @@ LICENSE = "MIT" PACKAGE_WRITE_DEPS += "systemd-systemctl-native" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" inherit features_check diff --git a/meta/recipes-core/systemd/systemd-conf_1.0.bb b/meta/recipes-core/systemd/systemd-conf_1.0.bb index 2355936631..b8bea0c25b 100644 --- a/meta/recipes-core/systemd/systemd-conf_1.0.bb +++ b/meta/recipes-core/systemd/systemd-conf_1.0.bb @@ -21,19 +21,22 @@ SRC_URI = "\ file://wired.network \ " +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_install() { - install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf - install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf - install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf + install -D -m0644 ${S}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf + install -D -m0644 ${S}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf + install -D -m0644 ${S}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf if ${@bb.utils.contains('PACKAGECONFIG', 'dhcp-ethernet', 'true', 'false', d)}; then - install -D -m0644 ${WORKDIR}/wired.network ${D}${systemd_unitdir}/network/80-wired.network + install -D -m0644 ${S}/wired.network ${D}${systemd_unitdir}/network/80-wired.network fi } # Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 do_install:append:qemuall() { - install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf + install -D -m0644 ${S}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf } PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb index 44a93ac684..9035b8c335 100644 --- a/meta/recipes-core/systemd/systemd-serialgetty.bb +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb @@ -9,7 +9,8 @@ SERIAL_TERM ?= "linux" SRC_URI = "file://serial-getty@.service" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" # As this package is tied to systemd, only build it when we're also building systemd. inherit features_check @@ -21,7 +22,7 @@ do_install() { default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'` install -d ${D}${systemd_system_unitdir}/ install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ - install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_system_unitdir}/ + install -m 0644 ${S}/serial-getty@.service ${D}${systemd_system_unitdir}/ sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_system_unitdir}/serial-getty@.service sed -i -e "s/\@TERM\@/${SERIAL_TERM}/g" ${D}${systemd_system_unitdir}/serial-getty@.service @@ -35,7 +36,7 @@ do_install() { ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@$ttydev.service else # install custom service file for the non-default baudrate - install -m 0644 ${WORKDIR}/serial-getty@.service ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service + install -m 0644 ${S}/serial-getty@.service ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service sed -i -e "s/\@BAUDRATE\@/$baudrate/g" ${D}${systemd_system_unitdir}/serial-getty$baudrate@.service # enable the service ln -sf ${systemd_system_unitdir}/serial-getty$baudrate@.service \ diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb index 54283bcba1..ffa024caef 100644 --- a/meta/recipes-core/systemd/systemd-systemctl-native.bb +++ b/meta/recipes-core/systemd/systemd-systemctl-native.bb @@ -8,9 +8,10 @@ inherit native SRC_URI = "file://systemctl" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/systemctl ${D}${bindir} + install -m 0755 ${S}/systemctl ${D}${bindir} } diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index a35db5091e..8bda47dd38 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc @@ -15,7 +15,7 @@ LICENSE:libsystemd = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" -SRCREV = "387a14a7b67b8b76adaed4175e14bb7e39b2f738" +SRCREV = "5810c25792d4268282dd3892af1a253b690423c9" SRCBRANCH = "v255-stable" SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}" diff --git a/meta/recipes-core/systemd/systemd/0001-NamePolicy.patch b/meta/recipes-core/systemd/systemd/0001-NamePolicy.patch deleted file mode 100644 index 46955cbcbb..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-NamePolicy.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 9bb09886320eb286108fb370b2634a66b3e3b9ff Mon Sep 17 00:00:00 2001 -From: Joe Slater <joe.slater@windriver.com> -Date: Thu, 21 Mar 2024 16:28:31 +0000 -Subject: [PATCH] systemd: enable mac based names in NamePolicy - -The default NamePolicy for network interface names does not -include names based on mac addresses. Some BSPs, though, do -not provide information to compute other names, so we enable -mac names as a last resort. - -Upstream-Status: Inappropriate [enable feature] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> ---- - network/99-default.link | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/network/99-default.link b/network/99-default.link -index 429ac31e80..543ce54661 100644 ---- a/network/99-default.link -+++ b/network/99-default.link -@@ -15,6 +15,6 @@ - OriginalName=* - - [Link] --NamePolicy=keep kernel database onboard slot path --AlternativeNamesPolicy=database onboard slot path -+NamePolicy=keep kernel database onboard slot path mac -+AlternativeNamesPolicy=database onboard slot path mac - MACAddressPolicy=persistent --- -2.35.5 - diff --git a/meta/recipes-core/systemd/systemd/0001-missing_type.h-add-comparison_fn_t.patch b/meta/recipes-core/systemd/systemd/0001-missing_type.h-add-comparison_fn_t.patch index 2aa5dee6b5..49871d16a8 100644 --- a/meta/recipes-core/systemd/systemd/0001-missing_type.h-add-comparison_fn_t.patch +++ b/meta/recipes-core/systemd/systemd/0001-missing_type.h-add-comparison_fn_t.patch @@ -1,7 +1,7 @@ -From 01195eb9f7d59139fb45df506ac6b3968c14a57f Mon Sep 17 00:00:00 2001 +From d4b0bb9c7651017985fdd75469f37c34ce2f2c50 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 13:55:12 +0800 -Subject: [PATCH 01/22] missing_type.h: add comparison_fn_t +Subject: [PATCH] missing_type.h: add comparison_fn_t Make it work with musl where comparison_fn_t and is not provided. @@ -56,6 +56,3 @@ index ae91534198..7f67eea38b 100644 const char * const catalog_file_dirs[] = { "/usr/local/lib/systemd/catalog/", --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0002-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0002-add-fallback-parse_printf_format-implementation.patch index 900a931632..593d6261e1 100644 --- a/meta/recipes-core/systemd/systemd/0002-add-fallback-parse_printf_format-implementation.patch +++ b/meta/recipes-core/systemd/systemd/0002-add-fallback-parse_printf_format-implementation.patch @@ -1,7 +1,7 @@ -From 872b72739e62123867ce6c4f82aa37de24cc3f75 Mon Sep 17 00:00:00 2001 +From 776913624aaf696a3b2920b8d7506b3aae042bf1 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Sat, 22 May 2021 20:26:24 +0200 -Subject: [PATCH 02/22] add fallback parse_printf_format implementation +Subject: [PATCH] add fallback parse_printf_format implementation Upstream-Status: Inappropriate [musl specific] @@ -22,10 +22,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> create mode 100644 src/basic/parse-printf-format.h diff --git a/meson.build b/meson.build -index 7419e2b0b0..01fd3ffc19 100644 +index 187e7b216d..c4694a9ddc 100644 --- a/meson.build +++ b/meson.build -@@ -725,6 +725,7 @@ endif +@@ -727,6 +727,7 @@ endif foreach header : ['crypt.h', 'linux/memfd.h', 'linux/vm_sockets.h', @@ -34,7 +34,7 @@ index 7419e2b0b0..01fd3ffc19 100644 'threads.h', 'valgrind/memcheck.h', diff --git a/src/basic/meson.build b/src/basic/meson.build -index d7450d8b44..c3e3daf4bd 100644 +index 111253e3a5..bdaa2fc5e4 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -183,6 +183,11 @@ endforeach @@ -429,6 +429,3 @@ index be23b2fe75..69a2eb6404 100644 #define SNDBUF_SIZE (8*1024*1024) --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch index be231cf6b2..4c73c924ef 100644 --- a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch +++ b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -1,8 +1,8 @@ -From 29a58009a172e369ad7166e16dab2f4945c6b0d2 Mon Sep 17 00:00:00 2001 +From 661a34c3de30d4ff4a2a62c9a0573c6ce55424e4 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Thu, 21 Feb 2019 16:23:24 +0800 -Subject: [PATCH 1/2] binfmt: Don't install dependency links at install time - for the binfmt services +Subject: [PATCH] binfmt: Don't install dependency links at install time for + the binfmt services use [Install] blocks so that they get created when the service is enabled like a traditional service. @@ -74,6 +74,3 @@ index 6861c76674..531e9fbd90 100644 + +[Install] +WantedBy=sysinit.target --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch index 5595b5bc23..f09f2114d3 100644 --- a/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch @@ -1,7 +1,7 @@ -From 87f1d38f40c5fe9cadf2b2de442473e4e5605788 Mon Sep 17 00:00:00 2001 +From 843c6c94bf6a29eaceeefafa420cd86a32e844d2 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 14:18:21 +0800 -Subject: [PATCH 03/22] src/basic/missing.h: check for missing strndupa +Subject: [PATCH] src/basic/missing.h: check for missing strndupa include missing.h for definition of strndupa @@ -75,10 +75,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 51 files changed, 62 insertions(+) diff --git a/meson.build b/meson.build -index 01fd3ffc19..61a872b753 100644 +index c4694a9ddc..d376b76afa 100644 --- a/meson.build +++ b/meson.build -@@ -567,6 +567,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] +@@ -569,6 +569,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] endforeach foreach ident : [ @@ -87,7 +87,7 @@ index 01fd3ffc19..61a872b753 100644 ['gettid', '''#include <sys/types.h> #include <unistd.h>'''], diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c -index 5ac9f904a9..99d5122dd7 100644 +index b2032adaa5..ee9201826d 100644 --- a/src/backlight/backlight.c +++ b/src/backlight/backlight.c @@ -20,6 +20,7 @@ @@ -111,7 +111,7 @@ index 18b16ecc0e..d2be79622f 100644 static int cg_enumerate_items(const char *controller, const char *path, FILE **ret, const char *item) { _cleanup_free_ char *fs = NULL; diff --git a/src/basic/env-util.c b/src/basic/env-util.c -index d3bf73385f..16b17358ca 100644 +index a97651d7af..09fa601250 100644 --- a/src/basic/env-util.c +++ b/src/basic/env-util.c @@ -19,6 +19,7 @@ @@ -123,7 +123,7 @@ index d3bf73385f..16b17358ca 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 1470611a75..9924ec2b9a 100644 +index 7a443005f6..eed69a48ee 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -40,6 +40,7 @@ @@ -251,7 +251,7 @@ index f9014dc560..1d7840a5b5 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 0c0b4f23c7..68fe5ca509 100644 +index 12dfdf76fa..e66332519a 100644 --- a/src/boot/bless-boot.c +++ b/src/boot/bless-boot.c @@ -22,6 +22,7 @@ @@ -263,7 +263,7 @@ index 0c0b4f23c7..68fe5ca509 100644 static char **arg_path = NULL; diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c -index 4237e694c0..05f9d9d9a9 100644 +index 8a9570fd21..ac4202e5ce 100644 --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c @@ -25,6 +25,7 @@ @@ -275,7 +275,7 @@ index 4237e694c0..05f9d9d9a9 100644 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", CGroupTasksMax, cgroup_tasks_max_resolve); diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c -index 4daa1cefd3..2c77901471 100644 +index 2d05ba7e1d..61a7de0037 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -42,6 +42,7 @@ @@ -287,10 +287,10 @@ index 4daa1cefd3..2c77901471 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 d680a64268..e59f48103e 100644 +index 7bb026af48..a86128e40c 100644 --- a/src/core/dbus-util.c +++ b/src/core/dbus-util.c -@@ -9,6 +9,7 @@ +@@ -10,6 +10,7 @@ #include "unit-printf.h" #include "user-util.h" #include "unit.h" @@ -299,7 +299,7 @@ index d680a64268..e59f48103e 100644 int bus_property_get_triggered_unit( sd_bus *bus, diff --git a/src/core/execute.c b/src/core/execute.c -index ef0bf88687..bd3da0c401 100644 +index 8dbdfcf369..531bec4c92 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -72,6 +72,7 @@ @@ -323,7 +323,7 @@ index b8e3f7aadd..8ce8ca68d8 100644 #if HAVE_KMOD #include "module-util.h" diff --git a/src/core/service.c b/src/core/service.c -index b9eb40c555..268fe7573b 100644 +index 42fffbbd67..80a8d05a19 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -45,6 +45,7 @@ @@ -359,7 +359,7 @@ index 016f3baa7f..b1def81313 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 da0f20d3ce..f22ce41908 100644 +index 2d380bc7a7..d3f5612728 100644 --- a/src/journal-remote/journal-remote-main.c +++ b/src/journal-remote/journal-remote-main.c @@ -27,6 +27,7 @@ @@ -371,7 +371,7 @@ index da0f20d3ce..f22ce41908 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 7f3dcd56a4..41b7cbaaf1 100644 +index 87e2f28841..58275f41f1 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -77,6 +77,7 @@ @@ -383,7 +383,7 @@ index 7f3dcd56a4..41b7cbaaf1 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 ff0228081f..9066fcb133 100644 +index ab8b06896d..43f9131205 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -19,6 +19,7 @@ @@ -407,7 +407,7 @@ index c25c40ff37..57a5da704f 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 3c59d0d615..746922d46f 100644 +index 5ade8e99aa..7553cf319d 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -29,6 +29,7 @@ @@ -419,7 +419,7 @@ index 3c59d0d615..746922d46f 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 4a0259f8bb..aaa90d2223 100644 +index 8befc97460..6ee4d4f595 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -46,6 +46,7 @@ @@ -443,7 +443,7 @@ index d988588de0..458df8df9a 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 6b9ff0a4ed..4a5027ad0f 100644 +index 7a1dd2569f..d187baad47 100644 --- a/src/libsystemd/sd-journal/sd-journal.c +++ b/src/libsystemd/sd-journal/sd-journal.c @@ -44,6 +44,7 @@ @@ -455,7 +455,7 @@ index 6b9ff0a4ed..4a5027ad0f 100644 #define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC) diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c -index b8da266e27..4bb8dd9496 100644 +index bf45974ca5..2cb7e930c0 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -35,6 +35,7 @@ @@ -503,10 +503,10 @@ 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 d4b448a627..bb26623565 100644 +index 3b2a37912f..835a3fdeaa 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c -@@ -40,6 +40,7 @@ +@@ -42,6 +42,7 @@ #include "strv.h" #include "tmpfile-util.h" #include "user-util.h" @@ -551,7 +551,7 @@ index 8b462b5627..183ce1c18e 100644 struct CGroupInfo { char *cgroup_path; diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c -index 4ee9706847..30c8084847 100644 +index 50de98941f..d47beccb0b 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -50,6 +50,7 @@ @@ -599,7 +599,7 @@ index 83e9834bbf..74eaae6f5e 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 a5d04003bd..10392c132d 100644 +index 0a31be382f..92d629e7e0 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -41,6 +41,7 @@ @@ -683,7 +683,7 @@ index ed22c8b679..19ebe20237 100644 UdevEvent *udev_event_new(sd_device *dev, usec_t exec_delay_usec, sd_netlink *rtnl, int log_level) { UdevEvent *event; diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c -index 5f12002394..febe345b4c 100644 +index c242549654..e5b8df5c2d 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -41,6 +41,7 @@ @@ -694,6 +694,3 @@ index 5f12002394..febe345b4c 100644 #define RULES_DIRS ((const char* const*) CONF_PATHS_STRV("udev/rules.d")) --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch index 15877bea88..15d25e9f19 100644 --- a/meta/recipes-core/systemd/systemd/0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +++ b/meta/recipes-core/systemd/systemd/0004-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch @@ -1,8 +1,7 @@ -From 5325ab5813617f35f03806ec420829dde7104387 Mon Sep 17 00:00:00 2001 +From 2903e42c7cd727a2374d21b78950308de792ebe8 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 14:56:21 +0800 -Subject: [PATCH 04/22] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not - defined +Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined If the standard library doesn't provide brace expansion users just won't get it. @@ -115,7 +114,7 @@ index 9b3e73cce0..3790ba3be5 100644 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c -index 230ec09b97..2cc5f391d7 100644 +index 6a1c7725a1..138b3ac561 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -73,6 +73,12 @@ @@ -131,7 +130,7 @@ index 230ec09b97..2cc5f391d7 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 -@@ -2434,7 +2440,9 @@ finish: +@@ -2426,7 +2432,9 @@ finish: static int glob_item(Context *c, Item *i, action_t action) { _cleanup_globfree_ glob_t g = { @@ -141,7 +140,7 @@ index 230ec09b97..2cc5f391d7 100644 }; int r = 0, k; -@@ -2461,7 +2469,9 @@ static int glob_item_recursively( +@@ -2453,7 +2461,9 @@ static int glob_item_recursively( fdaction_t action) { _cleanup_globfree_ glob_t g = { @@ -151,6 +150,3 @@ index 230ec09b97..2cc5f391d7 100644 }; int r = 0, k; --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch index a1dfca22cd..deb0e83b6d 100644 --- a/meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch @@ -1,7 +1,7 @@ -From dad7f897c0de654fa5592fda3e90f874639849f9 Mon Sep 17 00:00:00 2001 +From dcd9639657e4122b7665b01a067219f990ee3ace Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:00:06 +0800 -Subject: [PATCH 05/22] add missing FTW_ macros for musl +Subject: [PATCH] add missing FTW_ macros for musl This is to avoid build failures like below for musl. @@ -39,6 +39,3 @@ index 8684d064ec..70fc2b5376 100644 static char **list_nftw = NULL; --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0006-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0006-Use-uintmax_t-for-handling-rlim_t.patch index 4be14b72ec..f02675604d 100644 --- a/meta/recipes-core/systemd/systemd/0006-Use-uintmax_t-for-handling-rlim_t.patch +++ b/meta/recipes-core/systemd/systemd/0006-Use-uintmax_t-for-handling-rlim_t.patch @@ -1,7 +1,7 @@ -From 96e975a2412a20e5f80bd3ab144057d275eb8597 Mon Sep 17 00:00:00 2001 +From c58933386caa8e45b5e814ec4ff210b18ab401da Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:12:41 +0800 -Subject: [PATCH 06/22] Use uintmax_t for handling rlim_t +Subject: [PATCH] Use uintmax_t for handling rlim_t PRIu{32,64} is not right format to represent rlim_t type therefore use %ju and typecast the rlim_t variables to @@ -86,10 +86,10 @@ index c1f0b2b974..61c5412582 100644 return 1; } diff --git a/src/core/execute.c b/src/core/execute.c -index bd3da0c401..df1870fd2f 100644 +index 531bec4c92..602a95f674 100644 --- a/src/core/execute.c +++ b/src/core/execute.c -@@ -1045,9 +1045,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { +@@ -1041,9 +1041,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { for (unsigned i = 0; i < RLIM_NLIMITS; i++) if (c->rlimit[i]) { fprintf(f, "%sLimit%s: " RLIM_FMT "\n", @@ -101,6 +101,3 @@ index bd3da0c401..df1870fd2f 100644 } if (c->ioprio_set) { --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch index 8d6084239e..1d4ce33712 100644 --- a/meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ b/meta/recipes-core/systemd/systemd/0007-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch @@ -1,7 +1,7 @@ -From 4842cff4f1329f0b5034b529d56f8ad1f234ac4c Mon Sep 17 00:00:00 2001 +From 5bf8235bc5c802908aa5d95740350927d87e953a Mon Sep 17 00:00:00 2001 From: Andre McCurdy <armccurdy@gmail.com> Date: Tue, 10 Oct 2017 14:33:30 -0700 -Subject: [PATCH 07/22] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() +Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to do and it's not portable (not supported by musl). See: @@ -31,7 +31,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h -index 1023ab73ca..c78ff6f27f 100644 +index 6a1e2e76d1..c3f7235e09 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -49,8 +49,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); @@ -64,7 +64,7 @@ index 1023ab73ca..c78ff6f27f 100644 int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c -index 569ef466c3..7ae921a113 100644 +index a4e2dae245..67aa8ea1f2 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -145,7 +145,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { @@ -94,6 +94,3 @@ index 569ef466c3..7ae921a113 100644 continue; } --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch index c1a8bb19fe..1ab23553f9 100644 --- a/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/meta/recipes-core/systemd/systemd/0008-Define-glibc-compatible-basename-for-non-glibc-syste.patch @@ -1,8 +1,7 @@ -From bab07e779ff23d5593bb118efaaa31b60a6dce87 Mon Sep 17 00:00:00 2001 +From d98f6bd4d8acdc4c1a5bff4c699f5004a6ebccce Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sun, 27 May 2018 08:36:44 -0700 -Subject: [PATCH 08/22] Define glibc compatible basename() for non-glibc - systems +Subject: [PATCH] Define glibc compatible basename() for non-glibc systems Fixes builds with musl, even though systemd is adamant about using non-posix basename implementation, we have a way out @@ -29,6 +28,3 @@ index b6d8be3083..0a29036c4c 100644 static inline char* strstr_ptr(const char *haystack, const char *needle) { if (!haystack || !needle) return NULL; --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0008-implment-systemd-sysv-install-for-OE.patch b/meta/recipes-core/systemd/systemd/0008-implment-systemd-sysv-install-for-OE.patch index acff18dc43..8b833ce073 100644 --- a/meta/recipes-core/systemd/systemd/0008-implment-systemd-sysv-install-for-OE.patch +++ b/meta/recipes-core/systemd/systemd/0008-implment-systemd-sysv-install-for-OE.patch @@ -1,4 +1,4 @@ -From 5712d56f1cd654d2e5d2e9117ff77fe4c299f76b Mon Sep 17 00:00:00 2001 +From 5f89867f2b15f9bd411564d04e660cdeedd370ca Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 5 Sep 2015 06:31:47 +0000 Subject: [PATCH] implment systemd-sysv-install for OE @@ -38,6 +38,3 @@ index cb58d8243b..000bdf6165 100755 ;; *) usage ;; --- -2.39.2 - diff --git a/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index 3ff0177ae3..98ab397eff 100644 --- a/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/meta/recipes-core/systemd/systemd/0009-Do-not-disable-buffering-when-writing-to-oom_score_a.patch @@ -1,7 +1,7 @@ -From 25093c5017725b8577c444dfea0f42ad85b43522 Mon Sep 17 00:00:00 2001 +From f3943f58f3c8a9d20dcada56eb5ca5f673a49b3d Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Wed, 4 Jul 2018 15:00:44 +0800 -Subject: [PATCH 09/22] Do not disable buffering when writing to oom_score_adj +Subject: [PATCH] Do not disable buffering when writing to oom_score_adj On musl, disabling buffering when writing to oom_score_adj will cause the following error. @@ -24,7 +24,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index 201c5596ae..ea51595b6c 100644 +index 4492e7ded2..b61a2aba74 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1716,7 +1716,7 @@ int set_oom_score_adjust(int value) { @@ -36,6 +36,3 @@ index 201c5596ae..ea51595b6c 100644 } int get_oom_score_adjust(int *ret) { --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch index cf59ac7d06..e1ffe4ddb5 100644 --- a/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ b/meta/recipes-core/systemd/systemd/0010-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch @@ -1,7 +1,7 @@ -From 2adbe9773cd65c48eec9df96868d4a738927c8d9 Mon Sep 17 00:00:00 2001 +From 5305c5f18236a9d7f2e633ea6ad317e09e8f29d5 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Tue, 10 Jul 2018 15:40:17 +0800 -Subject: [PATCH 10/22] distinguish XSI-compliant strerror_r from GNU-specifi +Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi strerror_r XSI-compliant strerror_r and GNU-specifi strerror_r are different. @@ -24,10 +24,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c -index 77b2e1a0fd..fdba0e0142 100644 +index f415797700..a5c6e9a3bd 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c -@@ -408,7 +408,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { +@@ -410,7 +410,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { return; errno = 0; @@ -40,7 +40,7 @@ index 77b2e1a0fd..fdba0e0142 100644 if (errno == ERANGE || strlen(x) >= k - 1) { free(m); k *= 2; -@@ -593,8 +598,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static +@@ -595,8 +600,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static if (e && e->message) return e->message; @@ -71,6 +71,3 @@ index 69a2eb6404..1561859650 100644 if (errno == 0) { char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch index e481b2e2e4..3075f9d003 100644 --- a/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch +++ b/meta/recipes-core/systemd/systemd/0011-avoid-redefinition-of-prctl_mm_map-structure.patch @@ -1,7 +1,7 @@ -From 49c446cfb78cf74a909bed8c3798b77a5469866a Mon Sep 17 00:00:00 2001 +From c866c8652f06af4cd0b9bd7eedc606449f432b95 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Mon, 25 Feb 2019 15:44:54 +0800 -Subject: [PATCH 11/22] avoid redefinition of prctl_mm_map structure +Subject: [PATCH] avoid redefinition of prctl_mm_map structure Fix the following compile failure: error: redefinition of 'struct prctl_mm_map' @@ -27,6 +27,3 @@ index 7d9e395c92..88c2d7dfac 100644 /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ #ifndef PR_CAP_AMBIENT --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch index 66be79077e..0fec84724d 100644 --- a/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch +++ b/meta/recipes-core/systemd/systemd/0012-do-not-disable-buffer-in-writing-files.patch @@ -1,7 +1,7 @@ -From e4885a8e60f883d9217e26e1db3754c2906aca31 Mon Sep 17 00:00:00 2001 +From 8464b845e6df1be303e09274c13e653072701671 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Fri, 1 Mar 2019 15:22:15 +0800 -Subject: [PATCH 12/22] do not disable buffer in writing files +Subject: [PATCH] do not disable buffer in writing files Do not disable buffer in writing files, otherwise we get failure at boot for musl like below. @@ -201,7 +201,7 @@ index 61ac4df1a6..ea18970196 100644 return r; diff --git a/src/core/main.c b/src/core/main.c -index 3f71cc0947..0e5aec3e9e 100644 +index 1c0030a75f..7108a87d46 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1678,7 +1678,7 @@ static void initialize_core_pattern(bool skip_setup) { @@ -253,7 +253,7 @@ index 066483e342..5f92dd7064 100644 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 2fbc619a34..09d9591e37 100644 +index 01e66b4658..f3ea82ca1b 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c @@ -2516,7 +2516,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, @@ -279,10 +279,10 @@ index a5002437c6..b12e6cd9c9 100644 log_error_errno(r, "Failed to move process: %m"); goto finish; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index 6ab604d3dc..bbec6b686c 100644 +index 0600f3e014..ea369c32b2 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -2688,7 +2688,7 @@ static int reset_audit_loginuid(void) { +@@ -2690,7 +2690,7 @@ static int reset_audit_loginuid(void) { if (streq(p, "4294967295")) return 0; @@ -291,7 +291,7 @@ index 6ab604d3dc..bbec6b686c 100644 if (r < 0) { log_error_errno(r, "Failed to reset audit login UID. This probably means that your kernel is too\n" -@@ -4141,7 +4141,7 @@ static int setup_uid_map( +@@ -4143,7 +4143,7 @@ static int setup_uid_map( return log_oom(); xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); @@ -300,7 +300,7 @@ index 6ab604d3dc..bbec6b686c 100644 if (r < 0) return log_error_errno(r, "Failed to write UID map: %m"); -@@ -4151,7 +4151,7 @@ static int setup_uid_map( +@@ -4153,7 +4153,7 @@ static int setup_uid_map( return log_oom(); xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); @@ -367,10 +367,10 @@ index 805503f366..01a7ccb291 100644 log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); } diff --git a/src/shared/hibernate-util.c b/src/shared/hibernate-util.c -index 3eb13d48f6..d09b901be1 100644 +index c3991cfa4c..7d522d8d1f 100644 --- a/src/shared/hibernate-util.c +++ b/src/shared/hibernate-util.c -@@ -481,7 +481,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { +@@ -501,7 +501,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { /* We write the offset first since it's safer. Note that this file is only available in 4.17+, so * fail gracefully if it doesn't exist and we're only overwriting it with 0. */ @@ -379,7 +379,7 @@ index 3eb13d48f6..d09b901be1 100644 if (r == -ENOENT) { if (offset != 0) return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), -@@ -497,7 +497,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { +@@ -517,7 +517,7 @@ int write_resume_config(dev_t devno, uint64_t offset, const char *device) { log_debug("Wrote resume_offset=%s for device '%s' to /sys/power/resume_offset.", offset_str, device); @@ -402,7 +402,7 @@ index 1f88e724d0..feb18b320a 100644 return r; diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c -index 4c1a968718..6faf6806a5 100644 +index 99ccefb227..e4975018ab 100644 --- a/src/shared/watchdog.c +++ b/src/shared/watchdog.c @@ -93,7 +93,7 @@ static int set_pretimeout_governor(const char *governor) { @@ -412,10 +412,10 @@ index 4c1a968718..6faf6806a5 100644 - WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); + WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); if (r < 0) - return log_error_errno(r, "Failed to set pretimeout_governor to '%s': %m", governor); + return log_error_errno(r, "Failed to set watchdog pretimeout_governor to '%s': %m", governor); diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 21af3e9e52..6d4b84b5d5 100644 +index 21062b24e0..262dd71d72 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -137,7 +137,7 @@ static int write_state(int fd, char * const *states) { @@ -437,7 +437,7 @@ index 21af3e9e52..6d4b84b5d5 100644 log_debug("Using sleep disk mode '%s'.", *mode); return 0; diff --git a/src/storagetm/storagetm.c b/src/storagetm/storagetm.c -index ae63baaf79..82eeca479a 100644 +index 16d4fb07d4..aca7506463 100644 --- a/src/storagetm/storagetm.c +++ b/src/storagetm/storagetm.c @@ -186,7 +186,7 @@ static int nvme_subsystem_unlink(NvmeSubsystem *s) { @@ -533,7 +533,7 @@ index ae63baaf79..82eeca479a 100644 return log_error_errno(r, "Failed to set IP address on NVME port %" PRIu16 ": %m", portnr); diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c -index febe345b4c..a90b610ba1 100644 +index e5b8df5c2d..63ca15628c 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -2711,7 +2711,6 @@ static int udev_rule_apply_token_to_event( @@ -557,6 +557,3 @@ index 4d82c65f0a..3a3d861b83 100644 if (r < 0) return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch b/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch index 43f75373a6..6d7e002d61 100644 --- a/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch +++ b/meta/recipes-core/systemd/systemd/0013-Handle-__cpu_mask-usage.patch @@ -1,7 +1,7 @@ -From 2f90f8463423cfbb7e83fcef42f1071018c3b56e Mon Sep 17 00:00:00 2001 +From f6b69f28657c09b1181552d85e52ced0e01182e3 Mon Sep 17 00:00:00 2001 From: Scott Murray <scott.murray@konsulko.com> Date: Fri, 13 Sep 2019 19:26:27 -0400 -Subject: [PATCH 13/22] Handle __cpu_mask usage +Subject: [PATCH] Handle __cpu_mask usage Fixes errors: @@ -55,6 +55,3 @@ index ea0c58770e..b65c0bd370 100644 /* Print information about various types. Useful when diagnosing * gcc diagnostics on an unfamiliar architecture. */ --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch index a751e1ba6f..40b60399aa 100644 --- a/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch +++ b/meta/recipes-core/systemd/systemd/0014-Handle-missing-gshadow.patch @@ -1,7 +1,7 @@ -From b7c827bb44edbb6251c9fcdb80aa03982c0e7bf3 Mon Sep 17 00:00:00 2001 +From 5442d8ddb285d33b459aefc76962640afd131280 Mon Sep 17 00:00:00 2001 From: Alex Kiernan <alex.kiernan@gmail.com> Date: Tue, 10 Mar 2020 11:05:20 +0000 -Subject: [PATCH 14/22] Handle missing gshadow +Subject: [PATCH] Handle missing gshadow gshadow usage is now present in the userdb code. Mask all uses of it to allow compilation on musl @@ -168,6 +168,3 @@ index f60d48ace4..e878199a28 100644 if (r < 0) return r; --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch index e112766a9b..51f0b048fa 100644 --- a/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0015-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch @@ -1,7 +1,7 @@ -From 3dc9d9d410bcce54fddfd94f43f7f77f3aa8e281 Mon Sep 17 00:00:00 2001 +From 863dd6f502d53a4a2644e031eee2e8dfa3fd05aa Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 12 Apr 2021 23:44:53 -0700 -Subject: [PATCH 15/22] missing_syscall.h: Define MIPS ABI defines for musl +Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl musl does not define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32, _MIPS_SIM_ABI64 unlike glibc where these are provided by libc headers, therefore define @@ -16,7 +16,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 2 files changed, 7 insertions(+) diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h -index d795efd8f2..d6729d3c1d 100644 +index 86280771c4..20d05db506 100644 --- a/src/basic/missing_syscall.h +++ b/src/basic/missing_syscall.h @@ -20,6 +20,12 @@ @@ -33,7 +33,7 @@ index d795efd8f2..d6729d3c1d 100644 #include "missing_keyctl.h" #include "missing_stat.h" diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c -index 7ae921a113..0ef9d1fd39 100644 +index 67aa8ea1f2..8d9824495e 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -20,6 +20,7 @@ @@ -44,6 +44,3 @@ index 7ae921a113..0ef9d1fd39 100644 typedef struct BaseFilesystem { const char *dir; /* directory or symlink to create */ --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch b/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch index 0be817e62d..66b8f66806 100644 --- a/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch +++ b/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch @@ -1,7 +1,7 @@ -From 0994b59dba9f248ad31cb7087046dc00b72cb4ea Mon Sep 17 00:00:00 2001 +From 01de9e5a6e4ad2f361d3eb4d9839c7afd91cc677 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 21 Jan 2022 15:15:11 -0800 -Subject: [PATCH 16/22] pass correct parameters to getdents64 +Subject: [PATCH] pass correct parameters to getdents64 Fixes ../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] @@ -32,6 +32,3 @@ index 5e98b7a5d8..aef065047b 100644 if (n < 0) return -errno; if (n == 0) --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch b/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch index 4176522a1c..f86b8c889c 100644 --- a/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch +++ b/meta/recipes-core/systemd/systemd/0017-Adjust-for-musl-headers.patch @@ -1,7 +1,7 @@ -From 3c094d443ca30f19114392fd8ef274af6eabc12d Mon Sep 17 00:00:00 2001 +From a45cf93772ac5055665cc55454509747b9c68ad2 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 21 Jan 2022 22:19:37 -0800 -Subject: [PATCH 17/22] Adjust for musl headers +Subject: [PATCH] Adjust for musl headers Upstream-Status: Inappropriate [musl specific] @@ -425,7 +425,7 @@ index 607fe0053c..9ce4005874 100644 #include "sd-dhcp-server.h" diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c -index efbae6d868..1ea2151d50 100644 +index 49c452da7c..98aad1f3cd 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -3,7 +3,7 @@ @@ -451,7 +451,7 @@ index 32229a3fc7..662a345d6e 100644 #include "in-addr-util.h" #include "networkd-address.h" diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index ee5f0f2c0a..ea5269a2de 100644 +index 4ef1be4bad..e5aa53604d 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -3,7 +3,7 @@ @@ -464,7 +464,7 @@ index ee5f0f2c0a..ea5269a2de 100644 #include <linux/netdevice.h> #include <sys/socket.h> diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c -index ab9eeb13a5..dd96fe7483 100644 +index 840ccb158d..9f2e85e32f 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -6,7 +6,7 @@ @@ -477,7 +477,7 @@ index ab9eeb13a5..dd96fe7483 100644 #include "sd-ndisc.h" diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c -index 7218d799fc..30d5574eae 100644 +index eb502ae2cf..5b25ee4523 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -1,9 +1,5 @@ @@ -502,7 +502,7 @@ index 7218d799fc..30d5574eae 100644 _cleanup_(route_freep) Route *route = NULL; diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c -index 2298f9ea3a..7d5f87de53 100644 +index 011ea1fe6e..59dfe733eb 100644 --- a/src/network/networkd-setlink.c +++ b/src/network/networkd-setlink.c @@ -2,7 +2,7 @@ @@ -567,6 +567,3 @@ index f528a46b8e..830318cda5 100644 #include <linux/netdevice.h> #include <linux/pci_regs.h> --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch b/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch index 75f6b9094a..67388e6807 100644 --- a/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch +++ b/meta/recipes-core/systemd/systemd/0018-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch @@ -1,8 +1,8 @@ -From be02bd0876a061728661535a709d313e39fe1ac3 Mon Sep 17 00:00:00 2001 +From 20dfb0b5e7113c2e7f82c01488b419dffe8714ab 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 18/22] test-bus-error: strerror() is assumed to be GNU - specific version mark it so +Subject: [PATCH] test-bus-error: strerror() is assumed to be GNU specific + version mark it so Upstream-Status: Inappropriate [Upstream systemd only supports glibc] @@ -47,6 +47,3 @@ index 376d532281..967cfd4d67 100644 TEST(PROTECT_ERRNO) { errno = 12; --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch b/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch index e038b73678..36d468959a 100644 --- a/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0019-errno-util-Make-STRERROR-portable-for-musl.patch @@ -1,7 +1,7 @@ -From 46d80840bfe37e67d4f18c37a77751ea1fe63a07 Mon Sep 17 00:00:00 2001 +From 32371040c2aa649e23c3b0f2c5ee27995a16526a Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 23 Jan 2023 23:39:46 -0800 -Subject: [PATCH 19/22] errno-util: Make STRERROR portable for musl +Subject: [PATCH] errno-util: Make STRERROR portable for musl Sadly, systemd has decided to use yet another GNU extention in a macro lets make this such that we can use XSI compliant strerror_r() for @@ -37,6 +37,3 @@ index 27804e6382..274c1c6ef1 100644 /* A helper to print an error message or message for functions that return 0 on EOF. * Note that we can't use ({ … }) to define a temporary variable, so errnum is * evaluated twice. */ --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch b/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch index b83fffe793..f860b5f542 100644 --- a/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch +++ b/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch @@ -1,7 +1,7 @@ -From 9eb4867b4e2dbdb2484ae854022aff97e2f0feb3 Mon Sep 17 00:00:00 2001 +From 751fb8c9a05115f5329cfa25e69afe7657124c20 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 2 Aug 2023 12:06:27 -0700 -Subject: [PATCH 20/22] sd-event: Make malloc_trim() conditional on glibc +Subject: [PATCH] sd-event: Make malloc_trim() conditional on glibc musl does not have this API @@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c -index 288798a0dc..6419a7f216 100644 +index b6899df192..0c03287004 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1874,7 +1874,7 @@ _public_ int sd_event_add_exit( @@ -34,6 +34,3 @@ index 288798a0dc..6419a7f216 100644 usec_t after_timestamp = now(CLOCK_MONOTONIC); if (r > 0) --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch b/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch index 7eff069bb7..ece9873bbc 100644 --- a/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch +++ b/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch @@ -1,7 +1,7 @@ -From 502597b9ddd6b145541b23fadca0b1d3ca9f6367 Mon Sep 17 00:00:00 2001 +From 4fe2a8b1aab7297beac50f6ce46f3df4169de218 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 2 Aug 2023 12:20:40 -0700 -Subject: [PATCH 21/22] shared: Do not use malloc_info on musl +Subject: [PATCH] shared: Do not use malloc_info on musl Upstream-Status: Inappropriate [musl-specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> @@ -52,6 +52,3 @@ index 8e70e365dd..9e782caec9 100644 (void) memstream_dump(LOG_INFO, &m); break; } --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch b/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch index 24f3bf74a0..f517392e58 100644 --- a/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch +++ b/meta/recipes-core/systemd/systemd/0022-avoid-missing-LOCK_EX-declaration.patch @@ -1,7 +1,7 @@ -From fd52f1764647e03a35e8f0ed0ef952049073ccbd Mon Sep 17 00:00:00 2001 +From 97d3ed7834bd86615ba4acdbef984c677b7e7791 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> Date: Tue, 2 Jan 2024 11:03:27 +0800 -Subject: [PATCH 22/22] avoid missing LOCK_EX declaration +Subject: [PATCH] avoid missing LOCK_EX declaration This only happens on MUSL. Include sys/file.h to avoid compilation error about missing LOCK_EX declaration. @@ -15,7 +15,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 2 files changed, 2 insertions(+) diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c -index 70d963e269..7084811439 100644 +index fe14ceeb31..521e7b87ff 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -4,6 +4,7 @@ @@ -38,6 +38,3 @@ index 5339bc4e5e..0697495f23 100644 int lock_dev_console(void); --- -2.34.1 - diff --git a/meta/recipes-core/systemd/systemd_255.4.bb b/meta/recipes-core/systemd/systemd_255.6.bb index b02e44d9c0..62842d43c8 100644 --- a/meta/recipes-core/systemd/systemd_255.4.bb +++ b/meta/recipes-core/systemd/systemd_255.6.bb @@ -28,7 +28,6 @@ SRC_URI += " \ file://systemd-pager.sh \ file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ file://0008-implment-systemd-sysv-install-for-OE.patch \ - file://0001-NamePolicy.patch \ " # patches needed by musl @@ -66,7 +65,7 @@ PAM_PLUGINS = " \ " PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam pni-names selinux smack usrmerge polkit seccomp', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ @@ -197,6 +196,7 @@ PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" PACKAGECONFIG[polkit_hostnamed_fallback] = ",,,,dbus-broker,polkit" PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" PACKAGECONFIG[pstore] = "-Dpstore=true,-Dpstore=false" +PACKAGECONFIG[pni-names] = ",,," PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode,,qrencode" PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" @@ -249,6 +249,7 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \ -Dsystem-alloc-gid-min=101 \ -Dsystem-gid-max=999 \ -Dcreate-log-dirs=false \ + ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \ " # Hardcode target binary paths to avoid using paths from sysroot or worse @@ -270,14 +271,16 @@ WATCHDOG_TIMEOUT ??= "60" do_install() { meson_do_install - # Change the root user's home directory in /lib/sysusers.d/basic.conf. - # This is done merely for backward compatibility with previous systemd recipes. - # systemd hardcodes root user's HOME to be "/root". Changing to use other values - # may have unexpected runtime behaviors. - if [ "${ROOT_HOME}" != "/root" ]; then - bbwarn "Using ${ROOT_HOME} as root user's home directory is not fully supported by systemd" - sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf - fi + if ${@bb.utils.contains('PACKAGECONFIG', 'sysusers', 'true', 'false', d)}; then + # Change the root user's home directory in /lib/sysusers.d/basic.conf. + # This is done merely for backward compatibility with previous systemd recipes. + # systemd hardcodes root user's HOME to be "/root". Changing to use other values + # may have unexpected runtime behaviors. + if [ "${ROOT_HOME}" != "/root" ]; then + bbwarn "Using ${ROOT_HOME} as root user's home directory is not fully supported by systemd" + sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf + fi + fi install -d ${D}/${base_sbindir} if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then # Provided by a separate recipe @@ -290,15 +293,15 @@ do_install() { install -d ${D}${sysconfdir}/udev/rules.d/ install -d ${D}${nonarch_libdir}/tmpfiles.d - for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do + for rule in $(find ${UNPACKDIR} -maxdepth 1 -type f -name "*.rules"); do install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ done - install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${nonarch_libdir}/tmpfiles.d/ + install -m 0644 ${UNPACKDIR}/00-create-volatile.conf ${D}${nonarch_libdir}/tmpfiles.d/ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd + install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install fi @@ -369,9 +372,9 @@ do_install() { # request hostname changes via DBUS without elevating its privileges if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then install -d ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ - install -m 0644 ${WORKDIR}/00-hostnamed-network-user.conf ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ + install -m 0644 ${UNPACKDIR}/00-hostnamed-network-user.conf ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ install -d ${D}${datadir}/dbus-1/system.d/ - install -m 0644 ${WORKDIR}/org.freedesktop.hostname1_no_polkit.conf ${D}${datadir}/dbus-1/system.d/ + install -m 0644 ${UNPACKDIR}/org.freedesktop.hostname1_no_polkit.conf ${D}${datadir}/dbus-1/system.d/ fi # create link for existing udev rules @@ -379,15 +382,24 @@ do_install() { # install default policy for presets # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto - install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset + install -Dm 0644 ${UNPACKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset # add a profile fragment to disable systemd pager with busybox less - install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh + install -Dm 0644 ${UNPACKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh if [ -n "${WATCHDOG_TIMEOUT}" ]; then sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=${WATCHDOG_TIMEOUT}/' \ ${D}/${sysconfdir}/systemd/system.conf fi + + if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then + if ! grep -q '^NamePolicy=.*mac' ${D}${rootlibexecdir}/systemd/network/99-default.link; then + sed -i '/^NamePolicy=/s/$/ mac/' ${D}${rootlibexecdir}/systemd/network/99-default.link + fi + if ! grep -q 'AlternativeNamesPolicy=.*mac' ${D}${rootlibexecdir}/systemd/network/99-default.link; then + sed -i '/AlternativeNamesPolicy=/s/$/ mac/' ${D}${rootlibexecdir}/systemd/network/99-default.link + fi + fi } python populate_packages:prepend (){ diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb index 6bbe517df1..6ff2ca1bf4 100644 --- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -6,7 +6,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;m SRC_URI = "file://inittab \ file://start_getty" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" INHIBIT_DEFAULT_DEPS = "1" @@ -16,9 +17,9 @@ do_compile() { do_install() { install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + install -m 0644 ${S}/inittab ${D}${sysconfdir}/inittab install -d ${D}${base_bindir} - install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty + install -m 0755 ${S}/start_getty ${D}${base_bindir}/start_getty sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty CONSOLES="${SERIAL_CONSOLES}" diff --git a/meta/recipes-core/sysvinit/sysvinit_3.04.bb b/meta/recipes-core/sysvinit/sysvinit_3.04.bb index 6a612468f3..fb9d00891c 100644 --- a/meta/recipes-core/sysvinit/sysvinit_3.04.bb +++ b/meta/recipes-core/sysvinit/sysvinit_3.04.bb @@ -97,18 +97,18 @@ do_install () { sed -e \ 's:#PSPLASH_TEXT#:${@bb.utils.contains("PACKAGECONFIG","psplash-text-updates","yes","no", d)}:g' \ - ${WORKDIR}/rcS-default > ${D}${sysconfdir}/default/rcS + ${UNPACKDIR}/rcS-default > ${D}${sysconfdir}/default/rcS chmod 0644 ${D}${sysconfdir}/default/rcS - install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd + install -m 0755 ${UNPACKDIR}/rc ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/rcS ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd update-rc.d -r ${D} bootlogd start 07 S . update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 . install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles + install -m 0644 ${UNPACKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown diff --git a/meta/recipes-core/ttyrun/ttyrun_2.31.0.bb b/meta/recipes-core/ttyrun/ttyrun_2.32.0.bb index 122dd9d8e7..815f625a67 100644 --- a/meta/recipes-core/ttyrun/ttyrun_2.31.0.bb +++ b/meta/recipes-core/ttyrun/ttyrun_2.32.0.bb @@ -7,7 +7,9 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=f5118f167b055bfd7c3450803f1847af" SRC_URI = "git://github.com/ibm-s390-linux/s390-tools;protocol=https;branch=master" -SRCREV = "6f15ed326491a17d83ca60cd2bda47fb5e8a0175" +SRCREV = "9eea78b3ad8ab3710fb3b2d80b9cd058d7c8aba7" + +CVE_PRODUCT = "s390-tools" S = "${WORKDIR}/git" diff --git a/meta/recipes-core/udev/eudev/netifnames.patch b/meta/recipes-core/udev/eudev/netifnames.patch index 8f6e9a1538..4f8e54d12d 100644 --- a/meta/recipes-core/udev/eudev/netifnames.patch +++ b/meta/recipes-core/udev/eudev/netifnames.patch @@ -2,7 +2,7 @@ eudev: consider ID_NET_NAME_MAC as an interface name eudev might not create names based on slot or path. -Upstream-Status: Submitted [github.com/eudev-project/eudev/pull/274] +Upstream-Status: Backport [github.com/eudev-project/eudev/pull/274] Signed-off-by: Joe Slater <joe.slater@windriver.com> diff --git a/meta/recipes-core/udev/eudev_3.2.14.bb b/meta/recipes-core/udev/eudev_3.2.14.bb index 18696679c8..0e5610f77c 100644 --- a/meta/recipes-core/udev/eudev_3.2.14.bb +++ b/meta/recipes-core/udev/eudev_3.2.14.bb @@ -42,12 +42,12 @@ PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" do_install:append() { install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev + install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/udev sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev sed -i s%@KMOD@%${base_bindir}/kmod% ${D}${sysconfdir}/init.d/udev install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules + install -m 0644 ${UNPACKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules # Use classic network interface naming scheme if no 'pni-names' distro feature if ${@bb.utils.contains('DISTRO_FEATURES', 'pni-names', 'false', 'true', d)}; then diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index 30f1fe76d0..0e2abcd424 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -13,28 +13,29 @@ SRC_URI = " \ file://localextra.rules \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" MOUNT_BASE = "/run/media" do_install() { install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/automount.rules ${D}${sysconfdir}/udev/rules.d/automount.rules - install -m 0644 ${WORKDIR}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules - install -m 0644 ${WORKDIR}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules + install -m 0644 ${S}/automount.rules ${D}${sysconfdir}/udev/rules.d/automount.rules + install -m 0644 ${S}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules + install -m 0644 ${S}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules install -d ${D}${sysconfdir}/udev/mount.ignorelist.d - install -m 0644 ${WORKDIR}/mount.ignorelist ${D}${sysconfdir}/udev/ + install -m 0644 ${S}/mount.ignorelist ${D}${sysconfdir}/udev/ install -d ${D}${sysconfdir}/udev/scripts/ - install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh + install -m 0755 ${S}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh - install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts + install -m 0755 ${S}/network.sh ${D}${sysconfdir}/udev/scripts } pkg_postinst:${PN} () { diff --git a/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb b/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb index ba622fe716..27723c88ef 100644 --- a/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb +++ b/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb @@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=d40a07c27f5354 SRC_URI = "git://git.yoctoproject.org/update-rc.d;branch=master;protocol=https" SRCREV = "b8f950105010270a768aa12245d6abf166346015" +PV .= "+git" UPSTREAM_CHECK_COMMITS = "1" diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 4e9d22f269..d506783f9a 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -6,14 +6,15 @@ disk partitioning, kernel message management, filesystem creation, and system lo SECTION = "base" -LICENSE = "GPL-1.0-or-later & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & BSD-4-Clause" +LICENSE = "GPL-1.0-or-later & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause & BSD-3-Clause & BSD-4-Clause & MIT" +LICENSE:${PN}-fcntl-lock = "MIT" LICENSE:${PN}-fdisk = "GPL-1.0-or-later" LICENSE:${PN}-libblkid = "LGPL-2.1-or-later" LICENSE:${PN}-libfdisk = "LGPL-2.1-or-later" LICENSE:${PN}-libmount = "LGPL-2.1-or-later" LICENSE:${PN}-libsmartcols = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://README.licensing;md5=6b0e0a2320e66e62eef9b8149a6faec4 \ +LIC_FILES_CHKSUM = "file://README.licensing;md5=cc80239f106687ab39ef0271ff5cf4ba \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://Documentation/licenses/COPYING.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://Documentation/licenses/COPYING.LGPL-2.1-or-later;md5=4fbd65380cdd255951079008b364516c \ @@ -29,6 +30,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=6b0e0a2320e66e62eef9b8149a6faec4 FILESEXTRAPATHS:prepend := "${THISDIR}/util-linux:" MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \ + file://mit-license.patch \ file://configure-sbindir.patch \ file://runuser.pamd \ file://runuser-l.pamd \ @@ -37,6 +39,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://display_testname_for_subtest.patch \ file://avoid_parallel_tests.patch \ file://0001-login-utils-include-libgen.h-for-basename-API.patch \ + file://fcntl-lock.c \ " SRC_URI[sha256sum] = "7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f" diff --git a/meta/recipes-core/util-linux/util-linux/fcntl-lock.c b/meta/recipes-core/util-linux/util-linux/fcntl-lock.c new file mode 100644 index 0000000000..966d8c5ecb --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/fcntl-lock.c @@ -0,0 +1,332 @@ +// From https://github.com/magnumripper/fcntl-lock +// SPDX-License-Identifier: MIT +/* ----------------------------------------------------------------------- * + * + * Copyright 2003-2005 H. Peter Anvin - All Rights Reserved + * Copyright 2015 magnum (fcntl version) + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall + * be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * ----------------------------------------------------------------------- */ + +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <fcntl.h> +#include <unistd.h> +#include <getopt.h> +#include <signal.h> +#include <ctype.h> +#include <string.h> +#include <paths.h> +#include <sysexits.h> +#include <sys/types.h> +#include <sys/file.h> +#include <sys/time.h> +#include <sys/wait.h> + +#define PACKAGE_STRING "magnum" +#define _(x) (x) + +static const struct option long_options[] = { + { "shared", 0, NULL, 's' }, + { "exclusive", 0, NULL, 'x' }, + { "unlock", 0, NULL, 'u' }, + { "nonblocking", 0, NULL, 'n' }, + { "nb", 0, NULL, 'n' }, + { "timeout", 1, NULL, 'w' }, + { "wait", 1, NULL, 'w' }, + { "close", 0, NULL, 'o' }, + { "help", 0, NULL, 'h' }, + { "version", 0, NULL, 'V' }, + { 0, 0, 0, 0 } +}; + +const char *program; + +static void usage(int ex) +{ + fputs("fcntl-lock (" PACKAGE_STRING ")\n", stderr); + fprintf(stderr, + _("Usage: %1$s [-sxun][-w #] fd#\n" + " %1$s [-sxon][-w #] file [-c] command...\n" + " %1$s [-sxon][-w #] directory [-c] command...\n" + " -s --shared Get a shared lock\n" + " -x --exclusive Get an exclusive lock\n" + " -u --unlock Remove a lock\n" + " -n --nonblock Fail rather than wait\n" + " -w --timeout Wait for a limited amount of time\n" + " -o --close Close file descriptor before running command\n" + " -c --command Run a single command string through the shell\n" + " -h --help Display this text\n" + " -V --version Display version\n"), + program); + exit(ex); +} + + +static sig_atomic_t timeout_expired = 0; + +static void timeout_handler(int sig) +{ + (void)sig; + + timeout_expired = 1; +} + + +static char * strtotimeval(const char *str, struct timeval *tv) +{ + char *s; + long fs; /* Fractional seconds */ + int i; + + tv->tv_sec = strtol(str, &s, 10); + fs = 0; + + if ( *s == '.' ) { + s++; + + for ( i = 0 ; i < 6 ; i++ ) { + if ( !isdigit(*s) ) + break; + + fs *= 10; + fs += *s++ - '0'; + } + + for ( ; i < 6; i++ ) + fs *= 10; + + while ( isdigit(*s) ) + s++; + } + + tv->tv_usec = fs; + return s; +} + +int main(int argc, char *argv[]) +{ + struct itimerval timeout, old_timer; + int have_timeout = 0; + int type = F_WRLCK; + int block = F_SETLKW; + int fd = -1; + int opt, ix; + int do_close = 0; + int err; + int status; + char *eon; + char **cmd_argv = NULL, *sh_c_argv[4]; + struct flock lock; + const char *filename = NULL; + struct sigaction sa, old_sa; + + program = argv[0]; + + if ( argc < 2 ) + usage(EX_USAGE); + + memset(&timeout, 0, sizeof timeout); + + optopt = 0; + while ( (opt = getopt_long(argc, argv, "+sexnouw:hV?", long_options, &ix)) != EOF ) { + switch(opt) { + case 's': + type = F_RDLCK; + break; + case 'e': + case 'x': + type = F_WRLCK; + break; + case 'u': + type = F_UNLCK; + break; + case 'o': + do_close = 1; + break; + case 'n': + block = F_SETLK; + break; + case 'w': + have_timeout = 1; + eon = strtotimeval(optarg, &timeout.it_value); + if ( *eon ) + usage(EX_USAGE); + break; + case 'V': + printf("fcntl-lock (%s)\n", PACKAGE_STRING); + exit(0); + default: + /* optopt will be set if this was an unrecognized option, i.e. *not* 'h' or '?' */ + usage(optopt ? EX_USAGE : 0); + break; + } + } + + if ( argc > optind+1 ) { + /* Run command */ + + if ( !strcmp(argv[optind+1], "-c") || + !strcmp(argv[optind+1], "--command") ) { + + if ( argc != optind+3 ) { + fprintf(stderr, _("%s: %s requires exactly one command argument\n"), + program, argv[optind+1]); + exit(EX_USAGE); + } + + cmd_argv = sh_c_argv; + + cmd_argv[0] = getenv("SHELL"); + if ( !cmd_argv[0] || !*cmd_argv[0] ) + cmd_argv[0] = _PATH_BSHELL; + + cmd_argv[1] = "-c"; + cmd_argv[2] = argv[optind+2]; + cmd_argv[3] = 0; + } else { + cmd_argv = &argv[optind+1]; + } + + filename = argv[optind]; + fd = open(filename, O_RDWR|O_NOCTTY|O_CREAT, 0666); + /* Linux doesn't like O_CREAT on a directory, even though it should be a + no-op */ + if (fd < 0 && errno == EISDIR) + fd = open(filename, O_RDONLY|O_NOCTTY); + + if ( fd < 0 ) { + err = errno; + fprintf(stderr, _("%s: cannot open lock file %s: %s\n"), + program, argv[optind], strerror(err)); + exit((err == ENOMEM||err == EMFILE||err == ENFILE) ? EX_OSERR : + (err == EROFS||err == ENOSPC) ? EX_CANTCREAT : + EX_NOINPUT); + } + + } else if (optind < argc) { + /* Use provided file descriptor */ + + fd = (int)strtol(argv[optind], &eon, 10); + if ( *eon || !argv[optind] ) { + fprintf(stderr, _("%s: bad number: %s\n"), program, argv[optind]); + exit(EX_USAGE); + } + + } else { + /* Bad options */ + + fprintf(stderr, _("%s: requires file descriptor, file or directory\n"), + program); + exit(EX_USAGE); + } + + + if ( have_timeout ) { + if ( timeout.it_value.tv_sec == 0 && + timeout.it_value.tv_usec == 0 ) { + /* -w 0 is equivalent to -n; this has to be special-cased + because setting an itimer to zero means disabled! */ + + have_timeout = 0; + block = F_SETLK; + } else { + memset(&sa, 0, sizeof sa); + + sa.sa_handler = timeout_handler; + sa.sa_flags = SA_RESETHAND; + sigaction(SIGALRM, &sa, &old_sa); + + setitimer(ITIMER_REAL, &timeout, &old_timer); + } + } + + memset(&lock, 0, sizeof(lock)); + lock.l_type = type; + while ( fcntl(fd, block, &lock) ) { + switch( (err = errno) ) { + case EAGAIN: /* -n option set and failed to lock */ + case EACCES: /* -n option set and failed to lock */ + exit(1); + case EINTR: /* Signal received */ + if ( timeout_expired ) + exit(1); /* -w option set and failed to lock */ + continue; /* otherwise try again */ + default: /* Other errors */ + if ( filename ) + fprintf(stderr, "%s: %s: %s\n", program, filename, strerror(err)); + else + fprintf(stderr, "%s: %d: %s\n", program, fd, strerror(err)); + exit((err == ENOLCK||err == ENOMEM) ? EX_OSERR : EX_DATAERR); + } + } + + if ( have_timeout ) { + setitimer(ITIMER_REAL, &old_timer, NULL); /* Cancel itimer */ + sigaction(SIGALRM, &old_sa, NULL); /* Cancel signal handler */ + } + + status = 0; + + if ( cmd_argv ) { + pid_t w, f; + + /* Clear any inherited settings */ + signal(SIGCHLD, SIG_DFL); + f = fork(); + + if ( f < 0 ) { + err = errno; + fprintf(stderr, _("%s: fork failed: %s\n"), program, strerror(err)); + exit(EX_OSERR); + } else if ( f == 0 ) { + if ( do_close ) + close(fd); + err = errno; + execvp(cmd_argv[0], cmd_argv); + /* execvp() failed */ + fprintf(stderr, "%s: %s: %s\n", program, cmd_argv[0], strerror(err)); + _exit((err == ENOMEM) ? EX_OSERR: EX_UNAVAILABLE); + } else { + do { + w = waitpid(f, &status, 0); + if (w == -1 && errno != EINTR) + break; + } while ( w != f ); + + if (w == -1) { + err = errno; + status = EXIT_FAILURE; + fprintf(stderr, "%s: waitpid failed: %s\n", program, strerror(err)); + } else if ( WIFEXITED(status) ) + status = WEXITSTATUS(status); + else if ( WIFSIGNALED(status) ) + status = WTERMSIG(status) + 128; + else + status = EX_OSERR; /* WTF? */ + } + } + + return status; +} diff --git a/meta/recipes-core/util-linux/util-linux/mit-license.patch b/meta/recipes-core/util-linux/util-linux/mit-license.patch new file mode 100644 index 0000000000..afbec98f18 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/mit-license.patch @@ -0,0 +1,45 @@ +From 5b8fab1584017d9d9be008c23b90128bba41a7b5 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Thu, 28 Mar 2024 12:16:57 +0000 +Subject: [PATCH] README.licensing/flock: Add MIT license mention + +Looking at the license text, flock.c is under the MIT license (see +https://spdx.org/licenses/MIT). + +Add an SPDX license identifier header and add to the list of licenses the +source so everything is correctly listed/identified. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/2870] + +--- + README.licensing | 2 ++ + sys-utils/flock.c | 4 +++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/README.licensing b/README.licensing +index 4454f8392a..535ad34813 100644 +--- a/README.licensing ++++ b/README.licensing +@@ -12,6 +12,8 @@ There is code under: + + * LGPL-2.1-or-later - GNU Lesser General Public License 2.1 or any later version + ++ * MIT - MIT License ++ + * BSD-2-Clause - Simplified BSD License + + * BSD-3-Clause - BSD 3-Clause "New" or "Revised" License +diff --git a/sys-utils/flock.c b/sys-utils/flock.c +index fed29d7270..7d878ff810 100644 +--- a/sys-utils/flock.c ++++ b/sys-utils/flock.c +@@ -1,4 +1,6 @@ +-/* Copyright 2003-2005 H. Peter Anvin - All Rights Reserved ++/* SPDX-License-Identifier: MIT ++ * ++ * Copyright 2003-2005 H. Peter Anvin - All Rights Reserved + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation diff --git a/meta/recipes-core/util-linux/util-linux_2.39.3.bb b/meta/recipes-core/util-linux/util-linux_2.39.3.bb index 3e87dcc2c2..2cd7750afc 100644 --- a/meta/recipes-core/util-linux/util-linux_2.39.3.bb +++ b/meta/recipes-core/util-linux/util-linux_2.39.3.bb @@ -147,6 +147,11 @@ SYSTEMD_AUTO_ENABLE:${PN}-uuidd = "disable" SYSTEMD_SERVICE:${PN}-fstrim = "fstrim.timer fstrim.service" SYSTEMD_AUTO_ENABLE:${PN}-fstrim = "disable" +do_compile:append () { + cp ${UNPACKDIR}/fcntl-lock.c ${S}/fcntl-lock.c + ${CC} ${CFLAGS} ${LDFLAGS} ${S}/fcntl-lock.c -o ${B}/fcntl-lock +} + do_install () { # with ccache the timestamps on compiled files may # end up earlier than on their inputs, this allows @@ -182,13 +187,15 @@ do_install () { echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall rm -f ${D}${bindir}/chkdupexe + + install -m 0755 ${B}/fcntl-lock ${D}${bindir} } do_install:append:class-target () { if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then install -d ${D}${sysconfdir}/pam.d - install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser - install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l + install -m 0644 ${UNPACKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser + install -m 0644 ${UNPACKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l # Required for "su -" aka "su --login" because # otherwise it uses "other", which has "auth pam_deny.so" # and thus prevents the operation. @@ -275,8 +282,11 @@ blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ " ALTERNATIVE:${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" +ALTERNATIVE:${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'chfn-chsh', 'chfn.1 chsh.1', '', d)}" ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" +ALTERNATIVE_LINK_NAME[chfn.1] = "${mandir}/man1/chfn.1" +ALTERNATIVE_LINK_NAME[chsh.1] = "${mandir}/man1/chsh.1" ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" @@ -312,7 +322,7 @@ do_install_ptest() { cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ - cp ${WORKDIR}/build/config.h ${D}${PTEST_PATH} + cp ${B}/config.h ${D}${PTEST_PATH} sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest diff --git a/meta/recipes-core/volatile-binds/volatile-binds.bb b/meta/recipes-core/volatile-binds/volatile-binds.bb index cca8a65fb4..3597ec7356 100644 --- a/meta/recipes-core/volatile-binds/volatile-binds.bb +++ b/meta/recipes-core/volatile-binds/volatile-binds.bb @@ -9,7 +9,8 @@ SRC_URI = "\ file://volatile-binds.service.in \ " -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" inherit allarch systemd features_check @@ -64,7 +65,6 @@ END "$var_lib_servicefile" fi } -do_compile[dirs] = "${WORKDIR}" do_install () { install -d ${D}${base_sbindir} @@ -82,4 +82,3 @@ do_install () { ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf } -do_install[dirs] = "${WORKDIR}" diff --git a/meta/recipes-core/zlib/site_config/headers b/meta/recipes-core/zlib/site_config/headers deleted file mode 100644 index 50268918aa..0000000000 --- a/meta/recipes-core/zlib/site_config/headers +++ /dev/null @@ -1 +0,0 @@ -zlib.h |