sys-kernel/dracut: Sync with Gentoo

It's from Gentoo commit edd901216d146946e1dfefc51f846b3c622c0a2d.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-05-11 08:19:29 +00:00
parent 9726ab9525
commit 5fb37bc9c1
7 changed files with 75 additions and 19 deletions

View File

@ -1,3 +1,3 @@
DIST dracut-108.tar.gz 552724 BLAKE2B fa5efd4039be8d2d30564a0768d2dec8c3d72b3721391d3a02bde8445cd7a5766d4b119594ebbca86dbd59bd71b64353febaaa7e2257f02d0075333dc29e9047 SHA512 ed06844b65003c1f75373309dbdc10a3036958f413b05b608510142fa78bb34dd9fb1e622242b02b2e9e4063bfa916fd755f5131a77fb3249f77d3f08eca2283
DIST dracut-109.tar.gz 556054 BLAKE2B a5cc0a954fdacaca036d926eb37ecc1c5ed244f59078afb3d59f464f84cf109d52b61ef3ef58eb182164b491d87f8b81a8946c591f0207a44ecd6a6411f018e5 SHA512 c1fb0191911b3b3eac4f568db1cbc8184e2b518a70a0567777b72ef8a5af70a8bdb1b3f8acce2d92eb2dc807e056d5b75aed93292cd05bc8c333efe5d4b98adc
DIST dracut-110.tar.gz 573501 BLAKE2B e82e9db9767bb3e02f13536b26b97a0db94a567980c17e356054015ab3108946b35f7d993864f2ffded3dd0915ee5853df21b7e40ce20a4df5a81a5014a73ee5 SHA512 be5affbe1c76889c0ffe3ae6c52704b559e364cfa5fa149e07a0bbe5e373c7e8c4b54e4a20e7564c91750c8e1593f7cd108806cf63053c8e30d143246e549597
DIST dracut-111.tar.gz 586307 BLAKE2B 1def3957013c1508cf70018b4b5aeae333b459e50a7fc2945cd0c7a99f1c6942c8280888239273b62cdcfa3471a980d74b3769b5e3d0536be4f1729d102074f0 SHA512 4c8a3e1e82bfc1dbe155241564bc93bedc2b321566002ccc643697b50173b8e564d03b1bbff4f49602e0cb7abbee21dfb14aadc453ac9703a846c160d070b4bc

View File

@ -38,7 +38,7 @@ RDEPEND="${COMMON_DEPEND}
|| (
>=sys-apps/sysvinit-2.87-r3
sys-apps/openrc[sysv-utils(-),selinux?]
sys-apps/systemd[sysv-utils]
sys-apps/systemd[sysv-utils(+)]
sys-apps/s6-linux-init[sysv-utils(-)]
)
>=sys-apps/util-linux-2.21

View File

@ -11,7 +11,7 @@ if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/dracut-ng/dracut-ng"
else
if [[ "${PV}" != *_rc* ]]; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
fi
SRC_URI="https://github.com/dracut-ng/dracut-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-ng-${PV}"
@ -38,7 +38,7 @@ RDEPEND="${COMMON_DEPEND}
|| (
>=sys-apps/sysvinit-2.87-r3
sys-apps/openrc[sysv-utils(-),selinux?]
sys-apps/systemd[sysv-utils]
sys-apps/systemd[sysv-utils(+)]
sys-apps/s6-linux-init[sysv-utils(-)]
)
>=sys-apps/util-linux-2.21
@ -105,9 +105,9 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*"
PATCHES=(
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
# Gentoo specific acct-user and acct-group conf adjustments
"${FILESDIR}"/${PN}-108-acct-user-group-gentoo.patch
# https://github.com/dracut-ng/dracut-ng/pull/1122#issuecomment-3192110686
"${FILESDIR}"/${PN}-108-disable-ukify-magic.patch
"${FILESDIR}"/${PN}-110-acct-user-group-gentoo.patch
"${FILESDIR}"/${PN}-110-set-defaults.patch
"${FILESDIR}"/${P}-dash-printf.patch
)
pkg_setup() {
@ -116,11 +116,12 @@ pkg_setup() {
src_configure() {
local myconf=(
--bashcompletiondir="$(get_bashcompdir)"
--disable-dracut-cpio
--enable-network-legacy
--prefix="${EPREFIX}/usr"
--sysconfdir="${EPREFIX}/etc"
--bashcompletiondir="$(get_bashcompdir)"
--systemdsystemunitdir="$(systemd_get_systemunitdir)"
--disable-dracut-cpio
)
if ! has_version -b dev-ruby/asciidoctor; then

View File

@ -11,10 +11,9 @@ if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/dracut-ng/dracut-ng"
else
if [[ "${PV}" != *_rc* ]]; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
SRC_URI="https://github.com/dracut-ng/dracut-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-ng-${PV}"
fi
DESCRIPTION="Generic initramfs generation tool"
@ -38,7 +37,7 @@ RDEPEND="${COMMON_DEPEND}
|| (
>=sys-apps/sysvinit-2.87-r3
sys-apps/openrc[sysv-utils(-),selinux?]
sys-apps/systemd[sysv-utils]
sys-apps/systemd[sysv-utils(+)]
sys-apps/s6-linux-init[sysv-utils(-)]
)
>=sys-apps/util-linux-2.21
@ -104,8 +103,6 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*"
PATCHES=(
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
# Gentoo specific acct-user and acct-group conf adjustments
"${FILESDIR}"/${PN}-110-acct-user-group-gentoo.patch
)
pkg_setup() {

View File

@ -11,10 +11,9 @@ if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/dracut-ng/dracut-ng"
else
if [[ "${PV}" != *_rc* ]]; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
SRC_URI="https://github.com/dracut-ng/dracut-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-ng-${PV}"
fi
DESCRIPTION="Generic initramfs generation tool"
@ -38,7 +37,7 @@ RDEPEND="${COMMON_DEPEND}
|| (
>=sys-apps/sysvinit-2.87-r3
sys-apps/openrc[sysv-utils(-),selinux?]
sys-apps/systemd[sysv-utils]
sys-apps/systemd[sysv-utils(+)]
sys-apps/s6-linux-init[sysv-utils(-)]
)
>=sys-apps/util-linux-2.21
@ -104,8 +103,6 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*"
PATCHES=(
"${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
# Gentoo specific acct-user and acct-group conf adjustments
"${FILESDIR}"/${PN}-110-acct-user-group-gentoo.patch
)
pkg_setup() {

View File

@ -0,0 +1,32 @@
https://bugs.gentoo.org/971601
https://github.com/dracut-ng/dracut-ng/pull/2303
From eca6d9f1d35879d411f5f860cf5e0a57cd155ad4 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <benjamin.drung@canonical.com>
Date: Mon, 16 Mar 2026 11:22:33 +0100
Subject: [PATCH] fix(dracut.sh): use printf instead of echo in mark_hostonly
POSIX requires to interpreted escape sequences. The filenames passed to
`mark_hostonly` might contain backslashes and therefore might be
interpreted (dash 0.5.13.1 will do that).
So use `printf` instead to avoid escaping the filenames.
Fixes: https://github.com/dracut-ng/dracut-ng/issues/2280
---
dracut.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.sh b/dracut.sh
index 28c8ecc92..cc5ad0b8c 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1559,7 +1559,7 @@ inst_fsck_help() {
# shellcheck disable=SC2317,SC2329
mark_hostonly() {
for i in "$@"; do
- echo "$i" >> "$initdir/lib/dracut/hostonly-files"
+ printf "%s\n" "$i" >> "$initdir/lib/dracut/hostonly-files"
done
}

View File

@ -0,0 +1,29 @@
https://github.com/dracut-ng/dracut/commit/86dae8081027e3461a49999d63938561eb2ed662
diff --git a/dracut.conf.d/gentoo/01-gentoo.conf b/dracut.conf.d/gentoo/01-gentoo.conf
index 5c12d1c50b..218e70b99b 100644
--- a/dracut.conf.d/gentoo/01-gentoo.conf
+++ b/dracut.conf.d/gentoo/01-gentoo.conf
@@ -1,2 +1,22 @@
-# Gentoo specific Dracut configuration
+# Build an initramfs specific to this machine by default. This ensures
+# local configuration files (/etc/...) are included.
+hostonly="yes"
+hostonly_mode="sloppy"
+
+# Usage of ukify is controlled via sys-kernel/installkernel[+/-ukify].
+# Automatic delegation in sys-kernel/dracut is disabled here.
ukify="no"
+# Building an UKI is toggled by sys-kernel/installkernel[+/-uki].
+# If the ukify USE flag is also enabled then ukify is used to build
+# the UKI. If not, then Dracut uses objcopy/objdump to build an UKI.
+# Automatic delegation to ukify is disabled, see also above.
+# By default we do not build an UKI (initramfs only).
+uefi="no"
+
+# Inclusion of CPU microcode is controlled via:
+# sys-kernel/linux-firmware[+/-initramfs], and/or
+# sys-firmware/intel-microcode[+/-initramfs]
+# The later takes precedence if both are installed. Disable the
+# inclusion by default here, the aforementioned packages override it.
+# If neither package is installed then no microcode can be included.
+early_microcode="no"