From 3610a113379cdd14a1e8e26c5c56a5a14048d381 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Jan 05 2018 09:46:51 +0000 Subject: git snapshot --- diff --git a/0037.patch b/0037.patch index 9b19d09..18c867e 100644 --- a/0037.patch +++ b/0037.patch @@ -21,3 +21,4 @@ index 855adba6..03363fb2 100644 %description live This package requires everything which is needed to build an + diff --git a/0038.patch b/0038.patch new file mode 100644 index 0000000..b9b1f78 --- /dev/null +++ b/0038.patch @@ -0,0 +1,44 @@ +From 2bdce3d461a2d790d3bde41efb533c5e2881ee76 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 6 Dec 2017 14:49:42 +0100 +Subject: [PATCH] Merge pull request #311 from + dracut-mailing-devs/1512379451-17727-1-git-send-email-piliu@redhat.com + +dracut.sh: for_each_host_xx() function should indicate the empty case +--- + dracut-functions.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 112b2434..575bd4a6 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -468,7 +468,8 @@ for_each_host_dev_fs() + local _dev + local _ret=1 + +- [[ "${#host_fs_types[@]}" ]] || return 0 ++ [[ "${#host_fs_types[@]}" ]] || return 2 ++ + + for _dev in "${!host_fs_types[@]}"; do + $_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0 +@@ -527,7 +528,7 @@ for_each_host_dev_and_slaves_all() + local _dev + local _ret=1 + +- [[ "${host_devs[@]}" ]] || return 0 ++ [[ "${host_devs[@]}" ]] || return 2 + + for _dev in "${host_devs[@]}"; do + [[ -b "$_dev" ]] || continue +@@ -543,7 +544,7 @@ for_each_host_dev_and_slaves() + local _func="$1" + local _dev + +- [[ "${host_devs[@]}" ]] || return 0 ++ [[ "${host_devs[@]}" ]] || return 2 + + for _dev in "${host_devs[@]}"; do + [[ -b "$_dev" ]] || continue + diff --git a/0039.patch b/0039.patch new file mode 100644 index 0000000..7309d14 --- /dev/null +++ b/0039.patch @@ -0,0 +1,36 @@ +From 825730780a209c1eecc9563b8454ab8bdb71e7cc Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 6 Dec 2017 14:58:36 +0100 +Subject: [PATCH] Merge pull request #310 from danimo/remove-systemd-bootchart + +Remove 00systemd-bootchart +--- + modules.d/00systemd-bootchart/module-setup.sh | 19 ------------------- + 1 file changed, 19 deletions(-) + +diff --git a/modules.d/00systemd-bootchart/module-setup.sh b/modules.d/00systemd-bootchart/module-setup.sh +deleted file mode 100755 +index dcf546e6..00000000 +--- a/modules.d/00systemd-bootchart/module-setup.sh ++++ /dev/null +@@ -1,19 +0,0 @@ +-#!/bin/bash +- +-# called by dracut +-check() { +- [[ "$mount_needs" ]] && return 1 +- require_binaries $systemdutildir/systemd-bootchart || return 1 +- return 255 +-} +- +-# called by dracut +-depends() { +- return 0 +-} +- +-# called by dracut +-install() { +- inst_symlink /init /sbin/init +- inst_multiple $systemdutildir/systemd-bootchart +-} + diff --git a/0040.patch b/0040.patch new file mode 100644 index 0000000..a38fd93 --- /dev/null +++ b/0040.patch @@ -0,0 +1,33 @@ +From cd0305cee0f74e82b6cff70782cd99dd56103835 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 12 Dec 2017 10:22:41 +0100 +Subject: [PATCH] Merge pull request #312 from jnbr/network + +40network: install grep +--- + modules.d/40network/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index 2dd169e2..a1010911 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -4,7 +4,7 @@ + check() { + local _program + +- require_binaries ip dhclient || return 1 ++ require_binaries ip dhclient sed awk grep || return 1 + require_any_binary arping arping2 || return 1 + + return 255 +@@ -24,7 +24,7 @@ installkernel() { + # called by dracut + install() { + local _arch _i _dir +- inst_multiple ip dhclient sed awk ++ inst_multiple ip dhclient sed awk grep + + inst_multiple -o arping arping2 + strstr "$(arping 2>&1)" "ARPing 2" && mv "$initdir/bin/arping" "$initdir/bin/arping2" + diff --git a/0041.patch b/0041.patch new file mode 100644 index 0000000..daeaf77 --- /dev/null +++ b/0041.patch @@ -0,0 +1,28 @@ +From 3dbf1f078357867b289ec58138fe134e7e99762e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 13 Dec 2017 08:51:12 +0100 +Subject: [PATCH] Merge pull request #313 from danimo/amd-family0x17 + +Support Microcode Updates for AMD CPU Family 0x17 +--- + dracut-functions.sh | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 575bd4a6..642dcf09 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -662,8 +662,10 @@ get_ucode_file () + local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //` + + if [[ "$(get_cpu_vendor)" == "AMD" ]]; then +- # If family greater than or equal to 0x16 +- if [[ $family -ge 22 ]]; then ++ # If family greater than or equal to 0x17 ++ if [[ $family -ge 23 ]]; then ++ printf "microcode_amd_fam17h.bin" ++ elif [[ $family -eq 22 ]]; then + printf "microcode_amd_fam16h.bin" + elif [[ $family -eq 21 ]]; then + printf "microcode_amd_fam15h.bin" + diff --git a/0042.patch b/0042.patch new file mode 100644 index 0000000..2f893bd --- /dev/null +++ b/0042.patch @@ -0,0 +1,31 @@ +From 6b7dca1631cc0df6292c43008b6ff7ab7f60aad2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 14 Dec 2017 15:36:54 +0100 +Subject: [PATCH] Merge pull request #314 from danimo/simplify-amd-ucode + +Simplify microcode lookup for for AMD CPUs +--- + dracut-functions.sh | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/dracut-functions.sh b/dracut-functions.sh +index 642dcf09..e99c4533 100755 +--- a/dracut-functions.sh ++++ b/dracut-functions.sh +@@ -662,13 +662,8 @@ get_ucode_file () + local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //` + + if [[ "$(get_cpu_vendor)" == "AMD" ]]; then +- # If family greater than or equal to 0x17 +- if [[ $family -ge 23 ]]; then +- printf "microcode_amd_fam17h.bin" +- elif [[ $family -eq 22 ]]; then +- printf "microcode_amd_fam16h.bin" +- elif [[ $family -eq 21 ]]; then +- printf "microcode_amd_fam15h.bin" ++ if [[ $family -ge 21 ]]; then ++ printf "microcode_amd_fam%xh.bin" $family + else + printf "microcode_amd.bin" + fi + diff --git a/0043.patch b/0043.patch new file mode 100644 index 0000000..8c1e7b7 --- /dev/null +++ b/0043.patch @@ -0,0 +1,23 @@ +From fb9970ba2d5b9c25cd05f1e37411ad07604474ea Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 14 Dec 2017 15:37:40 +0100 +Subject: [PATCH] Merge pull request #315 from danimo/emergency-task-limit + +Fix task limit in emergency.service (the same change as in dracut-emergency.service) (bsc#1019938) +--- + modules.d/98dracut-systemd/emergency.service | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98dracut-systemd/emergency.service b/modules.d/98dracut-systemd/emergency.service +index 100146a3..cf20806c 100644 +--- a/modules.d/98dracut-systemd/emergency.service ++++ b/modules.d/98dracut-systemd/emergency.service +@@ -23,6 +23,7 @@ StandardOutput=inherit + StandardError=inherit + KillMode=process + IgnoreSIGPIPE=no ++TasksMax=infinity + + # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash + # terminates cleanly. + diff --git a/0044.patch b/0044.patch new file mode 100644 index 0000000..cd9c3b5 --- /dev/null +++ b/0044.patch @@ -0,0 +1,24 @@ +From 611b8ae0d71cf2562badb82ddc9abf1b3c848d50 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Thu, 14 Dec 2017 15:38:12 +0100 +Subject: [PATCH] Merge pull request #316 from danimo/btrfs-crc32-accel + +Include crc32c-intel module when using btrfs +--- + modules.d/90btrfs/module-setup.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh +index 9303dbe2..b0d0058b 100755 +--- a/modules.d/90btrfs/module-setup.sh ++++ b/modules.d/90btrfs/module-setup.sh +@@ -26,6 +26,8 @@ depends() { + # called by dracut + installkernel() { + instmods btrfs ++ # Make sure btfs can use fast crc32c implementations where available (bsc#1011554) ++ instmods crc32c-intel + } + + # called by dracut + diff --git a/0045.patch b/0045.patch new file mode 100644 index 0000000..4014afe --- /dev/null +++ b/0045.patch @@ -0,0 +1,33 @@ +From ffbe0373e2751cda7014b3a4024074bdac1c48aa Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 09:01:21 +0100 +Subject: [PATCH] Merge pull request #319 from danimo/modules-load.d-hostonly + +Fix loading of modules in modules-load.d +--- + modules.d/00systemd/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh +index d022de65..1ed4b34f 100755 +--- a/modules.d/00systemd/module-setup.sh ++++ b/modules.d/00systemd/module-setup.sh +@@ -160,7 +160,7 @@ install() { + } + + _mods=$(modules_load_get /usr/lib/modules-load.d) +- [[ $_mods ]] && instmods $_mods ++ [[ $_mods ]] && hostonly='' instmods $_mods + + if [[ $hostonly ]]; then + inst_multiple -H -o \ +@@ -180,7 +180,7 @@ install() { + ${NULL} + + _mods=$(modules_load_get /etc/modules-load.d) +- [[ $_mods ]] && instmods $_mods ++ [[ $_mods ]] && hostonly='' instmods $_mods + fi + + if ! [[ -e "$initdir/etc/machine-id" ]]; then + diff --git a/0046.patch b/0046.patch new file mode 100644 index 0000000..4034afe --- /dev/null +++ b/0046.patch @@ -0,0 +1,27 @@ +From fa54381b4eb4967b1b193b671baca31841ab6dfe Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 09:02:39 +0100 +Subject: [PATCH] Merge pull request #320 from danimo/ifname-bond + +Do not pass ifname for bonding devices (bsc#995812) +--- + modules.d/95nfs/module-setup.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index 31d90d42..b3ecf92d 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -57,7 +57,10 @@ cmdline() { + nfs_address=${lookup##* } + fi + ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') +- if [ -e /sys/class/net/$ifname/address ] ; then ++ if [ -d /sys/class/net/$ifname/bonding ]; then ++ dinfo "Found bonded interface '${ifname}'. Make sure to provide an appropriate 'bond=' cmdline." ++ return ++ elif [ -e /sys/class/net/$ifname/address ] ; then + ifmac=$(cat /sys/class/net/$ifname/address) + printf 'ifname=%s:%s ' ${ifname} ${ifmac} + fi + diff --git a/0047.patch b/0047.patch new file mode 100644 index 0000000..bee081e --- /dev/null +++ b/0047.patch @@ -0,0 +1,28 @@ +From 8f4f40cb3c1bdef99fe4c9ccb073068415c915ba Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 09:05:49 +0100 +Subject: [PATCH] Merge pull request #322 from danimo/font_maps + +10i18n: Add correct fontmaps +--- + modules.d/10i18n/module-setup.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index 7723f6fa..7320a919 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -209,7 +209,11 @@ install() { + if [[ ${FONT_MAP} ]] + then + FONT_MAP=${FONT_MAP%.trans} +- inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans ++ # There are three different formats that setfont supports ++ inst_simple ${kbddir}/consoletrans/${FONT_MAP} \ ++ || inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans \ ++ || inst_simple ${kbddir}/consoletrans/${FONT_MAP}_to_uni.trans \ ++ || dwarn "Could not find FONT_MAP ${FONT_MAP}!" + fi + + if [[ ${FONT_UNIMAP} ]] + diff --git a/0048.patch b/0048.patch new file mode 100644 index 0000000..018122a --- /dev/null +++ b/0048.patch @@ -0,0 +1,69 @@ +From c0f2b6bebc0b2feefdb15a2862308c08bbd4a77e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 09:06:54 +0100 +Subject: [PATCH] Merge pull request #323 from danimo/dm-fixes + +Two SUSE fixes for 90dm +--- + modules.d/90dm/dm-shutdown.sh | 31 +++++++++++++++++++++++++++++-- + modules.d/90dm/module-setup.sh | 2 +- + 2 files changed, 30 insertions(+), 3 deletions(-) + +diff --git a/modules.d/90dm/dm-shutdown.sh b/modules.d/90dm/dm-shutdown.sh +index 7e4f4a58..b23836f4 100755 +--- a/modules.d/90dm/dm-shutdown.sh ++++ b/modules.d/90dm/dm-shutdown.sh +@@ -1,11 +1,38 @@ + #!/bin/sh + ++_remove_dm() { ++ local dev=$1 ++ local s ++ local devname ++ ++ for s in /sys/block/${dev}/holders/dm-* ; do ++ [ -e ${s} ] || continue ++ _remove_dm ${s##*/} ++ done ++ # multipath devices might have MD devices on top, ++ # which are removed after this script. So do not ++ # remove those to avoid spurious errors ++ case $(cat /sys/block/${dev}/dm/uuid) in ++ mpath-*) ++ return 0 ++ ;; ++ *) ++ devname=$(cat /sys/block/${dev}/dm/name) ++ dmsetup -v --noudevsync remove "$devname" || return $? ++ ;; ++ esac ++ return 0 ++} ++ + _do_dm_shutdown() { + local ret=0 + local final=$1 ++ local dev ++ + info "Disassembling device-mapper devices" +- for dev in $(dmsetup info -c --noheadings -o name) ; do +- dmsetup -v --noudevsync remove "$dev" || ret=$? ++ for dev in /sys/block/dm-* ; do ++ [ -e ${dev} ] || continue ++ _remove_dm ${dev##*/} || ret=$? + done + if [ "x$final" != "x" ]; then + info "dmsetup ls --tree" +diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh +index 2b8e39ff..02d97c24 100755 +--- a/modules.d/90dm/module-setup.sh ++++ b/modules.d/90dm/module-setup.sh +@@ -38,6 +38,6 @@ install() { + inst_rules "$moddir/59-persistent-storage-dm.rules" + prepare_udev_rules 59-persistent-storage-dm.rules + +- inst_hook shutdown 30 "$moddir/dm-shutdown.sh" ++ inst_hook shutdown 25 "$moddir/dm-shutdown.sh" + } + + diff --git a/0049.patch b/0049.patch new file mode 100644 index 0000000..9e93b11 --- /dev/null +++ b/0049.patch @@ -0,0 +1,27 @@ +From dfbbb0baf5f1124ab387bbf6ab9ec592462c14bb Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 09:11:54 +0100 +Subject: [PATCH] Merge pull request #326 from danimo/no_efi_fcoe_default + +fcoe-uefi: Add check for usage +--- + modules.d/95fcoe-uefi/module-setup.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/95fcoe-uefi/module-setup.sh b/modules.d/95fcoe-uefi/module-setup.sh +index c9ff3c2f..a464df5a 100755 +--- a/modules.d/95fcoe-uefi/module-setup.sh ++++ b/modules.d/95fcoe-uefi/module-setup.sh +@@ -12,6 +12,11 @@ check() { + } + [[ $hostonly ]] || [[ $mount_needs ]] && { + [ -d /sys/firmware/efi ] || return 255 ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ fcoe_ctlr=$c ++ done ++ [ -z "$fcoe_ctlr" ] && return 255 + } + require_binaries dcbtool fipvlan lldpad ip readlink || return 1 + return 0 + diff --git a/0050.patch b/0050.patch new file mode 100644 index 0000000..ebcfa25 --- /dev/null +++ b/0050.patch @@ -0,0 +1,27 @@ +From 84912dde41a93f665a5fd1e43f0c5796d432d751 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 09:13:29 +0100 +Subject: [PATCH] Merge pull request #327 from danimo/nfs_host_robustness + +Rebustness fixes for NFS hostnames +--- + modules.d/95nfs/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh +index b3ecf92d..2ca75d07 100755 +--- a/modules.d/95nfs/module-setup.sh ++++ b/modules.d/95nfs/module-setup.sh +@@ -51,9 +51,9 @@ cmdline() { + + ### ip= ### + if [[ $nfs_device = [0-9]*\.[0-9]*\.[0-9]*.[0-9]* ]] || [[ $nfs_device = \[.*\] ]]; then +- nfs_address="$nfs_device" ++ nfs_address="${nfs_device%%:*}" + else +- lookup=$(host $(echo ${nfs_device%%:*})| head -n1) ++ lookup=$(host "${nfs_device%%:*}"| grep " address " | head -n1) + nfs_address=${lookup##* } + fi + ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p') + diff --git a/0051.patch b/0051.patch new file mode 100644 index 0000000..1699126 --- /dev/null +++ b/0051.patch @@ -0,0 +1,23 @@ +From 1619e731f7e6c257532898efc0a7008e407d427e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 09:14:21 +0100 +Subject: [PATCH] Merge pull request #330 from danimo/task_max_emergency + +Set TaskMax=inifinite for the emergency shell +--- + modules.d/98dracut-systemd/dracut-emergency.service | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/98dracut-systemd/dracut-emergency.service b/modules.d/98dracut-systemd/dracut-emergency.service +index 718c4a78..ac25b9f2 100644 +--- a/modules.d/98dracut-systemd/dracut-emergency.service ++++ b/modules.d/98dracut-systemd/dracut-emergency.service +@@ -22,6 +22,7 @@ StandardOutput=inherit + StandardError=inherit + KillMode=process + IgnoreSIGPIPE=no ++TasksMax=infinity + + # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash + # terminates cleanly. + diff --git a/0052.patch b/0052.patch new file mode 100644 index 0000000..2a6ef94 --- /dev/null +++ b/0052.patch @@ -0,0 +1,25 @@ +From 12930f30a1b68ed7cd545a55976a5a1f02346bec Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 09:43:57 +0100 +Subject: [PATCH] Merge pull request #324 from danimo/mdraid-no-delete-part + +90dmraid: do not delete partitions +--- + modules.d/90dmraid/61-dmraid-imsm.rules | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules +index 4d4d9391..72267d3c 100644 +--- a/modules.d/90dmraid/61-dmraid-imsm.rules ++++ b/modules.d/90dmraid/61-dmraid-imsm.rules +@@ -23,9 +23,6 @@ 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;' ", \ + GOTO="dm_end" + +-ENV{DEVTYPE}!="partition", \ +- RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}" +- + RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan $env{DEVNAME}" + + LABEL="dm_end" + diff --git a/0054.patch b/0054.patch new file mode 100644 index 0000000..60126e0 --- /dev/null +++ b/0054.patch @@ -0,0 +1,24 @@ +From 2d3273f96f7527690b3d2e16d1aa766a8e19c376 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 10:01:33 +0100 +Subject: [PATCH] Merge pull request #325 from danimo/dasd_cio_free + +95dasd_mod: do not set module parameters if dasd_cio_free is not present +--- + modules.d/95dasd_mod/parse-dasd-mod.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/95dasd_mod/parse-dasd-mod.sh b/modules.d/95dasd_mod/parse-dasd-mod.sh +index 92ee1a79..b4c01a32 100755 +--- a/modules.d/95dasd_mod/parse-dasd-mod.sh ++++ b/modules.d/95dasd_mod/parse-dasd-mod.sh +@@ -7,7 +7,7 @@ done + + mod_args="${mod_args#*,}" + +-if [ -n "$mod_args" ]; then ++if [ -x /sbin/dasd_cio_free -a -n "$mod_args" ]; then + [ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d + echo "options dasd_mod dasd=$mod_args" >> /etc/modprobe.d/dasd_mod.conf + fi + diff --git a/0055.patch b/0055.patch new file mode 100644 index 0000000..771324f --- /dev/null +++ b/0055.patch @@ -0,0 +1,24 @@ +From 07e413bd0f2cb0578a28c3137f92b491c063f826 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 11:29:17 +0100 +Subject: [PATCH] Merge pull request #334 from FloGa/master + +Use pattern matching function +--- + modules.d/99fs-lib/fs-lib.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh +index 5c831558..d39ca1b7 100755 +--- a/modules.d/99fs-lib/fs-lib.sh ++++ b/modules.d/99fs-lib/fs-lib.sh +@@ -100,7 +100,7 @@ fsck_drv_com() { + local _ret + local _out + +- if ! strstr "$_fop" "-[ynap]"; then ++ if ! strglobin "$_fop" "-[ynap]"; then + _fop="-a ${_fop}" + fi + + diff --git a/0056.patch b/0056.patch new file mode 100644 index 0000000..282de64 --- /dev/null +++ b/0056.patch @@ -0,0 +1,39 @@ +From 43634c2469a33c80c235f9bfe254002c6bea5448 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 18 Dec 2017 15:26:31 +0100 +Subject: [PATCH] Merge pull request #335 from lnykryn/BOOT_IMAGE-to-HMAC + +01fips: Fix creating path to .hmac of kernel based on BOOT_IMAGE +--- + modules.d/01fips/fips.sh | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 1e5707c0..11de1793 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -110,13 +110,19 @@ do_fips() + do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 + else + BOOT_IMAGE="$(getarg BOOT_IMAGE)" +- [ -e "/boot/.${BOOT_IMAGE}.hmac" ] || BOOT_IMAGE="vmlinuz-${KERNEL}" ++ if ! [ -e "/boot/${BOOT_IMAGE}" ]; then ++ #if /boot is not a separate partition BOOT_IMAGE might start with /boot ++ BOOT_IMAGE=${BOOT_IMAGE#"/boot"} ++ [ -e "/boot/${BOOT_IMAGE}" ] || BOOT_IMAGE="vmlinuz-${KERNEL}" ++ fi ++ ++ BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE%/*}/.${BOOT_IMAGE##*/}.hmac" + +- if ! [ -e "/boot/.${BOOT_IMAGE}.hmac" ]; then +- warn "/boot/.${BOOT_IMAGE}.hmac does not exist" ++ if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then ++ warn "${BOOT_IMAGE_HMAC} does not exist" + return 1 + fi +- sha512hmac -c "/boot/.${BOOT_IMAGE}.hmac" || return 1 ++ sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1 + fi + + info "All initrd crypto checks done" + diff --git a/0057.patch b/0057.patch new file mode 100644 index 0000000..ab8d184 --- /dev/null +++ b/0057.patch @@ -0,0 +1,24 @@ +From 598660bbe61ddc4bd3a3f9c754727d5676174b9e Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 19 Dec 2017 14:36:45 +0100 +Subject: [PATCH] Merge pull request #336 from danimo/add_drivers + +Fix possible hang in dracut +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 635fdb1c..8daafc35 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1466,7 +1466,7 @@ if [[ $no_kernel != yes ]]; then + hostonly='' instmods $drivers + fi + +- if [[ $add_drivers ]]; then ++ if [[ -n "${add_drivers// }" ]]; then + hostonly='' instmods -c $add_drivers + fi + if [[ $force_drivers ]]; then + diff --git a/0058.patch b/0058.patch new file mode 100644 index 0000000..2adc028 --- /dev/null +++ b/0058.patch @@ -0,0 +1,200 @@ +From a187bc3ca5bb6c8d66e5942eaf33da7a9610c7c2 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 19 Dec 2017 14:39:07 +0100 +Subject: [PATCH] Merge pull request #337 from danimo/lunmask + +95lunmask: Add module to handle LUN masking +--- + modules.d/95lunmask/fc_transport_scan_lun.sh | 26 ++++++++++ + modules.d/95lunmask/module-setup.sh | 70 +++++++++++++++++++++++++++ + modules.d/95lunmask/parse-lunmask.sh | 40 +++++++++++++++ + modules.d/95lunmask/sas_transport_scan_lun.sh | 26 ++++++++++ + 4 files changed, 162 insertions(+) + +diff --git a/modules.d/95lunmask/fc_transport_scan_lun.sh b/modules.d/95lunmask/fc_transport_scan_lun.sh +new file mode 100755 +index 00000000..d9f84a38 +--- /dev/null ++++ b/modules.d/95lunmask/fc_transport_scan_lun.sh +@@ -0,0 +1,26 @@ ++#!/bin/bash ++# ++# fc_transport_lun_scan ++# ++# Selectively enable individual LUNs behind an FC remote port ++# ++# ACTION=="add", SUBSYSTEM=="fc_transport", ATTR{port_name}=="wwpn", \ ++# PROGRAM="fc_transport_lun_scan lun" ++# ++ ++[ -z $DEVPATH ] && exit 1 ++ ++if [ -n "$1" ] ; then ++ LUN=$1 ++else ++ LUN=- ++fi ++ID=${DEVPATH##*/rport-} ++HOST=${ID%%:*} ++CHANNEL=${ID%%-*} ++CHANNEL=${CHANNEL#*:} ++if [ -f /sys$DEVPATH/scsi_target_id ] ; then ++ TARGET=$(cat /sys$DEVPATH/scsi_target_id) ++fi ++[ -z "$TARGET" ] && exit 1 ++echo $CHANNEL $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan +diff --git a/modules.d/95lunmask/module-setup.sh b/modules.d/95lunmask/module-setup.sh +new file mode 100755 +index 00000000..6afaed26 +--- /dev/null ++++ b/modules.d/95lunmask/module-setup.sh +@@ -0,0 +1,70 @@ ++#!/bin/bash ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++# called by dracut ++cmdline() { ++ get_lunmask() { ++ local _dev=$1 ++ local _devpath=$(cd -P /sys/dev/block/$_dev ; echo $PWD) ++ local _sdev _lun _rport _end_device _classdev _wwpn _sas_address ++ ++ [ "${_devpath#*/sd}" == "$_devpath" ] && return 1 ++ _sdev="${_devpath%%/block/*}" ++ _lun="${_sdev##*:}" ++ # Check for FibreChannel ++ _rport="${_devpath##*/rport-}" ++ if [ "$_rport" != "$_devpath" ] ; then ++ _rport="${_rport%%/*}" ++ _classdev="/sys/class/fc_remote_ports/rport-${_rport}" ++ [ -d "$_classdev" ] || return 1 ++ _wwpn=$(cat ${_classdev}/port_name) ++ echo "rd.lunmask=fc,${_wwpn},${_lun}" ++ return 0 ++ fi ++ # Check for SAS ++ _end_device="${_devpath##*/end_device-}" ++ if [ "$_end_device" != "$_devpath" ] ; then ++ _end_device="${_end_device%%/*}" ++ _classdev="/sys/class/sas_device/end_device-${_end_device}" ++ [ -e "$_classdev" ] || return 1 ++ _sas_address=$(cat ${_classdev}/sas_address) ++ echo "rd.lunmask=sas,${_sas_address},${_lun}" ++ return 0 ++ fi ++ return 1 ++ } ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ for_each_host_dev_and_slaves_all get_lunmask ++ } | sort | uniq ++} ++ ++# called by dracut ++check() { ++ [[ $hostonly ]] || [[ $mount_needs ]] && { ++ [ -w /sys/module/scsi_mod/parameters/scan ] || return 255 ++ scan_type=$(cat /sys/module/scsi_mod/parameters/scan) ++ [ "$scan_type" = "manual" ] && return 0 ++ return 255 ++ } ++ return 0 ++} ++ ++# called by dracut ++depends() { ++ return 0 ++} ++ ++# called by dracut ++install() { ++ inst_script "$moddir/fc_transport_scan_lun.sh" /usr/lib/udev/fc_transport_scan_lun.sh ++ inst_script "$moddir/sas_transport_scan_lun.sh" /usr/lib/udev/sas_transport_scan_lun.sh ++ inst_hook cmdline 30 "$moddir/parse-lunmask.sh" ++ if [[ $hostonly_cmdline == "yes" ]] ; then ++ local _lunmask ++ ++ for _lunmask in $(cmdline) ; do ++ printf "%s\n" "$_lunmask" >> "${initdir}/etc/cmdline.d/95lunmask.conf" ++ done ++ fi ++} +diff --git a/modules.d/95lunmask/parse-lunmask.sh b/modules.d/95lunmask/parse-lunmask.sh +new file mode 100755 +index 00000000..480f6147 +--- /dev/null ++++ b/modules.d/95lunmask/parse-lunmask.sh +@@ -0,0 +1,40 @@ ++#!/bin/sh ++# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- ++# ex: ts=8 sw=4 sts=4 et filetype=sh ++ ++create_udev_rule() { ++ local transport=$1 ++ local tgtid=$2 ++ local lun=$3 ++ local _rule=/etc/udev/rules.d/51-${transport}-lunmask-${tgtid}.rules ++ local _cu_type _dev_type ++ ++ [ -e ${_rule} ] && return 0 ++ ++ if [ ! -f "$_rule" ] ; then ++ if [ "$transport" = "fc" ] ; then ++ cat > $_rule < $_rule < /sys/module/scsi_mod/parameters/scan ++ elif [ ! -f /etc/modprobe.d/95lunmask.conf ] ; then ++ echo "options scsi_mod scan=manual" > /etc/modprobe.d/95lunmask.conf ++ fi ++ create_udev_rule $1 $2 $3 ++ ) ++done +diff --git a/modules.d/95lunmask/sas_transport_scan_lun.sh b/modules.d/95lunmask/sas_transport_scan_lun.sh +new file mode 100755 +index 00000000..f7702f8b +--- /dev/null ++++ b/modules.d/95lunmask/sas_transport_scan_lun.sh +@@ -0,0 +1,26 @@ ++#!/bin/bash ++# ++# sas_transport_lun_scan ++# ++# Selectively enable individual LUNs behind a SAS end device ++# ++# ACTION=="add", SUBSYSTEM=="sas_transport", ATTR{sas_address}=="sas_addr", \ ++# PROGRAM="sas_transport_lun_scan lun" ++# ++ ++[ -z $DEVPATH ] && exit 1 ++ ++if [ -n "$1" ] ; then ++ LUN=$1 ++else ++ LUN=- ++fi ++ID=${DEVPATH##*/end_device-} ++HOST=${ID%%:*} ++CHANNEL=${ID%%-*} ++CHANNEL=${CHANNEL#*:} ++if [ -f /sys$DEVPATH/scsi_target_id ] ; then ++ TARGET=$(cat /sys$DEVPATH/scsi_target_id) ++fi ++[ -z "$TARGET" ] && exit 1 ++echo 0 $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan + diff --git a/0059.patch b/0059.patch new file mode 100644 index 0000000..37d1477 --- /dev/null +++ b/0059.patch @@ -0,0 +1,30 @@ +From 29a9e92999f7b7c977bba4d8cc59233cd3fbf986 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 19 Dec 2017 15:35:18 +0100 +Subject: [PATCH] Merge pull request #331 from fcami/master-fsfreeze + +call fsfreeze(8) on /boot to flush initramfs data & metadata to media +--- + dracut.sh | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 8daafc35..f5c8d74c 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1828,8 +1828,13 @@ fi + command -v restorecon &>/dev/null && restorecon -- "$outfile" + + if ! sync "$outfile" 2> /dev/null; then +- dinfo "dracut: sync operartion on newly created initramfs $outfile failed" ++ dinfo "dracut: sync operation on newly created initramfs $outfile failed" + exit 1 ++# use fsfreeze only if we're not writing to / ++elif ! [ "$(stat -c %m -- "$outfile")" == "/" ]; then ++ if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then ++ dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")" ++ fi + fi + + exit 0 + diff --git a/0060.patch b/0060.patch new file mode 100644 index 0000000..f9c9349 --- /dev/null +++ b/0060.patch @@ -0,0 +1,24 @@ +From 51d2436c22d64e45376c64ad3b6c90c48cc88d78 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 19 Dec 2017 15:41:33 +0100 +Subject: [PATCH] Merge pull request #340 from danimo/mkinitrd_suse_A + +mkinitrd-suse.sh: Implement functionality of -A option +--- + mkinitrd-suse.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mkinitrd-suse.sh b/mkinitrd-suse.sh +index d9de81b9..20d85da1 100755 +--- a/mkinitrd-suse.sh ++++ b/mkinitrd-suse.sh +@@ -265,7 +265,7 @@ while (($# > 0)); do + ;; + -M) read_arg map_file "$@" || shift $? + ;; +- -A) host_only=0;; ++ -A) dracut_args="${dracut_args} --no-host-only";; + -B) skip_update_bootloader=1;; + -v|--verbose) dracut_args="${dracut_args} -v";; + -L) logfile=;; + diff --git a/0061.patch b/0061.patch new file mode 100644 index 0000000..15c0cfa --- /dev/null +++ b/0061.patch @@ -0,0 +1,310 @@ +From 8c3e65d1cecc6e3ba634efdabe5f00b38ac606d8 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 19 Dec 2017 15:43:13 +0100 +Subject: [PATCH] Merge pull request #318 from danimo/fcoe-fixes + +All FCOE-related SUSE patches, rebased on top of master +--- + dracut.cmdline.7.asc | 8 ++-- + modules.d/95fcoe/fcoe-genrules.sh | 6 ++- + modules.d/95fcoe/fcoe-up.sh | 43 ++++++++++++++-------- + modules.d/95fcoe/module-setup.sh | 77 +++++++++++++++++++++++---------------- + modules.d/95fcoe/parse-fcoe.sh | 22 +++++++++-- + modules.d/95fcoe/stop-fcoe.sh | 6 +++ + 6 files changed, 105 insertions(+), 57 deletions(-) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 63c6c10f..b5f6f0f6 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -755,10 +755,12 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30 + + FCoE + ~~~~ +-**fcoe=**____:__{dcb|nodcb}__:: ++**fcoe=**____:__{dcb|nodcb}__:__{fabric|vn2vn}__:: + Try to connect to a FCoE SAN through the NIC specified by __ or +- __ or EDD settings. For the second argument, currently only nodcb is +- supported. This parameter can be specified multiple times. ++ __ or EDD settings. The second argument specifies if DCB ++ should be used. The optional third argument specifies whether ++ fabric or VN2VN mode should be used. ++ This parameter can be specified multiple times. + + + NOTE: letters in the MAC-address must be lowercase! + +diff --git a/modules.d/95fcoe/fcoe-genrules.sh b/modules.d/95fcoe/fcoe-genrules.sh +index eb58601b..445a09c2 100755 +--- a/modules.d/95fcoe/fcoe-genrules.sh ++++ b/modules.d/95fcoe/fcoe-genrules.sh +@@ -7,8 +7,10 @@ + # Write udev rules + { + if [ -n "$fcoe_mac" ] ; then +- printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_mac" "$fcoe_dcb" ++ printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_mac" "$fcoe_dcb" "$fcoe_mode" ++ printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --timeout --unique --name fcoe-timeout-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_mac" "$fcoe_dcb" "$fcoe_mode" + else +- printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb" ++ printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_interface" "$fcoe_dcb" "$fcoe_mode" ++ printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --timeout --unique --name fcoe-timeout-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_interface" "$fcoe_dcb" "$fcoe_mode" + fi + } >> /etc/udev/rules.d/92-fcoe.rules +diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh +index ddc87b1c..570cd848 100755 +--- a/modules.d/95fcoe/fcoe-up.sh ++++ b/modules.d/95fcoe/fcoe-up.sh +@@ -1,7 +1,7 @@ + #!/bin/sh + # + # We get called like this: +-# fcoe-up ++# fcoe-up + # + # Note currently only nodcb is supported, the dcb option is reserved for + # future use. +@@ -15,6 +15,7 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh + + netif=$1 + dcb=$2 ++mode=$3 + vlan="yes" + + iflink=$(cat /sys/class/net/$netif/iflink) +@@ -27,10 +28,18 @@ fi + ip link set dev $netif up + linkup "$netif" + ++# Some fcoemon implementations expect --syslog=true ++syslogopt="--syslog" ++if fcoemon -h|grep syslog|grep -q yes; then ++ fcoemonyes="$syslogopt=yes" ++fi ++ ++ + netdriver=$(readlink -f /sys/class/net/$netif/device/driver) + netdriver=${netdriver##*/} + + write_fcoemon_cfg() { ++ [ -f /etc/fcoe/cfg-$netif ] && return + echo FCOE_ENABLE=\"yes\" > /etc/fcoe/cfg-$netif + if [ "$dcb" = "dcb" ]; then + echo DCB_REQUIRED=\"yes\" >> /etc/fcoe/cfg-$netif +@@ -42,9 +51,23 @@ write_fcoemon_cfg() { + else + echo AUTO_VLAN=\"no\" >> /etc/fcoe/cfg-$netif + fi +- echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif ++ if [ "$mode" = "vn2vn" ] ; then ++ echo MODE=\"vn2vn\" >> /etc/fcoe/cfg-$netif ++ else ++ echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif ++ fi + } + ++if [ "$netdriver" = "bnx2x" ]; then ++ # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan ++ modprobe 8021q ++ udevadm settle --timeout=30 ++ # Sleep for 13 s to allow dcb negotiation ++ sleep 13 ++ fipvlan "$netif" -c -s ++ need_shutdown ++ exit ++fi + if [ "$dcb" = "dcb" ]; then + # wait for lldpad to be ready + i=0 +@@ -77,20 +100,8 @@ if [ "$dcb" = "dcb" ]; then + done + + sleep 1 +- +- write_fcoemon_cfg +- fcoemon --syslog +-elif [ "$netdriver" = "bnx2x" ]; then +- # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan +- modprobe 8021q +- udevadm settle --timeout=30 +- # Sleep for 13 s to allow dcb negotiation +- sleep 13 +- fipvlan "$netif" -c -s +-else +- vlan="no" +- write_fcoemon_cfg +- fcoemon --syslog + fi ++write_fcoemon_cfg ++fcoemon $syslogopt + + need_shutdown +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index eabb21c7..63f45b52 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -41,42 +41,52 @@ get_vlan_parent() { + + # called by dracut + cmdline() { +- +- for c in /sys/bus/fcoe/devices/ctlr_* ; do +- [ -L $c ] || continue +- read enabled < $c/enabled +- [ $enabled -eq 0 ] && continue +- d=$(cd -P $c; echo $PWD) +- i=${d%/*} +- read mac < ${i}/address +- s=$(dcbtool gc ${i##*/} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') +- if [ -z "$s" ] ; then +- p=$(get_vlan_parent ${i}) +- if [ "$p" ] ; then +- s=$(dcbtool gc ${p} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p') ++ { ++ for c in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -L $c ] || continue ++ read enabled < $c/enabled ++ read mode < $c/mode ++ [ $enabled -eq 0 ] && continue ++ if [ $mode = "VN2VN" ] ; then ++ mode="vn2vn" ++ else ++ mode="fabric" ++ fi ++ d=$(cd -P $c; echo $PWD) ++ i=${d%/*} ++ ifname=${i##*/} ++ read mac < ${i}/address ++ s=$(dcbtool gc ${i##*/} dcb 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p') ++ if [ -z "$s" ] ; then ++ p=$(get_vlan_parent ${i}) ++ if [ "$p" ] ; then ++ s=$(dcbtool gc ${p} dcb 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p') ++ ifname=${p##*/} ++ fi ++ fi ++ if [ "$s" = "on" ] ; then ++ dcb="dcb" ++ else ++ dcb="nodcb" + fi +- fi +- if [ "$s" = "on" ] ; then +- dcb="dcb" +- else +- dcb="nodcb" +- fi + +- # Some Combined Network Adapters(CNAs) implement DCB in firmware. +- # Do not run software-based DCB or LLDP on CNAs that implement DCB. +- # If the network interface provides hardware DCB/DCBX capabilities, +- # DCB_REQUIRED in "/etc/fcoe/cfg-xxx" is expected to set to "no". +- # +- # Force "nodcb" if there's any DCB_REQUIRED="no"(child or vlan parent). +- grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${i##*/} &>/dev/null +- [ $? -eq 0 ] && dcb="nodcb" +- if [ "$p" ] ; then +- grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${p} &>/dev/null ++ # Some Combined Network Adapters(CNAs) implement DCB in firmware. ++ # Do not run software-based DCB or LLDP on CNAs that implement DCB. ++ # If the network interface provides hardware DCB/DCBX capabilities, ++ # DCB_REQUIRED in "/etc/fcoe/cfg-xxx" is expected to set to "no". ++ # ++ # Force "nodcb" if there's any DCB_REQUIRED="no"(child or vlan parent). ++ grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${i##*/} &>/dev/null + [ $? -eq 0 ] && dcb="nodcb" +- fi ++ if [ "$p" ] ; then ++ grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${p} &>/dev/null ++ [ $? -eq 0 ] && dcb="nodcb" ++ fi + +- echo "fcoe=${mac}:${dcb}" +- done ++ echo "ifname=${ifname}:${mac}" ++ echo "fcoe=${ifname}:${dcb}:${mode}" ++ done ++ } | sort | uniq + } + + # called by dracut +@@ -94,12 +104,15 @@ install() { + local _fcoeconf=$(cmdline) + [[ $_fcoeconf ]] && printf "%s\n" "$_fcoeconf" >> "${initdir}/etc/cmdline.d/95fcoe.conf" + fi ++ inst_multiple /etc/fcoe/cfg-* ++ + inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up" + inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd" + inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" + inst_hook pre-trigger 03 "$moddir/lldpad.sh" + inst_hook cmdline 99 "$moddir/parse-fcoe.sh" + inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh" ++ inst_hook shutdown 40 "$moddir/stop-fcoe.sh" + dracut_need_initqueue + } + +diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh +index 9f471848..75cca9a5 100755 +--- a/modules.d/95fcoe/parse-fcoe.sh ++++ b/modules.d/95fcoe/parse-fcoe.sh +@@ -1,8 +1,8 @@ + #!/bin/sh + # + # Supported formats: +-# fcoe=: +-# fcoe=: ++# fcoe=:: ++# fcoe=:: + # + # Note currently only nodcb is supported, the dcb option is reserved for + # future use. +@@ -10,8 +10,8 @@ + # Note letters in the macaddress must be lowercase! + # + # Examples: +-# fcoe=eth0:nodcb +-# fcoe=4a:3f:4c:04:f8:d7:nodcb ++# fcoe=eth0:nodcb:vn2vn ++# fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric + + [ -z "$fcoe" ] && fcoe=$(getarg fcoe=) + +@@ -32,11 +32,25 @@ parse_fcoe_opts() { + 2) + fcoe_interface=$1 + fcoe_dcb=$2 ++ fcoe_mode="fabric" ++ return 0 ++ ;; ++ 3) ++ fcoe_interface=$1 ++ fcoe_dcb=$2 ++ fcoe_mode=$3 + return 0 + ;; + 7) + fcoe_mac=$1:$2:$3:$4:$5:$6 + fcoe_dcb=$7 ++ fcoe_mode="fabric" ++ return 0 ++ ;; ++ 8) ++ fcoe_mac=$1:$2:$3:$4:$5:$6 ++ fcoe_dcb=$7 ++ fcoe_mode=$8 + return 0 + ;; + *) +diff --git a/modules.d/95fcoe/stop-fcoe.sh b/modules.d/95fcoe/stop-fcoe.sh +new file mode 100755 +index 00000000..d2462b34 +--- /dev/null ++++ b/modules.d/95fcoe/stop-fcoe.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++ ++for f in /sys/bus/fcoe/devices/ctlr_* ; do ++ [ -e $f ] || continue ++ echo 0 > $f/enabled ++done + diff --git a/0062.patch b/0062.patch new file mode 100644 index 0000000..29d8aa6 --- /dev/null +++ b/0062.patch @@ -0,0 +1,77 @@ +From 8134db6c335b28b6bd58bac4ef4c2236cc9ea06a Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 19 Dec 2017 15:43:58 +0100 +Subject: [PATCH] Merge pull request #321 from danimo/multipath-fixes + +SUSE fixes for 90multipath +--- + modules.d/90multipath/module-setup.sh | 1 + + modules.d/90multipath/multipath-shutdown.sh | 7 +++++++ + modules.d/90multipath/multipathd-needshutdown.sh | 9 +++++---- + modules.d/90multipath/multipathd.service | 5 ++++- + 4 files changed, 17 insertions(+), 5 deletions(-) + +diff --git a/modules.d/90multipath/module-setup.sh b/modules.d/90multipath/module-setup.sh +index 0a680b17..983f6f24 100755 +--- a/modules.d/90multipath/module-setup.sh ++++ b/modules.d/90multipath/module-setup.sh +@@ -89,6 +89,7 @@ install() { + fi + + inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh" ++ inst_hook shutdown 20 "$moddir/multipath-shutdown.sh" + + inst_rules 40-multipath.rules 56-multipath.rules \ + 62-multipath.rules 65-multipath.rules \ +diff --git a/modules.d/90multipath/multipath-shutdown.sh b/modules.d/90multipath/multipath-shutdown.sh +new file mode 100755 +index 00000000..47e9990c +--- /dev/null ++++ b/modules.d/90multipath/multipath-shutdown.sh +@@ -0,0 +1,7 @@ ++#!/bin/bash ++ ++for i in $(multipath -l -v1); do ++ if ! $(dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1') ; then ++ dmsetup message $i 0 fail_if_no_path ++ fi ++done +diff --git a/modules.d/90multipath/multipathd-needshutdown.sh b/modules.d/90multipath/multipathd-needshutdown.sh +index 214abd3a..ee9b69b4 100755 +--- a/modules.d/90multipath/multipathd-needshutdown.sh ++++ b/modules.d/90multipath/multipathd-needshutdown.sh +@@ -1,7 +1,8 @@ + #!/bin/sh + +-for i in /dev/mapper/mpath*; do +- [ -b "$i" ] || continue +- need_shutdown +- break ++for i in $(multipath -l -v1); do ++ if $(dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1') ; then ++ need_shutdown ++ break ++ fi + done +diff --git a/modules.d/90multipath/multipathd.service b/modules.d/90multipath/multipathd.service +index b64b02cd..0554d954 100644 +--- a/modules.d/90multipath/multipathd.service ++++ b/modules.d/90multipath/multipathd.service +@@ -1,12 +1,15 @@ + [Unit] + Description=Device-Mapper Multipath Device Controller + Before=iscsi.service iscsid.service lvm2-activation-early.service ++Wants=systemd-udev-trigger.service systemd-udev-settle.service local-fs-pre.target ++After=systemd-udev-trigger.service systemd-udev-settle.service ++Before=local-fs-pre.target + DefaultDependencies=no + Conflicts=shutdown.target + ConditionKernelCommandLine=!nompath + ConditionKernelCommandLine=!rd.multipath=0 + ConditionKernelCommandLine=!rd_NO_MULTIPATH +-ConditionPathExists=/etc/multipath.conf ++ConditionKernelCommandLine=!multipath=off + + [Service] + Type=simple + diff --git a/0063.patch b/0063.patch new file mode 100644 index 0000000..eee3b56 --- /dev/null +++ b/0063.patch @@ -0,0 +1,30 @@ +From bc4ce61efce3e2d8b2be4f4e3e5fdef6ca08409f Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 2 Jan 2018 14:58:14 +0100 +Subject: [PATCH] mdraid: call mdadm with "--wait-clean" instead of "-W" + +seems like -W changed meanings over the years :-/ +--- + modules.d/90mdraid/mdraid-waitclean.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/90mdraid/mdraid-waitclean.sh b/modules.d/90mdraid/mdraid-waitclean.sh +index 5c901982..d7f0ffdb 100755 +--- a/modules.d/90mdraid/mdraid-waitclean.sh ++++ b/modules.d/90mdraid/mdraid-waitclean.sh +@@ -13,12 +13,12 @@ if getargbool 0 rd.md.waitclean; then + continue + fi + info "Waiting for $md to become clean" +- mdadm $_offroot -W "$md" >/dev/null 2>&1 ++ mdadm $_offroot --wait-clean "$md" >/dev/null 2>&1 + done + + for md in $containers; do + info "Waiting for $md to become clean" +- mdadm $_offroot -W "$md" >/dev/null 2>&1 ++ mdadm $_offroot --wait-clean "$md" >/dev/null 2>&1 + done + + unset containers udevinfo _offroot + diff --git a/0064.patch b/0064.patch new file mode 100644 index 0000000..253f69d --- /dev/null +++ b/0064.patch @@ -0,0 +1,49 @@ +From 03214e51aeffc60669ee9667cbfedea7b21fc4f0 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Tue, 2 Jan 2018 15:01:15 +0100 +Subject: [PATCH] Merge pull request #343 from lnykryn/boot_image_once_more + +01fips: Properly creating path to .hmac of kernel based on BOOT_IMAGE +--- + modules.d/01fips/fips.sh | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh +index 11de1793..9bc089f2 100755 +--- a/modules.d/01fips/fips.sh ++++ b/modules.d/01fips/fips.sh +@@ -110,18 +110,28 @@ do_fips() + do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1 + else + BOOT_IMAGE="$(getarg BOOT_IMAGE)" +- if ! [ -e "/boot/${BOOT_IMAGE}" ]; then ++ BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}" ++ BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}" ++ ++ if [ -z "$BOOT_IMAGE_NAME" ]; then ++ BOOT_IMAGE_NAME="vmlinuz-${KERNEL}" ++ elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}" ]; then + #if /boot is not a separate partition BOOT_IMAGE might start with /boot +- BOOT_IMAGE=${BOOT_IMAGE#"/boot"} +- [ -e "/boot/${BOOT_IMAGE}" ] || BOOT_IMAGE="vmlinuz-${KERNEL}" ++ BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"} ++ #on some achitectures BOOT_IMAGE does not contain path to kernel ++ #so if we can't find anything, let's treat it in the same way as if it was empty ++ if ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then ++ BOOT_IMAGE_NAME="vmlinuz-${KERNEL}" ++ BOOT_IMAGE_PATH="" ++ fi + fi +- +- BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE%/*}/.${BOOT_IMAGE##*/}.hmac" + ++ BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}.${BOOT_IMAGE_NAME}.hmac" + if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then + warn "${BOOT_IMAGE_HMAC} does not exist" + return 1 + fi ++ + sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1 + fi + + diff --git a/0065.patch b/0065.patch new file mode 100644 index 0000000..f8f757d --- /dev/null +++ b/0065.patch @@ -0,0 +1,22 @@ +From 68cbbae33adc65452ee234940f668151f65cc043 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 5 Jan 2018 10:39:44 +0100 +Subject: [PATCH] dracut.spec: remove systemd-bootchart + +--- + dracut.spec | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/dracut.spec b/dracut.spec +index 03363fb2..50d42a31 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -371,7 +371,6 @@ rm -rf -- $RPM_BUILD_ROOT + %endif + + %if %{defined _unitdir} +-%{dracutlibdir}/modules.d/00systemd-bootchart + %else + %{dracutlibdir}/modules.d/00bootchart + %endif + diff --git a/0066.patch b/0066.patch new file mode 100644 index 0000000..f884f16 --- /dev/null +++ b/0066.patch @@ -0,0 +1,21 @@ +From c9d207467c111c1ca4d39a2dd31a7ecfe56aadc7 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Fri, 5 Jan 2018 10:42:22 +0100 +Subject: [PATCH] dracut.spec: add lunmask dracut module + +--- + dracut.spec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dracut.spec b/dracut.spec +index 50d42a31..0b4c2e85 100644 +--- a/dracut.spec ++++ b/dracut.spec +@@ -407,6 +407,7 @@ rm -rf -- $RPM_BUILD_ROOT + %{dracutlibdir}/modules.d/95dasd_mod + %{dracutlibdir}/modules.d/95dasd_rules + %{dracutlibdir}/modules.d/95fstab-sys ++%{dracutlibdir}/modules.d/95lunmask + %{dracutlibdir}/modules.d/95zfcp + %{dracutlibdir}/modules.d/95zfcp_rules + %{dracutlibdir}/modules.d/95terminfo diff --git a/dracut.spec b/dracut.spec index 7e2fa6b..0e57d66 100644 --- a/dracut.spec +++ b/dracut.spec @@ -14,7 +14,7 @@ %define with_nbd 0 %endif -%define dist_free_release 36.git20171201 +%define dist_free_release 64.git20180105 Name: dracut Version: 046 @@ -72,6 +72,34 @@ Patch32: 0034.patch Patch33: 0035.patch Patch34: 0036.patch Patch35: 0037.patch +Patch36: 0038.patch +Patch37: 0039.patch +Patch38: 0040.patch +Patch39: 0041.patch +Patch40: 0042.patch +Patch41: 0043.patch +Patch42: 0044.patch +Patch43: 0045.patch +Patch44: 0046.patch +Patch45: 0047.patch +Patch46: 0048.patch +Patch47: 0049.patch +Patch48: 0050.patch +Patch49: 0051.patch +Patch50: 0052.patch +Patch51: 0054.patch +Patch52: 0055.patch +Patch53: 0056.patch +Patch54: 0057.patch +Patch55: 0058.patch +Patch56: 0059.patch +Patch57: 0060.patch +Patch58: 0061.patch +Patch59: 0062.patch +Patch60: 0063.patch +Patch61: 0064.patch +Patch62: 0065.patch +Patch63: 0066.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -407,7 +435,6 @@ rm -rf -- $RPM_BUILD_ROOT %endif %if %{defined _unitdir} -%{dracutlibdir}/modules.d/00systemd-bootchart %else %{dracutlibdir}/modules.d/00bootchart %endif @@ -444,6 +471,7 @@ rm -rf -- $RPM_BUILD_ROOT %{dracutlibdir}/modules.d/95dasd_mod %{dracutlibdir}/modules.d/95dasd_rules %{dracutlibdir}/modules.d/95fstab-sys +%{dracutlibdir}/modules.d/95lunmask %{dracutlibdir}/modules.d/95zfcp %{dracutlibdir}/modules.d/95zfcp_rules %{dracutlibdir}/modules.d/95terminfo @@ -554,6 +582,9 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Fri Jan 05 2018 Harald Hoyer - 046-64 +- git snapshot + * Fri Dec 01 2017 Harald Hoyer - 046-36 - git snapshot