]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(dracut.sh): make uki's reproducible
authorAnton Lundin <glance@ac2.se>
Wed, 14 Jun 2023 11:51:34 +0000 (13:51 +0200)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Mon, 8 Apr 2024 15:49:07 +0000 (11:49 -0400)
If the user asks for the dracut output to be reproducible, we should
ensure objcopy produces a reproducible uki to.

Signed-off-by: Anton Lundin <glance@ac2.se>
dracut.sh

index a0af3dd267f9c5ed74f195a7be0e3ec7af2d285c..c71285e75debb66bb48d245bcb7d5cdc5f1fe5c2 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -2562,6 +2562,7 @@ if [[ $uefi == yes ]]; then
     objcopy --remove-section .sbat "$tmp_uefi_stub" &> /dev/null
 
     if objcopy \
+        ${DRACUT_REPRODUCIBLE:+--enable-deterministic-archives --preserve-dates} \
         ${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")} \