mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
dracut: update to 108
Drop stale patches, add a patch that enables stripping in an OE enviroment. Upstream changelog: * systemd-udevd: 99-systemd.rules added in two places ([a8c0a15c](a8c0a15cf9)) * watchdog: only install wdctl for the non-systemd case ([ad0fd3a8](ad0fd3a8df)) * add Debian/Ubuntu specific Dracut configuration ([cba1a2c2](cba1a2c2cd)) * allow the use of $kernel in initrdname= config ([696397dd](696397dd8d)) * add support for removing a space separated list of files ([f8dfe3ee](f8dfe3ee5b)) * make variable set check work with "set -u" ([ee8f4f9d](ee8f4f9d3e)) * support dracutsysrootdir being unset ([348888b8](348888b8d9)) * tests are not packaged by default to simplify packaging ([e65a87cf](e65a87cf0a)) * set hostonly_cmdline config to no by default ([efaee447](efaee44736)) * set hostonly config by default in configure ([62fdf59c](62fdf59c94)) * Makefile: explicitly list configs to install ([f7416501](f7416501a7)) * base: add support for rd.driver.pre ([5ca76df3](5ca76df3a2)) * crypt-gpg: handle multiple gpg pubkeys ([28ad7910](28ad79106c)) * dracut: * drop DRACUT_PATH and rely on PATH ([2606f985](2606f985d6)) * support SOURCE_DATE_EPOCH ([dfcfa6fb](dfcfa6fbe8)) * allow users to choose which dlopen dependencies they want ([96a91d04](96a91d04dd)) * replace ldd with dracut-install --dry-run or header check ([e8b733f7](e8b733f7c5)) * set systemdversion global var using pkg-config ([ed80f9f4](ed80f9f42c)) * dracut-install: * add --dry-run option to replace external ldd usage ([161153f9](161153f901)) * extend new ELF parsing code to replace ldd calls ([aac5c914](aac5c914af)) * parse ELF .note.dlopen entries for extra deps ([19b5faad](19b5faad97)) * initqueue: factor out initqueue into its own module ([3daf6783](3daf67830d)) * network-manager: use upstream initrd services if available ([83dffc58](83dffc58f6)) * resume: do not depend on initqueue if systemd is used ([34457e07](34457e070b)) * rootfs-block-fallback: factor out rootfallback into its own module ([2676f1a5](2676f1a5fc)) * watchdog: do not depend on initqueue if systemd is used ([c8dbd9ec](c8dbd9ecc8)) * load essential storage kernel modules in sloppy hostonly mode ([87304767](87304767b1)) * increase deteminism by not relying on the default sorting from ls ([c9f6b867](c9f6b8674e)) * network-manager dracut module no longer depends on systemd ([8f063e23](8f063e2337)) * support DRACUT_SYSTEMD being unset ([79ffbd28](79ffbd2829)) * support hostonly being unset ([c85c9324](c85c93245b)) * support DRACUT_RESOLVE_LAZY being unset ([3d383ba4](3d383ba4fa)) * loongarch architecture support ([38f44b35](38f44b35d0)) * let check_vol_slaves_all return 1 when checks on all slaves fail ([b117013b](b117013b78)) * improve hostonly sloppy mode ([53537ae7](53537ae77e), closes [#1321](https://github.com/dracut-ng/dracut-ng/issues/1321)) * load more kernel modules in sloppy hostonly mode ([de862885](de862885ec)) * Makefile: remove test modules after renumbering ([80961ee0](80961ee0b3)) * base: * base module failure if root password is already set ([e4551d40](e4551d403f)) * dracut-lib.sh soft depends on poweroff/reboot/halt ([237108c3](237108c332)) * support PREFIX being unset ([7bea9dfe](7bea9dfed6)) * only create nobody user for nfs dracut module ([8934a8e5](8934a8e50f)) * dmsquash-live: erofs collision with latest util-linux ([950475e8](950475e848)) * dracut: * only call uname -r if it is safe to do ([3f4497ed](3f4497ed84)) * detect if systemd-detect-virt is available before calling it ([5d3298ea](5d3298ea9e)) * consolidate reporting running in a container ([000f5dbf](000f5dbfb6)) * ensure hardlink deduplication is reproducible ([9fdf683f](9fdf683f6d)) * respect PKG_CONFIG env var instead of hardcoding pkg-config ([0ee92dbb](0ee92dbba6)) * dracut-init: use sysroot when checking udev rule program existence ([c1000cda](c1000cda35)) * dracut-init.sh: * support DRACUT_NO_XATTR being unset ([d520252a](d520252aae)) * initialize _files in inst_libdir_file ([2311abeb](2311abeba5)) * dracut-initramfs-restore: check for Debian initrd.img symlink ([f80128e9](f80128e91a)) * dracut-install: * sort output of --modalias ([41e43068](41e4306840)) * install all suppliers of a supplier's module ([80574db7](80574db78c)) * do not limit supplier handling to platform bus ([e35c5173](e35c517310)) * add sysfs node parents' modules as dependencies ([3607cd8f](3607cd8fcb)) * rework broken destination existence logic ([425e263b](425e263be5)) * plug memory leak on kerneldir ([082b6b0a](082b6b0a6e)) * deadcode.DeadStores static analyzer warnings ([28041543](28041543f6)) * dracut-lib.sh: initialize variables in getargs ([ef60bd71](ef60bd7179)) * dracut-logger.sh: initialize errmsg in dlog_init ([f35a8c7f](f35a8c7f04)) * dracut.conf.d: reserve namespace 50 to out-of-tree configurations ([d470b436](d470b436ae)) * dracut.sh: * do not use uname to detect kernel version in a container ([2b2debd7](2b2debd794)) * initialize variables that get exported ([50426818](504268187b)) * don't pass empty string as dir ([758f3eaf](758f3eaf61), closes [#1275](https://github.com/dracut-ng/dracut-ng/issues/1275)) * fcoe-uefi: exit early on empty vlan ([555b6e1d](555b6e1d68)) * fips: make sha512hmac an optional requirement ([3d319b55](3d319b55a6)) * generic.conf: increase ordering for generic.conf ([d823fd86](d823fd86d3)) * i18n: add $dracutsysrootdir to systemd-vconsole-setup.service path ([90956522](90956522ba)) * livenet: drop stray command call ([9135136d](9135136d7d), closes [#1240](https://github.com/dracut-ng/dracut-ng/issues/1240)) * lsinitrd: resolve initrd to real path ([22d93bc0](22d93bc0cd)) * man: document what to expect running dracut non-root ([b853eba8](b853eba876)) * modules: * free up range 00-09 to out of tree dracut modules ([1edcb076](1edcb07619)) * document known module dependencies ([2d98ddb5](2d98ddb5d2)) * move more modules with unimportant ordering to 70 ([c439438d](c439438d4f)) * all modules with 99 ordering should have a unique number ([2199846f](2199846ffe)) * network-manager: depend on dbus only when using systemd ([58baf861](58baf861c6)) * simpledrm: add =drivers/gpu/drm/panel ([b7a2f8d0](b7a2f8d0bd)) * systemd: * systemd.volatile needs overlayfs kernel module ([e1452003](e145200352)) * make checking for systemd availability consistent ([8e575556](8e575556da)) * systemd-cryptsetup: don't pull in fido2/pkcs11/tpm2-tss if omitted ([01b369a5](01b369a586)) * systemd-repart: * allow partition format ([02201361](02201361ac)) * copy systemd system drop-in configuration ([bb8bf124](bb8bf12452)) * systemd-sysext: * install the required kernel modules ([7f524d3d](7f524d3d24)) * make non-hostonly non-host ([e42755c3](e42755c342)) * systemd-sysusers: * maintain users and groups ([50285645](50285645e6)) * remove (g)shadow created by systemd-sysusers ([97b5f91f](97b5f91ff0), closes [#1242](https://github.com/dracut-ng/dracut-ng/issues/1242)) * systemd-udevd: handle root=gpt-auto for systemd-v258 ([fa17b6fb](fa17b6fb0e)) * test: renumber test modules to 70 ([99ed458b](99ed458b5b)) Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
d68c56e1ed
commit
e3fc979b65
|
|
@ -1,91 +0,0 @@
|
|||
From 38dea7dd671fd621b563377cfbd95e4783568c6e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
|
||||
<zboszor@gmail.com>
|
||||
Date: Fri, 7 Jun 2024 10:32:40 +0200
|
||||
Subject: [PATCH] feat(dracut-install): split ldd command arguments for
|
||||
execvp()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This restores a not-so-subtle feature of previously executing ldd
|
||||
via popen(), i.e. the ability to use a cross-compiled sysroot.
|
||||
|
||||
The ldd command may be passed in via the DRACUT_LDD environment
|
||||
variable, and the command may contain command line arguments.
|
||||
The number of such arguments are not known in advance.
|
||||
|
||||
Split the command into executable and arguments and run it
|
||||
via execvp().
|
||||
|
||||
Fixes: d010fa0d7f8ef42ad31729d027d2e4be6dd6e588
|
||||
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
|
||||
Upstream-Status: Submitted [https://github.com/dracut-ng/dracut-ng/pull/339]
|
||||
---
|
||||
src/install/dracut-install.c | 47 +++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 46 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
|
||||
index e9708c45..724b27b5 100644
|
||||
--- a/src/install/dracut-install.c
|
||||
+++ b/src/install/dracut-install.c
|
||||
@@ -559,10 +559,55 @@ static int resolve_deps(const char *src)
|
||||
log_debug("%s %s", ldd, fullsrcpath);
|
||||
pid_t ldd_pid;
|
||||
if ((ldd_pid = fork()) == 0) {
|
||||
+ char **cmdline = NULL;
|
||||
+ int start, pos, idx = 0;
|
||||
+ /* Account for at least 2 elements plus the terminating NULL in cmdline */
|
||||
+ int args = 3;
|
||||
+
|
||||
+ /* Estimate the number of space-separated elements in the "ldd" string */
|
||||
+ pos = 0;
|
||||
+ while (isspace(ldd[pos]))
|
||||
+ pos++;
|
||||
+ for (; ldd[pos]; pos++) {
|
||||
+ if (isspace(ldd[pos])) {
|
||||
+ if (pos)
|
||||
+ args++;
|
||||
+ while (isspace(ldd[pos]))
|
||||
+ pos++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ cmdline = malloc(args * sizeof(char *));
|
||||
+ memset(cmdline, 0, args * sizeof(char *));
|
||||
+
|
||||
+ pos = 0;
|
||||
+ while (isspace(ldd[pos]))
|
||||
+ pos++;
|
||||
+ start = pos;
|
||||
+ for (; ldd[pos]; pos++) {
|
||||
+ while (ldd[pos] && !isspace(ldd[pos]))
|
||||
+ pos++;
|
||||
+
|
||||
+ cmdline[idx] = malloc(pos - start + 1);
|
||||
+ memcpy(cmdline[idx], ldd + start, pos - start);
|
||||
+ cmdline[idx][pos - start] = 0;
|
||||
+ idx++;
|
||||
+
|
||||
+ if (!ldd[pos])
|
||||
+ break;
|
||||
+
|
||||
+ while (isspace(ldd[pos]))
|
||||
+ pos++;
|
||||
+ start = pos;
|
||||
+ }
|
||||
+
|
||||
+ cmdline[idx++] = fullsrcpath;
|
||||
+ cmdline[idx] = NULL;
|
||||
+
|
||||
dup2(fds[1], 1);
|
||||
dup2(fds[1], 2);
|
||||
putenv("LC_ALL=C");
|
||||
- execlp(ldd, ldd, fullsrcpath, (char *)NULL);
|
||||
+ execvp(cmdline[0], cmdline);
|
||||
_exit(errno == ENOENT ? 127 : 126);
|
||||
}
|
||||
close(fds[1]);
|
||||
--
|
||||
2.45.2
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From b8504fdbc6ac7b49aa0a9671267be8ac7affb2ee Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen.kooi@oss.qualcomm.com>
|
||||
Date: Thu, 19 Jun 2025 16:06:14 +0200
|
||||
Subject: [PATCH 1/2] feat: dracut.sh: try $STRIP for $strip_cmd first
|
||||
|
||||
When using dracut in a cross enviroment, like OpenEmbedded, the host
|
||||
provided strip (or eu-strip) won't work, so try using the $STRIP
|
||||
variable from the shell environment first before falling back to path
|
||||
based lookups.
|
||||
|
||||
Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com>
|
||||
Upstream-Status: Submitted [https://github.com/dracut-ng/dracut-ng/pull/1639]
|
||||
---
|
||||
dracut.sh | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 45373efb..dbc5cd72 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -2262,7 +2262,8 @@ done
|
||||
if [[ $do_strip == yes ]]; then
|
||||
# Prefer strip from elfutils for package size
|
||||
declare strip_cmd
|
||||
- strip_cmd=$(command -v eu-strip)
|
||||
+ strip_cmd="${STRIP}"
|
||||
+ [ -z "$strip_cmd" ] && strip_cmd=$(command -v eu-strip)
|
||||
[ -z "$strip_cmd" ] && strip_cmd="strip"
|
||||
|
||||
for p in "$strip_cmd" xargs find; do
|
||||
--
|
||||
2.47.3
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 8871c593973d9abfef45408575e5da887830f42e Mon Sep 17 00:00:00 2001
|
||||
From e01991f1d55d4d1327793790bad3724b89952704 Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Thu, 22 May 2025 18:07:27 +0800
|
||||
Subject: [PATCH] fix broken symlink in dracut config examples
|
||||
Subject: [PATCH 2/2] fix broken symlink in dracut config examples
|
||||
|
||||
Due to commit [1], it installs dracut config examples under /usr.
|
||||
But while enable_test=no, the symlink of test in dracut config is broken
|
||||
|
|
@ -28,17 +28,17 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index d33aebbc..151d9f79 100644
|
||||
index 3a40594b..df7956ab 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -180,6 +180,7 @@ ifneq ($(enable_test),no)
|
||||
cp -arx test $(DESTDIR)$(pkglibdir)
|
||||
@@ -218,6 +218,7 @@ ifeq ($(enable_test),yes)
|
||||
done
|
||||
else
|
||||
rm -rf $(DESTDIR)$(pkglibdir)/modules.d/80test*
|
||||
rm -rf $(DESTDIR)$(pkglibdir)/modules.d/70test*
|
||||
+ rm -rf $(DESTDIR)$(pkglibdir)/dracut.conf.d/test*
|
||||
endif
|
||||
ifneq ($(enable_documentation),no)
|
||||
for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done
|
||||
--
|
||||
2.34.1
|
||||
2.47.3
|
||||
|
||||
|
|
@ -7,10 +7,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
|||
|
||||
PE = "1"
|
||||
|
||||
SRCREV = "956c08774074ddc45b2f975e13d5c13d1fc36eff"
|
||||
PV = "108"
|
||||
SRCREV = "97c5568ec42abd5e6035f0cfa9d319ae6ae4e50a"
|
||||
SRC_URI = "git://github.com/dracut-ng/dracut-ng.git;protocol=http;branch=main \
|
||||
file://0001-feat-dracut-install-split-ldd-command-arguments-for-.patch \
|
||||
file://0001-fix-broken-symlink-in-dracut-config-examples.patch \
|
||||
file://0001-feat-dracut.sh-try-STRIP-for-strip_cmd-first.patch \
|
||||
file://0002-fix-broken-symlink-in-dracut-config-examples.patch \
|
||||
"
|
||||
|
||||
DEPENDS += "kmod"
|
||||
|
|
@ -18,7 +19,6 @@ DEPENDS:append:libc-musl = " fts"
|
|||
|
||||
inherit bash-completion pkgconfig
|
||||
|
||||
|
||||
EXTRA_OECONF = "--prefix=${prefix} \
|
||||
--libdir=${nonarch_libdir} \
|
||||
--datadir=${datadir} \
|
||||
|
|
@ -55,6 +55,32 @@ do_install() {
|
|||
fi
|
||||
}
|
||||
|
||||
do_install:append:class-target () {
|
||||
# Generate and install a config file listing where the DISTRO puts things, dracut
|
||||
# is not always savvy enough to figure it out by itself
|
||||
# Since this primarily fixes systemd issues, only install it when using systemd.
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
cat << EOF > ${B}/${DISTRO}.conf
|
||||
stdloglvl=3
|
||||
sysloglvl=5
|
||||
sysctlconfdir=${sysconfdir}/sysctl.d
|
||||
systemdutildir=${systemd_unitdir}
|
||||
systemdutilconfdir=${sysconfdir}/systemd
|
||||
systemdcatalog=${systemd_unitdir}catalog
|
||||
systemdntpunits=${systemd_unitdir}ntp-units.d
|
||||
systemdntpunitsconfdir=${sysconfdir}/systemd/ntp-units.d
|
||||
systemdportable=${systemd_unitdir}/portable
|
||||
systemdportableconfdir=${sysconfdir}/systemd/portable
|
||||
systemdsystemunitdir=${systemd_system_unitdir}
|
||||
systemdsystemconfdir=${sysconfdir}/systemd/system
|
||||
systemduser=${systemd_user_unitdir}
|
||||
systemduserconfdir=${sysconfdir}/systemd/user
|
||||
EOF
|
||||
install -m 0644 ${B}/${DISTRO}.conf ${D}${libdir}/dracut/dracut.conf.d/
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
FILES:${PN} += "${nonarch_libdir}/kernel \
|
||||
${nonarch_libdir}/dracut \
|
||||
${systemd_unitdir} \
|
||||
|
|
@ -63,11 +89,16 @@ FILES:${PN}-dbg += "${nonarch_libdir}/dracut/.debug"
|
|||
|
||||
CONFFILES:${PN} += "${sysconfdir}/dracut.conf"
|
||||
|
||||
RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
|
||||
# The native variant uses a non-ldd based method of getting library
|
||||
# dependencies, so ldd is only needed on the target
|
||||
RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash"
|
||||
RDEPENDS:${PN}:append:class-target = " ldd"
|
||||
|
||||
# This could be optimized a bit, but let's avoid non-booting systems :)
|
||||
RRECOMMENDS:${PN} = "kernel-modules \
|
||||
coreutils \
|
||||
"
|
||||
RRECOMMENDS:${PN}:class-target = "kernel-modules \
|
||||
coreutils \
|
||||
"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
CVE_STATUS[CVE-2010-4176] = "not-applicable-platform: Applies only to Fedora"
|
||||
Loading…
Reference in New Issue
Block a user