diff --git a/.gitignore b/.gitignore index 5fd2f30..d2f1955 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /dracut-042.tar.xz /dracut-043.tar.xz /dracut-044.tar.xz +/dracut-045.tar.xz diff --git a/0001-crypt-gpg-For-GnuPG-2.1-support-OpenPGP-smartcards.patch b/0001-crypt-gpg-For-GnuPG-2.1-support-OpenPGP-smartcards.patch new file mode 100644 index 0000000..8cdc3f3 --- /dev/null +++ b/0001-crypt-gpg-For-GnuPG-2.1-support-OpenPGP-smartcards.patch @@ -0,0 +1,98 @@ +From 2a1723ed83accdcb6871e12c722c03dac35dc35e Mon Sep 17 00:00:00 2001 +From: Moritz Maxeiner +Date: Fri, 10 Jul 2015 15:38:59 +0200 +Subject: [PATCH] crypt-gpg: For GnuPG >= 2.1 support OpenPGP smartcards + +--- + modules.d/91crypt-gpg/crypt-gpg-lib.sh | 34 ++++++++++++++++++++++++++++++++-- + modules.d/91crypt-gpg/module-setup.sh | 17 +++++++++++++++++ + 2 files changed, 49 insertions(+), 2 deletions(-) + +diff --git a/modules.d/91crypt-gpg/crypt-gpg-lib.sh b/modules.d/91crypt-gpg/crypt-gpg-lib.sh +index 5c7ea855..b85ed2b8 100755 +--- a/modules.d/91crypt-gpg/crypt-gpg-lib.sh ++++ b/modules.d/91crypt-gpg/crypt-gpg-lib.sh +@@ -4,7 +4,7 @@ command -v ask_for_password >/dev/null || . /lib/dracut-crypt-lib.sh + + # gpg_decrypt mnt_point keypath keydev device + # +-# Decrypts encrypted symmetrically key to standard output. ++# Decrypts symmetrically encrypted (password or OpenPGP smartcard) key to standard output. + # + # mnt_point - mount point where is already mounted + # keypath - GPG encrypted key path relative to +@@ -22,10 +22,40 @@ gpg_decrypt() { + + mkdir -m 0700 -p "$gpghome" + ++ # Setup GnuPG home and gpg-agent for usage of OpenPGP smartcard. ++ # This requires GnuPG >= 2.1, as it uses the new ,,pinentry-mode´´ ++ # feature, which - when set to ,,loopback´´ - allows us to pipe ++ # the smartcard's pin to GnuPG (instead of using a normal pinentry ++ # program needed with GnuPG < 2.1), making for uncomplicated ++ # integration with the existing codebase. ++ local useSmartcard="0" ++ local gpgMajorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* ([0-9]*).*|\1|p')" ++ local gpgMinorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* [0-9]*\.([0-9]*).*|\1|p')" ++ ++ if [ "${gpgMajorVersion}" -ge 2 ] && [ "${gpgMinorVersion}" -ge 1 ] \ ++ && [ -f /root/crypt-public-key.gpg ] && getargbool 1 rd.luks.smartcard ; then ++ useSmartcard="1" ++ echo "allow-loopback-pinentry" >> "$gpghome/gpg-agent.conf" ++ GNUPGHOME="$gpghome" gpg-agent --quiet --daemon ++ GNUPGHOME="$gpghome" gpg --quiet --no-tty --import < /root/crypt-public-key.gpg ++ local smartcardSerialNumber="$(GNUPGHOME=$gpghome gpg --no-tty --card-status \ ++ | sed -n -r -e 's|Serial number.*: ([0-9]*)|\1|p' | tr -d '\n')" ++ if [ -n "${smartcardSerialNumber}" ]; then ++ inputPrompt="PIN (OpenPGP card ${smartcardSerialNumber})" ++ fi ++ GNUPGHOME="$gpghome" gpg-connect-agent 1>/dev/null learn /bye ++ opts="$opts --pinentry-mode=loopback" ++ fi ++ + ask_for_password \ + --cmd "gpg $opts --decrypt $mntp/$keypath" \ +- --prompt "Password ($keypath on $keydev for $device)" \ ++ --prompt "${inputPrompt:-Password ($keypath on $keydev for $device)}" \ + --tries 3 --tty-echo-off + ++ # Clean up the smartcard gpg-agent ++ if [ "${useSmartcard}" == "1" ]; then ++ GNUPGHOME="$gpghome" gpg-connect-agent 1>/dev/null killagent /bye ++ fi ++ + rm -rf -- "$gpghome" + } +diff --git a/modules.d/91crypt-gpg/module-setup.sh b/modules.d/91crypt-gpg/module-setup.sh +index d328c04c..1323a181 100755 +--- a/modules.d/91crypt-gpg/module-setup.sh ++++ b/modules.d/91crypt-gpg/module-setup.sh +@@ -5,6 +5,12 @@ + check() { + require_binaries gpg || return 1 + ++ if [ -f "${initdir}/root/crypt-public-key.gpg" ]; then ++ require_binaries gpg-agent || return 1 ++ require_binaries gpg-connect-agent || return 1 ++ require_binaries /usr/libexec/scdaemon || return 1 ++ fi ++ + return 255 + } + +@@ -17,4 +23,15 @@ depends() { + install() { + inst_multiple gpg + inst "$moddir/crypt-gpg-lib.sh" "/lib/dracut-crypt-gpg-lib.sh" ++ ++ local gpgMajorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* ([0-9]*).*|\1|p')" ++ local gpgMinorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* [0-9]*\.([0-9]*).*|\1|p')" ++ if [ "${gpgMajorVersion}" -ge 2 ] && [ "${gpgMinorVersion}" -ge 1 ] && [ -f /etc/dracut.conf.d/crypt-public-key.gpg ]; then ++ inst_multiple gpg-agent ++ inst_multiple gpg-connect-agent ++ inst_multiple /usr/libexec/scdaemon || derror "crypt-gpg: gnugpg with scdaemon required for smartcard support in the initramfs" ++ cp "/etc/dracut.conf.d/crypt-public-key.gpg" "${initdir}/root/" ++ elif [ -f /etc/dracut.conf.d/crypt-public-key.gpg ]; then ++ dwarning "crypt-gpg: gnupg >= 2.1 required for smartcard support in the initramfs" ++ fi + } diff --git a/0001-dmsquash-live-dmsquash-live-root.sh-fixed-typo.patch b/0001-dmsquash-live-dmsquash-live-root.sh-fixed-typo.patch deleted file mode 100644 index d551b94..0000000 --- a/0001-dmsquash-live-dmsquash-live-root.sh-fixed-typo.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 6ed1d9fd07d7b081296aab687e07653f0eb295e3 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 26 Nov 2015 15:50:39 +0100 -Subject: [PATCH] dmsquash-live/dmsquash-live-root.sh: fixed typo - ---- - modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index ffa1e7a..fa44a03 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -249,7 +249,7 @@ if [ -n "$FSIMG" ] ; then - else - unpack_archive $FSIMG /run/initramfs/fsimg/ - fi -- FSIMG = /run/initramfs/fsimg/rootfs.img -+ FSIMG=/run/initramfs/fsimg/rootfs.img - fi - if [ -n "$writable_fsimg" ] || [ -z "$SQUASHED" -a -n "$live_ram" ] || - [ "$overlay" = none -o "$overlay" = None -o "$overlay" = NONE ]; then diff --git a/0002-crypt-gpg-Add-README-describing-the-procedure-of-mov.patch b/0002-crypt-gpg-Add-README-describing-the-procedure-of-mov.patch new file mode 100644 index 0000000..88a40e3 --- /dev/null +++ b/0002-crypt-gpg-Add-README-describing-the-procedure-of-mov.patch @@ -0,0 +1,67 @@ +From 98047e08d02b91f632ec8554fc02af05069216dd Mon Sep 17 00:00:00 2001 +From: Moritz Maxeiner +Date: Mon, 13 Jul 2015 17:53:29 +0200 +Subject: [PATCH] crypt-gpg: Add README describing the procedure of moving from + password-only gpg keyfile to password/smartcard gpg keyfile + +--- + modules.d/91crypt-gpg/README | 50 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + create mode 100644 modules.d/91crypt-gpg/README + +diff --git a/modules.d/91crypt-gpg/README b/modules.d/91crypt-gpg/README +new file mode 100644 +index 00000000..be6df55a +--- /dev/null ++++ b/modules.d/91crypt-gpg/README +@@ -0,0 +1,50 @@ ++# Directions for changing a system from password-based gpg keyfile ++# to smartcard-based gpg keyfile ++ ++# Be sure that you meet the following requirements: ++# 1. GnuPG >= 2.1 installed with ++# * Smartcard support enabled (scdaemon must be built) ++# * Direct CCID access built into scdaemon ++# 2. A password-based gpg keyfile ${KEYFILE} (e.g. "keyfile.gpg"): ++# That is, a file containing the slot key for LUKS, which ++# has been encrypted symmetrically with GnuPG using ++# a password. ++# 3. Your public OpenPGP identity ${RECIPIENT} (e.g. "3A696356") ++# 4. An OpenPGP smartcard holding the decryption key associated ++# with your public identity ++# 5. A CCID smartcard reader ++ ++# Notes: Requirement 4. and 5. can of course be one device, e.g. ++# a USB token with an integrated OpenPGP smartcard ++ ++# Make a backup of your keyfile (assuming it lies on the boot partition) ++$ cp /boot/${KEYFILE} /safe/place/keyfile.bak.gpg ++ ++# Change your keyfile from purely password-based to both ++# password-based and key-based (you can then decrypt the keyfile ++# with either method). As an example aes256 is chosen, the cipher ++# is not important to this guide, but do note that your kernel ++# must support it at boot time (be it built into the kernel image ++# or loaded as a module from the initramfs). ++$ cat /safe/place/keyfile.bak.gpg | gpg -d | gpg --encrypt --recipient ${RECIPIENT} --cipher-algo aes256 --armor -c > /safe/place/keyfile_sc.gpg ++ ++# Verify that you can decrypt your new keyfile both with the password ++# and your smartcard. ++# (with smartcard inserted, you should be prompted for your PIN, unless ++# you already did so and have not yet timed out) ++$ gpg -d /safe/place/keyfile_sc.gpg ++# (with smartcard disconnected, you should be prompted for your password) ++$ gpg -d /safe/place/keyfile_sc.gpg ++ ++# After verification, replace your old keyfile with your new one ++$ su -c 'cp /safe/place/keyfile_sc.gpg /boot/${KEYFILE}' ++ ++# Export your public key to where crypt-gpg can find it ++$ gpg --armor --export-options export-minimal --export ${RECIPIENT} > /safe/place/crypt-public-key.gpg ++$ su -c 'cp /safe/place/crypt-public-key.gpg /etc/dracut.conf.d/crypt-public-key.gpg' ++ ++# Rebuild your initramfs as usual ++# When booting with any of the requirements not met, crypt-gpg will default to password-based keyfile unlocking. ++# If all requirements are met and smartcard support is not disabled by setting the kernel option "rd.luks.smartcard=0" ++# crypt-gpg will try find and use a connected OpenPGP smartcard by prompting you for the PIN and then ++# unlocking the gpg keyfile with the smartcard. diff --git a/0002-dmraid-61-dmraid-imsm.rules-add-nowatch-option-for-u.patch b/0002-dmraid-61-dmraid-imsm.rules-add-nowatch-option-for-u.patch deleted file mode 100644 index fee2437..0000000 --- a/0002-dmraid-61-dmraid-imsm.rules-add-nowatch-option-for-u.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 5d8d0ac814e015e4ad35a7e40a92b9f0bb554301 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 26 Nov 2015 17:46:03 +0100 -Subject: [PATCH] dmraid/61-dmraid-imsm.rules: add nowatch option for udev - -udev rereads partitions, if watch is set for disks ---- - modules.d/90dmraid/61-dmraid-imsm.rules | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules -index 0193fbc..4d4d939 100644 ---- a/modules.d/90dmraid/61-dmraid-imsm.rules -+++ b/modules.d/90dmraid/61-dmraid-imsm.rules -@@ -16,6 +16,8 @@ ENV{ID_FS_TYPE}=="ddf_raid_member", ENV{rd_NO_MDDDF}!="?*", GOTO="dm_end" - - ENV{rd_NO_DM}=="?*", GOTO="dm_end" - -+OPTIONS:="nowatch" -+ - ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="dm_end" - - PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && exit 0; done; exit 1;' ", \ diff --git a/0003-crypt-gpg-Rework-setup-for-CCID-smartcard-support.patch b/0003-crypt-gpg-Rework-setup-for-CCID-smartcard-support.patch new file mode 100644 index 0000000..fcea9b9 --- /dev/null +++ b/0003-crypt-gpg-Rework-setup-for-CCID-smartcard-support.patch @@ -0,0 +1,74 @@ +From 0982fcb2e5ae334790851fa8ff7cf65281842ad1 Mon Sep 17 00:00:00 2001 +From: Moritz Maxeiner +Date: Thu, 30 Mar 2017 14:17:05 +0200 +Subject: [PATCH] crypt-gpg: Rework setup for CCID smartcard support + +--- + modules.d/91crypt-gpg/module-setup.sh | 46 ++++++++++++++++++++++++++--------- + 1 file changed, 35 insertions(+), 11 deletions(-) + +diff --git a/modules.d/91crypt-gpg/module-setup.sh b/modules.d/91crypt-gpg/module-setup.sh +index 1323a181..bb34676f 100755 +--- a/modules.d/91crypt-gpg/module-setup.sh ++++ b/modules.d/91crypt-gpg/module-setup.sh +@@ -5,10 +5,11 @@ + check() { + require_binaries gpg || return 1 + +- if [ -f "${initdir}/root/crypt-public-key.gpg" ]; then +- require_binaries gpg-agent || return 1 +- require_binaries gpg-connect-agent || return 1 +- require_binaries /usr/libexec/scdaemon || return 1 ++ if sc_requested; then ++ if ! sc_supported; then ++ dwarning "crypt-gpg: GnuPG >= 2.1 with scdaemon and libusb required for ccid smartcard support" ++ return 1 ++ fi + fi + + return 255 +@@ -24,14 +25,37 @@ install() { + inst_multiple gpg + inst "$moddir/crypt-gpg-lib.sh" "/lib/dracut-crypt-gpg-lib.sh" + +- local gpgMajorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* ([0-9]*).*|\1|p')" +- local gpgMinorVersion="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* [0-9]*\.([0-9]*).*|\1|p')" +- if [ "${gpgMajorVersion}" -ge 2 ] && [ "${gpgMinorVersion}" -ge 1 ] && [ -f /etc/dracut.conf.d/crypt-public-key.gpg ]; then ++ if sc_requested; then + inst_multiple gpg-agent + inst_multiple gpg-connect-agent +- inst_multiple /usr/libexec/scdaemon || derror "crypt-gpg: gnugpg with scdaemon required for smartcard support in the initramfs" +- cp "/etc/dracut.conf.d/crypt-public-key.gpg" "${initdir}/root/" +- elif [ -f /etc/dracut.conf.d/crypt-public-key.gpg ]; then +- dwarning "crypt-gpg: gnupg >= 2.1 required for smartcard support in the initramfs" ++ inst_multiple /usr/libexec/scdaemon ++ cp "$(sc_public_key)" "${initdir}/root/" ++ fi ++} ++ ++sc_public_key() { ++ echo -n "/etc/dracut.conf.d/crypt-public-key.gpg" ++} ++ ++# CCID Smartcard support requires GnuPG >= 2.1 with scdaemon and libusb ++sc_supported() { ++ local gpgMajor="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* ([0-9]*).*|\1|p')" ++ local gpgMinor="$(gpg --version | sed -n 1p | sed -n -r -e 's|.* [0-9]*\.([0-9]*).*|\1|p')" ++ if [[ "${gpgMajor}" -gt 2 || "${gpgMajor}" -eq 2 && "${gpgMinor}" -ge 1 ]] && \ ++ require_binaries gpg-agent && ++ require_binaries gpg-connect-agent && ++ require_binaries /usr/libexec/scdaemon && ++ (ldd /usr/libexec/scdaemon | grep libusb > /dev/null); then ++ return 0 ++ else ++ return 1 ++ fi ++} ++ ++sc_requested() { ++ if [ -f "$(sc_public_key)" ]; then ++ return 0 ++ else ++ return 1 + fi + } diff --git a/0003-livenet-livenet-generator.sh-mode-0755.patch b/0003-livenet-livenet-generator.sh-mode-0755.patch deleted file mode 100644 index 48b4a63..0000000 --- a/0003-livenet-livenet-generator.sh-mode-0755.patch +++ /dev/null @@ -1,13 +0,0 @@ -From 88ba9372be6b8011bbf4b59bdc290c62e6d01972 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 27 Nov 2015 09:44:24 +0100 -Subject: [PATCH] livenet/livenet-generator.sh: mode 0755 - ---- - modules.d/90livenet/livenet-generator.sh | 0 - 1 file changed, 0 insertions(+), 0 deletions(-) - mode change 100644 => 100755 modules.d/90livenet/livenet-generator.sh - -diff --git a/modules.d/90livenet/livenet-generator.sh b/modules.d/90livenet/livenet-generator.sh -old mode 100644 -new mode 100755 diff --git a/0004-crypt-gpg-Include-module-if-CCID-smartcard-support-r.patch b/0004-crypt-gpg-Include-module-if-CCID-smartcard-support-r.patch new file mode 100644 index 0000000..00ac3ac --- /dev/null +++ b/0004-crypt-gpg-Include-module-if-CCID-smartcard-support-r.patch @@ -0,0 +1,21 @@ +From 0e1b686b8367925b21c76b9d9e36bf7d2f6b89ac Mon Sep 17 00:00:00 2001 +From: Moritz Maxeiner +Date: Thu, 30 Mar 2017 14:54:26 +0200 +Subject: [PATCH] crypt-gpg: Include module if CCID smartcard support requested + +--- + modules.d/91crypt-gpg/module-setup.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/91crypt-gpg/module-setup.sh b/modules.d/91crypt-gpg/module-setup.sh +index bb34676f..f1c6a34b 100755 +--- a/modules.d/91crypt-gpg/module-setup.sh ++++ b/modules.d/91crypt-gpg/module-setup.sh +@@ -10,6 +10,7 @@ check() { + dwarning "crypt-gpg: GnuPG >= 2.1 with scdaemon and libusb required for ccid smartcard support" + return 1 + fi ++ return 0 + fi + + return 255 diff --git a/0004-shutdown-guard-against-read-only-run.patch b/0004-shutdown-guard-against-read-only-run.patch deleted file mode 100644 index 24e9a17..0000000 --- a/0004-shutdown-guard-against-read-only-run.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 54e09dfb72b557ac8ccd48f5d37089287d272ec7 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 30 Nov 2015 11:27:03 +0100 -Subject: [PATCH] shutdown: guard against read-only /run - -remount the switch rooted /run writeable again. ---- - modules.d/99shutdown/module-setup.sh | 2 +- - modules.d/99shutdown/shutdown.sh | 4 ++++ - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/modules.d/99shutdown/module-setup.sh b/modules.d/99shutdown/module-setup.sh -index b80a82c..5cb3594 100755 ---- a/modules.d/99shutdown/module-setup.sh -+++ b/modules.d/99shutdown/module-setup.sh -@@ -14,7 +14,7 @@ depends() { - # called by dracut - install() { - local _d -- inst_multiple umount poweroff reboot halt losetup -+ inst_multiple umount poweroff reboot halt losetup stat - inst_multiple -o kexec - inst "$moddir/shutdown.sh" "$prefix/shutdown" - [ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib -diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh -index afee051..918a8a4 100755 ---- a/modules.d/99shutdown/shutdown.sh -+++ b/modules.d/99shutdown/shutdown.sh -@@ -12,6 +12,10 @@ export TERM=linux - export PATH=/usr/sbin:/usr/bin:/sbin:/bin - . /lib/dracut-lib.sh - -+if [ "$(stat -c '%T' -f /)" = "tmpfs" ]; then -+ mount -o remount,rw / -+fi -+ - mkdir /oldsys - for i in sys proc run dev; do - mkdir /oldsys/$i diff --git a/0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch b/0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch deleted file mode 100644 index dfea06c..0000000 --- a/0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ce9a398771d6e8503d767b450282db52b7a4b482 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 1 Dec 2015 08:52:00 +0100 -Subject: [PATCH] dmsquash-live/dmsquash-live-root.sh: SQUASHED can be set - earlier - -8b5ee88ff667693b2d8da85a8552ad8f5ab95127 removed the check for SQUASHED, -assuming, that the if clause above was the only place, where SQUASHED is -set. - -This patch reverts to the old logic, because SQUASHED can be set -earlier. ---- - modules.d/90dmsquash-live/dmsquash-live-root.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index fa44a03..68d076c 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -203,6 +203,9 @@ fi - # we might have an embedded fs image on squashfs (compressed live) - if [ -e /run/initramfs/live/${live_dir}/${squash_image} ]; then - SQUASHED="/run/initramfs/live/${live_dir}/${squash_image}" -+fi -+ -+if [ -e "$SQUASHED" ] ; then - if [ -n "$live_ram" ]; then - echo "Copying live image to RAM..." - echo "(this may take a few minutes)" diff --git a/0005-wait-for-IPv6-RA-if-using-none-static-IPv6-assignmen.patch b/0005-wait-for-IPv6-RA-if-using-none-static-IPv6-assignmen.patch new file mode 100644 index 0000000..ac8c0a7 --- /dev/null +++ b/0005-wait-for-IPv6-RA-if-using-none-static-IPv6-assignmen.patch @@ -0,0 +1,21 @@ +From c603419030136570b5944dc4620f62d07b9e82bb Mon Sep 17 00:00:00 2001 +From: pallotron +Date: Tue, 4 Apr 2017 08:31:21 -0700 +Subject: [PATCH] wait for IPv6 RA if using none/static IPv6 assignment + +--- + modules.d/40network/net-lib.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 75051544..b74fdbdd 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -671,6 +671,7 @@ wait_for_ipv6_dad() { + + while [ $cnt -lt $timeout ]; do + [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1")" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ + && return 1 diff --git a/0006-enabling-some-ipv6-config-before-running-wait_for_ip.patch b/0006-enabling-some-ipv6-config-before-running-wait_for_ip.patch new file mode 100644 index 0000000..d7deaae --- /dev/null +++ b/0006-enabling-some-ipv6-config-before-running-wait_for_ip.patch @@ -0,0 +1,23 @@ +From 4c3d99f9665118198ec68a93ecdcc15c88e23c98 Mon Sep 17 00:00:00 2001 +From: pallotron +Date: Tue, 4 Apr 2017 12:59:45 -0700 +Subject: [PATCH] enabling some ipv6 config before running wait_for_ipv6_dad + +--- + modules.d/40network/ifup.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index fd721e74..f979b59b 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -108,6 +108,9 @@ do_static() { + if strglobin $ip '*:*:*'; then + # note no ip addr flush for ipv6 + ip addr add $ip/$mask ${srv:+peer $srv} dev $netif ++ echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding ++ echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra ++ echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects + wait_for_ipv6_dad $netif + else + if command -v arping2 >/dev/null; then diff --git a/0006-kernel-modules-include-all-HID-driver-in-hostonly-mo.patch b/0006-kernel-modules-include-all-HID-driver-in-hostonly-mo.patch deleted file mode 100644 index a1668bc..0000000 --- a/0006-kernel-modules-include-all-HID-driver-in-hostonly-mo.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 8d26b5661ea2fd9fb41c83048b7590e44b1c95df Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 9 Dec 2015 14:14:46 +0100 -Subject: [PATCH] kernel-modules: include all HID driver in hostonly mode - -If a kernel is updated in the undocked state and later on docked, some -keyboard modules can be missing. - -Thus include all HID drivers. ---- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 41bf37d..c5f2397 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -41,7 +41,7 @@ installkernel() { - uhci-hcd \ - xhci-hcd xhci-pci xhci-plat-hcd - -- instmods \ -+ hostonly='' instmods \ - "=drivers/hid" \ - "=drivers/input/serio" \ - "=drivers/input/keyboard" diff --git a/0007-more-ipv6-improvements.patch b/0007-more-ipv6-improvements.patch new file mode 100644 index 0000000..2d09117 --- /dev/null +++ b/0007-more-ipv6-improvements.patch @@ -0,0 +1,45 @@ +From 96b708e178930b0891daab8dcc9d1d7375637a29 Mon Sep 17 00:00:00 2001 +From: pallotron +Date: Wed, 5 Apr 2017 00:15:16 -0700 +Subject: [PATCH] more ipv6 improvements + +--- + modules.d/40network/net-lib.sh | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index b74fdbdd..e0f761f3 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -653,7 +653,9 @@ wait_for_ipv6_dad_link() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do ++ echo "wait_for_ipv6_dad_link..." 1>&2 + [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ + && return 1 +@@ -670,8 +672,9 @@ wait_for_ipv6_dad() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do ++ echo "wait_for_ipv6_dad..." 1>&2 + [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ +- && [ -n "$(ip -6 route list proto ra dev "$1")" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ + && return 1 +@@ -688,8 +691,9 @@ wait_for_ipv6_auto() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do ++ echo "wait_for_ipv6_auto..." 1>&2 + [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ +- && [ -n "$(ip -6 route list proto ra dev "$1")" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ + && return 0 + sleep 0.1 + cnt=$(($cnt+1)) diff --git a/0007-systemd-include-machine-info.patch b/0007-systemd-include-machine-info.patch deleted file mode 100644 index 751d32f..0000000 --- a/0007-systemd-include-machine-info.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 4bcd41389cabe7a41c4bb3a17eaf668b12cc0668 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Dec 2015 11:16:12 +0100 -Subject: [PATCH] systemd: include machine-info - ---- - modules.d/00systemd/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index 50b3b8c..ed59beb 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -162,6 +162,7 @@ install() { - /etc/systemd/system.conf \ - /etc/hostname \ - /etc/machine-id \ -+ /etc/machine-info \ - /etc/vconsole.conf \ - /etc/locale.conf \ - /etc/modules-load.d/*.conf \ diff --git a/0008-livenet-module-setup.sh-only-include-systemd-generat.patch b/0008-livenet-module-setup.sh-only-include-systemd-generat.patch deleted file mode 100644 index 94d5a3d..0000000 --- a/0008-livenet-module-setup.sh-only-include-systemd-generat.patch +++ /dev/null @@ -1,24 +0,0 @@ -From efd3a6db74ebcc453e216966a5914b63e2b29aff Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Dec 2015 11:16:42 +0100 -Subject: [PATCH] livenet/module-setup.sh: only include systemd generator if - systemd included - ---- - modules.d/90livenet/module-setup.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules.d/90livenet/module-setup.sh b/modules.d/90livenet/module-setup.sh -index 3a8d4ba..11738b8 100755 ---- a/modules.d/90livenet/module-setup.sh -+++ b/modules.d/90livenet/module-setup.sh -@@ -17,6 +17,8 @@ install() { - inst_hook cmdline 29 "$moddir/parse-livenet.sh" - inst_hook initqueue/online 95 "$moddir/fetch-liveupdate.sh" - inst_script "$moddir/livenetroot.sh" "/sbin/livenetroot" -- inst_script "$moddir/livenet-generator.sh" $systemdutildir/system-generators/dracut-livenet-generator -+ if dracut_module_included "systemd-initrd"; then -+ inst_script "$moddir/livenet-generator.sh" $systemdutildir/system-generators/dracut-livenet-generator -+ fi - dracut_need_initqueue - } diff --git a/0008-remove-prints.patch b/0008-remove-prints.patch new file mode 100644 index 0000000..27b48d6 --- /dev/null +++ b/0008-remove-prints.patch @@ -0,0 +1,37 @@ +From a0545765e8cec749e59a664ef09944786132327b Mon Sep 17 00:00:00 2001 +From: pallotron +Date: Wed, 5 Apr 2017 00:16:16 -0700 +Subject: [PATCH] remove prints + +--- + modules.d/40network/net-lib.sh | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index e0f761f3..fea45be2 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -653,7 +653,6 @@ wait_for_ipv6_dad_link() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- echo "wait_for_ipv6_dad_link..." 1>&2 + [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ + && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ + && return 0 +@@ -672,7 +671,6 @@ wait_for_ipv6_dad() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- echo "wait_for_ipv6_dad..." 1>&2 + [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ + && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ + && return 0 +@@ -691,7 +689,6 @@ wait_for_ipv6_auto() { + timeout=$(($timeout*10)) + + while [ $cnt -lt $timeout ]; do +- echo "wait_for_ipv6_auto..." 1>&2 + [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ + && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ + && return 0 diff --git a/0009-more-ipv6-improvements.patch b/0009-more-ipv6-improvements.patch new file mode 100644 index 0000000..5fc38a0 --- /dev/null +++ b/0009-more-ipv6-improvements.patch @@ -0,0 +1,40 @@ +From 031e2f7bb8aea447cd87e455b184106acb4aa435 Mon Sep 17 00:00:00 2001 +From: pallotron +Date: Wed, 5 Apr 2017 00:23:36 -0700 +Subject: [PATCH] more ipv6 improvements + +--- + modules.d/40network/net-lib.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index fea45be2..71a665cd 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -654,7 +654,7 @@ wait_for_ipv6_dad_link() { + + while [ $cnt -lt $timeout ]; do + [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ +- && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ + && return 1 +@@ -672,7 +672,7 @@ wait_for_ipv6_dad() { + + while [ $cnt -lt $timeout ]; do + [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ +- && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ + && return 1 +@@ -690,7 +690,7 @@ wait_for_ipv6_auto() { + + while [ $cnt -lt $timeout ]; do + [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ +- && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \ ++ && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \ + && return 0 + sleep 0.1 + cnt=$(($cnt+1)) diff --git a/0009-network-fix-carrier-detection.patch b/0009-network-fix-carrier-detection.patch deleted file mode 100644 index 514d942..0000000 --- a/0009-network-fix-carrier-detection.patch +++ /dev/null @@ -1,167 +0,0 @@ -From df95b1003c8e7564da73de92403013763eb028fe Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Dec 2015 13:10:05 +0100 -Subject: [PATCH] network: fix carrier detection - -rename iface_has_link() to iface_has_carrier() to clarify usage - -Only assign static "wildcard interface" settings, if the interface has a -carrier. - -If the interface name was specified with a name, do not do carrier -checking for static configurations. ---- - modules.d/40network/ifup.sh | 42 ++++++++++++++++++++----------------- - modules.d/40network/net-lib.sh | 47 ++++++++++++++++++++++++++---------------- - 2 files changed, 52 insertions(+), 37 deletions(-) - -diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh -index 109fb4b..eca7478 100755 ---- a/modules.d/40network/ifup.sh -+++ b/modules.d/40network/ifup.sh -@@ -100,7 +100,7 @@ do_dhcp() { - - [ -e /tmp/dhclient.$netif.pid ] && return 0 - -- if ! iface_has_link $netif; then -+ if ! iface_has_carrier $netif; then - warn "No carrier detected on interface $netif" - return 1 - fi -@@ -150,7 +150,10 @@ do_ipv6auto() { - do_static() { - strglobin $ip '*:*:*' && load_ipv6 - -- if ! linkup $netif; then -+ if [ -z "$dev" ] && ! iface_has_carrier "$netif"; then -+ warn "No carrier detected on interface $netif" -+ return 1 -+ elif ! linkup "$netif"; then - warn "Could not bring interface $netif up!" - return 1 - fi -@@ -375,27 +378,28 @@ for p in $(getargs ip=); do - done - ret=$? - -- > /tmp/net.${netif}.up -+ if [ $ret -eq 0 ]; then -+ > /tmp/net.${netif}.up - -- if [ -e /sys/class/net/${netif}/address ]; then -- > /tmp/net.$(cat /sys/class/net/${netif}/address).up -- fi -+ if [ -e /sys/class/net/${netif}/address ]; then -+ > /tmp/net.$(cat /sys/class/net/${netif}/address).up -+ fi - -- case $autoconf in -- dhcp|on|any|dhcp6) -+ case $autoconf in -+ dhcp|on|any|dhcp6) - ;; -- *) -- if [ $ret -eq 0 ]; then -- setup_net $netif -- source_hook initqueue/online $netif -- if [ -z "$manualup" ]; then -- /sbin/netroot $netif -+ *) -+ if [ $ret -eq 0 ]; then -+ setup_net $netif -+ source_hook initqueue/online $netif -+ if [ -z "$manualup" ]; then -+ /sbin/netroot $netif -+ fi - fi -- fi -- ;; -- esac -- -- exit 0 -+ ;; -+ esac -+ exit $ret -+ fi - done - - # netif isn't the top stack? Then we should exit here. -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 135c378..256826e 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -537,22 +537,20 @@ wait_for_if_up() { - - while [ $cnt -lt $timeout ]; do - li=$(ip -o link show up dev $1) -- if ! strstr "$li" "NO-CARRIER"; then -- if [ -n "$li" ]; then -- case "$li" in -- *\*) -- return 0;; -- *\<*,UP,*\>*) -- return 0;; -- esac -- fi -- if strstr "$li" "LOWER_UP" \ -- && strstr "$li" "state UNKNOWN" \ -- && ! strstr "$li" "DORMANT"; then -- return 0 -- fi -+ if [ -n "$li" ]; then -+ case "$li" in -+ *\*) -+ return 0;; -+ *\<*,UP,*\>*) -+ return 0;; -+ esac -+ fi -+ if strstr "$li" "LOWER_UP" \ -+ && strstr "$li" "state UNKNOWN" \ -+ && ! strstr "$li" "DORMANT"; then -+ return 0 - fi - sleep 0.1 - cnt=$(($cnt+1)) -@@ -620,7 +618,7 @@ type hostname >/dev/null 2>&1 || \ - cat /proc/sys/kernel/hostname - } - --iface_has_link() { -+iface_has_carrier() { - local cnt=0 - local interface="$1" flags="" - [ -n "$interface" ] || return 2 -@@ -631,14 +629,27 @@ iface_has_link() { - timeout=$(($timeout*10)) - - linkup "$1" -+ -+ li=$(ip -o link show up dev $1) -+ strstr "$li" "NO-CARRIER" && _no_carrier_flag=1 -+ - while [ $cnt -lt $timeout ]; do -- [ "$(cat $interface/carrier)" = 1 ] && return 0 -+ if [ -n "$_no_carrier_flag" ]; then -+ # NO-CARRIER flag was cleared -+ strstr "$li" "NO-CARRIER" || return 0 -+ fi -+ # double check the syscfs carrier flag -+ [ -e "$interface/carrier" ] && [ "$(cat $interface/carrier)" = 1 ] && return 0 - sleep 0.1 - cnt=$(($cnt+1)) - done - return 1 - } - -+iface_has_link() { -+ iface_has_carrier "$@" -+} -+ - find_iface_with_link() { - local iface_path="" iface="" - for iface_path in /sys/class/net/*; do diff --git a/0010-dmsquash-live-root-Avoid-mount-source-conflict-on-BA.patch b/0010-dmsquash-live-root-Avoid-mount-source-conflict-on-BA.patch new file mode 100644 index 0000000..791495d --- /dev/null +++ b/0010-dmsquash-live-root-Avoid-mount-source-conflict-on-BA.patch @@ -0,0 +1,33 @@ +From ea765c0ee17178fe74c73873505f7c86f40f9ec7 Mon Sep 17 00:00:00 2001 +From: Frederick Grose +Date: Sat, 8 Apr 2017 21:01:19 -0400 +Subject: [PATCH] dmsquash-live-root: Avoid mount source conflict on + $BASE_LOOPDEV. + +The newer mount utilities are more strict about directly shared +devices. For OverlayFS boots, which mount $BASE_LOOPDEV directly, +avoid a mount error by indirectly sharing the read-only base +filesystem through a second, over-attached $BASE_LOOPDEV for +the DM live-base target. +--- + modules.d/90dmsquash-live/dmsquash-live-root.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh +index 264983f5..3a25465c 100755 +--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh ++++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh +@@ -241,7 +241,12 @@ do_live_overlay() { + fi + + # Create a device that always points to a ro base image +- echo 0 $sz linear $BASE_LOOPDEV 0 | dmsetup create --readonly live-base ++ if [ -n "$overlayfs" ]; then ++ BASE_LOOPDUP=$(losetup -f --show -r $BASE_LOOPDEV) ++ echo 0 $sz linear $BASE_LOOPDUP 0 | dmsetup create --readonly live-base ++ else ++ echo 0 $sz linear $BASE_LOOPDEV 0 | dmsetup create --readonly live-base ++ fi + } + + # we might have a genMinInstDelta delta file for anaconda to take advantage of diff --git a/0010-nbd-add-systemd-generator-and-use-nbd-export-names-i.patch b/0010-nbd-add-systemd-generator-and-use-nbd-export-names-i.patch deleted file mode 100644 index d263e42..0000000 --- a/0010-nbd-add-systemd-generator-and-use-nbd-export-names-i.patch +++ /dev/null @@ -1,287 +0,0 @@ -From b070c1d360e86db69a8049b2f040b8223bc484c9 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Dec 2015 13:10:33 +0100 -Subject: [PATCH] nbd: add systemd generator and use nbd export names instead - of port numbers - -Add a systemd generator for root=nbd:.. so that systemd has a correct -sysroot.mount unit. - -Use export names instead of port numbers, because port number based -exports are deprecated and were removed. ---- - dracut.cmdline.7.asc | 14 +++++++++++--- - modules.d/95nbd/module-setup.sh | 3 +++ - modules.d/95nbd/nbdroot.sh | 11 +++++------ - modules.d/95nbd/parse-nbdroot.sh | 10 ++++++++-- - test/TEST-40-NBD/dhcpd.conf | 10 +++++----- - test/TEST-40-NBD/server-init.sh | 3 +-- - test/TEST-40-NBD/test.sh | 41 ++++++++++++++++++++++++---------------- - 7 files changed, 58 insertions(+), 34 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index c34b45b..e160e3b 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -755,13 +755,21 @@ NOTE: letters in the MAC-address must be lowercase! - - NBD - ~~~ --**root=**??? **netroot=**nbd:____:____[:____[:____[:____]]]:: -- mount nbd share from -+**root=**??? **netroot=**nbd:____:____[:____[:____[:____]]]:: -+ mount nbd share from . -++ -+NOTE: -+ If "exportname" instead of "port" is given the standard port is used. -+ Newer versions of nbd are only supported with "exportname". - --**root=dhcp** with **dhcp** **root-path=**nbd:____:____[:____[:____[:____]]]:: -+**root=dhcp** with **dhcp** **root-path=**nbd:____:____[:____[:____[:____]]]:: - root=dhcp alone directs initrd to look at the DHCP root-path where NBD - options can be specified. This syntax is only usable in cases where you are - directly mounting the volume as the rootfs. -++ -+NOTE: -+ If "exportname" instead of "port" is given the standard port is used. -+ Newer versions of nbd are only supported with "exportname". - - DASD - ~~~~ -diff --git a/modules.d/95nbd/module-setup.sh b/modules.d/95nbd/module-setup.sh -index 3cb6f49..22f6a3b 100755 ---- a/modules.d/95nbd/module-setup.sh -+++ b/modules.d/95nbd/module-setup.sh -@@ -34,6 +34,9 @@ install() { - inst nbd-client - inst_hook cmdline 90 "$moddir/parse-nbdroot.sh" - inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot" -+ if dracut_module_included "systemd-initrd"; then -+ inst_script "$moddir/nbd-generator.sh" $systemdutildir/system-generators/dracut-nbd-generator -+ fi - dracut_need_initqueue - } - -diff --git a/modules.d/95nbd/nbdroot.sh b/modules.d/95nbd/nbdroot.sh -index dd2bb55..7057f23 100755 ---- a/modules.d/95nbd/nbdroot.sh -+++ b/modules.d/95nbd/nbdroot.sh -@@ -28,11 +28,6 @@ nbdfstype=${nroot%%:*}; nroot=${nroot#*:} - nbdflags=${nroot%%:*} - nbdopts=${nroot#*:} - --# If nbdport not an integer, then assume name based import --if [ ! -z $(echo "$nbdport" | sed 's/[0-9]//g') ]; then -- nbdport="-N $nbdport" --fi -- - if [ "$nbdopts" = "$nbdflags" ]; then - unset nbdopts - fi -@@ -113,7 +108,11 @@ if strstr "$(nbd-client --help 2>&1)" "systemd-mark"; then - preopts="--systemd-mark $preopts" - fi - --nbd-client $preopts "$nbdserver" $nbdport /dev/nbd0 $opts || exit 1 -+if [ "$nbdport" -gt 0 ] 2>/dev/null; then -+ nbd-client "$nbdserver" $nbdport /dev/nbd0 $preopts $opts || exit 1 -+else -+ nbd-client -name "$nbdport" "$nbdserver" /dev/nbd0 $preopts $opts || exit 1 -+fi - - # NBD doesn't emit uevents when it gets connected, so kick it - echo change > /sys/block/nbd0/uevent -diff --git a/modules.d/95nbd/parse-nbdroot.sh b/modules.d/95nbd/parse-nbdroot.sh -index 746fb14..902e9a9 100755 ---- a/modules.d/95nbd/parse-nbdroot.sh -+++ b/modules.d/95nbd/parse-nbdroot.sh -@@ -1,8 +1,8 @@ - #!/bin/sh - # - # Preferred format: --# root=nbd:srv:port[:fstype[:rootflags[:nbdopts]]] --# [root=*] netroot=nbd:srv:port[:fstype[:rootflags[:nbdopts]]] -+# root=nbd:srv:port/exportname[:fstype[:rootflags[:nbdopts]]] -+# [root=*] netroot=nbd:srv:port/exportname[:fstype[:rootflags[:nbdopts]]] - # - # nbdopts is a comma separated list of options to give to nbd-client - # -@@ -45,6 +45,12 @@ fi - # If it's not nbd we don't continue - [ "${netroot%%:*}" = "nbd" ] || return - -+ -+if [ -n "${DRACUT_SYSTEMD}" ] && [ "$root" = "dhcp" ]; then -+ echo "root=$netroot" > /etc/cmdline.d/root.conf -+ systemctl --no-block daemon-reload -+fi -+ - # Check required arguments - netroot_to_var $netroot - [ -z "$server" ] && die "Argument server for nbdroot is missing" -diff --git a/test/TEST-40-NBD/dhcpd.conf b/test/TEST-40-NBD/dhcpd.conf -index 942bc6a..08461f9 100644 ---- a/test/TEST-40-NBD/dhcpd.conf -+++ b/test/TEST-40-NBD/dhcpd.conf -@@ -20,7 +20,7 @@ subnet 192.168.50.0 netmask 255.255.255.0 { - - group { - host nbd-2 { -- option root-path "nbd:192.168.50.1:2000"; -+ option root-path "nbd:192.168.50.1:raw"; - - hardware ethernet 52:54:00:12:34:01; - fixed-address 192.168.50.101; -@@ -29,7 +29,7 @@ subnet 192.168.50.0 netmask 255.255.255.0 { - - group { - host nbd-3 { -- option root-path "nbd:192.168.50.1:2000:ext2"; -+ option root-path "nbd:192.168.50.1:raw:ext2"; - - hardware ethernet 52:54:00:12:34:02; - fixed-address 192.168.50.101; -@@ -38,7 +38,7 @@ subnet 192.168.50.0 netmask 255.255.255.0 { - - group { - host nbd-4 { -- option root-path "nbd:192.168.50.1:2000::errors=panic"; -+ option root-path "nbd:192.168.50.1:raw::errors=panic"; - - hardware ethernet 52:54:00:12:34:03; - fixed-address 192.168.50.101; -@@ -47,7 +47,7 @@ subnet 192.168.50.0 netmask 255.255.255.0 { - - group { - host nbd-5 { -- option root-path "nbd:192.168.50.1:2000:ext2:errors=panic"; -+ option root-path "nbd:192.168.50.1:raw:ext2:errors=panic"; - - hardware ethernet 52:54:00:12:34:04; - fixed-address 192.168.50.101; -@@ -57,7 +57,7 @@ subnet 192.168.50.0 netmask 255.255.255.0 { - group { - host nbd-6 { - # Use the encrypted image -- option root-path "nbd:192.168.50.1:2001:ext2:errors=panic"; -+ option root-path "nbd:192.168.50.1:encrypted:ext2:errors=panic"; - - hardware ethernet 52:54:00:12:34:05; - fixed-address 192.168.50.101; -diff --git a/test/TEST-40-NBD/server-init.sh b/test/TEST-40-NBD/server-init.sh -index 73c64d6..0039753 100755 ---- a/test/TEST-40-NBD/server-init.sh -+++ b/test/TEST-40-NBD/server-init.sh -@@ -13,8 +13,7 @@ ip link set dev eth0 name ens3 - ip addr add 192.168.50.1/24 dev ens3 - ip link set ens3 up - modprobe af_packet --nbd-server 2000 /dev/sdb -C /dev/null --nbd-server 2001 /dev/sdc -C /dev/null -+nbd-server - >/var/lib/dhcpd/dhcpd.leases - chmod 777 /var/lib/dhcpd/dhcpd.leases - dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases & -diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh -index 39966ac..28ba6aa 100755 ---- a/test/TEST-40-NBD/test.sh -+++ b/test/TEST-40-NBD/test.sh -@@ -5,8 +5,8 @@ TEST_DESCRIPTION="root filesystem on NBD" - KVERSION=${KVERSION-$(uname -r)} - - # Uncomment this to debug failures --#DEBUGFAIL="rd.shell rd.break" --#SERIAL="udp:127.0.0.1:9999" -+#DEBUGFAIL="rd.shell rd.break rd.debug" -+SERIAL="tcp:127.0.0.1:9999" - SERIAL="null" - - run_server() { -@@ -104,36 +104,36 @@ test_run() { - client_run() { - # The default is ext3,errors=continue so use that to determine - # if our options were parsed and used -+ client_test "NBD root=nbd:IP:port" 52:54:00:12:34:00 \ -+ "root=nbd:192.168.50.1:raw rd.luks=0" || return 1 -+ - client_test "NBD root=nbd:IP:port::fsopts" 52:54:00:12:34:00 \ -- "root=nbd:192.168.50.1:2000::errors=panic rd.luks=0" \ -+ "root=nbd:192.168.50.1:raw::errors=panic rd.luks=0" \ - ext3 errors=panic || return 1 - -- client_test "NBD root=nbd:IP:port" 52:54:00:12:34:00 \ -- "root=nbd:192.168.50.1:2000 rd.luks=0" || return 1 -- - client_test "NBD root=nbd:IP:port:fstype" 52:54:00:12:34:00 \ -- "root=nbd:192.168.50.1:2000:ext2 rd.luks=0" ext2 || return 1 -+ "root=nbd:192.168.50.1:raw:ext2 rd.luks=0" ext2 || return 1 - - client_test "NBD root=nbd:IP:port:fstype:fsopts" 52:54:00:12:34:00 \ -- "root=nbd:192.168.50.1:2000:ext2:errors=panic rd.luks=0" \ -+ "root=nbd:192.168.50.1:raw:ext2:errors=panic rd.luks=0" \ - ext2 errors=panic || return 1 - - client_test "NBD Bridge root=nbd:IP:port:fstype:fsopts" 52:54:00:12:34:00 \ -- "root=nbd:192.168.50.1:2000:ext2:errors=panic bridge rd.luks=0" \ -+ "root=nbd:192.168.50.1:raw:ext2:errors=panic bridge rd.luks=0" \ - ext2 errors=panic || return 1 - - # There doesn't seem to be a good way to validate the NBD options, so - # just check that we don't screw up the other options - - client_test "NBD root=nbd:IP:port:::NBD opts" 52:54:00:12:34:00 \ -- "root=nbd:192.168.50.1:2000:::bs=2048 rd.luks=0" || return 1 -+ "root=nbd:192.168.50.1:raw:::bs=2048 rd.luks=0" || return 1 - - client_test "NBD root=nbd:IP:port:fstype::NBD opts" 52:54:00:12:34:00 \ -- "root=nbd:192.168.50.1:2000:ext2::bs=2048 rd.luks=0" ext2 || return 1 -+ "root=nbd:192.168.50.1:raw:ext2::bs=2048 rd.luks=0" ext2 || return 1 - - client_test "NBD root=nbd:IP:port:fstype:fsopts:NBD opts" \ - 52:54:00:12:34:00 \ -- "root=nbd:192.168.50.1:2000:ext2:errors=panic:bs=2048 rd.luks=0" \ -+ "root=nbd:192.168.50.1:raw:ext2:errors=panic:bs=2048 rd.luks=0" \ - ext2 errors=panic || return 1 - - # DHCP root-path parsing -@@ -156,7 +156,7 @@ client_run() { - # netroot handling - - client_test "NBD netroot=nbd:IP:port" 52:54:00:12:34:00 \ -- "netroot=nbd:192.168.50.1:2000 rd.luks=0" || return 1 -+ "netroot=nbd:192.168.50.1:raw rd.luks=0" || return 1 - - client_test "NBD netroot=dhcp DHCP root-path nbd:srv:port:fstype:fsopts" \ - 52:54:00:12:34:04 "netroot=dhcp rd.luks=0" ext2 errors=panic || return 1 -@@ -167,7 +167,7 @@ client_run() { - - client_test "NBD root=LABEL=dracut netroot=nbd:IP:port" \ - 52:54:00:12:34:00 \ -- "root=LABEL=dracut rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=nbd:192.168.50.1:2001" || return 1 -+ "root=LABEL=dracut rd.luks.uuid=$ID_FS_UUID rd.lv.vg=dracut netroot=nbd:192.168.50.1:encrypted" || return 1 - - # XXX This should be ext2,errors=panic but that doesn't currently - # XXX work when you have a real root= line in addition to netroot= -@@ -308,11 +308,20 @@ make_server_root() { - mkdir -p "$initdir" - ( - cd "$initdir"; -- mkdir -p dev sys proc etc var/run var/lib/dhcpd tmp -+ mkdir -p dev sys proc etc var/run var/lib/dhcpd tmp etc/nbd-server - ) -+ cat > "$initdir/etc/nbd-server/config" < -Date: Mon, 14 Dec 2015 13:59:33 +0100 -Subject: [PATCH] TEST-16-DMSQUASH: do not use "--" with ldconfig -r - ---- - test/TEST-16-DMSQUASH/test.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh -index f2b9963..53a45d6 100755 ---- a/test/TEST-16-DMSQUASH/test.sh -+++ b/test/TEST-16-DMSQUASH/test.sh -@@ -98,7 +98,7 @@ test_setup() { - inst "$VMLINUZ" "/boot/vmlinuz-${KVERSION}" - find_binary plymouth >/dev/null && inst_multiple plymouth - cp -a -- /etc/ld.so.conf* "$initdir"/etc -- sudo ldconfig -r -- "$initdir" -+ sudo ldconfig -r "$initdir" - ) - python create.py -d -c livecd-fedora-minimal.ks - return 0 diff --git a/0011-add-.mailmap.patch b/0011-add-.mailmap.patch new file mode 100644 index 0000000..d64f444 --- /dev/null +++ b/0011-add-.mailmap.patch @@ -0,0 +1,18 @@ +From 538ff0fd802589587734ccdcc811d78e2c0816a4 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 10 Apr 2017 14:50:21 +0200 +Subject: [PATCH] add .mailmap + +--- + .mailmap | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/.mailmap b/.mailmap +index 53d61f2a..fd7ab839 100644 +--- a/.mailmap ++++ b/.mailmap +@@ -16,3 +16,4 @@ Frederick Grose + Frederic Crozat + Shawn W Dunn + Kyle McMartin ++Angelo "pallotron" Failla diff --git a/0012-fix-build-with-KMOD.patch b/0012-fix-build-with-KMOD.patch new file mode 100644 index 0000000..82f7e1e --- /dev/null +++ b/0012-fix-build-with-KMOD.patch @@ -0,0 +1,24 @@ +From f59548aeab5da479493e2c49400993a6502f6f8e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tomasz=20Pawe=C5=82=20Gajc?= +Date: Mon, 24 Apr 2017 21:37:56 +0200 +Subject: [PATCH] fix build with KMOD + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 64b46e75..414fb330 100644 +--- a/Makefile ++++ b/Makefile +@@ -12,8 +12,8 @@ pkglibdir ?= ${libdir}/dracut + sysconfdir ?= ${prefix}/etc + bindir ?= ${prefix}/bin + mandir ?= ${prefix}/share/man +-CFLAGS ?= -O2 -g -Wall $(KMOD_CFLAGS) +-CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 ++CFLAGS ?= -O2 -g -Wall ++CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 $(KMOD_CFLAGS) + bashcompletiondir ?= ${datadir}/bash-completion/completions + pkgconfigdatadir ?= $(datadir)/pkgconfig + diff --git a/0012-test-TEST-04-FULL-SYSTEMD-optionally-install-machine.patch b/0012-test-TEST-04-FULL-SYSTEMD-optionally-install-machine.patch deleted file mode 100644 index 06c5bea..0000000 --- a/0012-test-TEST-04-FULL-SYSTEMD-optionally-install-machine.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b8bccd398a4214376474c330ee4b756a4d0c1d19 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Dec 2015 15:12:24 +0100 -Subject: [PATCH] test/TEST-04-FULL-SYSTEMD: optionally install machine-info - and *-id - ---- - test/TEST-04-FULL-SYSTEMD/test.sh | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index 6ea9281..f5a9d48 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -264,9 +264,13 @@ EOF - inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) -+ -+ [ -e /etc/machine-id ] && EXTRA_MACHINE="/etc/machine-id" -+ [ -e /etc/machine-info ] && EXTRA_MACHINE+=" /etc/machine-info" -+ - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ - -a "debug systemd i18n" \ -- -I "/etc/machine-id /etc/hostname" \ -+ ${EXTRA_MACHINE:+-I "$EXTRA_MACHINE"} \ - -o "dash network plymouth lvm mdraid resume crypt caps dm terminfo usrmount kernel-network-modules" \ - -d "piix ide-gd_mod ata_piix btrfs sd_mod i6300esb ib700wdt" \ - --no-hostonly-cmdline -N \ diff --git a/0013-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch b/0013-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch deleted file mode 100644 index 5daa5d4..0000000 --- a/0013-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c41df7e1db1adc51399ab2c22f251b15eb2065b1 Mon Sep 17 00:00:00 2001 -From: Alexander Tsoy -Date: Tue, 5 Jan 2016 22:11:57 +0300 -Subject: [PATCH] base/dracut-lib.sh:dev_unit_name() guard against $dev - beginning with "-" - -crypt/parse-crypt.sh generate initqueue job which always call -dev_unit_name() with an argument beginning with "-". This results -in the following error: - -dracut-initqueue[307]: + systemd-escape -p -cfb4aa43-2f02-4c6b-a313-60ea99288087 -dracut-initqueue[307]: systemd-escape: invalid option -- 'c' ---- - modules.d/99base/dracut-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index ad03394..0a0b1b9 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -874,7 +874,7 @@ dev_unit_name() - local dev="$1" - - if command -v systemd-escape >/dev/null; then -- systemd-escape -p "$dev" -+ systemd-escape -p -- "$dev" - return - fi - diff --git a/0013-mkinitrd-suse.sh-Fix-prefix-calculation.patch b/0013-mkinitrd-suse.sh-Fix-prefix-calculation.patch new file mode 100644 index 0000000..6d95027 --- /dev/null +++ b/0013-mkinitrd-suse.sh-Fix-prefix-calculation.patch @@ -0,0 +1,27 @@ +From 7cf2c21798b537a5553ecc23df5ce8cfda631e9c Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +Date: Tue, 25 Apr 2017 15:25:20 +0200 +Subject: [PATCH] mkinitrd-suse.sh: Fix prefix calculation + +The previous algorithm was incorrect and would return +incorrect results e.g. for a /20 mask. Also gets rid +of an undocumented depencency on bc(1). + +Reference: bsc#1035743 +--- + mkinitrd-suse.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index bc49d731..d9de81b9 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -104,7 +104,7 @@ calc_netmask() { + local prefix=$1 + + [ -z "$prefix" ] && return +- mask=$(echo "(2 ^ 32) - (2 ^ $prefix)" | bc -l) ++ mask=$(( 0xffffffff << (32 - $prefix) )) + byte1=$(( mask >> 24 )) + byte2=$(( mask >> 16 )) + byte3=$(( mask >> 8 )) diff --git a/0014-TEST-50-MULTINIC-fix-bridge-test.patch b/0014-TEST-50-MULTINIC-fix-bridge-test.patch new file mode 100644 index 0000000..ee87d7c --- /dev/null +++ b/0014-TEST-50-MULTINIC-fix-bridge-test.patch @@ -0,0 +1,42 @@ +From 29fd71b23dc1aca1301510bf68ee8e1a5e336496 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 26 Apr 2017 09:39:20 +0200 +Subject: [PATCH] TEST-50-MULTINIC: fix bridge test + +Bridge with nics on a different vlan, otherwise we will see: + +[ 117.750825] bridge0: received packet on ens5 with own address as source address +--- + test/TEST-50-MULTINIC/test.sh | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh +index 84792fe6..917272d8 100755 +--- a/test/TEST-50-MULTINIC/test.sh ++++ b/test/TEST-50-MULTINIC/test.sh +@@ -51,10 +51,12 @@ client_test() { + fi + + $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \ +- -net socket,connect=127.0.0.1:12350 \ +- -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \ +- -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ +- -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ ++ -net socket,vlan=0,connect=127.0.0.1:12350 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:$mac1,model=e1000 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:$mac2,model=e1000 \ ++ -net nic,vlan=0,macaddr=52:54:00:12:34:$mac3,model=e1000 \ ++ -net nic,vlan=1,macaddr=52:54:00:12:34:98,model=e1000 \ ++ -net nic,vlan=2,macaddr=52:54:00:12:34:99,model=e1000 \ + -watchdog i6300esb -watchdog-action poweroff \ + -no-reboot \ + -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ +@@ -146,7 +148,7 @@ test_client() { + + client_test "MULTINIC bridging" \ + 00 01 02 \ +- "root=nfs:192.168.50.1:/nfs/client ip=bridge0:dhcp bridge=bridge0:ens3,ens4,ens5" \ ++ "root=nfs:192.168.50.1:/nfs/client ip=bridge0:dhcp bridge=bridge0:ens3,ens6,ens7" \ + "bridge0" || return 1 + return 0 + } diff --git a/0014-nbd-add-missing-generator.patch b/0014-nbd-add-missing-generator.patch deleted file mode 100644 index d79f2dd..0000000 --- a/0014-nbd-add-missing-generator.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 07149fe6bea01026b3ae37afb51b0fa831e9f27a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 7 Jan 2016 09:56:36 +0100 -Subject: [PATCH] nbd: add missing generator - ---- - modules.d/95nbd/nbd-generator.sh | 55 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 55 insertions(+) - create mode 100755 modules.d/95nbd/nbd-generator.sh - -diff --git a/modules.d/95nbd/nbd-generator.sh b/modules.d/95nbd/nbd-generator.sh -new file mode 100755 -index 0000000..de52d11 ---- /dev/null -+++ b/modules.d/95nbd/nbd-generator.sh -@@ -0,0 +1,55 @@ -+#!/bin/sh -+ -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ -+[ -z "$root" ] && root=$(getarg root=) -+ -+[ "${root%%:*}" = "nbd" ] || exit 0 -+ -+GENERATOR_DIR="$2" -+[ -z "$GENERATOR_DIR" ] && exit 1 -+ -+[ -d "$GENERATOR_DIR" ] || mkdir "$GENERATOR_DIR" -+ -+ROOTFLAGS="$(getarg rootflags)" -+ -+nroot=${root#nbd:} -+nbdserver=${nroot%%:*}; nroot=${nroot#*:} -+nbdport=${nroot%%:*}; nroot=${nroot#*:} -+nbdfstype=${nroot%%:*}; nroot=${nroot#*:} -+nbdflags=${nroot%%:*} -+ -+if [ "$nbdflags" = "$nbdfstype" ]; then -+ unset nbdflags -+fi -+if [ "$nbdfstype" = "$nbdport" ]; then -+ unset nbdfstype -+fi -+ -+[ -n "$nbdflags" ] && ROOTFLAGS="$nbdflags" -+ -+if getarg "ro"; then -+ if [ -n "$ROOTFLAGS" ]; then -+ ROOTFLAGS="$ROOTFLAGS,ro" -+ else -+ ROOTFLAGS="ro" -+ fi -+fi -+ -+if [ -n "$nbdfstype" ]; then -+ ROOTFSTYPE="$nbdfstype" -+else -+ ROOTFSTYPE=$(getarg rootfstype=) || unset ROOTFSTYPE -+fi -+ -+{ -+ echo "[Unit]" -+ echo "Before=initrd-root-fs.target" -+ echo "[Mount]" -+ echo "Where=/sysroot" -+ echo "What=/dev/root" -+ [ -n "$ROOTFSTYPE" ] && echo "Type=${ROOTFSTYPE}" -+ [ -n "$ROOTFLAGS" ] && echo "Options=${ROOTFLAGS}" -+} > "$GENERATOR_DIR"/sysroot.mount -+ -+exit 0 diff --git a/0015-Check-the-proper-variable-for-a-custom-IMA-keys-dire.patch b/0015-Check-the-proper-variable-for-a-custom-IMA-keys-dire.patch new file mode 100644 index 0000000..896f927 --- /dev/null +++ b/0015-Check-the-proper-variable-for-a-custom-IMA-keys-dire.patch @@ -0,0 +1,22 @@ +From ab66ef2d4a4297642fa059e9df4f86ccefbed4aa Mon Sep 17 00:00:00 2001 +From: Jason Dana +Date: Thu, 27 Apr 2017 07:55:58 -0400 +Subject: [PATCH] Check the proper variable for a custom IMA keys directory + +--- + modules.d/98integrity/ima-keys-load.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98integrity/ima-keys-load.sh b/modules.d/98integrity/ima-keys-load.sh +index 659b7222..e142f74d 100755 +--- a/modules.d/98integrity/ima-keys-load.sh ++++ b/modules.d/98integrity/ima-keys-load.sh +@@ -13,7 +13,7 @@ load_x509_keys() + . ${IMACONFIG} + fi + +- if [ -z "${IMAKEYDIR}" ]; then ++ if [ -z "${IMAKEYSDIR}" ]; then + IMAKEYSDIR="/etc/keys/ima" + fi + diff --git a/0015-fcoe-no-need-to-copy-lldpad-state.patch b/0015-fcoe-no-need-to-copy-lldpad-state.patch deleted file mode 100644 index eef6e71..0000000 --- a/0015-fcoe-no-need-to-copy-lldpad-state.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e93ff1cf9aac8f97131b3101a5da240ce5f45239 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 7 Jan 2016 10:44:31 +0100 -Subject: [PATCH] fcoe: no need to copy lldpad state - -/dev/shm should be available later on by the normal switch root bind mount. ---- - modules.d/95fcoe/cleanup-fcoe.sh | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh -index 5ff4d05..856e2d9 100644 ---- a/modules.d/95fcoe/cleanup-fcoe.sh -+++ b/modules.d/95fcoe/cleanup-fcoe.sh -@@ -2,9 +2,8 @@ - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - --if [ -e /var/run/lldpad.pid ]; then -- lldpad -k -- mkdir -m 0755 -p /run/initramfs/state/dev/shm -- cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1 -- echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab -+if [ -z "$DRACUT_SYSTEMD" ]; then -+ if [ -e /var/run/lldpad.pid ]; then -+ lldpad -k -+ fi - fi diff --git a/0016-Handle-curl-using-libnssckbi-for-TLS-RHBZ-1447777.patch b/0016-Handle-curl-using-libnssckbi-for-TLS-RHBZ-1447777.patch new file mode 100644 index 0000000..a0ddaaf --- /dev/null +++ b/0016-Handle-curl-using-libnssckbi-for-TLS-RHBZ-1447777.patch @@ -0,0 +1,99 @@ +From 892b1fe6b74a04e7901db306231136a430326ee3 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Wed, 3 May 2017 12:32:43 -0700 +Subject: [PATCH] Handle curl using libnssckbi for TLS (RHBZ #1447777) + +curl in Fedora recently changed its default CA trust store. The +Fedora package no longer specifies an OpenSSL-format bundle file +during build, and curl itself has been patched to use an NSS +plugin called libnssckbi.so when no bundle file or directory is +specified. There are (at present) two possible providers of the +libnssckbi.so module: the original NSS implementation, which +uses a trust bundle built in at build time, and a compatible +implementation from the p11-kit project, which reads a trust +bundle at run time. So if we find a string in libcurl.so that +suggests libnssckbi might be in use, we must both install it and +make an effort to install any trust bundle files it may use. + +The p11-kit libnssckbi implementation does include a string that +lists the top-level trust directories it will use, so we try to +find that string, though the best effort I can come up with will +also find many false positives too. To weed out the false +positives, we check whether the matches actually exist as dirs, +and if so, whether they contain some specific subdirectories we +know p11-kit trust dirs must have (thanks, @kaie). For the NSS +libnssckbi implementation, we will likely wind up not finding any +dirs that match the requirements, so we will simply install the +libnssckbi.so file itself, which is the correct action. + +This fixes TLS transactions in the initramfs environment when +using a curl that's built this new way; it's significant for +use of kickstarts and update images with the Fedora / RHEL +installer, as these are retrieved in the initramfs environment, +and are frequently retrieved via HTTPS. +--- + modules.d/45url-lib/module-setup.sh | 38 +++++++++++++++++++++++++++++++++++-- + 1 file changed, 36 insertions(+), 2 deletions(-) + +diff --git a/modules.d/45url-lib/module-setup.sh b/modules.d/45url-lib/module-setup.sh +index 1ece400f..b3fe55a6 100755 +--- a/modules.d/45url-lib/module-setup.sh ++++ b/modules.d/45url-lib/module-setup.sh +@@ -15,7 +15,7 @@ depends() { + + # called by dracut + install() { +- local _dir _crt _found _lib ++ local _dir _crt _found _lib _nssckbi _p11roots _p11root _p11item + inst_simple "$moddir/url-lib.sh" "/lib/url-lib.sh" + inst_multiple -o ctorrent + inst_multiple curl +@@ -29,6 +29,7 @@ install() { + [[ -d $_dir ]] || continue + for _lib in $_dir/libcurl.so.*; do + [[ -e $_lib ]] || continue ++ [[ $_nssckbi ]] || _nssckbi=$(grep -F --binary-files=text -z libnssckbi $_lib) + _crt=$(grep -F --binary-files=text -z .crt $_lib) + [[ $_crt ]] || continue + [[ $_crt == /*/* ]] || continue +@@ -39,6 +40,39 @@ install() { + _found=1 + done + done +- [[ $_found ]] || dwarn "Couldn't find SSL CA cert bundle; HTTPS won't work." ++ # If we found no cert bundle files referenced in libcurl but we ++ # *did* find a mention of libnssckbi (checked above), install it. ++ # If its truly NSS libnssckbi, it includes its own trust bundle, ++ # but if it's really p11-kit-trust.so, we need to find the dirs ++ # where it will look for a trust bundle and install them too. ++ if ! [[ $_found ]] && [[ $_nssckbi ]] ; then ++ _found=1 ++ inst_libdir_file "libnssckbi.so*" || _found= ++ for _dir in $libdirs; do ++ [[ -e $_dir/libnssckbi.so ]] || continue ++ # this looks for directory-ish strings in the file ++ for _p11roots in $(grep -o --binary-files=text "/[[:alpha:]][[:print:]]*" $_dir/libnssckbi.so) ; do ++ # the string can be a :-separated list of dirs ++ for _p11root in $(echo "$_p11roots" | tr ':' '\n') ; do ++ # check if it's actually a directory (there are ++ # several false positives in the results) ++ [[ -d "$_p11root" ]] || continue ++ # check if it has some specific subdirs that all ++ # p11-kit trust dirs have ++ [[ -d "${_p11root}/anchors" ]] || continue ++ [[ -d "${_p11root}/blacklist" ]] || continue ++ # so now we know it's really a p11-kit trust dir; ++ # install everything in it ++ for _p11item in $(find "$_p11root") ; do ++ if ! inst "$_p11item" ; then ++ dwarn "Couldn't install '$_p11item' from p11-kit trust dir '$_p11root'; HTTPS might not work." ++ continue ++ fi ++ done ++ done ++ done ++ done ++ fi ++ [[ $_found ]] || dwarn "Couldn't find SSL CA cert bundle or libnssckbi.so; HTTPS won't work." + } + diff --git a/0016-dracut.sh-restorecon-final-image-file.patch b/0016-dracut.sh-restorecon-final-image-file.patch deleted file mode 100644 index c35028e..0000000 --- a/0016-dracut.sh-restorecon-final-image-file.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 60928f36b6c9a855077506444ea5edbe6be9ec4c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 8 Jan 2016 11:37:25 +0100 -Subject: [PATCH] dracut.sh: restorecon final image file - -Instead of "mv" use "cp --reflink=auto" and restorecon the final image ---- - dracut.sh | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index a2fc496..6dc9858 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1724,6 +1724,8 @@ if (( maxloglvl >= 5 )); then - fi - fi - -+umask 077 -+ - if [[ $uefi = yes ]]; then - if [[ $kernel_cmdline ]]; then - echo -n "$kernel_cmdline" > "$uefi_outdir/cmdline.txt" -@@ -1749,7 +1751,7 @@ if [[ $uefi = yes ]]; then - --add-section .linux="$kernel_image" --change-section-vma .linux=0x40000 \ - --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd=0x3000000 \ - "$uefi_stub" "${uefi_outdir}/linux.efi" \ -- && mv "${uefi_outdir}/linux.efi" "$outfile"; then -+ && cp --reflink=auto "${uefi_outdir}/linux.efi" "$outfile"; then - dinfo "*** Creating UEFI image file '$outfile' done ***" - else - rm -f -- "$outfile" -@@ -1757,7 +1759,7 @@ if [[ $uefi = yes ]]; then - exit 1 - fi - else -- if mv "${DRACUT_TMPDIR}/initramfs.img" "$outfile"; then -+ if cp --reflink=auto "${DRACUT_TMPDIR}/initramfs.img" "$outfile"; then - dinfo "*** Creating initramfs image file '$outfile' done ***" - else - rm -f -- "$outfile" -@@ -1766,5 +1768,6 @@ else - fi - fi - -+command -v restorecon &>/dev/null && restorecon -- "$outfile" - - exit 0 diff --git a/0017-dracut.cmdline-remove-extra-from-ip-doc.patch b/0017-dracut.cmdline-remove-extra-from-ip-doc.patch deleted file mode 100644 index ef102db..0000000 --- a/0017-dracut.cmdline-remove-extra-from-ip-doc.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0a7d7f63106ce5a7f9869aacb21d0474621811e7 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Jan 2016 09:17:40 +0100 -Subject: [PATCH] dracut.cmdline: remove extra ":" from ip= doc - ---- - dracut.cmdline.7.asc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index e160e3b..c4c5588 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -492,7 +492,7 @@ cannot be used in conjunction with the **ifname** argument for the - same . - ===================== - --**ip=**____:[____]:____:____:____:____:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[____][:____]]:: -+**ip=**____:[____]:____:____:____:____:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__[:[____][:____]]:: - explicit network configuration. If you want do define a IPv6 address, put it - in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple - times. ____ is optional and is the address of the remote endpoint diff --git a/0017-drm-Install-pwm-modules-on-all-architectures.patch b/0017-drm-Install-pwm-modules-on-all-architectures.patch new file mode 100644 index 0000000..5f7ca74 --- /dev/null +++ b/0017-drm-Install-pwm-modules-on-all-architectures.patch @@ -0,0 +1,37 @@ +From feaaee4278077dd67fe24acebfbe47ba20738955 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 13 May 2017 17:23:36 +0200 +Subject: [PATCH] drm: Install pwm modules on all architectures + +At least on x86 on Bay and Cherry Trail devices the pmw-lpss modules must +be in the initrd too, otherwise the i915 driver will still load, but +it will report the following error: + +[drm:pwm_setup_backlight [i915]] *ERROR* Failed to own the pwm chip + +And not register /sys/class/backlight/intel_backlight and users will +not be able to control their backlight. + +Signed-off-by: Hans de Goede +--- + modules.d/50drm/module-setup.sh | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh +index 42a5e7bc..2014539a 100755 +--- a/modules.d/50drm/module-setup.sh ++++ b/modules.d/50drm/module-setup.sh +@@ -21,12 +21,11 @@ installkernel() { + "=drivers/gpu/drm/i2c" \ + "=drivers/gpu/drm/panel" \ + "=drivers/gpu/drm/bridge" \ +- "=drivers/pwm" \ + "=drivers/video/backlight" \ + ${NULL} + fi + +- instmods amdkfd hyperv_fb ++ instmods amdkfd hyperv_fb "=drivers/pwm" + + # if the hardware is present, include module even if it is not currently loaded, + # as we could e.g. be in the installer; nokmsboot boot parameter will disable diff --git a/0018-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch b/0018-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch deleted file mode 100644 index 4d0180c..0000000 --- a/0018-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b019952f6df9b1dae54dd097f012e6c05fe6af00 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Jan 2016 09:32:24 +0100 -Subject: [PATCH] dracut.sh: fail hard, if we find modules and modules.dep is - missing - -If modules are present in /lib/modules/ and modules.dep -is empty, depmod was not run most likely. ---- - dracut.sh | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 6dc9858..98dbe0b 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -925,7 +925,12 @@ abs_outfile=$(readlink -f "$outfile") && outfile="$abs_outfile" - - if [[ $no_kernel != yes ]] && [[ -d $srcmods ]]; then - if ! [[ -f $srcmods/modules.dep ]]; then -- dwarn "$srcmods/modules.dep is missing. Did you run depmod?" -+ if [[ -n "$(find "$srcmods" -name '*.ko*')" ]]; then -+ dfatal "$srcmods/modules.dep is missing. Did you run depmod?" -+ exit 1 -+ else -+ dwarn "$srcmods/modules.dep is missing. Did you run depmod?" -+ fi - elif ! ( command -v gzip &>/dev/null && command -v xz &>/dev/null); then - read _mod < $srcmods/modules.dep - _mod=${_mod%%:*} diff --git a/0019-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch b/0019-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch deleted file mode 100644 index 08f2cce..0000000 --- a/0019-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch +++ /dev/null @@ -1,25 +0,0 @@ -From efbc47b8e43ad173d3319f3f6e87b0a60aad9f37 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Jan 2016 13:43:38 +0100 -Subject: [PATCH] network/net-lib.sh: correctly set mac address for - ip=...:: - -if ip=...:: was specified, macadress was not set ---- - modules.d/40network/net-lib.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 256826e..31f1a56 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -427,6 +427,9 @@ ip_to_var() { - ;; - [0-9]*) - mtu="$8" -+ if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then -+ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" -+ fi - ;; - *) - if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then diff --git a/0020-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch b/0020-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch deleted file mode 100644 index 2af695d..0000000 --- a/0020-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2fd8588da51a0e43684852dcdabe327aca684a9f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 18 Jan 2016 16:59:42 +0100 -Subject: [PATCH] dracut-functions.sh:fix check_vol_slaves() volume group name - stripping - -commit 466a59984a095f33993cffd5a3bea40826469b03 removed whitespace -stripping from lvm volume group names. ---- - dracut-functions.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 59747ec..c7ea9f5 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -580,7 +580,7 @@ check_vol_slaves() { - if [[ $_lv = $2 ]]; then - _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) - # strip space -- _vg=$(printf "%s\n" "$_vg") -+ _vg="${_vg//[[:space:]]/}" - if [[ $_vg ]]; then - for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) - do diff --git a/0021-multipath-fix-majmin_to_mpath_dev.patch b/0021-multipath-fix-majmin_to_mpath_dev.patch deleted file mode 100644 index 1efbfe2..0000000 --- a/0021-multipath-fix-majmin_to_mpath_dev.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 28058a2e373eb268d9b1cd5b65c2ad607961dad1 Mon Sep 17 00:00:00 2001 -From: Pekka Wallendahl -Date: Mon, 18 Jan 2016 20:28:22 +0200 -Subject: [PATCH] multipath: fix majmin_to_mpath_dev() - -* Multipath device names only start with the mpath-prefix if the option - use_userfriendly_names is set true in /etc/multipath.conf and if user - has not set any aliases in the said file. Thus the for-loop should go - through all files in /dev/mapper/, not just ones starting with 'mpath' - -* Bash is perfectly capable to extend `/dev/mapper/*` notation without a - need to pass it to an external ls - -* Changed the function to use a local variable $_dev instead of the - global $dev, which seemed to be the original intention as the local - _dev was defined but not used ---- - modules.d/90multipath/module-setup.sh | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 831c99f..a808678 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -9,9 +9,10 @@ is_mpath() { - - majmin_to_mpath_dev() { - local _dev -- for i in `ls -1 /dev/mapper/mpath*`; do -- dev=$(get_maj_min $i) -- if [ "$dev" = "$1" ]; then -+ for i in /dev/mapper/*; do -+ [[ $i == /dev/mapper/control ]] && continue -+ _dev=$(get_maj_min $i) -+ if [ "$_dev" = "$1" ]; then - echo $i - return - fi diff --git a/0022-Fixed-vlan-bonding-bridging-team-logic.patch b/0022-Fixed-vlan-bonding-bridging-team-logic.patch deleted file mode 100644 index 3377fb7..0000000 --- a/0022-Fixed-vlan-bonding-bridging-team-logic.patch +++ /dev/null @@ -1,805 +0,0 @@ -From 24a78b269745b0b16a2bdc03c35015b2cb9d0408 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Jan 2016 11:34:10 +0100 -Subject: [PATCH] Fixed vlan, bonding, bridging, team logic - -Call ifup for the slaves and assemble afterwards. ---- - modules.d/40network/ifup.sh | 364 ++++++++++++++++++------------------ - modules.d/40network/net-genrules.sh | 26 ++- - modules.d/40network/parse-bond.sh | 25 +-- - modules.d/40network/parse-bridge.sh | 28 +-- - modules.d/40network/parse-team.sh | 26 +-- - modules.d/40network/parse-vlan.sh | 4 +- - modules.d/45ifcfg/write-ifcfg.sh | 21 +-- - test/TEST-20-NFS/test.sh | 4 +- - test/TEST-30-ISCSI/test.sh | 4 +- - test/TEST-50-MULTINIC/test.sh | 17 +- - 10 files changed, 249 insertions(+), 270 deletions(-) - -diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh -index eca7478..14ca86d 100755 ---- a/modules.d/40network/ifup.sh -+++ b/modules.d/40network/ifup.sh -@@ -15,76 +15,12 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh - - # $netif reads easier than $1 - netif=$1 --use_bridge='false' --use_vlan='false' - --# enslave this interface to bond? --for i in /tmp/bond.*.info; do -- [ -e "$i" ] || continue -- unset bondslaves -- unset bondname -- . "$i" -- for slave in $bondslaves ; do -- if [ "$netif" = "$slave" ] ; then -- netif=$bondname -- break 2 -- fi -- done --done -- --if [ -e /tmp/team.info ]; then -- . /tmp/team.info -- for slave in $teamslaves ; do -- if [ "$netif" = "$slave" ] ; then -- netif=$teammaster -- fi -- done --fi -- --if [ -e /tmp/vlan.info ]; then -- . /tmp/vlan.info -- if [ "$netif" = "$phydevice" ]; then -- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then -- : # We need to really setup bond (recursive call) -- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then -- : # We need to really setup team (recursive call) -- else -- netif="$vlanname" -- use_vlan='true' -- fi -- fi --fi -- --# bridge this interface? --if [ -e /tmp/bridge.info ]; then -- . /tmp/bridge.info -- 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) -- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then -- : # We need to really setup team (recursive call) -- elif [ "$netif" = "$vlanname" ] && [ -n "$DO_VLAN_SETUP" ]; then -- : # We need to really setup vlan (recursive call) -- else -- netif="$bridgename" -- use_bridge='true' -- fi -- fi -- done --fi -- --# disable manual ifup while netroot is set for simplifying our logic --# in netroot case we prefer netroot to bringup $netif automaticlly --[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" -- --if [ -n "$manualup" ]; then -- >/tmp/net.$netif.manualup -- rm -f /tmp/net.${netif}.did-setup --else -- [ -e /tmp/net.${netif}.did-setup ] && exit 0 -- [ -e /sys/class/net/$netif/address ] && \ -- [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 -+# loopback is always handled the same way -+if [ "$netif" = "lo" ] ; then -+ ip link set lo up -+ ip addr add 127.0.0.1/8 dev lo -+ exit 0 - fi - - # Run dhclient -@@ -188,134 +124,203 @@ do_static() { - return 0 - } - --# loopback is always handled the same way --if [ "$netif" = "lo" ] ; then -- ip link set lo up -- ip addr add 127.0.0.1/8 dev lo -+get_vid() { -+ case "$1" in -+ vlan*) -+ echo ${1#vlan} -+ ;; -+ *.*) -+ echo ${1##*.} -+ ;; -+ esac -+} -+ -+# check, if we need VLAN's for this interface -+if [ -z "$DO_VLAN_PHY" ] && [ -e /tmp/vlan.${netif}.phy ]; then -+ NO_AUTO_DHCP=yes DO_VLAN_PHY=yes ifup "$netif" -+ modprobe -b -q 8021q -+ -+ for i in /tmp/vlan.*.${netif}; do -+ [ -e "$i" ] || continue -+ read vlanname < "$i" -+ if [ -n "$vlanname" ]; then -+ linkup "$phydevice" -+ ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)" -+ ifup "$vlanname" -+ fi -+ done - exit 0 - fi - --# start bond if needed --if [ -e /tmp/bond.${netif}.info ]; then -- . /tmp/bond.${netif}.info -- -- if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.up ] ; then # We are master bond device -- modprobe bonding -- echo "+$netif" > /sys/class/net/bonding_masters -- ip link set $netif down -- -- # Stolen from ifup-eth -- # add the bits to setup driver parameters here -- for arg in $bondoptions ; do -- key=${arg%%=*}; -- value=${arg##*=}; -- # %{value:0:1} is replaced with non-bash specific construct -- if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then -- OLDIFS=$IFS; -- IFS=','; -- for arp_ip in $value; do -- echo +$arp_ip > /sys/class/net/${netif}/bonding/$key -- done -- IFS=$OLDIFS; -- else -- echo $value > /sys/class/net/${netif}/bonding/$key -+# bridge this interface? -+if [ -z "$NO_BRIDGE_MASTER" ]; then -+ for i in /tmp/bridge.*.info; do -+ [ -e "$i" ] || continue -+ unset bridgeslaves -+ unset bridgename -+ . "$i" -+ for ethname in $bridgeslaves ; do -+ [ "$netif" != "$ethname" ] && continue -+ -+ NO_BRIDGE_MASTER=yes NO_AUTO_DHCP=yes ifup $ethname -+ linkup $ethname -+ if [ ! -e /tmp/bridge.$bridgename.up ]; then -+ brctl addbr $bridgename -+ brctl setfd $bridgename 0 -+ > /tmp/bridge.$bridgename.up - fi -+ brctl addif $bridgename $ethname -+ ifup $bridgename -+ exit 0 - done -+ done -+fi - -- linkup $netif -- -+# enslave this interface to bond? -+if [ -z "$NO_BOND_MASTER" ]; then -+ for i in /tmp/bond.*.info; do -+ [ -e "$i" ] || continue -+ unset bondslaves -+ unset bondname -+ . "$i" - for slave in $bondslaves ; do -- ip link set $slave down -- cat /sys/class/net/$slave/address > /tmp/net.${netif}.${slave}.hwaddr -- echo "+$slave" > /sys/class/net/$bondname/bonding/slaves -- linkup $slave -- done -+ [ "$netif" != "$slave" ] && continue - -- # add the bits to setup the needed post enslavement parameters -- for arg in $BONDING_OPTS ; do -- key=${arg%%=*}; -- value=${arg##*=}; -- if [ "${key}" = "primary" ]; then -- echo $value > /sys/class/net/${netif}/bonding/$key -- fi -+ # already setup -+ [ -e /tmp/bond.$bondname.up ] && exit 0 -+ -+ # wait for all slaves to show up -+ for slave in $bondslaves ; do -+ # try to create the slave (maybe vlan or bridge) -+ NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave -+ -+ if ! ip link show dev $slave >/dev/null 2>&1; then -+ # wait for the last slave to show up -+ exit 0 -+ fi -+ done -+ -+ modprobe -q -b bonding -+ echo "+$bondname" > /sys/class/net/bonding_masters 2>/dev/null -+ ip link set $bondname down -+ -+ # Stolen from ifup-eth -+ # add the bits to setup driver parameters here -+ for arg in $bondoptions ; do -+ key=${arg%%=*}; -+ value=${arg##*=}; -+ # %{value:0:1} is replaced with non-bash specific construct -+ if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then -+ OLDIFS=$IFS; -+ IFS=','; -+ for arp_ip in $value; do -+ echo +$arp_ip > /sys/class/net/${bondname}/bonding/$key -+ done -+ IFS=$OLDIFS; -+ else -+ echo $value > /sys/class/net/${bondname}/bonding/$key -+ fi -+ done -+ -+ linkup $bondname -+ -+ for slave in $bondslaves ; do -+ cat /sys/class/net/$slave/address > /tmp/net.${bondname}.${slave}.hwaddr -+ ip link set $slave down -+ echo "+$slave" > /sys/class/net/$bondname/bonding/slaves -+ linkup $slave -+ done -+ -+ # add the bits to setup the needed post enslavement parameters -+ for arg in $bondoptions ; do -+ key=${arg%%=*}; -+ value=${arg##*=}; -+ if [ "${key}" = "primary" ]; then -+ echo $value > /sys/class/net/${bondname}/bonding/$key -+ fi -+ done -+ -+ > /tmp/bond.$bondname.up -+ -+ NO_BOND_MASTER=yes ifup $bondname -+ exit $? - done -- fi -+ done - fi - --if [ -e /tmp/team.info ]; then -- . /tmp/team.info -- if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.up ] ; then -- # We shall only bring up those _can_ come up -- # in case of some slave is gone in active-backup mode -- working_slaves="" -+if [ -z "$NO_TEAM_MASTER" ]; then -+ for i in /tmp/team.*.info; do -+ [ -e "$i" ] || continue -+ unset teammaster -+ unset teamslaves -+ . "$i" - for slave in $teamslaves ; do -- ip link set $slave up 2>/dev/null -- if wait_for_if_up $slave; then -- working_slaves+="$slave " -- fi -- done -- # Do not add slaves now -- teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf -- for slave in $working_slaves; do -- # team requires the slaves to be down before joining team -- ip link set $slave down -- teamdctl $teammaster port add $slave -- done -- ip link set $teammaster up -- fi --fi -+ [ "$netif" != "$slave" ] && continue - --# XXX need error handling like dhclient-script -+ [ -e /tmp/team.$teammaster.up ] && exit 0 - --if [ -e /tmp/bridge.info ]; then -- . /tmp/bridge.info --# start bridge if necessary -- if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then -- brctl addbr $bridgename -- brctl setfd $bridgename 0 -- for ethname in $bridgeslaves ; do -- if [ "$ethname" = "$bondname" ] ; then -- DO_BOND_SETUP=yes ifup $bondname -m -- elif [ "$ethname" = "$teammaster" ] ; then -- DO_TEAM_SETUP=yes ifup $teammaster -m -- elif [ "$ethname" = "$vlanname" ]; then -- DO_VLAN_SETUP=yes ifup $vlanname -m -- else -- linkup $ethname -+ # wait for all slaves to show up -+ for slave in $teamslaves ; do -+ # try to create the slave (maybe vlan or bridge) -+ NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave -+ -+ if ! ip link show dev $slave >/dev/null 2>&1; then -+ # wait for the last slave to show up -+ exit 0 -+ fi -+ done -+ -+ if [ ! -e /tmp/team.$teammaster.up ] ; then -+ # We shall only bring up those _can_ come up -+ # in case of some slave is gone in active-backup mode -+ working_slaves="" -+ for slave in $teamslaves ; do -+ ip link set $slave up 2>/dev/null -+ if wait_for_if_up $slave; then -+ working_slaves+="$slave " -+ fi -+ done -+ # Do not add slaves now -+ teamd -d -U -n -N -t $teammaster -f /etc/teamd/$teammaster.conf -+ for slave in $working_slaves; do -+ # team requires the slaves to be down before joining team -+ ip link set $slave down -+ teamdctl $teammaster port add $slave -+ done -+ -+ ip link set $teammaster up -+ -+ > /tmp/team.$teammaster.up -+ NO_TEAM_MASTER=yes ifup $teammaster -+ exit $? - fi -- brctl addif $bridgename $ethname - done -- fi -+ done - fi - --get_vid() { -- case "$1" in -- vlan*) -- echo ${1#vlan} -- ;; -- *.*) -- echo ${1##*.} -- ;; -- esac --} -+# all synthetic interfaces done.. now check if the interface is available -+if ! ip link show dev $netif >/dev/null 2>&1; then -+ exit 1 -+fi - --if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then -- modprobe 8021q -- if [ "$phydevice" = "$bondname" ] ; then -- DO_BOND_SETUP=yes ifup $phydevice -m -- elif [ "$phydevice" = "$teammaster" ] ; then -- DO_TEAM_SETUP=yes ifup $phydevice -m -- else -- linkup "$phydevice" -- fi -- ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)" -- ip link set "$vlanname" up -+# disable manual ifup while netroot is set for simplifying our logic -+# in netroot case we prefer netroot to bringup $netif automaticlly -+[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" -+ -+if [ -n "$manualup" ]; then -+ >/tmp/net.$netif.manualup -+ rm -f /tmp/net.${netif}.did-setup -+else -+ [ -e /tmp/net.${netif}.did-setup ] && exit 0 -+ [ -e /sys/class/net/$netif/address ] && \ -+ [ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0 - fi - -+ - # No ip lines default to dhcp - ip=$(getarg ip) - --if [ -z "$ip" ]; then -+if [ -z "$NO_AUTO_DHCP" ] && [ -z "$ip" ]; then - for s in $(getargs nameserver); do - [ -n "$s" ] || continue - echo nameserver $s >> /tmp/net.$netif.resolv.conf -@@ -348,9 +353,7 @@ for p in $(getargs ip=); do - esac - - # If this option isn't directed at our interface, skip it -- [ -n "$dev" ] && [ "$dev" != "$netif" ] && \ -- [ "$use_bridge" != 'true' ] && \ -- [ "$use_vlan" != 'true' ] && continue -+ [ -n "$dev" ] && [ "$dev" != "$netif" ] && continue - - # setup nameserver - for s in "$dns1" "$dns2" $(getargs nameserver); do -@@ -402,15 +405,8 @@ for p in $(getargs ip=); do - fi - done - --# netif isn't the top stack? Then we should exit here. --# eg. netif is bond0. br0 is on top of it. dhcp br0 is correct but dhcp --# bond0 doesn't make sense. --if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then -- exit 0 --fi -- - # no ip option directed at our interface? --if [ ! -e /tmp/net.${netif}.up ]; then -+if [ -z "$NO_AUTO_DHCP" ] && [ ! -e /tmp/net.${netif}.up ]; then - if [ -e /tmp/net.bootdev ]; then - BOOTDEV=$(cat /tmp/net.bootdev) - if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then -diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh -index b1c156c..5df50bd 100755 ---- a/modules.d/40network/net-genrules.sh -+++ b/modules.d/40network/net-genrules.sh -@@ -12,11 +12,14 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh - # Write udev rules - { - # bridge: attempt only the defined interface -- if [ -e /tmp/bridge.info ]; then -- . /tmp/bridge.info -+ for i in /tmp/bridge.*.info; do -+ [ -e "$i" ] || continue -+ unset bridgeslaves -+ unset bridgename -+ . "$i" - IFACES="$IFACES ${bridgeslaves%% *}" - MASTER_IFACES="$MASTER_IFACES $bridgename" -- fi -+ done - - # bond: attempt only the defined interface (override bridge defines) - for i in /tmp/bond.*.info; do -@@ -35,11 +38,18 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh - MASTER_IFACES="$MASTER_IFACES ${teammaster}" - fi - -- if [ -e /tmp/vlan.info ]; then -- . /tmp/vlan.info -- IFACES="$IFACES $phydevice" -- MASTER_IFACES="$MASTER_IFACES ${vlanname}" -- fi -+ for j in /tmp/vlan.*.phy; do -+ [ -e "$j" ] || continue -+ unset phydevice -+ . "$j" -+ for i in /tmp/vlan.*.${phydevice}; do -+ [ -e "$i" ] || continue -+ unset vlanname -+ . "$i" -+ IFACES="$IFACES $phydevice" -+ MASTER_IFACES="$MASTER_IFACES ${vlanname}" -+ done -+ done - - if [ -z "$IFACES" ]; then - [ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces -diff --git a/modules.d/40network/parse-bond.sh b/modules.d/40network/parse-bond.sh -index 25c51b8..80b3b07 100755 ---- a/modules.d/40network/parse-bond.sh -+++ b/modules.d/40network/parse-bond.sh -@@ -10,14 +10,6 @@ - # bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr - # - --# return if bond already parsed --[ -n "$bondname" ] && return -- --# Check if bond parameter is valid --if getarg bond= >/dev/null ; then -- : --fi -- - # We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup - # Ditto for bonding options - parsebond() { -@@ -28,7 +20,6 @@ parsebond() { - v=${v#*:} - done - -- unset bondname bondslaves bondoptions - case $# in - 0) bondname=bond0; bondslaves="eth0 eth1" ;; - 1) bondname=$1; bondslaves="eth0 eth1" ;; -@@ -38,14 +29,13 @@ parsebond() { - esac - } - --unset bondname bondslaves bondoptions -- - # Parse bond for bondname, bondslaves, bondmode and bondoptions --if getarg bond >/dev/null; then -- # Read bond= parameters if they exist -- bond="$(getarg bond=)" -- if [ ! "$bond" = "bond" ]; then -- parsebond "$(getarg bond=)" -+for bond in $(getargs bond=); do -+ unset bondname -+ unset bondslaves -+ unset bondoptions -+ if [ "$bond" != "bond" ]; then -+ parsebond "$bond" - fi - # Simple default bond - if [ -z "$bondname" ]; then -@@ -57,5 +47,4 @@ if getarg bond >/dev/null; then - echo "bondname=$bondname" > /tmp/bond.${bondname}.info - echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.${bondname}.info - echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.${bondname}.info -- return --fi -+done -diff --git a/modules.d/40network/parse-bridge.sh b/modules.d/40network/parse-bridge.sh -index 212f259..5c3af29 100755 ---- a/modules.d/40network/parse-bridge.sh -+++ b/modules.d/40network/parse-bridge.sh -@@ -7,14 +7,6 @@ - # bridge without parameters assumes bridge=br0:eth0 - # - --# return if bridge already parsed --[ -n "$bridgename" ] && return -- --# Check if bridge parameter is valid --if getarg bridge= >/dev/null ; then -- command -v brctl >/dev/null 2>&1 || die "No 'brctl' installed" --fi -- - parsebridge() { - local v=${1}: - set -- -@@ -22,8 +14,6 @@ parsebridge() { - set -- "$@" "${v%%:*}" - v=${v#*:} - done -- -- unset bridgename bridgeslaves - case $# in - 0) bridgename=br0; bridgeslaves=$iface ;; - 1) die "bridge= requires two parameters" ;; -@@ -32,14 +22,13 @@ parsebridge() { - esac - } - --unset bridgename bridgeslaves -- --iface=eth0 -- - # Parse bridge for bridgename and bridgeslaves --if bridge="$(getarg bridge)"; then -+for bridge in $(getargs bridge=); do -+ unset bridgename -+ unset bridgeslaves -+ iface=eth0 - # Read bridge= parameters if they exist -- if [ -n "$bridge" ]; then -+ if [ "$bridge" != "bridge" ]; then - parsebridge $bridge - fi - # Simple default bridge -@@ -47,7 +36,6 @@ if bridge="$(getarg bridge)"; then - bridgename=br0 - bridgeslaves=$iface - fi -- echo "bridgename=$bridgename" > /tmp/bridge.info -- echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.info -- return --fi -+ echo "bridgename=$bridgename" > /tmp/bridge.${bridgename}.info -+ echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.${bridgename}.info -+done -diff --git a/modules.d/40network/parse-team.sh b/modules.d/40network/parse-team.sh -index 318c0e1..cc5cba7 100755 ---- a/modules.d/40network/parse-team.sh -+++ b/modules.d/40network/parse-team.sh -@@ -6,14 +6,6 @@ - # teamslaves is a comma-separated list of physical (ethernet) interfaces - # - --# return if team already parsed --[ -n "$teammaster" ] && return -- --# Check if team parameter is valid --if getarg team= >/dev/null ; then -- : --fi -- - parseteam() { - local v=${1}: - set -- -@@ -22,23 +14,17 @@ parseteam() { - v=${v#*:} - done - -- unset teammaster teamslaves - case $# in - 2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;; - *) die "team= requires two parameters" ;; - esac - } - --unset teammaster teamslaves - --if getarg team>/dev/null; then -- # Read team= parameters if they exist -- team="$(getarg team=)" -- if [ ! "$team" = "team" ]; then -- parseteam "$(getarg team=)" -- fi -+for team in $(getargs team=); do -+ unset teammaster teamslaves -+ parseteam "$(getarg team=)" - -- echo "teammaster=$teammaster" > /tmp/team.info -- echo "teamslaves=\"$teamslaves\"" >> /tmp/team.info -- return --fi -+ echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info -+ echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info -+done -diff --git a/modules.d/40network/parse-vlan.sh b/modules.d/40network/parse-vlan.sh -index 3ba2289..b2a9c1c 100755 ---- a/modules.d/40network/parse-vlan.sh -+++ b/modules.d/40network/parse-vlan.sh -@@ -36,7 +36,7 @@ if getarg vlan >/dev/null; then - parsevlan "$(getarg vlan=)" - fi - -- echo "vlanname=\"$vlanname\"" > /tmp/vlan.info -- echo "phydevice=\"$phydevice\"" >> /tmp/vlan.info -+ echo "$phydevice" > /tmp/vlan.${phydevice}.phy -+ echo "$vlanname" > /tmp/vlan.${vlanname}.${phydevice} - return - fi -diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh -index 251d684..c3774ae 100755 ---- a/modules.d/45ifcfg/write-ifcfg.sh -+++ b/modules.d/45ifcfg/write-ifcfg.sh -@@ -5,14 +5,6 @@ type is_persistent_ethernet_name >/dev/null 2>&1 || . /lib/net-lib.sh - - udevadm settle --timeout=30 - --if [ -e /tmp/bridge.info ]; then -- . /tmp/bridge.info --fi -- --if [ -e /tmp/vlan.info ]; then -- . /tmp/vlan.info --fi -- - mkdir -m 0755 -p /tmp/ifcfg/ - mkdir -m 0755 -p /tmp/ifcfg-leases/ - -@@ -129,6 +121,8 @@ for netup in /tmp/net.*.did-setup ; do - unset bondslaves - unset bondname - unset bondoptions -+ unset bridgename -+ unset bridgeslaves - unset uuid - unset ip - unset gw -@@ -140,17 +134,22 @@ for netup in /tmp/net.*.did-setup ; do - unset vlan - - [ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info -+ [ -e /tmp/bridge.${netif}.info ] && . /tmp/bridge.${netif}.info - - uuid=$(cat /proc/sys/kernel/random/uuid) - if [ "$netif" = "$bridgename" ]; then - bridge=yes - elif [ "$netif" = "$bondname" ]; then -- # $netif can't be bridge and bond at the same time -+ # $netif can't be bridge and bond at the same time - bond=yes - fi -- if [ "$netif" = "$vlanname" ]; then -+ -+ for i in /tmp/vlan.${netif}.*; do -+ [ ! -e "$i" ] && continue -+ . "$i" - vlan=yes -- fi -+ break -+ done - - { - echo "# Generated by dracut initrd" -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index 61e4c1a..ceca1f0 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -16,8 +16,8 @@ run_server() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext3 \ - -m 256M -smp 2 \ - -display none \ -- -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -net socket,listen=127.0.0.1:12320 \ -+ -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -serial ${SERIAL:-null} \ - -watchdog i6300esb -watchdog-action poweroff \ - -append "rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ -@@ -134,7 +134,7 @@ test_nfsv3() { - "root=nfs:192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1 - - client_test "NFSv3 Bridge root=nfs:..." 52:54:00:12:34:04 \ -- "root=nfs:192.168.50.1:/nfs/client bridge" 192.168.50.1 -wsize=4096 || return 1 -+ "root=nfs:192.168.50.1:/nfs/client bridge net.ifnames=0" 192.168.50.1 -wsize=4096 || return 1 - - client_test "NFSv3 Legacy root=IP:path" 52:54:00:12:34:04 \ - "root=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1 -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index fc4bdce..00c1fbd 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -85,7 +85,7 @@ do_test_run() { - "rd.iscsi.initiator=$initiator" \ - || return 1 - -- run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ -+ run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ - "root=LABEL=sysroot" \ - "ip=192.168.50.101:::255.255.255.0::ens3:off" \ - "ip=192.168.51.101:::255.255.255.0::ens4:off" \ -@@ -94,7 +94,7 @@ do_test_run() { - "rd.iscsi.firmware" \ - "rd.iscsi.initiator=$initiator" \ - "rd.iscsi.waitnet=0" \ -- || return 1 -+ || return 0 - - run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ - "root=LABEL=sysroot" \ -diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh -index fdeb840..484ebee 100755 ---- a/test/TEST-50-MULTINIC/test.sh -+++ b/test/TEST-50-MULTINIC/test.sh -@@ -18,7 +18,7 @@ run_server() { - -display none \ - -net socket,listen=127.0.0.1:12350 \ - -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ -- ${SERIAL:+-serial "$SERIAL"} \ -+ -serial ${SERIAL:-null} \ - -watchdog i6300esb -watchdog-action poweroff \ - -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ - -initrd "$TESTDIR"/initramfs.server \ -@@ -90,7 +90,10 @@ test_run() { - echo "Failed to start server" 1>&2 - return 1 - fi -- test_client || { kill_server; return 1; } -+ test_client -+ ret=$? -+ kill_server -+ return $ret - } - - test_client() { -@@ -133,7 +136,15 @@ test_client() { - "root=dhcp ip=ens3:dhcp ip=ens4:dhcp ip=ens5:dhcp bootdev=ens5" \ - "ens3 ens4 ens5" || return 1 - -- kill_server -+ client_test "MULTINIC bonding" \ -+ 00 01 02 \ -+ "root=nfs:192.168.50.1:/nfs/client ip=bond0:dhcp bond=bond0:ens3,ens4,ens5:mode=balance-rr" \ -+ "bond0" || return 1 -+ -+ client_test "MULTINIC bridging" \ -+ 00 01 02 \ -+ "root=nfs:192.168.50.1:/nfs/client ip=bridge0:dhcp bridge=bridge0:ens3,ens4,ens5" \ -+ "bridge0" || return 1 - return 0 - } - diff --git a/0023-TEST-30-ISCSI-some-tests-have-unknown-return-code.patch b/0023-TEST-30-ISCSI-some-tests-have-unknown-return-code.patch deleted file mode 100644 index 92a53da..0000000 --- a/0023-TEST-30-ISCSI-some-tests-have-unknown-return-code.patch +++ /dev/null @@ -1,56 +0,0 @@ -From bb1b924792a688ea3da7e7f4503527e5bc0b18fb Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Jan 2016 14:43:43 +0100 -Subject: [PATCH] TEST-30-ISCSI: some tests have unknown return code - -by design ---- - test/TEST-30-ISCSI/test.sh | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 00c1fbd..940edb6 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -85,7 +85,7 @@ do_test_run() { - "rd.iscsi.initiator=$initiator" \ - || return 1 - -- run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ -+ run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ - "root=LABEL=sysroot" \ - "ip=192.168.50.101:::255.255.255.0::ens3:off" \ - "ip=192.168.51.101:::255.255.255.0::ens4:off" \ -@@ -94,9 +94,9 @@ do_test_run() { - "rd.iscsi.firmware" \ - "rd.iscsi.initiator=$initiator" \ - "rd.iscsi.waitnet=0" \ -- || return 0 -+ || return 1 - -- run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ -+ run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ - "root=LABEL=sysroot" \ - "ip=192.168.50.101:::255.255.255.0::ens3:off" \ - "ip=192.168.51.101:::255.255.255.0::ens4:off" \ -@@ -105,9 +105,9 @@ do_test_run() { - "rd.iscsi.firmware" \ - "rd.iscsi.initiator=$initiator" \ - "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ -- || return 1 -+ || : - -- run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \ -+ run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \ - "root=LABEL=sysroot" \ - "ip=192.168.50.101::192.168.50.1:255.255.255.0::ens3:off" \ - "ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \ -@@ -116,7 +116,7 @@ do_test_run() { - "rd.iscsi.firmware" \ - "rd.iscsi.initiator=$initiator" \ - "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ -- || return 1 -+ || : - - return 0 - } diff --git a/0024-network-add-mtu-to-list-of-variables-to-store-in-ove.patch b/0024-network-add-mtu-to-list-of-variables-to-store-in-ove.patch deleted file mode 100644 index c2e6857..0000000 --- a/0024-network-add-mtu-to-list-of-variables-to-store-in-ove.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 9542f2fee4a398ed00730e6ffb7de5fe315aa093 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 19 Jan 2016 15:12:39 +0100 -Subject: [PATCH] network: add mtu to list of variables to store in override - ---- - modules.d/40network/ifup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh -index 14ca86d..7c179bd 100755 ---- a/modules.d/40network/ifup.sh -+++ b/modules.d/40network/ifup.sh -@@ -362,7 +362,7 @@ for p in $(getargs ip=); do - done - - # Store config for later use -- for i in ip srv gw mask hostname macaddr dns1 dns2; do -+ for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do - eval '[ "$'$i'" ] && echo '$i'="$'$i'"' - done > /tmp/net.$netif.override - diff --git a/0025-Correctly-handle-module-aliases.patch b/0025-Correctly-handle-module-aliases.patch deleted file mode 100644 index c892968..0000000 --- a/0025-Correctly-handle-module-aliases.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 43819af68c7789ec932c25e699c56889fdf7276c Mon Sep 17 00:00:00 2001 -From: Fabian Vogt -Date: Thu, 21 Jan 2016 17:13:07 +0100 -Subject: [PATCH] Correctly handle module aliases - -Handle module aliases correctly to not generate unbootable -initrds with different kernel versions when modules were renamed -or replaced. - -Signed-off-by: Fabian Vogt ---- - dracut.sh | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index 98dbe0b..ae8772b 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1195,6 +1195,27 @@ if [[ $hostonly ]]; then - while read m rest || [ -n "$m" ]; do - host_modules["$m"]=1 - done = 4.4, mpt2sas isn't loaded, -+ # so it's not included. -+ # Both ways result in an unbootable initrd. -+ -+ # also add aliases of loaded modules -+ for mod in "${!host_modules[@]}"; do -+ aliases=$(modinfo -F alias "$mod" 2>&1) -+ for alias in $aliases; do -+ host_modules["$alias"]=1 -+ done -+ # mod might be an alias in the target kernel, find the real module -+ mod_filename=$(modinfo -k "$kernel" "$mod" -F filename) -+ [ $? -ne 0 ] && continue -+ host_modules["$(basename -s .ko "$mod_filename")"]=1 -+ done - fi - - unset m diff --git a/0026-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch b/0026-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch deleted file mode 100644 index a4ae128..0000000 --- a/0026-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f4f8fb5c10cc8d0047123324197aff25f0a63e04 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 26 Jan 2016 12:26:03 +0100 -Subject: [PATCH] network: if rd.neednet=0 we don't need a bootdev - -otherwise dracut would wait for the bootdev interface to appear and be -setup ---- - modules.d/40network/parse-ip-opts.sh | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh -index 12f4765..5779ef8 100755 ---- a/modules.d/40network/parse-ip-opts.sh -+++ b/modules.d/40network/parse-ip-opts.sh -@@ -40,6 +40,8 @@ if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then - #[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines" - echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf - info "Multiple ip= arguments: assuming rd.neednet=1" -+else -+ unset NEEDBOOTDEV - fi - - # Check ip= lines -@@ -48,17 +50,14 @@ for p in $(getargs ip=); do - ip_to_var $p - - # make first device specified the BOOTDEV -- if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then -+ if [ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then - BOOTDEV="$dev" -- [ -n "$NEEDBOOTDEV" ] && info "Setting bootdev to '$BOOTDEV'" -+ info "Setting bootdev to '$BOOTDEV'" - fi - - # skip ibft since we did it above - [ "$autoconf" = "ibft" ] && continue - -- # We need to have an ip= line for the specified bootdev -- [ -n "$NEEDBOOTDEV" ] && [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1 -- - # Empty autoconf defaults to 'dhcp' - if [ -z "$autoconf" ] ; then - warn "Empty autoconf values default to dhcp" diff --git a/0027-kernel-modules-add-usb-storage.patch b/0027-kernel-modules-add-usb-storage.patch deleted file mode 100644 index b85cc67..0000000 --- a/0027-kernel-modules-add-usb-storage.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b4dd861a0b916368bad9413fdc5d90482fcbd65a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 26 Jan 2016 14:56:05 +0100 -Subject: [PATCH] kernel-modules: add usb-storage - -To save the rdsosreport.txt to a USB stick, the usb-storage module is -needed ---- - modules.d/90kernel-modules/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index c5f2397..13f48c9 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -47,7 +47,8 @@ installkernel() { - "=drivers/input/keyboard" - - instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ -- atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus -+ atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ -+ usb-storage - - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules diff --git a/0028-kernel-modules-join-instmods-and-install-all-usb-sto.patch b/0028-kernel-modules-join-instmods-and-install-all-usb-sto.patch deleted file mode 100644 index 55abd55..0000000 --- a/0028-kernel-modules-join-instmods-and-install-all-usb-sto.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 6bc2096cf58c4b52f23ecc1bf8dc301d6122dfb5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 26 Jan 2016 14:59:28 +0100 -Subject: [PATCH] kernel-modules: join instmods and install all usb/storage - ---- - modules.d/90kernel-modules/module-setup.sh | 18 ++++++++---------- - 1 file changed, 8 insertions(+), 10 deletions(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 13f48c9..300adc7 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -39,16 +39,17 @@ installkernel() { - ehci-hcd ehci-pci ehci-platform \ - ohci-hcd ohci-pci \ - uhci-hcd \ -- xhci-hcd xhci-pci xhci-plat-hcd -- -- hostonly='' instmods \ -+ xhci-hcd xhci-pci xhci-plat-hcd \ - "=drivers/hid" \ - "=drivers/input/serio" \ -- "=drivers/input/keyboard" -+ "=drivers/input/keyboard" \ -+ "=drivers/usb/storage" - -- instmods yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ -- atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ -- usb-storage -+ instmods \ -+ yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ -+ atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ -+ virtio virtio_blk virtio_ring virtio_pci virtio_scsi \ -+ "=drivers/pcmcia" =ide - - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules -@@ -61,9 +62,6 @@ installkernel() { - ${NULL} - fi - -- # install virtual machine support -- instmods virtio virtio_blk virtio_ring virtio_pci virtio_scsi \ -- "=drivers/pcmcia" =ide "=drivers/usb/storage" - - find_kernel_modules | block_module_filter | instmods - diff --git a/0029-dracut-systemd-dracut-cmdline-ask-fix-dracut-kernel-.patch b/0029-dracut-systemd-dracut-cmdline-ask-fix-dracut-kernel-.patch deleted file mode 100644 index 400b5f7..0000000 --- a/0029-dracut-systemd-dracut-cmdline-ask-fix-dracut-kernel-.patch +++ /dev/null @@ -1,54 +0,0 @@ -From eddca3c9c24e4cb9c5def0b98920e36b16fafaac Mon Sep 17 00:00:00 2001 -From: Evgeny Vereshchagin -Date: Mon, 15 Feb 2016 08:29:40 +0000 -Subject: [PATCH] dracut-systemd/dracut-cmdline-ask: fix dracut - --kernel-cmdline=rd.cmdline=ask - -How to reproduce: - -host# dracut --kernel-cmdline='rd.cmdline=ask' initramfs.img -host# qemu-system-x86_64 -initrd initramfs.img ... -append root=/dev/sda1 ... -... - -qemu-host# journalctl -b | grep dracut-cmdline-ask -... -Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Installed new job dracut-cmdline-ask.service/start as 42 -Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: ConditionKernelCommandLine=rd.cmdline=ask failed. -Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Starting requested but condition failed. Not starting unit. -Feb 15 08:45:36 localhost systemd[1]: dracut-cmdline-ask.service: Job dracut-cmdline-ask.service/start finished, result=done -... - -Signed-off-by: Evgeny Vereshchagin ---- - modules.d/98dracut-systemd/dracut-cmdline-ask.service | 3 ++- - modules.d/98dracut-systemd/dracut-cmdline-ask.sh | 4 ++++ - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98dracut-systemd/dracut-cmdline-ask.service b/modules.d/98dracut-systemd/dracut-cmdline-ask.service -index 9a34b35..8bc7d80 100644 ---- a/modules.d/98dracut-systemd/dracut-cmdline-ask.service -+++ b/modules.d/98dracut-systemd/dracut-cmdline-ask.service -@@ -14,7 +14,8 @@ Before=dracut-cmdline.service - After=systemd-journald.socket - Wants=systemd-journald.socket - ConditionPathExists=/usr/lib/initrd-release --ConditionKernelCommandLine=rd.cmdline=ask -+ConditionKernelCommandLine=|rd.cmdline=ask -+ConditionPathExistsGlob=|/etc/cmdline.d/*.conf - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/dracut-cmdline-ask.sh b/modules.d/98dracut-systemd/dracut-cmdline-ask.sh -index ab8933a..f410f46 100755 ---- a/modules.d/98dracut-systemd/dracut-cmdline-ask.sh -+++ b/modules.d/98dracut-systemd/dracut-cmdline-ask.sh -@@ -1,5 +1,9 @@ - #!/bin/bash - -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ -+getarg "rd.cmdline=ask" || exit 0 -+ - sleep 0.5 - echo - sleep 0.5 diff --git a/0030-base-init.sh-don-t-remove-99-cmdline-ask-on-hostonly.patch b/0030-base-init.sh-don-t-remove-99-cmdline-ask-on-hostonly.patch deleted file mode 100644 index af11e7d..0000000 --- a/0030-base-init.sh-don-t-remove-99-cmdline-ask-on-hostonly.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 4ab6447c2a9ed105e7fba26ded2b3f3b725de8e9 Mon Sep 17 00:00:00 2001 -From: Evgeny Vereshchagin -Date: Mon, 15 Feb 2016 13:47:18 +0000 -Subject: [PATCH] base/init.sh: don't remove 99-cmdline-ask on 'hostonly' - cleanup - -How to reproduce: -host# ./dracut.sh -o 'dracut-systemd systemd systemd-initrd' --local -f ./initramfs.img - -host# qemu-system-x86_64 -initrd ./initramfs.img \ - -append 'root=/dev/sda1 rd.cmdline=ask rd.hostonly=0' \ - ... - -Enter additional kernel command line parameter (end with ctrl-d or .) -> rd.break -> . -... -There is no "Break before switch_root" -... - -Signed-off-by: Evgeny Vereshchagin ---- - modules.d/99base/init.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index e2e4029..bd7ef70 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -120,7 +120,9 @@ if getarg "rd.cmdline=ask"; then - fi - - if ! getargbool 1 'rd.hostonly'; then -+ [ -f /etc/cmdline.d/99-cmdline-ask.conf ] && mv /etc/cmdline.d/99-cmdline-ask.conf /tmp/99-cmdline-ask.conf - remove_hostonly_files -+ [ -f /tmp/99-cmdline-ask.conf ] && mv /tmp/99-cmdline-ask.conf /etc/cmdline.d/99-cmdline-ask.conf - fi - - # run scriptlets to parse the command line diff --git a/0031-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch b/0031-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch deleted file mode 100644 index 7712cdb..0000000 --- a/0031-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch +++ /dev/null @@ -1,42 +0,0 @@ -From fe6455a6e8f4b070ffa8116ef26d423a25d56049 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 29 Feb 2016 13:12:02 +0100 -Subject: [PATCH] documentation: "--hostonly-i18n" "--no-hostonly-i18n" - "i18n_install_all" - ---- - dracut.8.asc | 6 ++++++ - dracut.conf.5.asc | 3 +++ - 2 files changed, 9 insertions(+) - -diff --git a/dracut.8.asc b/dracut.8.asc -index aee84c4..3b80000 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -323,6 +323,12 @@ provide a valid _/etc/fstab_. - **--no-hostonly-cmdline**: - Do not store kernel command line arguments needed in the initramfs - -+**--hostonly-i18n**: -+ Install only needed keyboard and font files according to the host configuration (default). -+ -+**--no-hostonly-i18n**: -+ Install all keyboard and font files available. -+ - **--persistent-policy** __:: - Use __ to address disks and partitions. - __ can be any directory name found in /dev/disk. -diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc -index 0460d4f..e07c247 100644 ---- a/dracut.conf.5.asc -+++ b/dracut.conf.5.asc -@@ -99,6 +99,9 @@ Configuration files must have the extension .conf; other extensions are ignored. - *hostonly_cmdline=*"__{yes|no}__":: - If set, store the kernel command line arguments needed in the initramfs - -+*i18n_install_all=*"__{yes|no}__":: -+ If set to yes, install all available fonts and keyboard files. -+ - *persistent_policy=*"____":: - Use __ to address disks and partitions. - __ can be any directory name found in /dev/disk. diff --git a/0032-network-dhclient-script.sh-add-classless-static-rout.patch b/0032-network-dhclient-script.sh-add-classless-static-rout.patch deleted file mode 100644 index e837576..0000000 --- a/0032-network-dhclient-script.sh-add-classless-static-rout.patch +++ /dev/null @@ -1,91 +0,0 @@ -From caf12d6717379769e4f12296405edc4d547d46f8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 29 Feb 2016 14:52:16 +0100 -Subject: [PATCH] network/dhclient-script.sh: add classless-static-routes - support - -https://bugzilla.redhat.com/show_bug.cgi?id=1260955 -(cherry picked from commit a48ea27debb926a30810c9f1a42f096494c727e2) ---- - modules.d/40network/dhclient-script.sh | 48 ++++++++++++++++++++++++++++++++++ - modules.d/40network/dhclient.conf | 5 +++- - 2 files changed, 52 insertions(+), 1 deletion(-) - -diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh -index 9aac2b1..13d2dc2 100755 ---- a/modules.d/40network/dhclient-script.sh -+++ b/modules.d/40network/dhclient-script.sh -@@ -95,6 +95,51 @@ setup_interface6() { - [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname - } - -+function parse_option_121() { -+ while [ $# -ne 0 ]; do -+ mask="$1" -+ shift -+ -+ # Is the destination a multicast group? -+ if [ $1 -ge 224 -a $1 -lt 240 ]; then -+ multicast=1 -+ else -+ multicast=0 -+ fi -+ -+ # Parse the arguments into a CIDR net/mask string -+ if [ $mask -gt 24 ]; then -+ destination="$1.$2.$3.$4/$mask" -+ shift; shift; shift; shift -+ elif [ $mask -gt 16 ]; then -+ destination="$1.$2.$3.0/$mask" -+ shift; shift; shift -+ elif [ $mask -gt 8 ]; then -+ destination="$1.$2.0.0/$mask" -+ shift; shift -+ else -+ destination="$1.0.0.0/$mask" -+ shift -+ fi -+ -+ # Read the gateway -+ gateway="$1.$2.$3.$4" -+ shift; shift; shift; shift -+ -+ # Multicast routing on Linux -+ # - If you set a next-hop address for a multicast group, this breaks with Cisco switches -+ # - If you simply leave it link-local and attach it to an interface, it works fine. -+ if [ $multicast -eq 1 ]; then -+ temp_result="$destination dev $interface" -+ else -+ temp_result="$destination via $gateway dev $interface" -+ fi -+ -+ echo "/sbin/ip route add $temp_result" -+ done -+} -+ -+ - case $reason in - PREINIT) - echo "dhcp: PREINIT $netif up" -@@ -129,6 +174,9 @@ case $reason in - { - echo '. /lib/net-lib.sh' - echo "setup_net $netif" -+ if [ -n "$new_classless_static_routes" ]; then -+ modify_routes add "$(parse_option_121 $new_classless_static_routes)" -+ fi - echo "source_hook initqueue/online $netif" - [ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif" - echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh" -diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf -index dbf5882..7b06763 100644 ---- a/modules.d/40network/dhclient.conf -+++ b/modules.d/40network/dhclient.conf -@@ -1,3 +1,6 @@ -+ -+option classless-routes code 121 = array of unsigned integer 8; -+ - request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, domain-search, host-name, -- root-path, interface-mtu; -+ root-path, interface-mtu classless-routes; diff --git a/0033-dracut-systemd-dracut-pre-pivot.sh-Break-at-switch_r.patch b/0033-dracut-systemd-dracut-pre-pivot.sh-Break-at-switch_r.patch deleted file mode 100644 index e41529b..0000000 --- a/0033-dracut-systemd-dracut-pre-pivot.sh-Break-at-switch_r.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 556ff7c76a5c365889ea9972c1878eaf7073bde8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Mar 2016 12:38:23 +0100 -Subject: [PATCH] dracut-systemd/dracut-pre-pivot.sh: Break at switch_root only - for bare rd.break - -similar to commit ddfea6b54cfa8f8f6c970d970318568c8a8a4c78 - -Previously, any rd.break=breakpoint would cause a break at the -given breakpoint and also at switch_root. ---- - modules.d/98dracut-systemd/dracut-pre-pivot.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.sh b/modules.d/98dracut-systemd/dracut-pre-pivot.sh -index a07cf3e..cc70e3c 100755 ---- a/modules.d/98dracut-systemd/dracut-pre-pivot.sh -+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.sh -@@ -18,7 +18,9 @@ source_hook pre-pivot - getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup" - source_hook cleanup - --getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root" -+_bv=$(getarg rd.break -d rdbreak) && [ -z "$_bv" ] && -+ emergency_shell -n switch_root "Break before switch_root" -+unset _bv - - # remove helper symlink - [ -h /dev/root ] && rm -f -- /dev/root diff --git a/0034-dracut-install-catch-ldd-message-cannot-execute-bina.patch b/0034-dracut-install-catch-ldd-message-cannot-execute-bina.patch deleted file mode 100644 index 28506a2..0000000 --- a/0034-dracut-install-catch-ldd-message-cannot-execute-bina.patch +++ /dev/null @@ -1,24 +0,0 @@ -From b127294def5efecc27fac730f784f8bf03a5e52d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Mar 2016 10:59:29 +0100 -Subject: [PATCH] dracut-install: catch ldd message "cannot execute binary - file" - ---- - install/dracut-install.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index a7bfdb8..8f65d8d 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -393,6 +393,9 @@ static int resolve_deps(const char *src) - break; - - /* glibc */ -+ if (strstr(buf, "cannot execute binary file")) -+ break; -+ - if (strstr(buf, "not a dynamic executable")) - break; - diff --git a/0035-dracut.conf.5.asc-fix-bold.patch b/0035-dracut.conf.5.asc-fix-bold.patch deleted file mode 100644 index 617eb00..0000000 --- a/0035-dracut.conf.5.asc-fix-bold.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 472928ec3dcbfcc7ea0c1fd7e821843739f03bfc Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Mar 2016 14:16:12 +0100 -Subject: [PATCH] dracut.conf.5.asc: fix bold - ---- - dracut.conf.5.asc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc -index e07c247..8f362b2 100644 ---- a/dracut.conf.5.asc -+++ b/dracut.conf.5.asc -@@ -187,7 +187,7 @@ provide a valid _/etc/fstab_. - *show_modules=*"__{yes|no}__":: - Print the name of the included modules to standard output during build. - --*i18n_vars="____":: -+*i18n_vars=*"____":: - Distribution specific variable mapping. - See dracut/modules.d/10i18n/README for a detailed description. - diff --git a/0036-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch b/0036-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch deleted file mode 100644 index 05f9e1f..0000000 --- a/0036-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 89da227de991ef3c1bb9ad3dc4f23d07535317d2 Mon Sep 17 00:00:00 2001 -From: Pratyush Anand -Date: Wed, 16 Mar 2016 09:09:09 +0530 -Subject: [PATCH] watchdog: Do not add hooks if systemd module is included - -When systemd is present, let it manage watchdog feed. - -Signed-off-by: Pratyush Anand -Cc: Dave Young -Cc: Don Zickus -Cc: Harald Hoyer ---- - modules.d/04watchdog/module-setup.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh -index 576c589..7ec757a 100755 ---- a/modules.d/04watchdog/module-setup.sh -+++ b/modules.d/04watchdog/module-setup.sh -@@ -12,6 +12,11 @@ depends() { - - # called by dracut - install() { -+ # Do not add watchdog hooks if systemd module is included -+ # In that case, systemd will manage watchdog kick -+ if dracut_module_included "systemd"; then -+ return -+ fi - inst_hook cmdline 00 "$moddir/watchdog.sh" - inst_hook cmdline 50 "$moddir/watchdog.sh" - inst_hook pre-trigger 00 "$moddir/watchdog.sh" diff --git a/0037-watchdog-install-module-for-active-watchdog.patch b/0037-watchdog-install-module-for-active-watchdog.patch deleted file mode 100644 index c8688b5..0000000 --- a/0037-watchdog-install-module-for-active-watchdog.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 3aac6827444c897aab59d7638aa191d510fd4758 Mon Sep 17 00:00:00 2001 -From: Pratyush Anand -Date: Wed, 16 Mar 2016 09:09:10 +0530 -Subject: [PATCH] watchdog: install module for active watchdog - -Recently following patches have been added in upstream Linux kernel, which -(1) fixes parent of watchdog_device so that -/sys/class/watchdog/watchdogn/device is populated. (2) adds some sysfs -device attributes so that different watchdog status can be read. - -http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6551881c86c791237a3bebf11eb3bd70b60ea782 -http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=906d7a5cfeda508e7361f021605579a00cd82815 -http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=33b711269ade3f6bc9d9d15e4343e6fa922d999b - -With the above support, now we can find out whether a watchdog is active or -not. We can also find out the driver/module responsible for that watchdog -device. - -Proposed patch uses above support and then adds module of active watchdog -in initramfs generated by dracut for hostonly mode. Kernel module for -inactive watchdog will be added as well for none hostonly mode. - -When an user does not want to add kernel module, then one should exclude -complete dracut watchdog module with --omit. - -Testing: --- When watchdog is active watchdog modules were added - # cat /sys/class/watchdog/watchdog0/identity - iTCO_wdt - # cat /sys/class/watchdog/watchdog0/state - active - # dracut --hostonly initramfs-test.img -a watchdog - # lsinitrd initramfs-test.img | grep iTCO - -rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko - -rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko - --- When watchdog is inactive then watchdog modules were not added - # cat /sys/class/watchdog/watchdog0/state - inactive - # dracut --hostonly initramfs-test.img -a watchdog - # lsinitrd initramfs-test.img | grep iTCO - --- When watchdog is inactive, but no hostonly mode, watchdog modules were added - # cat /sys/class/watchdog/watchdog0/state - inactive - # dracut --no-hostonly initramfs-test.img -a watchdog - # lsinitrd initramfs-test.img | grep iTCO - -rw-r--r-- 1 root root 9100 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_vendor_support.ko - -rw-r--r-- 1 root root 19252 Feb 24 09:19 usr/lib/modules/.../kernel/drivers/watchdog/iTCO_wdt.ko - -Signed-off-by: Pratyush Anand -Cc: Dave Young -Cc: Don Zickus -Cc: Harald Hoyer ---- - modules.d/04watchdog/module-setup.sh | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh -index 7ec757a..0ffaa96 100755 ---- a/modules.d/04watchdog/module-setup.sh -+++ b/modules.d/04watchdog/module-setup.sh -@@ -32,3 +32,31 @@ install() { - inst_multiple -o wdctl - } - -+installkernel() { -+ [[ -d /sys/class/watchdog/ ]] || return -+ for dir in /sys/class/watchdog/*; do -+ [[ -d "$dir" ]] || continue -+ [[ -f "$dir/state" ]] || continue -+ active=$(< "$dir/state") -+ ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue -+ # device/modalias will return driver of this device -+ wdtdrv=$(< "$dir/device/modalias") -+ # There can be more than one module represented by same -+ # modalias. Currently load all of them. -+ # TODO: Need to find a way to avoid any unwanted module -+ # represented by modalias -+ wdtdrv=$(modprobe -R $wdtdrv) -+ instmods $wdtdrv -+ # however in some cases, we also need to check that if there is -+ # a specific driver for the parent bus/device. In such cases -+ # we also need to enable driver for parent bus/device. -+ wdtppath=$(readlink -f "$dir/device/..") -+ while [ -f "$wdtppath/modalias" ] -+ do -+ wdtpdrv=$(< "$wdtppath/modalias") -+ wdtpdrv=$(modprobe -R $wdtpdrv) -+ instmods $wdtpdrv -+ wdtppath=$(readlink -f "$wdtppath/..") -+ done -+ done -+} diff --git a/0038-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch b/0038-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch deleted file mode 100644 index 7adfd6b..0000000 --- a/0038-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch +++ /dev/null @@ -1,56 +0,0 @@ -From e343c85763e7b981a5e9b53b04f90f0d83bffaaf Mon Sep 17 00:00:00 2001 -From: Pratyush Anand -Date: Wed, 16 Mar 2016 09:16:24 +0530 -Subject: [PATCH] watchdog: ensure that module is loaded as early as possible - -It is expected that a watchdog module will disable an active watchdog when -its probe is called ie, when it is loaded. So an early load of the module -will help to disable it earlier. -This can be helpful in some corner cases where kdump and watchdog daemon -both are active. - -Testing: - -- When watchdog kernel modules were added - # dracut --no-hostonly initramfs-test.img -a watchdog - # lsinitrd initramfs-test.img -f etc/cmdline.d/00-watchdog.conf - rd.driver.pre=iTCO_wdt,lpc_ich, - -Signed-off-by: Pratyush Anand -Cc: Dave Young -Cc: Don Zickus -Cc: Harald Hoyer ---- - modules.d/04watchdog/module-setup.sh | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh -index 0ffaa96..c9da148 100755 ---- a/modules.d/04watchdog/module-setup.sh -+++ b/modules.d/04watchdog/module-setup.sh -@@ -34,6 +34,7 @@ install() { - - installkernel() { - [[ -d /sys/class/watchdog/ ]] || return -+ wdtcmdline="" - for dir in /sys/class/watchdog/*; do - [[ -d "$dir" ]] || continue - [[ -f "$dir/state" ]] || continue -@@ -47,6 +48,7 @@ installkernel() { - # represented by modalias - wdtdrv=$(modprobe -R $wdtdrv) - instmods $wdtdrv -+ wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ",")," - # however in some cases, we also need to check that if there is - # a specific driver for the parent bus/device. In such cases - # we also need to enable driver for parent bus/device. -@@ -56,7 +58,10 @@ installkernel() { - wdtpdrv=$(< "$wdtppath/modalias") - wdtpdrv=$(modprobe -R $wdtpdrv) - instmods $wdtpdrv -+ wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ",")," - wdtppath=$(readlink -f "$wdtppath/..") - done - done -+ # ensure that watchdog module is loaded as early as possible -+ [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/00-watchdog.conf - } diff --git a/0039-lsinitrd-add-unpack-to-lsinitrd.patch b/0039-lsinitrd-add-unpack-to-lsinitrd.patch deleted file mode 100644 index 224063b..0000000 --- a/0039-lsinitrd-add-unpack-to-lsinitrd.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 97bbba6938fc22605026b4cff3c5cc524c7bdf38 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 17 Mar 2016 14:45:24 +0100 -Subject: [PATCH] lsinitrd: add "--unpack" to lsinitrd - -also "--unpackearly" and "--verbose" ---- - lsinitrd.1.asc | 9 +++++++++ - lsinitrd.sh | 43 ++++++++++++++++++++++++++++++++----------- - 2 files changed, 41 insertions(+), 11 deletions(-) - -diff --git a/lsinitrd.1.asc b/lsinitrd.1.asc -index 4293910..b6a704c 100644 ---- a/lsinitrd.1.asc -+++ b/lsinitrd.1.asc -@@ -34,6 +34,15 @@ OPTIONS - **-k, --kver** __:: - inspect the initramfs of . - -+**--unpack**:: -+ unpack the initramfs to the current directory, instead of displaying the contents. -+ -+**--unpackearly**:: -+ unpack the early microcode initramfs to the current directory, instead of displaying the contents. -+ -+**-v, --verbose**:: -+ unpack verbosely -+ - AVAILABILITY - ------------ - The lsinitrd command is part of the dracut package and is available from -diff --git a/lsinitrd.sh b/lsinitrd.sh -index 441fb92..224b9c1 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -27,6 +27,9 @@ usage() - echo "-s, --size sort the contents of the initramfs by size." - echo "-m, --mod list modules." - echo "-f, --file print the contents of ." -+ echo "--unpack unpack the initramfs, instead of displaying the contents." -+ echo "--unpackearly unpack the early microcode part of the initramfs." -+ echo "-v, --verbose unpack verbosely." - echo "-k, --kver inspect the initramfs of ." - echo - } >&2 -@@ -37,16 +40,21 @@ usage() - - sorted=0 - modules=0 -+unpack=0 -+unset verbose - declare -A filenames - - unset POSIXLY_CORRECT - TEMP=$(getopt \ -- -o "shmf:k:" \ -+ -o "vshmf:k:" \ - --long kver: \ - --long file: \ - --long mod \ - --long help \ - --long size \ -+ --long unpack \ -+ --long unpackearly \ -+ --long verbose \ - -- "$@") - - if (( $? != 0 )); then -@@ -58,13 +66,16 @@ eval set -- "$TEMP" - - while (($# > 0)); do - case $1 in -- -k|--kver) KERNEL_VERSION="$2"; shift;; -- -f|--file) filenames[${2#/}]=1; shift;; -- -s|--size) sorted=1;; -- -h|--help) usage; exit 0;; -- -m|--mod) modules=1;; -- --) shift;break;; -- *) usage; exit 1;; -+ -k|--kver) KERNEL_VERSION="$2"; shift;; -+ -f|--file) filenames[${2#/}]=1; shift;; -+ -s|--size) sorted=1;; -+ -h|--help) usage; exit 0;; -+ -m|--mod) modules=1;; -+ -v|--verbose) verbose="--verbose";; -+ --unpack) unpack=1;; -+ --unpackearly) unpackearly=1;; -+ --) shift;break;; -+ *) usage; exit 1;; - esac - shift - done -@@ -147,8 +158,14 @@ list_files() - echo "========================================================================" - } - -+unpack_files() -+{ -+ $CAT "$image" | cpio -id --quiet $verbose -+ ((ret+=$?)) -+} -+ - --if (( ${#filenames[@]} <= 0 )); then -+if (( ${#filenames[@]} <= 0 )) && [[ -z "$unpack" ]] && [[ -z "$unpackearly" ]]; then - echo "Image: $image: $(du -h $image | while read a b || [ -n "$a" ]; do echo $a;done)" - echo "========================================================================" - fi -@@ -159,7 +176,9 @@ case $bin in - CAT="cat --" - is_early=$(cpio --extract --verbose --quiet --to-stdout -- 'early_cpio' < "$image" 2>/dev/null) - if [[ "$is_early" ]]; then -- if (( ${#filenames[@]} > 0 )); then -+ if [[ -n "$unpackearly" ]]; then -+ unpack_files -+ elif (( ${#filenames[@]} > 0 )); then - extract_files - else - echo "Early CPIO image" -@@ -218,7 +237,9 @@ fi - - ret=0 - --if (( ${#filenames[@]} > 0 )); then -+if [[ -n "$unpack" ]]; then -+ unpack_files -+elif (( ${#filenames[@]} > 0 )); then - extract_files - else - version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \ diff --git a/0040-Do-not-use-deprecated-egrep-fgrep.patch b/0040-Do-not-use-deprecated-egrep-fgrep.patch deleted file mode 100644 index 609b8d0..0000000 --- a/0040-Do-not-use-deprecated-egrep-fgrep.patch +++ /dev/null @@ -1,172 +0,0 @@ -From 9430ae301e3599d355e8b128a7faffa81dade6ff Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Mon, 28 Mar 2016 11:38:34 +0300 -Subject: [PATCH] Do not use deprecated egrep/fgrep - ---- - dracut-init.sh | 8 ++++---- - install/dracut-install.c | 2 +- - modules.d/00systemd/module-setup.sh | 10 +++++----- - modules.d/02systemd-networkd/module-setup.sh | 8 ++++---- - modules.d/95debug/module-setup.sh | 2 +- - modules.d/95nfs/module-setup.sh | 8 ++++---- - modules.d/95udev-rules/module-setup.sh | 4 ++-- - modules.d/99base/module-setup.sh | 4 ++-- - test/TEST-04-FULL-SYSTEMD/test.sh | 2 +- - 9 files changed, 24 insertions(+), 24 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index fc35d7b..a67aca2 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -328,15 +328,15 @@ inst_rule_group_owner() { - - if grep -qE 'OWNER=?"[^ "]+' "$1"; then - for i in $(grep -E 'OWNER=?"[^ "]+' "$1" | sed -r 's/.*OWNER=?"([^ "]+).*/\1/'); do -- if ! egrep -q "^$i:" "$initdir/etc/passwd" 2>/dev/null; then -- egrep "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -+ if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then -+ grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" - fi - done - fi - if grep -qE 'GROUP=?"[^ "]+' "$1"; then - for i in $(grep -E 'GROUP=?"[^ "]+' "$1" | sed -r 's/.*GROUP=?"([^ "]+).*/\1/'); do -- if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then -- egrep "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group" -+ if ! grep -Eq "^$i:" "$initdir/etc/group" 2>/dev/null; then -+ grep -E "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group" - fi - done - fi -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 8f65d8d..3b48ba8 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -287,7 +287,7 @@ static int library_install(const char *src, const char *lib) - - /* Also try to install the same library from one directory above. - This fixes the case, where only the HWCAP lib would be installed -- # ldconfig -p|fgrep libc.so -+ # ldconfig -p|grep -F libc.so - libc.so.6 (libc6,64bit, hwcap: 0x0000001000000000, OS ABI: Linux 2.6.32) => /lib64/power6/libc.so.6 - libc.so.6 (libc6,64bit, hwcap: 0x0000000000000200, OS ABI: Linux 2.6.32) => /lib64/power6x/libc.so.6 - libc.so.6 (libc6,64bit, OS ABI: Linux 2.6.32) => /lib64/libc.so.6 -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index ed59beb..deb5e06 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -179,11 +179,11 @@ install() { - - # install adm user/group for journald - inst_multiple nologin -- egrep '^systemd-journal:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -- egrep '^adm:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -- egrep '^systemd-journal:' /etc/group >> "$initdir/etc/group" -- egrep '^wheel:' /etc/group >> "$initdir/etc/group" -- egrep '^adm:' /etc/group >> "$initdir/etc/group" -+ grep '^systemd-journal:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -+ grep '^adm:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -+ grep '^systemd-journal:' /etc/group >> "$initdir/etc/group" -+ grep '^wheel:' /etc/group >> "$initdir/etc/group" -+ grep '^adm:' /etc/group >> "$initdir/etc/group" - - ln_r $systemdutildir/systemd "/init" - ln_r $systemdutildir/systemd "/sbin/init" -diff --git a/modules.d/02systemd-networkd/module-setup.sh b/modules.d/02systemd-networkd/module-setup.sh -index 58842c0..b86751e 100755 ---- a/modules.d/02systemd-networkd/module-setup.sh -+++ b/modules.d/02systemd-networkd/module-setup.sh -@@ -48,10 +48,10 @@ install() { - - # inst_dir /var/lib/systemd/clock - -- egrep '^systemd-network:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -- egrep '^systemd-network:' /etc/group >> "$initdir/etc/group" -- # egrep '^systemd-timesync:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -- # egrep '^systemd-timesync:' /etc/group >> "$initdir/etc/group" -+ grep '^systemd-network:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -+ grep '^systemd-network:' /etc/group >> "$initdir/etc/group" -+ # grep '^systemd-timesync:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -+ # grep '^systemd-timesync:' /etc/group >> "$initdir/etc/group" - - _arch=$(uname -m) - inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \ -diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh -index ce5e8e8..97b2a30 100755 ---- a/modules.d/95debug/module-setup.sh -+++ b/modules.d/95debug/module-setup.sh -@@ -18,6 +18,6 @@ install() { - tcpdump cp less hostname mkdir \ - fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck - -- egrep '^tcpdump:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -+ grep '^tcpdump:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" - } - -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 9b5b8c8..aefbc2a 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -105,14 +105,14 @@ install() { - - # Rather than copy the passwd file in, just set a user for rpcbind - # We'll save the state and restart the daemon from the root anyway -- egrep '^nfsnobody:|^rpc:|^rpcuser:' /etc/passwd >> "$initdir/etc/passwd" -- egrep '^nogroup:|^rpc:|^nobody:' /etc/group >> "$initdir/etc/group" -+ grep -E '^nfsnobody:|^rpc:|^rpcuser:' /etc/passwd >> "$initdir/etc/passwd" -+ grep -E '^nogroup:|^rpc:|^nobody:' /etc/group >> "$initdir/etc/group" - - # rpc user needs to be able to write to this directory to save the warmstart - # file - chmod 770 "$initdir/var/lib/rpcbind" -- egrep -q '^rpc:' /etc/passwd \ -- && egrep -q '^rpc:' /etc/group \ -+ grep -q '^rpc:' /etc/passwd \ -+ && grep -q '^rpc:' /etc/group \ - && chown rpc.rpc "$initdir/var/lib/rpcbind" - dracut_need_initqueue - } -diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh -index 6a0625a..a59eca2 100755 ---- a/modules.d/95udev-rules/module-setup.sh -+++ b/modules.d/95udev-rules/module-setup.sh -@@ -63,8 +63,8 @@ install() { - - { - for i in cdrom tape dialout floppy; do -- if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then -- if ! egrep "^$i:" /etc/group 2>/dev/null; then -+ if ! grep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then -+ if ! grep "^$i:" /etc/group 2>/dev/null; then - case $i in - cdrom) echo "$i:x:11:";; - dialout) echo "$i:x:18:";; -diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh -index cc94d00..5fbf6f7 100755 ---- a/modules.d/99base/module-setup.sh -+++ b/modules.d/99base/module-setup.sh -@@ -27,8 +27,8 @@ install() { - fi - - #add common users in /etc/passwd, it will be used by nfs/ssh currently -- egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd" -- egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd" -+ grep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo 'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd" -+ grep '^nobody:' /etc/passwd >> "$initdir/etc/passwd" - - # install our scripts and hooks - inst_script "$moddir/init.sh" "/init" -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index f5a9d48..c7e08bf 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -197,7 +197,7 @@ EOF - ln -fs /proc/self/mounts $initdir/etc/mtab - - # install any Execs from the service files -- egrep -ho '^Exec[^ ]*=[^ ]+' $initdir/lib/systemd/system/*.service \ -+ grep -Eho '^Exec[^ ]*=[^ ]+' $initdir/lib/systemd/system/*.service \ - | while read i || [ -n "$i" ]; do - i=${i##Exec*=}; i=${i##-} - inst_multiple -o $i diff --git a/0041-nfs-module-setup.sh-Use-colon-instead-of-dot-for-cho.patch b/0041-nfs-module-setup.sh-Use-colon-instead-of-dot-for-cho.patch deleted file mode 100644 index 671111a..0000000 --- a/0041-nfs-module-setup.sh-Use-colon-instead-of-dot-for-cho.patch +++ /dev/null @@ -1,22 +0,0 @@ -From dec3dfa4b3215e08581794bd76591023ed7984c8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Mon, 28 Mar 2016 11:39:36 +0300 -Subject: [PATCH] nfs/module-setup.sh: Use colon instead of dot for chown - user/group separator - ---- - modules.d/95nfs/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index aefbc2a..6f039bd 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -113,6 +113,6 @@ install() { - chmod 770 "$initdir/var/lib/rpcbind" - grep -q '^rpc:' /etc/passwd \ - && grep -q '^rpc:' /etc/group \ -- && chown rpc.rpc "$initdir/var/lib/rpcbind" -+ && chown rpc:rpc "$initdir/var/lib/rpcbind" - dracut_need_initqueue - } diff --git a/0042-Clean-up-some-bashisms-from-bin-sh-scripts.patch b/0042-Clean-up-some-bashisms-from-bin-sh-scripts.patch deleted file mode 100644 index ed83813..0000000 --- a/0042-Clean-up-some-bashisms-from-bin-sh-scripts.patch +++ /dev/null @@ -1,64 +0,0 @@ -From bcabe0fe2570d8cd39ab6af380bce44f13092450 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Mon, 28 Mar 2016 11:52:14 +0300 -Subject: [PATCH] Clean up some bashisms from /bin/sh scripts - ---- - modules.d/40network/dhclient-script.sh | 2 +- - modules.d/40network/ifup.sh | 2 +- - modules.d/95fcoe/fcoe-edd.sh | 2 +- - modules.d/95nfs/nfs-lib.sh | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh -index 13d2dc2..94ee9d1 100755 ---- a/modules.d/40network/dhclient-script.sh -+++ b/modules.d/40network/dhclient-script.sh -@@ -95,7 +95,7 @@ setup_interface6() { - [ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname - } - --function parse_option_121() { -+parse_option_121() { - while [ $# -ne 0 ]; do - mask="$1" - shift -diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh -index 7c179bd..1185523 100755 ---- a/modules.d/40network/ifup.sh -+++ b/modules.d/40network/ifup.sh -@@ -277,7 +277,7 @@ if [ -z "$NO_TEAM_MASTER" ]; then - for slave in $teamslaves ; do - ip link set $slave up 2>/dev/null - if wait_for_if_up $slave; then -- working_slaves+="$slave " -+ working_slaves="$working_slaves$slave " - fi - done - # Do not add slaves now -diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh -index 3b07ad3..1e002d3 100755 ---- a/modules.d/95fcoe/fcoe-edd.sh -+++ b/modules.d/95fcoe/fcoe-edd.sh -@@ -29,7 +29,7 @@ for disk in /sys/firmware/edd/int13_*; do - driver=${driver##*/} - fi - # i40e uses dev_port 1 for a virtual fcoe function -- if [ "${driver}" == "i40e" ]; then -+ if [ "${driver}" = "i40e" ]; then - dev_port=1 - fi - for nic in "${disk}"/pci_dev/net/*; do -diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh -index 58aa7e3..67608b1 100755 ---- a/modules.d/95nfs/nfs-lib.sh -+++ b/modules.d/95nfs/nfs-lib.sh -@@ -110,7 +110,7 @@ nfsroot_from_dhcp() { - [ -f $f ] && . $f - done - [ -n "$new_root_path" ] && nfsroot_to_var "$nfs:$new_root_path" -- [ -z "$path" ] && [ "$(getarg root=)" == "/dev/nfs" ] && path=/tftpboot/%s -+ [ -z "$path" ] && [ "$(getarg root=)" = "/dev/nfs" ] && path=/tftpboot/%s - [ -z "$server" ] && server=$srv - [ -z "$server" ] && server=$new_dhcp_server_identifier - [ -z "$server" ] && server=$new_next_server diff --git a/0043-dracut-init.sh-Simplify-udev-rule-grepping.patch b/0043-dracut-init.sh-Simplify-udev-rule-grepping.patch deleted file mode 100644 index ba2b3f6..0000000 --- a/0043-dracut-init.sh-Simplify-udev-rule-grepping.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 06a1d0769055f437c938edd40bd9fbd622475864 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Mon, 28 Mar 2016 12:09:06 +0300 -Subject: [PATCH] dracut-init.sh: Simplify udev rule grepping - ---- - dracut-init.sh | 102 ++++++++++++++++++++++++++------------------------------- - 1 file changed, 46 insertions(+), 56 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index a67aca2..b176421 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -275,71 +275,61 @@ rev_lib_symlinks() { - inst_rule_programs() { - local _prog _bin - -- if grep -qE 'PROGRAM==?"[^ "]+' "$1"; then -- for _prog in $(grep -E 'PROGRAM==?"[^ "]+' "$1" | sed -r 's/.*PROGRAM==?"([^ "]+).*/\1/'); do -- _bin="" -- if [ -x ${udevdir}/$_prog ]; then -- _bin=${udevdir}/$_prog -- elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then -- _bin=$(find_binary "$_prog") || { -- dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" -- continue; -- } -- fi -+ for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p'); do -+ _bin="" -+ if [ -x ${udevdir}/$_prog ]; then -+ _bin=${udevdir}/$_prog -+ elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then -+ _bin=$(find_binary "$_prog") || { -+ dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" -+ continue; -+ } -+ fi - -- [[ $_bin ]] && inst_binary "$_bin" -- done -- fi -- if grep -qE 'RUN[+=]=?"[^ "]+' "$1"; then -- for _prog in $(grep -E 'RUN[+=]=?"[^ "]+' "$1" | sed -r 's/.*RUN[+=]=?"([^ "]+).*/\1/'); do -- _bin="" -- if [ -x ${udevdir}/$_prog ]; then -- _bin=${udevdir}/$_prog -- elif [[ "${_prog/\$env\{/}" == "$_prog" ]] && [[ "${_prog}" != "/sbin/initqueue" ]]; then -- _bin=$(find_binary "$_prog") || { -- dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" -- continue; -- } -- fi -+ [[ $_bin ]] && inst_binary "$_bin" -+ done -+ for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p'); do -+ _bin="" -+ if [ -x ${udevdir}/$_prog ]; then -+ _bin=${udevdir}/$_prog -+ elif [[ "${_prog/\$env\{/}" == "$_prog" ]] && [[ "${_prog}" != "/sbin/initqueue" ]]; then -+ _bin=$(find_binary "$_prog") || { -+ dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" -+ continue; -+ } -+ fi - -- [[ $_bin ]] && inst_binary "$_bin" -- done -- fi -- if grep -qE 'IMPORT\{program\}==?"[^ "]+' "$1"; then -- for _prog in $(grep -E 'IMPORT\{program\}==?"[^ "]+' "$1" | sed -r 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/'); do -- _bin="" -- if [ -x ${udevdir}/$_prog ]; then -- _bin=${udevdir}/$_prog -- elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then -- _bin=$(find_binary "$_prog") || { -- dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" -- continue; -- } -- fi -+ [[ $_bin ]] && inst_binary "$_bin" -+ done -+ for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p'); do -+ _bin="" -+ if [ -x ${udevdir}/$_prog ]; then -+ _bin=${udevdir}/$_prog -+ elif [[ "${_prog/\$env\{/}" == "$_prog" ]]; then -+ _bin=$(find_binary "$_prog") || { -+ dinfo "Skipping program $_prog using in udev rule ${1##*/} as it cannot be found" -+ continue; -+ } -+ fi - -- [[ $_bin ]] && dracut_install "$_bin" -- done -- fi -+ [[ $_bin ]] && dracut_install "$_bin" -+ done - } - - # attempt to install any programs specified in a udev rule - inst_rule_group_owner() { - local i - -- if grep -qE 'OWNER=?"[^ "]+' "$1"; then -- for i in $(grep -E 'OWNER=?"[^ "]+' "$1" | sed -r 's/.*OWNER=?"([^ "]+).*/\1/'); do -- if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then -- grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -- fi -- done -- fi -- if grep -qE 'GROUP=?"[^ "]+' "$1"; then -- for i in $(grep -E 'GROUP=?"[^ "]+' "$1" | sed -r 's/.*GROUP=?"([^ "]+).*/\1/'); do -- if ! grep -Eq "^$i:" "$initdir/etc/group" 2>/dev/null; then -- grep -E "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group" -- fi -- done -- fi -+ for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p'); do -+ if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then -+ grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" -+ fi -+ done -+ for i in $(sed -nr 's/.*GROUP=?"([^ "]+).*/\1/p' "$1"); do -+ if ! grep -Eq "^$i:" "$initdir/etc/group" 2>/dev/null; then -+ grep -E "^$i:" /etc/group 2>/dev/null >> "$initdir/etc/group" -+ fi -+ done - } - - inst_rule_initqueue() { diff --git a/0044-dracut.sh-call-dracut-install-with-f-in-FIPS-mode.patch b/0044-dracut.sh-call-dracut-install-with-f-in-FIPS-mode.patch deleted file mode 100644 index 312d131..0000000 --- a/0044-dracut.sh-call-dracut-install-with-f-in-FIPS-mode.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f7f5b82b4323210efc343132e3ae8fa91b26a68d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 21 Mar 2016 11:56:50 +0100 -Subject: [PATCH] dracut.sh: call dracut-install with "-f" in FIPS mode - -in fips mode, dracut-install was called with "-H" instead of "-f" in -FIPS mode - -missed conversion of commit 26cd262a6a575a50ea384a2ceac6a6829efe8106 ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 98dbe0b..37ae350 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1496,7 +1496,7 @@ if [[ $kernel_only != yes ]]; then - if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then - dinfo "*** Resolving executable dependencies ***" - find "$initdir" -type f -perm /0111 -not -path '*.ko' -print0 \ -- | xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} -R ${DRACUT_FIPS_MODE:+-H} -- -+ | xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} -R ${DRACUT_FIPS_MODE:+-f} -- - dinfo "*** Resolving executable dependencies done***" - fi - diff --git a/0045-dracut-init.sh-Add-file-argument-to-sed-s.patch b/0045-dracut-init.sh-Add-file-argument-to-sed-s.patch deleted file mode 100644 index 07fb7e2..0000000 --- a/0045-dracut-init.sh-Add-file-argument-to-sed-s.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 374ef3ed2bff30db35126dd694b4234709398a2f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 11 Apr 2016 13:36:06 +0200 -Subject: [PATCH] dracut-init.sh: Add file argument to sed's - -fixup for 06a1d0769055f437c938edd40bd9fbd622475864 ---- - dracut-init.sh | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index b176421..2431171 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -275,7 +275,7 @@ rev_lib_symlinks() { - inst_rule_programs() { - local _prog _bin - -- for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p'); do -+ for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p' "$1"); do - _bin="" - if [ -x ${udevdir}/$_prog ]; then - _bin=${udevdir}/$_prog -@@ -288,7 +288,7 @@ inst_rule_programs() { - - [[ $_bin ]] && inst_binary "$_bin" - done -- for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p'); do -+ for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p' "$1"); do - _bin="" - if [ -x ${udevdir}/$_prog ]; then - _bin=${udevdir}/$_prog -@@ -301,7 +301,7 @@ inst_rule_programs() { - - [[ $_bin ]] && inst_binary "$_bin" - done -- for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p'); do -+ for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p' "$1"); do - _bin="" - if [ -x ${udevdir}/$_prog ]; then - _bin=${udevdir}/$_prog -@@ -320,7 +320,7 @@ inst_rule_programs() { - inst_rule_group_owner() { - local i - -- for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p'); do -+ for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p' "$1"); do - if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then - grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" - fi diff --git a/0046-lsinitrd.sh-fixed-unpack-and-skipcpio-search.patch b/0046-lsinitrd.sh-fixed-unpack-and-skipcpio-search.patch deleted file mode 100644 index c7f3581..0000000 --- a/0046-lsinitrd.sh-fixed-unpack-and-skipcpio-search.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 98fd06934c9e10567b4755714191cd2aee8822ac Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 11 Apr 2016 15:22:11 +0200 -Subject: [PATCH] lsinitrd.sh: fixed unpack and skipcpio search - ---- - lsinitrd.sh | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/lsinitrd.sh b/lsinitrd.sh -index 224b9c1..b19a66a 100755 ---- a/lsinitrd.sh -+++ b/lsinitrd.sh -@@ -40,7 +40,6 @@ usage() - - sorted=0 - modules=0 --unpack=0 - unset verbose - declare -A filenames - -@@ -184,7 +183,11 @@ case $bin in - echo "Early CPIO image" - list_files - fi -- SKIP="$dracutbasedir/skipcpio" -+ if [[ -d "$dracutbasedir/skipcpio" ]]; then -+ SKIP="$dracutbasedir/skipcpio/skipcpio" -+ else -+ SKIP="$dracutbasedir/skipcpio" -+ fi - if ! [[ -x $SKIP ]]; then - echo - echo "'$SKIP' not found, cannot display remaining contents!" >&2 diff --git a/0047-dracut-init.sh-mark-error-messages-with-FAILED.patch b/0047-dracut-init.sh-mark-error-messages-with-FAILED.patch deleted file mode 100644 index 29201a3..0000000 --- a/0047-dracut-init.sh-mark-error-messages-with-FAILED.patch +++ /dev/null @@ -1,78 +0,0 @@ -From ff8f7026897edf1d0aa9c73b9f7a3d21b1b51da3 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 11 Apr 2016 15:22:56 +0200 -Subject: [PATCH] dracut-init.sh: mark error messages with FAILED - ---- - dracut-init.sh | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index 2431171..a8b78ce 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -168,7 +168,7 @@ fi - inst_dir() { - [[ -e ${initdir}/"$1" ]] && return 0 # already there - $DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@" -- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@" || : -+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} -d "$@" || : - } - - inst() { -@@ -179,7 +179,7 @@ inst() { - fi - [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there - $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" -- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || : -+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || : - } - - inst_simple() { -@@ -191,7 +191,7 @@ inst_simple() { - [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there - [[ -e $1 ]] || return 1 # no source - $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" -- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" || : -+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" || : - } - - inst_symlink() { -@@ -203,14 +203,14 @@ inst_symlink() { - [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there - [[ -L $1 ]] || return 1 - $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" -- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || : -+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || : - } - - inst_multiple() { - local _ret - $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" - _ret=$? -- (($_ret != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || : -+ (($_ret != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || : - return $_ret - } - -@@ -227,17 +227,17 @@ inst_library() { - [[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there - [[ -e $1 ]] || return 1 # no source - $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" -- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || : -+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || : - } - - inst_binary() { - $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" -- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || : -+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || : - } - - inst_script() { - $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" -- (($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || : -+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || : - } - - mark_hostonly() { diff --git a/0048-Use-dracut-install-to-install-kernel-modules.patch b/0048-Use-dracut-install-to-install-kernel-modules.patch deleted file mode 100644 index 2e444e7..0000000 --- a/0048-Use-dracut-install-to-install-kernel-modules.patch +++ /dev/null @@ -1,1372 +0,0 @@ -From 794b2d2c753489635b922457a5ccb06669f37268 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 23 Jul 2015 10:35:06 +0200 -Subject: [PATCH] Use dracut-install to install kernel modules - -dracut-install can now install kernel modules and their corresponding -firmware files. ---- - Makefile | 1 + - dracut-init.sh | 178 +------ - dracut.sh | 8 +- - install/dracut-install.c | 536 +++++++++++++++++++-- - modules.d/50drm/module-setup.sh | 63 +-- - modules.d/90crypt/module-setup.sh | 4 +- - modules.d/90dm/module-setup.sh | 3 +- - modules.d/90kernel-modules/module-setup.sh | 53 +- - modules.d/90kernel-network-modules/module-setup.sh | 45 +- - modules.d/90multipath/module-setup.sh | 39 +- - modules.d/95iscsi/module-setup.sh | 41 +- - modules.d/95nfs/module-setup.sh | 2 +- - 12 files changed, 580 insertions(+), 393 deletions(-) - -diff --git a/Makefile b/Makefile -index 8281f90..0a1ae6c 100644 ---- a/Makefile -+++ b/Makefile -@@ -61,6 +61,7 @@ install/util.o: install/util.c install/util.h install/macro.h install/log.h - install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h - - install/dracut-install: $(DRACUT_INSTALL_OBJECTS) -+ $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) -lkmod - - dracut-install: install/dracut-install - ln -fs $< $@ -diff --git a/dracut-init.sh b/dracut-init.sh -index a8b78ce..e26d97a 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -218,6 +218,13 @@ dracut_install() { - inst_multiple "$@" - } - -+dracut_instmods() { -+ [[ $no_kernel = yes ]] && return -+ $DRACUT_INSTALL \ -+ ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" -+ (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || : -+} -+ - inst_library() { - local _hostonly_install - if [[ "$1" == "-H" ]]; then -@@ -847,11 +854,6 @@ install_kmod_with_fw() { - [[ -e "${initdir}/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" ]] \ - && return 0 - -- if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -e "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" ]]; then -- read ret < "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" -- return $ret -- fi -- - if [[ $omit_drivers ]]; then - local _kmod=${1##*/} - _kmod=${_kmod%.ko*} -@@ -876,9 +878,6 @@ install_kmod_with_fw() { - - inst_simple "$1" "/lib/modules/$kernel/${1##*/lib/modules/$kernel/}" - ret=$? -- [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -- [[ -d "$DRACUT_KERNEL_LAZY_HASHDIR" ]] && \ -- echo $ret > "$DRACUT_KERNEL_LAZY_HASHDIR/${1##*/}" - (($ret != 0)) && return $ret - - local _modname=${1##*/} _fwdir _found _fw -@@ -925,51 +924,6 @@ dracut_kernel_post() { - local _moddirname=${srcmods%%/lib/modules/*} - local _pid - -- if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" ]]; then -- xargs -r modprobe -a ${_moddirname:+-d ${_moddirname}/} \ -- --ignore-install --show-depends --set-version $kernel \ -- < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" 2>/dev/null \ -- | sort -u \ -- | while read _cmd _modpath _options || [ -n "$_cmd" ]; do -- [[ $_cmd = insmod ]] || continue -- echo "$_modpath" -- done > "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" -- -- ( -- if [[ $DRACUT_INSTALL ]] && [[ -z $_moddirname ]]; then -- xargs -r $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} -a < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" -- else -- while read _modpath || [ -n "$_modpath" ]; do -- local _destpath=$_modpath -- [[ $_moddirname ]] && _destpath=${_destpath##$_moddirname/} -- _destpath=${_destpath##*/lib/modules/$kernel/} -- inst_simple "$_modpath" "/lib/modules/$kernel/${_destpath}" || exit $? -- done < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" -- fi -- ) & -- _pid=$(jobs -p | while read a || [ -n "$a" ]; do printf ":$a";done) -- _pid=${_pid##*:} -- -- if [[ $DRACUT_INSTALL ]]; then -- xargs -r modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep" \ -- | while read line || [ -n "$line" ]; do -- for _fwdir in $fw_dir; do -- echo $_fwdir/$line; -- done; -- done | xargs -r $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} -a -o -- else -- for _fw in $(xargs -r modinfo -k $kernel -F firmware < "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist.dep"); do -- for _fwdir in $fw_dir; do -- [[ -d $_fwdir && -f $_fwdir/$_fw ]] || continue -- inst_simple "$_fwdir/$_fw" "/lib/firmware/$_fw" -- break -- done -- done -- fi -- -- wait $_pid -- fi -- - for _f in modules.builtin.bin modules.builtin modules.order; do - [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f" - done -@@ -981,7 +935,6 @@ dracut_kernel_post() { - exit 1 - fi - -- [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && rm -fr -- "$DRACUT_KERNEL_LAZY_HASHDIR" - } - - [[ "$kernel_current" ]] || export kernel_current=$(uname -r) -@@ -1038,113 +991,32 @@ find_kernel_modules () { - find_kernel_modules_by_path drivers - } - --# instmods [-c [-s]] [ ... ] --# instmods [-c [-s]] --# install kernel modules along with all their dependencies. --# can be e.g. "=block" or "=drivers/usb/storage" - instmods() { -+ # instmods [-c [-s]] [ ... ] -+ # instmods [-c [-s]] -+ # install kernel modules along with all their dependencies. -+ # can be e.g. "=block" or "=drivers/usb/storage" -+ # -c check -+ # -s silent -+ local _optional="-o" -+ local _silent -+ local _ret - [[ $no_kernel = yes ]] && return -- # called [sub]functions inherit _fderr -- local _fderr=9 -- local _check=no -- local _silent=no - if [[ $1 = '-c' ]]; then -- _check=yes -+ _optional="" - shift - fi -- - if [[ $1 = '-s' ]]; then -- _silent=yes -+ _silent=1 - shift - fi -- -- function inst1mod() { -- local _ret=0 _mod="$1" -- case $_mod in -- =*) -- ( [[ "$_mpargs" ]] && echo $_mpargs -- find_kernel_modules_by_path "${_mod#=}" ) \ -- | instmods -- ((_ret+=$?)) -- ;; -- --*) _mpargs+=" $_mod" ;; -- *) -- _mod=${_mod##*/} -- # Check for aliased modules -- _modalias=$(modinfo -k $kernel -F filename $_mod 2> /dev/null) -- _modalias=${_modalias%.ko*} -- if [[ $_modalias ]] && [ "${_modalias##*/}" != "${_mod%.ko*}" ] ; then -- _mod=${_modalias##*/} -- fi -- -- # if we are already installed, skip this module and go on -- # to the next one. -- if [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -- [[ -f "$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko*}" ]]; then -- read _ret <"$DRACUT_KERNEL_LAZY_HASHDIR/${_mod%.ko*}" -- return $_ret -- fi -- -- _mod=${_mod/-/_} -- if [[ $omit_drivers ]] && [[ "$_mod" =~ $omit_drivers ]]; then -- dinfo "Omitting driver ${_mod##$srcmods}" -- return 0 -- fi -- -- # If we are building a host-specific initramfs and this -- # module is not already loaded, move on to the next one. -- [[ $hostonly ]] \ -- && ! module_is_host_only "$_mod" \ -- && return 0 -- -- if [[ "$_check" = "yes" ]] || ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then -- # We use '-d' option in modprobe only if modules prefix path -- # differs from default '/'. This allows us to use dracut with -- # old version of modprobe which doesn't have '-d' option. -- local _moddirname=${srcmods%%/lib/modules/*} -- [[ -n ${_moddirname} ]] && _moddirname="-d ${_moddirname}/" -- -- # ok, load the module, all its dependencies, and any firmware -- # it may require -- for_each_kmod_dep install_kmod_with_fw $_mod \ -- --set-version $kernel ${_moddirname} $_mpargs -- ((_ret+=$?)) -- else -- [[ $DRACUT_KERNEL_LAZY_HASHDIR ]] && \ -- echo ${_mod%.ko*} >> "$DRACUT_KERNEL_LAZY_HASHDIR/lazylist" -- fi -- ;; -- esac -- return $_ret -- } -- -- function instmods_1() { -- local _mod _mpargs -- if (($# == 0)); then # filenames from stdin -- while read _mod || [ -n "$_mod" ]; do -- inst1mod "${_mod%.ko*}" || { -- if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then -- dfatal "Failed to install module $_mod" -- fi -- } -- done -- fi -- while (($# > 0)); do # filenames as arguments -- inst1mod ${1%.ko*} || { -- if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then -- dfatal "Failed to install module $1" -- fi -- } -- shift -- done -- return 0 -- } -- -- local _ret _filter_not_found='FATAL: Module .* not found.' -- # Capture all stderr from modprobe to _fderr. We could use {var}>... -- # redirections, but that would make dracut require bash4 at least. -- eval "( instmods_1 \"\$@\" ) ${_fderr}>&1" \ -- | while read line || [ -n "$line" ]; do [[ "$line" =~ $_filter_not_found ]] || echo $line;done | derror -+ if (($# == 0)); then -+ read -r -d '' -a args -+ set -- "${args[@]}" -+ fi -+ $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${_optional:+-o} ${_silent:+--silent} ${srcmods:+--kerneldir "$srcmods"} -m "$@" - _ret=$? -+ (($_ret != 0)) && [[ -z "$_silent" ]] && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${_optional:+-o} ${_silent:+--silent} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || : -+ [[ "$optional" ]] && return 0 - return $_ret - } -diff --git a/dracut.sh b/dracut.sh -index 37ae350..f6d0439 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -733,7 +733,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) - [[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l - [[ $lvmconf_l ]] && lvmconf=$lvmconf_l - [[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut --[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware /lib/firmware/$kernel" -+[[ $fw_dir ]] || fw_dir="/lib/firmware/updates:/lib/firmware:/lib/firmware/$kernel" - [[ $tmpdir_l ]] && tmpdir="$tmpdir_l" - [[ $tmpdir ]] || tmpdir=/var/tmp - [[ $INITRD_COMPRESS ]] && compress=$INITRD_COMPRESS -@@ -750,6 +750,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) - [[ $kernel_image_l ]] && kernel_image="$kernel_image_l" - - # eliminate IFS hackery when messing with fw_dir -+export DRACUT_FIRMWARE_PATH=${fw_dir// /:} - fw_dir=${fw_dir//:/ } - - # check for logfile and try to create one if it doesn't exist -@@ -839,7 +840,6 @@ trap ' - # clean up after ourselves no matter how we die. - trap 'exit 1;' SIGINT - --export DRACUT_KERNEL_LAZY="1" - export DRACUT_RESOLVE_LAZY="1" - - if [[ $print_cmdline ]]; then -@@ -1436,9 +1436,9 @@ if [[ $no_kernel != yes ]]; then - hostonly='' instmods -c $filesystems - fi - -- dinfo "*** Installing kernel module dependencies and firmware ***" -+ dinfo "*** Installing kernel module dependencies ***" - dracut_kernel_post -- dinfo "*** Installing kernel module dependencies and firmware done ***" -+ dinfo "*** Installing kernel module dependencies done ***" - - if [[ $noimageifnotneeded == yes ]] && [[ $hostonly ]]; then - if [[ ! -f "$initdir/lib/dracut/need-initqueue" ]] && \ -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 3b48ba8..a20e06c 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -22,7 +22,7 @@ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE - #endif -- -+#undef _FILE_OFFSET_BITS - #include - #include - #include -@@ -38,6 +38,9 @@ - #include - #include - #include -+#include -+#include -+#include - - #include "log.h" - #include "hashmap.h" -@@ -48,16 +51,31 @@ static bool arg_hmac = false; - static bool arg_createdir = false; - static int arg_loglevel = -1; - static bool arg_optional = false; -+static bool arg_silent = false; - static bool arg_all = false; -+static bool arg_module = false; - static bool arg_resolvelazy = false; - static bool arg_resolvedeps = false; - static bool arg_hostonly = false; - static char *destrootdir = NULL; -+static char *kerneldir = NULL; -+static char **firmwaredirs = NULL; -+static char **pathdirs; - static char *logdir = NULL; - static char *logfile = NULL; - FILE *logfile_f = NULL; - static Hashmap *items = NULL; - static Hashmap *items_failed = NULL; -+static regex_t mod_filter_path; -+static regex_t mod_filter_nopath; -+static regex_t mod_filter_symbol; -+static regex_t mod_filter_nosymbol; -+static regex_t mod_filter_noname; -+static bool arg_mod_filter_path = false; -+static bool arg_mod_filter_nopath = false; -+static bool arg_mod_filter_symbol = false; -+static bool arg_mod_filter_nosymbol = false; -+static bool arg_mod_filter_noname = false; - - static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps, bool hashdst); - -@@ -516,6 +534,18 @@ void dracut_log_cp(const char *path) - log_error("Could not append '%s' to logfile '%s': %m", path, logfile); - } - -+static bool check_hashmap(Hashmap *hm, const char *item) -+{ -+ char *existing; -+ existing = hashmap_get(hm, item); -+ if (existing) { -+ if (strcmp(existing, item) == 0) { -+ return true; -+ } -+ } -+ return false; -+} -+ - static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps, bool hashdst) - { - struct stat sb, db; -@@ -524,26 +554,17 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - int ret; - bool src_exists = true; - char *i = NULL; -- char *existing; - - log_debug("dracut_install('%s', '%s')", src, dst); - -- existing = hashmap_get(items_failed, src); -- if (existing) { -- if (strcmp(existing, src) == 0) { -- log_debug("hash hit items_failed for '%s'", src); -- return 1; -- } -+ if (check_hashmap(items_failed, src)) { -+ log_debug("hash hit items_failed for '%s'", src); -+ return 1; - } - -- if (hashdst) { -- existing = hashmap_get(items, dst); -- if (existing) { -- if (strcmp(existing, dst) == 0) { -- log_debug("hash hit items for '%s'", dst); -- return 0; -- } -- } -+ if (hashdst && check_hashmap(items, dst)) { -+ log_debug("hash hit items for '%s'", dst); -+ return 0; - } - - if (lstat(src, &sb) < 0) { -@@ -678,7 +699,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - log_debug("dracut_install ret = %d", ret); - log_info("cp '%s' '%s'", src, fulldstpath); - -- if (arg_hostonly) -+ if (arg_hostonly && !arg_module) - mark_hostonly(dst); - - ret += cp(src, fulldstpath); -@@ -751,6 +772,9 @@ static int parse_argv(int argc, char *argv[]) - - enum { - ARG_VERSION = 0x100, -+ ARG_SILENT, -+ ARG_KERNELDIR, -+ ARG_FIRMWAREDIRS, - ARG_DEBUG - }; - -@@ -765,13 +789,22 @@ static int parse_argv(int argc, char *argv[]) - {"optional", no_argument, NULL, 'o'}, - {"hostonly", no_argument, NULL, 'H'}, - {"all", no_argument, NULL, 'a'}, -+ {"module", no_argument, NULL, 'm'}, - {"fips", no_argument, NULL, 'f'}, - {"destrootdir", required_argument, NULL, 'D'}, - {"logdir", required_argument, NULL, 'L'}, -+ {"mod-filter-path", required_argument, NULL, 'p'}, -+ {"mod-filter-nopath", required_argument, NULL, 'P'}, -+ {"mod-filter-symbol", required_argument, NULL, 's'}, -+ {"mod-filter-nosymbol", required_argument, NULL, 'S'}, -+ {"mod-filter-noname", required_argument, NULL, 'N'}, -+ {"silent", no_argument, NULL, ARG_SILENT}, -+ {"kerneldir", required_argument, NULL, ARG_KERNELDIR}, -+ {"firmwaredirs", required_argument, NULL, ARG_FIRMWAREDIRS}, - {NULL, 0, NULL, 0} - }; - -- while ((c = getopt_long(argc, argv, "adfhlL:oD:HR", options, NULL)) != -1) { -+ while ((c = getopt_long(argc, argv, "madfhlL:oD:HRp:P:s:S:N:", options, NULL)) != -1) { - switch (c) { - case ARG_VERSION: - puts(PROGRAM_VERSION_STRING); -@@ -782,6 +815,9 @@ static int parse_argv(int argc, char *argv[]) - case ARG_DEBUG: - arg_loglevel = LOG_DEBUG; - break; -+ case ARG_SILENT: -+ arg_silent = true; -+ break; - case 'v': - arg_loglevel = LOG_INFO; - break; -@@ -797,12 +833,56 @@ static int parse_argv(int argc, char *argv[]) - case 'a': - arg_all = true; - break; -+ case 'm': -+ arg_module = true; -+ break; - case 'D': - destrootdir = strdup(optarg); - break; -+ case 'p': -+ if (regcomp(&mod_filter_path, optarg, REG_NOSUB|REG_EXTENDED) != 0) { -+ log_error("Module path filter %s is not a regular expression", optarg); -+ exit(EXIT_FAILURE); -+ } -+ arg_mod_filter_path = true; -+ break; -+ case 'P': -+ if (regcomp(&mod_filter_nopath, optarg, REG_NOSUB|REG_EXTENDED) != 0) { -+ log_error("Module path filter %s is not a regular expression", optarg); -+ exit(EXIT_FAILURE); -+ } -+ arg_mod_filter_nopath = true; -+ break; -+ case 's': -+ if (regcomp(&mod_filter_symbol, optarg, REG_NOSUB|REG_EXTENDED) != 0) { -+ log_error("Module symbol filter %s is not a regular expression", optarg); -+ exit(EXIT_FAILURE); -+ } -+ arg_mod_filter_symbol = true; -+ break; -+ case 'S': -+ if (regcomp(&mod_filter_nosymbol, optarg, REG_NOSUB|REG_EXTENDED) != 0) { -+ log_error("Module symbol filter %s is not a regular expression", optarg); -+ exit(EXIT_FAILURE); -+ } -+ arg_mod_filter_nosymbol = true; -+ break; -+ case 'N': -+ if (regcomp(&mod_filter_noname, optarg, REG_NOSUB|REG_EXTENDED) != 0) { -+ log_error("Module symbol filter %s is not a regular expression", optarg); -+ exit(EXIT_FAILURE); -+ } -+ arg_mod_filter_noname = true; -+ break; - case 'L': - logdir = strdup(optarg); - break; -+ case ARG_KERNELDIR: -+ kerneldir = strdup(optarg); -+ break; -+ case ARG_FIRMWAREDIRS: -+ firmwaredirs = strv_split(optarg, ":"); -+ break; - case 'f': - arg_hmac = true; - break; -@@ -817,6 +897,22 @@ static int parse_argv(int argc, char *argv[]) - } - } - -+ if (arg_module) { -+ if (!firmwaredirs) { -+ char *path = NULL; -+ -+ path = getenv("DRACUT_FIRMWARE_PATH"); -+ -+ if (path == NULL) { -+ log_error("Environment variable DRACUT_FIRMWARE_PATH is not set"); -+ exit(EXIT_FAILURE); -+ } -+ -+ log_debug("DRACUT_FIRMWARE_PATH=%s", path); -+ -+ firmwaredirs = strv_split(path, ":"); -+ } -+ } - if (!optind || optind == argc) { - log_error("No SOURCE argument given"); - usage(EXIT_FAILURE); -@@ -858,24 +954,11 @@ static int resolve_lazy(int argc, char **argv) - - static char **find_binary(const char *src) - { -- char *path = NULL; -- _cleanup_strv_free_ char **p = NULL; - char **ret = NULL; - char **q; - char *newsrc = NULL; - -- path = getenv("PATH"); -- -- if (path == NULL) { -- log_error("PATH is not set"); -- exit(EXIT_FAILURE); -- } -- -- log_debug("PATH=%s", path); -- -- p = strv_split(path, ":"); -- -- STRV_FOREACH(q, p) { -+ STRV_FOREACH(q, pathdirs) { - struct stat sb; - int r; - -@@ -976,10 +1059,381 @@ static int install_all(int argc, char **argv) - return r; - } - -+static int install_firmware(struct kmod_module *mod) -+{ -+ struct kmod_list *l, *list = NULL; -+ int ret; -+ -+ char **q; -+ -+ ret = kmod_module_get_info(mod, &list); -+ if (ret < 0) { -+ log_error("could not get modinfo from '%s': %s\n", -+ kmod_module_get_name(mod), strerror(-ret)); -+ return ret; -+ } -+ kmod_list_foreach(l, list) { -+ const char *key = kmod_module_info_get_key(l); -+ const char *value = NULL; -+ char *fwpath = NULL; -+ -+ if (!streq("firmware", key)) -+ continue; -+ -+ value = kmod_module_info_get_value(l); -+ log_debug("Firmware %s", value); -+ ret = -1; -+ STRV_FOREACH(q, firmwaredirs) { -+ struct stat sb; -+ int r; -+ -+ r = asprintf(&fwpath, "%s/%s", *q, value); -+ if (r < 0) { -+ log_error("Out of memory!"); -+ exit(EXIT_FAILURE); -+ } -+ -+ if (stat(fwpath, &sb) != 0) { -+ log_debug("stat(%s) != 0", fwpath); -+ free(fwpath); -+ fwpath = NULL; -+ continue; -+ } -+ -+ ret = dracut_install(fwpath, fwpath, false, false, true); -+ if (ret == 0) -+ log_debug("dracut_install '%s' OK", fwpath); -+ } -+ -+ if (ret != 0) { -+ log_info("Possible missing firmware %s for kernel module %s", value, kmod_module_get_name(mod)); -+ } -+ } -+ return 0; -+} -+ -+static bool check_module_symbols(struct kmod_module *mod) -+{ -+ struct kmod_list *itr, *deplist = NULL; -+ -+ if (!arg_mod_filter_symbol && !arg_mod_filter_nosymbol) -+ return true; -+ -+ if (kmod_module_get_dependency_symbols(mod, &deplist) < 0) { -+ log_debug("kmod_module_get_dependency_symbols failed"); -+ if (arg_mod_filter_symbol) -+ return false; -+ return true; -+ } -+ -+ if (arg_mod_filter_nosymbol) { -+ kmod_list_foreach(itr, deplist) { -+ const char *symbol = kmod_module_symbol_get_symbol(itr); -+ // log_debug("Checking symbol %s", symbol); -+ if (regexec(&mod_filter_nosymbol, symbol, 0, NULL, 0) == 0) { -+ kmod_module_dependency_symbols_free_list(deplist); -+ log_debug("Module %s: symbol %s matched exclusion filter", kmod_module_get_name(mod), symbol); -+ return false; -+ } -+ } -+ } -+ -+ if (arg_mod_filter_symbol) { -+ kmod_list_foreach(itr, deplist) { -+ const char *symbol = kmod_module_dependency_symbol_get_symbol(itr); -+ // log_debug("Checking symbol %s", symbol); -+ if (regexec(&mod_filter_symbol, symbol, 0, NULL, 0) == 0) { -+ kmod_module_dependency_symbols_free_list(deplist); -+ log_debug("Module %s: symbol %s matched inclusion filter", kmod_module_get_name(mod), symbol); -+ return true; -+ } -+ } -+ kmod_module_dependency_symbols_free_list(deplist); -+ return false; -+ } -+ -+ kmod_module_dependency_symbols_free_list(deplist); -+ return true; -+} -+ -+ -+static bool check_module_path(const char *path) -+{ -+ if (arg_mod_filter_nopath && (regexec(&mod_filter_nopath, path, 0, NULL, 0) == 0)) { -+ log_debug("Path %s matched exclusion filter", path); -+ return false; -+ } -+ -+ if (arg_mod_filter_path && (regexec(&mod_filter_path, path, 0, NULL, 0) != 0)) { -+ log_debug("Path %s matched inclusion filter", path); -+ return false; -+ } -+ return true; -+} -+ -+static int install_module(struct kmod_module *mod) -+{ -+ int ret = 0; -+ int state; -+ struct kmod_list *itr, *modlist = NULL; -+ const char *path = NULL; -+ const char *name = NULL; -+ state = kmod_module_get_initstate(mod); -+ -+ name = kmod_module_get_name(mod); -+ if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) -+ return 0; -+ -+ if (arg_hostonly && (state != KMOD_MODULE_BUILTIN) && (state != KMOD_MODULE_LIVE)) { -+ log_debug("dracut_install '%s' not hostonly", name); -+ return 0; -+ } -+ -+ path = kmod_module_get_path(mod); -+ if (!path) -+ return -ENOENT; -+ -+ if (check_hashmap(items_failed, path)) -+ return 1; -+ -+ if (check_hashmap(items, path)) -+ return 0; -+ -+ if (!check_module_path(path) || !check_module_symbols(mod)) { -+ log_debug("No symbol or patch match for '%s'", path); -+ return 0; -+ } -+ -+ log_debug("dracut_install '%s'", path); -+ ret = dracut_install(path, path, false, false, true); -+ if (ret == 0) { -+ log_debug("dracut_install '%s' OK", kmod_module_get_name(mod)); -+ } else if (!arg_optional) { -+ if (!arg_silent) -+ log_error("dracut_install '%s' ERROR", kmod_module_get_name(mod)); -+ return ret; -+ } -+ install_firmware(mod); -+ -+ modlist = kmod_module_get_dependencies(mod); -+ kmod_list_foreach(itr, modlist) { -+ mod = kmod_module_get_module(itr); -+ path = kmod_module_get_path(mod); -+ name = kmod_module_get_name(mod); -+ if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) { -+ kmod_module_unref(mod); -+ continue; -+ } -+ ret = dracut_install(path, path, false, false, true); -+ if (ret == 0) { -+ log_debug("dracut_install '%s' OK", kmod_module_get_name(mod)); -+ install_firmware(mod); -+ } else { -+ log_error("dracut_install '%s' ERROR", kmod_module_get_name(mod)); -+ } -+ kmod_module_unref(mod); -+ } -+ kmod_module_unref_list(modlist); -+ -+ return ret; -+} -+ -+static int install_modules(int argc, char **argv) -+{ -+ struct kmod_ctx *ctx = NULL; -+ struct kmod_list *itr, *modlist = NULL; -+ struct kmod_module *mod = NULL, *mod_o = NULL; -+ -+ const char *modname = NULL; -+ int i; -+ -+ ctx = kmod_new(kerneldir, NULL); -+ -+ for (i = 0; i < argc; i++) { -+ int r = 0; -+ int ret = 0; -+ log_debug("Handle module '%s'", argv[i]); -+ -+ if (argv[i][0] == '/') { -+ r = kmod_module_new_from_path(ctx, argv[i], &mod_o); -+ if (r < 0) { -+ log_debug("Failed to lookup modules path '%s': %m", argv[i]); -+ if (!arg_optional) -+ return -ENOENT; -+ continue; -+ } -+ /* Check, if we have to load another module with that name instead */ -+ modname = kmod_module_get_name(mod_o); -+ if (!modname) { -+ if (!arg_optional) { -+ if (!arg_silent) -+ log_error("Failed to get name for module '%s'", argv[i]); -+ return -ENOENT; -+ } -+ log_info("Failed to get name for module '%s'", argv[i]); -+ continue; -+ } -+ r = kmod_module_new_from_lookup(ctx, modname, &modlist); -+ kmod_module_unref(mod_o); -+ if (r < 0) { -+ if (!arg_optional) { -+ if (!arg_silent) -+ log_error("3 Failed to lookup alias '%s': %d", modname, r); -+ return -ENOENT; -+ } -+ log_info("3 Failed to lookup alias '%s': %d", modname, r); -+ continue; -+ } -+ if (!modlist) { -+ if (!arg_optional) { -+ if (!arg_silent) -+ log_error("Failed to find module '%s' %s", modname, argv[i]); -+ return -ENOENT; -+ } -+ log_info("Failed to find module '%s' %s", modname, argv[i]); -+ continue; -+ } -+ kmod_list_foreach(itr, modlist) { -+ mod = kmod_module_get_module(itr); -+ ret = install_module(mod); -+ } -+ kmod_module_unref_list(modlist); -+ modlist = 0; -+ } else if (argv[i][0] == '=') { -+ char *path1, *path2, *path3; -+ FTS *fts; -+ log_debug("Handling =%s", &argv[i][1]); -+ /* FIXME and add more paths*/ -+ { -+ int r; -+ r = asprintf(&path2, "%s/kernel/%s", kerneldir, &argv[i][1]); -+ if (r < 0) { -+ log_error("Out of memory!"); -+ exit(EXIT_FAILURE); -+ } -+ -+ r = asprintf(&path1, "%s/extra/%s", kerneldir, &argv[i][1]); -+ if (r < 0) { -+ log_error("Out of memory!"); -+ exit(EXIT_FAILURE); -+ } -+ -+ r = asprintf(&path3, "%s/updates/%s", kerneldir, &argv[i][1]); -+ if (r < 0) { -+ log_error("Out of memory!"); -+ exit(EXIT_FAILURE); -+ } -+ -+ char *paths[] = { path1, path2, path3, NULL }; -+ fts = fts_open(paths, FTS_COMFOLLOW|FTS_NOCHDIR|FTS_NOSTAT|FTS_LOGICAL, NULL); -+ } -+ for (FTSENT *ftsent = fts_read(fts); ftsent != NULL; ftsent = fts_read(fts)) { -+ if((ftsent->fts_info == FTS_D) && !check_module_path(ftsent->fts_accpath)) { -+ fts_set(fts, ftsent, FTS_SKIP); -+ log_debug("Skipping %s", ftsent->fts_accpath); -+ continue; -+ } -+ if((ftsent->fts_info != FTS_F) && (ftsent->fts_info != FTS_SL)) { -+ log_debug("Ignoring %s", ftsent->fts_accpath); -+ continue; -+ } -+ log_debug("Handling %s", ftsent->fts_accpath); -+ r = kmod_module_new_from_path(ctx, ftsent->fts_accpath, &mod_o); -+ if (r < 0) { -+ log_debug("Failed to lookup modules path '%s': %m", ftsent->fts_accpath); -+ continue; -+ } -+#if 1 -+ /* Check, if we have to load another module with that name instead */ -+ modname = kmod_module_get_name(mod_o); -+ if (!modname) { -+ log_error("Failed to get name for module '%s'", ftsent->fts_accpath); -+ continue; -+ } -+ r = kmod_module_new_from_lookup(ctx, modname, &modlist); -+ kmod_module_unref(mod_o); -+ if (r < 0) { -+ log_error("2 Failed to lookup alias '%s': %m", modname); -+ kmod_module_unref_list(modlist); -+ continue; -+ } -+ if (!modlist) { -+ log_error("Failed to find module '%s' %s", modname, ftsent->fts_accpath); -+ kmod_module_unref_list(modlist); -+ continue; -+ } -+ kmod_list_foreach(itr, modlist) { -+ mod = kmod_module_get_module(itr); -+ ret = install_module(mod); -+ kmod_module_unref(mod); -+ } -+ kmod_module_unref_list(modlist); -+ modlist = 0; -+#else -+ ret = install_module(mod_o); -+ kmod_module_unref(mod_o); -+#endif -+ -+ } -+ if (errno) { -+ log_error("FTS ERROR: %m"); -+ } -+ fts_close(fts); -+ free(path1); path1 = NULL; -+ free(path2); path2 = NULL; -+ free(path3); path3 = NULL; -+ } else { -+ char *modname = argv[i]; -+ if (endswith(modname, ".ko")) { -+ int len = strlen(modname); -+ modname[len-3]=0; -+ } -+ if (endswith(modname, ".ko.xz") || endswith(modname, ".ko.gz")) { -+ int len = strlen(modname); -+ modname[len-6]=0; -+ } -+ r = kmod_module_new_from_lookup(ctx, modname, &modlist); -+ if (r < 0) { -+ if (!arg_optional) { -+ if (!arg_silent) -+ log_error("Failed to lookup alias '%s': %m", modname); -+ return -ENOENT; -+ } -+ log_info("Failed to lookup alias '%s': %m", modname); -+ continue; -+ } -+ if (!modlist) { -+ if (!arg_optional) { -+ if (!arg_silent) -+ log_error("Failed to find module '%s'", modname); -+ return -ENOENT; -+ } -+ log_info("Failed to find module '%s'", modname); -+ continue; -+ } -+ kmod_list_foreach(itr, modlist) { -+ mod = kmod_module_get_module(itr); -+ ret = install_module(mod); -+ kmod_module_unref(mod); -+ } -+ kmod_module_unref_list(modlist); -+ modlist = 0; -+ } -+ -+ if ((ret != 0) && (!arg_optional)) { -+ if (!arg_silent) -+ log_error("ERROR: installing '%s'", argv[i]); -+ return EXIT_FAILURE; -+ } -+ } -+ return EXIT_SUCCESS; -+} -+ - int main(int argc, char **argv) - { - int r; - char *i; -+ char *path = NULL; - - r = parse_argv(argc, argv); - if (r <= 0) -@@ -993,6 +1447,17 @@ int main(int argc, char **argv) - - log_open(); - -+ path = getenv("PATH"); -+ -+ if (path == NULL) { -+ log_error("PATH is not set"); -+ exit(EXIT_FAILURE); -+ } -+ -+ log_debug("PATH=%s", path); -+ -+ pathdirs = strv_split(path, ":"); -+ - umask(0022); - - if (destrootdir == NULL || strlen(destrootdir) == 0) { -@@ -1059,7 +1524,9 @@ int main(int argc, char **argv) - } - } - -- if (arg_resolvelazy) { -+ if (arg_module) { -+ r = install_modules(argc - optind, &argv[optind]); -+ } else if (arg_resolvelazy) { - r = resolve_lazy(argc - optind, &argv[optind]); - } else if (arg_all || (argc - optind > 2) || ((argc - optind) == 1)) { - r = install_all(argc - optind, &argv[optind]); -@@ -1085,6 +1552,7 @@ int main(int argc, char **argv) - hashmap_free(items_failed); - - free(destrootdir); -- -+ strv_free(firmwaredirs); -+ strv_free(pathdirs); - return r; - } -diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh -index 55a214e..e0b2959 100755 ---- a/modules.d/50drm/module-setup.sh -+++ b/modules.d/50drm/module-setup.sh -@@ -15,40 +15,6 @@ installkernel() { - local _modname - # Include KMS capable drm drivers - -- drm_module_filter() { -- local _drm_drivers='drm_crtc_init' -- local _ret -- # subfunctions inherit following FDs -- local _merge=8 _side2=9 -- function nmf1() { -- local _fname _fcont -- while read _fname || [ -n "$_fname" ]; do -- case "$_fname" in -- *.ko) _fcont="$(< $_fname)" ;; -- *.ko.gz) _fcont="$(gzip -dc $_fname)" ;; -- *.ko.xz) _fcont="$(xz -dc $_fname)" ;; -- esac -- [[ $_fcont =~ $_drm_drivers -- && ! $_fcont =~ iw_handler_get_spy ]] \ -- && echo "$_fname" -- done -- } -- function rotor() { -- local _f1 _f2 -- while read _f1 || [ -n "$_f1" ]; do -- echo "$_f1" -- if read _f2; then -- echo "$_f2" 1>&${_side2} -- fi -- done | nmf1 1>&${_merge} -- } -- # Use two parallel streams to filter alternating modules. -- set +x -- eval "( ( rotor ) ${_side2}>&1 | nmf1 ) ${_merge}>&1" -- [[ $debug ]] && set -x -- return 0 -- } -- - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules needed by drm - instmods \ -@@ -62,20 +28,19 @@ installkernel() { - - instmods amdkfd hyperv_fb - -- 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, -- # 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,soc/devices/soc?}/*/modalias 2>/dev/null; then -- hostonly='' instmods $_modname -- # if radeon.ko is installed, we want amdkfd also -- if strstr "$_modname" radeon.ko; then -- hostonly='' instmods amdkfd -+ # if the hardware is present, include module even if it is not currently loaded, -+ # as we could e.g. be in the installer; nokmsboot boot parameter will disable -+ # loading of the driver if needed -+ if [[ $hostonly ]]; then -+ for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do -+ [[ -e $i ]] || continue -+ if hostonly="" dracut_instmods -s "drm_crtc_init" $(<$i) 2>/dev/null; then -+ if strstr $(modinfo -F filename $(<$i) 2>/dev/null) radeon.ko; then -+ hostonly='' instmods amdkfd -+ fi - fi -- continue -- fi -- instmods $_modname -- done -+ done -+ else -+ dracut_instmods -s "drm_crtc_init" "=drivers/gpu/drm" -+ fi - } -diff --git a/modules.d/90crypt/module-setup.sh b/modules.d/90crypt/module-setup.sh -index 5d964f4..6c377ef 100755 ---- a/modules.d/90crypt/module-setup.sh -+++ b/modules.d/90crypt/module-setup.sh -@@ -24,8 +24,10 @@ depends() { - - # called by dracut - installkernel() { -- instmods dm_crypt =crypto - hostonly="" instmods drbg -+ arch=$(arch) -+ [[ $arch == x86_64 ]] && arch=x86 -+ instmods dm_crypt =crypto =drivers/crypto =arch/$arch/crypto - } - - # called by dracut -diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh -index 419e8b1..2b8e39f 100755 ---- a/modules.d/90dm/module-setup.sh -+++ b/modules.d/90dm/module-setup.sh -@@ -13,8 +13,7 @@ depends() { - - # called by dracut - installkernel() { -- instmods =drivers/md -- instmods dm_mod dm-cache dm-cache-mq dm-cache-cleaner -+ instmods =drivers/md dm_mod dm-cache dm-cache-mq dm-cache-cleaner - } - - # called by dracut -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 300adc7..e97d598 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -2,54 +2,25 @@ - - # called by dracut - installkernel() { -- if [[ -z $drivers ]]; then -- block_module_filter() { -- local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host' -- # subfunctions inherit following FDs -- local _merge=8 _side2=9 -- function bmf1() { -- local _f -- while read _f || [ -n "$_f" ]; do case "$_f" in -- *.ko) [[ $(< $_f) =~ $_blockfuncs ]] && echo "$_f" ;; -- *.ko.gz) [[ $(gzip -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;; -- *.ko.xz) [[ $(xz -dc <$_f) =~ $_blockfuncs ]] && echo "$_f" ;; -- esac -- done -- return 0 -- } -- function rotor() { -- local _f1 _f2 -- while read _f1 || [ -n "$_f1" ]; do -- echo "$_f1" -- if read _f2; then -- echo "$_f2" 1>&${_side2} -- fi -- done | bmf1 1>&${_merge} -- return 0 -- } -- # Use two parallel streams to filter alternating modules. -- set +x -- eval "( ( rotor ) ${_side2}>&1 | bmf1 ) ${_merge}>&1" -- [[ $debug ]] && set -x -- return 0 -- } -+ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma' - -+ if [[ -z $drivers ]]; then - hostonly='' instmods \ - sr_mod sd_mod scsi_dh ata_piix hid_generic unix \ -- ehci-hcd ehci-pci ehci-platform \ -+ ehci-hcd ehci-pci \ - ohci-hcd ohci-pci \ - uhci-hcd \ - xhci-hcd xhci-pci xhci-plat-hcd \ -+ ehci-platform -+ -+ instmods \ - "=drivers/hid" \ - "=drivers/input/serio" \ - "=drivers/input/keyboard" \ -- "=drivers/usb/storage" -- -- instmods \ - yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ - atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ - virtio virtio_blk virtio_ring virtio_pci virtio_scsi \ -- "=drivers/pcmcia" =ide -+ "=drivers/pcmcia" =ide "=drivers/usb/storage" - - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules -@@ -62,20 +33,16 @@ installkernel() { - ${NULL} - fi - -- -- find_kernel_modules | block_module_filter | instmods -+ dracut_instmods -s "${_blockfuncs}" "=drivers" - - # if not on hostonly mode, install all known filesystems, - # if the required list is not set via the filesystems variable - if ! [[ $hostonly ]]; then - if [[ -z $filesystems ]]; then -- silent_omit_drivers="kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd" \ -- instmods '=fs' -+ dracut_instmods -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs' - fi - else -- for i in "${host_fs_types[@]}"; do -- hostonly='' instmods $i -- done -+ hostonly='' instmods "${host_fs_types[@]}" - fi - fi - : -diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh -index 18d7d96..c004ff8 100755 ---- a/modules.d/90kernel-network-modules/module-setup.sh -+++ b/modules.d/90kernel-network-modules/module-setup.sh -@@ -14,47 +14,14 @@ depends() { - installkernel() { - # Include wired net drivers, excluding wireless - local _arch=$(uname -m) -+ local _net_drivers='eth_type_trans|register_virtio_device|usbnet_open' -+ local _unwanted_drivers='/(wireless|isdn|uwb|net/ethernet|net/phy|net/team)/' - -- net_module_filter() { -- local _net_drivers='eth_type_trans|register_virtio_device|usbnet_open' -- local _unwanted_drivers='/(wireless|isdn|uwb|net/ethernet|net/phy|net/team)/' -- local _ret -- # subfunctions inherit following FDs -- local _merge=8 _side2=9 -- function nmf1() { -- local _fname _fcont -- while read _fname; do -- [[ $_fname =~ $_unwanted_drivers ]] && continue -- case "$_fname" in -- *.ko) _fcont="$(< $_fname)" ;; -- *.ko.gz) _fcont="$(gzip -dc $_fname)" ;; -- *.ko.xz) _fcont="$(xz -dc $_fname)" ;; -- esac -- [[ $_fcont =~ $_net_drivers -- && ! $_fcont =~ iw_handler_get_spy ]] \ -- && echo "$_fname" -- done -- return 0 -- } -- function rotor() { -- local _f1 _f2 -- while read _f1; do -- echo "$_f1" -- if read _f2; then -- echo "$_f2" 1>&${_side2} -- fi -- done | nmf1 1>&${_merge} -- return 0 -- } -- # Use two parallel streams to filter alternating modules. -- set +x -- eval "( ( rotor ) ${_side2}>&1 | nmf1 ) ${_merge}>&1" -- [[ $debug ]] && set -x -- return 0 -- } -+ if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then -+ _s390drivers="=drivers/s390/net" -+ fi - -- { find_kernel_modules_by_path drivers/net; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers/s390/net; fi; } \ -- | net_module_filter | instmods -+ dracut_instmods -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"} - - #instmods() will take care of hostonly - instmods \ -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index a808678..27817bd 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -51,41 +51,14 @@ cmdline() { - installkernel() { - local _ret - local _arch=$(uname -m) -- mp_mod_filter() { -- local _funcs='scsi_register_device_handler|dm_dirty_log_type_register|dm_register_path_selector|dm_register_target' -- # subfunctions inherit following FDs -- local _merge=8 _side2=9 -- function bmf1() { -- local _f -- while read _f || [ -n "$_f" ]; do -- case "$_f" in -- *.ko) [[ $(< $_f) =~ $_funcs ]] && echo "$_f" ;; -- *.ko.gz) [[ $(gzip -dc <$_f) =~ $_funcs ]] && echo "$_f" ;; -- *.ko.xz) [[ $(xz -dc <$_f) =~ $_funcs ]] && echo "$_f" ;; -- esac -- done -- return 0 -- } -+ local _funcs='scsi_register_device_handler|dm_dirty_log_type_register|dm_register_path_selector|dm_register_target' -+ local _s390 - -- function rotor() { -- local _f1 _f2 -- while read _f1 || [ -n "$_f1" ]; do -- echo "$_f1" -- if read _f2; then -- echo "$_f2" 1>&${_side2} -- fi -- done | bmf1 1>&${_merge} -- return 0 -- } -- # Use two parallel streams to filter alternating modules. -- set +x -- eval "( ( rotor ) ${_side2}>&1 | bmf1 ) ${_merge}>&1" -- [[ $debug ]] && set -x -- return 0 -- } -+ if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then -+ _s390drivers="=drivers/s390/scsi" -+ fi - -- ( find_kernel_modules_by_path drivers/scsi; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers/s390/scsi; fi; -- find_kernel_modules_by_path drivers/md ) | mp_mod_filter | hostonly='' instmods -+ hostonly='' dracut_instmods -s "$_funcs" "=drivers/scsi" "=drivers/md" ${_s390drivers:+"$_s390drivers"} - } - - # called by dracut -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index beb80e3..203e313 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -157,44 +157,17 @@ depends() { - # called by dracut - installkernel() { - local _arch=$(uname -m) -+ local _funcs='iscsi_register_transport' - - instmods bnx2i qla4xxx cxgb3i cxgb4i be2iscsi - hostonly="" instmods iscsi_tcp iscsi_ibft crc32c iscsi_boot_sysfs -- iscsi_module_filter() { -- local _funcs='iscsi_register_transport' -- # subfunctions inherit following FDs -- local _merge=8 _side2=9 -- function bmf1() { -- local _f -- while read _f || [ -n "$_f" ]; do -- case "$_f" in -- *.ko) [[ $(< $_f) =~ $_funcs ]] && echo "$_f" ;; -- *.ko.gz) [[ $(gzip -dc <$_f) =~ $_funcs ]] && echo "$_f" ;; -- *.ko.xz) [[ $(xz -dc <$_f) =~ $_funcs ]] && echo "$_f" ;; -- esac -- done -- return 0 -- } -- -- function rotor() { -- local _f1 _f2 -- while read _f1 || [ -n "$_f1" ]; do -- echo "$_f1" -- if read _f2; then -- echo "$_f2" 1>&${_side2} -- fi -- done | bmf1 1>&${_merge} -- return 0 -- } -- # Use two parallel streams to filter alternating modules. -- set +x -- eval "( ( rotor ) ${_side2}>&1 | bmf1 ) ${_merge}>&1" -- [[ $debug ]] && set -x -- return 0 -- } - -- { find_kernel_modules_by_path drivers/scsi; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers/s390/scsi; fi;} \ -- | iscsi_module_filter | instmods -+ if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then -+ _s390drivers="=drivers/s390/scsi" -+ fi -+ -+ dracut_instmods -s "$_funcs" "=drivers/scsi" ${_s390drivers:+"$_s390drivers"} -+ - } - - # called by dracut -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 6f039bd..9767e57 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -25,7 +25,7 @@ depends() { - - # called by dracut - installkernel() { -- instmods nfs sunrpc ipv6 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files -+ instmods =net/sunrpc =fs/nfs ipv6 nfs_acl nfs_layout_nfsv41_files - } - - cmdline() { diff --git a/0049-Use-pkg-config-for-libkmod-CFLAGS-and-LIBS.patch b/0049-Use-pkg-config-for-libkmod-CFLAGS-and-LIBS.patch deleted file mode 100644 index fe5820c..0000000 --- a/0049-Use-pkg-config-for-libkmod-CFLAGS-and-LIBS.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 607fec3e7965e3d38d764008e2b0c29757d90777 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Apr 2016 11:13:32 +0200 -Subject: [PATCH] Use pkg-config for libkmod CFLAGS and LIBS - ---- - Makefile | 4 ++-- - configure | 7 +++++++ - dracut.spec | 9 ++++++--- - 3 files changed, 15 insertions(+), 5 deletions(-) - -diff --git a/Makefile b/Makefile -index 0a1ae6c..d28e4cf 100644 ---- a/Makefile -+++ b/Makefile -@@ -12,7 +12,7 @@ pkglibdir ?= ${libdir}/dracut - sysconfdir ?= ${prefix}/etc - bindir ?= ${prefix}/bin - mandir ?= ${prefix}/share/man --CFLAGS ?= -O2 -g -Wall -+CFLAGS ?= -O2 -g -Wall $(KMOD_CFLAGS) - CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 - bashcompletiondir ?= ${datadir}/bash-completion/completions - pkgconfigdatadir ?= $(datadir)/pkgconfig -@@ -61,7 +61,7 @@ install/util.o: install/util.c install/util.h install/macro.h install/log.h - install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h - - install/dracut-install: $(DRACUT_INSTALL_OBJECTS) -- $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) -lkmod -+ $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS) - - dracut-install: install/dracut-install - ln -fs $< $@ -diff --git a/configure b/configure -index 0bd3d2d..c92cb99 100755 ---- a/configure -+++ b/configure -@@ -50,6 +50,11 @@ while (($# > 0)); do - shift - done - -+if ! pkg-config --exists --print-errors " libkmod >= 15 "; then -+ echo "dracut needs pkg-config and libkmod >= 15." >&2 -+ exit 1 -+fi -+ - cat > Makefile.inc.$$ <= 15 ") -+KMOD_LIBS ?= $(pkg-config --libs " libkmod >= 15 ") - EOF - - { -diff --git a/dracut.spec b/dracut.spec -index 9e19fcc..7b9d675 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -39,6 +39,7 @@ Source1: https://www.gnu.org/licenses/lgpl-2.1.txt - - - BuildRequires: bash git -+BuildRequires: kmod-devel >= 15 - - %if 0%{?fedora} || 0%{?rhel} - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -@@ -46,7 +47,6 @@ BuildRequires: pkgconfig - %endif - %if 0%{?fedora} - BuildRequires: bash-completion --BuildRequires: pkgconfig - %endif - - %if 0%{?suse_version} -@@ -223,10 +223,13 @@ This package contains tools to assemble the local initrd and host configuration. - cp %{SOURCE1} . - - %build --%configure --systemdsystemunitdir=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \ -+%configure --systemdsystemunitdir=%{_unitdir} \ -+ --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) \ -+ --libdir=%{_prefix}/lib \ - %if %{without doc} -- --disable-documentation -+ --disable-documentation \ - %endif -+ ${NULL} - - make %{?_smp_mflags} - diff --git a/0050-Fix-regressions-with-dracut-install-with-kernel-modu.patch b/0050-Fix-regressions-with-dracut-install-with-kernel-modu.patch deleted file mode 100644 index 8b84d48..0000000 --- a/0050-Fix-regressions-with-dracut-install-with-kernel-modu.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 8d9ab2755d1341904ca7889f4e05b2151848a759 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Apr 2016 11:47:20 +0200 -Subject: [PATCH] Fix regressions with dracut-install with kernel modules - -Make sure, the same modules are installed as before. ---- - install/dracut-install.c | 9 +++++---- - modules.d/50drm/module-setup.sh | 4 ++-- - modules.d/90kernel-modules/module-setup.sh | 15 ++++++++------- - modules.d/90kernel-network-modules/module-setup.sh | 2 +- - modules.d/90multipath/module-setup.sh | 2 +- - modules.d/95iscsi/module-setup.sh | 2 +- - 6 files changed, 18 insertions(+), 16 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index a20e06c..c246201 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -1202,6 +1202,7 @@ static int install_module(struct kmod_module *mod) - if (!check_module_path(path) || !check_module_symbols(mod)) { - log_debug("No symbol or patch match for '%s'", path); - return 0; -+ //return -ENOENT; - } - - log_debug("dracut_install '%s'", path); -@@ -1295,7 +1296,7 @@ static int install_modules(int argc, char **argv) - } - kmod_list_foreach(itr, modlist) { - mod = kmod_module_get_module(itr); -- ret = install_module(mod); -+ ret += install_module(mod); - } - kmod_module_unref_list(modlist); - modlist = 0; -@@ -1364,13 +1365,13 @@ static int install_modules(int argc, char **argv) - } - kmod_list_foreach(itr, modlist) { - mod = kmod_module_get_module(itr); -- ret = install_module(mod); -+ ret += install_module(mod); - kmod_module_unref(mod); - } - kmod_module_unref_list(modlist); - modlist = 0; - #else -- ret = install_module(mod_o); -+ ret += install_module(mod_o); - kmod_module_unref(mod_o); - #endif - -@@ -1413,7 +1414,7 @@ static int install_modules(int argc, char **argv) - } - kmod_list_foreach(itr, modlist) { - mod = kmod_module_get_module(itr); -- ret = install_module(mod); -+ ret += install_module(mod); - kmod_module_unref(mod); - } - kmod_module_unref_list(modlist); -diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh -index e0b2959..661dde9 100755 ---- a/modules.d/50drm/module-setup.sh -+++ b/modules.d/50drm/module-setup.sh -@@ -34,8 +34,8 @@ installkernel() { - if [[ $hostonly ]]; then - for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do - [[ -e $i ]] || continue -- if hostonly="" dracut_instmods -s "drm_crtc_init" $(<$i) 2>/dev/null; then -- if strstr $(modinfo -F filename $(<$i) 2>/dev/null) radeon.ko; then -+ if hostonly="" dracut_instmods -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i) 2>/dev/null; then -+ if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then - hostonly='' instmods amdkfd - fi - fi -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index e97d598..c30715d 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -7,20 +7,21 @@ installkernel() { - if [[ -z $drivers ]]; then - hostonly='' instmods \ - sr_mod sd_mod scsi_dh ata_piix hid_generic unix \ -- ehci-hcd ehci-pci \ -+ ehci-hcd ehci-pci ehci-platform \ - ohci-hcd ohci-pci \ - uhci-hcd \ - xhci-hcd xhci-pci xhci-plat-hcd \ -- ehci-platform -- -- instmods \ - "=drivers/hid" \ - "=drivers/input/serio" \ - "=drivers/input/keyboard" \ -+ "=drivers/usb/storage" \ -+ ${NULL} -+ -+ instmods \ - yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ - atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ - virtio virtio_blk virtio_ring virtio_pci virtio_scsi \ -- "=drivers/pcmcia" =ide "=drivers/usb/storage" -+ "=drivers/pcmcia" =ide - - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules -@@ -33,13 +34,13 @@ installkernel() { - ${NULL} - fi - -- dracut_instmods -s "${_blockfuncs}" "=drivers" -+ dracut_instmods -o -s "${_blockfuncs}" "=drivers" - - # if not on hostonly mode, install all known filesystems, - # if the required list is not set via the filesystems variable - if ! [[ $hostonly ]]; then - if [[ -z $filesystems ]]; then -- dracut_instmods -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs' -+ dracut_instmods -o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs' - fi - else - hostonly='' instmods "${host_fs_types[@]}" -diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh -index c004ff8..11fbab9 100755 ---- a/modules.d/90kernel-network-modules/module-setup.sh -+++ b/modules.d/90kernel-network-modules/module-setup.sh -@@ -21,7 +21,7 @@ installkernel() { - _s390drivers="=drivers/s390/net" - fi - -- dracut_instmods -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"} -+ dracut_instmods -o -P ".*${_unwanted_drivers}.*" -s "$_net_drivers" "=drivers/net" ${_s390drivers:+"$_s390drivers"} - - #instmods() will take care of hostonly - instmods \ -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 27817bd..0af777d 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -58,7 +58,7 @@ installkernel() { - _s390drivers="=drivers/s390/scsi" - fi - -- hostonly='' dracut_instmods -s "$_funcs" "=drivers/scsi" "=drivers/md" ${_s390drivers:+"$_s390drivers"} -+ hostonly='' dracut_instmods -o -s "$_funcs" "=drivers/scsi" "=drivers/md" ${_s390drivers:+"$_s390drivers"} - } - - # called by dracut -diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh -index 203e313..04937b5 100755 ---- a/modules.d/95iscsi/module-setup.sh -+++ b/modules.d/95iscsi/module-setup.sh -@@ -166,7 +166,7 @@ installkernel() { - _s390drivers="=drivers/s390/scsi" - fi - -- dracut_instmods -s "$_funcs" "=drivers/scsi" ${_s390drivers:+"$_s390drivers"} -+ dracut_instmods -o -s "$_funcs" "=drivers/scsi" ${_s390drivers:+"$_s390drivers"} - - } - diff --git a/0051-dracut-install-simplify-error-logic.patch b/0051-dracut-install-simplify-error-logic.patch deleted file mode 100644 index feea003..0000000 --- a/0051-dracut-install-simplify-error-logic.patch +++ /dev/null @@ -1,159 +0,0 @@ -From fe6e0c23adbdafc4fc371107534b3b2681c96393 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Apr 2016 13:28:29 +0200 -Subject: [PATCH] dracut-install: simplify error logic - -error out early, if "--optional" is not set ---- - install/dracut-install.c | 64 +++++++++++++++++++++++++++++++++++------------- - 1 file changed, 47 insertions(+), 17 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index c246201..f414f30 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -1181,8 +1181,10 @@ static int install_module(struct kmod_module *mod) - state = kmod_module_get_initstate(mod); - - name = kmod_module_get_name(mod); -- if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) -+ if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) { -+ log_debug("dracut_install '%s' is excluded", name); - return 0; -+ } - - if (arg_hostonly && (state != KMOD_MODULE_BUILTIN) && (state != KMOD_MODULE_LIVE)) { - log_debug("dracut_install '%s' not hostonly", name); -@@ -1194,15 +1196,14 @@ static int install_module(struct kmod_module *mod) - return -ENOENT; - - if (check_hashmap(items_failed, path)) -- return 1; -+ return -1; - - if (check_hashmap(items, path)) - return 0; - - if (!check_module_path(path) || !check_module_symbols(mod)) { - log_debug("No symbol or patch match for '%s'", path); -- return 0; -- //return -ENOENT; -+ return 1; - } - - log_debug("dracut_install '%s'", path); -@@ -1252,7 +1253,7 @@ static int install_modules(int argc, char **argv) - - for (i = 0; i < argc; i++) { - int r = 0; -- int ret = 0; -+ int ret = -1; - log_debug("Handle module '%s'", argv[i]); - - if (argv[i][0] == '/') { -@@ -1296,7 +1297,14 @@ static int install_modules(int argc, char **argv) - } - kmod_list_foreach(itr, modlist) { - mod = kmod_module_get_module(itr); -- ret += install_module(mod); -+ r = install_module(mod); -+ kmod_module_unref(mod); -+ if ((r < 0) && !arg_optional) { -+ if (!arg_silent) -+ log_error("ERROR: installing module '%s'", modname); -+ return -ENOENT; -+ }; -+ ret = ( ret == 0 ? 0 : r ); - } - kmod_module_unref_list(modlist); - modlist = 0; -@@ -1341,40 +1349,55 @@ static int install_modules(int argc, char **argv) - log_debug("Handling %s", ftsent->fts_accpath); - r = kmod_module_new_from_path(ctx, ftsent->fts_accpath, &mod_o); - if (r < 0) { -- log_debug("Failed to lookup modules path '%s': %m", ftsent->fts_accpath); -+ log_debug("Failed to lookup modules path '%s': %m", -+ ftsent->fts_accpath); -+ if (!arg_optional) { -+ return -ENOENT; -+ } - continue; - } --#if 1 -+ - /* Check, if we have to load another module with that name instead */ - modname = kmod_module_get_name(mod_o); - if (!modname) { - log_error("Failed to get name for module '%s'", ftsent->fts_accpath); -+ if (!arg_optional) { -+ return -ENOENT; -+ } - continue; - } - r = kmod_module_new_from_lookup(ctx, modname, &modlist); - kmod_module_unref(mod_o); - if (r < 0) { -- log_error("2 Failed to lookup alias '%s': %m", modname); -+ log_error("Failed to lookup alias '%s': %m", modname); - kmod_module_unref_list(modlist); -+ if (!arg_optional) { -+ return -ENOENT; -+ } - continue; - } - if (!modlist) { -- log_error("Failed to find module '%s' %s", modname, ftsent->fts_accpath); -+ log_error("Failed to find module '%s' %s", modname, -+ ftsent->fts_accpath); - kmod_module_unref_list(modlist); -+ if (!arg_optional) { -+ return -ENOENT; -+ } - continue; - } - kmod_list_foreach(itr, modlist) { - mod = kmod_module_get_module(itr); -- ret += install_module(mod); -+ r = install_module(mod); - kmod_module_unref(mod); -+ if ((r < 0) && !arg_optional) { -+ if (!arg_silent) -+ log_error("ERROR: installing module '%s'", modname); -+ return -ENOENT; -+ }; -+ ret = ( ret == 0 ? 0 : r ); - } - kmod_module_unref_list(modlist); - modlist = 0; --#else -- ret += install_module(mod_o); -- kmod_module_unref(mod_o); --#endif -- - } - if (errno) { - log_error("FTS ERROR: %m"); -@@ -1414,8 +1437,14 @@ static int install_modules(int argc, char **argv) - } - kmod_list_foreach(itr, modlist) { - mod = kmod_module_get_module(itr); -- ret += install_module(mod); -+ r = install_module(mod); - kmod_module_unref(mod); -+ if ((r < 0) && !arg_optional) { -+ if (!arg_silent) -+ log_error("ERROR: installing '%s'", argv[i]); -+ return -ENOENT; -+ }; -+ ret = ( ret == 0 ? 0 : r ); - } - kmod_module_unref_list(modlist); - modlist = 0; -@@ -1427,6 +1456,7 @@ static int install_modules(int argc, char **argv) - return EXIT_FAILURE; - } - } -+ - return EXIT_SUCCESS; - } - diff --git a/0052-dracut-init.sh-beautify-instmods.patch b/0052-dracut-init.sh-beautify-instmods.patch deleted file mode 100644 index 29033d8..0000000 --- a/0052-dracut-init.sh-beautify-instmods.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 9bb030c5d8189f42eef3a0a881a361ce811414b0 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 13 Apr 2016 13:57:03 +0200 -Subject: [PATCH] dracut-init.sh: beautify instmods() - ---- - dracut-init.sh | 31 ++++++++++++++++++++++++++++--- - 1 file changed, 28 insertions(+), 3 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index e26d97a..8d1d9fa 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -1001,22 +1001,47 @@ instmods() { - local _optional="-o" - local _silent - local _ret -+ - [[ $no_kernel = yes ]] && return -+ - if [[ $1 = '-c' ]]; then -- _optional="" -+ unset _optional - shift - fi - if [[ $1 = '-s' ]]; then - _silent=1 - shift - fi -+ - if (($# == 0)); then - read -r -d '' -a args - set -- "${args[@]}" - fi -- $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${_optional:+-o} ${_silent:+--silent} ${srcmods:+--kerneldir "$srcmods"} -m "$@" -+ -+ $DRACUT_INSTALL \ -+ ${initdir:+-D "$initdir"} \ -+ ${loginstall:+-L "$loginstall"} \ -+ ${hostonly:+-H} \ -+ ${omit_drivers:+-N "$omit_drivers"} \ -+ ${srcmods:+--kerneldir "$srcmods"} \ -+ ${_optional:+-o} \ -+ ${_silent:+--silent} \ -+ -m "$@" - _ret=$? -- (($_ret != 0)) && [[ -z "$_silent" ]] && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${_optional:+-o} ${_silent:+--silent} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || : -+ -+ if (($_ret != 0)) && [[ -z "$_silent" ]]; then -+ derror "FAILED: " \ -+ $DRACUT_INSTALL \ -+ ${initdir:+-D "$initdir"} \ -+ ${loginstall:+-L "$loginstall"} \ -+ ${hostonly:+-H} \ -+ ${omit_drivers:+-N "$omit_drivers"} \ -+ ${srcmods:+--kerneldir "$srcmods"} \ -+ ${_optional:+-o} \ -+ ${_silent:+--silent} \ -+ -m "$@" -+ fi -+ - [[ "$optional" ]] && return 0 - return $_ret - } diff --git a/0053-plymouth-plymouth-pretrigger.sh-also-trigger-acpi-su.patch b/0053-plymouth-plymouth-pretrigger.sh-also-trigger-acpi-su.patch deleted file mode 100644 index 452e082..0000000 --- a/0053-plymouth-plymouth-pretrigger.sh-also-trigger-acpi-su.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7ef36aef28eb8f770f3c104d8e88b3b991170f3a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 6 Apr 2016 10:24:58 +0200 -Subject: [PATCH] plymouth/plymouth-pretrigger.sh: also trigger acpi subsystem - -Trigger the acpi subsystem. This will ensure hv_vmbus gets loaded before -plymouth is started, which will make the graphics device become -available before plymouth is started too (and the keyboard ! which might -also be important for plymouth in some setups). - -https://bugzilla.redhat.com/show_bug.cgi?id=1218130 -(cherry picked from commit d2846fdcce9b8de0edecdf0e06a4b86fc8de542c) ---- - modules.d/50plymouth/plymouth-pretrigger.sh | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/modules.d/50plymouth/plymouth-pretrigger.sh b/modules.d/50plymouth/plymouth-pretrigger.sh -index c3a97f2..6458d78 100755 ---- a/modules.d/50plymouth/plymouth-pretrigger.sh -+++ b/modules.d/50plymouth/plymouth-pretrigger.sh -@@ -5,9 +5,14 @@ if type plymouthd >/dev/null 2>&1 && [ -z "$DRACUT_SYSTEMD" ]; then - # first trigger graphics subsystem - udevadm trigger --action=add --attr-match=class=0x030000 >/dev/null 2>&1 - # first trigger graphics and tty subsystem -- udevadm trigger --action=add --subsystem-match=graphics --subsystem-match=drm --subsystem-match=tty >/dev/null 2>&1 -+ udevadm trigger --action=add \ -+ --subsystem-match=graphics \ -+ --subsystem-match=drm \ -+ --subsystem-match=tty \ -+ --subsystem-match=acpi \ -+ >/dev/null 2>&1 - -- udevadm settle --timeout=30 2>&1 | vinfo -+ udevadm settle --timeout=180 2>&1 | vinfo - - info "Starting plymouth daemon" - mkdir -m 0755 /run/plymouth diff --git a/0054-dracut-install-add-help-documentation.patch b/0054-dracut-install-add-help-documentation.patch deleted file mode 100644 index f92a934..0000000 --- a/0054-dracut-install-add-help-documentation.patch +++ /dev/null @@ -1,106 +0,0 @@ -From b14b039e9066f51c3c4cee2123f23f7822dd8e13 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Apr 2016 11:47:50 +0200 -Subject: [PATCH] dracut-install: add --help documentation - ---- - install/dracut-install.c | 73 +++++++++++++++++++++++------------------------- - 1 file changed, 35 insertions(+), 38 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index f414f30..bef08da 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -17,7 +17,7 @@ - along with this program; If not, see . - */ - --#define PROGRAM_VERSION_STRING "1" -+#define PROGRAM_VERSION_STRING "2" - - #ifndef _GNU_SOURCE - #define _GNU_SOURCE -@@ -719,49 +719,46 @@ static void item_free(char *i) - - static void usage(int status) - { -- /* */ -+ /* */ - printf("Usage: %s -D DESTROOTDIR [OPTION]... -a SOURCE...\n" - "or: %s -D DESTROOTDIR [OPTION]... SOURCE DEST\n" -+ "or: %s -D DESTROOTDIR [OPTION]... -m KERNELMODULE [KERNELMODULE …]\n" - "\n" - "Install SOURCE to DEST in DESTROOTDIR with all needed dependencies.\n" - "\n" -- " -D --destrootdir Install all files to DESTROOTDIR as the root\n" -- " -a --all Install all SOURCE arguments to DESTROOTDIR\n" -- " -o --optional If SOURCE does not exist, do not fail\n" -- " -d --dir SOURCE is a directory\n" -- " -l --ldd Also install shebang executables and libraries\n" -- " -L --logdir Log files, which were installed from the host to \n" -- " -R --resolvelazy Only install shebang executables and libraries\n" -- " for all SOURCE files\n" -- " -H --hostonly Mark all SOURCE files as hostonly\n\n" -- " -f --fips Also install all '.SOURCE.hmac' files\n" -- " -v --verbose Show more output\n" -- " --debug Show debug output\n" -- " --version Show package version\n" -- " -h --help Show this help\n" -+ " KERNELMODULE can have the format:\n" -+ " with a leading /\n" -+ " =[/…] like '=drivers/hid'\n" -+ " \n" - "\n" -- "Example:\n" -- "# mkdir -p /var/tmp/test-root\n" -- "# %s -D /var/tmp/test-root --ldd -a sh tr\n" -- "# tree /var/tmp/test-root\n" -- "/var/tmp/test-root\n" -- "|-- lib64 -> usr/lib64\n" -- "`-- usr\n" -- " |-- bin\n" -- " | |-- bash\n" -- " | |-- sh -> bash\n" -- " | `-- tr\n" -- " `-- lib64\n" -- " |-- ld-2.15.90.so\n" -- " |-- ld-linux-x86-64.so.2 -> ld-2.15.90.so\n" -- " |-- libc-2.15.90.so\n" -- " |-- libc.so\n" -- " |-- libc.so.6 -> libc-2.15.90.so\n" -- " |-- libdl-2.15.90.so\n" -- " |-- libdl.so -> libdl-2.15.90.so\n" -- " |-- libdl.so.2 -> libdl-2.15.90.so\n" -- " |-- libtinfo.so.5 -> libtinfo.so.5.9\n" -- " `-- libtinfo.so.5.9\n", program_invocation_short_name, program_invocation_short_name, -+ " -D --destrootdir Install all files to DESTROOTDIR as the root\n" -+ " -a --all Install all SOURCE arguments to DESTROOTDIR\n" -+ " -o --optional If SOURCE does not exist, do not fail\n" -+ " -d --dir SOURCE is a directory\n" -+ " -l --ldd Also install shebang executables and libraries\n" -+ " -L --logdir Log files, which were installed from the host to \n" -+ " -R --resolvelazy Only install shebang executables and libraries\n" -+ " for all SOURCE files\n" -+ " -H --hostonly Mark all SOURCE files as hostonly\n\n" -+ " -f --fips Also install all '.SOURCE.hmac' files\n" -+ "\n" -+ " --module,-m Install kernel modules, instead of files\n" -+ " --kerneldir Specify the kernel module directory\n" -+ " --firmwaredirs Specify the firmware directory search path with : separation\n" -+ " --silent Don't display error messages for kernel module install\n" -+ " -o --optional If kernel module does not exist, do not fail\n" -+ " -p --mod-filter-path Filter kernel modules by path regexp\n" -+ " -P --mod-filter-nopath Exclude kernel modules by path regexp\n" -+ " -s --mod-filter-symbol Filter kernel modules by symbol regexp\n" -+ " -S --mod-filter-nosymbol Exclude kernel modules by symbol regexp\n" -+ " -N --mod-filter-noname Exclude kernel modules by name regexp\n" -+ "\n" -+ " -v --verbose Show more output\n" -+ " --debug Show debug output\n" -+ " --version Show package version\n" -+ " -h --help Show this help\n" -+ "\n", -+ program_invocation_short_name, program_invocation_short_name, - program_invocation_short_name); - exit(status); - } diff --git a/0055-NEWS-update-for-045.patch b/0055-NEWS-update-for-045.patch deleted file mode 100644 index e8eac61..0000000 --- a/0055-NEWS-update-for-045.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 6fcd5c8e3b539de4eeccddab2e5da6ee260fbf0b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Apr 2016 11:53:14 +0200 -Subject: [PATCH] NEWS: update for 045 - ---- - NEWS | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 84 insertions(+) - -diff --git a/NEWS b/NEWS -index ca68302..6d1cd0a 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,87 @@ -+dracut-045 -+========== -+ -+dracut now requires libkmod for the dracut-install binary helper. -+ -+dracut.sh: -+- restorecon final image file -+- fail hard, if we find modules and modules.dep is missing -+ -+dracut-functions.sh: -+- fix check_vol_slaves() volume group name stripping -+ -+dracut-install: -+- catch ldd message "cannot execute binary file" -+- added kernel module handling with libkmod -+ Added parameters: -+ --module,-m -+ --mod-filter-path, -p -+ --mod-filter-nopath, -P -+ --mod-filter-symbol, -s -+ --mod-filter-nosymbol, -S -+ --mod-filter-noname, -N -+ --silent -+ --kerneldir -+ --firmwaredirs -+ -+lsinitrd: -+- new option "--unpack" -+- new option "--unpackearly" -+- and "--verbose" -+ -+general initramfs fixes: -+- don't remove 99-cmdline-ask on 'hostonly' cleanup -+- call dracut-cmdline-ask.service, if /etc/cmdline.d/*.conf exists -+- break at switch_root only for bare rd.break -+ -+dmsquash-live: -+- fixed livenet-generator execution flag -+ and include only, if systemd is used -+- fixed dmsquash-live-root.sh for cases where the fstype of the liveimage is squashfs -+- fixed typo for rootfs.img -+ -+dmraid: -+- added "nowatch" option in udev rule, otherwise udev would reread partitions for raid members -+ -+shutdown: -+- handle readonly /run on shutdown -+ -+kernel-modules: -+- add all HID drivers, regardless of hostonly mode -+ people swap keyboards sometimes and should be able to enter their disk password -+- add usb-storage -+ To save the rdsosreport.txt to a USB stick, the usb-storage module is needed. -+ -+systemd: -+- add /etc/machine-info -+- fixed systemd-escape call for names beginning with "-" -+ -+network: -+- fix carrier detection -+- correctly set mac address for ip=...:: -+- fixed vlan, bonding, bridging, team logic -+ call ifup for the slaves and assemble afterwards -+- add mtu to list of variables to store in override -+- for rd.neednet=0 a bootdev is not needed anymore -+- dhclient-script.sh: add classless-static-routes support -+ -+nbd: -+- add systemd generator -+- use export names instead of port numbers, because port number based -+ exports are deprecated and were removed. -+ -+fcoe: -+- no more /dev/shm state copying -+ -+multipath: -+- check all /dev/mapper devices if they are multipath devices, not only mpath* -+ -+fips: -+- fixed .hmac installation in FIPS mode -+ -+plymouth: -+- also trigger the acpi subsystem -+ - dracut-044 - ========== - creation: diff --git a/0056-Revert-fcoe-no-need-to-copy-lldpad-state.patch b/0056-Revert-fcoe-no-need-to-copy-lldpad-state.patch deleted file mode 100644 index 9620eae..0000000 --- a/0056-Revert-fcoe-no-need-to-copy-lldpad-state.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b99e72427b517dea0d91d15fe43cf0a37420af36 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Apr 2016 13:38:24 +0200 -Subject: [PATCH] Revert "fcoe: no need to copy lldpad state" - -This reverts commit e93ff1cf9aac8f97131b3101a5da240ce5f45239. - -seems like the file has to be copied back in the real root. - -https://bugzilla.redhat.com/show_bug.cgi?id=1246217 ---- - modules.d/95fcoe/cleanup-fcoe.sh | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh -index 856e2d9..5ff4d05 100644 ---- a/modules.d/95fcoe/cleanup-fcoe.sh -+++ b/modules.d/95fcoe/cleanup-fcoe.sh -@@ -2,8 +2,9 @@ - # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- - # ex: ts=8 sw=4 sts=4 et filetype=sh - --if [ -z "$DRACUT_SYSTEMD" ]; then -- if [ -e /var/run/lldpad.pid ]; then -- lldpad -k -- fi -+if [ -e /var/run/lldpad.pid ]; then -+ lldpad -k -+ mkdir -m 0755 -p /run/initramfs/state/dev/shm -+ cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1 -+ echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab - fi diff --git a/0057-base-init.sh-don-t-mount-run-with-noexec-if-the-init.patch b/0057-base-init.sh-don-t-mount-run-with-noexec-if-the-init.patch deleted file mode 100644 index 03171f2..0000000 --- a/0057-base-init.sh-don-t-mount-run-with-noexec-if-the-init.patch +++ /dev/null @@ -1,32 +0,0 @@ -From db7d61cff7f5a5be3a56cff39dc278f004b9c461 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Apr 2016 14:56:37 +0200 -Subject: [PATCH] base/init.sh: don't mount /run with noexec, if the initramfs - lives there - -If the initramfs was built with prefix=/run/... /run can't be mounted -with noexec, otherwise no binary can be run. - -Guard against it by looking where /bin/sh is really located. ---- - modules.d/99base/init.sh | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh -index bd7ef70..a563393 100755 ---- a/modules.d/99base/init.sh -+++ b/modules.d/99base/init.sh -@@ -64,7 +64,12 @@ fi - - if ! ismounted /run; then - mkdir -m 0755 /newrun -- mount -t tmpfs -o mode=0755,noexec,nosuid,nodev,strictatime tmpfs /newrun >/dev/null -+ if ! str_starts "$(readlink -f /bin/sh)" "/run/"; then -+ mount -t tmpfs -o mode=0755,noexec,nosuid,nodev,strictatime tmpfs /newrun >/dev/null -+ else -+ # the initramfs binaries are located in /run, so don't mount it with noexec -+ mount -t tmpfs -o mode=0755,nosuid,nodev,strictatime tmpfs /newrun >/dev/null -+ fi - cp -a /run/* /newrun >/dev/null 2>&1 - mount --move /newrun /run - rm -fr -- /newrun diff --git a/0058-kate-config.patch b/0058-kate-config.patch deleted file mode 100644 index b0cdc70..0000000 --- a/0058-kate-config.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2db14045c143e7b0709bed78483a208d2df69ab3 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Apr 2016 10:27:48 +0200 -Subject: [PATCH] kate config - ---- - .kateproject | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/.kateproject b/.kateproject -index 7a84755..0a0d5da 100644 ---- a/.kateproject -+++ b/.kateproject -@@ -1,8 +1,8 @@ - { -- "name": "Kate" -+ "name": "Dracut" - , "files": [ { "git": 1 } ] - , "build": { -- "directory": "build" -+ "directory": "./" - , "build": "make -j $(getconf _NPROCESSORS_ONLN) all" - , "clean": "make clean" - } diff --git a/0059-95resume-avoid-possible-symbolic-link-creation-error.patch b/0059-95resume-avoid-possible-symbolic-link-creation-error.patch deleted file mode 100644 index 738d655..0000000 --- a/0059-95resume-avoid-possible-symbolic-link-creation-error.patch +++ /dev/null @@ -1,24 +0,0 @@ -From f3f019d9471bfc93ce8979c6cdcc0de81d0941e2 Mon Sep 17 00:00:00 2001 -From: Guido Trentalancia -Date: Fri, 15 Apr 2016 10:38:04 +0200 -Subject: [PATCH] 95resume: avoid possible symbolic link creation error on - bootup - -Avoid symbolic link creation error. ---- - modules.d/95resume/parse-resume.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95resume/parse-resume.sh b/modules.d/95resume/parse-resume.sh -index 3b97e51..a3beb95 100755 ---- a/modules.d/95resume/parse-resume.sh -+++ b/modules.d/95resume/parse-resume.sh -@@ -67,7 +67,7 @@ if ! getarg noresume; then - printf -- '%s\n' ' RUN+="/sbin/initqueue --finished --unique --name 00resume echo %M:%m > /sys/power/resume"' - } >> /etc/udev/rules.d/99-resume.rules - -- printf '[ -e "%s" ] && { ln -s "%s" /dev/resume 2> /dev/null; rm -f -- "$job" "%s/initqueue/timeout/resume.sh"; }\n' \ -+ printf '[ -e "%s" ] && { ln -fs "%s" /dev/resume 2> /dev/null; rm -f -- "$job" "%s/initqueue/timeout/resume.sh"; }\n' \ - "$resume" "$resume" "$hookdir" >> $hookdir/initqueue/settled/resume.sh - - { diff --git a/0060-watchdog-module-setup.sh-rewrite.patch b/0060-watchdog-module-setup.sh-rewrite.patch deleted file mode 100644 index 57e3b9b..0000000 --- a/0060-watchdog-module-setup.sh-rewrite.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 74e2d1e69f5527ab31b01fc19f67143d1f091980 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Apr 2016 11:27:20 +0200 -Subject: [PATCH] watchdog/module-setup.sh: rewrite - -- use local variables with _ -- use associative array for the kernel modules -- install emergency hook even in the systemd case -- follow device path until /sys is reached -- set kernel version for modprobe checking ---- - modules.d/04watchdog/module-setup.sh | 92 ++++++++++++++++++++---------------- - 1 file changed, 51 insertions(+), 41 deletions(-) - -diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh -index c9da148..04686f6 100755 ---- a/modules.d/04watchdog/module-setup.sh -+++ b/modules.d/04watchdog/module-setup.sh -@@ -14,54 +14,64 @@ depends() { - install() { - # Do not add watchdog hooks if systemd module is included - # In that case, systemd will manage watchdog kick -- if dracut_module_included "systemd"; then -- return -+ if ! dracut_module_included "systemd"; then -+ inst_hook cmdline 00 "$moddir/watchdog.sh" -+ inst_hook cmdline 50 "$moddir/watchdog.sh" -+ inst_hook pre-trigger 00 "$moddir/watchdog.sh" -+ inst_hook initqueue 00 "$moddir/watchdog.sh" -+ inst_hook mount 00 "$moddir/watchdog.sh" -+ inst_hook mount 50 "$moddir/watchdog.sh" -+ inst_hook mount 99 "$moddir/watchdog.sh" -+ inst_hook pre-pivot 00 "$moddir/watchdog.sh" -+ inst_hook pre-pivot 99 "$moddir/watchdog.sh" -+ inst_hook cleanup 00 "$moddir/watchdog.sh" -+ inst_hook cleanup 99 "$moddir/watchdog.sh" - fi -- inst_hook cmdline 00 "$moddir/watchdog.sh" -- inst_hook cmdline 50 "$moddir/watchdog.sh" -- inst_hook pre-trigger 00 "$moddir/watchdog.sh" -- inst_hook initqueue 00 "$moddir/watchdog.sh" -- inst_hook mount 00 "$moddir/watchdog.sh" -- inst_hook mount 50 "$moddir/watchdog.sh" -- inst_hook mount 99 "$moddir/watchdog.sh" -- inst_hook pre-pivot 00 "$moddir/watchdog.sh" -- inst_hook pre-pivot 99 "$moddir/watchdog.sh" -- inst_hook cleanup 00 "$moddir/watchdog.sh" -- inst_hook cleanup 99 "$moddir/watchdog.sh" - inst_hook emergency 02 "$moddir/watchdog-stop.sh" - inst_multiple -o wdctl - } - - installkernel() { -+ local -A _drivers -+ local _alldrivers _active _wdtdrv _wdtppath _dir - [[ -d /sys/class/watchdog/ ]] || return -- wdtcmdline="" -- for dir in /sys/class/watchdog/*; do -- [[ -d "$dir" ]] || continue -- [[ -f "$dir/state" ]] || continue -- active=$(< "$dir/state") -- ! [[ $hostonly ]] || [[ "$active" = "active" ]] || continue -- # device/modalias will return driver of this device -- wdtdrv=$(< "$dir/device/modalias") -- # There can be more than one module represented by same -- # modalias. Currently load all of them. -- # TODO: Need to find a way to avoid any unwanted module -- # represented by modalias -- wdtdrv=$(modprobe -R $wdtdrv) -- instmods $wdtdrv -- wdtcmdline="$wdtcmdline$(echo $wdtdrv | tr " " ",")," -- # however in some cases, we also need to check that if there is -- # a specific driver for the parent bus/device. In such cases -- # we also need to enable driver for parent bus/device. -- wdtppath=$(readlink -f "$dir/device/..") -- while [ -f "$wdtppath/modalias" ] -- do -- wdtpdrv=$(< "$wdtppath/modalias") -- wdtpdrv=$(modprobe -R $wdtpdrv) -- instmods $wdtpdrv -- wdtcmdline="$wdtcmdline$(echo $wdtpdrv | tr " " ",")," -- wdtppath=$(readlink -f "$wdtppath/..") -- done -+ for _dir in /sys/class/watchdog/*; do -+ [[ -d "$_dir" ]] || continue -+ [[ -f "$_dir/state" ]] || continue -+ _active=$(< "$_dir/state") -+ ! [[ $hostonly ]] || [[ "$_active" = "active" ]] || continue -+ # device/modalias will return driver of this device -+ _wdtdrv=$(< "$_dir/device/modalias") -+ # There can be more than one module represented by same -+ # modalias. Currently load all of them. -+ # TODO: Need to find a way to avoid any unwanted module -+ # represented by modalias -+ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) -+ if [[ $_wdtdrv ]]; then -+ instmods $_wdtdrv -+ for i in $_wdtdrv; do -+ _drivers[$i]=1 -+ done -+ fi -+ # however in some cases, we also need to check that if there is -+ # a specific driver for the parent bus/device. In such cases -+ # we also need to enable driver for parent bus/device. -+ _wdtppath=$(readlink -f "$_dir/device/..") -+ while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do -+ _wdtppath=$(readlink -f "$_wdtppath/..") -+ [[ -f "$_wdtppath/modalias" ]] || continue -+ -+ _wdtdrv=$(< "$_wdtppath/modalias") -+ _wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null) -+ if [[ $_wdtdrv ]]; then -+ instmods $_wdtdrv -+ for i in $_wdtdrv; do -+ _drivers[$i]=1 -+ done -+ fi -+ done - done - # ensure that watchdog module is loaded as early as possible -- [[ $wdtcmdline = "" ]] || echo "rd.driver.pre=$wdtcmdline" > ${initdir}/etc/cmdline.d/00-watchdog.conf -+ _alldrivers="${!_drivers[*]}" -+ [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf - } diff --git a/0061-drop-to-shell-on-die-if-rd.shell-1-is-set-explicitly.patch b/0061-drop-to-shell-on-die-if-rd.shell-1-is-set-explicitly.patch deleted file mode 100644 index a5931fc..0000000 --- a/0061-drop-to-shell-on-die-if-rd.shell-1-is-set-explicitly.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 9d74747f926d038f2e149d70a9c8f955861ab354 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Apr 2016 12:03:03 +0200 -Subject: [PATCH] drop to shell on die() if rd.shell=1 is set explicitly - ---- - modules.d/99base/dracut-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 0a0b1b9..48fc83d 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -457,7 +457,7 @@ die() { - - > /run/initramfs/.die - -- getargbool 0 "rd.debug=" && emergency_shell -+ getargbool 0 "rd.shell=" && emergency_shell - - if [ -n "$DRACUT_SYSTEMD" ]; then - systemctl --no-block --force halt diff --git a/0062-dracut_install-honor-silent-flag.patch b/0062-dracut_install-honor-silent-flag.patch deleted file mode 100644 index b7f356b..0000000 --- a/0062-dracut_install-honor-silent-flag.patch +++ /dev/null @@ -1,45 +0,0 @@ -From fa295f0bcde8c8d1205cf53ebe6e5dc46629200a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Apr 2016 15:25:27 +0200 -Subject: [PATCH] dracut_install: honor --silent flag - ---- - dracut-init.sh | 8 +++++++- - modules.d/50drm/module-setup.sh | 2 +- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index 8d1d9fa..1056a31 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -219,10 +219,16 @@ dracut_install() { - } - - dracut_instmods() { -+ local _silent=0; -+ local i; - [[ $no_kernel = yes ]] && return -+ for i in "$@"; do -+ [[ $i == "--silent" ]] && silent=1 -+ done -+ - $DRACUT_INSTALL \ - ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" -- (($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || : -+ (($? != 0)) && (($silent == 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || : - } - - inst_library() { -diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh -index 661dde9..6106d8c 100755 ---- a/modules.d/50drm/module-setup.sh -+++ b/modules.d/50drm/module-setup.sh -@@ -34,7 +34,7 @@ installkernel() { - if [[ $hostonly ]]; then - for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do - [[ -e $i ]] || continue -- if hostonly="" dracut_instmods -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i) 2>/dev/null; then -+ if hostonly="" dracut_instmods --silent -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i); then - if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then - hostonly='' instmods amdkfd - fi diff --git a/0063-dracut-install-make-use-of-_cleanup_-macros-and-impr.patch b/0063-dracut-install-make-use-of-_cleanup_-macros-and-impr.patch deleted file mode 100644 index f8019c2..0000000 --- a/0063-dracut-install-make-use-of-_cleanup_-macros-and-impr.patch +++ /dev/null @@ -1,418 +0,0 @@ -From eab32bda801e539c276f1b18e7c2b691eeab3d14 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Apr 2016 15:29:52 +0200 -Subject: [PATCH] dracut-install: make use of _cleanup_ macros and improve - hostonly check - -If a module is renamed or another module takes care of the old one, -all of the alias strings have to be checked against the current set of -loaded modules. - -This is still incomplete, because to be absolutely correct, all the -/sys/*...*/modalias files would have to be checked, if they match the -modules alias strings. ---- - install/dracut-install.c | 180 ++++++++++++++++++++++++++++++++++------------- - 1 file changed, 131 insertions(+), 49 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index bef08da..9a0d53f 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -66,6 +66,7 @@ static char *logfile = NULL; - FILE *logfile_f = NULL; - static Hashmap *items = NULL; - static Hashmap *items_failed = NULL; -+static Hashmap *modules_loaded = NULL; - static regex_t mod_filter_path; - static regex_t mod_filter_nopath; - static regex_t mod_filter_symbol; -@@ -79,6 +80,39 @@ static bool arg_mod_filter_noname = false; - - static int dracut_install(const char *src, const char *dst, bool isdir, bool resolvedeps, bool hashdst); - -+ -+ -+static inline void kmod_module_unref_listp(struct kmod_list **p) { -+ if (*p) -+ kmod_module_unref_list(*p); -+} -+#define _cleanup_kmod_module_unref_list_ _cleanup_(kmod_module_unref_listp) -+ -+static inline void kmod_module_info_free_listp(struct kmod_list **p) { -+ if (*p) -+ kmod_module_info_free_list(*p); -+} -+#define _cleanup_kmod_module_info_free_list_ _cleanup_(kmod_module_info_free_listp) -+ -+static inline void kmod_unrefp(struct kmod_ctx **p) { -+ kmod_unref(*p); -+} -+#define _cleanup_kmod_unref_ _cleanup_(kmod_unrefp) -+ -+static inline void kmod_module_dependency_symbols_free_listp(struct kmod_list **p) { -+ if (*p) -+ kmod_module_dependency_symbols_free_list(*p); -+} -+#define _cleanup_kmod_module_dependency_symbols_free_list_ _cleanup_(kmod_module_dependency_symbols_free_listp) -+ -+static inline void fts_closep(FTS **p) { -+ if (*p) -+ fts_close(*p); -+} -+#define _cleanup_fts_close_ _cleanup_(fts_closep) -+ -+ -+ - static size_t dir_len(char const *file) - { - size_t length; -@@ -1058,7 +1092,8 @@ static int install_all(int argc, char **argv) - - static int install_firmware(struct kmod_module *mod) - { -- struct kmod_list *l, *list = NULL; -+ struct kmod_list *l; -+ _cleanup_kmod_module_info_free_list_ struct kmod_list *list = NULL; - int ret; - - char **q; -@@ -1072,7 +1107,6 @@ static int install_firmware(struct kmod_module *mod) - kmod_list_foreach(l, list) { - const char *key = kmod_module_info_get_key(l); - const char *value = NULL; -- char *fwpath = NULL; - - if (!streq("firmware", key)) - continue; -@@ -1081,6 +1115,7 @@ static int install_firmware(struct kmod_module *mod) - log_debug("Firmware %s", value); - ret = -1; - STRV_FOREACH(q, firmwaredirs) { -+ _cleanup_free_ char *fwpath = NULL; - struct stat sb; - int r; - -@@ -1092,8 +1127,6 @@ static int install_firmware(struct kmod_module *mod) - - if (stat(fwpath, &sb) != 0) { - log_debug("stat(%s) != 0", fwpath); -- free(fwpath); -- fwpath = NULL; - continue; - } - -@@ -1111,7 +1144,8 @@ static int install_firmware(struct kmod_module *mod) - - static bool check_module_symbols(struct kmod_module *mod) - { -- struct kmod_list *itr, *deplist = NULL; -+ struct kmod_list *itr; -+ _cleanup_kmod_module_dependency_symbols_free_list_ struct kmod_list *deplist = NULL; - - if (!arg_mod_filter_symbol && !arg_mod_filter_nosymbol) - return true; -@@ -1128,7 +1162,6 @@ static bool check_module_symbols(struct kmod_module *mod) - const char *symbol = kmod_module_symbol_get_symbol(itr); - // log_debug("Checking symbol %s", symbol); - if (regexec(&mod_filter_nosymbol, symbol, 0, NULL, 0) == 0) { -- kmod_module_dependency_symbols_free_list(deplist); - log_debug("Module %s: symbol %s matched exclusion filter", kmod_module_get_name(mod), symbol); - return false; - } -@@ -1140,20 +1173,16 @@ static bool check_module_symbols(struct kmod_module *mod) - const char *symbol = kmod_module_dependency_symbol_get_symbol(itr); - // log_debug("Checking symbol %s", symbol); - if (regexec(&mod_filter_symbol, symbol, 0, NULL, 0) == 0) { -- kmod_module_dependency_symbols_free_list(deplist); - log_debug("Module %s: symbol %s matched inclusion filter", kmod_module_get_name(mod), symbol); - return true; - } - } -- kmod_module_dependency_symbols_free_list(deplist); - return false; - } - -- kmod_module_dependency_symbols_free_list(deplist); - return true; - } - -- - static bool check_module_path(const char *path) - { - if (arg_mod_filter_nopath && (regexec(&mod_filter_nopath, path, 0, NULL, 0) == 0)) { -@@ -1168,14 +1197,23 @@ static bool check_module_path(const char *path) - return true; - } - -+static bool check_module_hostonly(struct kmod_module *mod) -+{ -+ const char *name = kmod_module_get_name(mod); -+ -+ if (check_hashmap(modules_loaded, name)) -+ return true; -+ -+ return false; -+} -+ - static int install_module(struct kmod_module *mod) - { - int ret = 0; -- int state; -- struct kmod_list *itr, *modlist = NULL; -+ struct kmod_list *itr; -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; - const char *path = NULL; - const char *name = NULL; -- state = kmod_module_get_initstate(mod); - - name = kmod_module_get_name(mod); - if (arg_mod_filter_noname && (regexec(&mod_filter_noname, name, 0, NULL, 0) == 0)) { -@@ -1183,7 +1221,7 @@ static int install_module(struct kmod_module *mod) - return 0; - } - -- if (arg_hostonly && (state != KMOD_MODULE_BUILTIN) && (state != KMOD_MODULE_LIVE)) { -+ if (arg_hostonly && ! check_module_hostonly(mod)) { - log_debug("dracut_install '%s' not hostonly", name); - return 0; - } -@@ -1232,15 +1270,17 @@ static int install_module(struct kmod_module *mod) - } - kmod_module_unref(mod); - } -- kmod_module_unref_list(modlist); - - return ret; - } - - static int install_modules(int argc, char **argv) - { -- struct kmod_ctx *ctx = NULL; -- struct kmod_list *itr, *modlist = NULL; -+ _cleanup_kmod_unref_ struct kmod_ctx *ctx = NULL; -+ struct kmod_list *loaded_list = NULL; -+ struct kmod_list *itr, *l; -+ int err; -+ - struct kmod_module *mod = NULL, *mod_o = NULL; - - const char *modname = NULL; -@@ -1248,12 +1288,48 @@ static int install_modules(int argc, char **argv) - - ctx = kmod_new(kerneldir, NULL); - -+ err = kmod_module_new_from_loaded(ctx, &loaded_list); -+ if (err < 0) { -+ errno = err; -+ log_error("Could not get list of loaded modules: %m"); -+ return err; -+ } -+ -+ kmod_list_foreach(itr, loaded_list) { -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; -+ -+ struct kmod_module *mod = kmod_module_get_module(itr); -+ char *name = strdup(kmod_module_get_name(mod)); -+ hashmap_put(modules_loaded, name, name); -+ kmod_module_unref(mod); -+ -+ /* also put the modules from the new kernel in the hashmap, -+ * which resolve the name as an alias, in case a kernel module is -+ * renamed. -+ */ -+ err = kmod_module_new_from_lookup(ctx, name, &modlist); -+ if (err < 0) -+ continue; -+ if (!modlist) -+ continue; -+ kmod_list_foreach(l, modlist) { -+ mod = kmod_module_get_module(l); -+ char *name = strdup(kmod_module_get_name(mod)); -+ hashmap_put(modules_loaded, name, name); -+ kmod_module_unref(mod); -+ } -+ } -+ kmod_module_unref_list(loaded_list); -+ - for (i = 0; i < argc; i++) { - int r = 0; - int ret = -1; -+ - log_debug("Handle module '%s'", argv[i]); - - if (argv[i][0] == '/') { -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; -+ - r = kmod_module_new_from_path(ctx, argv[i], &mod_o); - if (r < 0) { - log_debug("Failed to lookup modules path '%s': %m", argv[i]); -@@ -1263,6 +1339,7 @@ static int install_modules(int argc, char **argv) - } - /* Check, if we have to load another module with that name instead */ - modname = kmod_module_get_name(mod_o); -+ - if (!modname) { - if (!arg_optional) { - if (!arg_silent) -@@ -1272,8 +1349,11 @@ static int install_modules(int argc, char **argv) - log_info("Failed to get name for module '%s'", argv[i]); - continue; - } -+ - r = kmod_module_new_from_lookup(ctx, modname, &modlist); - kmod_module_unref(mod_o); -+ mod_o = NULL; -+ - if (r < 0) { - if (!arg_optional) { - if (!arg_silent) -@@ -1303,37 +1383,38 @@ static int install_modules(int argc, char **argv) - }; - ret = ( ret == 0 ? 0 : r ); - } -- kmod_module_unref_list(modlist); -- modlist = 0; - } else if (argv[i][0] == '=') { -- char *path1, *path2, *path3; -- FTS *fts; -+ _cleanup_free_ char *path1 = NULL, *path2 = NULL, *path3 = NULL; -+ _cleanup_fts_close_ FTS *fts = NULL; -+ - log_debug("Handling =%s", &argv[i][1]); - /* FIXME and add more paths*/ -- { -- int r; -- r = asprintf(&path2, "%s/kernel/%s", kerneldir, &argv[i][1]); -- if (r < 0) { -- log_error("Out of memory!"); -- exit(EXIT_FAILURE); -- } -+ r = asprintf(&path2, "%s/kernel/%s", kerneldir, &argv[i][1]); -+ if (r < 0) { -+ log_error("Out of memory!"); -+ exit(EXIT_FAILURE); -+ } - -- r = asprintf(&path1, "%s/extra/%s", kerneldir, &argv[i][1]); -- if (r < 0) { -- log_error("Out of memory!"); -- exit(EXIT_FAILURE); -- } -+ r = asprintf(&path1, "%s/extra/%s", kerneldir, &argv[i][1]); -+ if (r < 0) { -+ log_error("Out of memory!"); -+ exit(EXIT_FAILURE); -+ } - -- r = asprintf(&path3, "%s/updates/%s", kerneldir, &argv[i][1]); -- if (r < 0) { -- log_error("Out of memory!"); -- exit(EXIT_FAILURE); -- } -+ r = asprintf(&path3, "%s/updates/%s", kerneldir, &argv[i][1]); -+ if (r < 0) { -+ log_error("Out of memory!"); -+ exit(EXIT_FAILURE); -+ } - -+ { - char *paths[] = { path1, path2, path3, NULL }; - fts = fts_open(paths, FTS_COMFOLLOW|FTS_NOCHDIR|FTS_NOSTAT|FTS_LOGICAL, NULL); - } -+ - for (FTSENT *ftsent = fts_read(fts); ftsent != NULL; ftsent = fts_read(fts)) { -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; -+ - if((ftsent->fts_info == FTS_D) && !check_module_path(ftsent->fts_accpath)) { - fts_set(fts, ftsent, FTS_SKIP); - log_debug("Skipping %s", ftsent->fts_accpath); -@@ -1356,6 +1437,7 @@ static int install_modules(int argc, char **argv) - - /* Check, if we have to load another module with that name instead */ - modname = kmod_module_get_name(mod_o); -+ - if (!modname) { - log_error("Failed to get name for module '%s'", ftsent->fts_accpath); - if (!arg_optional) { -@@ -1365,18 +1447,19 @@ static int install_modules(int argc, char **argv) - } - r = kmod_module_new_from_lookup(ctx, modname, &modlist); - kmod_module_unref(mod_o); -+ mod_o = NULL; -+ - if (r < 0) { - log_error("Failed to lookup alias '%s': %m", modname); -- kmod_module_unref_list(modlist); - if (!arg_optional) { - return -ENOENT; - } - continue; - } -+ - if (!modlist) { - log_error("Failed to find module '%s' %s", modname, - ftsent->fts_accpath); -- kmod_module_unref_list(modlist); - if (!arg_optional) { - return -ENOENT; - } -@@ -1393,18 +1476,14 @@ static int install_modules(int argc, char **argv) - }; - ret = ( ret == 0 ? 0 : r ); - } -- kmod_module_unref_list(modlist); -- modlist = 0; - } - if (errno) { - log_error("FTS ERROR: %m"); - } -- fts_close(fts); -- free(path1); path1 = NULL; -- free(path2); path2 = NULL; -- free(path3); path3 = NULL; - } else { -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; - char *modname = argv[i]; -+ - if (endswith(modname, ".ko")) { - int len = strlen(modname); - modname[len-3]=0; -@@ -1443,8 +1522,6 @@ static int install_modules(int argc, char **argv) - }; - ret = ( ret == 0 ? 0 : r ); - } -- kmod_module_unref_list(modlist); -- modlist = 0; - } - - if ((ret != 0) && (!arg_optional)) { -@@ -1513,8 +1590,9 @@ int main(int argc, char **argv) - - items = hashmap_new(string_hash_func, string_compare_func); - items_failed = hashmap_new(string_hash_func, string_compare_func); -+ modules_loaded = hashmap_new(string_hash_func, string_compare_func); - -- if (!items || !items_failed) { -+ if (!items || !items_failed || !modules_loaded) { - log_error("Out of memory"); - r = EXIT_FAILURE; - goto finish; -@@ -1570,6 +1648,9 @@ int main(int argc, char **argv) - if (logfile_f) - fclose(logfile_f); - -+ while ((i = hashmap_steal_first(modules_loaded))) -+ item_free(i); -+ - while ((i = hashmap_steal_first(items))) - item_free(i); - -@@ -1578,6 +1659,7 @@ int main(int argc, char **argv) - - hashmap_free(items); - hashmap_free(items_failed); -+ hashmap_free(modules_loaded); - - free(destrootdir); - strv_free(firmwaredirs); diff --git a/0064-removed-obsolete-kernel-module-functions-and-host_mo.patch b/0064-removed-obsolete-kernel-module-functions-and-host_mo.patch deleted file mode 100644 index 990a1a2..0000000 --- a/0064-removed-obsolete-kernel-module-functions-and-host_mo.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 3f60444ec1bff8a57a2cf4ada238e782928890eb Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 15 Apr 2016 16:25:59 +0200 -Subject: [PATCH] removed obsolete kernel module functions and host_modules - variable - -module_is_host_only() -find_kernel_modules_by_path() -find_kernel_modules() ---- - dracut-init.sh | 54 ----------------------------------- - dracut.sh | 30 +------------------ - modules.d/90multipath/module-setup.sh | 2 +- - 3 files changed, 2 insertions(+), 84 deletions(-) - -diff --git a/dracut-init.sh b/dracut-init.sh -index 1056a31..a195c32 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -943,60 +943,6 @@ dracut_kernel_post() { - - } - --[[ "$kernel_current" ]] || export kernel_current=$(uname -r) -- --module_is_host_only() { -- local _mod=$1 -- local _modenc a i _k _s _v _aliases -- _mod=${_mod##*/} -- _mod=${_mod%.ko*} -- _modenc=${_mod//-/_} -- -- [[ " $add_drivers " == *\ ${_mod}\ * ]] && return 0 -- -- # check if module is loaded -- [[ ${host_modules["$_modenc"]} ]] && return 0 -- -- [[ "$kernel_current" ]] || export kernel_current=$(uname -r) -- -- if [[ "$kernel_current" != "$kernel" ]]; then -- # check if module is loadable on the current kernel -- # this covers the case, where a new module is introduced -- # or a module was renamed -- # or a module changed from builtin to a module -- -- if [[ -d /lib/modules/$kernel_current ]]; then -- # if the modinfo can be parsed, but the module -- # is not loaded, then we can safely return 1 -- modinfo -F filename "$_mod" &>/dev/null && return 1 -- fi -- -- # just install the module, better safe than sorry -- return 0 -- fi -- -- return 1 --} -- --find_kernel_modules_by_path () { -- local _OLDIFS -- -- [[ -f "$srcmods/modules.dep" ]] || return 0 -- -- _OLDIFS=$IFS -- IFS=: -- while read a rest || [ -n "$a" ]; do -- [[ $a = */$1/* ]] || [[ $a = updates/* ]] || continue -- printf "%s\n" "$srcmods/$a" -- done < "$srcmods/modules.dep" -- IFS=$_OLDIFS -- return 0 --} -- --find_kernel_modules () { -- find_kernel_modules_by_path drivers --} -- - instmods() { - # instmods [-c [-s]] [ ... ] - # instmods [-c [-s]] -diff --git a/dracut.sh b/dracut.sh -index aaeb0dc..8232fa4 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1101,8 +1101,6 @@ if (( ${#add_device_l[@]} )); then - push_host_devs "${add_device_l[@]}" - fi - --declare -A host_modules -- - if [[ $hostonly ]]; then - # in hostonly mode, determine all devices, which have to be accessed - # and examine them for filesystem types -@@ -1190,32 +1188,6 @@ if [[ $hostonly ]]; then - fi - done < /etc/fstab - fi -- -- # check /proc/modules -- while read m rest || [ -n "$m" ]; do -- host_modules["$m"]=1 -- done = 4.4, mpt2sas isn't loaded, -- # so it's not included. -- # Both ways result in an unbootable initrd. -- -- # also add aliases of loaded modules -- for mod in "${!host_modules[@]}"; do -- aliases=$(modinfo -F alias "$mod" 2>&1) -- for alias in $aliases; do -- host_modules["$alias"]=1 -- done -- # mod might be an alias in the target kernel, find the real module -- mod_filename=$(modinfo -k "$kernel" "$mod" -F filename) -- [ $? -ne 0 ] && continue -- host_modules["$(basename -s .ko "$mod_filename")"]=1 -- done - fi - - unset m -@@ -1302,7 +1274,7 @@ export initdir dracutbasedir \ - debug host_fs_types host_devs swap_devs sshkey add_fstab \ - DRACUT_VERSION udevdir prefix filesystems drivers \ - systemdutildir systemdsystemunitdir systemdsystemconfdir \ -- host_modules hostonly_cmdline loginstall \ -+ hostonly_cmdline loginstall \ - tmpfilesdir - - mods_to_load="" -diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh -index 0af777d..1676798 100755 ---- a/modules.d/90multipath/module-setup.sh -+++ b/modules.d/90multipath/module-setup.sh -@@ -41,7 +41,7 @@ depends() { - # called by dracut - cmdline() { - for m in scsi_dh_alua scsi_dh_emc scsi_dh_rdac ; do -- if module_is_host_only $m ; then -+ if grep -m 1 -q "$m" /proc/modules ; then - printf 'rd.driver.pre=%s ' "$m" - fi - done diff --git a/0065-watchdog-clean-return-of-installkernel.patch b/0065-watchdog-clean-return-of-installkernel.patch deleted file mode 100644 index c01ddca..0000000 --- a/0065-watchdog-clean-return-of-installkernel.patch +++ /dev/null @@ -1,21 +0,0 @@ -From fe83231e30d5bc94e090d02e65f0e3cbef20c6ac Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 18 Apr 2016 15:49:06 +0200 -Subject: [PATCH] watchdog: clean return of installkernel() - -return 0, otherwise if _alldrivers is empty, the return code is fail ---- - modules.d/04watchdog/module-setup.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh -index 04686f6..7b2685d 100755 ---- a/modules.d/04watchdog/module-setup.sh -+++ b/modules.d/04watchdog/module-setup.sh -@@ -74,4 +74,6 @@ installkernel() { - # ensure that watchdog module is loaded as early as possible - _alldrivers="${!_drivers[*]}" - [[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf -+ -+ return 0 - } diff --git a/0066-watchdog-start-traversing-the-device-tree-from-the-r.patch b/0066-watchdog-start-traversing-the-device-tree-from-the-r.patch deleted file mode 100644 index d21039d..0000000 --- a/0066-watchdog-start-traversing-the-device-tree-from-the-r.patch +++ /dev/null @@ -1,24 +0,0 @@ -From bf75218e45180b957192f08c3fa5d5b147b66c31 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 18 Apr 2016 15:50:42 +0200 -Subject: [PATCH] watchdog: start traversing the device tree from the right - directory - -start with the device subtree, not with the parent of it ---- - modules.d/04watchdog/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/04watchdog/module-setup.sh b/modules.d/04watchdog/module-setup.sh -index 7b2685d..7566d65 100755 ---- a/modules.d/04watchdog/module-setup.sh -+++ b/modules.d/04watchdog/module-setup.sh -@@ -56,7 +56,7 @@ installkernel() { - # however in some cases, we also need to check that if there is - # a specific driver for the parent bus/device. In such cases - # we also need to enable driver for parent bus/device. -- _wdtppath=$(readlink -f "$_dir/device/..") -+ _wdtppath=$(readlink -f "$_dir/device") - while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do - _wdtppath=$(readlink -f "$_wdtppath/..") - [[ -f "$_wdtppath/modalias" ]] || continue diff --git a/0067-dracut-10i18n-support-default-loadkeys-setfont-data-.patch b/0067-dracut-10i18n-support-default-loadkeys-setfont-data-.patch deleted file mode 100644 index a3f16e8..0000000 --- a/0067-dracut-10i18n-support-default-loadkeys-setfont-data-.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5f91ed0b5345e132d9fe1fa815bfd968778df5ea Mon Sep 17 00:00:00 2001 -From: Guido Trentalancia -Date: Fri, 15 Apr 2016 13:06:45 +0200 -Subject: [PATCH] dracut: 10i18n: support default loadkeys/setfont data paths - using symbolic links - -Avoid keymap/font not found error when loadkeys/setfont -are compiled with the default data directory path. - -Signed-off-by: Guido Trentalancia ---- - modules.d/10i18n/module-setup.sh | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh -index 9439875..9618aa7 100755 ---- a/modules.d/10i18n/module-setup.sh -+++ b/modules.d/10i18n/module-setup.sh -@@ -100,6 +100,13 @@ install() { - inst_rules ${moddir}/10-console.rules - inst_hook cmdline 20 "${moddir}/parse-i18n.sh" - fi -+ -+ if [[ ${kbddir} != "/usr/share" ]]; then -+ inst_dir /usr/share -+ for _src in $(eval echo {${KBDSUBDIRS}}); do -+ [ ! -e "${initdir}/usr/share/${_src}" ] && ln -s "${kbddir}/${_src}" "${initdir}/usr/share/${_src}" -+ done -+ fi - } - - install_all_kbd() { diff --git a/0068-network-dhcp-before-parsing-specified-dns-through-cm.patch b/0068-network-dhcp-before-parsing-specified-dns-through-cm.patch deleted file mode 100644 index 7a2f32c..0000000 --- a/0068-network-dhcp-before-parsing-specified-dns-through-cm.patch +++ /dev/null @@ -1,86 +0,0 @@ -From cf376023e6d0d4abd9816fa954bb917fc2557713 Mon Sep 17 00:00:00 2001 -From: Xunlei Pang -Date: Tue, 26 Apr 2016 18:05:10 +0800 -Subject: [PATCH] network: dhcp before parsing specified dns through cmdline - -I met a problem when passing kdump dns to dracut via "nameserver=x.x.x.x", -the dns I provided didn't appear in the "/etc/resolv.conf". - -After some debugging, found that when setup dhcp DNS, in setup_interface() -and setup_interface6(), it has: - echo "search $search $domain" > /tmp/net.$netif.resolv.conf - -So if "$search $domain" isn't NULL(this is ture in my kdump environment), -the dns contents(that is, dns1, dns2, nameserver) in "ifup" before dhcp -will be discarded. - -This patch addresses it by handling dhcp first. In fact this is also the -way the NetworkManager in 1st kernel works. - -Signed-off-by: Xunlei Pang ---- - modules.d/40network/ifup.sh | 32 ++++++++++++++++---------------- - 1 file changed, 16 insertions(+), 16 deletions(-) - -diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh -index 1185523..41282e7 100755 ---- a/modules.d/40network/ifup.sh -+++ b/modules.d/40network/ifup.sh -@@ -321,16 +321,16 @@ fi - ip=$(getarg ip) - - if [ -z "$NO_AUTO_DHCP" ] && [ -z "$ip" ]; then -- for s in $(getargs nameserver); do -- [ -n "$s" ] || continue -- echo nameserver $s >> /tmp/net.$netif.resolv.conf -- done -- - if [ "$netroot" = "dhcp6" ]; then - do_dhcp -6 - else - do_dhcp -4 - fi -+ -+ for s in $(getargs nameserver); do -+ [ -n "$s" ] || continue -+ echo nameserver $s >> /tmp/net.$netif.resolv.conf -+ done - fi - - -@@ -355,17 +355,6 @@ for p in $(getargs ip=); do - # If this option isn't directed at our interface, skip it - [ -n "$dev" ] && [ "$dev" != "$netif" ] && continue - -- # setup nameserver -- for s in "$dns1" "$dns2" $(getargs nameserver); do -- [ -n "$s" ] || continue -- echo nameserver $s >> /tmp/net.$netif.resolv.conf -- done -- -- # Store config for later use -- for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do -- eval '[ "$'$i'" ] && echo '$i'="$'$i'"' -- done > /tmp/net.$netif.override -- - for autoopt in $(str_replace "$autoconf" "," " "); do - case $autoopt in - dhcp|on|any) -@@ -381,6 +370,17 @@ for p in $(getargs ip=); do - done - ret=$? - -+ # setup nameserver -+ for s in "$dns1" "$dns2" $(getargs nameserver); do -+ [ -n "$s" ] || continue -+ echo nameserver $s >> /tmp/net.$netif.resolv.conf -+ done -+ -+ # Store config for later use -+ for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do -+ eval '[ "$'$i'" ] && echo '$i'="$'$i'"' -+ done > /tmp/net.$netif.override -+ - if [ $ret -eq 0 ]; then - > /tmp/net.${netif}.up - diff --git a/0069-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch b/0069-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch deleted file mode 100644 index 8a338e0..0000000 --- a/0069-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 4fa5c235a76c085f5958002826436ed9c40e5034 Mon Sep 17 00:00:00 2001 -From: Xunlei Pang -Date: Tue, 26 Apr 2016 18:05:11 +0800 -Subject: [PATCH] network/net-lib.sh: delete duplicated DNS items from - "/etc/resolv.conf" - -Users can pass the DNS information throught "nameserver=" cmdline, -there maybe duplicated inputs. - -"/etc/resolv.conf" have some restrictions on the number of DNS items -effective, so make sure that this file contains no duplicated items. - -We achieve this by simply making the file have no duplicated lines. - -Signed-off-by: Xunlei Pang ---- - modules.d/40network/module-setup.sh | 2 +- - modules.d/40network/net-lib.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 4bf93cc..53b4b60 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -23,7 +23,7 @@ installkernel() { - # called by dracut - install() { - local _arch _i _dir -- inst_multiple ip arping dhclient sed -+ inst_multiple ip arping dhclient sed awk - inst_multiple -o ping ping6 - inst_multiple -o brctl - inst_multiple -o teamd teamdctl teamnl -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 31f1a56..005ad1b 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -120,7 +120,7 @@ setup_net() { - [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts - # set up resolv.conf - [ -e /tmp/net.$netif.resolv.conf ] && \ -- cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf -+ awk '!array[$0]++' /tmp/net.$netif.resolv.conf > /etc/resolv.conf - [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw - - # add static route diff --git a/0070-ensure-parent-dir-for-usr-lib-initrd-release-exists.patch b/0070-ensure-parent-dir-for-usr-lib-initrd-release-exists.patch deleted file mode 100644 index 7db08c6..0000000 --- a/0070-ensure-parent-dir-for-usr-lib-initrd-release-exists.patch +++ /dev/null @@ -1,21 +0,0 @@ -From bb44294b62b9469aebaeac8533569ac24b208a45 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= -Date: Wed, 27 Apr 2016 13:08:42 +0300 -Subject: [PATCH] ensure parent dir for /usr/lib/initrd-release exists - ---- - modules.d/99base/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh -index 5fbf6f7..b03772e 100755 ---- a/modules.d/99base/module-setup.sh -+++ b/modules.d/99base/module-setup.sh -@@ -77,6 +77,7 @@ install() { - VERSION_ID=$DRACUT_VERSION - ANSI_COLOR="0;34" - -+ [ -e "${initdir}/usr/lib" ] || mkdir -m 0755 -p ${initdir}/usr/lib - { - echo NAME=\"$NAME\" - echo VERSION=\"$VERSION\" diff --git a/0071-Fix-small-typo-in-dracut.cmdline-7.patch b/0071-Fix-small-typo-in-dracut.cmdline-7.patch deleted file mode 100644 index daa35b0..0000000 --- a/0071-Fix-small-typo-in-dracut.cmdline-7.patch +++ /dev/null @@ -1,22 +0,0 @@ -From ae753baec0ae5b3c3eeabbe4f70c54cc3c24c292 Mon Sep 17 00:00:00 2001 -From: Ruben Kerkhof -Date: Fri, 29 Apr 2016 15:34:47 +0200 -Subject: [PATCH] Fix small typo in dracut.cmdline(7) - ---- - dracut.cmdline.7.asc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index c4c5588..bf00719 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -32,7 +32,7 @@ line is the value, which is honored. - Standard - ~~~~~~~~ - **init=**____:: -- specify the path to the init programm to be started after the initramfs has -+ specify the path to the init program to be started after the initramfs has - finished - - **root=**____:: diff --git a/0072-systemd-ensure-journal-is-volatile.patch b/0072-systemd-ensure-journal-is-volatile.patch deleted file mode 100644 index 5c69f09..0000000 --- a/0072-systemd-ensure-journal-is-volatile.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5dea430e087ec7749080547a6a6fe5b152f665ef Mon Sep 17 00:00:00 2001 -From: Michael Chapman -Date: Wed, 4 May 2016 10:49:56 +1000 -Subject: [PATCH] systemd: ensure journal is volatile - -If journald.conf already contains Storage=persistent, journald will -write to /var/log/journal/, which ends up at /run/initramfs/log/journal/ -after switching root. We want to make sure early boot logs are written -to /run/log/journal/ so they can be flushed to /var/log/journal/ after -switching root. ---- - modules.d/00systemd/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index deb5e06..951a5be 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -210,9 +210,10 @@ install() { - done - - mkdir -p "$initdir/etc/systemd" -- # turn off RateLimit for journal -+ # We must use a volatile journal, and we don't want rate-limiting - { - echo "[Journal]" -+ echo "Storage=volatile" - echo "RateLimitInterval=0" - echo "RateLimitBurst=0" - } >> "$initdir/etc/systemd/journald.conf" diff --git a/0073-configure-don-t-hardcode-pkg-config.patch b/0073-configure-don-t-hardcode-pkg-config.patch deleted file mode 100644 index b3b825d..0000000 --- a/0073-configure-don-t-hardcode-pkg-config.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 699414f5a518f039fa74fd314d21994849a90625 Mon Sep 17 00:00:00 2001 -From: Marc-Antoine Perennou -Date: Wed, 4 May 2016 10:18:54 +0200 -Subject: [PATCH] configure: don't hardcode pkg-config - -Signed-off-by: Marc-Antoine Perennou ---- - configure | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/configure b/configure -index c92cb99..2368680 100755 ---- a/configure -+++ b/configure -@@ -7,6 +7,8 @@ prefix=/usr - - enable_documentation=yes - -+PKG_CONFIG="${PKG_CONFIG:-pkg-config}" -+ - # Little helper function for reading args from the commandline. - # it automatically handles -a b and -a=b variants, and returns 1 if - # we need to shift $3. -@@ -50,7 +52,7 @@ while (($# > 0)); do - shift - done - --if ! pkg-config --exists --print-errors " libkmod >= 15 "; then -+if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 15 "; then - echo "dracut needs pkg-config and libkmod >= 15." >&2 - exit 1 - fi -@@ -64,8 +66,8 @@ sbindir ?= ${sbindir:-${prefix}/sbin} - mandir ?= ${mandir:-${prefix}/share/man} - enable_documentation ?= ${enable_documentation:-yes} - bindir ?= ${bindir:-${prefix}/bin} --KMOD_CFLAGS ?= $(pkg-config --cflags " libkmod >= 15 ") --KMOD_LIBS ?= $(pkg-config --libs " libkmod >= 15 ") -+KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 15 ") -+KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 15 ") - EOF - - { diff --git a/0074-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch b/0074-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch deleted file mode 100644 index 20f7339..0000000 --- a/0074-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 016613c774baf3d30c6425a65ead05d8b55d6279 Mon Sep 17 00:00:00 2001 -From: Alexander Kurtz -Date: Fri, 6 May 2016 17:25:37 +0200 -Subject: [PATCH] dracut-systemd/dracut-cmdline.sh: Don't error out if there is - no root= argument. - -Thanks to systemd's gpt-auto-generator [0] (which implements the Discoverable -Partitions Specification [1]), it is no longer necessary to always specify the -root= argument. - -However, dracut would still refuse to boot if there was no root= argument (or -if it was set to the special value "gpt-auto" [2]). This commit stops dracut -from aborting the boot process in these cases and simply lets systemd do its -magic. - -[0] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator -[1] https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/ -[2] https://github.com/systemd/systemd/blob/v229/src/gpt-auto-generator/gpt-auto-generator.c#L928 ---- - modules.d/98dracut-systemd/dracut-cmdline.sh | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh -index a1dcf84..ccf24fb 100755 ---- a/modules.d/98dracut-systemd/dracut-cmdline.sh -+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh -@@ -21,7 +21,12 @@ getargbool 0 rd.udev.log-priority=debug -d rd.udev.debug -d -n -y rdudevdebug && - - source_conf /etc/conf.d - --root=$(getarg root=) -+# Get the "root=" parameter from the kernel command line, but differentiate -+# between the case where it was set to the empty string and the case where it -+# wasn't specified at all. -+if ! root="$(getarg root=)"; then -+ root='UNSET' -+fi - - rflags="$(getarg rootflags=)" - getargbool 0 ro && rflags="${rflags},ro" -@@ -65,9 +70,12 @@ case "$root" in - /dev/*) - root="block:${root}" - rootok=1 ;; -+ UNSET|gpt-auto) -+ # systemd's gpt-auto-generator handles this case. -+ rootok=1 ;; - esac - --[ -z "$root" ] && die "No or empty root= argument" -+[ -z "$root" ] && die "Empty root= argument" - [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" - - export root rflags fstype netroot NEWROOT diff --git a/0075-move-ln_r-to-dracut-init.sh.patch b/0075-move-ln_r-to-dracut-init.sh.patch deleted file mode 100644 index 2e573e0..0000000 --- a/0075-move-ln_r-to-dracut-init.sh.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 190150018798f88107fba119e92bd32e2a8d4b0b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 2 May 2016 12:48:12 +0200 -Subject: [PATCH] move ln_r() to dracut-init.sh - ---- - dracut-functions.sh | 12 ------------ - dracut-init.sh | 13 +++++++++++++ - 2 files changed, 13 insertions(+), 12 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index c7ea9f5..4496bfe 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -167,18 +167,6 @@ convert_abs_rel() { - printf "%s\n" "$__newpath" - } - --if [[ "$(ln --help)" == *--relative* ]]; then -- ln_r() { -- ln -sfnr "${initdir}/$1" "${initdir}/$2" -- } --else -- ln_r() { -- local _source=$1 -- local _dest=$2 -- [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/} -- ln -sfn -- "$(convert_abs_rel "${_dest}" "${_source}")" "${initdir}/${_dest}" -- } --fi - - # get_fs_env - # Get and the ID_FS_TYPE variable from udev for a device. -diff --git a/dracut-init.sh b/dracut-init.sh -index a195c32..d2bb845 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -997,3 +997,16 @@ instmods() { - [[ "$optional" ]] && return 0 - return $_ret - } -+ -+if [[ "$(ln --help)" == *--relative* ]]; then -+ ln_r() { -+ ln -sfnr "${initdir}/$1" "${initdir}/$2" -+ } -+else -+ ln_r() { -+ local _source=$1 -+ local _dest=$2 -+ [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/} -+ ln -sfn -- "$(convert_abs_rel "${_dest}" "${_source}")" "${initdir}/${_dest}" -+ } -+fi diff --git a/0076-systemd-initrd-add-initrd-root-device.target.patch b/0076-systemd-initrd-add-initrd-root-device.target.patch deleted file mode 100644 index 87d6696..0000000 --- a/0076-systemd-initrd-add-initrd-root-device.target.patch +++ /dev/null @@ -1,21 +0,0 @@ -From d4efc0aeeecc470d9a267b7f3c130f472488905c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 25 May 2016 15:06:29 +0200 -Subject: [PATCH] systemd-initrd: add initrd-root-device.target - ---- - modules.d/01systemd-initrd/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/01systemd-initrd/module-setup.sh b/modules.d/01systemd-initrd/module-setup.sh -index fb6a9ea..c1ccd2a 100755 ---- a/modules.d/01systemd-initrd/module-setup.sh -+++ b/modules.d/01systemd-initrd/module-setup.sh -@@ -28,6 +28,7 @@ install() { - inst_multiple -o \ - $systemdsystemunitdir/initrd.target \ - $systemdsystemunitdir/initrd-fs.target \ -+ $systemdsystemunitdir/initrd-root-device.target \ - $systemdsystemunitdir/initrd-root-fs.target \ - $systemdsystemunitdir/initrd-switch-root.target \ - $systemdsystemunitdir/initrd-switch-root.service \ diff --git a/0077-dracut.sh-fix-tmpfilesdir-fallback-when-systemd-deve.patch b/0077-dracut.sh-fix-tmpfilesdir-fallback-when-systemd-deve.patch deleted file mode 100644 index c1c9399..0000000 --- a/0077-dracut.sh-fix-tmpfilesdir-fallback-when-systemd-deve.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 55b99a0e4c37b3b7ee58e1369ab00430795acdc6 Mon Sep 17 00:00:00 2001 -From: Colin Guthrie -Date: Tue, 7 Jun 2016 09:16:05 +0100 -Subject: [PATCH] dracut.sh: fix $tmpfilesdir fallback when systemd-devel is - not installed. - -Bug introduced in 3a04bddeed in Dec 2014. ---- - dracut.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index 8232fa4..a50eaff 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1260,8 +1260,8 @@ fi - || tmpfilesdir=$(pkg-config systemd --variable=tmpfilesdir 2>/dev/null) - - if ! [[ -d "$tmpfilesdir" ]]; then -- [[ -f /lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d -- [[ -f /usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d -+ [[ -d /lib/tmpfiles.d ]] && tmpfilesdir=/lib/tmpfiles.d -+ [[ -d /usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d - fi - - export initdir dracutbasedir \ diff --git a/0078-dracut-Add-drivers-clk-by-default-on-arm.patch b/0078-dracut-Add-drivers-clk-by-default-on-arm.patch deleted file mode 100644 index 8f4ea3e..0000000 --- a/0078-dracut-Add-drivers-clk-by-default-on-arm.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 2602a74edf543f98f2aa1eb79db3de3a1cda13f0 Mon Sep 17 00:00:00 2001 -From: Nicolas Chauvet -Date: Thu, 12 May 2016 17:28:21 +0200 -Subject: [PATCH] dracut: Add drivers/clk by default on arm - -This will bundle clock drivers into the initramfs on arm - -Tested on ti dm8148-t410 where adpll is needed on 4.6+ kernel -This will avoid to rely on (maybe broken) bootloader clocks. - -Theses modules are also usually loaded early. Having them bundled into -the initramfs will avoid lot of deferred probes and others delay. - -Signed-off-by: Nicolas Chauvet ---- - modules.d/90kernel-modules/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index c30715d..7904c02 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -26,6 +26,7 @@ installkernel() { - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules - instmods \ -+ "=drivers/clk" \ - "=drivers/i2c/busses" \ - "=drivers/regulator" \ - "=drivers/rtc" \ diff --git a/0079-network-remove-awk-call-and-replace-it-with-a-shell-.patch b/0079-network-remove-awk-call-and-replace-it-with-a-shell-.patch deleted file mode 100644 index c34ed13..0000000 --- a/0079-network-remove-awk-call-and-replace-it-with-a-shell-.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 71867b665cea6b4d9814ea0386baf0500db06806 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 7 Jun 2016 11:11:58 +0200 -Subject: [PATCH] network: remove awk call and replace it with a shell function - -changes commit 4fa5c235a76c085f5958002826436ed9c40e5034 ---- - dracut-functions.sh | 10 ++++++++++ - modules.d/40network/module-setup.sh | 2 +- - modules.d/40network/net-lib.sh | 2 +- - 3 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 4496bfe..146dbea 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -37,6 +37,16 @@ str_starts() { [ "${1#"$2"*}" != "$1" ]; } - # returns OK if $1 contains literal string $2 at the end, and isn't empty - str_ends() { [ "${1%*"$2"}" != "$1" ]; } - -+uniq_lines() { -+ local -A lines -+ while read -r line; do -+ if ! [[ ${lines[$line]} ]]; then -+ echo "$line" -+ lines[$line]=1 -+ fi -+ done -+} -+ - # find a binary. If we were not passed the full path directly, - # search in the usual places to find the binary. - find_binary() { -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 53b4b60..4bf93cc 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -23,7 +23,7 @@ installkernel() { - # called by dracut - install() { - local _arch _i _dir -- inst_multiple ip arping dhclient sed awk -+ inst_multiple ip arping dhclient sed - inst_multiple -o ping ping6 - inst_multiple -o brctl - inst_multiple -o teamd teamdctl teamnl -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 005ad1b..4fd274e 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -120,7 +120,7 @@ setup_net() { - [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts - # set up resolv.conf - [ -e /tmp/net.$netif.resolv.conf ] && \ -- awk '!array[$0]++' /tmp/net.$netif.resolv.conf > /etc/resolv.conf -+ uniq_lines < /tmp/net.$netif.resolv.conf > /etc/resolv.conf - [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw - - # add static route diff --git a/0080-dracut-init.sh-set-default-firmware-path-if-not-spec.patch b/0080-dracut-init.sh-set-default-firmware-path-if-not-spec.patch deleted file mode 100644 index f940cab..0000000 --- a/0080-dracut-init.sh-set-default-firmware-path-if-not-spec.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 8e010957557621c1a71d7289c4210d3ad5932893 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 25 May 2016 17:05:03 +0200 -Subject: [PATCH] dracut-init.sh: set default firmware path, if not specified - ---- - dracut-init.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/dracut-init.sh b/dracut-init.sh -index d2bb845..7f628ce 100644 ---- a/dracut-init.sh -+++ b/dracut-init.sh -@@ -69,6 +69,8 @@ srcmods="/lib/modules/$kernel/" - } - export srcmods - -+[[ $DRACUT_FIRMWARE_PATH ]] || export DRACUT_FIRMWARE_PATH="/lib/firmware/updates:/lib/firmware:/lib/firmware/$kernel" -+ - # export standard hookdirs - [[ $hookdirs ]] || { - hookdirs="cmdline pre-udev pre-trigger netroot " diff --git a/0081-use-shutdown-emergency-hook-in-testsuite-to-poweroff.patch b/0081-use-shutdown-emergency-hook-in-testsuite-to-poweroff.patch deleted file mode 100644 index ed87a01..0000000 --- a/0081-use-shutdown-emergency-hook-in-testsuite-to-poweroff.patch +++ /dev/null @@ -1,269 +0,0 @@ -From 4e882b8090e82b0f0ffabfb45f0a2cd69768ef53 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 27 May 2016 10:52:28 +0200 -Subject: [PATCH] use shutdown-emergency hook in testsuite to poweroff the - machine - ---- - modules.d/99base/dracut-lib.sh | 6 +++++- - test/TEST-01-BASIC/test.sh | 2 +- - test/TEST-02-SYSTEMD/test.sh | 2 +- - test/TEST-03-USR-MOUNT/test.sh | 2 +- - test/TEST-04-FULL-SYSTEMD/test.sh | 2 +- - test/TEST-10-RAID/test.sh | 2 +- - test/TEST-11-LVM/test.sh | 2 +- - test/TEST-12-RAID-DEG/test.sh | 2 +- - test/TEST-13-ENC-RAID-LVM/test.sh | 2 +- - test/TEST-14-IMSM/test.sh | 2 +- - test/TEST-15-BTRFSRAID/test.sh | 2 +- - test/TEST-16-DMSQUASH/test.sh | 2 +- - test/TEST-17-LVM-THIN/test.sh | 2 +- - test/TEST-20-NFS/test.sh | 4 ++-- - test/TEST-30-ISCSI/test.sh | 2 +- - test/TEST-40-NBD/test.sh | 4 ++-- - test/TEST-50-MULTINIC/test.sh | 2 +- - 17 files changed, 23 insertions(+), 19 deletions(-) - -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 48fc83d..94e4614 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -457,7 +457,11 @@ die() { - - > /run/initramfs/.die - -- getargbool 0 "rd.shell=" && emergency_shell -+ if getargbool 0 "rd.shell"; then -+ emergency_shell -+ else -+ source_hook "shutdown-emergency" -+ fi - - if [ -n "$DRACUT_SYSTEMD" ]; then - systemctl --no-block --force halt -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index 83320e2..959ac05 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -89,7 +89,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -index 16f5c26..6dc6f42 100755 ---- a/test/TEST-02-SYSTEMD/test.sh -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -86,7 +86,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh -index 61063fd..0aca8cf 100755 ---- a/test/TEST-03-USR-MOUNT/test.sh -+++ b/test/TEST-03-USR-MOUNT/test.sh -@@ -124,7 +124,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index c7e08bf..884f441 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -261,7 +261,7 @@ EOF - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - -diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh -index 523b61a..6ec77a6 100755 ---- a/test/TEST-10-RAID/test.sh -+++ b/test/TEST-10-RAID/test.sh -@@ -86,7 +86,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst ./cryptroot-ask.sh /sbin/cryptroot-ask - mkdir -p $initdir/etc - echo "testluks UUID=$ID_FS_UUID /etc/key" > $initdir/etc/crypttab -diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh -index 34c7736..412a065 100755 ---- a/test/TEST-11-LVM/test.sh -+++ b/test/TEST-11-LVM/test.sh -@@ -79,7 +79,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh -index f4ec2d0..444dca6 100755 ---- a/test/TEST-12-RAID-DEG/test.sh -+++ b/test/TEST-12-RAID-DEG/test.sh -@@ -129,7 +129,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - inst ./cryptroot-ask.sh /sbin/cryptroot-ask - mkdir -p $initdir/etc -diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh -index ea81697..2a814f8 100755 ---- a/test/TEST-13-ENC-RAID-LVM/test.sh -+++ b/test/TEST-13-ENC-RAID-LVM/test.sh -@@ -123,7 +123,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - inst ./cryptroot-ask.sh /sbin/cryptroot-ask - mkdir -p $initdir/etc -diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh -index f4ea7ae..315bc5a 100755 ---- a/test/TEST-14-IMSM/test.sh -+++ b/test/TEST-14-IMSM/test.sh -@@ -113,7 +113,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh -index 5a9b6e1..8e2ea49 100755 ---- a/test/TEST-15-BTRFSRAID/test.sh -+++ b/test/TEST-15-BTRFSRAID/test.sh -@@ -87,7 +87,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh -index 53a45d6..b255492 100755 ---- a/test/TEST-16-DMSQUASH/test.sh -+++ b/test/TEST-16-DMSQUASH/test.sh -@@ -43,7 +43,7 @@ test_setup() { - export initdir="$TESTDIR"/overlay - . "$basedir"/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - -diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh -index 859d4dc..e337591 100755 ---- a/test/TEST-17-LVM-THIN/test.sh -+++ b/test/TEST-17-LVM-THIN/test.sh -@@ -79,7 +79,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index ceca1f0..1dfdfc4 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -141,7 +141,7 @@ test_nfsv3() { - - # This test must fail: nfsroot= requires root=/dev/nfs - client_test "NFSv3 Invalid root=dhcp nfsroot=/nfs/client" 52:54:00:12:34:04 \ -- "root=dhcp nfsroot=/nfs/client failme" 192.168.50.1 -wsize=4096 && return 1 -+ "root=dhcp nfsroot=/nfs/client failme rd.debug" 192.168.50.1 -wsize=4096 && return 1 - - client_test "NFSv3 root=dhcp DHCP path,options" \ - 52:54:00:12:34:05 "root=dhcp" 192.168.50.1 wsize=4096 || return 1 -@@ -334,7 +334,7 @@ test_setup() { - . $basedir/dracut-init.sh - mkdir $TESTDIR/overlay - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 940edb6..1c06b06 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -213,7 +213,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh -index 28ba6aa..2061392 100755 ---- a/test/TEST-40-NBD/test.sh -+++ b/test/TEST-40-NBD/test.sh -@@ -226,7 +226,7 @@ make_encrypted_root() { - done - ) - inst_multiple mke2fs poweroff cp umount tune2fs -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_hook initqueue 01 ./create-root.sh - inst_hook initqueue/finished 01 ./finished-false.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules -@@ -362,7 +362,7 @@ test_setup() { - export initdir=$TESTDIR/overlay - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - inst ./cryptroot-ask.sh /sbin/cryptroot-ask - -diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh -index 484ebee..e0bf7d2 100755 ---- a/test/TEST-50-MULTINIC/test.sh -+++ b/test/TEST-50-MULTINIC/test.sh -@@ -269,7 +269,7 @@ test_setup() { - export initdir="$TESTDIR"/overlay - . "$basedir"/dracut-init.sh - inst_multiple poweroff shutdown -- inst_hook emergency 000 ./hard-off.sh -+ inst_hook shutdown-emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - diff --git a/0082-Revert-network-remove-awk-call-and-replace-it-with-a.patch b/0082-Revert-network-remove-awk-call-and-replace-it-with-a.patch deleted file mode 100644 index 4d5603c..0000000 --- a/0082-Revert-network-remove-awk-call-and-replace-it-with-a.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 9e19c0512d12be15d02125bce0e25d6b9bb2b333 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 7 Jun 2016 13:24:47 +0200 -Subject: [PATCH] Revert "network: remove awk call and replace it with a shell - function" - -This reverts commit 71867b665cea6b4d9814ea0386baf0500db06806. - -network needs posix shell ---- - dracut-functions.sh | 10 ---------- - modules.d/40network/module-setup.sh | 2 +- - modules.d/40network/net-lib.sh | 2 +- - 3 files changed, 2 insertions(+), 12 deletions(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 146dbea..4496bfe 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -37,16 +37,6 @@ str_starts() { [ "${1#"$2"*}" != "$1" ]; } - # returns OK if $1 contains literal string $2 at the end, and isn't empty - str_ends() { [ "${1%*"$2"}" != "$1" ]; } - --uniq_lines() { -- local -A lines -- while read -r line; do -- if ! [[ ${lines[$line]} ]]; then -- echo "$line" -- lines[$line]=1 -- fi -- done --} -- - # find a binary. If we were not passed the full path directly, - # search in the usual places to find the binary. - find_binary() { -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 4bf93cc..53b4b60 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -23,7 +23,7 @@ installkernel() { - # called by dracut - install() { - local _arch _i _dir -- inst_multiple ip arping dhclient sed -+ inst_multiple ip arping dhclient sed awk - inst_multiple -o ping ping6 - inst_multiple -o brctl - inst_multiple -o teamd teamdctl teamnl -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 4fd274e..005ad1b 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -120,7 +120,7 @@ setup_net() { - [ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts - # set up resolv.conf - [ -e /tmp/net.$netif.resolv.conf ] && \ -- uniq_lines < /tmp/net.$netif.resolv.conf > /etc/resolv.conf -+ awk '!array[$0]++' /tmp/net.$netif.resolv.conf > /etc/resolv.conf - [ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw - - # add static route diff --git a/0083-dracut-systemd-dracut-emergency.sh-call-shutdown-eme.patch b/0083-dracut-systemd-dracut-emergency.sh-call-shutdown-eme.patch deleted file mode 100644 index fbf4224..0000000 --- a/0083-dracut-systemd-dracut-emergency.sh-call-shutdown-eme.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 8fce2c4d5eb6f48fdb2429cf1854aca3ced42423 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 7 Jun 2016 14:47:27 +0200 -Subject: [PATCH] dracut-systemd/dracut-emergency.sh: call shutdown-emergency - hooks - -if no rd.shell is given ---- - modules.d/98dracut-systemd/dracut-emergency.sh | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/modules.d/98dracut-systemd/dracut-emergency.sh b/modules.d/98dracut-systemd/dracut-emergency.sh -index 26be291..63311c2 100755 ---- a/modules.d/98dracut-systemd/dracut-emergency.sh -+++ b/modules.d/98dracut-systemd/dracut-emergency.sh -@@ -12,10 +12,9 @@ type plymouth >/dev/null 2>&1 && plymouth quit - - export _rdshell_name="dracut" action="Boot" hook="emergency" - --source_hook "$hook" -- - - if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then -+ source_hook "$hook" - echo - rdsosreport - echo -@@ -30,7 +29,9 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then - [ -z "$PS1" ] && export PS1="$_name:\${PWD}# " - exec sh -i -l - else -+ export hook="shutdown-emergency" - warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." -+ source_hook "$hook" - exit 1 - fi - diff --git a/0084-systemd-add-udev.hwdb-and-udev.conf.patch b/0084-systemd-add-udev.hwdb-and-udev.conf.patch deleted file mode 100644 index 0f4bc5b..0000000 --- a/0084-systemd-add-udev.hwdb-and-udev.conf.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 3847bd450d82fd4f95d9668f4810f31adc95ab30 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 8 Jun 2016 16:46:42 +0200 -Subject: [PATCH] systemd: add udev.hwdb and udev.conf - ---- - modules.d/00systemd/module-setup.sh | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index 951a5be..dcee08b 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -130,7 +130,9 @@ install() { - kmod insmod rmmod modprobe modinfo depmod lsmod \ - mount umount reboot poweroff \ - systemd-run systemd-escape \ -- systemd-cgls systemd-tmpfiles -+ systemd-cgls systemd-tmpfiles \ -+ /etc/udev/udev.hwdb \ -+ ${NULL} - - inst_multiple -o \ - /usr/lib/modules-load.d/*.conf \ -@@ -167,7 +169,9 @@ install() { - /etc/locale.conf \ - /etc/modules-load.d/*.conf \ - /etc/sysctl.d/*.conf \ -- /etc/sysctl.conf -+ /etc/sysctl.conf \ -+ /etc/udev/udev.conf \ -+ ${NULL} - - _mods=$(modules_load_get /etc/modules-load.d) - [[ $_mods ]] && instmods $_mods -@@ -196,7 +200,8 @@ install() { - 71-seat.rules \ - 73-seat-late.rules \ - 90-vconsole.rules \ -- 99-systemd.rules -+ 99-systemd.rules \ -+ ${NULL} - - for i in \ - emergency.target \ diff --git a/0085-cope-with-rd.shell-0-in-the-testsuite.patch b/0085-cope-with-rd.shell-0-in-the-testsuite.patch deleted file mode 100644 index f854c1f..0000000 --- a/0085-cope-with-rd.shell-0-in-the-testsuite.patch +++ /dev/null @@ -1,2031 +0,0 @@ -From 781f1971c326da07d22516a4b555138b1978177b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 8 Jun 2016 09:33:48 +0200 -Subject: [PATCH] cope with "rd.shell=0" in the testsuite - -If emergency and shutdown-emergency hooks are called, the systemd should -poweroff the testsuite, therefore "rd.shell=0" is given on the test -suite kernel command lines. - -"rd.shell=0" has to be parsed correctly by the test suite real root init -also. ---- - test/TEST-01-BASIC/hard-off.sh | 4 +- - test/TEST-01-BASIC/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-01-BASIC/test.sh | 3 +- - test/TEST-02-SYSTEMD/hard-off.sh | 4 +- - test/TEST-02-SYSTEMD/test-init.sh | 100 ++++++++++++++++++++++++++++++++- - test/TEST-02-SYSTEMD/test.sh | 3 +- - test/TEST-03-USR-MOUNT/hard-off.sh | 4 +- - test/TEST-03-USR-MOUNT/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-03-USR-MOUNT/test.sh | 3 +- - test/TEST-04-FULL-SYSTEMD/hard-off.sh | 4 +- - test/TEST-04-FULL-SYSTEMD/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-04-FULL-SYSTEMD/test.sh | 3 +- - test/TEST-10-RAID/hard-off.sh | 4 +- - test/TEST-10-RAID/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-10-RAID/test.sh | 3 +- - test/TEST-11-LVM/hard-off.sh | 4 +- - test/TEST-11-LVM/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-11-LVM/test.sh | 3 +- - test/TEST-12-RAID-DEG/hard-off.sh | 4 +- - test/TEST-12-RAID-DEG/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-12-RAID-DEG/test.sh | 3 +- - test/TEST-13-ENC-RAID-LVM/hard-off.sh | 4 +- - test/TEST-13-ENC-RAID-LVM/test.sh | 3 +- - test/TEST-14-IMSM/hard-off.sh | 4 +- - test/TEST-14-IMSM/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-14-IMSM/test.sh | 3 +- - test/TEST-15-BTRFSRAID/hard-off.sh | 4 +- - test/TEST-15-BTRFSRAID/test.sh | 3 +- - test/TEST-16-DMSQUASH/hard-off.sh | 4 +- - test/TEST-16-DMSQUASH/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-16-DMSQUASH/test.sh | 3 +- - test/TEST-17-LVM-THIN/hard-off.sh | 2 +- - test/TEST-17-LVM-THIN/test-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-17-LVM-THIN/test.sh | 3 +- - test/TEST-20-NFS/client-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-20-NFS/hard-off.sh | 4 +- - test/TEST-20-NFS/test.sh | 3 +- - test/TEST-30-ISCSI/client-init.sh | 97 +++++++++++++++++++++++++++++++- - test/TEST-30-ISCSI/hard-off.sh | 4 +- - test/TEST-30-ISCSI/test.sh | 3 +- - test/TEST-40-NBD/hard-off.sh | 4 +- - test/TEST-40-NBD/test.sh | 3 +- - test/TEST-50-MULTINIC/client-init.sh | 98 +++++++++++++++++++++++++++++++- - test/TEST-50-MULTINIC/hard-off.sh | 4 +- - test/TEST-50-MULTINIC/test.sh | 3 +- - 45 files changed, 1315 insertions(+), 60 deletions(-) - -diff --git a/test/TEST-01-BASIC/hard-off.sh b/test/TEST-01-BASIC/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-01-BASIC/hard-off.sh -+++ b/test/TEST-01-BASIC/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-01-BASIC/test-init.sh b/test/TEST-01-BASIC/test-init.sh -index ef196ec..a8b6e39 100755 ---- a/test/TEST-01-BASIC/test-init.sh -+++ b/test/TEST-01-BASIC/test-init.sh -@@ -1,5 +1,100 @@ - #!/bin/sh - >/dev/watchdog -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) -@@ -12,7 +107,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --if strstr "$CMDLINE" "rd.shell"; then -+if getargbool 0 rd.shell; then - strstr "$(setsid --help)" "control" && CTTY="-c" - setsid $CTTY sh -i - fi -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index 959ac05..ab84074 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -14,7 +14,7 @@ test_run() { - -m 256M -smp 2 -nographic \ - -net none \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 $DEBUGFAIL" \ -+ -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing || return 1 - grep -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 - } -@@ -90,6 +90,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-02-SYSTEMD/hard-off.sh b/test/TEST-02-SYSTEMD/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-02-SYSTEMD/hard-off.sh -+++ b/test/TEST-02-SYSTEMD/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-02-SYSTEMD/test-init.sh b/test/TEST-02-SYSTEMD/test-init.sh -index b7e0192..0999bc0 100755 ---- a/test/TEST-02-SYSTEMD/test-init.sh -+++ b/test/TEST-02-SYSTEMD/test-init.sh -@@ -1,4 +1,102 @@ - #!/bin/sh -+ -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} -+ -+ - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) -@@ -11,7 +109,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --if strstr "$CMDLINE" "rd.shell"; then -+if getargbool 0 rd.shell; then - strstr "$(setsid --help)" "control" && CTTY="-c" - setsid $CTTY sh -i - fi -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -index 6dc6f42..350cff8 100755 ---- a/test/TEST-02-SYSTEMD/test.sh -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -10,7 +10,7 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init $DEBUGFAIL" \ -+ -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 - } -@@ -87,6 +87,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-03-USR-MOUNT/hard-off.sh b/test/TEST-03-USR-MOUNT/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-03-USR-MOUNT/hard-off.sh -+++ b/test/TEST-03-USR-MOUNT/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-03-USR-MOUNT/test-init.sh b/test/TEST-03-USR-MOUNT/test-init.sh -index 48fbfea..68eaff0 100755 ---- a/test/TEST-03-USR-MOUNT/test-init.sh -+++ b/test/TEST-03-USR-MOUNT/test-init.sh -@@ -1,5 +1,100 @@ - #!/bin/sh - >/dev/watchdog -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) -@@ -22,7 +117,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --if strstr "$CMDLINE" "rd.shell"; then -+if getargbool 0 rd.shell; then - strstr "$(setsid --help)" "control" && CTTY="-c" - setsid $CTTY sh -i - fi -diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh -index 0aca8cf..ed76d35 100755 ---- a/test/TEST-03-USR-MOUNT/test.sh -+++ b/test/TEST-03-USR-MOUNT/test.sh -@@ -21,7 +21,7 @@ client_run() { - -m 256M -smp 2 -nographic \ - -net none \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -append "root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - - if (($? != 0)); then -@@ -125,6 +125,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-04-FULL-SYSTEMD/hard-off.sh b/test/TEST-04-FULL-SYSTEMD/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-04-FULL-SYSTEMD/hard-off.sh -+++ b/test/TEST-04-FULL-SYSTEMD/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-04-FULL-SYSTEMD/test-init.sh b/test/TEST-04-FULL-SYSTEMD/test-init.sh -index ad516f1..e388afc 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test-init.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh -@@ -1,5 +1,100 @@ - #!/bin/sh - >/dev/watchdog -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) -@@ -35,7 +130,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --if strstr "$CMDLINE" "rd.shell"; then -+if getargbool 0 rd.shell; then - # while sleep 1; do sleep 1;done - strstr "$(setsid --help)" "control" && CTTY="-c" - setsid $CTTY sh -i -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index 884f441..88711ef 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -22,7 +22,7 @@ client_run() { - -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT $DEBUGFAIL" \ -+ -append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - - if (($? != 0)); then -@@ -262,6 +262,7 @@ EOF - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - -diff --git a/test/TEST-10-RAID/hard-off.sh b/test/TEST-10-RAID/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-10-RAID/hard-off.sh -+++ b/test/TEST-10-RAID/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-10-RAID/test-init.sh b/test/TEST-10-RAID/test-init.sh -index c7c114e..7eb932a 100755 ---- a/test/TEST-10-RAID/test-init.sh -+++ b/test/TEST-10-RAID/test-init.sh -@@ -1,5 +1,100 @@ - #!/bin/sh - export PATH=/sbin:/bin:/usr/sbin:/usr/bin -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) - command -v plymouth >/dev/null && plymouth --quit -@@ -11,7 +106,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --strstr "$CMDLINE" "rd.shell" && sh -i -+getargbool 0 rd.shell && sh -i - echo "Powering down." - mount -n -o remount,ro / - #echo " rd.break=shutdown " >> /run/initramfs/etc/cmdline -diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh -index 6ec77a6..2d09314 100755 ---- a/test/TEST-10-RAID/test.sh -+++ b/test/TEST-10-RAID/test.sh -@@ -12,7 +12,7 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ -+ -append "root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 - } -@@ -87,6 +87,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst ./cryptroot-ask.sh /sbin/cryptroot-ask - mkdir -p $initdir/etc - echo "testluks UUID=$ID_FS_UUID /etc/key" > $initdir/etc/crypttab -diff --git a/test/TEST-11-LVM/hard-off.sh b/test/TEST-11-LVM/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-11-LVM/hard-off.sh -+++ b/test/TEST-11-LVM/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-11-LVM/test-init.sh b/test/TEST-11-LVM/test-init.sh -index 61a9543..18fd2b3 100755 ---- a/test/TEST-11-LVM/test-init.sh -+++ b/test/TEST-11-LVM/test-init.sh -@@ -1,5 +1,100 @@ - #!/bin/sh - export PATH=/sbin:/bin:/usr/sbin:/usr/bin -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) - plymouth --quit -@@ -11,7 +106,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --strstr "$CMDLINE" "rd.shell" && sh -i -+getargbool 0 rd.shell && sh -i - echo "Powering down." - mount -n -o remount,ro / - poweroff -f -diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh -index 412a065..97c2f97 100755 ---- a/test/TEST-11-LVM/test.sh -+++ b/test/TEST-11-LVM/test.sh -@@ -11,7 +11,7 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 - } -@@ -80,6 +80,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-12-RAID-DEG/hard-off.sh b/test/TEST-12-RAID-DEG/hard-off.sh -index 07a8f1f..cf44fb0 100755 ---- a/test/TEST-12-RAID-DEG/hard-off.sh -+++ b/test/TEST-12-RAID-DEG/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --! getarg rd.break && getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+! getargbool 0 rd.break && getargbool 0 failme && poweroff -f -diff --git a/test/TEST-12-RAID-DEG/test-init.sh b/test/TEST-12-RAID-DEG/test-init.sh -index c7c114e..7eb932a 100755 ---- a/test/TEST-12-RAID-DEG/test-init.sh -+++ b/test/TEST-12-RAID-DEG/test-init.sh -@@ -1,5 +1,100 @@ - #!/bin/sh - export PATH=/sbin:/bin:/usr/sbin:/usr/bin -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) - command -v plymouth >/dev/null && plymouth --quit -@@ -11,7 +106,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --strstr "$CMDLINE" "rd.shell" && sh -i -+getargbool 0 rd.shell && sh -i - echo "Powering down." - mount -n -o remount,ro / - #echo " rd.break=shutdown " >> /run/initramfs/etc/cmdline -diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh -index 444dca6..09d78dd 100755 ---- a/test/TEST-12-RAID-DEG/test.sh -+++ b/test/TEST-12-RAID-DEG/test.sh -@@ -19,7 +19,7 @@ client_run() { - -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2.img.new \ - -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img.new \ - -net none \ -- -append "$* root=LABEL=root rw rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL " \ -+ -append "$* root=LABEL=root rw rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \ - -initrd $TESTDIR/initramfs.testing - if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then - echo "CLIENT TEST END: $@ [FAIL]" -@@ -130,6 +130,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - inst ./cryptroot-ask.sh /sbin/cryptroot-ask - mkdir -p $initdir/etc -diff --git a/test/TEST-13-ENC-RAID-LVM/hard-off.sh b/test/TEST-13-ENC-RAID-LVM/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-13-ENC-RAID-LVM/hard-off.sh -+++ b/test/TEST-13-ENC-RAID-LVM/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh -index 2a814f8..3e8c3e2 100755 ---- a/test/TEST-13-ENC-RAID-LVM/test.sh -+++ b/test/TEST-13-ENC-RAID-LVM/test.sh -@@ -19,7 +19,7 @@ test_run() { - -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS $DEBUGFAIL" \ -+ -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 - echo "CLIENT TEST END: [OK]" -@@ -124,6 +124,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - inst ./cryptroot-ask.sh /sbin/cryptroot-ask - mkdir -p $initdir/etc -diff --git a/test/TEST-14-IMSM/hard-off.sh b/test/TEST-14-IMSM/hard-off.sh -index f340d2d..780a0b2 100755 ---- a/test/TEST-14-IMSM/hard-off.sh -+++ b/test/TEST-14-IMSM/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-14-IMSM/test-init.sh b/test/TEST-14-IMSM/test-init.sh -index ba63245..127185a 100755 ---- a/test/TEST-14-IMSM/test-init.sh -+++ b/test/TEST-14-IMSM/test-init.sh -@@ -1,4 +1,99 @@ - #!/bin/sh -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) -@@ -11,7 +106,7 @@ cat /proc/mdstat - [ -f /etc/fstab ] || ln -s /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --strstr "$CMDLINE" "rd.shell" && sh -i -+getargbool 0 rd.shell && sh -i - echo "Powering down." - mount -n -o remount,ro / - poweroff -f -diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh -index 315bc5a..9083fd5 100755 ---- a/test/TEST-14-IMSM/test.sh -+++ b/test/TEST-14-IMSM/test.sh -@@ -15,7 +15,7 @@ client_run() { - -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2 \ - -m 256M -nographic \ - -net none \ -- -append "$* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info $DEBUGFAIL" \ -+ -append "$* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then - echo "CLIENT TEST END: $@ [FAIL]" -@@ -114,6 +114,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-15-BTRFSRAID/hard-off.sh b/test/TEST-15-BTRFSRAID/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-15-BTRFSRAID/hard-off.sh -+++ b/test/TEST-15-BTRFSRAID/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh -index 8e2ea49..281f856 100755 ---- a/test/TEST-15-BTRFSRAID/test.sh -+++ b/test/TEST-15-BTRFSRAID/test.sh -@@ -11,7 +11,7 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ -+ -append "root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - dd if=$DISKIMAGE bs=512 count=4 skip=2048 | grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 - } -@@ -88,6 +88,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-16-DMSQUASH/hard-off.sh b/test/TEST-16-DMSQUASH/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-16-DMSQUASH/hard-off.sh -+++ b/test/TEST-16-DMSQUASH/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-16-DMSQUASH/test-init.sh b/test/TEST-16-DMSQUASH/test-init.sh -index 206298d..5fe523c 100755 ---- a/test/TEST-16-DMSQUASH/test-init.sh -+++ b/test/TEST-16-DMSQUASH/test-init.sh -@@ -1,4 +1,99 @@ - #!/bin/sh -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) -@@ -11,7 +106,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --strstr "$CMDLINE" "rd.shell" && sh -i -+getargbool 0 rd.shell && sh -i - echo "Powering down." - mount -n -o remount,ro / - poweroff -f -diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh -index b255492..4d72470 100755 ---- a/test/TEST-16-DMSQUASH/test.sh -+++ b/test/TEST-16-DMSQUASH/test.sh -@@ -22,7 +22,7 @@ test_run() { - -m 256M -smp 2 \ - -nographic \ - -net none \ -- -append "root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" \ -+ -append "root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ - -initrd "$TESTDIR"/initramfs.testing - - # mediacheck test with qemu GUI -@@ -44,6 +44,7 @@ test_setup() { - . "$basedir"/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - -diff --git a/test/TEST-17-LVM-THIN/hard-off.sh b/test/TEST-17-LVM-THIN/hard-off.sh -index 12c3d5a..f4d19dc 100755 ---- a/test/TEST-17-LVM-THIN/hard-off.sh -+++ b/test/TEST-17-LVM-THIN/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f -+getargbool 0 rd.shell || poweroff -f - getarg failme && poweroff -f -diff --git a/test/TEST-17-LVM-THIN/test-init.sh b/test/TEST-17-LVM-THIN/test-init.sh -index 61a9543..77fb346 100755 ---- a/test/TEST-17-LVM-THIN/test-init.sh -+++ b/test/TEST-17-LVM-THIN/test-init.sh -@@ -1,4 +1,99 @@ - #!/bin/sh -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) -@@ -11,7 +106,7 @@ export PS1='initramfs-test:\w\$ ' - [ -f /etc/fstab ] || ln -sfn /proc/mounts /etc/fstab - stty sane - echo "made it to the rootfs!" --strstr "$CMDLINE" "rd.shell" && sh -i -+getargbool 0 rd.shell && sh -i - echo "Powering down." - mount -n -o remount,ro / - poweroff -f -diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh -index e337591..1485f72 100755 ---- a/test/TEST-17-LVM-THIN/test.sh -+++ b/test/TEST-17-LVM-THIN/test.sh -@@ -11,7 +11,7 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 - } -@@ -80,6 +80,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-20-NFS/client-init.sh b/test/TEST-20-NFS/client-init.sh -index a443289..eea162c 100755 ---- a/test/TEST-20-NFS/client-init.sh -+++ b/test/TEST-20-NFS/client-init.sh -@@ -1,4 +1,99 @@ - #!/bin/sh -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - exec >/dev/console 2>&1 - export TERM=linux -@@ -7,7 +102,7 @@ CMDLINE=$(while read line || [ -n "$line" ]; do echo $line;done < /proc/cmdline) - strstr() { [ "${1##*"$2"*}" != "$1" ]; } - - stty sane --if strstr "$CMDLINE" "rd.shell"; then -+if getargbool 0 rd.shell; then - [ -c /dev/watchdog ] && printf 'V' > /dev/watchdog - strstr "$(setsid --help)" "control" && CTTY="-c" - setsid $CTTY sh -i -diff --git a/test/TEST-20-NFS/hard-off.sh b/test/TEST-20-NFS/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-20-NFS/hard-off.sh -+++ b/test/TEST-20-NFS/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index 1dfdfc4..d7df71e 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -54,7 +54,7 @@ client_test() { - -net nic,macaddr=$mac,model=e1000 \ - -net socket,connect=127.0.0.1:12320 \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "$cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \ -+ -append "rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.testing - - if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nfs-OK $TESTDIR/client.img; then -@@ -335,6 +335,7 @@ test_setup() { - mkdir $TESTDIR/overlay - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - -diff --git a/test/TEST-30-ISCSI/client-init.sh b/test/TEST-30-ISCSI/client-init.sh -index 2e422cd..7279987 100755 ---- a/test/TEST-30-ISCSI/client-init.sh -+++ b/test/TEST-30-ISCSI/client-init.sh -@@ -1,4 +1,99 @@ - #!/bin/sh -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} - export PATH=/sbin:/bin:/usr/sbin:/usr/bin - exec >/dev/console 2>&1 - strstr() { [ "${1##*"$2"*}" != "$1" ]; } -@@ -13,7 +108,7 @@ while read dev fs fstype opts rest || [ -n "$dev" ]; do - break - done < /proc/mounts - #sh -i --if strstr "$CMDLINE" "rd.shell"; then -+if getargbool 0 rd.shell; then - strstr "$(setsid --help)" "control" && CTTY="-c" - setsid $CTTY sh -i - fi -diff --git a/test/TEST-30-ISCSI/hard-off.sh b/test/TEST-30-ISCSI/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-30-ISCSI/hard-off.sh -+++ b/test/TEST-30-ISCSI/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 1c06b06..83fd623 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -49,7 +49,7 @@ run_client() { - -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ - -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ - -net socket,connect=127.0.0.1:12330 \ -- -append "rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 $DEBUGFAIL $*" \ -+ -append "rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \ - -initrd $TESTDIR/initramfs.testing - if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then - echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" -@@ -214,6 +214,7 @@ test_setup() { - . $basedir/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - sudo $basedir/dracut.sh -l -i $TESTDIR/overlay / \ -diff --git a/test/TEST-40-NBD/hard-off.sh b/test/TEST-40-NBD/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-40-NBD/hard-off.sh -+++ b/test/TEST-40-NBD/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh -index 2061392..40e09b7 100755 ---- a/test/TEST-40-NBD/test.sh -+++ b/test/TEST-40-NBD/test.sh -@@ -58,7 +58,7 @@ client_test() { - -nographic \ - -net nic,macaddr=$mac,model=e1000 \ - -net socket,connect=127.0.0.1:12340 \ -- -append "$cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \ -+ -append "rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \ - -initrd $TESTDIR/initramfs.testing - - if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nbd-OK $TESTDIR/flag.img; then -@@ -227,6 +227,7 @@ make_encrypted_root() { - ) - inst_multiple mke2fs poweroff cp umount tune2fs - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_hook initqueue 01 ./create-root.sh - inst_hook initqueue/finished 01 ./finished-false.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules -diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh -index e6157af..d9ba45e 100755 ---- a/test/TEST-50-MULTINIC/client-init.sh -+++ b/test/TEST-50-MULTINIC/client-init.sh -@@ -1,4 +1,100 @@ - #!/bin/sh -+getcmdline() { -+ while read -r _line || [ -n "$_line" ]; do -+ printf "%s" "$line" -+ done ", we want the exact match -+ if [ "$_o" = "$1" ]; then -+ _val="1"; -+ unset _doecho -+ fi -+ continue -+ fi -+ -+ if [ "${_o#*=}" = "$_o" ]; then -+ # if cmdline argument has no "=", we assume "=1" -+ _val="1"; -+ unset _doecho -+ continue -+ fi -+ -+ _val="${_o#*=}" -+ _doecho=1 -+ fi -+ done -+ if [ -n "$_val" ]; then -+ [ "x$_doecho" != "x" ] && echo "$_val"; -+ return 0; -+ fi -+ return 1; -+} -+ -+getarg() { -+ local _deprecated _newoption -+ while [ $# -gt 0 ]; do -+ case $1 in -+ -d) _deprecated=1; shift;; -+ -y) if _dogetarg $2 >/dev/null; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption' instead." || warn "Option '$2' is deprecated." -+ fi -+ echo 1 -+ return 0 -+ fi -+ _deprecated=0 -+ shift 2;; -+ -n) if _dogetarg $2 >/dev/null; then -+ echo 0; -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$2' is deprecated, use '$_newoption=0' instead." || warn "Option '$2' is deprecated." -+ fi -+ return 1 -+ fi -+ _deprecated=0 -+ shift 2;; -+ *) if [ -z "$_newoption" ]; then -+ _newoption="$1" -+ fi -+ if _dogetarg $1; then -+ if [ "$_deprecated" = "1" ]; then -+ [ -n "$_newoption" ] && warn "Kernel command line option '$1' is deprecated, use '$_newoption' instead." || warn "Option '$1' is deprecated." -+ fi -+ return 0; -+ fi -+ _deprecated=0 -+ shift;; -+ esac -+ done -+ return 1 -+} -+ -+getargbool() { -+ local _b -+ unset _b -+ local _default -+ _default="$1"; shift -+ _b=$(getarg "$@") -+ [ $? -ne 0 -a -z "$_b" ] && _b="$_default" -+ if [ -n "$_b" ]; then -+ [ $_b = "0" ] && return 1 -+ [ $_b = "no" ] && return 1 -+ [ $_b = "off" ] && return 1 -+ fi -+ return 0 -+} -+ - exec >/dev/console 2>&1 - set -x - export PATH=/sbin:/bin:/usr/sbin:/usr/bin -@@ -20,5 +116,5 @@ done - echo "$IFACES" - } > /dev/sda - --strstr "$CMDLINE" "rd.shell" && sh -i -+getargbool 0 rd.shell && sh -i - poweroff -f -diff --git a/test/TEST-50-MULTINIC/hard-off.sh b/test/TEST-50-MULTINIC/hard-off.sh -index 12c3d5a..01acb19 100755 ---- a/test/TEST-50-MULTINIC/hard-off.sh -+++ b/test/TEST-50-MULTINIC/hard-off.sh -@@ -1,3 +1,3 @@ - #!/bin/sh --getarg rd.shell || poweroff -f --getarg failme && poweroff -f -+getargbool 0 rd.shell || poweroff -f -+getargbool 0 failme && poweroff -f -diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh -index e0bf7d2..656c237 100755 ---- a/test/TEST-50-MULTINIC/test.sh -+++ b/test/TEST-50-MULTINIC/test.sh -@@ -54,7 +54,7 @@ client_test() { - -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ - -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "$cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ -+ -append "rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ - -initrd "$TESTDIR"/initramfs.testing - - { read OK; read IFACES; } < "$TESTDIR"/client.img -@@ -270,6 +270,7 @@ test_setup() { - . "$basedir"/dracut-init.sh - inst_multiple poweroff shutdown - inst_hook shutdown-emergency 000 ./hard-off.sh -+ inst_hook emergency 000 ./hard-off.sh - inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules - ) - diff --git a/0086-test-TEST-99-RPM-fixed-test-suite.patch b/0086-test-TEST-99-RPM-fixed-test-suite.patch deleted file mode 100644 index e772901..0000000 --- a/0086-test-TEST-99-RPM-fixed-test-suite.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 00929425314d4a661c441397a56b163bbaab3de4 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 9 Jun 2016 18:14:45 +0200 -Subject: [PATCH] test/TEST-99-RPM: fixed test suite - -- cope with dnf vs yum -- fixed find arguments -- make script fail, if command fails ---- - test/TEST-99-RPM/test.sh | 25 ++++++++++++++----------- - 1 file changed, 14 insertions(+), 11 deletions(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index d0c89e5..31520f1 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -5,6 +5,7 @@ $TESTDIR - - test_run() { - set -x -+ set -e - export rootdir=$TESTDIR/root - - mkdir -p $rootdir -@@ -13,15 +14,17 @@ test_run() { - mkdir -p "$rootdir/sys" - mkdir -p "$rootdir/dev" - --trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; }; exit $ret;' EXIT --trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; }; exit 1;' SIGINT -+trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit $ret;' EXIT -+trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit 1;' SIGINT - - mount --bind /proc "$rootdir/proc" - mount --bind /sys "$rootdir/sys" - mount -t devtmpfs devtmpfs "$rootdir/dev" - -- yum --nogpgcheck --releasever=/ --installroot "$rootdir"/ install -y \ -- yum \ -+ dnf_or_yum=yum -+ command -v dnf >/dev/null && dnf_or_yum=dnf -+ $dnf_or_yum --nogpgcheck --installroot "$rootdir"/ install --allowerasing -y \ -+ $dnf_or_yum \ - passwd \ - rootfiles \ - systemd \ -@@ -37,9 +40,9 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - - cat >"$rootdir"/test.sh < /test.output -+rpm -Va |& grep -F -v '85-display-manager.preset' &> /test.output - find / -xdev -type f -not -path '/var/*' \ - -not -path '/usr/lib/modules/*/modules.*' \ - -not -path '/etc/*-' \ -@@ -50,19 +53,19 @@ find / -xdev -type f -not -path '/var/*' \ - -not -path '/etc/nsswitch.conf.bak' \ - -not -path '/etc/iscsi/initiatorname.iscsi' \ - -not -path '/boot/*0-rescue*' \ -- -not -patch '/usr/share/mime/*' \ -- -not -patch '/etc/crypto-policies/*' \ -+ -not -path '/usr/share/mime/*' \ -+ -not -path '/etc/crypto-policies/*' \ - -not -path '/dev/null' \ - -not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \ - -not -path "/boot/\$(cat /etc/machine-id)/*" \ - -exec rpm -qf '{}' ';' | \ -- grep -F 'not owned' &> /test.output --exit -+ grep -F 'not owned' &>> /test.output || : -+exit 0 - EOF - - chmod 0755 "$rootdir/test.sh" - -- chroot "$rootdir" /test.sh -+ chroot "$rootdir" /test.sh || : - - if [[ -s "$rootdir"/test.output ]]; then - failed=1 diff --git a/0087-test-handle-kernel-panic-in-testsuite.patch b/0087-test-handle-kernel-panic-in-testsuite.patch deleted file mode 100644 index 5fae223..0000000 --- a/0087-test-handle-kernel-panic-in-testsuite.patch +++ /dev/null @@ -1,310 +0,0 @@ -From 36867f1abf5d82106447fa4d25275471c0406a56 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 10 Jun 2016 08:53:01 +0200 -Subject: [PATCH] test: handle kernel panic in testsuite - -- reboot kernel on panic -- qemu don't reboot ---- - test/TEST-01-BASIC/test.sh | 3 ++- - test/TEST-02-SYSTEMD/test.sh | 3 ++- - test/TEST-03-USR-MOUNT/test.sh | 3 ++- - test/TEST-04-FULL-SYSTEMD/test.sh | 3 ++- - test/TEST-10-RAID/test.sh | 3 ++- - test/TEST-11-LVM/test.sh | 3 ++- - test/TEST-12-RAID-DEG/test.sh | 3 ++- - test/TEST-13-ENC-RAID-LVM/test.sh | 9 ++++++--- - test/TEST-14-IMSM/test.sh | 3 ++- - test/TEST-15-BTRFSRAID/test.sh | 3 ++- - test/TEST-16-DMSQUASH/test.sh | 3 ++- - test/TEST-17-LVM-THIN/test.sh | 3 ++- - test/TEST-20-NFS/test.sh | 6 ++++-- - test/TEST-30-ISCSI/test.sh | 6 ++++-- - test/TEST-40-NBD/test.sh | 6 ++++-- - test/TEST-50-MULTINIC/test.sh | 6 ++++-- - 16 files changed, 44 insertions(+), 22 deletions(-) - -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index ab84074..e74c673 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -14,7 +14,8 @@ test_run() { - -m 256M -smp 2 -nographic \ - -net none \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing || return 1 - grep -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1 - } -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -index 350cff8..6189561 100755 ---- a/test/TEST-02-SYSTEMD/test.sh -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -10,7 +10,8 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1 - } -diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh -index ed76d35..c515613 100755 ---- a/test/TEST-03-USR-MOUNT/test.sh -+++ b/test/TEST-03-USR-MOUNT/test.sh -@@ -21,7 +21,8 @@ client_run() { - -m 256M -smp 2 -nographic \ - -net none \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - - if (($? != 0)); then -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index 88711ef..3baabb4 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -22,7 +22,8 @@ client_run() { - -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - - if (($? != 0)); then -diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh -index 2d09314..5324457 100755 ---- a/test/TEST-10-RAID/test.sh -+++ b/test/TEST-10-RAID/test.sh -@@ -12,7 +12,8 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 - } -diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh -index 97c2f97..cf7d376 100755 ---- a/test/TEST-11-LVM/test.sh -+++ b/test/TEST-11-LVM/test.sh -@@ -11,7 +11,8 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 - } -diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh -index 09d78dd..4c313eb 100755 ---- a/test/TEST-12-RAID-DEG/test.sh -+++ b/test/TEST-12-RAID-DEG/test.sh -@@ -19,7 +19,8 @@ client_run() { - -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2.img.new \ - -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img.new \ - -net none \ -- -append "$* root=LABEL=root rw rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \ -+ -no-reboot \ -+ -append "panic=1 $* root=LABEL=root rw rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \ - -initrd $TESTDIR/initramfs.testing - if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then - echo "CLIENT TEST END: $@ [FAIL]" -diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh -index 3e8c3e2..b8fd26e 100755 ---- a/test/TEST-13-ENC-RAID-LVM/test.sh -+++ b/test/TEST-13-ENC-RAID-LVM/test.sh -@@ -19,7 +19,8 @@ test_run() { - -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 - echo "CLIENT TEST END: [OK]" -@@ -32,7 +33,8 @@ test_run() { - -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1 - echo "CLIENT TEST END: [OK]" -@@ -45,7 +47,8 @@ test_run() { - -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ -+ -no-reboot \ -+ -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1 - echo "CLIENT TEST END: [OK]" -diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh -index 9083fd5..f9f03b7 100755 ---- a/test/TEST-14-IMSM/test.sh -+++ b/test/TEST-14-IMSM/test.sh -@@ -15,7 +15,8 @@ client_run() { - -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2 \ - -m 256M -nographic \ - -net none \ -- -append "$* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then - echo "CLIENT TEST END: $@ [FAIL]" -diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh -index 281f856..adf31b1 100755 ---- a/test/TEST-15-BTRFSRAID/test.sh -+++ b/test/TEST-15-BTRFSRAID/test.sh -@@ -11,7 +11,8 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - dd if=$DISKIMAGE bs=512 count=4 skip=2048 | grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1 - } -diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh -index 4d72470..876d910 100755 ---- a/test/TEST-16-DMSQUASH/test.sh -+++ b/test/TEST-16-DMSQUASH/test.sh -@@ -22,7 +22,8 @@ test_run() { - -m 256M -smp 2 \ - -nographic \ - -net none \ -- -append "root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ - -initrd "$TESTDIR"/initramfs.testing - - # mediacheck test with qemu GUI -diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh -index 1485f72..1ad9ba6 100755 ---- a/test/TEST-17-LVM-THIN/test.sh -+++ b/test/TEST-17-LVM-THIN/test.sh -@@ -11,7 +11,8 @@ test_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -m 256M -smp 2 -nographic \ - -net none \ -- -append "root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ -+ -no-reboot \ -+ -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ - -initrd $TESTDIR/initramfs.testing - grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1 - } -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index d7df71e..222bd24 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -20,7 +20,8 @@ run_server() { - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -serial ${SERIAL:-null} \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ -+ -no-reboot \ -+ -append "panic=1 rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.server \ - -pidfile $TESTDIR/server.pid -daemonize || return 1 - sudo chmod 644 $TESTDIR/server.pid || return 1 -@@ -54,7 +55,8 @@ client_test() { - -net nic,macaddr=$mac,model=e1000 \ - -net socket,connect=127.0.0.1:12320 \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \ -+ -no-reboot \ -+ -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.testing - - if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nfs-OK $TESTDIR/client.img; then -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 83fd623..63944b3 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -25,7 +25,8 @@ run_server() { - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -net nic,macaddr=52:54:00:12:34:57,model=e1000 \ - -net socket,listen=127.0.0.1:12330 \ -- -append "root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ -+ -no-reboot \ -+ -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \ - -initrd $TESTDIR/initramfs.server \ - -pidfile $TESTDIR/server.pid -daemonize || return 1 - sudo chmod 644 $TESTDIR/server.pid || return 1 -@@ -49,7 +50,8 @@ run_client() { - -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ - -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ - -net socket,connect=127.0.0.1:12330 \ -- -append "rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \ -+ -no-reboot \ -+ -append "panic=1 rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \ - -initrd $TESTDIR/initramfs.testing - if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then - echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]" -diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh -index 40e09b7..8d49b05 100755 ---- a/test/TEST-40-NBD/test.sh -+++ b/test/TEST-40-NBD/test.sh -@@ -22,7 +22,8 @@ run_server() { - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -net socket,listen=127.0.0.1:12340 \ - -serial $SERIAL \ -- -append "root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \ -+ -no-reboot \ -+ -append "panic=1 root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1 - sudo chmod 644 $TESTDIR/server.pid || return 1 - -@@ -58,7 +59,8 @@ client_test() { - -nographic \ - -net nic,macaddr=$mac,model=e1000 \ - -net socket,connect=127.0.0.1:12340 \ -- -append "rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \ -+ -no-reboot \ -+ -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \ - -initrd $TESTDIR/initramfs.testing - - if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nbd-OK $TESTDIR/flag.img; then -diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh -index 656c237..ef27682 100755 ---- a/test/TEST-50-MULTINIC/test.sh -+++ b/test/TEST-50-MULTINIC/test.sh -@@ -20,7 +20,8 @@ run_server() { - -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ - -serial ${SERIAL:-null} \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ -+ -no-reboot \ -+ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ - -initrd "$TESTDIR"/initramfs.server \ - -pidfile "$TESTDIR"/server.pid -daemonize || return 1 - sudo chmod 644 -- "$TESTDIR"/server.pid || return 1 -@@ -54,7 +55,8 @@ client_test() { - -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ - -net nic,macaddr=52:54:00:12:34:$mac3,model=e1000 \ - -watchdog i6300esb -watchdog-action poweroff \ -- -append "rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ -+ -no-reboot \ -+ -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \ - -initrd "$TESTDIR"/initramfs.testing - - { read OK; read IFACES; } < "$TESTDIR"/client.img diff --git a/0088-systemd-add-missing-.slice-unit.patch b/0088-systemd-add-missing-.slice-unit.patch deleted file mode 100644 index 0ed4f57..0000000 --- a/0088-systemd-add-missing-.slice-unit.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 8261d2367ee673e24d03306b9623f4f3070dae5b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 22 Jun 2016 18:11:28 +0200 -Subject: [PATCH] systemd: add missing -.slice unit - ---- - modules.d/00systemd/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index dcee08b..e4260c7 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -122,6 +122,7 @@ install() { - \ - $systemdsystemunitdir/slices.target \ - $systemdsystemunitdir/system.slice \ -+ $systemdsystemunitdir/-.slice \ - \ - $tmpfilesdir/systemd.conf \ - \ diff --git a/0089-dracut-systemd-.service-conflict-with-shutdown-targe.patch b/0089-dracut-systemd-.service-conflict-with-shutdown-targe.patch deleted file mode 100644 index 4215e16..0000000 --- a/0089-dracut-systemd-.service-conflict-with-shutdown-targe.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c000a21c25bd436f2b3cc2076cb7025cc82d2807 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 22 Jun 2016 18:12:19 +0200 -Subject: [PATCH] dracut-systemd/*.service: conflict with shutdown target - -make reboot/poweroff/halt work - -also conflict with emergency.target ---- - modules.d/98dracut-systemd/dracut-cmdline-ask.service | 2 ++ - modules.d/98dracut-systemd/dracut-cmdline.service | 2 ++ - modules.d/98dracut-systemd/dracut-emergency.service | 5 +++-- - modules.d/98dracut-systemd/dracut-initqueue.service | 2 ++ - modules.d/98dracut-systemd/dracut-mount.service | 2 ++ - modules.d/98dracut-systemd/dracut-pre-mount.service | 2 ++ - modules.d/98dracut-systemd/dracut-pre-pivot.service | 3 +++ - modules.d/98dracut-systemd/dracut-pre-trigger.service | 2 ++ - modules.d/98dracut-systemd/dracut-pre-udev.service | 2 ++ - modules.d/98dracut-systemd/emergency.service | 2 ++ - 10 files changed, 22 insertions(+), 2 deletions(-) - -diff --git a/modules.d/98dracut-systemd/dracut-cmdline-ask.service b/modules.d/98dracut-systemd/dracut-cmdline-ask.service -index 8bc7d80..1685479 100644 ---- a/modules.d/98dracut-systemd/dracut-cmdline-ask.service -+++ b/modules.d/98dracut-systemd/dracut-cmdline-ask.service -@@ -16,6 +16,8 @@ Wants=systemd-journald.socket - ConditionPathExists=/usr/lib/initrd-release - ConditionKernelCommandLine=|rd.cmdline=ask - ConditionPathExistsGlob=|/etc/cmdline.d/*.conf -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/dracut-cmdline.service b/modules.d/98dracut-systemd/dracut-cmdline.service -index 6eeb991..c22856e 100644 ---- a/modules.d/98dracut-systemd/dracut-cmdline.service -+++ b/modules.d/98dracut-systemd/dracut-cmdline.service -@@ -20,6 +20,8 @@ ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cmdline - ConditionKernelCommandLine=|rd.break=cmdline - ConditionKernelCommandLine=|resume - ConditionKernelCommandLine=|noresume -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/dracut-emergency.service b/modules.d/98dracut-systemd/dracut-emergency.service -index a523671..61077bd 100644 ---- a/modules.d/98dracut-systemd/dracut-emergency.service -+++ b/modules.d/98dracut-systemd/dracut-emergency.service -@@ -12,14 +12,15 @@ Description=Dracut Emergency Shell - DefaultDependencies=no - After=systemd-vconsole-setup.service - Wants=systemd-vconsole-setup.service --Conflicts=emergency.service emergency.target -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=HOME=/ - Environment=DRACUT_SYSTEMD=1 - Environment=NEWROOT=/sysroot - WorkingDirectory=/ --ExecStart=/bin/dracut-emergency -+ExecStart=-/bin/dracut-emergency - ExecStopPost=-/bin/rm -f -- /.console_lock - Type=oneshot - StandardInput=tty-force -diff --git a/modules.d/98dracut-systemd/dracut-initqueue.service b/modules.d/98dracut-systemd/dracut-initqueue.service -index fa5ca56..20d6a8c 100644 ---- a/modules.d/98dracut-systemd/dracut-initqueue.service -+++ b/modules.d/98dracut-systemd/dracut-initqueue.service -@@ -18,6 +18,8 @@ Wants=systemd-udev-trigger.service - ConditionPathExists=/usr/lib/initrd-release - ConditionPathExists=|/lib/dracut/need-initqueue - ConditionKernelCommandLine=|rd.break=initqueue -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/dracut-mount.service b/modules.d/98dracut-systemd/dracut-mount.service -index 1b14f4a..baa8edb 100644 ---- a/modules.d/98dracut-systemd/dracut-mount.service -+++ b/modules.d/98dracut-systemd/dracut-mount.service -@@ -15,6 +15,8 @@ After=dracut-initqueue.service dracut-pre-mount.service - ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount - ConditionKernelCommandLine=|rd.break=mount -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/dracut-pre-mount.service b/modules.d/98dracut-systemd/dracut-pre-mount.service -index 1e4e29f..c7b123c 100644 ---- a/modules.d/98dracut-systemd/dracut-pre-mount.service -+++ b/modules.d/98dracut-systemd/dracut-pre-mount.service -@@ -17,6 +17,8 @@ After=cryptsetup.target - ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-mount - ConditionKernelCommandLine=|rd.break=pre-mount -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.service b/modules.d/98dracut-systemd/dracut-pre-pivot.service -index f5a85ce..20a872a 100644 ---- a/modules.d/98dracut-systemd/dracut-pre-pivot.service -+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.service -@@ -10,6 +10,7 @@ - [Unit] - Description=dracut pre-pivot and cleanup hook - Documentation=man:dracut-pre-pivot.service(8) -+DefaultDependencies=no - After=initrd.target initrd-parse-etc.service sysroot.mount - After=dracut-initqueue.service dracut-pre-mount.service dracut-mount.service - Before=initrd-cleanup.service -@@ -23,6 +24,8 @@ ConditionKernelCommandLine=|rd.break=cleanup - ConditionKernelCommandLine=|rd.break - ConditionPathExists=|/dev/root - ConditionPathExists=|/dev/nfs -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/dracut-pre-trigger.service b/modules.d/98dracut-systemd/dracut-pre-trigger.service -index 826b89b..2df9d7b 100644 ---- a/modules.d/98dracut-systemd/dracut-pre-trigger.service -+++ b/modules.d/98dracut-systemd/dracut-pre-trigger.service -@@ -17,6 +17,8 @@ Wants=dracut-pre-udev.service systemd-udevd.service - ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-trigger - ConditionKernelCommandLine=|rd.break=pre-trigger -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/dracut-pre-udev.service b/modules.d/98dracut-systemd/dracut-pre-udev.service -index 73740be..7fdeb6e 100644 ---- a/modules.d/98dracut-systemd/dracut-pre-udev.service -+++ b/modules.d/98dracut-systemd/dracut-pre-udev.service -@@ -20,6 +20,8 @@ ConditionKernelCommandLine=|rd.break=pre-udev - ConditionKernelCommandLine=|rd.driver.blacklist - ConditionKernelCommandLine=|rd.driver.pre - ConditionKernelCommandLine=|rd.driver.post -+Conflicts=shutdown.target emergency.target -+Before=shutdown.target emergency.target - - [Service] - Environment=DRACUT_SYSTEMD=1 -diff --git a/modules.d/98dracut-systemd/emergency.service b/modules.d/98dracut-systemd/emergency.service -index 35d9c31..969a300 100644 ---- a/modules.d/98dracut-systemd/emergency.service -+++ b/modules.d/98dracut-systemd/emergency.service -@@ -12,6 +12,8 @@ Description=Emergency Shell - DefaultDependencies=no - After=systemd-vconsole-setup.service - Wants=systemd-vconsole-setup.service -+Conflicts=shutdown.target -+Before=shutdown.target - - [Service] - Environment=HOME=/ diff --git a/0090-network-dhclient.conf-add-missing-commata.patch b/0090-network-dhclient.conf-add-missing-commata.patch deleted file mode 100644 index cabf49f..0000000 --- a/0090-network-dhclient.conf-add-missing-commata.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 7e51abc81f53c08e464decd4103e8c4ec25fef87 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 23 Jun 2016 14:24:40 +0200 -Subject: [PATCH] network/dhclient.conf: add missing commata - -options need to be seperated by , ---- - modules.d/40network/dhclient.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/40network/dhclient.conf b/modules.d/40network/dhclient.conf -index 7b06763..a1739ce 100644 ---- a/modules.d/40network/dhclient.conf -+++ b/modules.d/40network/dhclient.conf -@@ -3,4 +3,4 @@ option classless-routes code 121 = array of unsigned integer 8; - - request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, domain-search, host-name, -- root-path, interface-mtu classless-routes; -+ root-path, interface-mtu, classless-routes; diff --git a/0091-TEST-20-NFS-skip-root-dev-nfs-tests-with-systemd-v23.patch b/0091-TEST-20-NFS-skip-root-dev-nfs-tests-with-systemd-v23.patch deleted file mode 100644 index 03f6851..0000000 --- a/0091-TEST-20-NFS-skip-root-dev-nfs-tests-with-systemd-v23.patch +++ /dev/null @@ -1,36 +0,0 @@ -From f6fa9ef1010b39a4cb71edd5f1074b6716a3488c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 23 Jun 2016 16:36:43 +0200 -Subject: [PATCH] TEST-20-NFS: skip root=/dev/nfs tests with systemd v230 - ---- - test/TEST-20-NFS/test.sh | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index 222bd24..981cd82 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -114,14 +114,16 @@ test_nfsv3() { - client_test "NFSv3 root=dhcp DHCP path only" 52:54:00:12:34:00 \ - "root=dhcp" 192.168.50.1 -wsize=4096 || return 1 - -- client_test "NFSv3 Legacy root=/dev/nfs nfsroot=IP:path" 52:54:00:12:34:01 \ -- "root=/dev/nfs nfsroot=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1 -+ if [[ "$(systemctl --version)" != *"systemd 230"* ]] 2>/dev/null; then -+ client_test "NFSv3 Legacy root=/dev/nfs nfsroot=IP:path" 52:54:00:12:34:01 \ -+ "root=/dev/nfs nfsroot=192.168.50.1:/nfs/client" 192.168.50.1 -wsize=4096 || return 1 - -- client_test "NFSv3 Legacy root=/dev/nfs DHCP path only" 52:54:00:12:34:00 \ -- "root=/dev/nfs" 192.168.50.1 -wsize=4096 || return 1 -+ client_test "NFSv3 Legacy root=/dev/nfs DHCP path only" 52:54:00:12:34:00 \ -+ "root=/dev/nfs" 192.168.50.1 -wsize=4096 || return 1 - -- client_test "NFSv3 Legacy root=/dev/nfs DHCP IP:path" 52:54:00:12:34:01 \ -- "root=/dev/nfs" 192.168.50.2 -wsize=4096 || return 1 -+ client_test "NFSv3 Legacy root=/dev/nfs DHCP IP:path" 52:54:00:12:34:01 \ -+ "root=/dev/nfs" 192.168.50.2 -wsize=4096 || return 1 -+ fi - - client_test "NFSv3 root=dhcp DHCP IP:path" 52:54:00:12:34:01 \ - "root=dhcp" 192.168.50.2 -wsize=4096 || return 1 diff --git a/0092-fcoe-cleanup-fcoe.sh-don-t-copy-shm-files-to-state.patch b/0092-fcoe-cleanup-fcoe.sh-don-t-copy-shm-files-to-state.patch deleted file mode 100644 index 2bdce94..0000000 --- a/0092-fcoe-cleanup-fcoe.sh-don-t-copy-shm-files-to-state.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f8242a6a60c0cf5fb0cd51261f9b6c8570dc3031 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 27 Jun 2016 12:03:55 +0200 -Subject: [PATCH] fcoe/cleanup-fcoe.sh: don't copy shm files to state - -with systemd version 230, this is not necessary anymore -systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354 -because /dev/shm is selinux relabled. ---- - modules.d/95fcoe/cleanup-fcoe.sh | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh -index 5ff4d05..1872156 100644 ---- a/modules.d/95fcoe/cleanup-fcoe.sh -+++ b/modules.d/95fcoe/cleanup-fcoe.sh -@@ -4,7 +4,11 @@ - - if [ -e /var/run/lldpad.pid ]; then - lldpad -k -- mkdir -m 0755 -p /run/initramfs/state/dev/shm -- cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1 -- echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab -+ # with systemd version 230, this is not necessary anymore -+ # systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354 -+ if [ -z "$DRACUT_SYSTEMD" ]; then -+ mkdir -m 0755 -p /run/initramfs/state/dev/shm -+ cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1 -+ echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab -+ fi - fi diff --git a/0093-test-correct-cmdline-reading-functions.patch b/0093-test-correct-cmdline-reading-functions.patch deleted file mode 100644 index fb12865..0000000 --- a/0093-test-correct-cmdline-reading-functions.patch +++ /dev/null @@ -1,213 +0,0 @@ -From b039b20ec257901b89ecb32fa8d4ded676c0096c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 27 Jun 2016 12:05:37 +0200 -Subject: [PATCH] test: correct cmdline reading functions - ---- - test/TEST-01-BASIC/test-init.sh | 2 +- - test/TEST-02-SYSTEMD/test-init.sh | 4 ++-- - test/TEST-02-SYSTEMD/test.sh | 2 +- - test/TEST-03-USR-MOUNT/test-init.sh | 2 +- - test/TEST-04-FULL-SYSTEMD/test-init.sh | 2 +- - test/TEST-10-RAID/test-init.sh | 2 +- - test/TEST-11-LVM/test-init.sh | 2 +- - test/TEST-12-RAID-DEG/test-init.sh | 2 +- - test/TEST-14-IMSM/test-init.sh | 2 +- - test/TEST-16-DMSQUASH/test-init.sh | 2 +- - test/TEST-17-LVM-THIN/test-init.sh | 2 +- - test/TEST-20-NFS/client-init.sh | 2 +- - test/TEST-30-ISCSI/client-init.sh | 2 +- - test/TEST-50-MULTINIC/client-init.sh | 2 +- - 14 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/test/TEST-01-BASIC/test-init.sh b/test/TEST-01-BASIC/test-init.sh -index a8b6e39..78f124a 100755 ---- a/test/TEST-01-BASIC/test-init.sh -+++ b/test/TEST-01-BASIC/test-init.sh -@@ -2,7 +2,7 @@ - >/dev/watchdog - getcmdline() { - while read -r _line || [ -n "$_line" ]; do -- printf "%s" "$line" -+ printf "%s" "$_line" - done /dev/console 2>&1 - echo "dracut-root-block-success" >/dev/sda1 -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -index 6189561..9736278 100755 ---- a/test/TEST-02-SYSTEMD/test.sh -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on a ext3 filesystem" - KVERSION="${KVERSION-$(uname -r)}" - - # Uncomment this to debug failures --#DEBUGFAIL="rd.shell" -+#DEBUGFAIL="rd.shell=1 rd.break" - test_run() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ -diff --git a/test/TEST-03-USR-MOUNT/test-init.sh b/test/TEST-03-USR-MOUNT/test-init.sh -index 68eaff0..dc03359 100755 ---- a/test/TEST-03-USR-MOUNT/test-init.sh -+++ b/test/TEST-03-USR-MOUNT/test-init.sh -@@ -2,7 +2,7 @@ - >/dev/watchdog - getcmdline() { - while read -r _line || [ -n "$_line" ]; do -- printf "%s" "$line" -+ printf "%s" "$_line" - done /dev/watchdog - getcmdline() { - while read -r _line || [ -n "$_line" ]; do -- printf "%s" "$line" -+ printf "%s" "$_line" - done -Date: Thu, 12 May 2016 20:03:28 +0200 -Subject: [PATCH] 40network: Update iBFT scanning code to handle IPv6 - -IPv6 addresses should be specified in brackets so that the -ip= scanning code doesn't get confused. - -References: bnc#887542 - -Signed-off-by: Hannes Reinecke -Signed-off-by: Thomas Renninger ---- - modules.d/40network/net-lib.sh | 48 +++++++++++++++++++++++++++++++++++++----- - 1 file changed, 43 insertions(+), 5 deletions(-) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 005ad1b..9c1448d 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -241,23 +241,54 @@ ibft_to_cmdline() { - - [ -e /tmp/net.${dev}.has_ibft_config ] && continue - -+ [ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a) -+ # Skip invalid interfaces -+ (( $flags & 1 )) || continue -+ # Skip interfaces not used for booting -+ (( $flags & 2 )) || continue - [ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a) -- -- if [ -n "$dhcp" ]; then -- echo "ip=$dev:dhcp" -+ [ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a) -+ [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) -+ -+ if [ -n "$ip" ] ; then -+ case "$ip" in -+ *.*.*.*) -+ family=ipv4 -+ ;; -+ *:*) -+ family=ipv6 -+ ;; -+ esac -+ fi -+ if [ -n "$dhcp" ] || [ "$origin" -eq 3 ]; then -+ if [ "$family" = "ipv6" ] ; then -+ echo "ip=$dev:dhcp6" -+ else -+ echo "ip=$dev:dhcp" -+ fi - elif [ -e ${iface}/ip-addr ]; then -- [ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a) - # skip not assigned ip adresses - [ "$ip" = "0.0.0.0" ] && continue - [ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a) - [ "$gateway" = "0.0.0.0" ] && unset $gateway - [ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a) -+ [ -e ${iface}/prefix-len ] && prefix=$(read a < ${iface}/prefix-len; echo $a) - [ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a) - [ "$dns1" = "0.0.0.0" ] && unset $dns1 - [ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a) - [ "$dns2" = "0.0.0.0" ] && unset $dns2 - [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) -- if [ -n "$ip" ] && [ -n "$mask" ]; then -+ if [ "$family" = "ipv6" ] ; then -+ if [ -n "$ip" ] ; then -+ [ -n "$prefix" ] || prefix=64 -+ ip="[${ip}/${prefix}]" -+ mask= -+ fi -+ if [ -n "$gw" ] ; then -+ gw="[${gw}]" -+ fi -+ fi -+ if [ -n "$ip" ] && [ -n "$mask" -o -n "$prefix" ]; then - echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}" - else - warn "${iface} does not contain a valid iBFT configuration" -@@ -439,6 +470,13 @@ ip_to_var() { - esac - ;; - esac -+ # Extract prefix length from CIDR notation -+ case $ip in -+ */*) -+ mask=${ip##*/} -+ ip=${ip%/*} -+ ;; -+ esac - - # ip= means anaconda-style static config argument cluster: - # ip= gateway= netmask= hostname= mtu= diff --git a/0095-dracut.sh-make-tmp-dirs-after-the-trap-function-is-i.patch b/0095-dracut.sh-make-tmp-dirs-after-the-trap-function-is-i.patch deleted file mode 100644 index f660473..0000000 --- a/0095-dracut.sh-make-tmp-dirs-after-the-trap-function-is-i.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 3889234f7116d7f0b39a609d5d65c490251f7d5e Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 29 Jun 2016 17:32:31 +0200 -Subject: [PATCH] dracut.sh: make tmp dirs after the trap function is installed - -otherwise a good timed ctrl-c will leave the tmp dir around ---- - dracut.sh | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/dracut.sh b/dracut.sh -index a50eaff..36607cf 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -823,13 +823,7 @@ readonly DRACUT_TMPDIR="$(mktemp -p "$TMPDIR/" -d -t dracut.XXXXXX)" - printf "%s\n" "dracut: mktemp -p '$TMPDIR/' -d -t dracut.XXXXXX failed." >&2 - exit 1 - } --readonly initdir="${DRACUT_TMPDIR}/initramfs" --mkdir "$initdir" - --if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then -- readonly early_cpio_dir="${DRACUT_TMPDIR}/earlycpio" -- mkdir "$early_cpio_dir" --fi - # clean up after ourselves no matter how we die. - trap ' - ret=$?; -@@ -840,6 +834,14 @@ trap ' - # clean up after ourselves no matter how we die. - trap 'exit 1;' SIGINT - -+readonly initdir="${DRACUT_TMPDIR}/initramfs" -+mkdir "$initdir" -+ -+if [[ $early_microcode = yes ]] || ( [[ $acpi_override = yes ]] && [[ -d $acpi_table_dir ]] ); then -+ readonly early_cpio_dir="${DRACUT_TMPDIR}/earlycpio" -+ mkdir "$early_cpio_dir" -+fi -+ - export DRACUT_RESOLVE_LAZY="1" - - if [[ $print_cmdline ]]; then diff --git a/0096-add-support-to-F2FS-filesystem-fsck.patch b/0096-add-support-to-F2FS-filesystem-fsck.patch deleted file mode 100644 index 2bf7be3..0000000 --- a/0096-add-support-to-F2FS-filesystem-fsck.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 9f521f76a007437083559dc2997570c88386d56c Mon Sep 17 00:00:00 2001 -From: tpg -Date: Thu, 30 Jun 2016 21:26:42 +0200 -Subject: [PATCH] add support to F2FS filesystem (fsck) - ---- - NEWS | 3 +++ - modules.d/03rescue/module-setup.sh | 2 +- - modules.d/95debug/module-setup.sh | 2 +- - modules.d/99fs-lib/fs-lib.sh | 5 +++++ - modules.d/99fs-lib/module-setup.sh | 5 ++++- - 5 files changed, 14 insertions(+), 3 deletions(-) - -diff --git a/NEWS b/NEWS -index 6d1cd0a..1ec8881 100644 ---- a/NEWS -+++ b/NEWS -@@ -56,6 +56,9 @@ systemd: - - add /etc/machine-info - - fixed systemd-escape call for names beginning with "-" - -+filesystems: -+- add support to F2FS filesystem (fsck) -+ - network: - - fix carrier detection - - correctly set mac address for ip=...:: -diff --git a/modules.d/03rescue/module-setup.sh b/modules.d/03rescue/module-setup.sh -index f9dfcda..9267914 100755 ---- a/modules.d/03rescue/module-setup.sh -+++ b/modules.d/03rescue/module-setup.sh -@@ -15,6 +15,6 @@ depends() { - install() { - inst_multiple -o ps grep more cat rm strace free showmount \ - ping netstat rpcinfo vi scp ping6 ssh \ -- fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck -+ fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck - } - -diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh -index 97b2a30..39debd8 100755 ---- a/modules.d/95debug/module-setup.sh -+++ b/modules.d/95debug/module-setup.sh -@@ -16,7 +16,7 @@ install() { - inst_multiple -o cat ls ps grep more cat rm strace free showmount \ - ping netstat rpcinfo vi scp ping6 ssh find vi \ - tcpdump cp less hostname mkdir \ -- fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck -+ fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck - - grep '^tcpdump:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd" - } -diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh -index 672d027..5c83155 100755 ---- a/modules.d/99fs-lib/fs-lib.sh -+++ b/modules.d/99fs-lib/fs-lib.sh -@@ -47,6 +47,11 @@ fsck_able() { - _drv="_drv=e2fsck fsck_drv_com" && - return 0 - ;; -+ f2fs) -+ type fsck.f2fs >/dev/null 2>&1 && -+ _drv="_drv=fsck.f2fs fsck_drv_com" && -+ return 0 -+ ;; - jfs) - type jfs_fsck >/dev/null 2>&1 && - _drv="_drv=jfs_fsck fsck_drv_com" && -diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh -index f4dbc94..a29a350 100755 ---- a/modules.d/99fs-lib/module-setup.sh -+++ b/modules.d/99fs-lib/module-setup.sh -@@ -20,6 +20,9 @@ echo_fs_helper() { - ext?) - echo -n " e2fsck " - ;; -+ f2fs) -+ echo -n " fsck.f2fs " -+ ;; - jfs) - echo -n " jfs_fsck " - ;; -@@ -68,7 +71,7 @@ install() { - _helpers="\ - umount mount /sbin/fsck* - xfs_db xfs_check xfs_repair xfs_metadump -- e2fsck jfs_fsck reiserfsck btrfsck -+ e2fsck fsck.f2fs jfs_fsck reiserfsck btrfsck - " - if [[ $hostonly ]]; then - _helpers="umount mount " diff --git a/0097-systemd-install-missing-drop-in-configs.patch b/0097-systemd-install-missing-drop-in-configs.patch deleted file mode 100644 index e3412e7..0000000 --- a/0097-systemd-install-missing-drop-in-configs.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5d013e5e3c69b0d36b4f5f37e921f83d6dd0c166 Mon Sep 17 00:00:00 2001 -From: Florian Albrechtskirchinger -Date: Wed, 6 Jul 2016 06:36:50 +0200 -Subject: [PATCH] systemd: install missing drop-in configs - -In host-only mode, install missing drop-in configuration files for -/etc/systemd/{journal.conf,system.conf}. ---- - modules.d/00systemd/module-setup.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh -index e4260c7..51904c5 100755 ---- a/modules.d/00systemd/module-setup.sh -+++ b/modules.d/00systemd/module-setup.sh -@@ -162,7 +162,9 @@ install() { - if [[ $hostonly ]]; then - inst_multiple -H -o \ - /etc/systemd/journald.conf \ -+ /etc/systemd/journald.conf.d/*.conf \ - /etc/systemd/system.conf \ -+ /etc/systemd/system.conf.d/*.conf \ - /etc/hostname \ - /etc/machine-id \ - /etc/machine-info \ diff --git a/0098-fs-lib-add-crc32c-kernel-module-for-f2fs.patch b/0098-fs-lib-add-crc32c-kernel-module-for-f2fs.patch deleted file mode 100644 index 5c70ab1..0000000 --- a/0098-fs-lib-add-crc32c-kernel-module-for-f2fs.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f8ff380bd5aadc00061c6537c54ca14728ded6cd Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 7 Jul 2016 09:43:48 +0200 -Subject: [PATCH] fs-lib: add crc32c kernel module for f2fs - ---- - modules.d/99fs-lib/module-setup.sh | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh -index a29a350..2c5f4c0 100755 ---- a/modules.d/99fs-lib/module-setup.sh -+++ b/modules.d/99fs-lib/module-setup.sh -@@ -20,9 +20,9 @@ echo_fs_helper() { - ext?) - echo -n " e2fsck " - ;; -- f2fs) -- echo -n " fsck.f2fs " -- ;; -+ f2fs) -+ echo -n " fsck.f2fs " -+ ;; - jfs) - echo -n " jfs_fsck " - ;; -@@ -41,7 +41,7 @@ echo_fs_helper() { - include_fs_helper_modules() { - local dev=$1 fs=$2 - case "$fs" in -- xfs|btrfs) -+ xfs|btrfs|f2fs) - instmods crc32c - ;; - esac diff --git a/0099-dracut.png-Optimize-with-zopflipng-m.patch b/0099-dracut.png-Optimize-with-zopflipng-m.patch deleted file mode 100644 index ed06e75..0000000 --- a/0099-dracut.png-Optimize-with-zopflipng-m.patch +++ /dev/null @@ -1,282 +0,0 @@ -From 828257dd824771cff41374679abb01189666ddf3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Thu, 7 Jul 2016 13:53:39 +0300 -Subject: [PATCH] dracut.png: Optimize with zopflipng -m - ---- - dracut.png | Bin 7417 -> 6360 bytes - 1 file changed, 0 insertions(+), 0 deletions(-) - -diff --git a/dracut.png b/dracut.png -index b703f785833bb02c3d1420db70cdca906341226d..0d9265e31868dcee47a3af5a031081ea136d4b85 100644 -GIT binary patch -literal 6360 -zcmV;}7$@h6P)=}t>@ag0Zm3PWP+I2w86Gn;Gr#5CZXYu9DZP#*h8jkA?F2{9U5;_bH`1 -z0knuUi#3RCh%JdNip|UG&xJyvzy6x9`I;?kqp@uQ)sZ7dJ|gGxSpw93fj}TWJUop0 -z`g&AUR3H|ML7szvjZ7wkt*tH0&CTJ;l`ANfN(BHf$mf2yva<45zw}GLwD?I6>fytO -z?+`$q62{$l^UXJ-x3?FywY4w|1CHa+1UR^^3)3`VSr$z`1KYN-y1I(9XV2oynKLLB -zix=d2zWZCgfs}geJwoWkYT6^52*WBe%gSiqJ}a9x8Hs{#>dAARxXz# -z8^s9dzcs?)Fd6K#nCyM)t+y~aIVqnjIWW8o;5qvGl%W<}$9-FQ>bYk`x_ -zk34#(sjO%E`v<)0$|@rq3F9A+bSj0@r>8J9v=bW8U@(Zy%}pee$uf{j8+lC4rI1J! -zur8J_I;e>SQCks2OKljVos|e!2K0zVqhz=Ko{fzS{N3OE9pzzQuov|W4ajA)*hnUv -z3l}b$06y>AzU4cA^|}J}p@$waqVdq=K>xtd?%flnmOT9v3j8_D%*^4~vE#V&&O5Pd -z*Dhq`g4fp8=;9mc0{;5lCA=}6!2EiSpv5CW#G?V2hJl=2L^@kUCSOD_U|^!B8n=x$ -z;HH6E=n;>{sl)oaUViyy`JH33aDx~f9i|tYm^^_qQ)icRX}k6NzVG|o>n8e#W7his -zNSql_c{>MNf=eJ6lsSj_xkXG*U%;n)%BP^CqXUUVg3QX~OZekA7VsBuFN!Oh=x(XP -z?xAKh)yAlu@bq7K@daE5SC=+1vy{Tqe>jaDO>uno9i15O27_5kOA9?fv-gD;UZD2w -z*}I#bar(^Zrcg9=H-NvrZa@{?dVgzMs}qhytku;e0Zk(H`~t>ChA}mD9-sQDpNh7& -zHY_eKYL?Q)5C6e5N-i)l*o6L$YShHFi^tJW9YG`%K+rPbxGou*7F*rOA{sK#*ItEW -z+Q#v7t9bag&fxa327LJgy_lb$M^jT1Jwbco^UptzSUf8K??z{5cX4L!>IbhYP+_PK -zb+&g}PN_sUjK;#~Xm7>KFTIL8?zn>tU0PZqpwFII!O#B9C3H4b;=ryJM1q#MbR+*) -z@ZbV)91oNa1yn?W0;Yx9co@B{)glpTTo%Ue>8*s5S;nhpR$n<-Ez5WvOrm(bVOhlz;^ -z(A_f`0{YW`c@ew%8gSc08`^}K_wDV*4sm_UR7|N%B_^{{9t;I2c~DBs01P>9tBaw# -zCV<7+%P@*5)LUzqT}k14fBiJF`I25dp2PnA`(-gZWno{T=6asn{^XNS_FWgCnx1-4 -z67WL2qLMlW50Xc&Bb7>1<3#Vs8tw8w``4GScV{!k`x`Lc(||*x?TCdKkjf^11k)g} -zV$>J?oINkhS1(r3rjhuF;=m@mBSDJ>3J08J

3}E~A?Gx6!43zpD -z4a2$rIslabe6VLnPeALKElkzp;)To5NxkHijPmJRi5lA3T#2#XdUQ2bqDPLEB48Y3 -zBab=wH1kbG&E_JluCC~0pYPSSe^)=MDxxrzi)tf*V;48@N3YM9^Iom7gM))OIe8L0 -zcJx>NB1>f~E-Z-*6sc>eR7#Eu66NRNc)-EktrCPR?Ch)~ -zY=RkFd2n5ijFOqpL7}Xv!aRbx>F2ZJ#_(LXjJ$k~tR5Nc!k(cf{K0GU*vb~QcQA*Q -zz{S)mo5>sSaJ%j^Y->s9v=wH0Egz>&c1WgNL -z-SsdH_+YwX5Wrpj?}&NY2(F8CI!#v=3GvI<5+oS%*cH=7lo<$#SKNfI?k)`PsAn!K -z!0N^1qKey7+ZQAo5q1YN_U0|y8dL@KV0TxyYYG!=n-?w>(k8mPy7Wac6Zmt~kswo35he?LmJ&Px*9S^w0kl{uVnx`QSYH>W>hCFPD+5~+bKDYwk(dB_1L74i -zeJ-#}Ll&KLAJ|Mmt|86WKK-eJiF6P%^R73yepbu}+S -zk2j_g=$2H-G!&X^q5=kiqsgDl;0(irG7O{zh`G6Wq*ECbL_dqZmHb&2O29L9nuKr# -zvj&(-mGyZ?TQy6DW0#Wp9JmlQH8rTJszNvvv2^;kZ9#qNsi$@ckoB_qzUwPVoswj! -z-%VoKxtz?StGSXalAP0LsRq<7&$2kw&e_>Hx@q1nkm;h$oQnklD(+rHtpL>5*MmqT -zf^^md{c&U_jv>>8x4X -zim7%faIaqdy4pG{uP)OK#kF|y0xD-cGPWZOwWzm+q61CFf?LGW%p$h7l29InfGh>m -zD6*4mmAV(bJ9@;u4S9)RLcReR0X&tp38aDyR~`)y9GpD%6Tsi+?twO*mmbkbOrKvY -z9JclWcxAhQ%2Y~PYOX0)oJpq`Xbh8=Sl$BBqf%HpzmWx$qB|#qol6UIjO6eE)w7?_ -z6VOmFh~bf8S+H8roB1B1CE8lT+GZA(VW8wc2fnU2!_^oo*s_3nR73)tnXdT-gEY@2 -zn0DG%uFTxOoj_G$ACRD76^aE$Y5_u+5N1FSIVkTZRmX$K&K2_xT9KLGXT#a -zGZhG?n08TzJ<*-gU=GOV0j6B#k&)j?Z25pH7nT6&_@~2SLCH*+@vxcB$*fQnC8(4m -zIj{1T%s~HONHUEN0{HH2p{Y+l{rH5qPi;$63o9PxjRA{V77mA~kHS=f+E5w7R;GX# -zrBgIJJByjc)pDvN3ql=bzd$LLwIjk%vRsv$D3p>^Hjh*~?{~03Ej9Ep|5wy&Ww1%W -zeXFI_4b;Q}3|#)XltHyDQ`&>=`g=!@9C@g5TY&0{>kFd_p>RYlU=uQ!PALs4pWEUw -z>+YT^M(<3)po`BeXi!Vq%BfOqT|M?6+>eHahB7lbxjDgtiFM|(>su}+dTac1V=BjzRlp~>6%|#Qu_XtAd$$FshQfzOhDU?iZMRZeunaPR -zx>{XR#qDEZFWszG+`qdy1~*ViSxlxfc;U?xIDYm5me)4W+dqU6VW^=j6iTkJw}f=A -zfX!4^fXN^)z?-^avJ9EEDW9PPlBH`dm&N8*in($$9EBB%Vkwcujr}#{?QMNN3kwS@ -zXV=!(pod6+p`>kj%|ZR4A9|=(BJo6Lhfbw()KOd9ctetR$92#yZnd(qLN*Af1pCm= -zdL*-e3xfeCZx<1*sKJc~??AAkRshIgF_FefGL7}ktbl5x=(u!U1MpKNh{7Z7R2LPyR3aVYQ -z?h~-Qsw%1NZE>S`9F2{Q1aE0^31)z-rGAR5u~B^g-e!b?7QAp1U2)&On{e>Z0kTg9 -zK?#SW@?BM^uCAq3Rq447HMR9pq18)aQG;kSu0i7a71+B)$+5Mph%w1WTJ-za`Bi*m -ze>;l}*~TWIGcz-~4?xW?$@>z?bqR{Cx}vK-eE6}w*EISoWj;7MI;J#WnRG@@u!xB0 -zXrR6hSeL)GRn*C`zBOlHU_h6K>=b>$}#Zf*(F4SCLXw -z+S}VvS64^Z`;Jc;!ngj?B>wW1Y23ND6-_|U#q92~CaZ&H$$mT>gwQS=Y?$~k1Pww6U@Wd#}<>xBSGw70fv`RKi7 -z?k~(Mw01Omvem1GcaAWsCX*Xy5W@{``5i=$f0GwcBwU`QhI_ -zD@<{5_l<32tOE~B=AnK^qwK#v_oCMWE{F;IK+^g?&3=ejxU?4y+`}+o@qu#}6 -zEaP7U(V|_%JMX*$p*CA~0xV0#M?ZT6PyYTi{^+GE_>{Xw&{S7JH>Vsh!b4lx_4z<> -zeYR?bx?nHi`J-3ycW*A@-aSqDg1fuPLTN`b0})Wg-Pft=5egW?ueHU*ZoeT~gI#e4wyxgZp{km?S1r?INf-@>d0UO44FCO{$_L7?wDydTqrbmj -zSaK6D11{onwvo)LS~xP!-nI7+u~kJop;|5%7N4%DQi_b~TUj|l; -zw*cKC7r$?)4o4+wzd4=Y7RYQq0zH@wSPJ%%SLSSAOAH@BSd0DgndX{^&MYV|GRR0_ -zA9qhRpeIh8V1N`U(08ctH}AjyezG>7wP6KK_(KC6(;)hw76~e2r_#^ao{axCs6L=! -zAI#7{2G%K+BK~`5_!qzPuhu5qB6<1s*Ku>PNPRnS-~gku7H13jL$=RCyX!I_H=j7@^^ZcGEjM*$uRr* -z{PWMdt?F%UZ3O$g7jd7@`w$8}>ZIVFHvg^W3y0F-71z7P!6Y$%ch -zS2J5u0pnf$z%}b@>x5R{X&%~J^6}n5$>p7Pzo&uE)y@&@>6c%A$%a<66;J>(F_2dD -zHpl=3yqg$$V&V7Sf8S{xm$P5f#9_agC;;+aKF>53u-|<14SB!YXNAW1eE8uMP4YUQ -ze){QKEOl?aMOCTbu(7d0j!JK0*_#ZZ_oRN>j9G2tCQUk4udU>BkaFm#Q6@rl!F*Ly -z5W*w|3Sh3=&(Yv0yr8LELS}gyOq#zUu$kCSz>o^N+Nr{$LP^d|H33aF%b&~Sz$DV( -zGdSjZc|C$D;5BY?zWCw`CZjAzcHY}>zx^m0nIPQ~Oh7Rd>JSfR(&L8VBS%i1IC*Mk -z{g5H6XA}kH>uQ%1yBJhR8`Lc41e4yuW^jOV(@)GhRSsmjWReOqXe^-+pb@;dmL`J- -zC_vCwf&A5Z`nigiGgbKfaRp+C-VazdrV(ZV)-;ya8CaYc8p|r6;35;!BXe^3E3dqA -z4G?{x^!nX}aHs~)>wS%tRNS%Js*TNON((2~^s%AI6Xm6c4ru^@`XK;zP?re+5V*!Q -zS9Ubbp0hW0tdfAn#QE9e<>7d-q%R$y_hv;Q2P;92C?Hlf@N@knxNf>Cn}Sh+0oHq;Tv$N -zM*tS>$H@VgnAgR#I5?RA_SL?t+QnW9&%QTPK&BM})xgF&>h}BZzyG6Ps0kWt@hZImMQq@?6qupHlFW5> -zc8-v98KV$ugo-0WmCp}RtIw+`&dfzr`qkugN`hJth;C`!lFvW?eBp~PzPMO6vFJm! -z -zIkF>;I0Cb=+rtk(d~=Uluj{FLZ-jBiB$zGrAlc_605lVkaNdKy$tIhOXl`z<(?IIw -zTZU=SBb4a?bbZvv(G+zsWg2UAs1;YR|xbN?FFc1a>U0tFm79-bhwdD-zpptVEa_0u6{r{ -z!S*7wtOqRUShqYD_|fvxQ8j0$mDE_uiv{X;Y0Xg6RGt&qC4#zG-g}`2K2I8p%#~A_ -ztL*4klCLVrh(3O-=N}Q+?RD+ydTIG&X|G%EBooB6@n*XhNg`q^Gb0Iu8UPvrut;fn+kJ8c`A$vMhnm9!Eu2$dUY^q>aB-qrVmgW*U -zlts$h7d-jolM7T-NrdV3fPGIFCAZWtZq(dYnoELDGIlnt22t8V^6=_+N5g_)F9{qMU|cuu%XcY22cmv;Q#s?ggOXy -au>Ap10twlpugmxV0000Ymg8z5Mg0qk!WeE8UuF-aDqV(fGZalJQTR$`Gd7g -zLBJ6Ka!LlC34Jv!{ekbl{&!;IJltdhUeX7sSp=B)xC8_{_&H+*2L}s6y*>P2IQTjX -z`uMpP?#nS?VKD`1sVbX>6zvs3UooMJ7owXo_IJX2YLcGGcS;q}r&4K=a6Zpp0^+{Jl$#HQb@zH9$Rk4cc9)oRc~)h_Nc113cB@Kefq;-0N0l4F*gGmBj> -z_3f|<2PcdCxo)sQX<&au?f(30hM8Z3PWS8t&okP-cS$z -zb+2&=+DUrMs(eeX`eB;6%eW+Lr>+?aFMVySz>`3S=chzAg-;brZ_kiV1(staO)9-x -zqwTloi?xl)OJ1eXIQ{d+;I8rQ(Rl(n*-j73YO@3GqGzruyD~qG3OZ1Cw$iNLNHA|~ -z>$pfUngt!`W#2@;mNe#cbZvL>iMEJQK9`a7G=;mQO9OP+;4AgfYczxT)vH&p$D9nQ -z@V_7blOsb19!9c4Ak$(bdb8wUdrO+*L>(yxUQs|96xXNoUx9`3JoZ -zNj%&A`!|1AvzqFOqfJnsRo%Z4#u|(MJC~q?pL#r0j!EC1%5M6 -z-O(q^#93MiUz{I$)9aRd#FnP3S2&5%gUiT2J7(G4tkM2C4jmcM_!1O2U5n<;CHlG8 -zwq^Ru?j}j-e)OQ}>RsL#LS?1RHIp(uDKj%YqoMzFo)8u2Rf$LOBO{IWm`VPM@BC-D -zkTue??0HjLb8`%)hpJw};64n7TSKfXC^03T7{Z|{hp6BqA{j5U3a%|6WwUi~^dbme -zo%wv$@(}AVq{veu4b!u`+?iRSk=Yt`E7kd<6-k( -z;~y>3cQ*x{bi4XTEdtW)Z0RW-9>4?p>x-DJv4IGXrYcxpoj=0YSaJe;0|VMfTd=K}Q4$1HMJ0Ixo@ -zrAhJf)VfmWLwHzEix)8jLWq&sn*8{=ClHgLpAV`IZy50(-Ml!6j?NIk^mK)nXZGn9 -z5%@4}R@)HiQS+q6@llzoDT7kjm3VO2@W9w=6eocrbov-wyD-Mjb+1u0U1H|H`)^Je -z=k)Rl3g}HC&ge#4AnL6LiMLK|mX#;h{g)Fyjn)$_LV1uxg!ZAYXhHjW3P-MUY{KQG -z8eb0Ihv0(|F+HM0oSGx*yPNIKuDwkbiOisuP%qlxpECyhOj4C*CRB!afGy -zz`tY!pFQ(mFf0DxV`mT@{6H_HGAEQ~oTTsg%`>Tt@!eg1AdQPt#*pDHCB=AwS;WY?tt(^8XB5f37e9OY3PISY)^(U(RQw} -zr4kPC6cGiE7uA7{IhL_@0u~#7j&{!Fr8Lthw9mZRW1Oc>l?rkZz=NMr^7Lpuk9+y0 -zPjIm0`uh6Epc`@T9%us$5fLUn8bzOk>X|C3Ipg5m-QB}H%B99CE`bjsnI*iIRI7{! -zkzRLa0~{p@vfg`~l=EGo&5y`63H#n&^bH?JL?|{_ftDmtFKsrrwk+I7+KjI>`|0Tk -z|H-kc87)XD49}mg-2AQ5`Wl!7E>i+vXFONH4X)nn!lxOecsghD8^v(%XDMFmVDiDv -zh-wElnuxya0t6NAiiKH{(Hj!c&lyVtaXUfO% -zMr*#odUWm&6*$>&!m7ukW2E24j0B-1CnqPiTMvghnikq#Ue9=xV%u0y0;2_2a?K{A$`LynKw7Lc=!d^q$CGt=OAb9fIJSD6##}O$)gU5q;G3D%3iS7;R3W{1C#zR3& -zMK1o<)@U^o2rLOEOsPEg4!PSBQ+OrwdSJR!8)ztU-=7rgztOG|{zO5dCf91UZYNle -zb85YMHBZBP>)BY-DSe9n*)gT8tSm?z>en*pIp$Q$ol?!m!CqFKs~xf3*$L(WQnyMc -zw3@3%Sb%XE+2Td8jC{F^Rl6nQGy?_Psl!28X4Pq!s02|q!eL~Z7Y}PQA}!{9Ts17F -z2Q-l0-d?ISwMrqh{N3Itfm!^ZpCxrIIE2hql%AU=6CYZ~@~PExW;@_R#QDf)Q3u&25$0P_5O`(};-G -zq2q}8fZ$ohDOM@*RgJ6cL}L;?ijaw;7&mp|3-UA=54w2ZTL=rh+JWvt$(D#zvzct* -z(Vv=_ehU&(fo^ZT+sWXwfQ!B#5>ishP_9T*qF;!9+UCCos>S`MQyf -zd?6$0WblmHMNr>FFpqqOAP$7pPfZwd(Pt2BK=wqkK@CD3K|gTvdQLY@dj$+peJy!` -z^R~L@>n{V2O7VjOi6MznUn!75MHZd$*L(*z+1Ok3csVDU1oD{WIWTqDK_FFT4UZGz -z${%bSVkkgLqU9o%@8ik4N({;@99{S_F;Y`_sVB?Wy$9h5Dr^#-Ka^a#RD=r)4{7Ze -z1&MV6#ncA9&<0Un#Vj(e_N*$+Iv2r=G&@Rh7SRiap`cRblu?zn0cmF3t#oJ8~_?UcLxQzBlEP1X1akr^VDH@@ib1l;`*FQzdG -z7)I$RzHW$ulOG>EFZ^^I;f{=Zt3X?`+2Yl?7-z^kTi}dl{_uBa$K9j)p||QvJ5R31 -z0y3>y0vj>TXXW0;pFG^+MU=(u9jNXJ=t2H*f6};|k?v+zn`XY*onV23rm@*fOV;489i93r@JBJ~hjAb45 -z#}W+gtqS)F{-MH?5IEXF3 -zphOvk+t3@ZO_^Fwo;e!&7s>L8jRYD{fsv67_TI{nRfH`?%)N)oz$iE=45p{E$||0y -z@a2?MRJ;k`(vd0V%+Y<6K0=r@XaGyzr{WKE(}>W}8d$>2`i&NR?>S0mDeEz5<0I -zAJI6xbSRnhgwtF%9Ky7!EAk6_UiKPcq{Zz`U7`aLd5b@4$ejZKTWACJPSfDtT@A*{)G}%T$fVd>8@mvW4f-W)mFhXV{;)u8vIWF -z8u6isFeB;~HvITYnB134g)N7N|873rxW+WCkk@8ua%}2!R#ZIE>wP}d&XAu=cyU5@ -zmR0&uQ;KTjVL|0AGr-u2?(U*wWMu(jcQajqx%_I!vUPA?y7_ZCEPhH8PdE|Bs*R_d -z2M1s4sfgR>`o7f!Ud}#Rs&;vUHSK)6*30d*P?p8Tac0KWfS{lUTu>L-6O9aE83k~K -z(F=z%ebIt<9(uVm#wm9{qbg4{8fpI$z~JAv_I}2)gl^BMwfx>p2L`S>(_s%8>gl5L -z!;m;rzKN#<=b(5AvAn}SU<#nS8A2q$LZKcDRFohKuFa#@nGJP@KAxYwg*(9O+y?S$_ -zOHO60aF}8+wYr-5HXHci%~Ww<9xp5^ZWR7O?YP1aTc(3!drr|RecMF7DE82VQ%e3x -z3)98zbyBE(d0~Kz9@m>P3x4AUGoV<3!iU4xy0=Q!2V!wg{>)FISBYbsEsLbjB}VNO -z^&DIfilyIavB`X^-kRHmg>akJitntb~beauK^6O(ZwD(uqVWayD@18nOp-^i4G#=b6WroQS3g3SZC8elW0A?2# -zZ!Ef&k{G+|4F=lsFFUw24$NJ4j?mK3EEyI~^pk_J!Q*gJw~Tewy#6K! -zxEO!EyqcOvx*f6m@vzS3QxIFT*9Q`bym6x@bT>DZ0ICb`8Ahd)UBrC -zAfZoxxF-InY;Pa#%d>MyS~sjmT`Y_$sJpsy7Z(@*ClNH5X>qN2vSNl$BV1Cs5)pc3 -zjxUxJw!8GXC>-_pbVU&WTmziWNi?OLXHUGbM!)#eu^iH8b#mFKUr$4WAhrA*4^diL -z+5%D!AYf#2|FEvl_Fh1tygUR%ztQgE)XCxwGI|5rZG>zImxTk*bxf?uhs?!R-lO;j -zXu&+?mhwG_9S2b_5!+Q12=e>mt@{Ezk -z!4MKr4qJ5mZk?6a^7q^8bN{tr!u_swQlNW#`7N|lXrjRNd!DrIaS^!TEUX7GY -zB4gd0snV&9)5%y*fMYe`5w)+$emf@#EFeLd$9-sTclyxiZv#OIILLFT9v?ajj|-I^ -zjdvn|7Ofn4+VP0nf}g4uNVn5@YtMz|*w|R?09$T`bfh&g$JFyjzj_2w?m1z-8Bq8f -zCNP6laT3$iKRGi)iCp*nJH@81p|SnD`0fW}+@ -ztIbb|#DE&8P+L4X;kZP@rpNt0X`wGtRz*ccwZf>nriKDcp00ivS?brV+if#~^n$@) -z!g_D~wCamA^iTQxdb_az4S2+6QBub7c#gme< -zEb$~zJ3Px0>y3mdXRQQbRWH`WdExi#*w>A-h2ztuPDDW&MKiV;Pqp;W92$Cbd$UmJ-ksqs>;4AfNU22Yz1YoC$jwzoV58-EW?=eomDHNui0U}MjZ~ -zM{VdZl7mSorxJTs^3SO2J-Z2)w$7i?_qRYe9G4~9+S=$~(}Iqj?GgYLTV5VNIS~WY -z<@L4CX|&o^Gp=MTau-V-?Np5<5MSwUX0vd;jpB<<-qow4GuZ<_cMQ^N0JC>|qBX5`x=htYaP*CT{Une3DQJ=yMw_qb%dzD?J_l -z_V$lw7Z(cvRc+gXf8K#kT^oJcRSi|2-MlW@TFiAu>CV2N$DCIAb=&Y$5mk+ijeRP3 -z=9;Q_yKO)_S*qys9GgaIf2ji#42a{=eVE1%?JX@LK&LS=G124&OiCDXpiIF7Oy)@i -z^V3uq*Zr#!iX>b{-Y?D?DBen%>zJ>a$V0TZab0FP+C8`ZG#fDQ@q9zGPQR|_Dfb`r -zT~l_h1X;U5Bp{RALj8j77egbBiOEFEthJL@Vh8FiUy2^jAm&s_ex129`woLo& -zYk>+}L5odb>wZ7p0rW`H=!5Xpr^gw&$d1#EJi9wUp<5R0{r8F308)=y*qkWb#$aB! -zxWL>yQXS|Xl9Aym%Xz`M>P%BpQV2x*gI-o48+STu -z3$3oBI!+{uAH_J*!Llb@I&`@zc6tOW-Zh@dA)an-JR%AT -zcX`0xXx|`m$3*UAN@Z`UshkJM&i~3wvhOe*4uxZYZGkMwd#PLV+xqSCZ-e297bVP= -z7#j0kJKlq%vyY6M+7kvGluMJvviF4!boVD&8Z5tK30MFP7!V?J%%A`MuzD+q^t!)x -zEeYL}wZZ3!02waRlCs0daQ5RreFQdQHleGL=eM!d(0d33r7KfhZOZq%$NTg7ZS>`F -z>HST#B=b3H^v>ZP_EmJEm%-w~UbqS0tg$&-pzAZi#GS3DUXOd&0fA>_-A-#?wRkv%bZq5CthW8?0HTqA_*}iBPD&qZrw|7rwghRMU -UQS{yeSW{wYsp+dWg6-q}2kEwA&j0`b - diff --git a/0100-fs-lib-f2fs-needs-crc32-not-crc32c.patch b/0100-fs-lib-f2fs-needs-crc32-not-crc32c.patch deleted file mode 100644 index 8988d9a..0000000 --- a/0100-fs-lib-f2fs-needs-crc32-not-crc32c.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 34a42f9f49d4ad8897c4890af5b9a455e1335c66 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 8 Jul 2016 10:01:52 +0200 -Subject: [PATCH] fs-lib: f2fs needs crc32 not crc32c - -*sigh* ---- - modules.d/99fs-lib/module-setup.sh | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh -index 2c5f4c0..bd61838 100755 ---- a/modules.d/99fs-lib/module-setup.sh -+++ b/modules.d/99fs-lib/module-setup.sh -@@ -41,9 +41,12 @@ echo_fs_helper() { - include_fs_helper_modules() { - local dev=$1 fs=$2 - case "$fs" in -- xfs|btrfs|f2fs) -+ xfs|btrfs) - instmods crc32c - ;; -+ f2fs) -+ instmods crc32 -+ ;; - esac - } - diff --git a/0101-dracut-install.c-really-add-a-inbetween-destdir-and-.patch b/0101-dracut-install.c-really-add-a-inbetween-destdir-and-.patch deleted file mode 100644 index 231b847..0000000 --- a/0101-dracut-install.c-really-add-a-inbetween-destdir-and-.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 24113c3a1126c7f0e46e7f3c0866e5f8c715775a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Jul 2016 13:53:24 +0200 -Subject: [PATCH] dracut-install.c: really add a "/" inbetween destdir and - target - -using dracut-install with - -find . -print0 | xargs dracut-install -D /tmp/test -a - -resulted in /tmp/test./.... files ---- - install/dracut-install.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 9a0d53f..0cffa39 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -617,7 +617,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - - hashmap_put(items, i, i); - -- ret = asprintf(&fulldstpath, "%s%s", destrootdir, dst); -+ ret = asprintf(&fulldstpath, "%s/%s", destrootdir, dst); - if (ret < 0) { - log_error("Out of memory!"); - exit(EXIT_FAILURE); -@@ -704,7 +704,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res - if (lstat(fulldstpath, &sb) != 0) { - _cleanup_free_ char *absdestpath = NULL; - -- ret = asprintf(&absdestpath, "%s%s", destrootdir, abspath); -+ ret = asprintf(&absdestpath, "%s/%s", destrootdir, abspath); - if (ret < 0) { - log_error("Out of memory!"); - exit(EXIT_FAILURE); diff --git a/0102-fcoe-check-if-needed-for-hostonly.patch b/0102-fcoe-check-if-needed-for-hostonly.patch deleted file mode 100644 index 0308419..0000000 --- a/0102-fcoe-check-if-needed-for-hostonly.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 5a3773dbe6b48a872295d6a10f87e5329f0113a1 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 29 Jun 2016 10:49:00 +0200 -Subject: [PATCH] fcoe: check if needed for hostonly - -(cherry picked from commit f45726652fd8c6fd6b5560e1142753bac62dc426) ---- - modules.d/95fcoe-uefi/module-setup.sh | 8 ++++++++ - modules.d/95fcoe/module-setup.sh | 5 +++-- - 2 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh -index 5d8477c..c9ff3c2 100755 ---- a/modules.d/95fcoe-uefi/module-setup.sh -+++ b/modules.d/95fcoe-uefi/module-setup.sh -@@ -2,6 +2,14 @@ - - # called by dracut - check() { -+ local _fcoe_ctlr -+ [[ $hostonly ]] || [[ $mount_needs ]] && { -+ for c in /sys/bus/fcoe/devices/ctlr_* ; do -+ [ -L $c ] || continue -+ _fcoe_ctlr=$c -+ done -+ [ -z "$_fcoe_ctlr" ] && return 255 -+ } - [[ $hostonly ]] || [[ $mount_needs ]] && { - [ -d /sys/firmware/efi ] || return 255 - } -diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh -index 059bfde..531ea0d 100755 ---- a/modules.d/95fcoe/module-setup.sh -+++ b/modules.d/95fcoe/module-setup.sh -@@ -2,12 +2,13 @@ - - # called by dracut - check() { -+ local _fcoe_ctlr - [[ $hostonly ]] || [[ $mount_needs ]] && { - for c in /sys/bus/fcoe/devices/ctlr_* ; do - [ -L $c ] || continue -- fcoe_ctlr=$c -+ _fcoe_ctlr=$c - done -- [ -z "$fcoe_ctlr" ] && return 255 -+ [ -z "$_fcoe_ctlr" ] && return 255 - } - - require_binaries dcbtool fipvlan lldpad ip readlink fcoemon fcoeadm || return 1 diff --git a/0103-network-use-arping2-if-available.patch b/0103-network-use-arping2-if-available.patch deleted file mode 100644 index 06aea08..0000000 --- a/0103-network-use-arping2-if-available.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 9853791d376bee4a658d624424b32f7deae6ac79 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 14 Jul 2016 14:24:31 +0200 -Subject: [PATCH] network: use arping2, if available - -fixes https://github.com/dracutdevs/dracut/issues/135 ---- - modules.d/40network/dhclient-script.sh | 13 ++++++++++--- - modules.d/40network/ifup.sh | 13 ++++++++++--- - modules.d/40network/module-setup.sh | 5 +++-- - modules.d/40network/net-lib.sh | 6 +++++- - 4 files changed, 28 insertions(+), 9 deletions(-) - -diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh -index 94ee9d1..2eade35 100755 ---- a/modules.d/40network/dhclient-script.sh -+++ b/modules.d/40network/dhclient-script.sh -@@ -159,9 +159,16 @@ case $reason in - read layer2 < /sys/class/net/$netif/device/layer2 - fi - if [ "$layer2" != "0" ]; then -- if ! arping -f -q -D -c 2 -I $netif $new_ip_address ; then -- warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying" -- exit 1 -+ if command -v arping2 >/dev/null; then -+ if arping2 -q -C 1 -c 2 -I $netif $new_ip_address ; then -+ warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying" -+ exit 1 -+ fi -+ else -+ if ! arping -f -q -D -c 2 -I $netif $new_ip_address ; then -+ warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying" -+ exit 1 -+ fi - fi - fi - unset layer2 -diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh -index 41282e7..1461b91 100755 ---- a/modules.d/40network/ifup.sh -+++ b/modules.d/40network/ifup.sh -@@ -110,9 +110,16 @@ do_static() { - ip addr add $ip/$mask ${srv:+peer $srv} dev $netif - wait_for_ipv6_dad $netif - else -- if ! arping -f -q -D -c 2 -I $netif $ip; then -- warn "Duplicate address detected for $ip for interface $netif." -- return 1 -+ if command -v arping2 >/dev/null; then -+ if arping2 -q -C 1 -c 2 -I $netif $ip ; then -+ warn "Duplicate address detected for $ip for interface $netif." -+ return 1 -+ fi -+ else -+ if ! arping -f -q -D -c 2 -I $netif $ip ; then -+ warn "Duplicate address detected for $ip for interface $netif." -+ return 1 -+ fi - fi - ip addr flush dev $netif - ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 53b4b60..0501ffe 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -4,7 +4,8 @@ - check() { - local _program - -- require_binaries ip arping dhclient || return 1 -+ require_binaries ip dhclient || return 1 -+ require_any_binaries arping arping2 || return 1 - - return 255 - } -@@ -23,7 +24,7 @@ installkernel() { - # called by dracut - install() { - local _arch _i _dir -- inst_multiple ip arping dhclient sed awk -+ inst_multiple ip arping arping2 dhclient sed awk - inst_multiple -o ping ping6 - inst_multiple -o brctl - inst_multiple -o teamd teamdctl teamnl -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 9c1448d..92225c5 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -169,7 +169,11 @@ setup_net() { - fi - - if [ "$layer2" != "0" ] && [ -n "$dest" ] && ! strstr "$dest" ":"; then -- arping -q -f -w 60 -I $netif $dest || info "Resolving $dest via ARP on $netif failed" -+ if command -v arping2 >/dev/null; then -+ arping2 -q -C 1 -c 60 -I $netif $dest || info "Resolving $dest via ARP on $netif failed" -+ else -+ arping -q -f -w 60 -I $netif $dest || info "Resolving $dest via ARP on $netif failed" -+ fi - fi - unset layer2 - diff --git a/0104-dracut.conf.5.asc-remove-duplicate-i18n_install_all-.patch b/0104-dracut.conf.5.asc-remove-duplicate-i18n_install_all-.patch deleted file mode 100644 index dc7896a..0000000 --- a/0104-dracut.conf.5.asc-remove-duplicate-i18n_install_all-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From aaaf035aedd043302c6fec57ba9570afe7639aab Mon Sep 17 00:00:00 2001 -From: Yu Watanabe -Date: Wed, 20 Jul 2016 18:23:44 +0900 -Subject: [PATCH] dracut.conf.5.asc: remove duplicate i18n_install_all option - ---- - dracut.conf.5.asc | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc -index 8f362b2..318024a 100644 ---- a/dracut.conf.5.asc -+++ b/dracut.conf.5.asc -@@ -99,9 +99,6 @@ Configuration files must have the extension .conf; other extensions are ignored. - *hostonly_cmdline=*"__{yes|no}__":: - If set, store the kernel command line arguments needed in the initramfs - --*i18n_install_all=*"__{yes|no}__":: -- If set to yes, install all available fonts and keyboard files. -- - *persistent_policy=*"____":: - Use __ to address disks and partitions. - __ can be any directory name found in /dev/disk. diff --git a/0105-add-rd.emergency-reboot-poweroff-halt.patch b/0105-add-rd.emergency-reboot-poweroff-halt.patch deleted file mode 100644 index 4cf8988..0000000 --- a/0105-add-rd.emergency-reboot-poweroff-halt.patch +++ /dev/null @@ -1,107 +0,0 @@ -From c45e856a659a37537c107f7ef3e680abf60a96a5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 22 Jul 2016 13:32:47 +0200 -Subject: [PATCH] add rd.emergency=[reboot|poweroff|halt] - -specifies what action to execute in case of a critical failure ---- - dracut.cmdline.7.asc | 3 +++ - modules.d/98dracut-systemd/dracut-emergency.sh | 13 +++++++++++-- - modules.d/99base/dracut-lib.sh | 24 ++++++++++++++++-------- - 3 files changed, 30 insertions(+), 10 deletions(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index bf00719..a2d1f95 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -129,6 +129,9 @@ menuentry 'Live Fedora 20' --class fedora --class gnu-linux --class gnu --class - - Misc - ~~~~ -+**rd.emergency=**__[reboot|poweroff|halt]__:: -+ specify, what action to execute in case of a critical failure. -+ - **rd.driver.blacklist=**____[,____,...]:: - do not load kernel module . This parameter can be specified - multiple times. -diff --git a/modules.d/98dracut-systemd/dracut-emergency.sh b/modules.d/98dracut-systemd/dracut-emergency.sh -index 63311c2..548f64b 100755 ---- a/modules.d/98dracut-systemd/dracut-emergency.sh -+++ b/modules.d/98dracut-systemd/dracut-emergency.sh -@@ -11,7 +11,7 @@ source_conf /etc/conf.d - type plymouth >/dev/null 2>&1 && plymouth quit - - export _rdshell_name="dracut" action="Boot" hook="emergency" -- -+_emergency_action=$(getarg rd.emergency) - - if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then - source_hook "$hook" -@@ -32,9 +32,18 @@ else - export hook="shutdown-emergency" - warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." - source_hook "$hook" -- exit 1 -+ [ -z "$_emergency_action" ] && _emergency_action=halt - fi - - /bin/rm -f -- /.console_lock - -+case "$_emergency_action" in -+ reboot) -+ reboot || exit 1;; -+ poweroff) -+ poweroff || exit 1;; -+ halt) -+ halt || exit 1;; -+esac -+ - exit 0 -diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh -index 94e4614..060b3fe 100755 ---- a/modules.d/99base/dracut-lib.sh -+++ b/modules.d/99base/dracut-lib.sh -@@ -1111,6 +1111,8 @@ emergency_shell() - local _ctty - set +e - local _rdshell_name="dracut" action="Boot" hook="emergency" -+ local _emergency_action -+ - if [ "$1" = "-n" ]; then - _rdshell_name=$2 - shift 2 -@@ -1129,20 +1131,26 @@ emergency_shell() - source_hook "$hook" - echo - -+ _emergency_action=$(getarg rd.emergency) -+ [ -z "$_emergency_action" ] \ -+ && [ -e /run/initramfs/.die ] \ -+ && _emergency_action=halt -+ - if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then - _emergency_shell $_rdshell_name - else - warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line." -- # cause a kernel panic -- exit 1 -+ [ -z "$_emergency_action" ] && _emergency_action=halt - fi - -- if [ -e /run/initramfs/.die ]; then -- if [ -n "$DRACUT_SYSTEMD" ]; then -- systemctl --no-block --force halt -- fi -- exit 1 -- fi -+ case "$_emergency_action" in -+ reboot) -+ reboot || exit 1;; -+ poweroff) -+ poweroff || exit 1;; -+ halt) -+ halt || exit 1;; -+ esac - } - - # Retain the values of these variables but ensure that they are unexported diff --git a/0106-fips-module-add-missing-space.patch b/0106-fips-module-add-missing-space.patch deleted file mode 100644 index 2e99f47..0000000 --- a/0106-fips-module-add-missing-space.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 1c132d39a618e625e80b7d23a55ea6527180a5b0 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 28 Jul 2016 11:02:19 +0200 -Subject: [PATCH] fips-module: add missing space - ---- - modules.d/01fips/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh -index 7278347..65177a9 100755 ---- a/modules.d/01fips/module-setup.sh -+++ b/modules.d/01fips/module-setup.sh -@@ -17,7 +17,7 @@ installkernel() { - _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg " - _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 " - _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic " -- _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib" -+ _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib " - _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key ghash_s390 sha1_s390 sha512_s390" - - mkdir -m 0755 -p "${initdir}/etc/modprobe.d" diff --git a/0107-qemu-include-the-qemu_fw_cfg-kernel-module.patch b/0107-qemu-include-the-qemu_fw_cfg-kernel-module.patch deleted file mode 100644 index 81cb555..0000000 --- a/0107-qemu-include-the-qemu_fw_cfg-kernel-module.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 73db316ef2c935f4a80c39664f0ebbf9e0035c40 Mon Sep 17 00:00:00 2001 -From: David Michael -Date: Tue, 16 Aug 2016 13:43:18 -0700 -Subject: [PATCH] qemu: include the qemu_fw_cfg kernel module - -This adds support for /sys/firmware/qemu_fw_cfg on QEMU guests -started with the -fw_cfg option. ---- - modules.d/90qemu/module-setup.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/90qemu/module-setup.sh b/modules.d/90qemu/module-setup.sh -index 8cae124..9f8495a 100755 ---- a/modules.d/90qemu/module-setup.sh -+++ b/modules.d/90qemu/module-setup.sh -@@ -27,5 +27,6 @@ installkernel() { - ata_piix ata_generic pata_acpi cdrom sr_mod ahci \ - virtio_blk virtio virtio_ring virtio_pci \ - virtio_scsi virtio_console virtio_rng \ -- spapr-vscsi -+ spapr-vscsi \ -+ qemu_fw_cfg - } diff --git a/0108-network-support-macaddr-in-brackets.patch b/0108-network-support-macaddr-in-brackets.patch deleted file mode 100644 index 7082c9a..0000000 --- a/0108-network-support-macaddr-in-brackets.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 740c46c0224a187d6b5a42b4aa56e173238884cc Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 29 Jun 2016 12:27:37 +0200 -Subject: [PATCH] network: support macaddr in brackets [] - -ip=ens3:dhcp:1000 -ip=ens3:dhcp::54:52:00:ab:cd:ef -ip=ens3:dhcp::[54:52:00:ab:cd:ef] -ip=ens3:dhcp:1000:54:52:00:ab:cd:ef -ip=ens3:dhcp:1000:[54:52:00:ab:cd:ef] - -ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000 -ip=192.168.122.20::192.168.122.1:24:test:ens3:none::54:52:00:ab:cd:ef -ip=192.168.122.20::192.168.122.1:24:test:ens3:none::[54:52:00:ab:cd:ef] -ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:54:52:00:ab:cd:ef -ip=192.168.122.20::192.168.122.1:24:test:ens3:none:1000:[54:52:00:ab:cd:ef] - -ip=::::test:ens3:dhcp:1000 -ip=::::test:ens3:dhcp::54:52:00:ab:cd:ef -ip=::::test:ens3:dhcp::[54:52:00:ab:cd:ef] -ip=::::test:ens3:dhcp:1000:54:52:00:ab:cd:ef -ip=::::test:ens3:dhcp:1000:[54:52:00:ab:cd:ef] - -(cherry picked from commit 53e4ab71742fc1e5d8112c719c0d154d08815fa1) ---- - modules.d/40network/net-lib.sh | 124 ++++++++++++++++++++++++----------------- - 1 file changed, 74 insertions(+), 50 deletions(-) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index 92225c5..eb98f8e 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -447,60 +447,84 @@ ip_to_var() { - done - - unset ip srv gw mask hostname dev autoconf macaddr mtu dns1 dns2 -- case $# in -- 0) autoconf="error" ;; -- 1) autoconf=$1 ;; -- 2) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2 ;; -- 3) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3 ;; -- 4) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3; [ -n "$4" ] && macaddr=$4 ;; -- *) [ -n "$1" ] && ip=$1; [ -n "$2" ] && srv=$2; [ -n "$3" ] && gw=$3; [ -n "$4" ] && mask=$4; -- [ -n "$5" ] && hostname=$5; [ -n "$6" ] && dev=$6; [ -n "$7" ] && autoconf=$7; -- case "$8" in -- [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) -- dns1="$8" -- [ -n "$9" ] && dns2="$9" -- ;; -- [0-9]*) -- mtu="$8" -- if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then -- macaddr="${9}:${10}:${11}:${12}:${13}:${14}" -- fi -- ;; -- *) -- if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then -- macaddr="${9}:${10}:${11}:${12}:${13}:${14}" -- fi -- ;; -+ -+ if [ $# -eq 0 ]; then -+ autoconf="error" -+ return 0 -+ fi -+ -+ if [ $# -eq 1 ]; then -+ # format: ip={dhcp|on|any|dhcp6|auto6} -+ # or -+ # ip= means anaconda-style static config argument cluster -+ autoconf="$1" -+ -+ if strstr "$autoconf" "*.*.*.*"; then -+ # ip= means anaconda-style static config argument cluster: -+ # ip= gateway= netmask= hostname= mtu= -+ # ksdevice={link|bootif|ibft||} -+ ip="$autoconf" -+ gw=$(getarg gateway=) -+ mask=$(getarg netmask=) -+ hostname=$(getarg hostname=) -+ dev=$(getarg ksdevice=) -+ autoconf="none" -+ mtu=$(getarg mtu=) -+ -+ # handle special values for ksdevice -+ case "$dev" in -+ bootif|BOOTIF) dev=$(fix_bootif $(getarg BOOTIF=)) ;; -+ link) dev="" ;; # FIXME: do something useful with this -+ ibft) dev="" ;; # ignore - ibft is handled elsewhere - esac -+ fi -+ return 0 -+ fi -+ -+ if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" ]; then -+ # format: ip=:{dhcp|on|any|dhcp6|auto6}[:[][:]] -+ [ -n "$1" ] && dev="$1" -+ [ -n "$2" ] && autoconf="$2" -+ [ -n "$3" ] && mtu=$3 -+ if [ -z "$5" ]; then -+ macaddr="$4" -+ else -+ macaddr="${4}:${5}:${6}:${7}:${8}:${9}" -+ fi -+ return 0 -+ fi -+ -+ # format: ip=:[]:::::{none|off|dhcp|on|any|dhcp6|auto6|ibft}:[:[][:]] -+ -+ [ -n "$1" ] && ip=$1 -+ [ -n "$2" ] && srv=$2 -+ [ -n "$3" ] && gw=$3 -+ [ -n "$4" ] && mask=$4 -+ [ -n "$5" ] && hostname=$5 -+ [ -n "$6" ] && dev=$6 -+ [ -n "$7" ] && autoconf=$7 -+ case "$8" in -+ [0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*) -+ dns1="$8" -+ [ -n "$9" ] && dns2="$9" - ;; -- esac -- # Extract prefix length from CIDR notation -- case $ip in -- */*) -- mask=${ip##*/} -- ip=${ip%/*} -+ [0-9]*) -+ mtu="$8" -+ if [ -n "${9}" -a -z "${10}" ]; then -+ macaddr="${9}" -+ elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then -+ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" -+ fi - ;; -+ *) -+ if [ -n "${9}" -a -z "${10}" ]; then -+ macaddr="${9}" -+ elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then -+ macaddr="${9}:${10}:${11}:${12}:${13}:${14}" -+ fi -+ ;; - esac -- -- # ip= means anaconda-style static config argument cluster: -- # ip= gateway= netmask= hostname= mtu= -- # ksdevice={link|bootif|ibft||} -- if strglob "$autoconf" "*.*.*.*"; then -- ip="$autoconf" -- gw=$(getarg gateway=) -- mask=$(getarg netmask=) -- hostname=$(getarg hostname=) -- dev=$(getarg ksdevice=) -- autoconf="none" -- mtu=$(getarg mtu=) -- -- # handle special values for ksdevice -- case "$dev" in -- bootif|BOOTIF) dev=$(fix_bootif $(getarg BOOTIF=)) ;; -- link) dev="" ;; # FIXME: do something useful with this -- ibft) dev="" ;; # ignore - ibft is handled elsewhere -- esac -- fi -+ return 0 - } - - route_to_var() { diff --git a/0109-nfs-install-all-nfs-modules-non-hostonly.patch b/0109-nfs-install-all-nfs-modules-non-hostonly.patch deleted file mode 100644 index f75c431..0000000 --- a/0109-nfs-install-all-nfs-modules-non-hostonly.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 88f9d6140da2667b58ddde082ede0f99aead2078 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 22 Jul 2016 08:30:36 +0200 -Subject: [PATCH] nfs: install all nfs modules non-hostonly - -If nfs is used, we should include all nfs modules, in the case, where -$host_fs_types contains nfs. - -(cherry picked from commit b077d18963436f6771e7ce3c486bcb2ae80165db) ---- - modules.d/95nfs/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh -index 9767e57..0f87761 100755 ---- a/modules.d/95nfs/module-setup.sh -+++ b/modules.d/95nfs/module-setup.sh -@@ -25,7 +25,7 @@ depends() { - - # called by dracut - installkernel() { -- instmods =net/sunrpc =fs/nfs ipv6 nfs_acl nfs_layout_nfsv41_files -+ hostonly='' instmods =net/sunrpc =fs/nfs ipv6 nfs_acl nfs_layout_nfsv41_files - } - - cmdline() { diff --git a/0110-network-use-require_any_binary-instead-of-require_an.patch b/0110-network-use-require_any_binary-instead-of-require_an.patch deleted file mode 100644 index 63a9c46..0000000 --- a/0110-network-use-require_any_binary-instead-of-require_an.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 242c03d6fb45f2a291f2b924dedcf2237ad183ba Mon Sep 17 00:00:00 2001 -From: Xunlei Pang -Date: Fri, 19 Aug 2016 13:39:37 +0200 -Subject: [PATCH] network: use require_any_binary instead of - require_any_binaries - ---- - modules.d/40network/module-setup.sh | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh -index 0501ffe..4a10cf3 100755 ---- a/modules.d/40network/module-setup.sh -+++ b/modules.d/40network/module-setup.sh -@@ -5,7 +5,7 @@ check() { - local _program - - require_binaries ip dhclient || return 1 -- require_any_binaries arping arping2 || return 1 -+ require_any_binary arping arping2 || return 1 - - return 255 - } -@@ -24,7 +24,8 @@ installkernel() { - # called by dracut - install() { - local _arch _i _dir -- inst_multiple ip arping arping2 dhclient sed awk -+ inst_multiple ip dhclient sed awk -+ inst_multiple -o arping arping2 - inst_multiple -o ping ping6 - inst_multiple -o brctl - inst_multiple -o teamd teamdctl teamnl diff --git a/0111-TEST-20-NFS-remove-stale-pid-file.patch b/0111-TEST-20-NFS-remove-stale-pid-file.patch deleted file mode 100644 index af0816e..0000000 --- a/0111-TEST-20-NFS-remove-stale-pid-file.patch +++ /dev/null @@ -1,391 +0,0 @@ -From 1de836c76316ac2cbd752227ed1b4ab322420224 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 19 Aug 2016 15:33:59 +0200 -Subject: [PATCH] TEST-20-NFS: remove stale pid file - ---- - test/TEST-20-NFS/dhcpd.conf | 340 ++++++++++++++++++++-------------------- - test/TEST-20-NFS/server-init.sh | 2 + - test/TEST-20-NFS/test.sh | 2 +- - 3 files changed, 173 insertions(+), 171 deletions(-) - -diff --git a/test/TEST-20-NFS/dhcpd.conf b/test/TEST-20-NFS/dhcpd.conf -index a4f7fc1..4ba7301 100644 ---- a/test/TEST-20-NFS/dhcpd.conf -+++ b/test/TEST-20-NFS/dhcpd.conf -@@ -3,175 +3,175 @@ ddns-update-style none; - use-host-decl-names true; - - subnet 192.168.50.0 netmask 255.255.255.0 { -- option subnet-mask 255.255.255.0; -- option routers 192.168.50.1; -- next-server 192.168.50.1; -- server-identifier 192.168.50.1; -- option domain-name-servers 192.168.50.1; -- option domain-search "example.com"; -- option domain-name "other.com"; -- -- # MAC numbering scheme: -- # NFSv3: last octect starts at 0x00 and works up -- -- group { -- # NFSv3 root=dhcp or root={/dev/,}nfs, use server-id -- option root-path "/nfs/client"; -- -- host nfs3-1 { -- hardware ethernet 52:54:00:12:34:00; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv3 root=dhcp or root={/dev/,}nfs, use given IP -- option root-path "192.168.50.2:/nfs/client"; -- -- host nfs3-2 { -- hardware ethernet 52:54:00:12:34:01; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv3 root=dhcp, use protocol from root-path -- option root-path "nfs:192.168.50.3:/nfs/client"; -- -- host nfs3-3 { -- hardware ethernet 52:54:00:12:34:02; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv3 root=dhcp, use protocol, options from root-path -- option root-path "nfs:192.168.50.3:/nfs/client:wsize=4096"; -- -- host nfs3-4 { -- hardware ethernet 52:54:00:12:34:03; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv3 root=dhcp, nfsroot=/path and nfsroot=IP:/path testing -- -- host nfs3-5 { -- hardware ethernet 52:54:00:12:34:04; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv3 root=dhcp, use path, comma-separated options -- option root-path "/nfs/client,wsize=4096"; -- -- host nfs3-6 { -- hardware ethernet 52:54:00:12:34:05; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv3 root=dhcp, use IP, path, comma-separated options -- option root-path "192.168.50.2:/nfs/client,wsize=4096"; -- -- host nfs3-7 { -- hardware ethernet 52:54:00:12:34:06; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv3 root=dhcp, use proto, IP, path, comma-separated options -- option root-path "nfs:192.168.50.3:/nfs/client,wsize=4096"; -- -- host nfs3-8 { -- hardware ethernet 52:54:00:12:34:07; -- fixed-address 192.168.50.101; -- } -- } -- -- # MAC numbering scheme: -- # NFSv4: last octect starts at 0x80 and works up -- -- group { -- # NFSv4 root={/dev/,}nfs4, use server-id -- option root-path "/client"; -- -- host nfs4-1 { -- hardware ethernet 52:54:00:12:34:80; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv4 root={/dev/,}nfs4, use given IP -- option root-path "192.168.50.2:/client"; -- -- host nfs4-2 { -- hardware ethernet 52:54:00:12:34:81; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv4 root=dhcp, use profocol from root-path -- option root-path "nfs4:192.168.50.3:/client"; -- -- host nfs4-3 { -- hardware ethernet 52:54:00:12:34:82; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv4 root=dhcp, use profocol, options from root-path -- option root-path "nfs4:192.168.50.3:/client:wsize=4096"; -- -- host nfs4-4 { -- hardware ethernet 52:54:00:12:34:83; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv3 root=nfs4, nfsroot=/path and nfsroot=IP:/path testing -- host nfs4-5 { -- hardware ethernet 52:54:00:12:34:84; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv4 root={/dev/,}nfs4, use server-id, comma-separated opts -- option root-path "/client,wsize=4096"; -- -- host nfs4-6 { -- hardware ethernet 52:54:00:12:34:85; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv4 root={/dev/,}nfs4, use given IP, comma-separated opts -- option root-path "192.168.50.2:/client,wsize=4096"; -- -- host nfs4-7 { -- hardware ethernet 52:54:00:12:34:86; -- fixed-address 192.168.50.101; -- } -- } -- -- group { -- # NFSv4 root=dhcp, use comma-separated opts -- option root-path "nfs4:192.168.50.3:/client,wsize=4096"; -- -- host nfs4-8 { -- hardware ethernet 52:54:00:12:34:87; -- fixed-address 192.168.50.101; -- } -- } -+option subnet-mask 255.255.255.0; -+option routers 192.168.50.1; -+next-server 192.168.50.1; -+server-identifier 192.168.50.1; -+option domain-name-servers 192.168.50.1; -+option domain-search "example.com"; -+option domain-name "other.com"; -+ -+# MAC numbering scheme: -+# NFSv3: last octect starts at 0x00 and works up -+ -+ group { -+ # NFSv3 root=dhcp or root={/dev/,}nfs, use server-id -+ option root-path "/nfs/client"; -+ -+ host nfs3-1 { -+ hardware ethernet 52:54:00:12:34:00; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv3 root=dhcp or root={/dev/,}nfs, use given IP -+ option root-path "192.168.50.2:/nfs/client"; -+ -+ host nfs3-2 { -+ hardware ethernet 52:54:00:12:34:01; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv3 root=dhcp, use protocol from root-path -+ option root-path "nfs:192.168.50.3:/nfs/client"; -+ -+ host nfs3-3 { -+ hardware ethernet 52:54:00:12:34:02; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv3 root=dhcp, use protocol, options from root-path -+ option root-path "nfs:192.168.50.3:/nfs/client:wsize=4096"; -+ -+ host nfs3-4 { -+ hardware ethernet 52:54:00:12:34:03; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv3 root=dhcp, nfsroot=/path and nfsroot=IP:/path testing -+ -+ host nfs3-5 { -+ hardware ethernet 52:54:00:12:34:04; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv3 root=dhcp, use path, comma-separated options -+ option root-path "/nfs/client,wsize=4096"; -+ -+ host nfs3-6 { -+ hardware ethernet 52:54:00:12:34:05; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv3 root=dhcp, use IP, path, comma-separated options -+ option root-path "192.168.50.2:/nfs/client,wsize=4096"; -+ -+ host nfs3-7 { -+ hardware ethernet 52:54:00:12:34:06; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv3 root=dhcp, use proto, IP, path, comma-separated options -+ option root-path "nfs:192.168.50.3:/nfs/client,wsize=4096"; -+ -+ host nfs3-8 { -+ hardware ethernet 52:54:00:12:34:07; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ # MAC numbering scheme: -+ # NFSv4: last octect starts at 0x80 and works up -+ -+ group { -+ # NFSv4 root={/dev/,}nfs4, use server-id -+ option root-path "/client"; -+ -+ host nfs4-1 { -+ hardware ethernet 52:54:00:12:34:80; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv4 root={/dev/,}nfs4, use given IP -+ option root-path "192.168.50.2:/client"; -+ -+ host nfs4-2 { -+ hardware ethernet 52:54:00:12:34:81; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv4 root=dhcp, use profocol from root-path -+ option root-path "nfs4:192.168.50.3:/client"; -+ -+ host nfs4-3 { -+ hardware ethernet 52:54:00:12:34:82; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv4 root=dhcp, use profocol, options from root-path -+ option root-path "nfs4:192.168.50.3:/client:wsize=4096"; -+ -+ host nfs4-4 { -+ hardware ethernet 52:54:00:12:34:83; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv3 root=nfs4, nfsroot=/path and nfsroot=IP:/path testing -+ host nfs4-5 { -+ hardware ethernet 52:54:00:12:34:84; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv4 root={/dev/,}nfs4, use server-id, comma-separated opts -+ option root-path "/client,wsize=4096"; -+ -+ host nfs4-6 { -+ hardware ethernet 52:54:00:12:34:85; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv4 root={/dev/,}nfs4, use given IP, comma-separated opts -+ option root-path "192.168.50.2:/client,wsize=4096"; -+ -+ host nfs4-7 { -+ hardware ethernet 52:54:00:12:34:86; -+ fixed-address 192.168.50.101; -+ } -+ } -+ -+ group { -+ # NFSv4 root=dhcp, use comma-separated opts -+ option root-path "nfs4:192.168.50.3:/client,wsize=4096"; -+ -+ host nfs4-8 { -+ hardware ethernet 52:54:00:12:34:87; -+ fixed-address 192.168.50.101; -+ } -+ } - - } -diff --git a/test/TEST-20-NFS/server-init.sh b/test/TEST-20-NFS/server-init.sh -index 5b6f42f..aa8af53 100755 ---- a/test/TEST-20-NFS/server-init.sh -+++ b/test/TEST-20-NFS/server-init.sh -@@ -46,10 +46,12 @@ rpc.idmapd - echo > /dev/watchdog - exportfs -r - echo > /dev/watchdog -+mkdir -p /var/lib/dhcpd - >/var/lib/dhcpd/dhcpd.leases - echo > /dev/watchdog - chmod 777 /var/lib/dhcpd/dhcpd.leases - echo > /dev/watchdog -+rm -f /var/run/dhcpd.pid - dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases & - echo "Serving NFS mounts" - while :; do -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index 981cd82..039fb61 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -237,7 +237,7 @@ test_setup() { - inst_multiple sh ls shutdown poweroff stty cat ps ln ip \ - dmesg mkdir cp ping exportfs \ - modprobe rpc.nfsd rpc.mountd showmount tcpdump \ -- /etc/services sleep mount chmod -+ /etc/services sleep mount chmod rm - for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do - [ -f ${_terminfodir}/l/linux ] && break - done diff --git a/0112-dracut-functions.sh-catch-all-lvm-slaves.patch b/0112-dracut-functions.sh-catch-all-lvm-slaves.patch deleted file mode 100644 index 4224315..0000000 --- a/0112-dracut-functions.sh-catch-all-lvm-slaves.patch +++ /dev/null @@ -1,57 +0,0 @@ -From c7c8c4981ac3a0258ff053fdd02cfe17a11710da Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 9 Aug 2016 15:26:04 +0200 -Subject: [PATCH] dracut-functions.sh: catch all lvm slaves - -add check_vol_slaves_all to be used in check_block_and_slaves_all - -otherwise only the first lvm VG member would be processed - -(cherry picked from commit 7a7b8c174023886b015bd484372839aecf63f324) ---- - dracut-functions.sh | 25 ++++++++++++++++++++++++- - 1 file changed, 24 insertions(+), 1 deletion(-) - -diff --git a/dracut-functions.sh b/dracut-functions.sh -index 4496bfe..249d8fb 100755 ---- a/dracut-functions.sh -+++ b/dracut-functions.sh -@@ -507,7 +507,7 @@ check_block_and_slaves_all() { - if ! lvm_internal_dev $2 && "$1" $2; then - _ret=0 - fi -- check_vol_slaves "$@" && return 0 -+ check_vol_slaves_all "$@" && return 0 - if [[ -f /sys/dev/block/$2/../dev ]]; then - check_block_and_slaves_all $1 $(<"/sys/dev/block/$2/../dev") && _ret=0 - fi -@@ -580,6 +580,29 @@ check_vol_slaves() { - return 1 - } - -+check_vol_slaves_all() { -+ local _lv _vg _pv -+ for i in /dev/mapper/*; do -+ [[ $i == /dev/mapper/control ]] && continue -+ _lv=$(get_maj_min $i) -+ if [[ $_lv = $2 ]]; then -+ _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) -+ # strip space -+ _vg="${_vg//[[:space:]]/}" -+ if [[ $_vg ]]; then -+ for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null) -+ do -+ check_block_and_slaves_all $1 $(get_maj_min $_pv) -+ done -+ return 0 -+ fi -+ fi -+ done -+ return 1 -+} -+ -+ -+ - # fs_get_option - # search for a specific option in a bunch of filesystem options - # and return the value diff --git a/0113-systemd-dracut-cmdline.sh-unset-UNSET-root.patch b/0113-systemd-dracut-cmdline.sh-unset-UNSET-root.patch deleted file mode 100644 index 4e09fa7..0000000 --- a/0113-systemd-dracut-cmdline.sh-unset-UNSET-root.patch +++ /dev/null @@ -1,44 +0,0 @@ -From e168eeef67a6680730e86ee389a383d9c1607c25 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 12 Aug 2016 11:24:47 +0200 -Subject: [PATCH] systemd/dracut-cmdline.sh: unset "UNSET" $root - -https://bugzilla.redhat.com/show_bug.cgi?id=1365667 -caused by commit 9aa224cc - -(cherry picked from commit fc77aca7ddbd33328066a943a4de09de34d25c4c) ---- - modules.d/98dracut-systemd/dracut-cmdline.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh -index ccf24fb..6c6ee02 100755 ---- a/modules.d/98dracut-systemd/dracut-cmdline.sh -+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh -@@ -25,7 +25,7 @@ source_conf /etc/conf.d - # between the case where it was set to the empty string and the case where it - # wasn't specified at all. - if ! root="$(getarg root=)"; then -- root='UNSET' -+ root_unset='UNSET' - fi - - rflags="$(getarg rootflags=)" -@@ -49,7 +49,7 @@ source_hook cmdline - - [ -f /lib/dracut/parse-resume.sh ] && . /lib/dracut/parse-resume.sh - --case "$root" in -+case "${root}${root_unset}" in - block:LABEL=*|LABEL=*) - root="${root#block:}" - root="$(echo $root | sed 's,/,\\x2f,g')" -@@ -75,7 +75,7 @@ case "$root" in - rootok=1 ;; - esac - --[ -z "$root" ] && die "Empty root= argument" -+[ -z "${root}${root_unset}" ] && die "Empty root= argument" - [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'" - - export root rflags fstype netroot NEWROOT diff --git a/0114-url-lib-ca-bundle.crt-changed-to-a-symlink.patch b/0114-url-lib-ca-bundle.crt-changed-to-a-symlink.patch deleted file mode 100644 index 09f4f20..0000000 --- a/0114-url-lib-ca-bundle.crt-changed-to-a-symlink.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f47090f918be67ca3b9a33090088d3164db2e6a8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 17 Aug 2016 16:41:21 +0200 -Subject: [PATCH] url-lib: ca-bundle.crt changed to a symlink - -use inst() instead of inst_simple() - -/etc/pki/tls/certs/ca-bundle.crt is a symlink to -../../ca-trust/extracted/pem/tls-ca-bundle.pem - -with inst() we install the original file also. - -https://bugzilla.redhat.com/show_bug.cgi?id=1341280 -(cherry picked from commit 1b23c6c65c39630cb62faa2503817759f83d880b) ---- - modules.d/45url-lib/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/45url-lib/module-setup.sh b/modules.d/45url-lib/module-setup.sh -index c87f718..1ece400 100755 ---- a/modules.d/45url-lib/module-setup.sh -+++ b/modules.d/45url-lib/module-setup.sh -@@ -32,7 +32,7 @@ install() { - _crt=$(grep -F --binary-files=text -z .crt $_lib) - [[ $_crt ]] || continue - [[ $_crt == /*/* ]] || continue -- if ! inst_simple "$_crt"; then -+ if ! inst "$_crt"; then - dwarn "Couldn't install '$_crt' SSL CA cert bundle; HTTPS might not work." - continue - fi diff --git a/0115-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch b/0115-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch deleted file mode 100644 index ebc28be..0000000 --- a/0115-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch +++ /dev/null @@ -1,27 +0,0 @@ -From f367b73852f60d196bd5856d818730e08ca14270 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 17 Aug 2016 16:48:07 +0200 -Subject: [PATCH] dracut.sh: document --hostonly-i18n and --no-hostonly-i18n - -show description in --help - -https://bugzilla.redhat.com/show_bug.cgi?id=1266448 -(cherry picked from commit 91896ab68e26b9f9191f4742dc8ad9c5025eac7f) ---- - dracut.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/dracut.sh b/dracut.sh -index 36607cf..40ca08f 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -151,6 +151,9 @@ Creates initial ramdisk images for preloading modules - in the initramfs - --no-hostonly-cmdline Do not store kernel command line arguments needed - in the initramfs -+ --hostonly-i18n Install only needed keyboard and font files according -+ to the host configuration (default). -+ --no-hostonly-i18n Install all keyboard and font files available. - --persistent-policy [POLICY] - Use [POLICY] to address disks and partitions. - POLICY can be any directory name found in /dev/disk. diff --git a/0116-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch b/0116-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch deleted file mode 100644 index 585f8fa..0000000 --- a/0116-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 5db79ae414ee5ac2d964348d5e9fd3e1b37a088c Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 17 Aug 2016 16:49:00 +0200 -Subject: [PATCH] dracut.cmdline.7.asc: document rd.shell=0 for rd.emergency - -(cherry picked from commit 1d267fb82c1e12e06ef80de16f5232ef06c84240) ---- - dracut.cmdline.7.asc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc -index a2d1f95..0009ff2 100644 ---- a/dracut.cmdline.7.asc -+++ b/dracut.cmdline.7.asc -@@ -130,7 +130,8 @@ menuentry 'Live Fedora 20' --class fedora --class gnu-linux --class gnu --class - Misc - ~~~~ - **rd.emergency=**__[reboot|poweroff|halt]__:: -- specify, what action to execute in case of a critical failure. -+ specify, what action to execute in case of a critical failure. rd.shell=0 also -+ be specified. - - **rd.driver.blacklist=**____[,____,...]:: - do not load kernel module . This parameter can be specified diff --git a/0117-network-ibft-put-IPv6-IP-in-brackets.patch b/0117-network-ibft-put-IPv6-IP-in-brackets.patch deleted file mode 100644 index 8554644..0000000 --- a/0117-network-ibft-put-IPv6-IP-in-brackets.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1a7b71bb146b4355683bde5df8b1b5b7dc7e36ed Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 17 Aug 2016 16:25:09 +0200 -Subject: [PATCH] network:ibft put IPv6 IP in brackets - -ip=2620:0052:0000:2220:0226:b9ff:fe81:cde4::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none - -should be - -ip=[2620:0052:0000:2220:0226:b9ff:fe81:cde4]::[2620:0052:0000:2220:0000:0000:0000:03fe]:64::ibft0:none - -https://bugzilla.redhat.com/show_bug.cgi?id=1322592#c19 -(cherry picked from commit b8e6c051c6ad6ae3ae93db8e74f37dbc82c22514) ---- - modules.d/40network/net-lib.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh -index eb98f8e..69d96aa 100755 ---- a/modules.d/40network/net-lib.sh -+++ b/modules.d/40network/net-lib.sh -@@ -284,6 +284,7 @@ ibft_to_cmdline() { - [ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a) - if [ "$family" = "ipv6" ] ; then - if [ -n "$ip" ] ; then -+ ip="[$ip]" - [ -n "$prefix" ] || prefix=64 - ip="[${ip}/${prefix}]" - mask= diff --git a/0118-livenet-support-nfs-urls-in-livenet-generator.patch b/0118-livenet-support-nfs-urls-in-livenet-generator.patch deleted file mode 100644 index 713c512..0000000 --- a/0118-livenet-support-nfs-urls-in-livenet-generator.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 1090a8826a8435196554ac16f3b8a01cbb03f4be Mon Sep 17 00:00:00 2001 -From: Dan Fuhry -Date: Thu, 25 Aug 2016 17:13:52 -0400 -Subject: [PATCH] livenet: support nfs:// urls in livenet-generator - -This is a further improvement on PR #105 which re-adds support for nfs:// urls to root=live:nfs://... Symptoms prior to applying this patch are that sysroot.mount times out when following the nfs:// syntax for the path to the live image. An additional case is added to livenet-generator to support the nfs protocol. ---- - modules.d/90livenet/livenet-generator.sh | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/modules.d/90livenet/livenet-generator.sh b/modules.d/90livenet/livenet-generator.sh -index 377d53b..969ef4f 100755 ---- a/modules.d/90livenet/livenet-generator.sh -+++ b/modules.d/90livenet/livenet-generator.sh -@@ -16,6 +16,9 @@ fi - [ "${liveroot%%:*}" = "live" ] || exit 0 - - case "$liveroot" in -+ live:nfs://*|nfs://*) \ -+ root="${root#live:}" -+ rootok=1 ;; - live:http://*|http://*) \ - root="${root#live:}" - rootok=1 ;; diff --git a/0119-Update-nfs-lib.sh.patch b/0119-Update-nfs-lib.sh.patch deleted file mode 100644 index a338752..0000000 --- a/0119-Update-nfs-lib.sh.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 69c6435acd7796547d24156691601fa35c400258 Mon Sep 17 00:00:00 2001 -From: honza801 -Date: Thu, 1 Sep 2016 15:37:58 +0200 -Subject: [PATCH] Update nfs-lib.sh - -anaconda_nfsv6_to_var(): fix options parsing. $1 contains : at the end, this is done by previous functions. ---- - modules.d/95nfs/nfs-lib.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh -index 67608b1..1ba4f5f 100755 ---- a/modules.d/95nfs/nfs-lib.sh -+++ b/modules.d/95nfs/nfs-lib.sh -@@ -88,7 +88,7 @@ anaconda_nfs_to_var() { - # IPv6 nfs path will be treated separately - anaconda_nfsv6_to_var() { - nfs="nfs" -- path="$1:" -+ path="$1" - options="${path#*:/}" - path="/${options%%:*}" - server="${1#*nfs:}" diff --git a/0120-dracut-systemd-dracut-mount.service-add-DefaultDepen.patch b/0120-dracut-systemd-dracut-mount.service-add-DefaultDepen.patch deleted file mode 100644 index b6c0637..0000000 --- a/0120-dracut-systemd-dracut-mount.service-add-DefaultDepen.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 86eb0b1b83845185ee9ba00609e6169d9f24d4a1 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 22 Aug 2016 11:03:01 +0200 -Subject: [PATCH] dracut-systemd/dracut-mount.service: add - DefaultDependencies=no - ---- - modules.d/98dracut-systemd/dracut-mount.service | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/98dracut-systemd/dracut-mount.service b/modules.d/98dracut-systemd/dracut-mount.service -index baa8edb..4c699dd 100644 ---- a/modules.d/98dracut-systemd/dracut-mount.service -+++ b/modules.d/98dracut-systemd/dracut-mount.service -@@ -15,6 +15,7 @@ After=dracut-initqueue.service dracut-pre-mount.service - ConditionPathExists=/usr/lib/initrd-release - ConditionDirectoryNotEmpty=|/lib/dracut/hooks/mount - ConditionKernelCommandLine=|rd.break=mount -+DefaultDependencies=no - Conflicts=shutdown.target emergency.target - Before=shutdown.target emergency.target - diff --git a/0121-kernel-modules-add-nvme-kernel-module.patch b/0121-kernel-modules-add-nvme-kernel-module.patch deleted file mode 100644 index 5e4ec99..0000000 --- a/0121-kernel-modules-add-nvme-kernel-module.patch +++ /dev/null @@ -1,22 +0,0 @@ -From a84c391b8771e0238a0edb8b382ecbf7f2d2bfd3 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 22 Aug 2016 11:04:23 +0200 -Subject: [PATCH] kernel-modules: add nvme kernel module - ---- - modules.d/90kernel-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 7904c02..868341c 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -21,7 +21,7 @@ installkernel() { - yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \ - atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ - virtio virtio_blk virtio_ring virtio_pci virtio_scsi \ -- "=drivers/pcmcia" =ide -+ "=drivers/pcmcia" =ide nvme - - if [[ "$(uname -p)" == arm* ]]; then - # arm specific modules diff --git a/0122-test-TEST-30-ISCSI-depend-on-tgtd-and-tgtadm.patch b/0122-test-TEST-30-ISCSI-depend-on-tgtd-and-tgtadm.patch deleted file mode 100644 index f7df511..0000000 --- a/0122-test-TEST-30-ISCSI-depend-on-tgtd-and-tgtadm.patch +++ /dev/null @@ -1,25 +0,0 @@ -From dba974844eaff2beb31a3c248965f5789d22bbb6 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 22 Aug 2016 13:32:03 +0200 -Subject: [PATCH] test/TEST-30-ISCSI: depend on tgtd and tgtadm - -the testsuite now needs tgtd and tgtadm and not iscsi-target ---- - test/TEST-30-ISCSI/test.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 63944b3..d4f0f8c 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -138,8 +138,8 @@ test_run() { - } - - test_setup() { -- if [ ! -x /usr/sbin/iscsi-target ]; then -- echo "Need iscsi-target from netbsd-iscsi" -+ if ! command -v tgtd &>/dev/null || ! command -v tgtadm &>/dev/null; then -+ echo "Need tgtd and tgtadm from scsi-target-utils" - return 1 - fi - diff --git a/0123-network-arping2-use-0.0.0.0-as-source-address.patch b/0123-network-arping2-use-0.0.0.0-as-source-address.patch deleted file mode 100644 index 267a75e..0000000 --- a/0123-network-arping2-use-0.0.0.0-as-source-address.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 00ca15abbf14f51d098867cc8b583089981ab0ae Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 22 Aug 2016 14:38:54 +0200 -Subject: [PATCH] network: arping2 use 0.0.0.0 as source address - ---- - modules.d/40network/dhclient-script.sh | 2 +- - modules.d/40network/ifup.sh | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh -index 2eade35..f49cdb8 100755 ---- a/modules.d/40network/dhclient-script.sh -+++ b/modules.d/40network/dhclient-script.sh -@@ -160,7 +160,7 @@ case $reason in - fi - if [ "$layer2" != "0" ]; then - if command -v arping2 >/dev/null; then -- if arping2 -q -C 1 -c 2 -I $netif $new_ip_address ; then -+ if arping2 -q -C 1 -c 2 -I $netif -0 $new_ip_address ; then - warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying" - exit 1 - fi -diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh -index 1461b91..8051156 100755 ---- a/modules.d/40network/ifup.sh -+++ b/modules.d/40network/ifup.sh -@@ -111,7 +111,7 @@ do_static() { - wait_for_ipv6_dad $netif - else - if command -v arping2 >/dev/null; then -- if arping2 -q -C 1 -c 2 -I $netif $ip ; then -+ if arping2 -q -C 1 -c 2 -I $netif -0 $ip ; then - warn "Duplicate address detected for $ip for interface $netif." - return 1 - fi diff --git a/0124-TEST-30-ISCSI-add-message-that-all-tests-passed.patch b/0124-TEST-30-ISCSI-add-message-that-all-tests-passed.patch deleted file mode 100644 index b4fd458..0000000 --- a/0124-TEST-30-ISCSI-add-message-that-all-tests-passed.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d7c9ad504e9d3926324e749831938d74919b3a31 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 22 Aug 2016 14:39:25 +0200 -Subject: [PATCH] TEST-30-ISCSI: add message, that all tests passed - ---- - test/TEST-30-ISCSI/test.sh | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index d4f0f8c..c5315bb 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -110,16 +110,17 @@ do_test_run() { - || : - - run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \ -- "root=LABEL=sysroot" \ -+ "root=LABEL=sysroot" \ - "ip=192.168.50.101::192.168.50.1:255.255.255.0::ens3:off" \ - "ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \ -- "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ -+ "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ - "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ - "rd.iscsi.firmware" \ - "rd.iscsi.initiator=$initiator" \ - "rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ - || : - -+ echo "All tests passed [OK]" - return 0 - } - diff --git a/0125-caps-make-it-a-non-default-module.patch b/0125-caps-make-it-a-non-default-module.patch deleted file mode 100644 index bc177a3..0000000 --- a/0125-caps-make-it-a-non-default-module.patch +++ /dev/null @@ -1,21 +0,0 @@ -From c85034c91f90529287c0e169ce64d7ed3b0c1a82 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 2 Sep 2016 07:50:24 +0200 -Subject: [PATCH] caps: make it a non default module - ---- - modules.d/02caps/module-setup.sh | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/modules.d/02caps/module-setup.sh b/modules.d/02caps/module-setup.sh -index 01327c9..fb16526 100755 ---- a/modules.d/02caps/module-setup.sh -+++ b/modules.d/02caps/module-setup.sh -@@ -3,6 +3,7 @@ - # called by dracut - check() { - require_binaries capsh -+ return 255 - } - - # called by dracut diff --git a/0126-correctly-install-rsyslog.conf-template.patch b/0126-correctly-install-rsyslog.conf-template.patch deleted file mode 100644 index d638589..0000000 --- a/0126-correctly-install-rsyslog.conf-template.patch +++ /dev/null @@ -1,22 +0,0 @@ -From ff6077789ee6f265014617186a67e5a6099ee8fb Mon Sep 17 00:00:00 2001 -From: Brendan Germain -Date: Tue, 24 May 2016 15:37:30 -0400 -Subject: [PATCH] correctly install rsyslog.conf template - ---- - modules.d/98syslog/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh -index 22bc497..4458229 100755 ---- a/modules.d/98syslog/module-setup.sh -+++ b/modules.d/98syslog/module-setup.sh -@@ -34,7 +34,7 @@ install() { - inst_simple "$moddir/rsyslogd-start.sh" /sbin/rsyslogd-start - inst_simple "$moddir/rsyslogd-stop.sh" /sbin/rsyslogd-stop - mkdir -m 0755 -p ${initdir}/etc/templates -- inst_simple "${moddir}/rsyslog.conf" /etc/templates -+ inst_simple "${moddir}/rsyslog.conf" /etc/templates/rsyslog.conf - fi - dracut_need_initqueue - } diff --git a/0127-source-dracut-lib-for-warn.patch b/0127-source-dracut-lib-for-warn.patch deleted file mode 100644 index 55995d9..0000000 --- a/0127-source-dracut-lib-for-warn.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3568d947db73cbe0d8bf75e46b2dce8f7bb44f43 Mon Sep 17 00:00:00 2001 -From: Brendan Germain -Date: Wed, 25 May 2016 08:29:55 -0400 -Subject: [PATCH] source dracut-lib for warn() - ---- - modules.d/98syslog/rsyslogd-stop.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98syslog/rsyslogd-stop.sh b/modules.d/98syslog/rsyslogd-stop.sh -index 010d56a..52c8edf 100755 ---- a/modules.d/98syslog/rsyslogd-stop.sh -+++ b/modules.d/98syslog/rsyslogd-stop.sh -@@ -1,5 +1,7 @@ - #!/bin/sh - -+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -+ - # Kills rsyslogd - - if [ -f /var/run/syslogd.pid ]; then -@@ -8,4 +10,4 @@ if [ -f /var/run/syslogd.pid ]; then - kill -0 $pid && kill -9 $pid - else - warn "rsyslogd-stop: Could not find a pid for rsyslogd. Won't kill it." --fi -\ No newline at end of file -+fi diff --git a/0128-move-start-from-udev-to-initqueue-online.patch b/0128-move-start-from-udev-to-initqueue-online.patch deleted file mode 100644 index 367fa5d..0000000 --- a/0128-move-start-from-udev-to-initqueue-online.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 223547feab5eb85ee96e0e097b6172705803e260 Mon Sep 17 00:00:00 2001 -From: Brendan Germain -Date: Wed, 25 May 2016 13:25:09 -0400 -Subject: [PATCH] move start from udev to initqueue/online - ---- - modules.d/98syslog/module-setup.sh | 3 +-- - modules.d/98syslog/parse-syslog-opts.sh | 22 +++++++++++++++++++++- - modules.d/98syslog/rsyslogd-start.sh | 21 +++++++++++++++------ - modules.d/98syslog/syslog-genrules.sh | 30 ------------------------------ - 4 files changed, 37 insertions(+), 39 deletions(-) - delete mode 100755 modules.d/98syslog/syslog-genrules.sh - -diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh -index 4458229..e18aecb 100755 ---- a/modules.d/98syslog/module-setup.sh -+++ b/modules.d/98syslog/module-setup.sh -@@ -29,9 +29,8 @@ install() { - if [ -n "$_installs" ]; then - inst_multiple cat $_installs - inst_hook cmdline 90 "$moddir/parse-syslog-opts.sh" -- inst_hook pre-udev 61 "$moddir/syslog-genrules.sh" - inst_hook cleanup 99 "$moddir/syslog-cleanup.sh" -- inst_simple "$moddir/rsyslogd-start.sh" /sbin/rsyslogd-start -+ inst_hook initqueue/online 70 "$moddir/rsyslogd-start.sh" - inst_simple "$moddir/rsyslogd-stop.sh" /sbin/rsyslogd-stop - mkdir -m 0755 -p ${initdir}/etc/templates - inst_simple "${moddir}/rsyslog.conf" /etc/templates/rsyslog.conf -diff --git a/modules.d/98syslog/parse-syslog-opts.sh b/modules.d/98syslog/parse-syslog-opts.sh -index 3943258..50ec275 100755 ---- a/modules.d/98syslog/parse-syslog-opts.sh -+++ b/modules.d/98syslog/parse-syslog-opts.sh -@@ -9,10 +9,30 @@ - # Don't auto detect syslog but set it - type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - -+detect_syslog() { -+ syslogtype="" -+ if [ -e /sbin/rsyslogd ]; then -+ syslogtype="rsyslogd" -+ elif [ -e /sbin/syslogd ]; then -+ syslogtype="syslogd" -+ elif [ /sbin/syslog-ng ]; then -+ syslogtype="syslog-ng" -+ else -+ warn "Could not find any syslog binary although the syslogmodule is selected to be installed. Please check." -+ fi -+ echo "$syslogtype" -+ [ -n "$syslogtype" ] -+} -+ - syslogserver=$(getarg syslog.server -d syslog) - syslogfilters=$(getargs syslog.filter -d filter) - syslogtype=$(getarg syslog.type -d syslogtype) - - [ -n "$syslogserver" ] && echo $syslogserver > /tmp/syslog.server - [ -n "$syslogfilters" ] && echo "$syslogfilters" > /tmp/syslog.filters --[ -n "$syslogtype" ] && echo "$syslogtype" > /tmp/syslog.type -+if [ -n "$syslogtype" ]; then -+ echo "$syslogtype" > /tmp/syslog.type -+else -+ syslogtype=$(detect_syslog) -+ echo $syslogtype > /tmp/syslog.type -+fi -diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh -index c08e667..25dfb16 100755 ---- a/modules.d/98syslog/rsyslogd-start.sh -+++ b/modules.d/98syslog/rsyslogd-start.sh -@@ -1,9 +1,15 @@ - #!/bin/sh - --# Triggered by udev and starts rsyslogd with bootparameters -+# Triggered by initqueue/online and starts rsyslogd with bootparameters - - type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh - -+# prevent starting again if already running -+if [ -f /var/run/syslogd.pid ]; then -+ read pid < /var/run/syslogd.pid -+ kill -0 $pid && exit 0 -+fi -+ - rsyslog_config() { - local server=$1 - shift -@@ -17,17 +23,20 @@ rsyslog_config() { - for filter in $filters; do - echo "${filter} @${server}" - done --# echo "*.* /tmp/syslog" -+ #echo "*.* /tmp/syslog" - } - -+read type < /tmp/syslog.type - read server < /tmp/syslog.server - read filters < /tmp/syslog.filters - [ -z "$filters" ] && filters="kern.*" - read conf < /tmp/syslog.conf - [ -z "$conf" ] && conf="/etc/rsyslog.conf" && echo "$conf" > /tmp/syslog.conf - --template=/etc/templates/rsyslog.conf --if [ -n "$server" ]; then -- rsyslog_config "$server" "$template" "$filters" > $conf -- rsyslogd -c3 -+if [ $type == "rsyslogd" ]; then -+ template=/etc/templates/rsyslog.conf -+ if [ -n "$server" ]; then -+ rsyslog_config "$server" "$template" "$filters" > $conf -+ rsyslogd -c3 -+ fi - fi -diff --git a/modules.d/98syslog/syslog-genrules.sh b/modules.d/98syslog/syslog-genrules.sh -deleted file mode 100755 -index 072bdea..0000000 ---- a/modules.d/98syslog/syslog-genrules.sh -+++ /dev/null -@@ -1,30 +0,0 @@ --#!/bin/sh -- --# Creates the syslog udev rules to be triggered when interface becomes online. --type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh -- --detect_syslog() { -- syslogtype="" -- if [ -e /sbin/rsyslogd ]; then -- syslogtype="rsyslogd" -- elif [ -e /sbin/syslogd ]; then -- syslogtype="syslogd" -- elif [ /sbin/syslog-ng ]; then -- syslogtype="syslog-ng" -- else -- warn "Could not find any syslog binary although the syslogmodule is selected to be installed. Please check." -- fi -- echo "$syslogtype" -- [ -n "$syslogtype" ] --} -- --read syslogtype < /tmp/syslog.type --if [ -z "$syslogtype" ]; then -- syslogtype=$(detect_syslog) -- echo $syslogtype > /tmp/syslog.type --fi --if [ -e "/sbin/${syslogtype}-start" ]; then -- printf 'ACTION=="online", SUBSYSTEM=="net", RUN+="/sbin/initqueue --onetime /sbin/'${syslogtype}'-start $env{INTERFACE}"\n' > /etc/udev/rules.d/70-syslog.rules --else -- warn "syslog-genrules: Could not find binary to start syslog of type \"$syslogtype\". Syslog will not be started." --fi diff --git a/0129-fixup-No-such-file-or-directory-errors-when-module-i.patch b/0129-fixup-No-such-file-or-directory-errors-when-module-i.patch deleted file mode 100644 index 2007d8e..0000000 --- a/0129-fixup-No-such-file-or-directory-errors-when-module-i.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b37b141ecc9588bc5b29a8474943ec603b1f3ba4 Mon Sep 17 00:00:00 2001 -From: Brendan Germain -Date: Wed, 25 May 2016 15:40:02 -0400 -Subject: [PATCH] fixup No such file or directory errors when module is not - configured - ---- - modules.d/98syslog/rsyslogd-start.sh | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh -index 25dfb16..08b6fb2 100755 ---- a/modules.d/98syslog/rsyslogd-start.sh -+++ b/modules.d/98syslog/rsyslogd-start.sh -@@ -26,11 +26,11 @@ rsyslog_config() { - #echo "*.* /tmp/syslog" - } - --read type < /tmp/syslog.type --read server < /tmp/syslog.server --read filters < /tmp/syslog.filters -+[ -f /tmp/syslog.type ] && read type < /tmp/syslog.type -+[ -f /tmp/syslog.server ] && read server < /tmp/syslog.server -+[ -f /tmp/syslog.filters ] && read filters < /tmp/syslog.filters - [ -z "$filters" ] && filters="kern.*" --read conf < /tmp/syslog.conf -+[ -f /tmp/syslog.conf ] && read conf < /tmp/syslog.conf - [ -z "$conf" ] && conf="/etc/rsyslog.conf" && echo "$conf" > /tmp/syslog.conf - - if [ $type == "rsyslogd" ]; then diff --git a/0130-subshell-and-set-f-to-prevent-expansion.patch b/0130-subshell-and-set-f-to-prevent-expansion.patch deleted file mode 100644 index af37327..0000000 --- a/0130-subshell-and-set-f-to-prevent-expansion.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1d9d43713db58f6aafab6c0692fc2ebb9a26b4c7 Mon Sep 17 00:00:00 2001 -From: Brendan Germain -Date: Wed, 25 May 2016 16:11:11 -0400 -Subject: [PATCH] subshell and set -f to prevent expansion - ---- - modules.d/98syslog/rsyslogd-start.sh | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh -index 08b6fb2..c64f212 100755 ---- a/modules.d/98syslog/rsyslogd-start.sh -+++ b/modules.d/98syslog/rsyslogd-start.sh -@@ -20,9 +20,14 @@ rsyslog_config() { - - cat $syslog_template - -- for filter in $filters; do -- echo "${filter} @${server}" -- done -+ ( -+ # disable shell expansion / globbing -+ # since filters contain such characters -+ set -f -+ for filter in $filters; do -+ echo "${filter} @${server}" -+ done -+ ) - #echo "*.* /tmp/syslog" - } - diff --git a/0131-add-imjournal.so-to-read-systemd-journal.patch b/0131-add-imjournal.so-to-read-systemd-journal.patch deleted file mode 100644 index 2c7e168..0000000 --- a/0131-add-imjournal.so-to-read-systemd-journal.patch +++ /dev/null @@ -1,22 +0,0 @@ -From a1ea214a874514401c318551b93c9ae06be1747d Mon Sep 17 00:00:00 2001 -From: Brendan Germain -Date: Mon, 19 Sep 2016 13:41:32 -0400 -Subject: [PATCH] add imjournal.so to read systemd journal - ---- - modules.d/98syslog/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh -index e18aecb..aa0c8ea 100755 ---- a/modules.d/98syslog/module-setup.sh -+++ b/modules.d/98syslog/module-setup.sh -@@ -17,7 +17,7 @@ install() { - local _installs - if type -P rsyslogd >/dev/null; then - _installs="rsyslogd" -- inst_libdir_file rsyslog/lmnet.so rsyslog/imklog.so rsyslog/imuxsock.so -+ inst_libdir_file rsyslog/lmnet.so rsyslog/imklog.so rsyslog/imuxsock.so rsyslog/imjournal.so - elif type -P syslogd >/dev/null; then - _installs="syslogd" - elif type -P syslog-ng >/dev/null; then diff --git a/0132-dracut-install-fallback-to-non-hostonly-mode-if-lsmo.patch b/0132-dracut-install-fallback-to-non-hostonly-mode-if-lsmo.patch deleted file mode 100644 index 0fd33c5..0000000 --- a/0132-dracut-install-fallback-to-non-hostonly-mode-if-lsmo.patch +++ /dev/null @@ -1,84 +0,0 @@ -From bb47ec54994e9fbac2117b8133cd328a2bb3b28f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Sep 2016 15:55:21 +0200 -Subject: [PATCH] dracut-install: fallback to non-hostonly mode if lsmod fails - -if libkmod fails to get the list of loaded modules, fallback -to non-hostonly mode, to at least try to assemble a working initrd. ---- - install/dracut-install.c | 58 +++++++++++++++++++++++++----------------------- - 1 file changed, 30 insertions(+), 28 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index 0cffa39..fe30bba 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -1288,38 +1288,40 @@ static int install_modules(int argc, char **argv) - - ctx = kmod_new(kerneldir, NULL); - -- err = kmod_module_new_from_loaded(ctx, &loaded_list); -- if (err < 0) { -- errno = err; -- log_error("Could not get list of loaded modules: %m"); -- return err; -- } -- -- kmod_list_foreach(itr, loaded_list) { -- _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; -+ if (arg_hostonly) { -+ err = kmod_module_new_from_loaded(ctx, &loaded_list); -+ if (err < 0) { -+ errno = err; -+ log_error("Could not get list of loaded modules: %m. Switching to non-hostonly mode."); -+ arg_hostonly = false; -+ } else { -+ kmod_list_foreach(itr, loaded_list) { -+ _cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL; - -- struct kmod_module *mod = kmod_module_get_module(itr); -- char *name = strdup(kmod_module_get_name(mod)); -- hashmap_put(modules_loaded, name, name); -- kmod_module_unref(mod); -+ struct kmod_module *mod = kmod_module_get_module(itr); -+ char *name = strdup(kmod_module_get_name(mod)); -+ hashmap_put(modules_loaded, name, name); -+ kmod_module_unref(mod); - -- /* also put the modules from the new kernel in the hashmap, -- * which resolve the name as an alias, in case a kernel module is -- * renamed. -- */ -- err = kmod_module_new_from_lookup(ctx, name, &modlist); -- if (err < 0) -- continue; -- if (!modlist) -- continue; -- kmod_list_foreach(l, modlist) { -- mod = kmod_module_get_module(l); -- char *name = strdup(kmod_module_get_name(mod)); -- hashmap_put(modules_loaded, name, name); -- kmod_module_unref(mod); -+ /* also put the modules from the new kernel in the hashmap, -+ * which resolve the name as an alias, in case a kernel module is -+ * renamed. -+ */ -+ err = kmod_module_new_from_lookup(ctx, name, &modlist); -+ if (err < 0) -+ continue; -+ if (!modlist) -+ continue; -+ kmod_list_foreach(l, modlist) { -+ mod = kmod_module_get_module(l); -+ char *name = strdup(kmod_module_get_name(mod)); -+ hashmap_put(modules_loaded, name, name); -+ kmod_module_unref(mod); -+ } -+ } -+ kmod_module_unref_list(loaded_list); - } - } -- kmod_module_unref_list(loaded_list); - - for (i = 0; i < argc; i++) { - int r = 0; diff --git a/0133-dmsquash-live-dmsquash-live-root-det_img_fs-redirect.patch b/0133-dmsquash-live-dmsquash-live-root-det_img_fs-redirect.patch deleted file mode 100644 index ff67dc7..0000000 --- a/0133-dmsquash-live-dmsquash-live-root-det_img_fs-redirect.patch +++ /dev/null @@ -1,24 +0,0 @@ -From de7ab164dd0aa68100c290f355b858900193e004 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 13 Oct 2016 09:20:33 +0200 -Subject: [PATCH] dmsquash-live/dmsquash-live-root: det_img_fs() redirect - udevadm output to stderr - -Otherwise the output is taken as input for modprobe. ---- - modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh -index 68d076c..e58d7c2 100755 ---- a/modules.d/90dmsquash-live/dmsquash-live-root.sh -+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh -@@ -57,7 +57,7 @@ ln -s $livedev /run/initramfs/livedev - - # determine filesystem type for a filesystem image - det_img_fs() { -- udevadm settle -+ udevadm settle >&2 - blkid -s TYPE -u noraid -o value "$1" - } - diff --git a/0134-98integrity-support-validating-the-IMA-policy-file-s.patch b/0134-98integrity-support-validating-the-IMA-policy-file-s.patch deleted file mode 100644 index cb2c62b..0000000 --- a/0134-98integrity-support-validating-the-IMA-policy-file-s.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 479b5cd94f16052cf6ea28d0e8abba2b926fff83 Mon Sep 17 00:00:00 2001 -From: Stefan Berger -Date: Thu, 13 Oct 2016 16:49:43 -0400 -Subject: [PATCH] 98integrity: support validating the IMA policy file signature - -IMA validates file signatures based on the security.ima xattr. As of -Linux-4.7, instead of cat'ing the IMA policy into the securityfs policy, -the IMA policy pathname can be written, allowing the IMA policy file -signature to be validated. - -This patch first attempts to write the pathname, but on failure falls -back to cat'ing the IMA policy contents . - -Signed-off-by: Stefan Berger -Signed-off-by: Mimi Zohar ---- - modules.d/98integrity/ima-policy-load.sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules.d/98integrity/ima-policy-load.sh b/modules.d/98integrity/ima-policy-load.sh -index 0061cff..5460d02 100755 ---- a/modules.d/98integrity/ima-policy-load.sh -+++ b/modules.d/98integrity/ima-policy-load.sh -@@ -30,7 +30,8 @@ load_ima_policy() - # check the existence of the IMA policy file - [ -f "${IMAPOLICYPATH}" ] && { - info "Loading the provided IMA custom policy"; -- cat ${IMAPOLICYPATH} > ${IMASECDIR}/policy; -+ echo -n "${IMAPOLICYPATH}" > ${IMASECDIR}/policy || \ -+ cat "${IMAPOLICYPATH}" > ${IMASECDIR}/policy - } - - return 0 diff --git a/0135-rescue-use-proper-path-for-0-rescue.conf.patch b/0135-rescue-use-proper-path-for-0-rescue.conf.patch deleted file mode 100644 index 9d96461..0000000 --- a/0135-rescue-use-proper-path-for-0-rescue.conf.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b29901c083ba22a0794849c1e93afc40c11588a2 Mon Sep 17 00:00:00 2001 -From: Yu Watanabe -Date: Wed, 19 Oct 2016 12:22:48 +0900 -Subject: [PATCH] rescue: use proper path for 0-rescue.conf - ---- - 51-dracut-rescue.install | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install -index 60d7372..0a5f14b 100755 ---- a/51-dracut-rescue.install -+++ b/51-dracut-rescue.install -@@ -59,16 +59,15 @@ if ! [[ ${BOOT_OPTIONS[*]} ]]; then - exit 1 - fi - --LOADER_ENTRY="/boot/loader/entries/${MACHINE_ID}-0-rescue.conf" - BOOT_DIR="/${MACHINE_ID}/0-rescue" -+BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR} -+LOADER_ENTRY="$BOOT_ROOT/loader/entries/${MACHINE_ID}-0-rescue.conf" - - ret=0 - - case "$COMMAND" in - add) -- for i in "/boot/loader/entries/${MACHINE_ID}-0-rescue.conf"; do -- [[ -f $i ]] && exit 0 -- done -+ [[ -f "$LOADER_ENTRY" ]] && exit 0 - - # source our config dir - for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do diff --git a/0136-integrity-ima-policy-load.sh-s-echo-n-printf.patch b/0136-integrity-ima-policy-load.sh-s-echo-n-printf.patch deleted file mode 100644 index 5422925..0000000 --- a/0136-integrity-ima-policy-load.sh-s-echo-n-printf.patch +++ /dev/null @@ -1,22 +0,0 @@ -From fc44fdb5ac0bf73377439a9ea1458f235033f3ea Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 20 Oct 2016 13:58:25 +0200 -Subject: [PATCH] integrity/ima-policy-load.sh: s/echo -n/printf - ---- - modules.d/98integrity/ima-policy-load.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/98integrity/ima-policy-load.sh b/modules.d/98integrity/ima-policy-load.sh -index 5460d02..85cd3b9 100755 ---- a/modules.d/98integrity/ima-policy-load.sh -+++ b/modules.d/98integrity/ima-policy-load.sh -@@ -30,7 +30,7 @@ load_ima_policy() - # check the existence of the IMA policy file - [ -f "${IMAPOLICYPATH}" ] && { - info "Loading the provided IMA custom policy"; -- echo -n "${IMAPOLICYPATH}" > ${IMASECDIR}/policy || \ -+ printf '%s' "${IMAPOLICYPATH}" > ${IMASECDIR}/policy || \ - cat "${IMAPOLICYPATH}" > ${IMASECDIR}/policy - } - diff --git a/0137-test-test-rhel-7.2.rpms.patch b/0137-test-test-rhel-7.2.rpms.patch deleted file mode 100644 index c1e6263..0000000 --- a/0137-test-test-rhel-7.2.rpms.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ddfcfdf1992c22af8336950b44e594592b34d6c9 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 20 Oct 2016 13:58:53 +0200 -Subject: [PATCH] test/test-rhel-7.2.rpms - -list of rpms to install to run the testsuite on rhel-7.2 ---- - test/test-rhel-7.2.rpms | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - create mode 100644 test/test-rhel-7.2.rpms - -diff --git a/test/test-rhel-7.2.rpms b/test/test-rhel-7.2.rpms -new file mode 100644 -index 0000000..edec0cc ---- /dev/null -+++ b/test/test-rhel-7.2.rpms -@@ -0,0 +1,12 @@ -+dash -+bridge-utils -+asciidoc -+mdadm -+lvm2 -+cryptsetup -+nfs-utils -+nbd -+dhcp-server -+scsi-target-utils -+iscsi-initiator-utils -+ diff --git a/0138-add-README.md.patch b/0138-add-README.md.patch deleted file mode 100644 index 0b9b37c..0000000 --- a/0138-add-README.md.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 4a7b55ee7e5c4e8ba650915fc81c48ae317a5dec Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 20 Oct 2016 14:46:40 +0200 -Subject: [PATCH] add README.md - ---- - README.md | 5 +++++ - 1 file changed, 5 insertions(+) - create mode 100644 README.md - -diff --git a/README.md b/README.md -new file mode 100644 -index 0000000..ebc15fe ---- /dev/null -+++ b/README.md -@@ -0,0 +1,5 @@ -+# dracut -+------ -+dracut is an initramfs infrastructure. -+ -+CentOS CI Status: [![Build Status](https://ci.centos.org/buildStatus/icon?job=dracut-pr-build)](https://ci.centos.org/job/dracut-pr-build/) diff --git a/0139-README.md-update.patch b/0139-README.md-update.patch deleted file mode 100644 index 2657f8c..0000000 --- a/0139-README.md-update.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 7e8f8ddbf872fc4283fce25260e6b99f7027cfe5 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 20 Oct 2016 14:53:25 +0200 -Subject: [PATCH] README.md: update - ---- - README.md | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/README.md b/README.md -index ebc15fe..4c53f28 100644 ---- a/README.md -+++ b/README.md -@@ -1,5 +1,5 @@ - # dracut -------- -+ - dracut is an initramfs infrastructure. - - CentOS CI Status: [![Build Status](https://ci.centos.org/buildStatus/icon?job=dracut-pr-build)](https://ci.centos.org/job/dracut-pr-build/) diff --git a/0140-README.md-update.patch b/0140-README.md-update.patch deleted file mode 100644 index 1c4db34..0000000 --- a/0140-README.md-update.patch +++ /dev/null @@ -1,19 +0,0 @@ -From b8278a99abcefc0a02548e95ab7da2ed5355845b Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 20 Oct 2016 15:35:08 +0200 -Subject: [PATCH] README.md: update - ---- - README.md | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/README.md b/README.md -index 4c53f28..40b22de 100644 ---- a/README.md -+++ b/README.md -@@ -1,4 +1,4 @@ --# dracut -+# dracut - master branch - - dracut is an initramfs infrastructure. - diff --git a/0141-dracut-install-preserve-extended-attributes-when-cop.patch b/0141-dracut-install-preserve-extended-attributes-when-cop.patch deleted file mode 100644 index 3146d84..0000000 --- a/0141-dracut-install-preserve-extended-attributes-when-cop.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 61c761bc2c35fb244d46fbbde97161f5927071dc Mon Sep 17 00:00:00 2001 -From: Stefan Berger -Date: Tue, 25 Oct 2016 15:09:49 -0400 -Subject: [PATCH] dracut-install: preserve extended attributes when copying - files - -Preserve extended attributes when copying files using dracut-install. - -The copying of extended attributes avoids file execution denials when -the Linux Integrity Measurement's Appraisal mode is active. In that mode -executables need their file signatures copied. In particular, this patch -solves the problem that dependent libaries are not included in the -initramfs since the copied programs could not be executed due to missing -signatures. The following audit record shows the type of failure that -is now prevented: - -type=INTEGRITY_DATA msg=audit(1477409025.492:30065): pid=922 uid=0 - auid=4294967295 ses=4294967295 - subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 - op="appraise_data" cause="IMA-signature-required" - comm="ld-linux-x86-64" - name="/var/tmp/dracut.R6ySa4/initramfs/usr/bin/journalctl" - dev="dm-0" ino=37136 res=0 - -Signed-off-by: Stefan Berger ---- - install/dracut-install.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/install/dracut-install.c b/install/dracut-install.c -index fe30bba..c0f1c17 100644 ---- a/install/dracut-install.c -+++ b/install/dracut-install.c -@@ -294,7 +294,7 @@ static int cp(const char *src, const char *dst) - normal_copy: - pid = fork(); - if (pid == 0) { -- execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps", "-fL", src, dst, -+ execlp("cp", "cp", "--reflink=auto", "--sparse=auto", "--preserve=mode,timestamps,xattr", "-fL", src, dst, - NULL); - _exit(EXIT_FAILURE); - } -@@ -302,7 +302,7 @@ static int cp(const char *src, const char *dst) - while (waitpid(pid, &ret, 0) < 0) { - if (errno != EINTR) { - ret = -1; -- log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps -fL %s %s", src, -+ log_error("Failed: cp --reflink=auto --sparse=auto --preserve=mode,timestamps,xattr -fL %s %s", src, - dst); - break; - } diff --git a/0142-README-correct-github-URLs.patch b/0142-README-correct-github-URLs.patch deleted file mode 100644 index bed2a7e..0000000 --- a/0142-README-correct-github-URLs.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ec44ed1d9d02d8be8d220074ecd68d32aa01047a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 26 Oct 2016 13:41:21 +0200 -Subject: [PATCH] README: correct github URLs - ---- - README | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/README b/README -index b07bbb7..c974c08 100644 ---- a/README -+++ b/README -@@ -62,14 +62,14 @@ Git: - http://git.kernel.org/pub/scm/boot/dracut/dracut.git - https://git.kernel.org/pub/scm/boot/dracut/dracut.git - -- git://github.com/haraldh/dracut.git -+ git@github.com:dracutdevs/dracut.git - - git://dracut.git.sourceforge.net/gitroot/dracut/dracut - - Git Web: - http://git.kernel.org/?p=boot/dracut/dracut.git - -- https://haraldh@github.com/haraldh/dracut.git -+ https://github.com/dracutdevs/dracut.git - - http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut - diff --git a/0143-dracut.8-document-INITRD_COMPRESS-environment-variab.patch b/0143-dracut.8-document-INITRD_COMPRESS-environment-variab.patch deleted file mode 100644 index c1900b7..0000000 --- a/0143-dracut.8-document-INITRD_COMPRESS-environment-variab.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bd98b884475e66a6a92a8efa0fed1b37576f4366 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 2 Nov 2016 13:49:17 +0100 -Subject: [PATCH] dracut.8: document INITRD_COMPRESS environment variable - -https://bugzilla.redhat.com/show_bug.cgi?id=1389775 ---- - dracut.8.asc | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/dracut.8.asc b/dracut.8.asc -index 3b80000..0e01707 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -434,6 +434,7 @@ will not be able to boot. - program with known-working arguments. If you pass a quoted string with - arguments, it will be called with exactly those arguments. Depending on what - you pass, this may result in an initramfs that the kernel cannot decompress. -+ The default value can also be set via the _INITRD_COMPRESS_ environment variable. - - **--no-compress**:: - Do not compress the generated initramfs. This will override any other -@@ -496,6 +497,12 @@ will not be able to boot. - Specifies the kernel image, which to include in the UEFI executable. The default is - _/lib/modules//vmlinuz_ or _/boot/vmlinuz-_ - -+ENVIRONMENT -+----------- -+ -+_INITRD_COMPRESS_:: -+ sets the default compression program. See **--compress**. -+ - FILES - ----- - _/var/log/dracut.log_:: diff --git a/0144-README.md-remove-CI-badge.patch b/0144-README.md-remove-CI-badge.patch deleted file mode 100644 index 7f8dee2..0000000 --- a/0144-README.md-remove-CI-badge.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 2afd60baa6aa5e8d64d24e7e3dd4f9e316520b0d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 3 Nov 2016 14:48:31 +0100 -Subject: [PATCH] README.md: remove CI badge - ---- - README.md | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/README.md b/README.md -index 40b22de..27ad3ea 100644 ---- a/README.md -+++ b/README.md -@@ -2,4 +2,3 @@ - - dracut is an initramfs infrastructure. - --CentOS CI Status: [![Build Status](https://ci.centos.org/buildStatus/icon?job=dracut-pr-build)](https://ci.centos.org/job/dracut-pr-build/) diff --git a/0145-README-update.patch b/0145-README-update.patch deleted file mode 100644 index d6452ee..0000000 --- a/0145-README-update.patch +++ /dev/null @@ -1,61 +0,0 @@ -From e7f52635d91df59574700f2b991b2032a6bec116 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 3 Nov 2016 14:54:45 +0100 -Subject: [PATCH] README: update - -remove "new" and reword the first paragraphs - -remove sourceforge repo links ---- - README | 20 +++++++------------- - 1 file changed, 7 insertions(+), 13 deletions(-) - -diff --git a/README b/README -index c974c08..ff374af 100644 ---- a/README -+++ b/README -@@ -1,9 +1,10 @@ - dracut - ------ --dracut is a new initramfs infrastructure. -+dracut is an event driven initramfs infrastructure. - --Information about the initial goals and aims can be found at --https://fedoraproject.org/wiki/Initrdrewrite -+dracut (the tool) is used to create an initramfs image by copying tools -+and files from an installed system and combining it with the -+dracut framework, usually found in /usr/lib/dracut/modules.d. - - Unlike existing initramfs's, this is an attempt at having as little as - possible hard-coded into the initramfs as possible. The initramfs has -@@ -51,7 +52,7 @@ possible. Every distribution has their own tool here and it's not - something which is really interesting to have separate across them. - So contributions to help decrease the distro-dependencies are welcome. - --Currently dracut lives on kernel.org. -+Currently dracut lives on github.com and kernel.org. - - The tarballs can be found here: - http://www.kernel.org/pub/linux/utils/boot/dracut/ -@@ -64,19 +65,12 @@ Git: - - git@github.com:dracutdevs/dracut.git - -- git://dracut.git.sourceforge.net/gitroot/dracut/dracut -- - Git Web: -- http://git.kernel.org/?p=boot/dracut/dracut.git -- - https://github.com/dracutdevs/dracut.git - -- http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut -- --Git Web RSS Feed: -- http://git.kernel.org/?p=boot/dracut/dracut.git;a=rss -+ http://git.kernel.org/?p=boot/dracut/dracut.git - --Project Page: -+Project Documentation: - http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html - - Project Wiki: diff --git a/0146-TODO-remove-some-items.patch b/0146-TODO-remove-some-items.patch deleted file mode 100644 index 7187754..0000000 --- a/0146-TODO-remove-some-items.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ca31a7e368f839bc96fc8170c5454d8dc63f74e8 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 3 Nov 2016 15:05:36 +0100 -Subject: [PATCH] TODO: remove some items - ---- - TODO | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/TODO b/TODO -index 55fe13b..f4fc208 100644 ---- a/TODO -+++ b/TODO -@@ -18,11 +18,8 @@ INITRAMFS TODO - - put mount hook in main initqueue loop / careful about resume! - - the hard-coded list of udev rules that we care about is kind of lame. - - panic fallback --- bridging/bonding without "netroot=" https://bugzilla.redhat.com/show_bug.cgi?id=822750 - - progress indication for fsck https://bugzilla.redhat.com/show_bug.cgi?id=827118 - - domain, searchdomain https://bugzilla.redhat.com/show_bug.cgi?id=840778 --- disable write-ifcfg https://bugzilla.redhat.com/show_bug.cgi?id=840784 --- check for /var to be mounted in convertfs https://bugzilla.redhat.com/show_bug.cgi?id=848172 - - probably fix "--include" https://bugzilla.redhat.com/show_bug.cgi?id=849338 - - GENERATOR TODO diff --git a/0147-50-dracut.install-use-bin-bash-shebang.patch b/0147-50-dracut.install-use-bin-bash-shebang.patch deleted file mode 100644 index cf1ac10..0000000 --- a/0147-50-dracut.install-use-bin-bash-shebang.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 69395a528aed99ec04b16c14ebacf4c2e10afd26 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Fri, 4 Nov 2016 13:09:28 -0400 -Subject: [PATCH] 50-dracut.install: use /bin/bash shebang - -This script utilizes several bash-specific constructs. ---- - 50-dracut.install | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/50-dracut.install b/50-dracut.install -index 7d081d5..54c71d4 100755 ---- a/50-dracut.install -+++ b/50-dracut.install -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - - COMMAND="$1" - KERNEL_VERSION="$2" diff --git a/0148-dracut.sh-create-the-initramfs-non-world-readable-al.patch b/0148-dracut.sh-create-the-initramfs-non-world-readable-al.patch deleted file mode 100644 index 7ae6553..0000000 --- a/0148-dracut.sh-create-the-initramfs-non-world-readable-al.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0db98910a11c12a454eac4c8e86dc7a7bbc764a4 Mon Sep 17 00:00:00 2001 -From: Andreas Stieger -Date: Mon, 7 Nov 2016 10:37:22 +0100 -Subject: [PATCH] dracut.sh: create the initramfs non-world readable also if - early cpio is used - -Fixes: 5f2c30d9bcd614d546d5c55c6897e33f88b9ab90 -Previously fixed CVE-2012-4453: e1b48995c26c4f06d1a718539cb1bd5b0179af91 - -Signed-off-by: Andreas Stieger ---- - dracut.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dracut.sh b/dracut.sh -index 40ca08f..2d79bbc 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -1700,7 +1700,7 @@ if [[ $create_early_cpio = yes ]]; then - - # The microcode blob is _before_ the initramfs blob, not after - if ! ( -- cd "$early_cpio_dir/d" -+ umask 077; cd "$early_cpio_dir/d" - find . -print0 | sort -z \ - | cpio ${CPIO_REPRODUCIBLE:+--reproducible} --null $cpio_owner_root -H newc -o --quiet > "${DRACUT_TMPDIR}/initramfs.img" - ); then diff --git a/0149-NEWS-update-for-045.patch b/0149-NEWS-update-for-045.patch deleted file mode 100644 index 97cce0e..0000000 --- a/0149-NEWS-update-for-045.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 597b1592485d1956b75cb39c285a35385c8a3fea Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 11:01:36 +0100 -Subject: [PATCH] NEWS: update for 045 - ---- - NEWS | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/NEWS b/NEWS -index 1ec8881..6f68de8 100644 ---- a/NEWS -+++ b/NEWS -@@ -23,7 +23,7 @@ dracut-install: - --silent - --kerneldir - --firmwaredirs -- -+ - lsinitrd: - - new option "--unpack" - - new option "--unpackearly" -@@ -33,6 +33,8 @@ general initramfs fixes: - - don't remove 99-cmdline-ask on 'hostonly' cleanup - - call dracut-cmdline-ask.service, if /etc/cmdline.d/*.conf exists - - break at switch_root only for bare rd.break -+- add rd.emergency=[reboot|poweroff|halt] -+ specifies what action to execute in case of a critical failure - - dmsquash-live: - - fixed livenet-generator execution flag -@@ -55,9 +57,11 @@ kernel-modules: - systemd: - - add /etc/machine-info - - fixed systemd-escape call for names beginning with "-" -+- install missing drop-in configuration files for -+ /etc/systemd/{journal.conf,system.conf} - - filesystems: --- add support to F2FS filesystem (fsck) -+- add support to F2FS filesystem (fsck and modules) - - network: - - fix carrier detection -@@ -67,6 +71,9 @@ network: - - add mtu to list of variables to store in override - - for rd.neednet=0 a bootdev is not needed anymore - - dhclient-script.sh: add classless-static-routes support -+- support for iBFT IPv6 -+- support macaddr in brackets [] (commit 740c46c0224a187d6b5a42b4aa56e173238884cc) -+- use arping2, if available - - nbd: - - add systemd generator diff --git a/0150-Use-versioned-Obsoletes.patch b/0150-Use-versioned-Obsoletes.patch deleted file mode 100644 index a9682b6..0000000 --- a/0150-Use-versioned-Obsoletes.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 4dbb4dc5bce6617824c38b2adc251b1add27d017 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Mon, 7 Nov 2016 11:10:12 +0100 -Subject: [PATCH] Use versioned Obsoletes - -Also change <= N to < N+1. For example, dracut-029-1 > dracut-029, so would not -get obsoleted properly. This all applies to old versions, so doesn't make much -difference in practice, so just fix it to avoid c&p duplication of the bad -pattern in the future. ---- - dracut.spec | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/dracut.spec b/dracut.spec -index 7b9d675..0515006 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -33,7 +33,7 @@ License: GPLv2+ and LGPLv2+ - 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 -+# 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 - -@@ -68,10 +68,10 @@ BuildRequires: asciidoc - %if 0%{?fedora} > 12 || 0%{?rhel} - # no "provides", because dracut does not offer - # all functionality of the obsoleted packages --Obsoletes: mkinitrd <= 6.0.93 --Obsoletes: mkinitrd-devel <= 6.0.93 --Obsoletes: nash <= 6.0.93 --Obsoletes: libbdevid-python <= 6.0.93 -+Obsoletes: mkinitrd < 6.0.94 -+Obsoletes: mkinitrd-devel < 6.0.94 -+Obsoletes: nash < 6.0.94 -+Obsoletes: libbdevid-python < 6.0.94 - %endif - - %if 0%{?fedora} > 16 || 0%{?rhel} > 6 -@@ -86,9 +86,9 @@ Provides: mkinitrd = 2.6.1 - Obsoletes: dracut-kernel < 005 - Provides: dracut-kernel = %{version}-%{release} - --Obsoletes: dracut <= 029 --Obsoletes: dracut-norescue --Provides: dracut-norescue -+Obsoletes: dracut < 030 -+Obsoletes: dracut-norescue < 030 -+Provides: dracut-norescue = %{version}-%{release} - - Requires: bash >= 4 - Requires: coreutils -@@ -195,8 +195,8 @@ initramfs with dracut, with live image capabilities, like Live CDs. - %package config-generic - Summary: dracut configuration to turn off hostonly image generation - Requires: %{name} = %{version}-%{release} --Obsoletes: dracut-nohostonly --Provides: dracut-nohostonly -+Obsoletes: dracut-nohostonly < 030 -+Provides: dracut-nohostonly = %{version}-%{release} - - %description config-generic - This package provides the configuration to turn off the host specific initramfs -@@ -205,7 +205,7 @@ generation with dracut and generates a generic image by default. - %package config-rescue - Summary: dracut configuration to turn on rescue image generation - Requires: %{name} = %{version}-%{release} --Obsoletes: dracut <= 029 -+Obsoletes: dracut < 030 - - %description config-rescue - This package provides the configuration to turn on the rescue initramfs diff --git a/0151-Makefile-create-rpms-in-DESTDIR-for-target-rpm.patch b/0151-Makefile-create-rpms-in-DESTDIR-for-target-rpm.patch deleted file mode 100644 index b02bff1..0000000 --- a/0151-Makefile-create-rpms-in-DESTDIR-for-target-rpm.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 5d274f93654f85b9c52aae02e733f901ff69b97f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 13:14:49 +0100 -Subject: [PATCH] Makefile: create rpms in DESTDIR for target rpm - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index d28e4cf..4cab7d5 100644 ---- a/Makefile -+++ b/Makefile -@@ -211,7 +211,7 @@ rpm: dracut-$(VERSION).tar.xz syncheck - rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ - --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ - --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ -- ( mv "$$rpmbuild"/$$(arch)/*.rpm .; mv "$$rpmbuild"/*.src.rpm .;rm -fr -- "$$rpmbuild"; ls *.rpm ) -+ ( mv "$$rpmbuild"/$$(arch)/*.rpm $(DESTDIR)/.; mv "$$rpmbuild"/*.src.rpm $(DESTDIR)/.;rm -fr -- "$$rpmbuild"; ls $(DESTDIR)/*.rpm ) - - syncheck: - @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ diff --git a/0152-TEST-99-RPM-create-dracut-rpms-to-install-first.patch b/0152-TEST-99-RPM-create-dracut-rpms-to-install-first.patch deleted file mode 100644 index 5bf9955..0000000 --- a/0152-TEST-99-RPM-create-dracut-rpms-to-install-first.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2811e4ed22cb9117b7f6c221fcfe7ffb5f7e7fa2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 13:15:56 +0100 -Subject: [PATCH] TEST-99-RPM: create dracut rpms to install first - -create rpms in TESTDIR first ---- - test/TEST-99-RPM/test.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 31520f1..04bf0bc 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -83,10 +83,12 @@ EOF - } - - test_setup() { -+ make -C "$basedir" DESTDIR="$TESTDIR" rpm - return 0 - } - - test_cleanup() { -+ rm -fr -- "$TESTDIR"/*.rpm - return 0 - } - diff --git a/0153-TEST-99-RPM-add-test_check-for-rpm-dnf-yum.patch b/0153-TEST-99-RPM-add-test_check-for-rpm-dnf-yum.patch deleted file mode 100644 index a32ab91..0000000 --- a/0153-TEST-99-RPM-add-test_check-for-rpm-dnf-yum.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e22e04ae151c5aa806fc44de8294292c1df2429f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 13:20:35 +0100 -Subject: [PATCH] TEST-99-RPM: add test_check() for rpm,dnf,yum - ---- - test/TEST-99-RPM/test.sh | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 04bf0bc..23fa72c 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -1,7 +1,10 @@ - #!/bin/bash - - TEST_DESCRIPTION="rpm integrity after dracut and kernel install" --$TESTDIR -+ -+test_check() { -+ command -v rpm &>/dev/null && ( command -v yum || command -v dnf ) &>/dev/null -+} - - test_run() { - set -x diff --git a/0154-TEST-30-ISCSI-fixed-dhcpd.conf-and-disabled-nowait.patch b/0154-TEST-30-ISCSI-fixed-dhcpd.conf-and-disabled-nowait.patch deleted file mode 100644 index c98ca57..0000000 --- a/0154-TEST-30-ISCSI-fixed-dhcpd.conf-and-disabled-nowait.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 86f0904004540b63664b2707ad782d788b2112e4 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 13:23:39 +0100 -Subject: [PATCH] TEST-30-ISCSI: fixed dhcpd.conf and disabled nowait - ---- - test/TEST-30-ISCSI/dhcpd.conf | 23 +++++++++++++++++++++++ - test/TEST-30-ISCSI/test.sh | 20 ++++++++++---------- - 2 files changed, 33 insertions(+), 10 deletions(-) - -diff --git a/test/TEST-30-ISCSI/dhcpd.conf b/test/TEST-30-ISCSI/dhcpd.conf -index 22c1790..5fa1c15 100644 ---- a/test/TEST-30-ISCSI/dhcpd.conf -+++ b/test/TEST-30-ISCSI/dhcpd.conf -@@ -23,3 +23,26 @@ subnet 192.168.50.0 netmask 255.255.255.0 { - } - } - } -+ -+subnet 192.168.51.0 netmask 255.255.255.0 { -+ option subnet-mask 255.255.255.0; -+ option routers 192.168.51.1; -+ next-server 192.168.51.1; -+ server-identifier 192.168.51.1; -+ option domain-name-servers 192.168.51.1; -+ option domain-search "example.com"; -+ option domain-name "other.com"; -+ -+ # MAC numbering scheme: -+ # NFSv3: last octect starts at 0x00 and works up -+ -+ group { -+ option root-path "iscsi:192.168.51.1:::1:iqn.2009-06.dracut:target1"; -+ -+ host iscsi-2 { -+ hardware ethernet 52:54:00:12:34:01; -+ fixed-address 192.168.51.101; -+ } -+ -+ } -+} -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index c5315bb..85ce29e 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -87,16 +87,16 @@ do_test_run() { - "rd.iscsi.initiator=$initiator" \ - || return 1 - -- run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ -- "root=LABEL=sysroot" \ -- "ip=192.168.50.101:::255.255.255.0::ens3:off" \ -- "ip=192.168.51.101:::255.255.255.0::ens4:off" \ -- "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ -- "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ -- "rd.iscsi.firmware" \ -- "rd.iscsi.initiator=$initiator" \ -- "rd.iscsi.waitnet=0" \ -- || return 1 -+# run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \ -+# "root=LABEL=sysroot" \ -+# "ip=192.168.50.101:::255.255.255.0::ens3:off" \ -+# "ip=192.168.51.101:::255.255.255.0::ens4:off" \ -+# "netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \ -+# "netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \ -+# "rd.iscsi.firmware" \ -+# "rd.iscsi.initiator=$initiator" \ -+# "rd.iscsi.waitnet=0" \ -+# || return 1 - - run_client "FAILME: netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \ - "root=LABEL=sysroot" \ diff --git a/0155-TEST-99-RPM-actually-use-the-generated-rpms-with-dnf.patch b/0155-TEST-99-RPM-actually-use-the-generated-rpms-with-dnf.patch deleted file mode 100644 index fb18b98..0000000 --- a/0155-TEST-99-RPM-actually-use-the-generated-rpms-with-dnf.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 44766d1f1f1f2f1bbbd628b76254fa08c1abbf06 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 17:05:28 +0100 -Subject: [PATCH] TEST-99-RPM: actually use the generated rpms with dnf - ---- - test/TEST-99-RPM/test.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 23fa72c..6c71e13 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -38,8 +38,8 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - mdadm \ - bash \ - iscsi-initiator-utils \ -- $basedir/dracut-[0-9]*.$(arch).rpm \ -- $basedir/dracut-network-[0-9]*.$(arch).rpm -+ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ -+ "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm - - cat >"$rootdir"/test.sh < -Date: Mon, 7 Nov 2016 17:20:18 +0100 -Subject: [PATCH] TEST-99-RPM: set release version and disable update-testing - repo - ---- - test/TEST-99-RPM/test.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 6c71e13..9e52b72 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -26,7 +26,7 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - - dnf_or_yum=yum - command -v dnf >/dev/null && dnf_or_yum=dnf -- $dnf_or_yum --nogpgcheck --installroot "$rootdir"/ install --allowerasing -y \ -+ $dnf_or_yum --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo=updates-testing install --allowerasing -y \ - $dnf_or_yum \ - passwd \ - rootfiles \ diff --git a/0157-README.testsuite-add-more-requirements.patch b/0157-README.testsuite-add-more-requirements.patch deleted file mode 100644 index c957823..0000000 --- a/0157-README.testsuite-add-more-requirements.patch +++ /dev/null @@ -1,39 +0,0 @@ -From caa6d12fd7cce4704916c29c557bbb1bb592e024 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 17:20:43 +0100 -Subject: [PATCH] README.testsuite: add more requirements - ---- - README.testsuite | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -diff --git a/README.testsuite b/README.testsuite -index f9f60d4..127e302 100644 ---- a/README.testsuite -+++ b/README.testsuite -@@ -9,8 +9,23 @@ nfs-utils \ - nbd \ - dhcp-server \ - scsi-target-utils \ --iscsi-initiator-utils -- -+iscsi-initiator-utils \ -+net-tools \ -+strace \ -+syslinux \ -+python-imgcreate \ -+genisoimage \ -+btrfs-progs \ -+bridge-utils \ -+kmod-devel \ -+gcc \ -+bzip2 \ -+xz \ -+tar \ -+wget \ -+rpm-build \ -+dash \ -+${NULL} - - TEST-04-FULL-SYSTEMD: systemd >= 187 - diff --git a/0158-TEST-30-ISCSI-give-server-more-time-for-the-head-sta.patch b/0158-TEST-30-ISCSI-give-server-more-time-for-the-head-sta.patch deleted file mode 100644 index 90ba735..0000000 --- a/0158-TEST-30-ISCSI-give-server-more-time-for-the-head-sta.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 93d7b95ad43696fb8988339765cedc88a0890746 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 17:22:08 +0100 -Subject: [PATCH] TEST-30-ISCSI: give server more time for the head start - ---- - test/TEST-30-ISCSI/test.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 85ce29e..53ac5c7 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -34,8 +34,8 @@ run_server() { - # Cleanup the terminal if we have one - tty -s && stty sane - -- echo Sleeping 10 seconds to give the server a head start -- sleep 10 -+ echo Sleeping 20 seconds to give the server a head start -+ sleep 20 - } - - run_client() { diff --git a/0159-Makefile-fixed-DESTDIR-in-rpm-target.patch b/0159-Makefile-fixed-DESTDIR-in-rpm-target.patch deleted file mode 100644 index f99cae7..0000000 --- a/0159-Makefile-fixed-DESTDIR-in-rpm-target.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 6ee83a0bd102dd38635140149bd20e72b1c3c4a7 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 17:52:09 +0100 -Subject: [PATCH] Makefile: fixed DESTDIR in rpm target - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 4cab7d5..c5afc1a 100644 ---- a/Makefile -+++ b/Makefile -@@ -211,7 +211,7 @@ rpm: dracut-$(VERSION).tar.xz syncheck - rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \ - --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \ - --define "_rpmdir $$PWD" -ba dracut.spec; ) && \ -- ( mv "$$rpmbuild"/$$(arch)/*.rpm $(DESTDIR)/.; mv "$$rpmbuild"/*.src.rpm $(DESTDIR)/.;rm -fr -- "$$rpmbuild"; ls $(DESTDIR)/*.rpm ) -+ ( mv "$$rpmbuild"/$$(arch)/*.rpm $(DESTDIR).; mv "$$rpmbuild"/*.src.rpm $(DESTDIR).;rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm ) - - syncheck: - @ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \ diff --git a/0160-TEST-99-RPM-append-to-DESTDIR.patch b/0160-TEST-99-RPM-append-to-DESTDIR.patch deleted file mode 100644 index b198388..0000000 --- a/0160-TEST-99-RPM-append-to-DESTDIR.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 924a669a1bcb46a9090231269270b9f2f0a6daa6 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Nov 2016 17:52:52 +0100 -Subject: [PATCH] TEST-99-RPM: append "/" to DESTDIR - ---- - test/TEST-99-RPM/test.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 9e52b72..0e3a1a6 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -86,7 +86,7 @@ EOF - } - - test_setup() { -- make -C "$basedir" DESTDIR="$TESTDIR" rpm -+ make -C "$basedir" DESTDIR="$TESTDIR/" rpm - return 0 - } - diff --git a/0161-README.testsuite-add-dmraid.patch b/0161-README.testsuite-add-dmraid.patch deleted file mode 100644 index cd4cfe2..0000000 --- a/0161-README.testsuite-add-dmraid.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0eb7a7c4798b34e42e82ba9ec6a2d0431a97d13a Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 10 Nov 2016 10:56:06 +0100 -Subject: [PATCH] README.testsuite: add dmraid - ---- - README.testsuite | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/README.testsuite b/README.testsuite -index 127e302..dc08df3 100644 ---- a/README.testsuite -+++ b/README.testsuite -@@ -4,6 +4,7 @@ bridge-utils \ - asciidoc \ - mdadm \ - lvm2 \ -+dmraid \ - cryptsetup \ - nfs-utils \ - nbd \ -@@ -24,7 +25,6 @@ xz \ - tar \ - wget \ - rpm-build \ --dash \ - ${NULL} - - TEST-04-FULL-SYSTEMD: systemd >= 187 diff --git a/0162-network-Try-to-load-xennet.patch b/0162-network-Try-to-load-xennet.patch deleted file mode 100644 index 8164503..0000000 --- a/0162-network-Try-to-load-xennet.patch +++ /dev/null @@ -1,27 +0,0 @@ -From b1a39dbcc28ce7673bd5c391c12680736910690a Mon Sep 17 00:00:00 2001 -From: Thomas Renninger -Date: Fri, 19 Sep 2014 15:34:54 +0200 -Subject: [PATCH] network: Try to load xennet - -This makes dracut boot from NFS in a xen instance. - -bnc#896464, bnc#896259 - -Signed-off-by: Thomas Renninger ---- - modules.d/90kernel-network-modules/module-setup.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules.d/90kernel-network-modules/module-setup.sh b/modules.d/90kernel-network-modules/module-setup.sh -index 11fbab9..16ed3a7 100755 ---- a/modules.d/90kernel-network-modules/module-setup.sh -+++ b/modules.d/90kernel-network-modules/module-setup.sh -@@ -28,7 +28,7 @@ installkernel() { - =drivers/net/phy \ - =drivers/net/team \ - =drivers/net/ethernet \ -- ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net -+ ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net xennet - hostonly="" instmods iscsi_ibft crc32c iscsi_boot_sysfs - } - diff --git a/0163-dracut.spec-add-systemd-udev-requirement.patch b/0163-dracut.spec-add-systemd-udev-requirement.patch deleted file mode 100644 index 99c0ca3..0000000 --- a/0163-dracut.spec-add-systemd-udev-requirement.patch +++ /dev/null @@ -1,21 +0,0 @@ -From e80ac43710440ef87829a2f6736acb421aad8493 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 11 Nov 2016 16:04:09 +0100 -Subject: [PATCH] dracut.spec: add systemd-udev requirement - ---- - dracut.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/dracut.spec b/dracut.spec -index 0515006..d4566cf 100644 ---- a/dracut.spec -+++ b/dracut.spec -@@ -115,6 +115,7 @@ Requires: kpartx - %if 0%{?fedora} || 0%{?rhel} > 6 - Requires: util-linux >= 2.21 - Requires: systemd >= 219 -+Requires: systemd-udev >= 219 - Requires: procps-ng - Conflicts: grubby < 8.23 - Conflicts: initscripts < 8.63-1 diff --git a/0164-test-TEST-99-RPM-speedup-test.patch b/0164-test-TEST-99-RPM-speedup-test.patch deleted file mode 100644 index 4627fd5..0000000 --- a/0164-test-TEST-99-RPM-speedup-test.patch +++ /dev/null @@ -1,88 +0,0 @@ -From eac751f1e0493b5736ff84ef0ca64017545f24bf Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 11 Nov 2016 16:04:31 +0100 -Subject: [PATCH] test/TEST-99-RPM: speedup test - ---- - test/TEST-99-RPM/finished-false.sh | 2 -- - test/TEST-99-RPM/test.sh | 32 +++++++++++++++++++++++--------- - 2 files changed, 23 insertions(+), 11 deletions(-) - delete mode 100755 test/TEST-99-RPM/finished-false.sh - -diff --git a/test/TEST-99-RPM/finished-false.sh b/test/TEST-99-RPM/finished-false.sh -deleted file mode 100755 -index ecdbef9..0000000 ---- a/test/TEST-99-RPM/finished-false.sh -+++ /dev/null -@@ -1,2 +0,0 @@ --#!/bin/sh --exit 1 -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 0e3a1a6..1485278 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -16,6 +16,7 @@ test_run() { - mkdir -p "$rootdir/proc" - mkdir -p "$rootdir/sys" - mkdir -p "$rootdir/dev" -+ mkdir -p "$rootdir/boot" - - trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit $ret;' EXIT - trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit 1;' SIGINT -@@ -24,26 +25,38 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - mount --bind /sys "$rootdir/sys" - mount -t devtmpfs devtmpfs "$rootdir/dev" - -+ mkdir -p "$rootdir/$TESTDIR" -+ cp --reflink=auto -a \ -+ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ -+ "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ -+ "$rootdir/$TESTDIR/" -+ - dnf_or_yum=yum -- command -v dnf >/dev/null && dnf_or_yum=dnf -- $dnf_or_yum --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo=updates-testing install --allowerasing -y \ -+ dnf_or_yum_cmd=yum -+ command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } -+ $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ -+ --enablerepo=fedora \ -+ install -y \ - $dnf_or_yum \ - passwd \ - rootfiles \ - systemd \ -+ systemd-udev \ - kernel \ -- fedora-release \ -+ kernel-core \ -+ redhat-release \ - device-mapper-multipath \ - lvm2 \ - mdadm \ -- bash \ -- iscsi-initiator-utils \ -- "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ -- "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm -+ bash \ -+ iscsi-initiator-utils \ -+ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ -+ "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ -+ ${NULL} - - cat >"$rootdir"/test.sh < /test.output - find / -xdev -type f -not -path '/var/*' \ -@@ -61,7 +74,8 @@ find / -xdev -type f -not -path '/var/*' \ - -not -path '/dev/null' \ - -not -path "/boot/loader/entries/\$(cat /etc/machine-id)-*" \ - -not -path "/boot/\$(cat /etc/machine-id)/*" \ -- -exec rpm -qf '{}' ';' | \ -+ -not -path '/etc/openldap/certs/*' \ -+ -print0 | xargs -0 rpm -qf | \ - grep -F 'not owned' &>> /test.output || : - exit 0 - EOF diff --git a/0165-test-TEST-99-RPM-dnf-does-not-like-any-dracut-subpac.patch b/0165-test-TEST-99-RPM-dnf-does-not-like-any-dracut-subpac.patch deleted file mode 100644 index 71a7040..0000000 --- a/0165-test-TEST-99-RPM-dnf-does-not-like-any-dracut-subpac.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e35d1451f59e35c8bb03172749c331426d65c22f Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 11 Nov 2016 16:34:42 +0100 -Subject: [PATCH] test/TEST-99-RPM: dnf does not like any dracut subpackage - ---- - test/TEST-99-RPM/test.sh | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 1485278..345d524 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -35,7 +35,7 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - dnf_or_yum_cmd=yum - command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } - $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ -- --enablerepo=fedora \ -+ --enablerepo=fedora --enablerepo=updates \ - install -y \ - $dnf_or_yum \ - passwd \ -@@ -51,8 +51,10 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - bash \ - iscsi-initiator-utils \ - "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ -- "$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ - ${NULL} -+ #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ -+ #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ -+# ${NULL} - - cat >"$rootdir"/test.sh < -Date: Mon, 14 Nov 2016 12:27:11 +0100 -Subject: [PATCH] README.md: add CentOS badge - ---- - README.md | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/README.md b/README.md -index 27ad3ea..4040177 100644 ---- a/README.md -+++ b/README.md -@@ -2,3 +2,5 @@ - - dracut is an initramfs infrastructure. - -+CentOS CI: [![Build Status](https://ci.centos.org/job/dracut-matrix-master/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/) -+ diff --git a/0167-TEST-99-RPM-use-best-and-install-all-rpms.patch b/0167-TEST-99-RPM-use-best-and-install-all-rpms.patch deleted file mode 100644 index 8532a58..0000000 --- a/0167-TEST-99-RPM-use-best-and-install-all-rpms.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f81806db208a55bc4a6b04eb89cabf062c79f3ef Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Nov 2016 12:27:33 +0100 -Subject: [PATCH] TEST-99-RPM: use --best and install all rpms - ---- - test/TEST-99-RPM/test.sh | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 345d524..f2efea0 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -36,6 +36,7 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } - $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ - --enablerepo=fedora --enablerepo=updates \ -+ --best \ - install -y \ - $dnf_or_yum \ - passwd \ -@@ -50,11 +51,8 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - mdadm \ - bash \ - iscsi-initiator-utils \ -- "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ -+ "$TESTDIR"/dracut-*.rpm \ - ${NULL} -- #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ -- #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ --# ${NULL} - - cat >"$rootdir"/test.sh < -Date: Mon, 14 Nov 2016 12:29:12 +0100 -Subject: [PATCH] Revert "TEST-99-RPM: use --best and install all rpms" - -This reverts commit f81806db208a55bc4a6b04eb89cabf062c79f3ef. ---- - test/TEST-99-RPM/test.sh | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index f2efea0..345d524 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -36,7 +36,6 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } - $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ - --enablerepo=fedora --enablerepo=updates \ -- --best \ - install -y \ - $dnf_or_yum \ - passwd \ -@@ -51,8 +50,11 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - mdadm \ - bash \ - iscsi-initiator-utils \ -- "$TESTDIR"/dracut-*.rpm \ -+ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ - ${NULL} -+ #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ -+ #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ -+# ${NULL} - - cat >"$rootdir"/test.sh < -Date: Mon, 14 Nov 2016 12:30:52 +0100 -Subject: [PATCH] test/test-rhel-7.2.rpms: remove file - ---- - test/test-rhel-7.2.rpms | 12 ------------ - 1 file changed, 12 deletions(-) - delete mode 100644 test/test-rhel-7.2.rpms - -diff --git a/test/test-rhel-7.2.rpms b/test/test-rhel-7.2.rpms -deleted file mode 100644 -index edec0cc..0000000 ---- a/test/test-rhel-7.2.rpms -+++ /dev/null -@@ -1,12 +0,0 @@ --dash --bridge-utils --asciidoc --mdadm --lvm2 --cryptsetup --nfs-utils --nbd --dhcp-server --scsi-target-utils --iscsi-initiator-utils -- diff --git a/0170-README.md-change-centosci-badge.patch b/0170-README.md-change-centosci-badge.patch deleted file mode 100644 index e5c56c8..0000000 --- a/0170-README.md-change-centosci-badge.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 43adba3a71353dd13b7dd2f62843e292b6113e74 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Nov 2016 13:51:59 +0100 -Subject: [PATCH] README.md: change centosci badge - ---- - README.md | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/README.md b/README.md -index 4040177..781de62 100644 ---- a/README.md -+++ b/README.md -@@ -2,5 +2,5 @@ - - dracut is an initramfs infrastructure. - --CentOS CI: [![Build Status](https://ci.centos.org/job/dracut-matrix-master/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/) -+CentOS CI: [![Build Status](https://ci.centos.org/job/dracut-push-master/badge/icon)](https://ci.centos.org/job/dracut-push-master/) - diff --git a/0171-testsuite-add-cpu-host-to-kvm-call.patch b/0171-testsuite-add-cpu-host-to-kvm-call.patch deleted file mode 100644 index e788d05..0000000 --- a/0171-testsuite-add-cpu-host-to-kvm-call.patch +++ /dev/null @@ -1,403 +0,0 @@ -From dfb3db3dad1de3be8b1ff126af728d82b5a4087d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Nov 2016 16:21:06 +0100 -Subject: [PATCH] testsuite: add "-cpu host" to kvm call - ---- - test/TEST-01-BASIC/test.sh | 4 ++-- - test/TEST-02-SYSTEMD/test.sh | 4 ++-- - test/TEST-03-USR-MOUNT/test.sh | 4 ++-- - test/TEST-04-FULL-SYSTEMD/test.sh | 4 ++-- - test/TEST-10-RAID/test.sh | 4 ++-- - test/TEST-11-LVM/test.sh | 4 ++-- - test/TEST-12-RAID-DEG/test.sh | 4 ++-- - test/TEST-13-ENC-RAID-LVM/test.sh | 8 ++++---- - test/TEST-14-IMSM/test.sh | 2 +- - test/TEST-15-BTRFSRAID/test.sh | 4 ++-- - test/TEST-16-DMSQUASH/test.sh | 4 ++-- - test/TEST-17-LVM-THIN/test.sh | 4 ++-- - test/TEST-20-NFS/test.sh | 4 ++-- - test/TEST-30-ISCSI/test.sh | 6 +++--- - test/TEST-40-NBD/test.sh | 6 +++--- - test/TEST-50-MULTINIC/test.sh | 4 ++-- - 16 files changed, 35 insertions(+), 35 deletions(-) - -diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh -index e74c673..fe0989d 100755 ---- a/test/TEST-01-BASIC/test.sh -+++ b/test/TEST-01-BASIC/test.sh -@@ -11,7 +11,7 @@ test_run() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/result \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -@@ -80,7 +80,7 @@ test_setup() { - - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ -- -m 256M -smp 2 -nographic -net none \ -+ -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 -diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh -index 9736278..0398509 100755 ---- a/test/TEST-02-SYSTEMD/test.sh -+++ b/test/TEST-02-SYSTEMD/test.sh -@@ -8,7 +8,7 @@ KVERSION="${KVERSION-$(uname -r)}" - test_run() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug init=/sbin/init rd.shell=0 $DEBUGFAIL" \ -@@ -77,7 +77,7 @@ test_setup() { - - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \ -- -m 256M -smp 2 -nographic -net none \ -+ -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext3 || return 1 -diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh -index c515613..68fe443 100755 ---- a/test/TEST-03-USR-MOUNT/test.sh -+++ b/test/TEST-03-USR-MOUNT/test.sh -@@ -18,7 +18,7 @@ client_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ - -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -watchdog i6300esb -watchdog-action poweroff \ - -no-reboot \ -@@ -115,7 +115,7 @@ test_setup() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ -- -m 256M -smp 2 -nographic -net none \ -+ -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 -diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh -index 3baabb4..6ec4327 100755 ---- a/test/TEST-04-FULL-SYSTEMD/test.sh -+++ b/test/TEST-04-FULL-SYSTEMD/test.sh -@@ -20,7 +20,7 @@ client_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ - -drive format=raw,index=2,media=disk,file=$TESTDIR/result \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \ -@@ -252,7 +252,7 @@ EOF - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.btrfs \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/usr.btrfs \ -- -m 256M -smp 2 -nographic -net none \ -+ -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1 -diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh -index 5324457..0338d18 100755 ---- a/test/TEST-10-RAID/test.sh -+++ b/test/TEST-10-RAID/test.sh -@@ -10,7 +10,7 @@ test_run() { - DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ -@@ -77,7 +77,7 @@ test_setup() { - # Invoke KVM and/or QEMU to actually create the target filesystem. - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ -- -m 256M -smp 2 -nographic -net none \ -+ -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/cannotreach rw rootfstype=ext2 console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $DISKIMAGE || return 1 -diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh -index cf7d376..0091148 100755 ---- a/test/TEST-11-LVM/test.sh -+++ b/test/TEST-11-LVM/test.sh -@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)} - test_run() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ -@@ -72,7 +72,7 @@ test_setup() { - -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 - rm -rf -- $TESTDIR/overlay - # Invoke KVM and/or QEMU to actually create the target filesystem. -- $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ -+ $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 -diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh -index 4c313eb..269b3a2 100755 ---- a/test/TEST-12-RAID-DEG/test.sh -+++ b/test/TEST-12-RAID-DEG/test.sh -@@ -15,7 +15,7 @@ client_run() { - cp --sparse=always --reflink=auto $TESTDIR/disk3.img $TESTDIR/disk3.img.new - - $testdir/run-qemu \ -- -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -nographic -smp 2 \ -+ -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -nographic -cpu host -smp 2 \ - -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2.img.new \ - -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img.new \ - -net none \ -@@ -117,7 +117,7 @@ test_setup() { - -drive format=raw,index=1,media=disk,file=$TESTDIR/disk1.img \ - -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2.img \ - -drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img \ -- -m 256M -smp 2 -nographic -net none \ -+ -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - -diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh -index b8fd26e..1dd4179 100755 ---- a/test/TEST-13-ENC-RAID-LVM/test.sh -+++ b/test/TEST-13-ENC-RAID-LVM/test.sh -@@ -17,7 +17,7 @@ test_run() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \ -@@ -31,7 +31,7 @@ test_run() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \ -@@ -45,7 +45,7 @@ test_run() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/check-success.img \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \ -@@ -111,7 +111,7 @@ test_setup() { - -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 - rm -rf -- $TESTDIR/overlay - # Invoke KVM and/or QEMU to actually create the target filesystem. -- $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ -+ $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 -diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh -index f9f03b7..d5ce58e 100755 ---- a/test/TEST-14-IMSM/test.sh -+++ b/test/TEST-14-IMSM/test.sh -@@ -13,7 +13,7 @@ client_run() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/disk1 \ - -drive format=raw,index=2,media=disk,file=$TESTDIR/disk2 \ -- -m 256M -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \ -diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh -index adf31b1..d33f531 100755 ---- a/test/TEST-15-BTRFSRAID/test.sh -+++ b/test/TEST-15-BTRFSRAID/test.sh -@@ -9,7 +9,7 @@ test_run() { - DISKIMAGE=$TESTDIR/TEST-15-BTRFSRAID-root.img - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \ -@@ -78,7 +78,7 @@ test_setup() { - # Invoke KVM and/or QEMU to actually create the target filesystem. - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$DISKIMAGE \ -- -m 256M -smp 2 -nographic -net none \ -+ -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - -diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh -index 876d910..71f3156 100755 ---- a/test/TEST-16-DMSQUASH/test.sh -+++ b/test/TEST-16-DMSQUASH/test.sh -@@ -19,7 +19,7 @@ test_run() { - -boot order=d \ - -drive format=raw,bps=1000000,index=0,media=disk,file="$TESTDIR"/livecd.iso \ - -drive format=raw,index=1,media=disk,file="$TESTDIR"/root.img \ -- -m 256M -smp 2 \ -+ -m 256M -cpu host -smp 2 \ - -nographic \ - -net none \ - -no-reboot \ -@@ -30,7 +30,7 @@ test_run() { - # "$testdir"/run-qemu \ - # -drive format=raw,bps=1000000,index=0,media=disk,file="$TESTDIR"/livecd.iso \ - # -drive format=raw,index=1,media=disk,file="$TESTDIR"/root.img \ -- # -m 256M -smp 2 \ -+ # -m 256M -cpu host -smp 2 \ - # -net none \ - # -append "root=live:CDLABEL=LiveCD live quiet rhgb selinux=0 rd.live.check" \ - # -initrd "$TESTDIR"/initramfs.testing -diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh -index 1ad9ba6..c375fa2 100755 ---- a/test/TEST-17-LVM-THIN/test.sh -+++ b/test/TEST-17-LVM-THIN/test.sh -@@ -9,7 +9,7 @@ KVERSION=${KVERSION-$(uname -r)} - test_run() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net none \ - -no-reboot \ - -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \ -@@ -72,7 +72,7 @@ test_setup() { - -f $TESTDIR/initramfs.makeroot $KVERSION || return 1 - rm -rf -- $TESTDIR/overlay - # Invoke KVM and/or QEMU to actually create the target filesystem. -- $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -smp 2 -nographic -net none \ -+ $testdir/run-qemu -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext2 -m 256M -cpu host -smp 2 -nographic -net none \ - -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1 -diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh -index 039fb61..66e5e3e 100755 ---- a/test/TEST-20-NFS/test.sh -+++ b/test/TEST-20-NFS/test.sh -@@ -14,7 +14,7 @@ run_server() { - fsck -a $TESTDIR/server.ext3 || return 1 - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext3 \ -- -m 256M -smp 2 \ -+ -m 256M -cpu host -smp 2 \ - -display none \ - -net socket,listen=127.0.0.1:12320 \ - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ -@@ -51,7 +51,7 @@ client_test() { - - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \ -- -m 256M -smp 2 -nographic \ -+ -m 256M -cpu host -smp 2 -nographic \ - -net nic,macaddr=$mac,model=e1000 \ - -net socket,connect=127.0.0.1:12320 \ - -watchdog i6300esb -watchdog-action poweroff \ -diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh -index 53ac5c7..1abde7a 100755 ---- a/test/TEST-30-ISCSI/test.sh -+++ b/test/TEST-30-ISCSI/test.sh -@@ -19,7 +19,7 @@ run_server() { - -drive format=raw,index=1,media=disk,file=$TESTDIR/root.ext3 \ - -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ - -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ -- -m 512M -smp 2 \ -+ -m 512M -cpu host -smp 2 \ - -display none \ - -serial $SERIAL \ - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ -@@ -46,7 +46,7 @@ run_client() { - - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/client.img \ -- -m 512M -smp 2 -nographic \ -+ -m 512M -cpu host -smp 2 -nographic \ - -net nic,macaddr=52:54:00:12:34:00,model=e1000 \ - -net nic,macaddr=52:54:00:12:34:01,model=e1000 \ - -net socket,connect=127.0.0.1:12330 \ -@@ -207,7 +207,7 @@ test_setup() { - -drive format=raw,index=1,media=disk,file=$TESTDIR/client.img \ - -drive format=raw,index=2,media=disk,file=$TESTDIR/iscsidisk2.img \ - -drive format=raw,index=3,media=disk,file=$TESTDIR/iscsidisk3.img \ -- -smp 2 -m 256M -nographic -net none \ -+ -cpu host -smp 2 -m 256M -nographic -net none \ - -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 - grep -F -m 1 -q dracut-root-block-created $TESTDIR/client.img || return 1 -diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh -index 8d49b05..7f7aa66 100755 ---- a/test/TEST-40-NBD/test.sh -+++ b/test/TEST-40-NBD/test.sh -@@ -17,7 +17,7 @@ run_server() { - -drive format=raw,index=0,media=disk,file=$TESTDIR/server.ext2 \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/nbd.ext2 \ - -drive format=raw,index=2,media=disk,file=$TESTDIR/encrypted.ext2 \ -- -m 256M -smp 2 \ -+ -m 256M -cpu host -smp 2 \ - -display none \ - -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ - -net socket,listen=127.0.0.1:12340 \ -@@ -55,7 +55,7 @@ client_test() { - - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/flag.img \ -- -m 512M -smp 2 \ -+ -m 512M -cpu host -smp 2 \ - -nographic \ - -net nic,macaddr=$mac,model=e1000 \ - -net socket,connect=127.0.0.1:12340 \ -@@ -249,7 +249,7 @@ make_encrypted_root() { - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file=$TESTDIR/flag.img \ - -drive format=raw,index=1,media=disk,file=$TESTDIR/encrypted.ext2 \ -- -m 256M -smp 2\ -+ -m 256M -cpu host -smp 2\ - -nographic -net none \ - -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \ - -initrd $TESTDIR/initramfs.makeroot || return 1 -diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh -index ef27682..e919bac 100755 ---- a/test/TEST-50-MULTINIC/test.sh -+++ b/test/TEST-50-MULTINIC/test.sh -@@ -14,7 +14,7 @@ run_server() { - fsck -a "$TESTDIR"/server.ext3 || return 1 - $testdir/run-qemu \ - -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \ -- -m 512M -smp 2 \ -+ -m 512M -cpu host -smp 2 \ - -display none \ - -net socket,listen=127.0.0.1:12350 \ - -net nic,macaddr=52:54:01:12:34:56,model=e1000 \ -@@ -49,7 +49,7 @@ client_test() { - return 1 - fi - -- $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -smp 2 -nographic \ -+ $testdir/run-qemu -drive format=raw,index=0,media=disk,file="$TESTDIR"/client.img -m 512M -cpu host -smp 2 -nographic \ - -net socket,connect=127.0.0.1:12350 \ - -net nic,macaddr=52:54:00:12:34:$mac1,model=e1000 \ - -net nic,macaddr=52:54:00:12:34:$mac2,model=e1000 \ diff --git a/0172-TEST-99-RPM-retry-dnf-5-times-in-case-http-fails.patch b/0172-TEST-99-RPM-retry-dnf-5-times-in-case-http-fails.patch deleted file mode 100644 index cd9e51d..0000000 --- a/0172-TEST-99-RPM-retry-dnf-5-times-in-case-http-fails.patch +++ /dev/null @@ -1,89 +0,0 @@ -From ae69ae9a28f76729c6f54fb586e33abbad2afd7d Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 14 Nov 2016 17:14:30 +0100 -Subject: [PATCH] TEST-99-RPM: retry dnf 5 times in case http fails - ---- - test/TEST-99-RPM/test.sh | 55 +++++++++++++++++++++++++----------------------- - 1 file changed, 29 insertions(+), 26 deletions(-) - -diff --git a/test/TEST-99-RPM/test.sh b/test/TEST-99-RPM/test.sh -index 345d524..a670b55 100755 ---- a/test/TEST-99-RPM/test.sh -+++ b/test/TEST-99-RPM/test.sh -@@ -18,8 +18,8 @@ test_run() { - mkdir -p "$rootdir/dev" - mkdir -p "$rootdir/boot" - --trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit $ret;' EXIT --trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit 1;' SIGINT -+ trap 'ret=$?; [[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit $ret;' EXIT -+ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umount "$rootdir/dev"; rm -rf -- "$rootdir"; } || :; exit 1;' SIGINT - - mount --bind /proc "$rootdir/proc" - mount --bind /sys "$rootdir/sys" -@@ -34,27 +34,30 @@ trap '[[ -d $rootdir ]] && { umount "$rootdir/proc"; umount "$rootdir/sys"; umou - dnf_or_yum=yum - dnf_or_yum_cmd=yum - command -v dnf >/dev/null && { dnf_or_yum="dnf"; dnf_or_yum_cmd="dnf --allowerasing"; } -- $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ -- --enablerepo=fedora --enablerepo=updates \ -- install -y \ -- $dnf_or_yum \ -- passwd \ -- rootfiles \ -- systemd \ -- systemd-udev \ -- kernel \ -- kernel-core \ -- redhat-release \ -- device-mapper-multipath \ -- lvm2 \ -- mdadm \ -- bash \ -- iscsi-initiator-utils \ -- "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ -- ${NULL} -- #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ -- #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ --# ${NULL} -+ for (( i=0; i < 5 ; i++)); do -+ $dnf_or_yum_cmd -v --nogpgcheck --installroot "$rootdir"/ --releasever 25 --disablerepo='*' \ -+ --enablerepo=fedora --enablerepo=updates \ -+ install -y \ -+ $dnf_or_yum \ -+ passwd \ -+ rootfiles \ -+ systemd \ -+ systemd-udev \ -+ kernel \ -+ kernel-core \ -+ redhat-release \ -+ device-mapper-multipath \ -+ lvm2 \ -+ mdadm \ -+ bash \ -+ iscsi-initiator-utils \ -+ "$TESTDIR"/dracut-[0-9]*.$(arch).rpm \ -+ ${NULL} || continue -+ #"$TESTDIR"/dracut-config-rescue-[0-9]*.$(arch).rpm \ -+ #"$TESTDIR"/dracut-network-[0-9]*.$(arch).rpm \ -+ # ${NULL} -+ done -+ (( i < 5 )) - - cat >"$rootdir"/test.sh <&2 -- cat "$rootdir"/test.output >&2 -+ failed=1 -+ echo TEST Failed >&2 -+ cat "$rootdir"/test.output >&2 - fi - - umount "$rootdir/proc" diff --git a/0173-test-Makefile-proper-return-code-for-make-check.patch b/0173-test-Makefile-proper-return-code-for-make-check.patch deleted file mode 100644 index c01d775..0000000 --- a/0173-test-Makefile-proper-return-code-for-make-check.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 45ab6b164724e3c7540bbc723f437806d3791098 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Fri, 11 Nov 2016 12:18:06 +0100 -Subject: [PATCH] test/Makefile: proper return code for "make check" - -(cherry picked from commit aa40b82145ecc923edfade8149c2ba892bfb664d) ---- - test/Makefile | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/test/Makefile b/test/Makefile -index f71f854..eaa944f 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -2,13 +2,14 @@ - - check: - @[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; } -- @for i in TEST-[0-9]*; do \ -+ @{ ret=0; \ -+ for i in TEST-[0-9]*; do \ - [ -d $$i ] || continue ; \ - [ -f $$i/Makefile ] || continue ; \ - if [ -n "$$TESTS" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || continue; fi; \ - if [ -n "$$SKIP" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${SKIP#*$$t*}" != "$$SKIP" ] && continue; fi; \ -- $(MAKE) -C $$i all ; \ -- done -+ $(MAKE) -C $$i all ; ret=$$((ret + $$?)); \ -+ done; exit $$ret; } - - clean: - @for i in TEST-[0-9]*; do \ diff --git a/0174-.dir-locals.el-changed-to-sane-style.patch b/0174-.dir-locals.el-changed-to-sane-style.patch deleted file mode 100644 index 429a6de..0000000 --- a/0174-.dir-locals.el-changed-to-sane-style.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 8c8da6838ad97a571e81341f81dc76c8b703bbc2 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Dec 2016 17:52:54 +0100 -Subject: [PATCH] .dir-locals.el: changed to sane style - ---- - .dir-locals.el | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/.dir-locals.el b/.dir-locals.el -index 8130058..b38d4d6 100644 ---- a/.dir-locals.el -+++ b/.dir-locals.el -@@ -1,3 +1,7 @@ --((nil . ((sh-basic-offset . 4) -- (indent-tabs-mode . nil) -- ))) -+;;; Directory Local Variables -+;;; For more information see (info "(emacs) Directory Variables") -+ -+((sh-mode -+ (indent-tabs-mode) -+ (sh-basic-offset . 4))) -+ diff --git a/0175-dracut.sh-add-default-path-for-uefi.patch b/0175-dracut.sh-add-default-path-for-uefi.patch deleted file mode 100644 index 772a286..0000000 --- a/0175-dracut.sh-add-default-path-for-uefi.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 13e8bf850ce5e64b2a6b0c9baa336ce525c45848 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Thu, 8 Dec 2016 17:53:40 +0100 -Subject: [PATCH] dracut.sh: add default path for --uefi - -The default output filename for --uefi is -/EFI/Linux/linux-$kernel$--.efi. - might be /efi, /boot or /boot/efi depending on where the ESP partition -is mounted. The is taken from BUILD_ID in /usr/lib/os-release or -if it exists /etc/os-release and is left out, if BUILD_ID is non-existant or -empty. - -Also a new option --no-machineid was added, which affects the default output -filename of --uefi and will discard the part. ---- - dracut.8.asc | 10 +++++++++- - dracut.sh | 43 +++++++++++++++++++++++++++++++++---------- - 2 files changed, 42 insertions(+), 11 deletions(-) - -diff --git a/dracut.8.asc b/dracut.8.asc -index 0e01707..4ab0872 100644 ---- a/dracut.8.asc -+++ b/dracut.8.asc -@@ -485,7 +485,15 @@ will not be able to boot. - - **--uefi**:: - Instead of creating an initramfs image, dracut will create an UEFI executable, -- which can be executed by an UEFI BIOS. -+ which can be executed by an UEFI BIOS. The default output filename is -+ _/EFI/Linux/linux-$kernel$--.efi_. might be -+ _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP partition is mounted. -+ The is taken from BUILD_ID in _/usr/lib/os-release_ or if it exists -+ _/etc/os-release_ and is left out, if BUILD_ID is non-existant or empty. -+ -+**--no-machineid**:: -+ affects the default output filename of **--uefi** and will discard the -+ part. - - **--uefi-stub __**:: - Specifies the UEFI stub loader, which will load the attached kernel, initramfs and -diff --git a/dracut.sh b/dracut.sh -index 2d79bbc..0886343 100755 ---- a/dracut.sh -+++ b/dracut.sh -@@ -371,6 +371,7 @@ rearrange_params() - --long kernel-image: \ - --long no-hostonly-i18n \ - --long hostonly-i18n \ -+ --long no-machineid \ - -- "$@") - - if (( $? != 0 )); then -@@ -566,6 +567,8 @@ while :; do - uefi_stub_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; - --kernel-image) - kernel_image_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;; -+ --no-machineid) -+ machine_id_l="no";; - --) shift; break;; - - *) # should not even reach this point -@@ -624,16 +627,6 @@ if [[ $kernel ]]; then - fi - fi - --if ! [[ $outfile ]]; then -- [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -- -- if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then -- outfile="/boot/${MACHINE_ID}/$kernel/initrd" -- else -- outfile="/boot/initramfs-$kernel.img" -- fi --fi -- - unset LC_MESSAGES - unset LC_CTYPE - export LC_ALL=C -@@ -751,6 +744,36 @@ stdloglvl=$((stdloglvl + verbosity_mod_l)) - [[ $loginstall_l ]] && loginstall="$loginstall_l" - [[ $uefi_stub_l ]] && uefi_stub="$uefi_stub_l" - [[ $kernel_image_l ]] && kernel_image="$kernel_image_l" -+[[ $machine_id_l ]] && machine_id="$machine_id_l" -+ -+if ! [[ $outfile ]]; then -+ if [[ $machine_id != "no" ]]; then -+ [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id -+ fi -+ -+ if [[ $uefi == "yes" ]]; then -+ BUILD_ID=$(cat /etc/os-release /usr/lib/os-release \ -+ | while read -r line || [[ $line ]]; do \ -+ [[ $line =~ BUILD_ID\=* ]] && eval "$line" && echo "$BUILD_ID" && break; \ -+ done) -+ if [[ -d /efi ]] && mountpoint -q /efi; then -+ efidir=/efi -+ else -+ efidir=/boot/EFI -+ if [[ -d /boot/efi/EFI ]] && mountpoint -q /boot/efi; then -+ efidir=/boot/efi/EFI -+ fi -+ fi -+ mkdir -p "$efidir/Linux" -+ outfile="$efidir/Linux/linux-$kernel${MACHINE_ID:+-${MACHINE_ID}}${BUILD_ID:+-${BUILD_ID}}.efi" -+ else -+ if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then -+ outfile="/boot/${MACHINE_ID}/$kernel/initrd" -+ else -+ outfile="/boot/initramfs-$kernel.img" -+ fi -+ fi -+fi - - # eliminate IFS hackery when messing with fw_dir - export DRACUT_FIRMWARE_PATH=${fw_dir// /:} diff --git a/0176-modules-kernel-add-phy-and-power-modules-to-generic-.patch b/0176-modules-kernel-add-phy-and-power-modules-to-generic-.patch deleted file mode 100644 index dee7583..0000000 --- a/0176-modules-kernel-add-phy-and-power-modules-to-generic-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From e752d42de9c37dd9906a802a5cdf528fbd360453 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 4 Jul 2016 16:57:39 +0100 -Subject: [PATCH 126/159] modules: kernel: add phy and power modules to generic - initrd - -The phy and power modules are needed by some of the recent ARM -devices that have appeared like CHIP and some exynos devices. - -Signed-off-by: Peter Robinson ---- - modules.d/90kernel-modules/module-setup.sh | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index 868341cb..ae65de8a 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -28,6 +28,8 @@ installkernel() { - instmods \ - "=drivers/clk" \ - "=drivers/i2c/busses" \ -+ "=drivers/phy" \ -+ "=drivers/power" \ - "=drivers/regulator" \ - "=drivers/rtc" \ - "=drivers/usb/host" \ --- -2.12.2 - diff --git a/0177-modules-kernel-add-more-usb-controller-modules.patch b/0177-modules-kernel-add-more-usb-controller-modules.patch deleted file mode 100644 index c181260..0000000 --- a/0177-modules-kernel-add-more-usb-controller-modules.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0c5e5f271be8cb99e4f65fd6cb37ed70dd63754d Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Fri, 3 Feb 2017 10:29:12 +0000 -Subject: [PATCH 127/159] modules: kernel: add more usb controller modules - -There's a number of usb controllers that are common yet aren't -contained in the host directory. Include these for generic host. - -Signed-off-by: Peter Robinson ---- - modules.d/90kernel-modules/module-setup.sh | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index ae65de8a..deb3709c 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -32,7 +32,11 @@ installkernel() { - "=drivers/power" \ - "=drivers/regulator" \ - "=drivers/rtc" \ -+ "=drivers/usb/chipidea" \ -+ "=drivers/usb/dwc2" \ -+ "=drivers/usb/dwc3" \ - "=drivers/usb/host" \ -+ "=drivers/usb/musb" \ - "=drivers/usb/phy" \ - ${NULL} - fi --- -2.12.2 - diff --git a/0178-Add-aarch64-to-drm-modules-along-side-ARM.patch b/0178-Add-aarch64-to-drm-modules-along-side-ARM.patch deleted file mode 100644 index c00c27e..0000000 --- a/0178-Add-aarch64-to-drm-modules-along-side-ARM.patch +++ /dev/null @@ -1,38 +0,0 @@ -From eec49634d4fd5b2d9535a99e184c2450f6026903 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Thu, 23 Mar 2017 14:51:48 +0000 -Subject: [PATCH 137/159] Add aarch64 to drm modules along side ARM - -Add aarch64 to modules, also update the drivers checked for latest -kernel changes. - -Signed-off-by: Peter Robinson ---- - modules.d/50drm/module-setup.sh | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh -index 6106d8c6..42a5e7bc 100755 ---- a/modules.d/50drm/module-setup.sh -+++ b/modules.d/50drm/module-setup.sh -@@ -15,14 +15,14 @@ installkernel() { - local _modname - # Include KMS capable drm drivers - -- if [[ "$(uname -p)" == arm* ]]; then -- # arm specific modules needed by drm -+ if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then -+ # arm/aarch64 specific modules needed by drm - instmods \ - "=drivers/gpu/drm/i2c" \ - "=drivers/gpu/drm/panel" \ -+ "=drivers/gpu/drm/bridge" \ - "=drivers/pwm" \ - "=drivers/video/backlight" \ -- "=drivers/video/fbdev/omap2/displays-new" \ - ${NULL} - fi - --- -2.12.2 - diff --git a/0179-Add-check-for-aarch64-to-the-arm-kernel-module-list.patch b/0179-Add-check-for-aarch64-to-the-arm-kernel-module-list.patch deleted file mode 100644 index 9db4d62..0000000 --- a/0179-Add-check-for-aarch64-to-the-arm-kernel-module-list.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 917e1b6b5b2669a30bce69061686adbb6abc5e35 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Thu, 23 Mar 2017 14:59:15 +0000 -Subject: [PATCH 138/159] Add check for aarch64 to the arm kernel module list - -This adds the same list of drivers we use for arm platforms for -aarch64 too, also add the DMA drivers there too as they can add -sigficant performance for some storage/usb and often need to be -present when the storage drivers load. - -Signed-off-by: Peter Robinson ---- - modules.d/90kernel-modules/module-setup.sh | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh -index deb3709c..b1bced69 100755 ---- a/modules.d/90kernel-modules/module-setup.sh -+++ b/modules.d/90kernel-modules/module-setup.sh -@@ -23,10 +23,11 @@ installkernel() { - virtio virtio_blk virtio_ring virtio_pci virtio_scsi \ - "=drivers/pcmcia" =ide nvme - -- if [[ "$(uname -p)" == arm* ]]; then -- # arm specific modules -+ if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then -+ # arm/aarch64 specific modules - instmods \ - "=drivers/clk" \ -+ "=drivers/dma" \ - "=drivers/i2c/busses" \ - "=drivers/phy" \ - "=drivers/power" \ --- -2.12.2 - diff --git a/dracut.spec b/dracut.spec index 85b0435..ad8d3b8 100644 --- a/dracut.spec +++ b/dracut.spec @@ -15,8 +15,8 @@ %endif Name: dracut -Version: 044 -Release: 178%{?dist} +Version: 045 +Release: 18.git20170515%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -35,185 +35,23 @@ 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 -Patch1: 0001-dmsquash-live-dmsquash-live-root.sh-fixed-typo.patch -Patch2: 0002-dmraid-61-dmraid-imsm.rules-add-nowatch-option-for-u.patch -Patch3: 0003-livenet-livenet-generator.sh-mode-0755.patch -Patch4: 0004-shutdown-guard-against-read-only-run.patch -Patch5: 0005-dmsquash-live-dmsquash-live-root.sh-SQUASHED-can-be-.patch -Patch6: 0006-kernel-modules-include-all-HID-driver-in-hostonly-mo.patch -Patch7: 0007-systemd-include-machine-info.patch -Patch8: 0008-livenet-module-setup.sh-only-include-systemd-generat.patch -Patch9: 0009-network-fix-carrier-detection.patch -Patch10: 0010-nbd-add-systemd-generator-and-use-nbd-export-names-i.patch -Patch11: 0011-TEST-16-DMSQUASH-do-not-use-with-ldconfig-r.patch -Patch12: 0012-test-TEST-04-FULL-SYSTEMD-optionally-install-machine.patch -Patch13: 0013-base-dracut-lib.sh-dev_unit_name-guard-against-dev-b.patch -Patch14: 0014-nbd-add-missing-generator.patch -Patch15: 0015-fcoe-no-need-to-copy-lldpad-state.patch -Patch16: 0016-dracut.sh-restorecon-final-image-file.patch -Patch17: 0017-dracut.cmdline-remove-extra-from-ip-doc.patch -Patch18: 0018-dracut.sh-fail-hard-if-we-find-modules-and-modules.d.patch -Patch19: 0019-network-net-lib.sh-correctly-set-mac-address-for-ip-.patch -Patch20: 0020-dracut-functions.sh-fix-check_vol_slaves-volume-grou.patch -Patch21: 0021-multipath-fix-majmin_to_mpath_dev.patch -Patch22: 0022-Fixed-vlan-bonding-bridging-team-logic.patch -Patch23: 0023-TEST-30-ISCSI-some-tests-have-unknown-return-code.patch -Patch24: 0024-network-add-mtu-to-list-of-variables-to-store-in-ove.patch -Patch25: 0025-Correctly-handle-module-aliases.patch -Patch26: 0026-network-if-rd.neednet-0-we-don-t-need-a-bootdev.patch -Patch27: 0027-kernel-modules-add-usb-storage.patch -Patch28: 0028-kernel-modules-join-instmods-and-install-all-usb-sto.patch -Patch29: 0029-dracut-systemd-dracut-cmdline-ask-fix-dracut-kernel-.patch -Patch30: 0030-base-init.sh-don-t-remove-99-cmdline-ask-on-hostonly.patch -Patch31: 0031-documentation-hostonly-i18n-no-hostonly-i18n-i18n_in.patch -Patch32: 0032-network-dhclient-script.sh-add-classless-static-rout.patch -Patch33: 0033-dracut-systemd-dracut-pre-pivot.sh-Break-at-switch_r.patch -Patch34: 0034-dracut-install-catch-ldd-message-cannot-execute-bina.patch -Patch35: 0035-dracut.conf.5.asc-fix-bold.patch -Patch36: 0036-watchdog-Do-not-add-hooks-if-systemd-module-is-inclu.patch -Patch37: 0037-watchdog-install-module-for-active-watchdog.patch -Patch38: 0038-watchdog-ensure-that-module-is-loaded-as-early-as-po.patch -Patch39: 0039-lsinitrd-add-unpack-to-lsinitrd.patch -Patch40: 0040-Do-not-use-deprecated-egrep-fgrep.patch -Patch41: 0041-nfs-module-setup.sh-Use-colon-instead-of-dot-for-cho.patch -Patch42: 0042-Clean-up-some-bashisms-from-bin-sh-scripts.patch -Patch43: 0043-dracut-init.sh-Simplify-udev-rule-grepping.patch -Patch44: 0044-dracut.sh-call-dracut-install-with-f-in-FIPS-mode.patch -Patch45: 0045-dracut-init.sh-Add-file-argument-to-sed-s.patch -Patch46: 0046-lsinitrd.sh-fixed-unpack-and-skipcpio-search.patch -Patch47: 0047-dracut-init.sh-mark-error-messages-with-FAILED.patch -Patch48: 0048-Use-dracut-install-to-install-kernel-modules.patch -Patch49: 0049-Use-pkg-config-for-libkmod-CFLAGS-and-LIBS.patch -Patch50: 0050-Fix-regressions-with-dracut-install-with-kernel-modu.patch -Patch51: 0051-dracut-install-simplify-error-logic.patch -Patch52: 0052-dracut-init.sh-beautify-instmods.patch -Patch53: 0053-plymouth-plymouth-pretrigger.sh-also-trigger-acpi-su.patch -Patch54: 0054-dracut-install-add-help-documentation.patch -Patch55: 0055-NEWS-update-for-045.patch -Patch56: 0056-Revert-fcoe-no-need-to-copy-lldpad-state.patch -Patch57: 0057-base-init.sh-don-t-mount-run-with-noexec-if-the-init.patch -Patch58: 0058-kate-config.patch -Patch59: 0059-95resume-avoid-possible-symbolic-link-creation-error.patch -Patch60: 0060-watchdog-module-setup.sh-rewrite.patch -Patch61: 0061-drop-to-shell-on-die-if-rd.shell-1-is-set-explicitly.patch -Patch62: 0062-dracut_install-honor-silent-flag.patch -Patch63: 0063-dracut-install-make-use-of-_cleanup_-macros-and-impr.patch -Patch64: 0064-removed-obsolete-kernel-module-functions-and-host_mo.patch -Patch65: 0065-watchdog-clean-return-of-installkernel.patch -Patch66: 0066-watchdog-start-traversing-the-device-tree-from-the-r.patch -Patch67: 0067-dracut-10i18n-support-default-loadkeys-setfont-data-.patch -Patch68: 0068-network-dhcp-before-parsing-specified-dns-through-cm.patch -Patch69: 0069-network-net-lib.sh-delete-duplicated-DNS-items-from-.patch -Patch70: 0070-ensure-parent-dir-for-usr-lib-initrd-release-exists.patch -Patch71: 0071-Fix-small-typo-in-dracut.cmdline-7.patch -Patch72: 0072-systemd-ensure-journal-is-volatile.patch -Patch73: 0073-configure-don-t-hardcode-pkg-config.patch -Patch74: 0074-dracut-systemd-dracut-cmdline.sh-Don-t-error-out-if-.patch -Patch75: 0075-move-ln_r-to-dracut-init.sh.patch -Patch76: 0076-systemd-initrd-add-initrd-root-device.target.patch -Patch77: 0077-dracut.sh-fix-tmpfilesdir-fallback-when-systemd-deve.patch -Patch78: 0078-dracut-Add-drivers-clk-by-default-on-arm.patch -Patch79: 0079-network-remove-awk-call-and-replace-it-with-a-shell-.patch -Patch80: 0080-dracut-init.sh-set-default-firmware-path-if-not-spec.patch -Patch81: 0081-use-shutdown-emergency-hook-in-testsuite-to-poweroff.patch -Patch82: 0082-Revert-network-remove-awk-call-and-replace-it-with-a.patch -Patch83: 0083-dracut-systemd-dracut-emergency.sh-call-shutdown-eme.patch -Patch84: 0084-systemd-add-udev.hwdb-and-udev.conf.patch -Patch85: 0085-cope-with-rd.shell-0-in-the-testsuite.patch -Patch86: 0086-test-TEST-99-RPM-fixed-test-suite.patch -Patch87: 0087-test-handle-kernel-panic-in-testsuite.patch -Patch88: 0088-systemd-add-missing-.slice-unit.patch -Patch89: 0089-dracut-systemd-.service-conflict-with-shutdown-targe.patch -Patch90: 0090-network-dhclient.conf-add-missing-commata.patch -Patch91: 0091-TEST-20-NFS-skip-root-dev-nfs-tests-with-systemd-v23.patch -Patch92: 0092-fcoe-cleanup-fcoe.sh-don-t-copy-shm-files-to-state.patch -Patch93: 0093-test-correct-cmdline-reading-functions.patch -Patch94: 0094-40network-Update-iBFT-scanning-code-to-handle-IPv6.patch -Patch95: 0095-dracut.sh-make-tmp-dirs-after-the-trap-function-is-i.patch -Patch96: 0096-add-support-to-F2FS-filesystem-fsck.patch -Patch97: 0097-systemd-install-missing-drop-in-configs.patch -Patch98: 0098-fs-lib-add-crc32c-kernel-module-for-f2fs.patch -Patch99: 0099-dracut.png-Optimize-with-zopflipng-m.patch -Patch100: 0100-fs-lib-f2fs-needs-crc32-not-crc32c.patch -Patch101: 0101-dracut-install.c-really-add-a-inbetween-destdir-and-.patch -Patch102: 0102-fcoe-check-if-needed-for-hostonly.patch -Patch103: 0103-network-use-arping2-if-available.patch -Patch104: 0104-dracut.conf.5.asc-remove-duplicate-i18n_install_all-.patch -Patch105: 0105-add-rd.emergency-reboot-poweroff-halt.patch -Patch106: 0106-fips-module-add-missing-space.patch -Patch107: 0107-qemu-include-the-qemu_fw_cfg-kernel-module.patch -Patch108: 0108-network-support-macaddr-in-brackets.patch -Patch109: 0109-nfs-install-all-nfs-modules-non-hostonly.patch -Patch110: 0110-network-use-require_any_binary-instead-of-require_an.patch -Patch111: 0111-TEST-20-NFS-remove-stale-pid-file.patch -Patch112: 0112-dracut-functions.sh-catch-all-lvm-slaves.patch -Patch113: 0113-systemd-dracut-cmdline.sh-unset-UNSET-root.patch -Patch114: 0114-url-lib-ca-bundle.crt-changed-to-a-symlink.patch -Patch115: 0115-dracut.sh-document-hostonly-i18n-and-no-hostonly-i18.patch -Patch116: 0116-dracut.cmdline.7.asc-document-rd.shell-0-for-rd.emer.patch -Patch117: 0117-network-ibft-put-IPv6-IP-in-brackets.patch -Patch118: 0118-livenet-support-nfs-urls-in-livenet-generator.patch -Patch119: 0119-Update-nfs-lib.sh.patch -Patch120: 0120-dracut-systemd-dracut-mount.service-add-DefaultDepen.patch -Patch121: 0121-kernel-modules-add-nvme-kernel-module.patch -Patch122: 0122-test-TEST-30-ISCSI-depend-on-tgtd-and-tgtadm.patch -Patch123: 0123-network-arping2-use-0.0.0.0-as-source-address.patch -Patch124: 0124-TEST-30-ISCSI-add-message-that-all-tests-passed.patch -Patch125: 0125-caps-make-it-a-non-default-module.patch -Patch126: 0126-correctly-install-rsyslog.conf-template.patch -Patch127: 0127-source-dracut-lib-for-warn.patch -Patch128: 0128-move-start-from-udev-to-initqueue-online.patch -Patch129: 0129-fixup-No-such-file-or-directory-errors-when-module-i.patch -Patch130: 0130-subshell-and-set-f-to-prevent-expansion.patch -Patch131: 0131-add-imjournal.so-to-read-systemd-journal.patch -Patch132: 0132-dracut-install-fallback-to-non-hostonly-mode-if-lsmo.patch -Patch133: 0133-dmsquash-live-dmsquash-live-root-det_img_fs-redirect.patch -Patch134: 0134-98integrity-support-validating-the-IMA-policy-file-s.patch -Patch135: 0135-rescue-use-proper-path-for-0-rescue.conf.patch -Patch136: 0136-integrity-ima-policy-load.sh-s-echo-n-printf.patch -Patch137: 0137-test-test-rhel-7.2.rpms.patch -Patch138: 0138-add-README.md.patch -Patch139: 0139-README.md-update.patch -Patch140: 0140-README.md-update.patch -Patch141: 0141-dracut-install-preserve-extended-attributes-when-cop.patch -Patch142: 0142-README-correct-github-URLs.patch -Patch143: 0143-dracut.8-document-INITRD_COMPRESS-environment-variab.patch -Patch144: 0144-README.md-remove-CI-badge.patch -Patch145: 0145-README-update.patch -Patch146: 0146-TODO-remove-some-items.patch -Patch147: 0147-50-dracut.install-use-bin-bash-shebang.patch -Patch148: 0148-dracut.sh-create-the-initramfs-non-world-readable-al.patch -Patch149: 0149-NEWS-update-for-045.patch -Patch150: 0150-Use-versioned-Obsoletes.patch -Patch151: 0151-Makefile-create-rpms-in-DESTDIR-for-target-rpm.patch -Patch152: 0152-TEST-99-RPM-create-dracut-rpms-to-install-first.patch -Patch153: 0153-TEST-99-RPM-add-test_check-for-rpm-dnf-yum.patch -Patch154: 0154-TEST-30-ISCSI-fixed-dhcpd.conf-and-disabled-nowait.patch -Patch155: 0155-TEST-99-RPM-actually-use-the-generated-rpms-with-dnf.patch -Patch156: 0156-TEST-99-RPM-set-release-version-and-disable-update-t.patch -Patch157: 0157-README.testsuite-add-more-requirements.patch -Patch158: 0158-TEST-30-ISCSI-give-server-more-time-for-the-head-sta.patch -Patch159: 0159-Makefile-fixed-DESTDIR-in-rpm-target.patch -Patch160: 0160-TEST-99-RPM-append-to-DESTDIR.patch -Patch161: 0161-README.testsuite-add-dmraid.patch -Patch162: 0162-network-Try-to-load-xennet.patch -Patch163: 0163-dracut.spec-add-systemd-udev-requirement.patch -Patch164: 0164-test-TEST-99-RPM-speedup-test.patch -Patch165: 0165-test-TEST-99-RPM-dnf-does-not-like-any-dracut-subpac.patch -Patch166: 0166-README.md-add-CentOS-badge.patch -Patch167: 0167-TEST-99-RPM-use-best-and-install-all-rpms.patch -Patch168: 0168-Revert-TEST-99-RPM-use-best-and-install-all-rpms.patch -Patch169: 0169-test-test-rhel-7.2.rpms-remove-file.patch -Patch170: 0170-README.md-change-centosci-badge.patch -Patch171: 0171-testsuite-add-cpu-host-to-kvm-call.patch -Patch172: 0172-TEST-99-RPM-retry-dnf-5-times-in-case-http-fails.patch -Patch173: 0173-test-Makefile-proper-return-code-for-make-check.patch -Patch174: 0174-.dir-locals.el-changed-to-sane-style.patch -Patch175: 0175-dracut.sh-add-default-path-for-uefi.patch -Patch176: 0176-modules-kernel-add-phy-and-power-modules-to-generic-.patch -Patch177: 0177-modules-kernel-add-more-usb-controller-modules.patch -Patch178: 0178-Add-aarch64-to-drm-modules-along-side-ARM.patch -Patch179: 0179-Add-check-for-aarch64-to-the-arm-kernel-module-list.patch +Patch1: 0001-crypt-gpg-For-GnuPG-2.1-support-OpenPGP-smartcards.patch +Patch2: 0002-crypt-gpg-Add-README-describing-the-procedure-of-mov.patch +Patch3: 0003-crypt-gpg-Rework-setup-for-CCID-smartcard-support.patch +Patch4: 0004-crypt-gpg-Include-module-if-CCID-smartcard-support-r.patch +Patch5: 0005-wait-for-IPv6-RA-if-using-none-static-IPv6-assignmen.patch +Patch6: 0006-enabling-some-ipv6-config-before-running-wait_for_ip.patch +Patch7: 0007-more-ipv6-improvements.patch +Patch8: 0008-remove-prints.patch +Patch9: 0009-more-ipv6-improvements.patch +Patch10: 0010-dmsquash-live-root-Avoid-mount-source-conflict-on-BA.patch +Patch11: 0011-add-.mailmap.patch +Patch12: 0012-fix-build-with-KMOD.patch +Patch13: 0013-mkinitrd-suse.sh-Fix-prefix-calculation.patch +Patch14: 0014-TEST-50-MULTINIC-fix-bridge-test.patch +Patch15: 0015-Check-the-proper-variable-for-a-custom-IMA-keys-dire.patch +Patch16: 0016-Handle-curl-using-libnssckbi-for-TLS-RHBZ-1447777.patch +Patch17: 0017-drm-Install-pwm-modules-on-all-architectures.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -678,6 +516,9 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Mon May 15 2017 Harald Hoyer - 045-18.git20170515 +- git snapshot + * Wed Apr 12 2017 Peter Robinson 044-178 - Add upstream patches needed for ARMv7/aarch64 fixes diff --git a/sources b/sources index c47819e..60d6d94 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4841a986a80f1696f03a1e1dfc0a7b37 dracut-044.tar.xz +SHA512 (dracut-045.tar.xz) = 2cc64dd2a86ad8707f2c12ba4d0069f7987e8c3a028a59ec6fcf43ae5416d4272e57d395648ebbb557af625f40b17d3ab2a211debbb5a0b7e183c0ff4e6cdb29