feat: remove v4l2loopback from initramfs (#3002)

This makes the initramfs reproducible, because currently the
kmod-v4l2loopback is the only thing that is not reproducible.

This is not the proper way to do this, it has to be fixed in
ublue-os/akmods and see what step introduces timestamps into the build.

xref: https://github.com/ublue-os/aurora/issues/2579
This commit is contained in:
renner 2026-10-11 15:28:06 +00:00 committed by GitHub
parent ecaac936ff
commit 771c87e8cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,14 @@ set -ouex pipefail
KERNEL_VERSION=$(rpm -q --queryformat="%{evr}.%{arch}" kernel-core)
INITRAMFS="/usr/lib/modules/${KERNEL_VERSION}/initramfs.img"
V4L2_PATH="$(rpm -ql kmod-v4l2loopback)"
DRACUT_REMOVE=(
# makes no difference if in initramfs or not
# this is a hack FIXME in ublue-os/akmods
${V4L2_PATH} # ko.kz file has build id's changing -> non-reproducible
)
# https://github.com/ublue-os/aurora/issues/2568
# these strings change with every build
TMP_OS_RELEASE=$(mktemp --tmpdir 'os-release-XXXXXXXXXX')
@ -19,6 +27,7 @@ DRACUT_NO_XATTR=1 /usr/bin/dracut \
--reproducible \
--verbose \
--force \
--remove "${DRACUT_REMOVE[@]}" \
"${INITRAMFS}"
# mv causes permissions to change