mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 13:18:36 -09:00
package/dracut: switch to dracut-ng and bump to version 110
Bump dracut package source to the newest version of the project, dracut-ng, release 110. The original dracut project is now inactive for a long period of time. Dracut community has transitioned to the dracut-ng fork to continue development. The migration ensures regular updates for security and bug fixing, a better support of modern systemd features and kernel requirements. It also allows alignment with major Linux distributions (Fedora, Arch Linux, Gentoo), and other open source projects (Yocto). Changes made : - dracut.mk: change source to dracut-ng 110 - dracut.hash: adapt hash to dracut-ng 110 - dracut.mk: fix unused systemd symbolic links build error - Config.in: adapt fs/cpio/Config.in to mention dracut-ng upgrade - Config.in.host: adapt dracut Config.in.host to mention dracut-ng upgrade - .checkpackageignore: remove 001-dracut.sh-don-t-unset-LD_PRELOAD.patch Patch removals and additions : - Removed 0001-dracut.sh-don-t-unset-LD_PRELOAD.patch: Upstream dracut-ng removed the 'unset LD_PRELOAD' instruction, making this patch obsolete. - Added 0001-fix-functions-prevent-find_binary-from-dropping-last.patch: Dracut-ng introduced a regression on non-merged-usr architectures. This was traced down to a bug in find_binary() where a `while read` loop drops the last PATH element if the string does not end with a colon. This local patch fixes the Bash EOF read behavior. Submitted upstream: https://github.com/dracut-ng/dracut-ng/pull/2416 All dracut related runtime tests, including non-merged-usr, have been locally tested and passed successfully using the reference Buildroot docker container. Signed-off-by: Matéo Pourrier <mateo.pourrier@smile.fr> [Julien: reword commit log title] Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
f7bf9b2ba4
commit
90304b7129
@@ -293,7 +293,6 @@ package/dmalloc/0005-configure-use-LD-instead-of-hard-coding-ld.patch lib_patch.
|
||||
package/docopt-cpp/0001-only-build-one-target-use-BUILD_SHARED_LIBS-where-appropriate.patch lib_patch.Upstream
|
||||
package/domoticz/S99domoticz Shellcheck
|
||||
package/dovecot/0001-auth-Fix-handling-passdbs-with-identical-driver-args.patch lib_patch.Upstream
|
||||
package/dracut/0001-dracut.sh-don-t-unset-LD_PRELOAD.patch lib_patch.Upstream
|
||||
package/dracut/merged-usr-module-setup.sh Shellcheck
|
||||
package/dropbear/S50dropbear Shellcheck lib_sysv.Indent lib_sysv.Variables
|
||||
package/dt/0001-adjust-os-symlink.patch lib_patch.Upstream
|
||||
|
||||
@@ -20,9 +20,9 @@ config BR2_TARGET_ROOTFS_CPIO_DRACUT
|
||||
bool "Invoke dracut to make a partial initramfs"
|
||||
select BR2_PACKAGE_HOST_DRACUT
|
||||
help
|
||||
Build an additional initramfs using dracut. This only contains
|
||||
a subset of the rootfs, as determined by the configuration
|
||||
file.
|
||||
Build an additional initramfs using dracut-ng. This only
|
||||
contains a subset of the rootfs, as determined by the
|
||||
configuration file.
|
||||
This can be useful to create a recovery system, for instance.
|
||||
|
||||
endchoice
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From bb12f15856911d8532b569116da7dab4cbf107be Mon Sep 17 00:00:00 2001
|
||||
From: Thierry Bultel <thierry.bultel@linatsea.fr>
|
||||
Date: Mon, 10 Jan 2022 09:09:43 +0100
|
||||
Subject: [PATCH] dracut.sh: don't unset LD_PRELOAD
|
||||
|
||||
LD_PRELOAD and LD_LIBRARY_PATH are needed to run under fakeroot.
|
||||
|
||||
Signed-off-by: Thierry Bultel <thierry.bultel@linatsea.fr>
|
||||
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
|
||||
[yann.morin.1998@free.fr: commit log also mentions LD_LIBRARY_PATH]
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
---
|
||||
dracut.sh | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index 60ac46f4..37f25b38 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -868,8 +868,6 @@ export LC_ALL=C
|
||||
export LANG=C
|
||||
unset LC_MESSAGES
|
||||
unset LC_CTYPE
|
||||
-unset LD_LIBRARY_PATH
|
||||
-unset LD_PRELOAD
|
||||
unset GREP_OPTIONS
|
||||
|
||||
export DRACUT_LOG_LEVEL=warning
|
||||
--
|
||||
2.37.1
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 94c4274e32467235fb580a27ea182169f253ca5f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C3=A9o=20Pourrier?= <mateo.pourrier@smile.fr>
|
||||
Date: Tue, 28 Apr 2026 17:23:23 +0200
|
||||
Subject: [PATCH] fix(functions): prevent find_binary from dropping last PATH
|
||||
element
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When `read` encounters EOF before the delimiter, it returns a non-zero
|
||||
exit status, causing the while loop to terminate immediately. As a result,
|
||||
if the PATH string doesn't end with a colon, the very last directory in
|
||||
PATH is ignored by find_binary().
|
||||
|
||||
This caused regressions on split-usr architectures where critical
|
||||
binaries reside exclusively in /bin, and /bin happens to be
|
||||
appended at the very end of the PATH by dracut.sh.
|
||||
|
||||
Appending a virtual colon to the Here-String ensures the loop processes
|
||||
all directories correctly.
|
||||
|
||||
Fixes dracut-ng issue #1467 : https://github.com/dracut-ng/dracut-ng/issues/1467
|
||||
|
||||
Upstream: https://github.com/dracut-ng/dracut-ng/pull/2416
|
||||
Signed-off-by: Matéo Pourrier <mateo.pourrier@smile.fr>
|
||||
---
|
||||
dracut-functions.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index f430a28e..5046f45e 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -94,7 +94,7 @@ find_binary() {
|
||||
printf "%s\n" "${_path}"
|
||||
return 0
|
||||
fi
|
||||
- done <<< "$PATH"
|
||||
+ done <<< "${PATH}:"
|
||||
|
||||
[[ -n ${dracutsysrootdir-} ]] && return 1
|
||||
type -P "${1##*/}"
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -2,8 +2,10 @@ config BR2_PACKAGE_HOST_DRACUT
|
||||
bool
|
||||
select BR2_PACKAGE_HOST_KMOD
|
||||
help
|
||||
dracut is used to create an initramfs image by
|
||||
dracut-ng is used to create an initramfs image by
|
||||
copying tools and files from an installed system
|
||||
and combining it with the dracut framework.
|
||||
dracut-ng is a drop-in replacement for the legacy
|
||||
dracut project.
|
||||
|
||||
https://dracut.wiki.kernel.org
|
||||
https://github.com/dracut-ng/dracut-ng/wiki
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed
|
||||
sha256 eabf0bb685420c1e1d5475b6855ef787104508f0135ff570312845256e0fcecf dracut-059.tar.gz
|
||||
sha256 0d357853f8cf2371d89a8ebcbbb1fd2c1c85a79d8866925fd7385eaeb20a27dc dracut-110.tar.gz
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DRACUT_VERSION = 059
|
||||
DRACUT_SITE = $(call github,dracutdevs,dracut,$(DRACUT_VERSION))
|
||||
DRACUT_VERSION = 110
|
||||
DRACUT_SITE = $(call github,dracut-ng,dracut-ng,$(DRACUT_VERSION))
|
||||
DRACUT_LICENSE = GPL-2.0
|
||||
DRACUT_LICENSE_FILES = COPYING
|
||||
DRACUT_CPE_ID_VALID = YES
|
||||
|
||||
HOST_DRACUT_DEPENDENCIES = host-pkgconf host-kmod host-cross-ldd
|
||||
HOST_DRACUT_INSTALL_OPTS = systemdsystemunitdir="" install
|
||||
|
||||
define HOST_DRACUT_POST_INSTALL_WRAPPER_SCRIPT
|
||||
mv $(HOST_DIR)/bin/dracut $(HOST_DIR)/bin/dracut.real
|
||||
|
||||
Reference in New Issue
Block a user