From adad6cbe48f1b9d3c6cac339864419a13bf2b8f2 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 29 2020 07:09:16 +0000 Subject: import dracut-033-572.el7 --- diff --git a/SOURCES/0568-netlib-fix-botched-backport.patch b/SOURCES/0568-netlib-fix-botched-backport.patch new file mode 100644 index 0000000..c36ed8a --- /dev/null +++ b/SOURCES/0568-netlib-fix-botched-backport.patch @@ -0,0 +1,31 @@ +From 256f9a3f37ea33b94692303dfe10141a333cd744 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 18 May 2020 14:47:04 +0200 +Subject: [PATCH] netlib: fix botched backport + +--- + modules.d/40network/net-lib.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh +index 3f2fc712..3c08a603 100755 +--- a/modules.d/40network/net-lib.sh ++++ b/modules.d/40network/net-lib.sh +@@ -646,7 +646,7 @@ wait_for_ipv6_dad_link() { + + while [ $cnt -lt $timeout ]; do + [ -n "$(ip -6 addr show dev "$1" scope link)" ] \ +- [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ ++ && [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \ + && return 1 +@@ -664,7 +664,7 @@ wait_for_ipv6_dad() { + + while [ $cnt -lt $timeout ]; do + [ -n "$(ip -6 addr show dev "$1")" ] \ +- [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ ++ && [ -z "$(ip -6 addr show dev "$1" tentative)" ] \ + && return 0 + [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \ + && return 1 diff --git a/SOURCES/0569-dracut.sh-disable-lsinitrd-logging-when-quiet.patch b/SOURCES/0569-dracut.sh-disable-lsinitrd-logging-when-quiet.patch new file mode 100644 index 0000000..0f315b2 --- /dev/null +++ b/SOURCES/0569-dracut.sh-disable-lsinitrd-logging-when-quiet.patch @@ -0,0 +1,58 @@ +From df58ab6257ff2c688432d3cde159538419f85769 Mon Sep 17 00:00:00 2001 +From: Ziyue Yang +Date: Wed, 23 Aug 2017 11:23:34 +0800 +Subject: [PATCH] dracut.sh: disable lsinitrd logging when quiet + +Currently in Fedora/RedHat dracut installs its fedora.conf.example +as the default config file, in which sysloglvl is set 5. This leads +to maxloglvl=5 in dracut calls, making unnecessary lsinitrd calls +during initramfs builds by kdump. + +This patch disables lsinitrd logging when --quiet option is given, +which is controlled by maxloglvl only before. This will speed up +dracut image building as the following if --quiet is used in kdump: + +1) Before this patch +$ kdumpctl stop; touch /etc/kdump.conf; time kdumpctl start +kexec: unloaded kdump kernel +Stopping kdump: [OK] +Detected change(s) in the following file(s): + /etc/kdump.conf +Rebuilding /boot/initramfs-4.13.0-0.rc1.git4.1.fc27.x86_64kdump.img +kexec: loaded kdump kernel +Starting kdump: [OK] +real 0m26.824s +user 0m9.958s +sys 0m15.106s + +2) After this patch +$ kdumpctl stop; touch /etc/kdump.conf; time kdumpctl start +kexec: unloaded kdump kernel +Stopping kdump: [OK] +Detected change(s) in the following file(s): + /etc/kdump.conf +Rebuilding /boot/initramfs-4.13.0-0.rc1.git4.1.fc27.x86_64kdump.img +kexec: loaded kdump kernel +Starting kdump: [OK] +real 0m20.420s +user 0m8.385s +sys 0m10.468s + +Signed-off-by: Ziyue Yang +--- + dracut.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dracut.sh b/dracut.sh +index 62e53b73..d7459d06 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1688,7 +1688,7 @@ fi + + dinfo "*** Creating image file done ***" + +-if (( maxloglvl >= 5 )); then ++if (( maxloglvl >= 5 )) && (( verbosity_mod_l >= 0 )); then + if [[ $allowlocal ]]; then + "$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img" | ddebug + else diff --git a/SOURCES/0570-Drop-dependency-on-bridge-utils.patch b/SOURCES/0570-Drop-dependency-on-bridge-utils.patch new file mode 100644 index 0000000..8f319a5 --- /dev/null +++ b/SOURCES/0570-Drop-dependency-on-bridge-utils.patch @@ -0,0 +1,53 @@ +From ba25b54c7eaa65c53cc81df1d0ee8c1439e501a8 Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +Date: Tue, 14 Feb 2017 12:51:18 +0100 +Subject: [PATCH] Drop dependency on bridge-utils + +--- + README.testsuite | 1 - + modules.d/40network/ifup.sh | 6 +++--- + modules.d/40network/module-setup.sh | 1 - + 3 files changed, 3 insertions(+), 5 deletions(-) + +diff --git a/README.testsuite b/README.testsuite +index 247ed3aa..fc2ee209 100644 +--- a/README.testsuite ++++ b/README.testsuite +@@ -1,6 +1,5 @@ + For the testsuite to work, you will have to install at least the following software packages: + dash \ +-bridge-utils \ + asciidoc \ + mdadm \ + lvm2 \ +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index 181ab67c..47ec2df6 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -187,11 +187,11 @@ if [ -z "$NO_BRIDGE_MASTER" ]; then + 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 ++ ip link add name $bridgename type bridge ++ echo 0 > /sys/devices/virtual/net/$bridgename/bridge/forward_delay + > /tmp/bridge.$bridgename.up + fi +- brctl addif $bridgename $ethname ++ ip link set dev $ethname master $bridgename + ifup $bridgename + exit 0 + done +diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh +index de353674..4ead92fa 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -71,7 +71,6 @@ install() { + local _arch _i _dir + inst_multiple ip arping dhclient sed awk + inst_multiple -o ping ping6 +- inst_multiple -o brctl + inst_multiple -o teamd teamdctl teamnl + inst_simple /etc/libnl/classid + inst_script "$moddir/ifup.sh" "/sbin/ifup" diff --git a/SOURCES/0571-95znet-Add-a-rd.znet_ifname-option.patch b/SOURCES/0571-95znet-Add-a-rd.znet_ifname-option.patch new file mode 100644 index 0000000..56c001a --- /dev/null +++ b/SOURCES/0571-95znet-Add-a-rd.znet_ifname-option.patch @@ -0,0 +1,59 @@ +From 76ec341c5efbeb0c47ec28c518820c1b4beac2fa Mon Sep 17 00:00:00 2001 +From: Kairui Song +Date: Thu, 5 Mar 2020 18:44:45 +0800 +Subject: [PATCH] 95znet: Add a rd.znet_ifname= option + +qeth device may have a different IP for each boot, so the rd.ifname= +option will no longer work. So for znet device, introduce a +rd.znet_ifname= options, to subchannel id instead of MAC address as the +identifier and rename the interface. + +Signed-off-by: Kairui Song +--- + dracut.cmdline.7.asc | 5 +++++ + modules.d/95znet/parse-ccw.sh | 18 ++++++++++++++++++ + 2 files changed, 23 insertions(+) + +diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc +index 1204aeb2..3c70c82d 100644 +--- a/dracut.cmdline.7.asc ++++ b/dracut.cmdline.7.asc +@@ -762,6 +762,11 @@ ZNET + ~~~~ + **rd.znet=**____,____,____:: + rd.znet can be specified multiple times on the kernel command line. ++ ++**rd.znet_ifname=**____:____:: ++ Assign network device name (i.e. "bootnet") to the NIC ++ corresponds to the subchannels. This is useful when dracut's default ++ "ifname=" doesn't work due to device having a changing MAC address. + + + [listing] + .Example +diff --git a/modules.d/95znet/parse-ccw.sh b/modules.d/95znet/parse-ccw.sh +index cf1f41d4..c8085eda 100755 +--- a/modules.d/95znet/parse-ccw.sh ++++ b/modules.d/95znet/parse-ccw.sh +@@ -6,4 +6,22 @@ for ccw_arg in $(getargs rd.ccw -d 'rd_CCW=') $(getargs rd.znet -d 'rd_ZNET='); + echo $ccw_arg >> /etc/ccw.conf + done + ++for ifname in $(getargs rd.znet_ifname); do ++ IFS=: read ifname_if ifname_subchannels _rest <<< "$ifname" ++ if [ -z "$ifname_if" ] || [ -z "$ifname_subchannels" ] || [ -n "$_rest" ]; then ++ warn "Invalid arguments for rd.znet_ifname=" ++ else ++ { ++ ifname_subchannels=${ifname_subchannels//,/|} ++ ++ echo 'ACTION!="add|change", GOTO="ccw_ifname_end"' ++ echo 'ATTR{type}!="1", GOTO="ccw_ifname_end"' ++ echo 'SUBSYSTEM!="net", GOTO="ccw_ifname_end"' ++ echo "SUBSYSTEMS==\"ccwgroup\", KERNELS==\"$ifname_subchannels\", DRIVERS==\"?*\" NAME=\"$ifname_if\"" ++ echo 'LABEL="ccw_ifname_end"' ++ ++ } > /etc/udev/rules.d/81-ccw-ifname.rules ++ fi ++done ++ + znet_cio_free diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index e4636b2..0162642 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 033 -Release: 568%{?dist} +Release: 572%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -596,6 +596,10 @@ Patch564: 0564-rootfs-generator-don-t-set-JobRunningTimeoutSec.patch Patch565: 0565-Sync-initramfs-after-creation.patch Patch566: 0566-dracut.sh-quote-sync-file-argument.patch Patch567: 0567-net-lib-check-if-addr-exists-before-checking-for-dad.patch +Patch568: 0568-netlib-fix-botched-backport.patch +Patch569: 0569-dracut.sh-disable-lsinitrd-logging-when-quiet.patch +Patch570: 0570-Drop-dependency-on-bridge-utils.patch +Patch571: 0571-95znet-Add-a-rd.znet_ifname-option.patch BuildRequires: bash git @@ -1027,6 +1031,14 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Thu Jun 18 2020 Lukas Nykryn - 033-572 +- 95znet: Add a rd.znet_ifname= option + +* Mon May 18 2020 Lukas Nykryn - 033-571 +- Drop dependency on bridge-utils +- dracut.sh: disable lsinitrd logging when quiet +- netlib: fix botched backport + * Tue Oct 29 2019 Lukas Nykryn - 033-568 - net-lib: check if addr exists before checking for dad state