dracut-038-30.git20140815

- git snapshot
This commit is contained in:
Harald Hoyer 2014-08-15 13:59:08 +02:00
parent e09d6b8a2a
commit 89f6faed2b
17 changed files with 1217 additions and 3 deletions

View File

@ -0,0 +1,54 @@
From caa72f829007a868bf47a9bb82a3e359acd6a420 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 24 Jul 2014 14:47:14 +0200
Subject: [PATCH] dracut.spec: fixed license file packaging
---
dracut.spec | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dracut.spec b/dracut.spec
index cb27f37..8912938 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -30,6 +30,8 @@ URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
+Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
+
BuildRequires: bash git
@@ -194,6 +196,7 @@ This package contains tools to assemble the local initrd and host configuration.
%prep
%setup -q -n %{name}-%{version}
+cp %{SOURCE1} .
%if %{defined PATCH1}
git init
@@ -293,8 +296,10 @@ rm -rf -- $RPM_BUILD_ROOT
%files
%defattr(-,root,root,0755)
%if %{with doc}
-%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
+%doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
%endif
+%{!?_licensedir:%global license %%doc}
+%license COPYING lgpl-2.1.txt
%{_bindir}/dracut
# compat symlink
%{_sbindir}/dracut
@@ -441,11 +446,6 @@ rm -rf -- $RPM_BUILD_ROOT
%files fips-aesni
%defattr(-,root,root,0755)
-
-%if %{with doc}
-%doc COPYING
-%endif
-
%{dracutlibdir}/modules.d/02fips-aesni
%files caps

32
0015-NEWS-update.patch Normal file
View File

@ -0,0 +1,32 @@
From ba7dab6dbab3fee9527384868695de12033529ed Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 29 Jul 2014 11:04:09 +0200
Subject: [PATCH] NEWS: update
---
NEWS | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/NEWS b/NEWS
index 102fd03..126a9d7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,18 @@
+dracut-039
+==========
+- DRACUT_PATH can now be used to specify the PATH used by dracut
+ to search for binaries instead of the default
+ /usr/sbin:/sbin:/usr/bin:/bin
+ This should be set in the distribution config file
+ /usr/lib/dracut/dracut.conf.d/01-dist.conf
+- "rd.route" kernel command line parameter added
+- "--install-optional" and install_optional_items added
+- find plymouth pkglibdir on debian
+- speed up ldconfig_paths()
+- more ARM modules
+- fixed inst*() functions and "-H" handling
+- various bugfixes
+
dracut-038
==========
- "rd.cmdline=ask" will ask the user on the console to enter additional

View File

@ -0,0 +1,35 @@
From 28d03673f9aa76b041ce9a41a82a632d5399d8d1 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 1 Aug 2014 13:15:05 +0200
Subject: [PATCH] TEST-20-NFS:client-init.sh: add shell on rd.shell
---
test/TEST-20-NFS/client-init.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/TEST-20-NFS/client-init.sh b/test/TEST-20-NFS/client-init.sh
index a16db3c..a1c4590 100755
--- a/test/TEST-20-NFS/client-init.sh
+++ b/test/TEST-20-NFS/client-init.sh
@@ -7,14 +7,18 @@ CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
strstr() { [ "${1##*"$2"*}" != "$1" ]; }
stty sane
-strstr "$CMDLINE" "rd.shell" && sh -i
+if strstr "$CMDLINE" "rd.shell"; then
+ [ -c /dev/watchdog ] && echo -n 'V' > /dev/watchdog
+ strstr "$(setsid --help)" "control" && CTTY="-c"
+ setsid $CTTY sh -i
+fi
+
echo "made it to the rootfs! Powering down."
+
while read dev fs fstype opts rest; do
[ "$fstype" != "nfs" -a "$fstype" != "nfs4" ] && continue
echo "nfs-OK $dev $fstype $opts" > /dev/sda
break
done < /proc/mounts
-#echo 'V' > /dev/watchdog
-#sh -i
>/dev/watchdog
poweroff -f

View File

@ -0,0 +1,33 @@
From 4e1f8d0c5f071e0e8270eadf73e97aa41b07cb12 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 1 Aug 2014 13:15:44 +0200
Subject: [PATCH] TEST-20-NFS: add more commands and fix client root dirs
---
test/TEST-20-NFS/test.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
index 4f21d45..19bf510 100755
--- a/test/TEST-20-NFS/test.sh
+++ b/test/TEST-20-NFS/test.sh
@@ -290,7 +290,7 @@ test_setup() {
. $basedir/dracut-functions.sh
inst_multiple sh shutdown poweroff stty cat ps ln ip \
- mount dmesg mkdir cp ping grep
+ mount dmesg mkdir cp ping grep setsid ls vi /etc/virc less cat
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
[ -f ${_terminfodir}/l/linux ] && break
done
@@ -301,6 +301,10 @@ test_setup() {
cd "$initdir"
mkdir -p dev sys proc etc run
mkdir -p var/lib/nfs/rpc_pipefs
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
)
inst /etc/nsswitch.conf /etc/nsswitch.conf
inst /etc/passwd /etc/passwd

View File

@ -0,0 +1,170 @@
From 2db6d7111870c5d16d812d9cddc23558f3f4a202 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 1 Aug 2014 13:16:29 +0200
Subject: [PATCH] fixed bridge setup
renamed "ethnames" in bridge.info to "bridgeslaves"
fixed ifcfg generation
---
modules.d/40network/ifup.sh | 4 ++--
modules.d/40network/net-genrules.sh | 2 +-
modules.d/40network/parse-bridge.sh | 18 ++++++++--------
modules.d/45ifcfg/write-ifcfg.sh | 42 +++++++++----------------------------
4 files changed, 22 insertions(+), 44 deletions(-)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 349530f..41ea631 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -60,7 +60,7 @@ fi
# bridge this interface?
if [ -e /tmp/bridge.info ]; then
. /tmp/bridge.info
- for ethname in $ethnames ; do
+ for ethname in $bridgeslaves ; do
if [ "$netif" = "$ethname" ]; then
if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
: # We need to really setup bond (recursive call)
@@ -236,7 +236,7 @@ if [ -e /tmp/bridge.info ]; then
if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
brctl addbr $bridgename
brctl setfd $bridgename 0
- for ethname in $ethnames ; do
+ for ethname in $bridgeslaves ; do
if [ "$ethname" = "$bondname" ] ; then
DO_BOND_SETUP=yes ifup $bondname -m
elif [ "$ethname" = "$teammaster" ] ; then
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index af2f09c..a43e3df 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -16,7 +16,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
# bridge: attempt only the defined interface
if [ -e /tmp/bridge.info ]; then
. /tmp/bridge.info
- IFACES="$IFACES ${ethnames%% *}"
+ IFACES="$IFACES ${bridgeslaves%% *}"
MASTER_IFACES="$MASTER_IFACES $bridgename"
fi
diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh
index 8c305c0..a910109 100755
--- a/modules.d/40network/parse-bridge.sh
+++ b/modules.d/40network/parse-bridge.sh
@@ -3,9 +3,9 @@
# ex: ts=8 sw=4 sts=4 et filetype=sh
#
# Format:
-# bridge=<bridgename>:<ethnames>
+# bridge=<bridgename>:<bridgeslaves>
#
-# <ethnames> is a comma-separated list of physical (ethernet) interfaces
+# <bridgeslaves> is a comma-separated list of physical (ethernet) interfaces
# bridge without parameters assumes bridge=br0:eth0
#
@@ -25,20 +25,20 @@ parsebridge() {
v=${v#*:}
done
- unset bridgename ethnames
+ unset bridgename bridgeslaves
case $# in
- 0) bridgename=br0; ethnames=$iface ;;
+ 0) bridgename=br0; bridgeslaves=$iface ;;
1) die "bridge= requires two parameters" ;;
- 2) bridgename=$1; ethnames=$(str_replace "$2" "," " ") ;;
+ 2) bridgename=$1; bridgeslaves=$(str_replace "$2" "," " ") ;;
*) die "bridge= requires two parameters" ;;
esac
}
-unset bridgename ethnames
+unset bridgename bridgeslaves
iface=eth0
-# Parse bridge for bridgename and ethnames
+# Parse bridge for bridgename and bridgeslaves
if bridge="$(getarg bridge)"; then
# Read bridge= parameters if they exist
if [ -n "$bridge" ]; then
@@ -47,9 +47,9 @@ if bridge="$(getarg bridge)"; then
# Simple default bridge
if [ -z "$bridgename" ]; then
bridgename=br0
- ethnames=$iface
+ bridgeslaves=$iface
fi
echo "bridgename=$bridgename" > /tmp/bridge.info
- echo "ethnames=\"$ethnames\"" >> /tmp/bridge.info
+ echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.info
return
fi
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index 7e301de..d920c22 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -214,6 +214,7 @@ for netup in /tmp/net.*.did-setup ; do
echo "SLAVE=yes"
echo "MASTER=\"$netif\""
echo "NAME=\"$slave\""
+ echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\""
} >> /tmp/ifcfg/ifcfg-$slave
done
fi
@@ -224,44 +225,21 @@ for netup in /tmp/net.*.did-setup ; do
echo "TYPE=Bridge"
echo "NAME=\"$netif\""
} >> /tmp/ifcfg/ifcfg-$netif
- if [ "$ethname" = "$bondname" ] ; then
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$bondname\""
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- # This variable is an indicator of a bond interface for initscripts
- echo "BONDING_OPTS=\"$bondoptions\""
- echo "BRIDGE=\"$netif\""
- echo "NAME=\"$bondname\""
- } >> /tmp/ifcfg/ifcfg-$bondname
- for slave in $bondslaves ; do
- # write separate ifcfg file for the raw eth interface
- {
- echo "# Generated by dracut initrd"
- echo "DEVICE=\"$slave\""
- echo "TYPE=Ethernet"
- echo "ONBOOT=yes"
- echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
- echo "SLAVE=yes"
- echo "MASTER=\"$bondname\""
- echo "NAME=\"$slave\""
- } >> /tmp/ifcfg/ifcfg-$slave
- done
- else
+ for slave in $bridgeslaves ; do
# write separate ifcfg file for the raw eth interface
{
echo "# Generated by dracut initrd"
- echo "DEVICE=\"$ethname\""
+ echo "DEVICE=\"$slave\""
echo "TYPE=Ethernet"
echo "ONBOOT=yes"
echo "NETBOOT=yes"
- echo "HWADDR=\"$(cat /sys/class/net/$ethname/address)\""
- echo "BRIDGE=\"$netif\""
- echo "NAME=\"$ethname\""
- } >> /tmp/ifcfg/ifcfg-$ethname
- fi
+ echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
+ echo "SLAVE=yes"
+ echo "MASTER=\"$bridgename\""
+ echo "NAME=\"$slave\""
+ echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\""
+ } >> /tmp/ifcfg/ifcfg-$slave
+ done
fi
i=1
for ns in $(getargs nameserver); do

View File

@ -0,0 +1,474 @@
From 068531232b994ef93b3245484987df1cf1504dd0 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 8 Aug 2014 13:34:04 +0200
Subject: [PATCH] test: make testsuite work with the new systemd minimal root
req
systemd needs more directories to switch root
---
test/TEST-01-BASIC/test.sh | 9 ++++++++-
test/TEST-02-SYSTEMD/test.sh | 10 +++++++++-
test/TEST-03-USR-MOUNT/test.sh | 9 ++++++++-
test/TEST-10-RAID/test.sh | 9 ++++++++-
test/TEST-11-LVM/test.sh | 10 +++++++++-
test/TEST-12-RAID-DEG/test.sh | 9 ++++++++-
test/TEST-13-ENC-RAID-LVM/test.sh | 10 +++++++++-
test/TEST-14-IMSM/test.sh | 9 ++++++++-
test/TEST-15-BTRFSRAID/test.sh | 10 +++++++++-
test/TEST-16-DMSQUASH/test.sh | 9 ++++++++-
test/TEST-17-LVM-THIN/test.sh | 10 +++++++++-
test/TEST-30-ISCSI/test.sh | 10 +++++++++-
test/TEST-40-NBD/test.sh | 25 ++++++++++++++++++++++---
test/TEST-50-MULTINIC/client-init.sh | 7 ++++---
test/TEST-50-MULTINIC/test.sh | 18 +++++++++++-------
15 files changed, 139 insertions(+), 25 deletions(-)
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
index f857fd4..6c8f1a6 100755
--- a/test/TEST-01-BASIC/test.sh
+++ b/test/TEST-01-BASIC/test.sh
@@ -30,6 +30,14 @@ test_setup() {
export initdir=$TESTDIR/overlay/source
mkdir -p $initdir
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
umount strace less setsid
@@ -43,7 +51,6 @@ test_setup() {
inst_simple /etc/os-release
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
sudo ldconfig -r "$initdir"
)
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
index cc9da27..3eac744 100755
--- a/test/TEST-02-SYSTEMD/test.sh
+++ b/test/TEST-02-SYSTEMD/test.sh
@@ -26,6 +26,15 @@ test_setup() {
export initdir=$TESTDIR/overlay/source
mkdir -p $initdir
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ mkdir -p -- var/lib/nfs/rpc_pipefs
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
umount strace less setsid
@@ -39,7 +48,6 @@ test_setup() {
inst_simple /etc/os-release
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
sudo ldconfig -r "$initdir"
)
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
index b3d709e..2a0cd8e 100755
--- a/test/TEST-03-USR-MOUNT/test.sh
+++ b/test/TEST-03-USR-MOUNT/test.sh
@@ -57,6 +57,14 @@ test_setup() {
export initdir=$TESTDIR/overlay/source
mkdir -p $initdir
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
umount strace less setsid
@@ -71,7 +79,6 @@ test_setup() {
inst_simple /etc/os-release
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
sudo ldconfig -r "$initdir"
)
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
index b17e912..2a420f5 100755
--- a/test/TEST-10-RAID/test.sh
+++ b/test/TEST-10-RAID/test.sh
@@ -27,8 +27,15 @@ test_setup() {
# Create what will eventually be our root filesystem onto an overlay
(
export initdir=$TESTDIR/overlay/source
- (mkdir -p "$initdir"; cd "$initdir"; mkdir -p dev sys proc etc var/run tmp run)
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
index 6f2461c..44a4c9c 100755
--- a/test/TEST-11-LVM/test.sh
+++ b/test/TEST-11-LVM/test.sh
@@ -25,6 +25,15 @@ test_setup() {
(
export initdir=$TESTDIR/overlay/source
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ mkdir -p -- var/lib/nfs/rpc_pipefs
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -37,7 +46,6 @@ test_setup() {
inst_simple /etc/os-release
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
mkdir $initdir/run
sudo ldconfig -r "$initdir"
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
index dfcf3dc..00ff4bc 100755
--- a/test/TEST-12-RAID-DEG/test.sh
+++ b/test/TEST-12-RAID-DEG/test.sh
@@ -67,6 +67,14 @@ test_setup() {
(
export initdir=$TESTDIR/overlay/source
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -79,7 +87,6 @@ test_setup() {
inst_simple /etc/os-release
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
sudo ldconfig -r "$initdir"
)
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
index 5102142..55968a1 100755
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
@@ -63,6 +63,15 @@ test_setup() {
(
export initdir=$TESTDIR/overlay/source
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ mkdir -p -- var/lib/nfs/rpc_pipefs
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -75,7 +84,6 @@ test_setup() {
inst_simple /etc/os-release
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
sudo ldconfig -r "$initdir"
)
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
index 9353a92..53cca27 100755
--- a/test/TEST-14-IMSM/test.sh
+++ b/test/TEST-14-IMSM/test.sh
@@ -55,6 +55,14 @@ test_setup() {
(
export initdir=$TESTDIR/overlay/source
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -67,7 +75,6 @@ test_setup() {
inst_multiple grep
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
mkdir $initdir/run
sudo ldconfig -r "$initdir"
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
index 3fc1d45..2752e86 100755
--- a/test/TEST-15-BTRFSRAID/test.sh
+++ b/test/TEST-15-BTRFSRAID/test.sh
@@ -27,6 +27,15 @@ test_setup() {
(
export initdir=$TESTDIR/overlay/source
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ mkdir -p -- var/lib/nfs/rpc_pipefs
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -39,7 +48,6 @@ test_setup() {
inst ./test-init.sh /sbin/init
inst_simple /etc/os-release
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
sudo ldconfig -r "$initdir"
)
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
index 252e845..036cf58 100755
--- a/test/TEST-16-DMSQUASH/test.sh
+++ b/test/TEST-16-DMSQUASH/test.sh
@@ -49,6 +49,14 @@ test_setup() {
(
export initdir="$TESTDIR"/root-source
. "$basedir"/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient \
umount strace less
@@ -67,7 +75,6 @@ test_setup() {
inst "$TESTDIR"/initramfs.testing "/boot/initramfs-$KVERSION.img"
inst /boot/vmlinuz-"$KVERSION"
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p -- dev sys proc etc var/run tmp )
cp -a -- /etc/ld.so.conf* "$initdir"/etc
sudo ldconfig -r -- "$initdir"
)
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
index 0cfce19..af6fac3 100755
--- a/test/TEST-17-LVM-THIN/test.sh
+++ b/test/TEST-17-LVM-THIN/test.sh
@@ -25,6 +25,15 @@ test_setup() {
(
export initdir=$TESTDIR/overlay/source
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ mkdir -p -- var/lib/nfs/rpc_pipefs
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip route \
mount dmesg ifconfig dhclient mkdir cp ping dhclient
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -37,7 +46,6 @@ test_setup() {
inst_simple /etc/os-release
inst ./test-init.sh /sbin/init
find_binary plymouth >/dev/null && inst_multiple plymouth
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
mkdir $initdir/run
sudo ldconfig -r "$initdir"
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
index f597783..d3f59c9 100755
--- a/test/TEST-30-ISCSI/test.sh
+++ b/test/TEST-30-ISCSI/test.sh
@@ -105,6 +105,15 @@ test_setup() {
(
export initdir=$TESTDIR/overlay/source
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p -- dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ mkdir -p -- var/lib/nfs/rpc_pipefs
+ )
inst_multiple sh shutdown poweroff stty cat ps ln ip \
mount dmesg mkdir cp ping grep
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -113,7 +122,6 @@ test_setup() {
inst_multiple -o ${_terminfodir}/l/linux
inst_simple /etc/os-release
inst ./client-init.sh /sbin/init
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
cp -a /etc/ld.so.conf* $initdir/etc
sudo ldconfig -r "$initdir"
)
diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh
index 7cf64b1..3bc0dad 100755
--- a/test/TEST-40-NBD/test.sh
+++ b/test/TEST-40-NBD/test.sh
@@ -6,7 +6,7 @@ TEST_DESCRIPTION="root filesystem on NBD"
KVERSION=${KVERSION-$(uname -r)}
# Uncomment this to debug failures
-#DEBUGFAIL="rd.shell rd.retry=10 rd.break"
+#DEBUGFAIL="rd.shell rd.break"
#SERIAL="udp:127.0.0.1:9999"
SERIAL="null"
@@ -197,7 +197,13 @@ make_encrypted_root() {
export initdir=$TESTDIR/overlay/source
. $basedir/dracut-functions.sh
mkdir -p "$initdir"
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
+ (
+ cd "$initdir"; mkdir -p dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh df free ls shutdown poweroff stty cat ps ln ip \
mount dmesg mkdir cp ping
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -215,6 +221,13 @@ make_encrypted_root() {
(
export initdir=$TESTDIR/overlay
. $basedir/dracut-functions.sh
+ (
+ cd "$initdir"; mkdir -p dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple mke2fs poweroff cp umount tune2fs
inst_hook emergency 000 ./hard-off.sh
inst_hook initqueue 01 ./create-root.sh
@@ -255,7 +268,13 @@ make_client_root() {
export initdir=$TESTDIR/mnt
. $basedir/dracut-functions.sh
mkdir -p "$initdir"
- (cd "$initdir"; mkdir -p dev sys proc etc var/run tmp )
+ (
+ cd "$initdir"; mkdir -p dev sys proc etc var/run tmp
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh ls shutdown poweroff stty cat ps ln ip \
dmesg mkdir cp ping
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh
index 13affc4..3f3e079 100755
--- a/test/TEST-50-MULTINIC/client-init.sh
+++ b/test/TEST-50-MULTINIC/client-init.sh
@@ -10,9 +10,10 @@ export PS1='initramfs-test:\w\$ '
stty sane
echo "made it to the rootfs! Powering down."
for i in /run/initramfs/net.*.did-setup; do
- strglobin "$i" ":*:*:*:*:" && continue
- i=${i%.did-setup}
- IFACES+="${i##*/net.} "
+ [ -f "$i" ] || continue
+ strglobin "$i" ":*:*:*:*:" && continue
+ i=${i%.did-setup}
+ IFACES+="${i##*/net.} "
done
{
echo "OK"
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
index add849c..fa4d692 100755
--- a/test/TEST-50-MULTINIC/test.sh
+++ b/test/TEST-50-MULTINIC/test.sh
@@ -6,7 +6,7 @@ TEST_DESCRIPTION="root filesystem on NFS with multiple nics"
KVERSION=${KVERSION-$(uname -r)}
# Uncomment this to debug failures
-#DEBUGFAIL="rd.shell"
+#DEBUGFAIL="rd.shell rd.break"
#SERIAL="tcp:127.0.0.1:9999"
run_server() {
@@ -154,7 +154,7 @@ test_setup() {
(
cd "$initdir";
- mkdir -p -- dev sys proc run etc var/run tmp var/lib/{dhcpd,rpcbind}
+ mkdir -p -- dev sys proc run var/run etc tmp var/lib/{dhcpd,rpcbind}
mkdir -p -- var/lib/nfs/{v4recovery,rpc_pipefs}
chmod 777 -- var/lib/rpcbind var/lib/nfs
)
@@ -217,6 +217,15 @@ test_setup() {
(
export initdir="$TESTDIR"/mnt/nfs/client
. "$basedir"/dracut-functions.sh
+ (
+ cd "$initdir"
+ mkdir -p dev sys proc etc run
+ mkdir -p var/lib/nfs/rpc_pipefs
+ mkdir -p root usr/bin usr/lib usr/lib64 usr/sbin
+ for i in bin sbin lib lib64; do
+ ln -sfnr usr/$i $i
+ done
+ )
inst_multiple sh shutdown poweroff stty cat ps ln ip \
mount dmesg mkdir cp ping grep ls
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
@@ -225,11 +234,6 @@ test_setup() {
inst_multiple -o "${_terminfodir}"/l/linux
inst_simple /etc/os-release
inst ./client-init.sh /sbin/init
- (
- cd "$initdir"
- mkdir -p -- dev sys proc etc run
- mkdir -p -- var/lib/nfs/rpc_pipefs
- )
inst /etc/nsswitch.conf /etc/nsswitch.conf
inst /etc/passwd /etc/passwd
inst /etc/group /etc/group

View File

@ -0,0 +1,28 @@
From 32125a976bb6ff67768ca813446743b781ba012f Mon Sep 17 00:00:00 2001
From: Alex Harpin <development@landsofshadow.co.uk>
Date: Sat, 2 Aug 2014 20:08:25 +0100
Subject: [PATCH] bridging: update the ifcfg files generated for bridge slaves
Update the ifcfg files generated for bridge slaves so they reference
the bridge they are part of. Related to early patch submitted as a
fix for Bug #1123552.
Bug #1123552 https://bugzilla.redhat.com/show_bug.cgi?id=1123552
---
modules.d/45ifcfg/write-ifcfg.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index d920c22..7f068cb 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -234,8 +234,7 @@ for netup in /tmp/net.*.did-setup ; do
echo "ONBOOT=yes"
echo "NETBOOT=yes"
echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
- echo "SLAVE=yes"
- echo "MASTER=\"$bridgename\""
+ echo "BRIDGE=\"$bridgename\""
echo "NAME=\"$slave\""
echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\""
} >> /tmp/ifcfg/ifcfg-$slave

View File

@ -0,0 +1,25 @@
From ae488efa5e6103ffc1be8b8782f8a1c7a5aa90b4 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 14 Aug 2014 12:56:53 +0200
Subject: [PATCH] i18n: check for $i18n_install_all == "yes" rather than being
set
i18n_install_all="no" does not have the expected effect without this
patch
---
modules.d/10i18n/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index a091f89..720fcbd 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -247,7 +247,7 @@ install() {
if checks; then
install_base
- if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} ]]; then
+ if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
install_local_i18n || install_all_kbd
else
install_all_kbd

View File

@ -0,0 +1,23 @@
From e02a29e7a2403dd1bb4f581b14ec4bf4ace6cba7 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 11:44:26 +0200
Subject: [PATCH] dracut.usage.asc: extend parameters for shutdown debug
procedure
---
dracut.usage.asc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut.usage.asc b/dracut.usage.asc
index 6979af6..50ceb49 100644
--- a/dracut.usage.asc
+++ b/dracut.usage.asc
@@ -528,7 +528,7 @@ on _pre-shutdown_ or _shutdown_.
To do this from an already booted system:
----
# mkdir -p /run/initramfs/etc/cmdline.d
-# echo "rd.break=pre-shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
+# echo "rd.debug rd.break=pre-shutdown rd.break=shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
# touch /run/initramfs/.need_shutdown
----

View File

@ -0,0 +1,25 @@
From 11b5db88c2d9290fc438b12a79a50bdd1d327203 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 11:50:31 +0200
Subject: [PATCH] dracut.usage.asc: also add a link for RHEL-7 storage admin
guide
---
dracut.usage.asc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dracut.usage.asc b/dracut.usage.asc
index 50ceb49..6128ec4 100644
--- a/dracut.usage.asc
+++ b/dracut.usage.asc
@@ -259,7 +259,9 @@ local hard drive or it can be served by a PXE/TFTP server.
How to setup your PXE/TFTP server can be found in the
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red
-Hat Enterprise Linux Storage Administration Guide].
+Hat Enterprise Linux 6 Storage Administration Guide]
+or http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red
+Hat Enterprise Linux 7 Storage Administration Guide].
If you specify ip=auto on the kernel command line, then dracut asks a dhcp
server about the ip adress for the machine. The dhcp server can also serve an

View File

@ -0,0 +1,28 @@
From a628b7caf52459a31c46463744fafc42bb8f3407 Mon Sep 17 00:00:00 2001
From: WANG Chao <chaowang@redhat.com>
Date: Mon, 28 Jul 2014 22:26:28 +0800
Subject: [PATCH] dracut-functions: get_persistent_dev() fall back to the
original name
In case of raw disk/partition, ex. /dev/vda1, which doesn't contain any
filesystem on it. get_persistent_dev() would return empty. Now fix it to
return its original name, /dev/vda1 in above case. So that we don't have
to check its return string every time.
Signed-off-by: WANG Chao <chaowang@redhat.com>
---
dracut-functions.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 6cdfea0..b07063f 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -388,6 +388,7 @@ get_persistent_dev() {
return
fi
done
+ echo $1
}
expand_persistent_dev() {

View File

@ -0,0 +1,28 @@
From 4a3f3ba68c73707231bba72cdf7ab01464456e5a Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 22:04:37 +0200
Subject: [PATCH] Test soc path for modalias needed by drm
On ARM, both pci and soc path can be tested for drm.
With this patchset, that was missing in recent kernel,
the tegra_drm case is not needed anymore:
http://patchwork.ozlabs.org/patch/361765/
http://www.spinics.net/lists/linux-tegra/msg17948.html
---
modules.d/50drm/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index e25fc9f..9a48aaf 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -57,7 +57,7 @@ installkernel() {
# as we could e.g. be in the installer; nokmsboot boot parameter will disable
# loading of the driver if needed
if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \
- | grep -qxf - /sys/bus/pci/devices/*/modalias 2>/dev/null; then
+ | grep -qxf - /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias 2>/dev/null; then
hostonly='' instmods $_modname
continue
fi

View File

@ -0,0 +1,31 @@
From b96ea1e196ae5706a68644a3679ee8c432b0b8f1 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 22:04:38 +0200
Subject: [PATCH] Categorize needed modules on ARM
---
modules.d/90kernel-modules/module-setup.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
index 1ce133f..f3e4f65 100755
--- a/modules.d/90kernel-modules/module-setup.sh
+++ b/modules.d/90kernel-modules/module-setup.sh
@@ -51,10 +51,13 @@ installkernel() {
if [[ "$(uname -p)" == arm* ]]; then
# arm specific modules
- hostonly='' instmods \
- connector-hdmi connector-dvi encoder-tfp410 \
- encoder-tpd12s015 i2c-tegra gpio-regulator \
- as3722-regulator orion-ehci ehci-tegra
+ instmods \
+ "=drivers/i2c/busses" \
+ "=drivers/regulator" \
+ "=drivers/rtc" \
+ "=drivers/usb/host" \
+ "=drivers/usb/phy" \
+ ${NULL}
fi
# install virtual machine support

View File

@ -0,0 +1,31 @@
From 49fe860b22afd355b67f5f3f2ee30d5a3f0d3f5f Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
Date: Mon, 4 Aug 2014 22:04:39 +0200
Subject: [PATCH] Introduce ARM specific modules needed by drm
---
modules.d/50drm/module-setup.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index 9a48aaf..a42bcba 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -51,6 +51,17 @@ installkernel() {
return 0
}
+ if [[ "$(uname -p)" == arm* ]]; then
+ # arm specific modules needed by drm
+ instmods \
+ "=drivers/gpu/drm/i2c" \
+ "=drivers/gpu/drm/panel" \
+ "=drivers/pwm" \
+ "=drivers/video/backlight" \
+ "=drivers/video/fbdev/omap2/displays-new" \
+ ${NULL}
+ fi
+
for _modname in $(find_kernel_modules_by_path drivers/gpu/drm \
| drm_module_filter) ; do
# if the hardware is present, include module even if it is not currently loaded,

View File

@ -0,0 +1,23 @@
From 9efb74a32d34533f7ccb201160ea0e40adc13987 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Aug 2014 12:36:04 +0200
Subject: [PATCH] dracut-functions.sh:get_persistent_dev(): use printf, instead
of echo
---
dracut-functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index b07063f..9286828 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -388,7 +388,7 @@ get_persistent_dev() {
return
fi
done
- echo $1
+ printf -- "%s" "$1"
}
expand_persistent_dev() {

View File

@ -0,0 +1,154 @@
From 80626ded3e849ba840ddd64c1713be5abb1c7449 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 3 Jul 2014 12:52:58 +0200
Subject: [PATCH] Generate reproducible initramfs images
With the same source of files, it should be possible to generate the
same image file with every dracut run.
To accomplish this, we modify the timestamps of the files we generate at
runtime, call gzip with "-n" and cpio with "--reproducible".
The cpio --reproducible option is not yet upstream though, so if you
feel like it should be then please nag at the cpio mailing list.
http://lists.gnu.org/archive/html/bug-cpio/2014-08/msg00000.html
---
dracut.8.asc | 3 +++
dracut.conf.5.asc | 3 +++
dracut.sh | 40 ++++++++++++++++++++++++++++++++++------
3 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/dracut.8.asc b/dracut.8.asc
index 51a4e9f..44530bd 100644
--- a/dracut.8.asc
+++ b/dracut.8.asc
@@ -412,6 +412,9 @@ will not be able to boot.
Do not compress the generated initramfs. This will override any other
compression options.
+**--reproducible**::
+ Create reproducible images.
+
**--list-modules**::
List all available dracut modules.
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
index 0b6be6a..9259951 100644
--- a/dracut.conf.5.asc
+++ b/dracut.conf.5.asc
@@ -179,6 +179,9 @@ provide a valid _/etc/fstab_.
*i18n_install_all=*"__{yes|no}__"::
Install everything regardless of generic or hostonly mode.
+*reproducible=*"__{yes|no}__"::
+ Create reproducible images.
+
Files
-----
_/etc/dracut.conf_::
diff --git a/dracut.sh b/dracut.sh
index 1844336..2cce85b 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -191,6 +191,7 @@ Creates initial ramdisk images for preloading modules
--printsize Print out the module install size
--sshkey [SSHKEY] Add ssh key to initramfs (use with ssh-client module)
--logfile [FILE] Logfile to use (overrides configuration setting)
+ --reproducible Create reproducible images
If [LIST] has multiple arguments, then you have to put these in quotes.
@@ -372,6 +373,7 @@ rearrange_params()
--long noimageifnotneeded \
--long early-microcode \
--long no-early-microcode \
+ --long reproducible \
-- "$@")
if (( $? != 0 )); then
@@ -557,7 +559,7 @@ while :; do
--printsize) printsize="yes";;
--regenerate-all) regenerate_all="yes";;
--noimageifnotneeded) noimageifnotneeded="yes";;
-
+ --reproducible) reproducible_l="yes";;
--) shift; break;;
*) # should not even reach this point
@@ -801,6 +803,8 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $early_microcode_l ]] && early_microcode=$early_microcode_l
[[ $early_microcode ]] || early_microcode=no
[[ $logfile_l ]] && logfile="$logfile_l"
+[[ $reproducible_l ]] && reproducible="$reproducible_l"
+
# eliminate IFS hackery when messing with fw_dir
fw_dir=${fw_dir//:/ }
@@ -810,7 +814,7 @@ case $compress in
bzip2) compress="bzip2 -9";;
lzma) compress="lzma -9 -T0";;
xz) compress="xz --check=crc32 --lzma2=dict=1MiB -T0";;
- gzip) compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";;
+ gzip) compress="gzip -n -9 --rsyncable"; command -v pigz > /dev/null 2>&1 && compress="pigz -9 -n -T -R";;
lzo) compress="lzop -9";;
lz4) compress="lz4 -l -9";;
esac
@@ -821,6 +825,8 @@ fi
[[ $hostonly = yes ]] && hostonly="-h"
[[ $hostonly != "-h" ]] && unset hostonly
+[[ $reproducible == yes ]] && DRACUT_REPRODUCIBLE=1
+
readonly TMPDIR="$tmpdir"
readonly initdir="$(mktemp --tmpdir="$TMPDIR/" -d -t initramfs.XXXXXX)"
[ -d "$initdir" ] || {
@@ -1498,7 +1504,7 @@ if [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]]; then
mkdir -p $_dest_dir
for table in $acpi_table_dir/*.aml; do
dinfo " Adding ACPI table: $table"
- cp $table $_dest_dir
+ cp -a $table $_dest_dir
create_early_cpio="yes"
done
fi
@@ -1512,15 +1518,37 @@ fi
rm -f -- "$outfile"
dinfo "*** Creating image file ***"
+if [[ $DRACUT_REPRODUCIBLE ]]; then
+ find "$initdir" -newer "$dracutbasedir/dracut-functions.sh" -print0 \
+ | xargs -r -0 touch -h -m -c -r "$dracutbasedir/dracut-functions.sh"
+
+ [[ "$(cpio --help)" == *--reproducible* ]] && CPIO_REPRODUCIBLE=1
+fi
+
[[ "$UID" != 0 ]] && cpio_owner_root="-R 0:0"
if [[ $create_early_cpio = yes ]]; then
echo 1 > "$early_cpio_dir/d/early_cpio"
+
+ if [[ $DRACUT_REPRODUCIBLE ]]; then
+ find "$early_cpio_dir/d" -newer "$dracutbasedir/dracut-functions.sh" -print0 \
+ | xargs -r -0 touch -h -m -c -r "$dracutbasedir/dracut-functions.sh"
+ fi
+
# The microcode blob is _before_ the initramfs blob, not after
- (cd "$early_cpio_dir/d"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet > $outfile)
+ (
+ cd "$early_cpio_dir/d"
+ find . -print0 | sort -z \
+ | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null $cpio_owner_root -H newc -o --quiet > $outfile
+ )
fi
-if ! ( umask 077; cd "$initdir"; find . -print0 | cpio --null $cpio_owner_root -H newc -o --quiet | \
- $compress >> "$outfile"; ); then
+
+if ! (
+ umask 077; cd "$initdir"
+ find . -print0 | sort -z \
+ | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null $cpio_owner_root -H newc -o --quiet \
+ | $compress >> "$outfile"
+ ); then
dfatal "dracut: creation of $outfile failed"
exit 1
fi

View File

@ -11,7 +11,7 @@
Name: dracut
Version: 038
Release: 14.git20140724%{?dist}
Release: 30.git20140815%{?dist}
Summary: Initramfs generator using udev
%if 0%{?fedora} || 0%{?rhel}
@ -30,8 +30,6 @@ URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
Patch1: 0001-modsign-do-not-hardcode-path-to-keyctl.patch
Patch2: 0002-lvm-module-setup.sh-check-for-existance-of-69-dm-lvm.patch
Patch3: 0003-dracut.sh-always-copy-prelink-files-in-FIPS-mode.patch
@ -45,6 +43,25 @@ Patch10: 0010-network-add-rd.route-parameter.patch
Patch11: 0011-add-install-optional-and-install_optional_items.patch
Patch12: 0012-test-TEST-30-ISCSI-add-rd.shell-to-client-root.patch
Patch13: 0013-dracut.sh-add-DRACUT_PATH.patch
Patch14: 0014-dracut.spec-fixed-license-file-packaging.patch
Patch15: 0015-NEWS-update.patch
Patch16: 0016-TEST-20-NFS-client-init.sh-add-shell-on-rd.shell.patch
Patch17: 0017-TEST-20-NFS-add-more-commands-and-fix-client-root-di.patch
Patch18: 0018-fixed-bridge-setup.patch
Patch19: 0019-test-make-testsuite-work-with-the-new-systemd-minima.patch
Patch20: 0020-bridging-update-the-ifcfg-files-generated-for-bridge.patch
Patch21: 0021-i18n-check-for-i18n_install_all-yes-rather-than-bein.patch
Patch22: 0022-dracut.usage.asc-extend-parameters-for-shutdown-debu.patch
Patch23: 0023-dracut.usage.asc-also-add-a-link-for-RHEL-7-storage-.patch
Patch24: 0024-dracut-functions-get_persistent_dev-fall-back-to-the.patch
Patch25: 0025-Test-soc-path-for-modalias-needed-by-drm.patch
Patch26: 0026-Categorize-needed-modules-on-ARM.patch
Patch27: 0027-Introduce-ARM-specific-modules-needed-by-drm.patch
Patch28: 0028-dracut-functions.sh-get_persistent_dev-use-printf-in.patch
Patch29: 0029-Generate-reproducible-initramfs-images.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
BuildRequires: bash git
@ -490,6 +507,9 @@ rm -rf -- $RPM_BUILD_ROOT
%endif
%changelog
* Fri Aug 15 2014 Harald Hoyer <harald@redhat.com> 038-30.git20140815
- git snapshot
* Thu Jul 24 2014 Harald Hoyer <harald@redhat.com> 038-14.git20140724
- fixed lvm modules issues
Resolves: rhbz#1118890