Compare commits

..

No commits in common. 'i9c-beta' and 'c9' have entirely different histories.
i9c-beta ... c9

@ -1,180 +0,0 @@
From 410d8fc37f1ce5fc5a6f66eda3d3280a6fa0023c Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Mon, 11 Jul 2022 12:52:58 +0200
Subject: [PATCH] fix(dracut.sh): correct wrong systemd variable paths
systemdsystemconfdir usually expands to /etc/systemd/system, but the local
configuration of systemd-networkd, systemd-timesyncd, portablectl and systemd
users is saved into directories whose parent is /etc/systemd
(systemdutilconfdir).
Also add missing exports.
fix(network-legacy): correct wrong local network configuration path
fix(network-manager): correct wrong local network configuration path
refactor(systemd-networkd): use more precise global variables
refactor(systemd-timesyncd): use more precise global variables
refactor(network-legacy): use more precise global variables
refactor(network-manager): use more precise global variables
(Cherry-picked commits:
ae4c8744dc3dbceb142c6eb88fd69bc6aaf29e20
a60543bf9746022e4430d310892ee03bb837b6a2
cb39aec479bdabfa7b1af5168c14ca5683905a7d
5781b6e7ab8c2f176331c960c677de1fe8a39592
3866ebc601bff71996c7e0892392332577e2a9c7
7fa66e106af021dd24fca8e76893c422775a6b61
c8adc9f72fef906b5706fa6d0e788564a508f4ee)
Resolves: RHEL-9479
---
dracut.sh | 14 ++++++++------
modules.d/01systemd-networkd/module-setup.sh | 14 +++++++-------
modules.d/01systemd-timesyncd/module-setup.sh | 4 ++--
modules.d/35network-legacy/module-setup.sh | 4 ++--
modules.d/35network-manager/module-setup.sh | 4 ++--
5 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 30dfb229..8c757b14 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1830,7 +1830,7 @@ fi
[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] \
|| systemdnetworkconfdir=$(pkg-config systemd --variable=systemdnetworkconfdir 2> /dev/null)
-[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdsystemconfdir}/network
+[[ -d $dracutsysrootdir$systemdnetworkconfdir ]] || systemdnetworkconfdir=${systemdutilconfdir}/network
[[ -d $dracutsysrootdir$systemdntpunits ]] \
|| systemdntpunits=$(pkg-config systemd --variable=systemdntpunits 2> /dev/null)
@@ -1840,7 +1840,7 @@ fi
[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] \
|| systemdntpunitsconfdir=$(pkg-config systemd --variable=systemdntpunitsconfdir 2> /dev/null)
-[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdsystemconfdir}/ntp-units.d
+[[ -d $dracutsysrootdir$systemdntpunitsconfdir ]] || systemdntpunitsconfdir=${systemdutilconfdir}/ntp-units.d
[[ -d $dracutsysrootdir$systemdportable ]] \
|| systemdportable=$(pkg-config systemd --variable=systemdportable 2> /dev/null)
@@ -1850,7 +1850,7 @@ fi
[[ -d $dracutsysrootdir$systemdportableconfdir ]] \
|| systemdportableconfdir=$(pkg-config systemd --variable=systemdportableconfdir 2> /dev/null)
-[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdsystemconfdir}/portable
+[[ -d "$dracutsysrootdir$systemdportableconfdir" ]] || systemdportableconfdir=${systemdutilconfdir}/portable
[[ -d $dracutsysrootdir$systemdsystemunitdir ]] \
|| systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2> /dev/null)
@@ -1865,7 +1865,7 @@ fi
[[ -d $dracutsysrootdir$systemduserconfdir ]] \
|| systemduserconfdir=$(pkg-config systemd --variable=systemduserconfdir 2> /dev/null)
-[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdsystemconfdir}/user
+[[ -d $dracutsysrootdir$systemduserconfdir ]] || systemduserconfdir=${systemdutilconfdir}/user
[[ -d $dracutsysrootdir$systemdsystemconfdir ]] \
|| systemdsystemconfdir=$(pkg-config systemd --variable=systemdsystemconfdir 2> /dev/null)
@@ -1919,8 +1919,10 @@ export initdir dracutbasedir \
dbussessionconfdir dbussystem dbussystemconfdir dbussystemservices \
dbussystemservicesconfdir environment environmentconfdir modulesload \
modulesloadconfdir sysctld sysctlconfdir sysusers sysusersconfdir \
- systemdutildir systemdutilconfdir systemdcatalog systemdntpunits \
- systemdntpunitsconfdir systemdsystemunitdir systemdsystemconfdir \
+ systemdutildir systemdutilconfdir systemdcatalog systemdnetwork \
+ systemdnetworkconfdir systemdntpunits systemdntpunitsconfdir \
+ systemdportable systemdportableconfdir systemdsystemunitdir \
+ systemdsystemconfdir systemduser systemduserconfdir \
hostonly_cmdline loginstall tmpfilesdir tmpfilesconfdir depmodd \
depmodconfdir
diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh
index c3f3c051..e6d113d8 100755
--- a/modules.d/01systemd-networkd/module-setup.sh
+++ b/modules.d/01systemd-networkd/module-setup.sh
@@ -39,12 +39,12 @@ install() {
"$systemdutildir"/systemd-networkd \
"$systemdutildir"/systemd-network-generator \
"$systemdutildir"/systemd-networkd-wait-online \
- "$systemdutildir"/network/80-container-host0.network \
- "$systemdutildir"/network/80-container-ve.network \
- "$systemdutildir"/network/80-container-vz.network \
- "$systemdutildir"/network/80-vm-vt.network \
- "$systemdutildir"/network/80-wifi-adhoc.network \
- "$systemdutildir"/network/99-default.link \
+ "$systemdnetwork"/80-container-host0.network \
+ "$systemdnetwork"/80-container-ve.network \
+ "$systemdnetwork"/80-container-vz.network \
+ "$systemdnetwork"/80-vm-vt.network \
+ "$systemdnetwork"/80-wifi-adhoc.network \
+ "$systemdnetwork"/99-default.link \
"$systemdsystemunitdir"/systemd-networkd.service \
"$systemdsystemunitdir"/systemd-networkd.socket \
"$systemdsystemunitdir"/systemd-network-generator.service \
@@ -67,7 +67,7 @@ install() {
inst_multiple -H -o \
"$systemdutilconfdir"/networkd.conf \
"$systemdutilconfdir/networkd.conf.d/*.conf" \
- "$systemdutilconfdir/network/*" \
+ "$systemdnetworkconfdir/*" \
"$systemdsystemconfdir"/systemd-networkd.service \
"$systemdsystemconfdir/systemd-networkd.service/*.conf" \
"$systemdsystemunitdir"/systemd-networkd.socket \
diff --git a/modules.d/01systemd-timesyncd/module-setup.sh b/modules.d/01systemd-timesyncd/module-setup.sh
index 015caecf..f6f35fee 100755
--- a/modules.d/01systemd-timesyncd/module-setup.sh
+++ b/modules.d/01systemd-timesyncd/module-setup.sh
@@ -35,7 +35,7 @@ install() {
inst_multiple -o \
"$dbussystem"/org.freedesktop.timesync1.conf \
"$dbussystemservices"/org.freedesktop.timesync1.service \
- "$systemdutildir/ntp-units.d/*.list" \
+ "$systemdntpunits/*.list" \
"$systemdutildir"/systemd-timesyncd \
"$systemdutildir"/systemd-time-wait-sync \
"$systemdutildir/timesyncd.conf.d/*.conf" \
@@ -55,7 +55,7 @@ install() {
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
- "$systemdutilconfdir/ntp-units.d/*.list" \
+ "$systemdntpunitsconfdir/*.list" \
"$systemdutilconfdir"/timesyncd.conf \
"$systemdutilconfdir/timesyncd.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-timesyncd.service \
diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh
index 84dcf7f5..e57fc6fa 100755
--- a/modules.d/35network-legacy/module-setup.sh
+++ b/modules.d/35network-legacy/module-setup.sh
@@ -24,8 +24,8 @@ install() {
#Adding default link
if dracut_module_included "systemd"; then
- inst_multiple -o "${systemdutildir}/network/99-default.link"
- [[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
+ inst_multiple -o "${systemdnetwork}/99-default.link"
+ [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
fi
inst_multiple ip dhclient sed awk grep pgrep tr expr
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh
index 04898a39..c93c6a3c 100755
--- a/modules.d/35network-manager/module-setup.sh
+++ b/modules.d/35network-manager/module-setup.sh
@@ -52,8 +52,8 @@ install() {
inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service
# Adding default link
- inst_multiple -o "${systemdutildir}/network/99-default.link"
- [[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
+ inst_multiple -o "${systemdnetwork}/99-default.link"
+ [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
$SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
fi

@ -1,31 +0,0 @@
From 7bdb3fbdce70bea19dca3fec792b5266d7b9e48b Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Tue, 14 Nov 2023 14:55:44 +0100
Subject: [PATCH] fix(hwdb): follow shfmt-recommended format
Related: RHEL-9479
---
modules.d/95hwdb/module-setup.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules.d/95hwdb/module-setup.sh b/modules.d/95hwdb/module-setup.sh
index 16365377..7e4b1af6 100755
--- a/modules.d/95hwdb/module-setup.sh
+++ b/modules.d/95hwdb/module-setup.sh
@@ -11,11 +11,12 @@ install() {
local hwdb_bin
# systemd-hwdb ships the file in /etc, with /usr/lib as an alternative.
- # Therefore consider this location as preferred for configuration.
+ # The alternative location is preferred, as we can consider it being user
+ # configuration.
hwdb_bin="${udevdir}"/hwdb.bin
- if [[ ! -r "${hwdb_bin}" ]]; then
- hwdb_bin="${udevconfdir}"/hwdb.bin
+ if [[ ! -r ${hwdb_bin} ]]; then
+ hwdb_bin="${udevconfdir}"/hwdb.bin
fi
if [[ $hostonly ]]; then

@ -1,55 +0,0 @@
From edd1efe46a6c211034f06ad1e20c027a5e1102db Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Thu, 21 Sep 2023 14:31:07 +0200
Subject: [PATCH] fix(nvmf): move /etc/nvme/host{nqn,id} requirement to
hostonly
When creating initramfs for universal boot image such as an installer,
we can't include any machine-specific IDs. Let's move the check
for /etc/nvme/hostnqn and /etc/nvme/hostid files presence to
the hostonly section to avoid unsatisfied requirements.
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
(Cherry-picked commit: 1cf10397b5f002790a096e5bdce733436fffbd2d
PR: https://github.com/dracutdevs/dracut/pull/2523)
Resolves: RHEL-3630
---
modules.d/95nvmf/module-setup.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
index 1dd2ca53..0b90d8be 100755
--- a/modules.d/95nvmf/module-setup.sh
+++ b/modules.d/95nvmf/module-setup.sh
@@ -3,8 +3,6 @@
# called by dracut
check() {
require_binaries nvme jq || return 1
- [ -f /etc/nvme/hostnqn ] || return 255
- [ -f /etc/nvme/hostid ] || return 255
is_nvmf() {
local _dev=$1
@@ -36,6 +34,8 @@ check() {
}
[[ $hostonly ]] || [[ $mount_needs ]] && {
+ [ -f /etc/nvme/hostnqn ] || return 255
+ [ -f /etc/nvme/hostid ] || return 255
pushd . > /dev/null
for_each_host_dev_and_slaves is_nvmf
local _is_nvmf=$?
@@ -130,8 +130,8 @@ install() {
_nvmf_args=$(cmdline)
[[ "$_nvmf_args" ]] && printf "%s" "$_nvmf_args" >> "${initdir}/etc/cmdline.d/95nvmf-args.conf"
fi
- inst_simple "/etc/nvme/hostnqn"
- inst_simple "/etc/nvme/hostid"
+ inst_simple -H "/etc/nvme/hostnqn"
+ inst_simple -H "/etc/nvme/hostid"
inst_multiple ip sed

@ -1,177 +0,0 @@
From 28cadd4829118d2831908dd267766613fd74f0b1 Mon Sep 17 00:00:00 2001
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Date: Wed, 12 Jul 2023 03:50:47 -0400
Subject: [PATCH] feat(dracut): add --sbat option to add sbat policy to UKI
Take existing .sbat section from the uefi stub and merge it
with vmlinux .sbat (if it exists) and user-provided .sbat parameters
using the new --sbat option.
For some reasons, --update-section in objcopy does not resize the
.sbat section, so remove the section from the stub and add it
to the UKI as new one, to avoid having incomplete SBAT strings.
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
(Cherry-picked commit: 550a0084fd95870f35218dc2cf8ea91fde1c728a)
Resolves: RHEL-5732
---
dracut.sh | 46 +++++++++++++++++++++++++++++++++++++++++++-
man/dracut.8.asc | 5 +++++
man/dracut.conf.5.asc | 5 +++++
shell-completion/bash/dracut | 2 +-
4 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 8c757b14..0bac6a33 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -271,6 +271,10 @@ Creates initial ramdisk images for preloading modules
Use [FILE] as a splash image when creating an UEFI
executable. Requires bitmap (.bmp) image format.
--kernel-image [FILE] Location of the kernel image.
+ --sbat [PARAMETERS] The SBAT parameters to be added to .sbat.
+ The string "sbat,1,SBAT Version,sbat,1,
+ https://github.com/rhboot/shim/blob/main/SBAT.md" is
+ already added by default.
--regenerate-all Regenerate all initramfs images at the default location
for the kernel versions found on the system.
-p, --parallel Use parallel processing if possible (currently only
@@ -462,6 +466,7 @@ rearrange_params() {
--long uefi-stub: \
--long uefi-splash-image: \
--long kernel-image: \
+ --long sbat: \
--long no-hostonly-i18n \
--long hostonly-i18n \
--long hostonly-nics: \
@@ -839,6 +844,11 @@ while :; do
PARMS_TO_STORE+=" '$2'"
shift
;;
+ --sbat)
+ sbat_l="$2"
+ PARMS_TO_STORE+=" '$2'"
+ shift
+ ;;
--no-machineid)
machine_id_l="no"
;;
@@ -1076,6 +1086,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $uefi_stub_l ]] && uefi_stub="$uefi_stub_l"
[[ $uefi_splash_image_l ]] && uefi_splash_image="$uefi_splash_image_l"
[[ $kernel_image_l ]] && kernel_image="$kernel_image_l"
+[[ $sbat_l ]] && sbat="$sbat_l"
[[ $machine_id_l ]] && machine_id="$machine_id_l"
if ! [[ $outfile ]]; then
@@ -2585,6 +2596,24 @@ fi
umask 077
+SBAT_DEFAULT="sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md"
+sbat_out=$uefi_outdir/uki.sbat
+
+clean_sbat_string() {
+ local inp=$1
+ local temp=$uefi_outdir/temp.sbat
+ sed "/${SBAT_DEFAULT//\//\\/}/d" "$inp" > "$temp"
+ [[ -s $temp ]] && cat "$temp" >> "$sbat_out"
+ rm "$temp"
+}
+
+get_sbat_string() {
+ local inp=$1
+ local out=$uefi_outdir/$2
+ objcopy -O binary --only-section=.sbat "$inp" "$out"
+ clean_sbat_string "$out"
+}
+
if [[ $uefi == yes ]]; then
if [[ $kernel_cmdline ]]; then
echo -n "$kernel_cmdline" > "$uefi_outdir/cmdline.txt"
@@ -2635,6 +2664,16 @@ if [[ $uefi == yes ]]; then
unset uefi_splash_image
fi
+ echo "$SBAT_DEFAULT" > "$sbat_out"
+ if [[ -n $sbat ]]; then
+ echo "$sbat" | sed "/${SBAT_DEFAULT//\//\\/}/d" >> "$sbat_out"
+ fi
+ get_sbat_string "$kernel_image" kernel.sbat
+ get_sbat_string "$uefi_stub" stub.sbat
+
+ uefi_sbat_offs="${offs}"
+ offs=$((offs + $(stat -Lc%s "$sbat_out")))
+ offs=$((offs + "$align" - offs % "$align"))
uefi_linux_offs="${offs}"
offs=$((offs + $(stat -Lc%s "$kernel_image")))
offs=$((offs + "$align" - offs % "$align"))
@@ -2646,14 +2685,19 @@ if [[ $uefi == yes ]]; then
exit 1
fi
+ tmp_uefi_stub=$uefi_outdir/elf.stub
+ cp "$uefi_stub" "$tmp_uefi_stub"
+ objcopy --remove-section .sbat "$tmp_uefi_stub" &> /dev/null
+
if objcopy \
${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=$(printf 0x%x "$uefi_osrelease_offs")} \
${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=$(printf 0x%x "$uefi_cmdline_offs")} \
${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=$(printf 0x%x "$uefi_splash_offs")} \
+ --add-section .sbat="$sbat_out" --change-section-vma .sbat="$(printf 0x%x "$uefi_sbat_offs")" \
--add-section .linux="$kernel_image" --change-section-vma .linux="$(printf 0x%x "$uefi_linux_offs")" \
--add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="$(printf 0x%x "$uefi_initrd_offs")" \
--image-base="$(printf 0x%x "$base_image")" \
- "$uefi_stub" "${uefi_outdir}/linux.efi"; then
+ "$tmp_uefi_stub" "${uefi_outdir}/linux.efi"; then
if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then
if sbsign \
--key "${uefi_secureboot_key}" \
diff --git a/man/dracut.8.asc b/man/dracut.8.asc
index bfb86f5d..8339e8a9 100644
--- a/man/dracut.8.asc
+++ b/man/dracut.8.asc
@@ -600,6 +600,11 @@ and no /etc/cmdline/*.conf will be generated into the initramfs.
default is _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or
_/boot/vmlinuz-<KERNEL-VERSION>_.
+**--sbat <parameters>**::
+ Specifies the SBAT parameters, which to include in the UEFI executable. By default
+ the default SBAT string added is "sbat,1,SBAT Version,sbat,1,
+ https://github.com/rhboot/shim/blob/main/SBAT.md".
+
**--enhanced-cpio**::
Attempt to use the dracut-cpio binary, which optimizes archive creation for
copy-on-write filesystems by using the copy_file_range(2) syscall via Rust's
diff --git a/man/dracut.conf.5.asc b/man/dracut.conf.5.asc
index 96c80129..132ca8e3 100644
--- a/man/dracut.conf.5.asc
+++ b/man/dracut.conf.5.asc
@@ -299,6 +299,11 @@ Logging levels:
default is _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or
_/boot/vmlinuz-<KERNEL-VERSION>_.
+*sbat=*"__parameters__"::
+ Specifies the SBAT parameters, which to include in the UEFI executable. By default
+ the default SBAT string added is "sbat,1,SBAT Version,sbat,1,
+ https://github.com/rhboot/shim/blob/main/SBAT.md".
+
*enhanced_cpio=*"__{yes|no}__"::
Attempt to use the dracut-cpio binary, which optimizes archive creation for
copy-on-write filesystems (default=no).
diff --git a/shell-completion/bash/dracut b/shell-completion/bash/dracut
index 86de2071..9b51db01 100644
--- a/shell-completion/bash/dracut
+++ b/shell-completion/bash/dracut
@@ -46,7 +46,7 @@ _dracut() {
--kernel-cmdline --sshkey --persistent-policy --install-optional
--loginstall --uefi-stub --kernel-image --squash-compressor
--sysroot --hostonly-mode --hostonly-nics --include --logfile
- --uefi-splash-image
+ --uefi-splash-image --sbat
'
)

@ -1,28 +0,0 @@
From 50df5d09d5f27889ebed61011b35ce3eef687288 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Thu, 1 Sep 2022 11:47:09 +0200
Subject: [PATCH] feat(systemd): install systemd-sysroot-fstab-check
systemd-sysroot-fstab-check is a symlink to systemd-fstab-generator added in
systemd commit https://github.com/systemd/systemd/commit/cd7ad0cb
(cherry picked from commit 23684e4a2bb024595ad63d9f49d83b4693537110)
Resolves: RHEL-12409
---
modules.d/00systemd/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index 433e4758..2a4fe4ba 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -43,6 +43,7 @@ install() {
"$systemdutildir"/systemd-modules-load \
"$systemdutildir"/systemd-vconsole-setup \
"$systemdutildir"/systemd-volatile-root \
+ "$systemdutildir"/systemd-sysroot-fstab-check \
"$systemdutildir"/system-generators/systemd-debug-generator \
"$systemdutildir"/system-generators/systemd-fstab-generator \
"$systemdutildir"/system-generators/systemd-gpt-auto-generator \

@ -1,41 +0,0 @@
From 4c75e51c585eebd9bc175920aa8c8b4afe808144 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Wed, 20 Sep 2023 14:56:41 +0200
Subject: [PATCH] fix(dracut.spec): add jq dependency to network subpackage
and also move nvmf module to network subpackage.
Resolves: RHEL-15012
---
pkgbuild/dracut.spec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pkgbuild/dracut.spec b/pkgbuild/dracut.spec
index 1996f44d..bd850986 100644
--- a/pkgbuild/dracut.spec
+++ b/pkgbuild/dracut.spec
@@ -111,6 +111,7 @@ Requires: %{name} = %{version}-%{release}
%endif
Requires: iputils
Requires: iproute
+Requires: jq
Requires: (NetworkManager >= 1.20 or dhclient)
Suggests: NetworkManager
Obsoletes: dracut-generic < 008
@@ -369,7 +370,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{dracutlibdir}/modules.d/95fstab-sys
%{dracutlibdir}/modules.d/95hwdb
%{dracutlibdir}/modules.d/95lunmask
-%{dracutlibdir}/modules.d/95nvmf
%{dracutlibdir}/modules.d/95resume
%{dracutlibdir}/modules.d/95rootfs-block
%{dracutlibdir}/modules.d/95terminfo
@@ -441,6 +441,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{dracutlibdir}/modules.d/95iscsi
%{dracutlibdir}/modules.d/95nbd
%{dracutlibdir}/modules.d/95nfs
+%{dracutlibdir}/modules.d/95nvmf
%{dracutlibdir}/modules.d/95ssh-client
%ifarch s390 s390x
%{dracutlibdir}/modules.d/95znet

@ -1,56 +0,0 @@
From 8e933e8c8208ce16a79661379420e450b7f4a778 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Wed, 7 Jun 2023 22:12:45 +0200
Subject: [PATCH] fix(fcoe-uefi): exit early on empty vlan
Exit early in case get_fcoe_boot_vlan exits with error or just an empty string,
instead of producing invalid config entry.
(Cherry-picked commit: 45fc8df1cf3fdf9726efda4d26c7cccb9e6aedd2
PR: https://github.com/dracutdevs/dracut/pull/2379)
Resolves: RHEL-14251
---
modules.d/95fcoe-uefi/parse-uefifcoe.sh | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/modules.d/95fcoe-uefi/parse-uefifcoe.sh b/modules.d/95fcoe-uefi/parse-uefifcoe.sh
index e120dec3..b341c963 100755
--- a/modules.d/95fcoe-uefi/parse-uefifcoe.sh
+++ b/modules.d/95fcoe-uefi/parse-uefifcoe.sh
@@ -9,19 +9,22 @@ print_fcoe_uefi_conf() {
mac=$(get_fcoe_boot_mac "$1")
[ -z "$mac" ] && return 1
dev=$(set_ifname fcoe "$mac")
- vlan=$(get_fcoe_boot_vlan "$1")
- if [ "$vlan" -ne "0" ]; then
- case "$vlan" in
- [0-9]*)
- printf "%s\n" "vlan=$dev.$vlan:$dev"
- dev="$dev.$vlan"
- ;;
- *)
- printf "%s\n" "vlan=$vlan:$dev"
- dev="$vlan"
- ;;
- esac
- fi
+ vlan=$(get_fcoe_boot_vlan "$1") || return 1
+ case "$vlan" in
+ "0") ;;
+
+ '')
+ return 1
+ ;;
+ [0-9]*)
+ printf "%s\n" "vlan=$dev.$vlan:$dev"
+ dev="$dev.$vlan"
+ ;;
+ *)
+ printf "%s\n" "vlan=$vlan:$dev"
+ dev="$vlan"
+ ;;
+ esac
# fcoe=eth0:nodcb
printf "fcoe=%s\n" "$dev:nodcb"
return 0

@ -1,49 +0,0 @@
From 4a93a6e1dab779b05f3f68c6d803a6f24dc44a02 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Mon, 14 Aug 2023 12:28:11 +0200
Subject: [PATCH] fix(dracut.sh): remove microcode check based on
CONFIG_MICROCODE_[AMD|INTEL]
`CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since
https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore
this check is wrong and early microcode is always disabled.
(Cherry-picked commit: 61b9cd16e049434597e398be61a47e0112382c5b)
Resolves: RHEL-17902
---
dracut.sh | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index 0bac6a33..778eefd7 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1489,23 +1489,20 @@ fi
if [[ $early_microcode == yes ]]; then
if [[ $hostonly ]]; then
- if [[ $(get_cpu_vendor) == "AMD" ]]; then
- check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode
- elif [[ $(get_cpu_vendor) == "Intel" ]]; then
- check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode
+ if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then
+ check_kernel_config CONFIG_MICROCODE || unset early_microcode
else
unset early_microcode
fi
else
- ! check_kernel_config CONFIG_MICROCODE_AMD \
- && ! check_kernel_config CONFIG_MICROCODE_INTEL \
+ ! check_kernel_config CONFIG_MICROCODE \
&& unset early_microcode
fi
# Do not complain on non-x86 architectures as it makes no sense
case $(uname -m) in
x86_64 | i?86)
[[ $early_microcode != yes ]] \
- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y"
+ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y"
;;
*) ;;
esac

@ -1,77 +0,0 @@
From 4c46806a793d66a188c4e9b40e74f6c371ac5b8a Mon Sep 17 00:00:00 2001
From: runsisi <runsisi@hust.edu.cn>
Date: Sat, 6 Aug 2022 10:15:48 +0800
Subject: [PATCH] fix(dracut-install): use stripped kernel module path as hash
key
in install_dependent_modules we use &path[kerneldirlen] as the key for inserting,
let's do the same for checking.
otherwise installing kernel module has circular dependency from a custom kernel
module directory will cause infinite recursion and segfault.
$ grep ipmi kbuilt/lib/modules/5.10.121/modules.dep
kernel/drivers/char/ipmi/ipmi_msghandler.ko:
kernel/drivers/char/ipmi/ipmi_devintf.ko: kernel/drivers/char/ipmi/ipmi_msghandler.ko
$ grep ipmi kbuilt/lib/modules/5.10.121/modules.softdep
softdep ipmi_msghandler post: ipmi_devintf
$ ./dracut-install -D /tmp --kerneldir ~/working/kernel/linux-5.10.121/kbuilt/lib/modules/5.10.121 -m ipmi-devintf
Segmentation fault (core dumped)
(gdb) b install_dependent_modules
Breakpoint 1 at 0x7db0: file src/install/dracut-install.c, line 1513.
(gdb) bt
#0 install_dependent_modules (modlist=0x0) at src/install/dracut-install.c:1513
#1 0x000055555555c027 in install_dependent_modules (modlist=modlist@entry=0x555555579e90) at src/install/dracut-install.c:1553
#2 0x000055555555bf1c in install_dependent_modules (modlist=0x5555555799d0) at src/install/dracut-install.c:1548
#3 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557a3f0) at src/install/dracut-install.c:1554
#4 0x000055555555bf1c in install_dependent_modules (modlist=0x555555579d60) at src/install/dracut-install.c:1548
#5 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557b170) at src/install/dracut-install.c:1554
#6 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557a0f0) at src/install/dracut-install.c:1548
#7 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555575320) at src/install/dracut-install.c:1554
#8 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557ab30) at src/install/dracut-install.c:1548
#9 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557dd60) at src/install/dracut-install.c:1554
#10 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b640) at src/install/dracut-install.c:1548
#11 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e0f0) at src/install/dracut-install.c:1554
#12 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b9d0) at src/install/dracut-install.c:1548
#13 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574340) at src/install/dracut-install.c:1554
#14 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557cf70) at src/install/dracut-install.c:1548
#15 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x5555555768d0) at src/install/dracut-install.c:1554
#16 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557d750) at src/install/dracut-install.c:1548
#17 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e700) at src/install/dracut-install.c:1554
#18 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557de90) at src/install/dracut-install.c:1548
#19 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555581c90) at src/install/dracut-install.c:1554
#20 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571e60) at src/install/dracut-install.c:1548
#21 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b620) at src/install/dracut-install.c:1554
#22 0x000055555555bf1c in install_dependent_modules (modlist=0x555555583000) at src/install/dracut-install.c:1548
#23 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b640) at src/install/dracut-install.c:1554
#24 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571b40) at src/install/dracut-install.c:1548
#25 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574100) at src/install/dracut-install.c:1554
#26 0x000055555555c4b0 in install_module (mod=mod@entry=0x555555573bc0) at src/install/dracut-install.c:1617
#27 0x000055555555c93d in install_modules (argc=argc@entry=1, argv=argv@entry=0x7fffffffd6e0) at src/install/dracut-install.c:1952
#28 0x000055555555862a in main (argc=<optimized out>, argv=0x7fffffffd6a8) at src/install/dracut-install.c:2090
Signed-off-by: runsisi <runsisi@hust.edu.cn>
(Cherry-picked commit: 7bb1f64b972586d86d82fcb23de4b979eab0ddfe)
Resolves: RHEL-15821
---
src/install/dracut-install.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
index 6025bd67..997d62d3 100644
--- a/src/install/dracut-install.c
+++ b/src/install/dracut-install.c
@@ -1522,7 +1522,7 @@ static int install_dependent_modules(struct kmod_list *modlist)
if (check_hashmap(items_failed, path))
return -1;
- if (check_hashmap(items, path)) {
+ if (check_hashmap(items, &path[kerneldirlen])) {
continue;
}

@ -1,31 +0,0 @@
From 2dcfc99c645aaeef3811e5278c399e4f78d9ce4c Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <frantisek@sumsal.cz>
Date: Sat, 14 Oct 2023 23:45:57 +0200
Subject: [PATCH] feat(systemd): install systemd-executor
In [0] systemd gained a new binary - systemd-executor - that's used to
spawn processes forked off systemd. Let's copy it into the initrd if
it's available.
[0] https://github.com/systemd/systemd/pull/27890
(cherry picked from commit bee1c4824a8cd47ce6c01892a548bdc07b1fa678)
Related: RHEL-30581
---
modules.d/00systemd/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index 2a4fe4ba..a4397249 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -34,6 +34,7 @@ install() {
"$systemdutildir"/systemd \
"$systemdutildir"/systemd-coredump \
"$systemdutildir"/systemd-cgroups-agent \
+ "$systemdutildir"/systemd-executor \
"$systemdutildir"/systemd-shutdown \
"$systemdutildir"/systemd-reply-password \
"$systemdutildir"/systemd-fsck \

@ -1,124 +0,0 @@
From 92bda68884b321195436729b7fcf19ada342c0a9 Mon Sep 17 00:00:00 2001
From: Laszlo Gombos <laszlo.gombos@gmail.com>
Date: Thu, 10 Nov 2022 14:20:42 +0000
Subject: [PATCH] test: use -device instead of -watchdog to remove qemu
warnings
(cherry picked from commit 9f6b4e53367be20b2295b77800c73b2614530559)
Related: RHEL-30581
---
test/TEST-01-BASIC/test.sh | 2 +-
test/TEST-03-USR-MOUNT/test.sh | 2 +-
test/TEST-20-NFS/test.sh | 4 ++--
test/TEST-50-MULTINIC/test.sh | 4 ++--
test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh | 4 ++--
test/TEST-63-DRACUT-CPIO/test.sh | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
index 390089b6..9f98af2c 100755
--- a/test/TEST-01-BASIC/test.sh
+++ b/test/TEST-01-BASIC/test.sh
@@ -17,7 +17,7 @@ test_run() {
"$testdir"/run-qemu \
"${disk_args[@]}" \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot \"root=LABEL= rdinit=/bin/sh\" rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
index 5cb61bce..57157bc0 100755
--- a/test/TEST-03-USR-MOUNT/test.sh
+++ b/test/TEST-03-USR-MOUNT/test.sh
@@ -25,7 +25,7 @@ client_run() {
"$testdir"/run-qemu \
"${disk_args[@]}" \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts loglevel=7 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
-initrd "$TESTDIR"/initramfs.testing || return 1
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
index 0be60a80..0821dc84 100755
--- a/test/TEST-20-NFS/test.sh
+++ b/test/TEST-20-NFS/test.sh
@@ -33,7 +33,7 @@ run_server() {
-net socket,listen=127.0.0.1:12320 \
-net nic,macaddr=52:54:00:12:34:56,model=e1000 \
-serial "${SERIAL:-"file:$TESTDIR/server.log"}" \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-append "panic=1 oops=panic softlockup_panic=1 root=LABEL=dracut rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
-initrd "$TESTDIR"/initramfs.server \
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
@@ -78,7 +78,7 @@ client_test() {
"${disk_args[@]}" \
-net nic,macaddr="$mac",model=e1000 \
-net socket,connect=127.0.0.1:12320 \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=10 quiet ro console=ttyS0,115200n81 selinux=0" \
-initrd "$TESTDIR"/initramfs.testing
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
index 81b1f685..47408983 100755
--- a/test/TEST-50-MULTINIC/test.sh
+++ b/test/TEST-50-MULTINIC/test.sh
@@ -31,7 +31,7 @@ run_server() {
-net socket,listen=127.0.0.1:12350 \
-net nic,macaddr=52:54:01:12:34:56,model=e1000 \
-serial "${SERIAL:-"file:$TESTDIR/server.log"}" \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
-initrd "$TESTDIR"/initramfs.server \
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
@@ -85,7 +85,7 @@ client_test() {
-netdev hubport,id=n2,hubid=2 \
-device e1000,netdev=n1,mac=52:54:00:12:34:98 \
-device e1000,netdev=n2,mac=52:54:00:12:34:99 \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-append "quiet panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console" \
-initrd "$TESTDIR"/initramfs.testing || return 1
diff --git a/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh b/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
index 309600d4..8f9f0cfd 100755
--- a/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
+++ b/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
@@ -35,7 +35,7 @@ run_server() {
-device virtio-net-pci,netdev=n3,mac=52:54:01:12:34:59 \
-hda "$TESTDIR"/server.ext3 \
-serial "${SERIAL:-"file:$TESTDIR/server.log"}" \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-append "panic=1 oops=panic softlockup_panic=1 loglevel=7 root=LABEL=dracut rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \
-initrd "$TESTDIR"/initramfs.server \
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
@@ -90,7 +90,7 @@ client_test() {
-netdev socket,connect=127.0.0.1:12372,id=n2 -device virtio-net-pci,mac=52:54:00:12:34:04,netdev=n2 \
"${nic3[@]}" -device virtio-net-pci,mac=52:54:00:12:34:05,netdev=n3 \
-hda "$TESTDIR"/client.img \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-append "
panic=1 oops=panic softlockup_panic=1
ifname=net1:52:54:00:12:34:01
diff --git a/test/TEST-63-DRACUT-CPIO/test.sh b/test/TEST-63-DRACUT-CPIO/test.sh
index 8e319bf2..be93cfb5 100755
--- a/test/TEST-63-DRACUT-CPIO/test.sh
+++ b/test/TEST-63-DRACUT-CPIO/test.sh
@@ -39,7 +39,7 @@ EOF
|| return 1
"$testdir"/run-qemu \
- -watchdog i6300esb -watchdog-action poweroff \
+ -device i6300esb -watchdog-action poweroff \
-daemonize -pidfile "$tdir/vm.pid" \
-serial "file:$tdir/console.out" \
-append "panic=1 oops=panic softlockup_panic=1 loglevel=7 console=ttyS0 rd.shell=1" \

@ -1,52 +0,0 @@
From 55108a3a24a1780f6d5273a3e97dbdeb7d2c75c0 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Thu, 23 May 2024 14:20:43 +0200
Subject: [PATCH] fix(fips): remove /dev/{random,urandom} pre-creation
Random device nodes were required to workaround libgcrypt initialization
problem (see https://bugzilla.redhat.com/show_bug.cgi?id=1401444) which
is gone since libgcrypt-1.10 (2022): modern Linux kernels (3.17+) support
getrandom() syscall and libgcrypt has switch to using getentropy()
(glibc-2.25+).
The requirement to run dracut as root (which is needed to mknod
/dev/{random,urandom}) is a particular problem for building UKIs in distro
build systems where packages are not built by a privileged user.
Note, dracut itself always pre-creates /dev/{null,kmsg,console,random,urandom}
devices when running privileged so the patch has no effect on 'traditional'
setup.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
(Cherry-picked commit: 62f907e9eb3147ad8603953ec3cf29673d4fae79)
Resolves: RHEL-38830
---
modules.d/01fips/module-setup.sh | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
index 7ff5e640..1dc7ea33 100755
--- a/modules.d/01fips/module-setup.sh
+++ b/modules.d/01fips/module-setup.sh
@@ -70,18 +70,6 @@ install() {
inst_multiple sha512hmac rmmod insmod mount uname umount grep sed sort
inst_simple /etc/system-fips
- [ -c "${initdir}"/dev/random ] || mknod "${initdir}"/dev/random c 1 8 \
- || {
- dfatal "Cannot create /dev/random"
- dfatal "To create an initramfs with fips support, dracut has to run as root"
- return 1
- }
- [ -c "${initdir}"/dev/urandom ] || mknod "${initdir}"/dev/urandom c 1 9 \
- || {
- dfatal "Cannot create /dev/urandom"
- dfatal "To create an initramfs with fips support, dracut has to run as root"
- return 1
- }
# if we have openssl we need to install their fips library and configuration
[ -x /usr/bin/openssl ] && {

@ -1,25 +0,0 @@
From 99c1c91a3b1f7c0ba417ecdea4cab8f1a424fabe Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Fri, 29 Nov 2019 13:29:23 +0100
Subject: [PATCH] fix(systemd): always include sg module
RHEL-only
Resolves: RHEL-32853
---
modules.d/00systemd/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index a4397249..27d2180d 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -17,7 +17,7 @@ depends() {
}
installkernel() {
- hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256
+ hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256 sg
instmods -s efivarfs
}

@ -1,149 +0,0 @@
From ab2711df3d85aee7fe5c9cbe018c1a08113e3481 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Wed, 23 Nov 2022 14:22:21 +0100
Subject: [PATCH] fix(fips): do not blindly remove /boot
The `mount_boot` method called from fips-noboot.sh in the pre-pivot hook blindly
executes `rm -rf /boot` if there is no `boot=` command line parameter, without
first checking that /boot is not already mounted by other means.
feat(fips): add progress messages
This allows to better understand at what point a FIPS integrity test failed.
Signed-off-by: Raymund Will <rw@suse.com>
fix(fips): only unmount /boot if it was mounted by the fips module
The `do_fips` method should only unmount /boot if it was mounted in the
`mount_boot` method.
In addition, now the `mount_boot` method checks if /boot is already mounted.
Signed-off-by: Raymund Will <rw@suse.com>
fix(fips): move fips-boot script to pre-pivot
This is needed in s390x to be able to use the same `boot=` command line
parameter in grub and zipl. Otherwise, `boot=` would need to be added only to
`grub.cfg` (not `/etc/default/grub` and thereby not to `/boot/zipl/config`).
Signed-off-by: Raymund Will <rw@suse.com>
(Cherry-picked commits:
91974e8ff116c7fd9f99963780dba501535700f5
a71e518fa1f14a9b96ae62ce90714ccd7d307d97
1cdb4cb8b5fb7f74e5be6998f9b561fbf73909e0
cd2a1d4571b2f768f2b67d03fd77191795042402)
Resolves: RHEL-45913
---
modules.d/01fips/fips-boot.sh | 2 ++
modules.d/01fips/fips-load-crypto.sh | 2 ++
modules.d/01fips/fips-noboot.sh | 2 ++
modules.d/01fips/fips.sh | 21 +++++++++++++++++++--
modules.d/01fips/module-setup.sh | 2 +-
5 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/modules.d/01fips/fips-boot.sh b/modules.d/01fips/fips-boot.sh
index 031d169a..34760e01 100755
--- a/modules.d/01fips/fips-boot.sh
+++ b/modules.d/01fips/fips-boot.sh
@@ -8,7 +8,9 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
elif getarg boot= > /dev/null; then
. /sbin/fips.sh
+ fips_info "fips-boot: start"
if mount_boot; then
do_fips || die "FIPS integrity test failed"
fi
+ fips_info "fips-boot: done!"
fi
diff --git a/modules.d/01fips/fips-load-crypto.sh b/modules.d/01fips/fips-load-crypto.sh
index 21e99278..6ef42b95 100644
--- a/modules.d/01fips/fips-load-crypto.sh
+++ b/modules.d/01fips/fips-load-crypto.sh
@@ -8,5 +8,7 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
else
. /sbin/fips.sh
+ fips_info "fips-load-crypto: start"
fips_load_crypto || die "FIPS integrity test failed"
+ fips_info "fips-load-crypto: done!"
fi
diff --git a/modules.d/01fips/fips-noboot.sh b/modules.d/01fips/fips-noboot.sh
index f00c2f32..963a034d 100755
--- a/modules.d/01fips/fips-noboot.sh
+++ b/modules.d/01fips/fips-noboot.sh
@@ -8,6 +8,8 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
elif ! [ -f /tmp/fipsdone ]; then
. /sbin/fips.sh
+ fips_info "fips-noboot: start"
mount_boot
do_fips || die "FIPS integrity test failed"
+ fips_info "fips-noboot: done!"
fi
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
index 6ad61df8..05631c8a 100755
--- a/modules.d/01fips/fips.sh
+++ b/modules.d/01fips/fips.sh
@@ -18,6 +18,15 @@ mount_boot() {
boot=$(getarg boot=)
if [ -n "$boot" ]; then
+ if [ -d /boot ] && ismounted /boot; then
+ boot_dev=
+ if command -v findmnt > /dev/null; then
+ boot_dev=$(findmnt -n -o SOURCE /boot)
+ fi
+ fips_info "Ignoring 'boot=$boot' as /boot is already mounted ${boot_dev:+"from '$boot_dev'"}"
+ return 0
+ fi
+
case "$boot" in
LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*)
boot="$(label_uuid_to_dev "$boot")"
@@ -47,10 +56,13 @@ mount_boot() {
mkdir -p /boot
fips_info "Mounting $boot as /boot"
mount -oro "$boot" /boot || return 1
- elif [ -d "$NEWROOT/boot" ]; then
+ FIPS_MOUNTED_BOOT=1
+ elif ! ismounted /boot && [ -d "$NEWROOT/boot" ]; then
# shellcheck disable=SC2114
rm -fr -- /boot
ln -sf "$NEWROOT/boot" /boot
+ else
+ die "You have to specify boot=<boot device> as a boot option for fips=1"
fi
}
@@ -179,7 +191,12 @@ do_fips() {
: > /tmp/fipsdone
- umount /boot > /dev/null 2>&1
+ if [ "$FIPS_MOUNTED_BOOT" = 1 ]; then
+ fips_info "Unmounting /boot"
+ umount /boot > /dev/null 2>&1
+ else
+ fips_info "Not unmounting /boot"
+ fi
return 0
}
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
index 1dc7ea33..91612ff3 100755
--- a/modules.d/01fips/module-setup.sh
+++ b/modules.d/01fips/module-setup.sh
@@ -62,7 +62,7 @@ installkernel() {
# called by dracut
install() {
- inst_hook pre-mount 01 "$moddir/fips-boot.sh"
+ inst_hook pre-pivot 00 "$moddir/fips-boot.sh"
inst_hook pre-pivot 01 "$moddir/fips-noboot.sh"
inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh"
inst_script "$moddir/fips.sh" /sbin/fips.sh

@ -1,263 +0,0 @@
From c8bc80643d4a6c0ef27c48e680907d6fd3c888cc Mon Sep 17 00:00:00 2001
From: Jan Macku <jamacku@redhat.com>
Date: Mon, 12 Feb 2024 16:58:16 +0100
Subject: [PATCH] ci: enable source-git automation
- commit validation
- pull request validation
- tracker validation
- automatic merging
rhel-only
Related: RHEL-30581
---
.github/advanced-commit-linter.yml | 17 ++++++
.github/auto-merge.yml | 4 ++
.github/pull-request-validator.yml | 4 ++
.github/tracker-validator.yml | 28 +++++++++
.github/workflows/gather-metadata.yml | 28 +++++++++
.../workflows/source-git-automation-on-demand.yml | 70 ++++++++++++++++++++++
.github/workflows/source-git-automation.yml | 46 ++++++++++++++
7 files changed, 197 insertions(+)
diff --git a/.github/advanced-commit-linter.yml b/.github/advanced-commit-linter.yml
new file mode 100644
index 00000000..0180ef07
--- /dev/null
+++ b/.github/advanced-commit-linter.yml
@@ -0,0 +1,17 @@
+policy:
+ cherry-pick:
+ upstream:
+ - github: dracutdevs/dracut
+ exception:
+ note:
+ - rhel-only
+ - RHEL-only
+ tracker:
+ - keyword:
+ - 'Resolves: '
+ - 'Related: '
+ - 'Reverts: '
+ type: jira
+ issue-format:
+ - 'RHEL-\d+$'
+ url: 'https://issues.redhat.com/browse/'
diff --git a/.github/auto-merge.yml b/.github/auto-merge.yml
new file mode 100644
index 00000000..35c25392
--- /dev/null
+++ b/.github/auto-merge.yml
@@ -0,0 +1,4 @@
+labels:
+ dont-merge: dont-merge
+ manual-merge: pr/needs-manual-merge
+target-branch': ['main']
diff --git a/.github/pull-request-validator.yml b/.github/pull-request-validator.yml
new file mode 100644
index 00000000..4bb5bbec
--- /dev/null
+++ b/.github/pull-request-validator.yml
@@ -0,0 +1,4 @@
+labels:
+ missing-review: pr/needs-review
+ changes-requested: pr/changes-requested
+ missing-failing-ci: pr/needs-ci
diff --git a/.github/tracker-validator.yml b/.github/tracker-validator.yml
new file mode 100644
index 00000000..f88cc0a5
--- /dev/null
+++ b/.github/tracker-validator.yml
@@ -0,0 +1,28 @@
+labels:
+ missing-tracker: tracker/missing
+ invalid-product: tracker/invalid-product
+ invalid-component: tracker/invalid-component
+ unapproved: tracker/unapproved
+products:
+ - Red Hat Enterprise Linux 9
+ - CentOS Stream 9
+ - rhel-9.0.0
+ - rhel-9.0.0.z
+ - rhel-9.2.0
+ - rhel-9.2.0.z
+ - rhel-9.3.0
+ - rhel-9.3.0.z
+ - rhel-9.4.0
+ - rhel-9.4.0.z
+ - rhel-9.5.0
+ - rhel-9.5.0.z
+ - rhel-9.6.0
+ - rhel-9.6.0.z
+ - rhel-9.7.0
+ - rhel-9.7.0.z
+ - rhel-9.8.0
+ - rhel-9.8.0.z
+ - rhel-9.9.0
+ - rhel-9.9.0.z
+ - rhel-9.10.0
+ - rhel-9.10.0.z
diff --git a/.github/workflows/gather-metadata.yml b/.github/workflows/gather-metadata.yml
new file mode 100644
index 00000000..e4cbc486
--- /dev/null
+++ b/.github/workflows/gather-metadata.yml
@@ -0,0 +1,28 @@
+name: Gather Pull Request Metadata
+on:
+ pull_request:
+ types: [ opened, reopened, synchronize ]
+ branches:
+ - main
+ - rhel-9.*
+
+permissions:
+ contents: read
+
+jobs:
+ gather-metadata:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Repository checkout
+ uses: actions/checkout@v4
+
+ - id: Metadata
+ name: Gather Pull Request Metadata
+ uses: redhat-plumbers-in-action/gather-pull-request-metadata@v1
+
+ - name: Upload artifact with gathered metadata
+ uses: actions/upload-artifact@v3
+ with:
+ name: pr-metadata
+ path: ${{ steps.Metadata.outputs.metadata-file }}
diff --git a/.github/workflows/source-git-automation-on-demand.yml b/.github/workflows/source-git-automation-on-demand.yml
new file mode 100644
index 00000000..8a3a366e
--- /dev/null
+++ b/.github/workflows/source-git-automation-on-demand.yml
@@ -0,0 +1,70 @@
+name: Source git Automation Scheduled/On Demand
+on:
+ schedule:
+ # Workflow runs every 45 minutes
+ - cron: '*/45 * * * *'
+ workflow_dispatch:
+ inputs:
+ pr-number:
+ description: 'Pull Request number/s ; when not provided, the workflow will run for all open PRs'
+ required: true
+ default: '0'
+
+permissions:
+ contents: read
+
+jobs:
+ # Get all open PRs
+ gather-pull-requests:
+ if: github.repository == 'redhat-plumbers/dracut-rhel9'
+ runs-on: ubuntu-latest
+
+ outputs:
+ pr-numbers: ${{ steps.get-pr-numbers.outputs.result }}
+ pr-numbers-manual: ${{ steps.parse-manual-input.outputs.result }}
+
+ steps:
+ - id: get-pr-numbers
+ if: inputs.pr-number == '0'
+ name: Get all open PRs
+ uses: actions/github-script@v6
+ with:
+ # !FIXME: this is not working if there is more than 100 PRs opened
+ script: |
+ const { data: pullRequests } = await github.rest.pulls.list({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ state: 'open',
+ per_page: 100
+ });
+ return pullRequests.map(pr => pr.number);
+ - id: parse-manual-input
+ if: inputs.pr-number != '0'
+ name: Parse manual input
+ run: |
+ echo "result="[ ${{ inputs.pr-number }} ]"" >> $GITHUB_OUTPUT
+ shell: bash
+
+ validate-pr:
+ name: 'Validation of Pull Request #${{ matrix.pr-number }}'
+ needs: [ gather-pull-requests ]
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ pr-number: ${{ inputs.pr-number == 0 && fromJSON(needs.gather-pull-requests.outputs.pr-numbers) || fromJSON(needs.gather-pull-requests.outputs.pr-numbers-manual) }}
+
+ permissions:
+ # required for merging PRs
+ contents: write
+ # required for PR comments and setting labels
+ pull-requests: write
+
+ steps:
+ - name: Source-git Automation
+ uses: redhat-plumbers-in-action/source-git-automation@v1
+ with:
+ pr-number: ${{ matrix.pr-number }}
+ jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
+ token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/source-git-automation.yml b/.github/workflows/source-git-automation.yml
new file mode 100644
index 00000000..025ee84d
--- /dev/null
+++ b/.github/workflows/source-git-automation.yml
@@ -0,0 +1,46 @@
+name: Source git Automation
+on:
+ workflow_run:
+ workflows: [ Gather Pull Request Metadata ]
+ types:
+ - completed
+
+permissions:
+ contents: read
+
+jobs:
+ download-metadata:
+ if: >
+ github.event.workflow_run.event == 'pull_request' &&
+ github.event.workflow_run.conclusion == 'success' &&
+ github.repository == 'redhat-plumbers/dracut-rhel9'
+ runs-on: ubuntu-latest
+
+ outputs:
+ pr-metadata: ${{ steps.Artifact.outputs.pr-metadata-json }}
+
+ steps:
+ - id: Artifact
+ name: Download Artifact
+ uses: redhat-plumbers-in-action/download-artifact@v1
+ with:
+ name: pr-metadata
+
+ source-git-automation:
+ needs: [ download-metadata ]
+ runs-on: ubuntu-latest
+
+ permissions:
+ # required for merging PRs
+ contents: write
+ # required for PR comments and setting labels
+ pull-requests: write
+
+
+ steps:
+ - name: Source-git Automation
+ uses: redhat-plumbers-in-action/source-git-automation@v1
+ with:
+ pr-metadata: ${{ needs.download-metadata.outputs.pr-metadata }}
+ jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
+ token: ${{ secrets.GITHUB_TOKEN }}

@ -1,679 +0,0 @@
From 30e7e5091666e10cce70b90057ccd85289609bd7 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Tue, 2 Jan 2024 17:10:11 +0100
Subject: [PATCH] fix(github): update format of labeler
Since we are using `actions/labeler@main`, its format changed, displaying the
following error with every new PR:
```
Run actions/labeler@main
The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api
Error: Error: found unexpected type for label 'repository' (should be array of config options)
Error: found unexpected type for label 'repository' (should be array of config options)
```
(cherry picked from commit de8ac6300d115a05d467dbb6b9a7c2599a2d306f)
Related: RHEL-30581
---
.github/labeler.yml | 460 ++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 358 insertions(+), 102 deletions(-)
diff --git a/.github/labeler.yml b/.github/labeler.yml
index 1c787a58..0dcc06d4 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -1,293 +1,549 @@
repository:
- - ./*
+ - changed-files:
+ - any-glob-to-any-file: './*'
github:
- - .github/*
- - .github/**/*
+ - changed-files:
+ - any-glob-to-any-file: ['.github/*', '.github/**/*']
+
+docs:
+ - changed-files:
+ - any-glob-to-any-file: 'docs/*'
+
+man:
+ - changed-files:
+ - any-glob-to-any-file: 'man/*'
+
+kernel-install:
+ - changed-files:
+ - any-glob-to-any-file: 'install.d/*'
+
+shell-completion:
+ - changed-files:
+ - any-glob-to-any-file: ['shell-completion/*', 'shell-completion/**/*']
+
+dracut-cpio:
+ - changed-files:
+ - any-glob-to-any-file: ['src/dracut-cpio/*', 'src/dracut-cpio/**/*']
dracut-install:
- - install/*
- - install/**/*
+ - changed-files:
+ - any-glob-to-any-file: 'src/install/*'
+
+dracut-util:
+ - changed-files:
+ - any-glob-to-any-file: 'src/util/*'
-example:
- - examples/*
- - examples/**/*
- - examples/**/**/*
+logtee:
+ - changed-files:
+ - any-glob-to-any-file: 'src/logtee/*'
+
+skipcpio:
+ - changed-files:
+ - any-glob-to-any-file: 'src/skipcpio/*'
modules:
- - modules.d/*
- - modules.d/**/*
+ - changed-files:
+ - any-glob-to-any-file: ['modules.d/*', 'modules.d/**/*']
bash:
- - modules.d/00bash/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/00bash/*'
bootchart:
- modules.d/00bootchart/*
dash:
- - modules.d/00dash/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/00dash/*'
mksh:
- - modules.d/00mksh/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/00mksh/*'
systemd:
- - modules.d/00systemd/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/00systemd/*'
warpclock:
- - modules.d/00warpclock/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/00warpclock/*'
fips:
- - modules.d/01fips/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01fips/*'
+
+systemd-ac-power:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-ac-power/*'
+
+systemd-ask-password:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-ask-password/*'
+
+systemd-coredump:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-coredump/*'
+
+systemd-creds:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-creds/*'
+
+systemd-hostnamed:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-hostnamed/*'
systemd-initrd:
- - modules.d/01systemd-initrd/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-initrd/*'
-caps:
- - modules.d/02caps/*
+systemd-integritysetup:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-integritysetup/*'
+
+systemd-journald:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-journald/*'
+
+systemd-ldconfig:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-ldconfig/*'
+
+systemd-modules-load:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-modules-load/*'
systemd-networkd:
- - modules.d/02systemd-networkd/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-networkd/*'
+
+systemd-pcrphase:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-pcrphase/*'
+
+systemd-portabled:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-portabled/*'
+
+systemd-pstore:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-pstore/*'
+
+systemd-repart:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-repart/*'
+
+systemd-resolved:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-resolved/*'
+
+systemd-sysctl:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-sysctl/*'
+
+systemd-sysext:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-sysext/*'
+
+systemd-sysusers:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-sysusers/*'
+
+systemd-timedated:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-timedated/*'
+
+systemd-timesyncd:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-timesyncd/*'
+
+systemd-tmpfiles:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-tmpfiles/*'
+
+systemd-udevd:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-udevd/*'
+
+systemd-veritysetup:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/01systemd-veritysetup/*'
+
+caps:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/02caps/*'
modsign:
- - modules.d/03modsign/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/03modsign/*'
rescue:
- - modules.d/03rescue/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/03rescue/*'
watchdog:
- - modules.d/04watchdog/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/04watchdog/*'
+
+watchdog-modules:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/04watchdog-modules/*'
busybox:
- - modules.d/05busybox/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/05busybox/*'
+
+dbus-broker:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/06dbus-broker/*'
+
+dbus-daemon:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/06dbus-daemon/*'
rngd:
- - modules.d/06rngd/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/06rngd/*'
+
+dbus:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/09dbus/*'
i18n:
- - modules.d/10i18n/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/10i18n/*'
convertfs:
- - modules.d/30convertfs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/30convertfs/*'
+
+connman:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/35connman/*'
network-legacy:
- - modules.d/35network-legacy/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/35network-legacy/*'
network-manager:
- - modules.d/35network-manager/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/35network-manager/*'
network:
- - modules.d/40network/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/40network/*'
ifcfg:
- - modules.d/45ifcfg/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/45ifcfg/*'
url-lib:
- - modules.d/45url-lib/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/45url-lib/*'
drm:
- - modules.d/50drm/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/50drm/*'
plymouth:
- - modules.d/50plymouth/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/50plymouth/*'
+
+bluetooth:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/62bluetooth/*'
cms:
- - modules.d/80cms/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/80cms/*'
lvmmerge:
- - modules.d/80lvmmerge/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/80lvmmerge/*'
+
+lvmthinpool-monitor:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/80lvmthinpool-monitor/*'
cio_ignore:
- - modules.d/81cio_ignore/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/81cio_ignore/*'
btrfs:
- - modules.d/90btrfs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90btrfs/*'
crypt:
- - modules.d/90crypt/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90crypt/*'
dm:
- - modules.d/90dm/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90dm/*'
dmraid:
- - modules.d/90dmraid/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90dmraid/*'
dmsquash-live:
- - modules.d/90dmsquash-live/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90dmsquash-live/*'
+
+dmsquash-live-autooverlay:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90dmsquash-live-autooverlay/*'
dmsquash-live-ntfs:
- - modules.d/90dmsquash-live-ntfs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90dmsquash-live-ntfs/*'
kernel-modules:
- - modules.d/90kernel-modules/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90kernel-modules/*'
kernel-modules-extra:
- - modules.d/90kernel-modules-extra/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90kernel-modules-extra/*'
kernel-network-modules:
- - modules.d/90kernel-network-modules/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90kernel-network-modules/*'
livenet:
- - modules.d/90livenet/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90livenet/*'
lvm:
- - modules.d/90lvm/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90lvm/*'
mdraid:
- - modules.d/90mdraid/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90mdraid/*'
multipath:
- - modules.d/90multipath/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90multipath/*'
nvdimm:
- - modules.d/90nvdimm/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90nvdimm/*'
+
+overlayfs:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90overlayfs/*'
ppcmac:
- - modules.d/90ppcmac/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90ppcmac/*'
qemu:
- - modules.d/90qemu/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90qemu/*'
qemu-net:
- - modules.d/90qemu-net/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/90qemu-net/*'
stratis:
- modules.d/90stratis/*
crypt-gpg:
- - modules.d/91crypt-gpg/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/91crypt-gpg/*'
crypt-loop:
- - modules.d/91crypt-loop/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/91crypt-loop/*'
+
+fido2:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/91fido2/*'
+
+pcsc:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/91pcsc/*'
+
+pkcs11:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/91pkcs11/*'
+
+tpm2-tss:
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/91tpm2-tss/*'
zipl:
- - modules.d/91zipl/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/91zipl/*'
cifs:
- - modules.d/95cifs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95cifs/*'
dasd:
- - modules.d/95dasd/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95dasd/*'
dasd_mod:
- - modules.d/95dasd_mod/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95dasd_mod/*'
dasd_rules:
- - modules.d/95dasd_rules/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95dasd_rules/*'
dcssblk:
- - modules.d/95dcssblk/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95dcssblk/*'
debug:
- - modules.d/95debug/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95debug/*'
fcoe:
- - modules.d/95fcoe/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95fcoe/*'
fcoe-uefi:
- - modules.d/95fcoe-uefi/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95fcoe-uefi/*'
fstab-sys:
- - modules.d/95fstab-sys/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95fstab-sys/*'
iscsi:
- - modules.d/95iscsi/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95iscsi/*'
lunmask:
- - modules.d/95lunmask/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95lunmask/*'
nbd:
- - modules.d/95nbd/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95nbd/*'
nfs:
- - modules.d/95nfs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95nfs/*'
nvmf:
- - modules.d/95nvmf/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95nvmf/*'
qeth_rules:
- - modules.d/95qeth_rules/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95qeth_rules/*'
resume:
- - modules.d/95resume/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95resume/*'
rootfs-block:
- - modules.d/95rootfs-block/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95rootfs-block/*'
ssh-client:
- - modules.d/95ssh-client/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95ssh-client/*'
terminfo:
- - modules.d/95terminfo/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95terminfo/*'
udev-rules:
- - modules.d/95udev-rules/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95udev-rules/*'
virtfs:
- - modules.d/95virtfs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95virtfs/*'
virtiofs:
- - modules.d/95virtiofs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95virtiofs/*'
zfcp:
- - modules.d/95zfcp/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95zfcp/*'
zfcp_rules:
- - modules.d/95zfcp_rules/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95zfcp_rules/*'
znet:
- - modules.d/95znet/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/95znet/*'
securityfs:
- - modules.d/96securityfs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/96securityfs/*'
biosdevname:
- - modules.d/97biosdevname/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/97biosdevname/*'
masterkey:
-- modules.d/97masterkey/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/97masterkey/*'
dracut-systemd:
- - modules.d/98dracut-systemd/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/98dracut-systemd/*'
ecryptfs:
- - modules.d/98ecryptfs/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/98ecryptfs/*'
integrity:
- - modules.d/98integrity/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/98integrity/*'
pollcdrom:
- - modules.d/98pollcdrom/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/98pollcdrom/*'
selinux:
- - modules.d/98selinux/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/98selinux/*'
syslog:
- - modules.d/98syslog/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/98syslog/*'
usrmount:
- - modules.d/98usrmount/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/98usrmount/*'
base:
- - modules.d/99base/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/99base/*'
fs-lib:
- - modules.d/99fs-lib/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/99fs-lib/*'
img-lib:
- - modules.d/99img-lib/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/99img-lib/*'
memstrack:
- - modules.d/99memstrack/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/99memstrack/*'
shutdown:
- - modules.d/99shutdown/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/99shutdown/*'
squash:
- - modules.d/99squash/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/99squash/*'
uefi-lib:
- - modules.d/99uefi-lib/*
+ - changed-files:
+ - any-glob-to-any-file: 'modules.d/99uefi-lib/*'
test:
- - test/*
- - test/**/*
+ - changed-files:
+ - any-glob-to-any-file: ['test/*', 'test/**/*', 'modules.d/80test*', 'modules.d/80test*/*']

@ -1,73 +0,0 @@
From 53ee0740d5913d20bf35f7613a12072fd2ebe0d0 Mon Sep 17 00:00:00 2001
From: Jan Macku <jamacku@redhat.com>
Date: Wed, 17 Jul 2024 15:45:31 +0200
Subject: [PATCH] ci: fix source-git automation
rhel-only
Related: RHEL-30581
---
.github/tracker-validator.yml | 28 +++++++++++-----------
.../workflows/source-git-automation-on-demand.yml | 1 +
.github/workflows/source-git-automation.yml | 1 +
3 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/.github/tracker-validator.yml b/.github/tracker-validator.yml
index f88cc0a5..31ef28f6 100644
--- a/.github/tracker-validator.yml
+++ b/.github/tracker-validator.yml
@@ -12,17 +12,17 @@ products:
- rhel-9.2.0.z
- rhel-9.3.0
- rhel-9.3.0.z
- - rhel-9.4.0
- - rhel-9.4.0.z
- - rhel-9.5.0
- - rhel-9.5.0.z
- - rhel-9.6.0
- - rhel-9.6.0.z
- - rhel-9.7.0
- - rhel-9.7.0.z
- - rhel-9.8.0
- - rhel-9.8.0.z
- - rhel-9.9.0
- - rhel-9.9.0.z
- - rhel-9.10.0
- - rhel-9.10.0.z
+ - rhel-9.4
+ - rhel-9.4.z
+ - rhel-9.5
+ - rhel-9.5.z
+ - rhel-9.6
+ - rhel-9.6.z
+ - rhel-9.7
+ - rhel-9.7.z
+ - rhel-9.8
+ - rhel-9.8.z
+ - rhel-9.9
+ - rhel-9.9.z
+ - rhel-9.10
+ - rhel-9.10.z
diff --git a/.github/workflows/source-git-automation-on-demand.yml b/.github/workflows/source-git-automation-on-demand.yml
index 8a3a366e..afd2333e 100644
--- a/.github/workflows/source-git-automation-on-demand.yml
+++ b/.github/workflows/source-git-automation-on-demand.yml
@@ -66,5 +66,6 @@ jobs:
uses: redhat-plumbers-in-action/source-git-automation@v1
with:
pr-number: ${{ matrix.pr-number }}
+ component: dracut
jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/source-git-automation.yml b/.github/workflows/source-git-automation.yml
index 025ee84d..bdec3856 100644
--- a/.github/workflows/source-git-automation.yml
+++ b/.github/workflows/source-git-automation.yml
@@ -42,5 +42,6 @@ jobs:
uses: redhat-plumbers-in-action/source-git-automation@v1
with:
pr-metadata: ${{ needs.download-metadata.outputs.pr-metadata }}
+ component: dracut
jira-api-token: ${{ secrets.JIRA_API_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

@ -1,37 +0,0 @@
From f8cb5753f14c65d1371b623f5f0d8e3cb0aa7107 Mon Sep 17 00:00:00 2001
From: Laszlo Gombos <laszlo.gombos@gmail.com>
Date: Wed, 19 Oct 2022 12:32:28 +0000
Subject: [PATCH] ci: remove non-existing modules from labeler
(cherry picked from commit 1d60dd74ee721f17cdaadd56b874b564b89c0145)
Related: RHEL-30581
---
.github/labeler.yml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/.github/labeler.yml b/.github/labeler.yml
index 0dcc06d4..5667c635 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -50,9 +50,6 @@ bash:
- changed-files:
- any-glob-to-any-file: 'modules.d/00bash/*'
-bootchart:
- - modules.d/00bootchart/*
-
dash:
- changed-files:
- any-glob-to-any-file: 'modules.d/00dash/*'
@@ -345,9 +342,6 @@ qemu-net:
- changed-files:
- any-glob-to-any-file: 'modules.d/90qemu-net/*'
-stratis:
- - modules.d/90stratis/*
-
crypt-gpg:
- changed-files:
- any-glob-to-any-file: 'modules.d/91crypt-gpg/*'

@ -1,34 +0,0 @@
From 79fbe4171a7e42abe40d138a24add2895f7cddcd Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Tue, 31 Jan 2023 16:32:19 +0100
Subject: [PATCH] fix(network-manager): add "After" dependency on dbus.service
During shutdown, there is no ordering dependency between the nm-initrd service
and the D-Bus daemon, and so the latter can be stopped before. This causes
issues to NetworkManager, especially when team interfaces are present because
NM will see teamd dropping from the bus and will try to reactivate the
connection.
Add a "After" dependency to make sure the D-Bus daemon is stopped after NM on
shutdown.
(Cherry-picked commit: 1b7d83110741560f26027fbd9435763eef56935a)
Resolves: RHEL-13192
---
modules.d/35network-manager/nm-initrd.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/35network-manager/nm-initrd.service b/modules.d/35network-manager/nm-initrd.service
index 3e24f52a..dbd8caa7 100644
--- a/modules.d/35network-manager/nm-initrd.service
+++ b/modules.d/35network-manager/nm-initrd.service
@@ -3,6 +3,7 @@ DefaultDependencies=no
Wants=systemd-udev-trigger.service
After=systemd-udev-trigger.service
After=dracut-cmdline.service
+After=dbus.service
Wants=network.target
Before=network.target
ConditionPathExists=/run/NetworkManager/initrd/neednet

@ -1,174 +0,0 @@
From 75691dfaa822a7ce32e4f97141975d9b10f3101e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9CMasahiro?= <mmatsuya@redhat.com>
Date: Fri, 3 Feb 2023 12:08:26 +0900
Subject: [PATCH] fix(url-lib.sh): nfs_already_mounted() with trailing slash in
nfs path
nfs_already_mounted() doesn't work when the installation ISO and kickstart file on a same NFS share are specified with inst.repo and inst.ks boot parameter as below.
inst.repo=nfs:192.168.1.1:/home/data/rhel9.iso inst.ks=nfs:192.168.1.1:/home/data/ks.cfg
NOTE: /home/data is configured for nfs share on 192.168.1.1
One problem is a file (not a directory) was passed into nfs_already_mounted().
nfs_already_mounted() is the function to judge if the given directory is already mounted.
So, filepath should be passed in nfs_fetch_url().
The other problem is about the trailing slash in the nfs path in /proc/mounts.
The /proc/mounts has an entry after nfs mount of inst.repo.
192.168.1.1:/data/ /run/install/isodir nfs ro,relatime,<snip>
In this case, nfs_already_mounted() returns "/run/install/isodir//home/data/ks.cfg" wrongly. The following is from the log.
[ 14.556279] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@156(nfs_fetch_url): nfs_already_mounted 192.168.122.1 /home/data/ks.cfg
[ 14.556279] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@137(nfs_already_mounted): local server=192.168.122.1 path=/home/data/ks.cfg s= p=
...
[ 14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@140(nfs_already_mounted): '[' 192.168.122.1 = 192.168.122.1 ']'
[ 14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@141(nfs_already_mounted): '[' /home/data/ks.cfg = /home/data/ ']'
[ 14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@143(nfs_already_mounted): str_starts /home/data/ks.cfg /home/data/
[ 14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/dracut-lib.sh@51(str_starts): '[' ks.cfg '!=' /home/data/ks.cfg ']'
[ 14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@144(nfs_already_mounted): echo /run/install/isodir//home/data/ks.cfg
...
[ 14.658069] localhost.localdomain dracut-initqueue[934]: //lib/url-lib.sh@156(nfs_fetch_url): mntdir=/run/install/isodir//home/data/ks.cfg
This function doesn't expect the trailiing slash of the nfs path in /proc/mounts, so it should be removed before processing it.
feat(test): nfs_fetch_url test into nfs test
This is to check the behavior of nfs_fetch_url() in nfs-lib.sh.
nfs_fetch_url() calls nfs_already_mounted() internally.
A file /nfs/client/root/fetchfile is on NFS server, which is fetched
from clients for testing with nfs_fetch_url().
(Cherry-picked commits:
b731369c5fe7f9247337fe08017638a38f36cfca
3cf092dbd8754a31595b0d8447827c6358fc3a88)
Resolves: RHEL-13193
---
modules.d/45url-lib/url-lib.sh | 3 ++-
test/TEST-20-NFS/client-init.sh | 20 ++++++++++++++++++++
test/TEST-20-NFS/test.sh | 14 +++++++++++++-
3 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/modules.d/45url-lib/url-lib.sh b/modules.d/45url-lib/url-lib.sh
index b009fd09..c62b35db 100755
--- a/modules.d/45url-lib/url-lib.sh
+++ b/modules.d/45url-lib/url-lib.sh
@@ -137,6 +137,7 @@ nfs_already_mounted() {
local server="$1" path="$2" s="" p=""
while read -r src mnt rest || [ -n "$src" ]; do
splitsep ":" "$src" s p
+ p=${p%/}
if [ "$server" = "$s" ]; then
if [ "$path" = "$p" ]; then
echo "$mnt"
@@ -153,7 +154,7 @@ nfs_fetch_url() {
local filepath="${path%/*}" filename="${path##*/}" mntdir=""
# skip mount if server:/filepath is already mounted
- mntdir=$(nfs_already_mounted "$server" "$path")
+ mntdir=$(nfs_already_mounted "$server" "$filepath")
if [ -z "$mntdir" ]; then
local mntdir
mntdir="$(mkuniqdir /run nfs_mnt)"
diff --git a/test/TEST-20-NFS/client-init.sh b/test/TEST-20-NFS/client-init.sh
index c7e88314..061a2b15 100755
--- a/test/TEST-20-NFS/client-init.sh
+++ b/test/TEST-20-NFS/client-init.sh
@@ -1,6 +1,7 @@
#!/bin/sh
: > /dev/watchdog
. /lib/dracut-lib.sh
+. /lib/url-lib.sh
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
command -v plymouth > /dev/null 2>&1 && plymouth --quit
@@ -23,6 +24,25 @@ while read -r dev _ fstype opts rest || [ -n "$dev" ]; do
break
done < /proc/mounts
+if [ "$fstype" = "nfs" -o "$fstype" = "nfs4" ]; then
+
+ serverip=${dev%:*}
+ path=${dev#*:}
+ echo serverip="${serverip}"
+ echo path="${path}"
+ echo /proc/mounts status
+ cat /proc/mounts
+
+ echo test:nfs_fetch_url nfs::"${serverip}":"${path}"/root/fetchfile
+ if nfs_fetch_url nfs::"${serverip}":"${path}"/root/fetchfile /run/nfsfetch.out; then
+ echo nfsfetch-OK
+ echo "nfsfetch-OK" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker2
+ fi
+else
+ echo nfsfetch-BYPASS fstype="${fstype}"
+ echo "nfsfetch-OK" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker2
+fi
+
: > /dev/watchdog
sync
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
index 0821dc84..870eeba0 100755
--- a/test/TEST-20-NFS/test.sh
+++ b/test/TEST-20-NFS/test.sh
@@ -65,13 +65,15 @@ client_test() {
# Need this so kvm-qemu will boot (needs non-/dev/zero local disk)
dd if=/dev/zero of="$TESTDIR"/marker.img bs=1MiB count=1
+ dd if=/dev/zero of="$TESTDIR"/marker2.img bs=1MiB count=1
declare -a disk_args=()
# shellcheck disable=SC2034
declare -i disk_index=0
qemu_add_drive_args disk_index disk_args "$TESTDIR"/marker.img marker
+ qemu_add_drive_args disk_index disk_args "$TESTDIR"/marker2.img marker2
if dhclient --help 2>&1 | grep -q -F -- '--timeout' 2> /dev/null; then
- cmdline="$cmdline rd.net.timeout.dhcp=3"
+ cmdline="$cmdline rd.net.timeout.dhcp=30"
fi
"$testdir"/run-qemu \
@@ -126,6 +128,11 @@ client_test() {
return 1
fi
+ if ! grep -U --binary-files=binary -F -m 1 -q nfsfetch-OK "$TESTDIR"/marker2.img; then
+ echo "CLIENT TEST END: $test_name [FAILED - NFS FETCH FAILED]"
+ return 1
+ fi
+
echo "CLIENT TEST END: $test_name [OK]"
return 0
}
@@ -263,6 +270,7 @@ test_setup() {
done
type -P portmap > /dev/null && inst_multiple portmap
type -P rpcbind > /dev/null && inst_multiple rpcbind
+
[ -f /etc/netconfig ] && inst_multiple /etc/netconfig
type -P dhcpd > /dev/null && inst_multiple dhcpd
[ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
@@ -308,6 +316,7 @@ test_setup() {
(
cd "$initdir" || exit
mkdir -p dev sys proc etc run root usr var/lib/nfs/rpc_pipefs
+ echo "TEST FETCH FILE" > root/fetchfile
)
inst_multiple sh shutdown poweroff stty cat ps ln ip dd \
@@ -321,6 +330,9 @@ test_setup() {
inst_simple "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh"
inst_simple "${basedir}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh"
+ inst_simple "${basedir}/modules.d/45url-lib/url-lib.sh" "/lib/url-lib.sh"
+ inst_simple "${basedir}/modules.d/40network/net-lib.sh" "/lib/net-lib.sh"
+ inst_simple "${basedir}/modules.d/95nfs/nfs-lib.sh" "/lib/nfs-lib.sh"
inst_binary "${basedir}/dracut-util" "/usr/bin/dracut-util"
ln -s dracut-util "${initdir}/usr/bin/dracut-getarg"
ln -s dracut-util "${initdir}/usr/bin/dracut-getargs"

@ -1,86 +0,0 @@
From 813a79d80b272d30ea949b070b436d2bb487df24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B3hann=20B=2E=20Gu=C3=B0mundsson?= <johannbg@gmail.com>
Date: Sun, 23 Oct 2022 10:54:48 +0000
Subject: [PATCH] feat(systemd-pcrphase): introducing the systemd-pcrphase
module
Introducing the systemd-pcrphase module
(Cherry-picked commit: c4c595ceeab79fefde74750ec6b0d15d7d16ede6)
Resolves: RHEL-27944
---
modules.d/01systemd-pcrphase/module-setup.sh | 51 ++++++++++++++++++++++++++++
pkgbuild/dracut.spec | 1 +
2 files changed, 52 insertions(+)
diff --git a/modules.d/01systemd-pcrphase/module-setup.sh b/modules.d/01systemd-pcrphase/module-setup.sh
new file mode 100755
index 00000000..3dbb4974
--- /dev/null
+++ b/modules.d/01systemd-pcrphase/module-setup.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+# This file is part of dracut.
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Prerequisite check(s) for module.
+check() {
+
+ # If the binary(s) requirements are not fulfilled the module can't be installed.
+ require_binaries "$systemdutildir"/systemd-pcrphase || return 1
+
+ # Return 255 to only include the module, if another module requires it.
+ return 255
+
+}
+
+# Module dependency requirements.
+depends() {
+
+ # This module has external dependency on other module(s).
+ echo systemd tpm2-tss
+ # Return 0 to include the dependent module(s) in the initramfs.
+ return 0
+
+}
+
+# Install the required file(s) and directories for the module in the initramfs.
+install() {
+
+ inst_multiple -o \
+ "$systemdutildir"/systemd-pcrphase \
+ "$systemdsystemunitdir"/systemd-pcrphase.service \
+ "$systemdsystemunitdir/systemd-pcrphase.service.d/*.conf" \
+ "$systemdsystemunitdir"/systemd-pcrphase-sysinit.service \
+ "$systemdsystemunitdir/systemd-pcrphase-sysinit.service/*.conf" \
+ "$systemdsystemunitdir"/systemd-pcrphase-initrd.service \
+ "$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \
+ "$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service
+
+ # Install the hosts local user configurations if enabled.
+ if [[ $hostonly ]]; then
+ inst_multiple -H -o \
+ "$systemdsystemconfdir"/systemd-pcrphase.service \
+ "$systemdsystemconfdir/systemd-pcrphase.service.d/*.conf" \
+ "$systemdsystemconfdir"/systemd-pcrphase-sysinit.service \
+ "$systemdsystemconfdir/systemd-pcrphase-sysinit.service.d/*.conf" \
+ "$systemdsystemconfdir"/systemd-pcrphase-initrd.service \
+ "$systemdsystemconfdir/systemd-pcrphase-initrd.service.d/*.conf" \
+ "$systemdsystemconfdir"/initrd.target.wants/systemd-pcrphase-initrd.service
+ fi
+
+}
diff --git a/pkgbuild/dracut.spec b/pkgbuild/dracut.spec
index bd850986..0fa46d86 100644
--- a/pkgbuild/dracut.spec
+++ b/pkgbuild/dracut.spec
@@ -320,6 +320,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{dracutlibdir}/modules.d/01systemd-journald
%{dracutlibdir}/modules.d/01systemd-ldconfig
%{dracutlibdir}/modules.d/01systemd-modules-load
+%{dracutlibdir}/modules.d/01systemd-pcrphase
%{dracutlibdir}/modules.d/01systemd-repart
%{dracutlibdir}/modules.d/01systemd-resolved
%{dracutlibdir}/modules.d/01systemd-rfkill

@ -1,45 +0,0 @@
From 86ce7047b2ade1f18ed50a736f10c343483f1f6c Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Thu, 9 Feb 2023 13:55:47 +0100
Subject: [PATCH] fix(systemd-pcrphase): only include
systemd-pcrphase-initrd.service
The only systemd-pcrphase related unit configured to run in the initrd is
systemd-pcrphase-initrd.service.
Both systemd-pcrphase.service and systemd-pcrphase-sysinit.service contain
`ConditionPathExists=!/etc/initrd-release`.
(Cherry-picked commit: cd6f683d634970112a29867137431d0d57f8c957)
Related: RHEL-27944
---
modules.d/01systemd-pcrphase/module-setup.sh | 8 --------
1 file changed, 8 deletions(-)
diff --git a/modules.d/01systemd-pcrphase/module-setup.sh b/modules.d/01systemd-pcrphase/module-setup.sh
index 3dbb4974..fa960a42 100755
--- a/modules.d/01systemd-pcrphase/module-setup.sh
+++ b/modules.d/01systemd-pcrphase/module-setup.sh
@@ -28,10 +28,6 @@ install() {
inst_multiple -o \
"$systemdutildir"/systemd-pcrphase \
- "$systemdsystemunitdir"/systemd-pcrphase.service \
- "$systemdsystemunitdir/systemd-pcrphase.service.d/*.conf" \
- "$systemdsystemunitdir"/systemd-pcrphase-sysinit.service \
- "$systemdsystemunitdir/systemd-pcrphase-sysinit.service/*.conf" \
"$systemdsystemunitdir"/systemd-pcrphase-initrd.service \
"$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \
"$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service
@@ -39,10 +35,6 @@ install() {
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
- "$systemdsystemconfdir"/systemd-pcrphase.service \
- "$systemdsystemconfdir/systemd-pcrphase.service.d/*.conf" \
- "$systemdsystemconfdir"/systemd-pcrphase-sysinit.service \
- "$systemdsystemconfdir/systemd-pcrphase-sysinit.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-pcrphase-initrd.service \
"$systemdsystemconfdir/systemd-pcrphase-initrd.service.d/*.conf" \
"$systemdsystemconfdir"/initrd.target.wants/systemd-pcrphase-initrd.service

@ -1,37 +0,0 @@
From 1a57cf705444d3b6800051eee911d26a5c32d49a Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Thu, 8 Aug 2024 00:55:03 +0200
Subject: [PATCH] fix(nfs): include also entries from /usr/lib/{passwd,group}
as those paths are used by bootc instead of the /etc ones.
(cherry picked from commit 45cdf3c4f24f77f04b264a7747f115d1031b2e67 from PR#573)
Resolves: RHEL-52326
---
modules.d/95nfs/module-setup.sh | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
index 5351c2d5..1d961171 100755
--- a/modules.d/95nfs/module-setup.sh
+++ b/modules.d/95nfs/module-setup.sh
@@ -130,8 +130,16 @@ install() {
# Rather than copy the passwd file in, just set a user for rpcbind
# We'll save the state and restart the daemon from the root anyway
- grep -E '^nfsnobody:|^rpc:|^rpcuser:' "$dracutsysrootdir"/etc/passwd >> "$initdir/etc/passwd"
- grep -E '^nogroup:|^rpc:|^nobody:' "$dracutsysrootdir"/etc/group >> "$initdir/etc/group"
+
+ local _confdir
+ for _confdir in etc usr/lib; do
+
+ grep -sE '^(nfsnobody|_rpc|rpc|rpcuser):' "${dracutsysrootdir}/${_confdir}/passwd" \
+ >> "$initdir/${_confdir}/passwd"
+
+ grep -sE '^(nogroup|rpc|nobody):' "${dracutsysrootdir}/${_confdir}/group" \
+ >> "$initdir/${_confdir}/group"
+ done
# rpc user needs to be able to write to this directory to save the warmstart
# file

@ -1,25 +0,0 @@
From f194130f4f15d2c8159fb8adee76bb53ee5b82f5 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Mon, 18 Jul 2022 11:03:32 +0200
Subject: [PATCH] fix(systemd): set right permissions for the machine-id file
(cherry picked from commit 455dbb585583bd2e1d40ebb61c335a2ad6dff053)
Resolves: RHEL-53114
---
modules.d/00systemd/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index 27d2180d..38393855 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -194,6 +194,7 @@ install() {
if ! [[ -e "$initdir/etc/machine-id" ]]; then
: > "$initdir/etc/machine-id"
+ chmod 444 "$initdir/etc/machine-id"
fi
# install adm user/group for journald

@ -1,35 +0,0 @@
From b925190ab3b040c67fb217e0f135c0b92f056402 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Fri, 16 Aug 2024 20:40:15 +0200
Subject: [PATCH] feat(lsinitrd.sh): look for initrd in /usr/lib/modules/
Introduce new path for lsinitrd.sh to look into:
/usr/lib/modules/$kver/initramfs.img
Which is valid on all ostree-based systems, and also other image based
systems with pre-generated initramfs.
Ref: https://issues.redhat.com/browse/RHEL-35890
(cherry picked from commit 7c7cdd9317c21b19a0393f5d28d1acb7ee3ff027 from PR#582)
Resolves: RHEL-35890
---
lsinitrd.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lsinitrd.sh b/lsinitrd.sh
index 39be169d..d05453ce 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -133,6 +133,8 @@ else
image="/lib/modules/${KERNEL_VERSION}/initrd"
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
image="/boot/initramfs-${KERNEL_VERSION}.img"
+ elif [[ -f /usr/lib/modules/${KERNEL_VERSION}/initramfs.img ]]; then
+ image="/usr/lib/modules/${KERNEL_VERSION}/initramfs.img"
elif [[ $MACHINE_ID ]] \
&& mountpoint -q /efi; then
image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"

@ -1,42 +0,0 @@
From 097d4bdb20443c1c5a86cc617ac2ab0c24193d75 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Sat, 17 Aug 2024 01:43:50 +0200
Subject: [PATCH] feat(dracut-init.sh): give --force-add precedence over --omit
This gives precedence of force_add_dracutmodules to omit_dracutmodules,
as there is not other way to override omit_dracutmodules list, and users
would expect it to be overriden from command line.
Ref: https://github.com/dracut-ng/dracut-ng/pull/569
This way, `--add` retains it behaviour, and `--force-add` gains additional
functionality in non-hostonly mode. The module may still be skipped
if the module check returns 1, but it should throw error (as I'd expect
for `--force-add`).
Ref: https://issues.redhat.com/browse/RHEL-26114
(cherry picked from commit a669346f48cbb3278c51ba5e95b1b91f9bfdee0a)
Resolves: RHEL-26114
---
dracut-init.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dracut-init.sh b/dracut-init.sh
index fe1b1426..27abb07b 100644
--- a/dracut-init.sh
+++ b/dracut-init.sh
@@ -921,8 +921,10 @@ check_module() {
[[ $2 ]] || mods_checked_as_dep+=" $_mod "
if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then
- ddebug "dracut module '$_mod' will not be installed, because it's in the list to be omitted!"
- return 1
+ if [[ " $force_add_dracutmodules " != *\ $_mod\ * ]]; then
+ ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!"
+ return 1
+ fi
fi
if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then

@ -5,7 +5,7 @@
# strip the automatically generated dep here and instead co-own the # strip the automatically generated dep here and instead co-own the
# directory. # directory.
%global __requires_exclude pkg-config %global __requires_exclude pkg-config
%define dist_free_release 70.git20240819 %define dist_free_release 44.git20230822
Name: dracut Name: dracut
Version: 057 Version: 057
@ -72,32 +72,6 @@ Patch40: 0040.patch
Patch41: 0041.patch Patch41: 0041.patch
Patch42: 0042.patch Patch42: 0042.patch
Patch43: 0043.patch Patch43: 0043.patch
Patch44: 0044.patch
Patch45: 0045.patch
Patch46: 0046.patch
Patch47: 0047.patch
Patch48: 0048.patch
Patch49: 0049.patch
Patch50: 0050.patch
Patch51: 0051.patch
Patch52: 0052.patch
Patch53: 0053.patch
Patch54: 0054.patch
Patch55: 0055.patch
Patch56: 0056.patch
Patch57: 0057.patch
Patch58: 0058.patch
Patch59: 0059.patch
Patch60: 0060.patch
Patch61: 0061.patch
Patch62: 0062.patch
Patch63: 0063.patch
Patch64: 0064.patch
Patch65: 0065.patch
Patch66: 0066.patch
Patch67: 0067.patch
Patch68: 0068.patch
Patch69: 0069.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
@ -181,7 +155,6 @@ Requires: %{name} = %{version}-%{release}
%endif %endif
Requires: iputils Requires: iputils
Requires: iproute Requires: iproute
Requires: jq
Requires: (NetworkManager >= 1.20 or dhclient) Requires: (NetworkManager >= 1.20 or dhclient)
Suggests: NetworkManager Suggests: NetworkManager
Obsoletes: dracut-generic < 008 Obsoletes: dracut-generic < 008
@ -390,7 +363,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{dracutlibdir}/modules.d/01systemd-journald %{dracutlibdir}/modules.d/01systemd-journald
%{dracutlibdir}/modules.d/01systemd-ldconfig %{dracutlibdir}/modules.d/01systemd-ldconfig
%{dracutlibdir}/modules.d/01systemd-modules-load %{dracutlibdir}/modules.d/01systemd-modules-load
%{dracutlibdir}/modules.d/01systemd-pcrphase
%{dracutlibdir}/modules.d/01systemd-repart %{dracutlibdir}/modules.d/01systemd-repart
%{dracutlibdir}/modules.d/01systemd-resolved %{dracutlibdir}/modules.d/01systemd-resolved
%{dracutlibdir}/modules.d/01systemd-rfkill %{dracutlibdir}/modules.d/01systemd-rfkill
@ -441,6 +413,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{dracutlibdir}/modules.d/95fstab-sys %{dracutlibdir}/modules.d/95fstab-sys
%{dracutlibdir}/modules.d/95hwdb %{dracutlibdir}/modules.d/95hwdb
%{dracutlibdir}/modules.d/95lunmask %{dracutlibdir}/modules.d/95lunmask
%{dracutlibdir}/modules.d/95nvmf
%{dracutlibdir}/modules.d/95resume %{dracutlibdir}/modules.d/95resume
%{dracutlibdir}/modules.d/95rootfs-block %{dracutlibdir}/modules.d/95rootfs-block
%{dracutlibdir}/modules.d/95terminfo %{dracutlibdir}/modules.d/95terminfo
@ -512,7 +485,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{dracutlibdir}/modules.d/95iscsi %{dracutlibdir}/modules.d/95iscsi
%{dracutlibdir}/modules.d/95nbd %{dracutlibdir}/modules.d/95nbd
%{dracutlibdir}/modules.d/95nfs %{dracutlibdir}/modules.d/95nfs
%{dracutlibdir}/modules.d/95nvmf
%{dracutlibdir}/modules.d/95ssh-client %{dracutlibdir}/modules.d/95ssh-client
%ifarch s390 s390x %ifarch s390 s390x
%{dracutlibdir}/modules.d/95znet %{dracutlibdir}/modules.d/95znet
@ -550,41 +522,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
%changelog %changelog
* Mon Aug 19 2024 Pavel Valena <pvalena@redhat.com> - 057-70.git20240819
- fix(systemd): set right permissions for the machine-id file
- feat(lsinitrd.sh): look for initrd in /usr/lib/modules/
- feat(dracut-init.sh): give --force-add precedence over --omit
* Mon Aug 12 2024 Pavel Valena <pvalena@redhat.com> - 057-67.git20240812
- feat(systemd): install systemd-executor
- test: use -device instead of -watchdog to remove qemu
- fix(fips): remove /dev/{random,urandom} pre-creation
- fix(systemd): always include sg module
- fix(fips): do not blindly remove /boot
- fix(github): update format of labeler
- fix(network-manager): add "After" dependency on dbus.service
- fix(url-lib.sh): nfs_already_mounted() with trailing slash in
- feat(systemd-pcrphase): introducing the systemd-pcrphase
- fix(systemd-pcrphase): only include
- fix(nfs): include also entries from /usr/lib/{passwd,group}
* Thu Jan 04 2024 Pavel Valena <pvalena@redhat.com> - 057-53.git20240104
- fix(dracut-install): use stripped kernel module path as hash
* Thu Dec 07 2023 Pavel Valena <pvalena@redhat.com> - 057-52.git20231207
- fix(dracut.sh): remove microcode check based on
* Wed Nov 15 2023 Pavel Valena <pvalena@redhat.com> - 057-51.git20231115
- fix(nvmf): move /etc/nvme/host{nqn,id} requirement to
* Tue Nov 14 2023 Pavel Valena <pvalena@redhat.com> - 057-51.git20231114
- fix(dracut.sh): correct wrong systemd variable paths
- fix(hwdb): follow shfmt-recommended format
- feat(dracut): add --sbat option to add sbat policy to UKI
- feat(systemd): install systemd-sysroot-fstab-check
- fix(dracut.spec): add jq dependency to network subpackage
- fix(fcoe-uefi): exit early on empty vlan
* Tue Aug 22 2023 Pavel Valena <pvalena@redhat.com> - 057-44.git20230822 * Tue Aug 22 2023 Pavel Valena <pvalena@redhat.com> - 057-44.git20230822
- feat(hwdb): install hwdb on demand when module is needed - feat(hwdb): install hwdb on demand when module is needed
@ -616,9 +553,6 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
* Tue May 30 2023 Pavel Valena <pvalena@redhat.com> - 057-22.git20230530 * Tue May 30 2023 Pavel Valena <pvalena@redhat.com> - 057-22.git20230530
- fix(lvmthinpool-monitor): activate lvm thin pool before - fix(lvmthinpool-monitor): activate lvm thin pool before
* Fri Apr 14 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 057-21.git20230214
- Rebuilt for MSVSphere 9.2 beta
* Tue Feb 14 2023 Pavel Valena <pvalena@redhat.com> - 057-21.git20230214 * Tue Feb 14 2023 Pavel Valena <pvalena@redhat.com> - 057-21.git20230214
- fix(network-manager): allow running nm-run.sh multiple times - fix(network-manager): allow running nm-run.sh multiple times

Loading…
Cancel
Save