diff --git a/SOURCES/0069.patch b/SOURCES/0069.patch index 82ee58a..d39d324 100644 --- a/SOURCES/0069.patch +++ b/SOURCES/0069.patch @@ -56,3 +56,4 @@ index eb7d2eb4..61838741 100755 exit $ret fi done + diff --git a/SOURCES/0070.patch b/SOURCES/0070.patch new file mode 100644 index 0000000..a6c2bba --- /dev/null +++ b/SOURCES/0070.patch @@ -0,0 +1,38 @@ +From 07e7e84ebea1d76aeaa77d097b34503ec3c8f2e1 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 30 Oct 2019 19:25:51 +0100 +Subject: [PATCH] network-manager: fix getting of ifname from the sysfs path + +commit 5e0f8c8a4ced ('network-manager: remove useless use of basename') +somewhat carelessly didn't take into account that $_i has a slash at +the end which made the result of the ## substitution be just an empty +string. + +The slash was put to the end of /sys/class/net/*/ to make sure we're only +iterating directories, but it's not strictly necessary. In an unlikely case +something else than a directory appears in /sys/class/net/, we'll already deal +with it gracefully. Remove it. + +This fixes the TEST-30-ISCSI test. + +(cherry picked from commit 687e17aa7f2f40d21717be9a04302c749e139d4a) + +Resolves: #1826061 +--- + modules.d/35network-manager/nm-run.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index a539d5b2..b33e0992 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -6,7 +6,7 @@ else + /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon + fi + +-for _i in /sys/class/net/*/ ++for _i in /sys/class/net/* + do + state=/run/NetworkManager/devices/$(cat $_i/ifindex) + grep -q connection-uuid= $state 2>/dev/null || continue + diff --git a/SOURCES/0071.patch b/SOURCES/0071.patch new file mode 100644 index 0000000..5fdf588 --- /dev/null +++ b/SOURCES/0071.patch @@ -0,0 +1,47 @@ +From 02c096d138cc8c788daf5fae75408059cbc7e283 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Mon, 2 Dec 2019 02:19:51 +0100 +Subject: [PATCH] network-manager: don't run NetworkManager when there are no + connections + +NetworkManager would unnecessarily bring up the devices, colliding with +further attempts to rename the devices. + +This is arguably a NetworkManager bug and should eventually be fixed there. +Running NetworkManager without the connection is unnecessary regardless. + +(cherry picked from commit 5965710e018989b02a56e8d190b71740ca3b5463) + +Resolves: #1826061 +--- + modules.d/35network-manager/nm-run.sh | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index b33e0992..4079b735 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -1,10 +1,17 @@ + #!/bin/sh + +-if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then +- /usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace +-else +- /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon +-fi ++for i in /usr/lib/NetworkManager/system-connections/* \ ++ /run/NetworkManager/system-connections/* \ ++ /etc/NetworkManager/system-connections/* \ ++ /etc/sysconfig/network-scripts/ifcfg-*; do ++ [ -f "$i" ] || continue ++ if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then ++ /usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace ++ else ++ /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon ++ fi ++ break ++done + + for _i in /sys/class/net/* + do + diff --git a/SOURCES/0072.patch b/SOURCES/0072.patch new file mode 100644 index 0000000..0299ccc --- /dev/null +++ b/SOURCES/0072.patch @@ -0,0 +1,49 @@ +From b692dbc7f2c6a3fb4fa587d9d63b80e4626dafae Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 11 Mar 2020 09:40:50 +0100 +Subject: [PATCH] network-manager: ensure that nm-run.sh is executed when + needed + +The network-manager command line hook must install a +initqueue/finished hook to ensure that nm-run.sh is executed when +there are network connections to activate. + +Fixes: #694 +(cherry picked from commit 3dcaa97ca4dcfa8092252a22df62c60941e59ce3) + +Resolves: #1826061 +--- + modules.d/35network-manager/nm-config.sh | 11 +++++++++++ + modules.d/35network-manager/nm-run.sh | 2 ++ + 2 files changed, 13 insertions(+) + +diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh +index 1efa737c..39a1c8bd 100755 +--- a/modules.d/35network-manager/nm-config.sh ++++ b/modules.d/35network-manager/nm-config.sh +@@ -5,3 +5,14 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then + fi + + /usr/libexec/nm-initrd-generator -- $(getcmdline) ++ ++if getargbool 0 rd.neednet; then ++ for i in /usr/lib/NetworkManager/system-connections/* \ ++ /run/NetworkManager/system-connections/* \ ++ /etc/NetworkManager/system-connections/* \ ++ /etc/sysconfig/network-scripts/ifcfg-*; do ++ [ -f "$i" ] || continue ++ echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh ++ break ++ done ++fi +diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh +index 4079b735..fc5280a1 100755 +--- a/modules.d/35network-manager/nm-run.sh ++++ b/modules.d/35network-manager/nm-run.sh +@@ -22,3 +22,5 @@ do + source_hook initqueue/online $ifname + /sbin/netroot $ifname + done ++ ++> /tmp/nm.done + diff --git a/SOURCES/0073.patch b/SOURCES/0073.patch new file mode 100644 index 0000000..ed97628 --- /dev/null +++ b/SOURCES/0073.patch @@ -0,0 +1,32 @@ +From 1ade0d247fda747ed33632a7746f9278b74feaa8 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Mon, 23 Mar 2020 22:57:35 +0100 +Subject: [PATCH] network-manager: install libnss DNS and mDNS plugins + +Install libnss_dns.so and libnss_mdns4_minimal.so plugins for the Name +Service Switch (NSS) functionality of glibc so that name resolution +through /etc/resolv.conf and mDNS works in the initrd. + +Fixes: #772 + +Cherry-picked from: 87bffc36e72c121024df033e1a78799456c73523 +Resolves: #1826061 +--- + modules.d/35network-manager/module-setup.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh +index d6d0f9ce..8fc3114d 100755 +--- a/modules.d/35network-manager/module-setup.sh ++++ b/modules.d/35network-manager/module-setup.sh +@@ -51,4 +51,9 @@ install() { + if ! [[ -d "$initdir/etc/sysconfig/network-scripts" ]]; then + inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so" + fi ++ ++ _arch=${DRACUT_ARCH:-$(uname -m)} ++ ++ inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \ ++ {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*" + } + diff --git a/SOURCES/0074.patch b/SOURCES/0074.patch new file mode 100644 index 0000000..c28e6b3 --- /dev/null +++ b/SOURCES/0074.patch @@ -0,0 +1,32 @@ +From 0945c8070e436eef908a1f88c946df6c27d3bc41 Mon Sep 17 00:00:00 2001 +From: Peter Georg +Date: Tue, 21 Apr 2020 21:34:38 +0200 +Subject: [PATCH] Always pull in machinery to read ifcfg files + +So far machinery is only pulled in if the user has not yet included any +ifcfg files. + +(cherry picked from commit faea4e4ddb10f697590b80f8f17181341c537262) + +Resolves: #1826061 +--- + modules.d/35network-manager/module-setup.sh | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh +index 8fc3114d..ad2a1534 100755 +--- a/modules.d/35network-manager/module-setup.sh ++++ b/modules.d/35network-manager/module-setup.sh +@@ -47,10 +47,8 @@ install() { + fi + + # We don't install the ifcfg files from the host automatically. +- # But if the user chooses to include them, we pull in the machinery to read them. +- if ! [[ -d "$initdir/etc/sysconfig/network-scripts" ]]; then +- inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so" +- fi ++ # But the user might choose to include them, so we pull in the machinery to read them. ++ inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so" + + _arch=${DRACUT_ARCH:-$(uname -m)} + diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index 1120af1..5d23b67 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 70.git20200228 +%define dist_free_release 75.git20200422 Name: dracut Version: 049 @@ -97,6 +97,11 @@ Patch66: 0066.patch Patch67: 0067.patch Patch68: 0068.patch Patch69: 0069.patch +Patch70: 0070.patch +Patch71: 0071.patch +Patch72: 0072.patch +Patch73: 0073.patch +Patch74: 0074.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -550,6 +555,13 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog +* Wed Apr 22 2020 Lukas Nykryn - 049-75.git20200422 +- network-manager: fix getting of ifname from the sysfs path +- network-manager: don't run NetworkManager when there are no +- network-manager: ensure that nm-run.sh is executed when +- network-manager: install libnss DNS and mDNS plugins +- Always pull in machinery to read ifcfg files + * Fri Feb 28 2020 Lukas Nykryn - 049-70.git20200228 - network-legacy/ifup: fix ip=dhcp,dhcp6 setup_net logic