fix: move dracut configs to files instead of flags (#2003)

While this doesn't make a difference to our image build itself, it will
make the life easier for derived images as they will inherit all the
modules from us that we set anyway. This undoes some of the changes made
in 32a66fc719. These are specific to the things we install here so it
doesn't make sense to go into common.
This commit is contained in:
renner 2026-04-05 15:45:08 +02:00 committed by GitHub
parent 1843b40809
commit 708dab6335
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View file

@ -2,13 +2,12 @@
echo "::group:: ===$(basename "$0")===" echo "::group:: ===$(basename "$0")==="
set -oue pipefail set -ouex pipefail
KERNEL_VERSION=$(rpm -q --queryformat="%{evr}.%{arch}" kernel-core) KERNEL_VERSION=$(rpm -q --queryformat="%{evr}.%{arch}" kernel-core)
# Ensure Initramfs is generated
export DRACUT_NO_XATTR=1 export DRACUT_NO_XATTR=1
/usr/bin/dracut --no-hostonly --kver "${KERNEL_VERSION}" --reproducible -v --add "ostree fido2 tpm2-tss pkcs11 pcsc" -f "/lib/modules/${KERNEL_VERSION}/initramfs.img" /usr/bin/dracut --no-hostonly --kver "${KERNEL_VERSION}" --reproducible -v -f "/usr/lib/modules/${KERNEL_VERSION}/initramfs.img"
chmod 0600 "/lib/modules/${KERNEL_VERSION}/initramfs.img" chmod 0600 "/usr/lib/modules/${KERNEL_VERSION}/initramfs.img"
echo "::endgroup::" echo "::endgroup::"

View file

@ -0,0 +1 @@
add_dracutmodules+=" ostree "

View file

@ -0,0 +1 @@
add_dracutmodules+=" fido2 tpm2-tss pkcs11 pcsc "