|
Harald Hoyer |
bb31e7 |
From 10f8df1bdfd0a19a0415e7db18b1a071313f0e57 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
bb31e7 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
bb31e7 |
Date: Fri, 13 Nov 2015 11:53:36 +0100
|
|
Harald Hoyer |
bb31e7 |
Subject: [PATCH] add --no-reproducible to turn off reproducible mode
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
Also warn about cpio not supporting it and turn it on by default for
|
|
Harald Hoyer |
bb31e7 |
fedora.
|
|
Harald Hoyer |
bb31e7 |
---
|
|
Harald Hoyer |
bb31e7 |
dracut.conf.d/fedora.conf.example | 1 +
|
|
Harald Hoyer |
bb31e7 |
dracut.sh | 9 ++++++++-
|
|
Harald Hoyer |
bb31e7 |
2 files changed, 9 insertions(+), 1 deletion(-)
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
diff --git a/dracut.conf.d/fedora.conf.example b/dracut.conf.d/fedora.conf.example
|
|
Harald Hoyer |
bb31e7 |
index b126b09..b32abb0 100644
|
|
Harald Hoyer |
bb31e7 |
--- a/dracut.conf.d/fedora.conf.example
|
|
Harald Hoyer |
bb31e7 |
+++ b/dracut.conf.d/fedora.conf.example
|
|
Harald Hoyer |
bb31e7 |
@@ -17,3 +17,4 @@ udevdir=/usr/lib/udev
|
|
Harald Hoyer |
bb31e7 |
hostonly="yes"
|
|
Harald Hoyer |
bb31e7 |
hostonly_cmdline="no"
|
|
Harald Hoyer |
bb31e7 |
early_microcode="yes"
|
|
Harald Hoyer |
bb31e7 |
+reproducible="yes"
|
|
Harald Hoyer |
bb31e7 |
diff --git a/dracut.sh b/dracut.sh
|
|
Harald Hoyer |
bb31e7 |
index 1f75b24..fb5d400 100755
|
|
Harald Hoyer |
bb31e7 |
--- a/dracut.sh
|
|
Harald Hoyer |
bb31e7 |
+++ b/dracut.sh
|
|
Harald Hoyer |
bb31e7 |
@@ -202,6 +202,7 @@ Creates initial ramdisk images for preloading modules
|
|
Harald Hoyer |
bb31e7 |
--sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module)
|
|
Harald Hoyer |
bb31e7 |
--logfile [FILE] Logfile to use (overrides configuration setting)
|
|
Harald Hoyer |
bb31e7 |
--reproducible Create reproducible images
|
|
Harald Hoyer |
bb31e7 |
+ --no-reproducible Do not create reproducible images
|
|
Harald Hoyer |
bb31e7 |
--loginstall [DIR] Log all files installed from the host to [DIR]
|
|
Harald Hoyer |
bb31e7 |
--uefi Create an UEFI executable with the kernel cmdline and
|
|
Harald Hoyer |
bb31e7 |
kernel combined
|
|
Harald Hoyer |
bb31e7 |
@@ -358,6 +359,7 @@ rearrange_params()
|
|
Harald Hoyer |
bb31e7 |
--long early-microcode \
|
|
Harald Hoyer |
bb31e7 |
--long no-early-microcode \
|
|
Harald Hoyer |
bb31e7 |
--long reproducible \
|
|
Harald Hoyer |
bb31e7 |
+ --long no-reproducible \
|
|
Harald Hoyer |
bb31e7 |
--long loginstall: \
|
|
Harald Hoyer |
bb31e7 |
--long uefi \
|
|
Harald Hoyer |
bb31e7 |
--long uefi-stub: \
|
|
Harald Hoyer |
bb31e7 |
@@ -553,6 +555,7 @@ while :; do
|
|
Harald Hoyer |
bb31e7 |
--regenerate-all) regenerate_all="yes";;
|
|
Harald Hoyer |
bb31e7 |
--noimageifnotneeded) noimageifnotneeded="yes";;
|
|
Harald Hoyer |
bb31e7 |
--reproducible) reproducible_l="yes";;
|
|
Harald Hoyer |
bb31e7 |
+ --no-reproducible) reproducible_l="no";;
|
|
Harald Hoyer |
bb31e7 |
--uefi) uefi="yes";;
|
|
Harald Hoyer |
bb31e7 |
--uefi-stub)
|
|
Harald Hoyer |
bb31e7 |
uefi_stub_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
|
|
Harald Hoyer |
bb31e7 |
@@ -1673,7 +1676,11 @@ if [[ $DRACUT_REPRODUCIBLE ]]; then
|
|
Harald Hoyer |
bb31e7 |
find "$initdir" -newer "$dracutbasedir/dracut-functions.sh" -print0 \
|
|
Harald Hoyer |
bb31e7 |
| xargs -r -0 touch -h -m -c -r "$dracutbasedir/dracut-functions.sh"
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
- [[ "$(cpio --help)" == *--reproducible* ]] && CPIO_REPRODUCIBLE=1
|
|
Harald Hoyer |
bb31e7 |
+ if [[ "$(cpio --help)" == *--reproducible* ]]; then
|
|
Harald Hoyer |
bb31e7 |
+ CPIO_REPRODUCIBLE=1
|
|
Harald Hoyer |
bb31e7 |
+ else
|
|
Harald Hoyer |
bb31e7 |
+ dinfo "cpio does not support '--reproducible'. Resulting image will not be reproducible."
|
|
Harald Hoyer |
bb31e7 |
+ fi
|
|
Harald Hoyer |
bb31e7 |
fi
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
[[ "$UID" != 0 ]] && cpio_owner_root="-R 0:0"
|