diff --git a/0001-fix-network-manager-don-t-pull-in-systemd-udev-settl.patch b/0001-fix-network-manager-don-t-pull-in-systemd-udev-settl.patch new file mode 100644 index 0000000..85d2e31 --- /dev/null +++ b/0001-fix-network-manager-don-t-pull-in-systemd-udev-settl.patch @@ -0,0 +1,39 @@ +From a0f12fb6a09b09f35ab28753d7c4461c10a8b562 Mon Sep 17 00:00:00 2001 +From: Dusty Mabe +Date: Tue, 29 Jun 2021 15:11:00 -0400 +Subject: [PATCH] fix(network-manager): don't pull in systemd-udev-settle + +We get a nice warning about it being deprecated: + +``` +systemd-udev-settle.service is deprecated. Please fix nm-initrd.service not to pull it in. +``` + +The service is deprecated because its purpose was to wait for the +discovery of all hardware, but it didn't guarantee that (see the +systemd-udev-settle man page). + +NM now runs as an independent service and can deal with devices showing +up at any point, but it does need udev to be started. For now just +Want/After systemd-udev-trigger. +--- + modules.d/35network-manager/nm-initrd.service | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/35network-manager/nm-initrd.service b/modules.d/35network-manager/nm-initrd.service +index 5f9b9043..b9806de0 100644 +--- a/modules.d/35network-manager/nm-initrd.service ++++ b/modules.d/35network-manager/nm-initrd.service +@@ -1,7 +1,7 @@ + [Unit] + DefaultDependencies=no +-Wants=systemd-udev-settle.service +-After=systemd-udev-settle.service ++Wants=systemd-udev-trigger.service ++After=systemd-udev-trigger.service + After=dracut-cmdline.service + Wants=network.target + Before=network.target +-- +2.31.1 + diff --git a/0001-fix-network-manager-pull-in-network.target-in-nm-ini.patch b/0001-fix-network-manager-pull-in-network.target-in-nm-ini.patch new file mode 100644 index 0000000..d0e43bb --- /dev/null +++ b/0001-fix-network-manager-pull-in-network.target-in-nm-ini.patch @@ -0,0 +1,26 @@ +From a97d6e2b13146783831b166ec5e8b33b29c514b0 Mon Sep 17 00:00:00 2001 +From: Dusty Mabe +Date: Fri, 25 Jun 2021 15:27:37 -0400 +Subject: [PATCH] fix(network-manager): pull in network.target in + nm-initrd.service + +Otherwise units with `After=network.target` won't have any effect. +--- + modules.d/35network-manager/nm-initrd.service | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/modules.d/35network-manager/nm-initrd.service b/modules.d/35network-manager/nm-initrd.service +index 815797a4..5f9b9043 100644 +--- a/modules.d/35network-manager/nm-initrd.service ++++ b/modules.d/35network-manager/nm-initrd.service +@@ -3,6 +3,7 @@ DefaultDependencies=no + Wants=systemd-udev-settle.service + After=systemd-udev-settle.service + After=dracut-cmdline.service ++Wants=network.target + Before=network.target + ConditionPathExists=/run/NetworkManager/initrd/neednet + ConditionPathExistsGlob=|/usr/lib/NetworkManager/system-connections/* +-- +2.31.1 + diff --git a/0001-fix-network-manager-support-teaming-under-NM-systemd.patch b/0001-fix-network-manager-support-teaming-under-NM-systemd.patch new file mode 100644 index 0000000..6767b0c --- /dev/null +++ b/0001-fix-network-manager-support-teaming-under-NM-systemd.patch @@ -0,0 +1,34 @@ +From a97d2cedcf65a9a2fbff2591171f0163c7d3cb46 Mon Sep 17 00:00:00 2001 +From: Dusty Mabe +Date: Thu, 24 Jun 2021 14:41:08 -0400 +Subject: [PATCH] fix(network-manager): support teaming under NM+systemd + +Previously when NM was run without dbus then teaming would come +up appropriately [1], but now that dbus exists we also need to +include some supporting infrastructure to allow for it to work +again. + +[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/d689380cfc5734a29b1302d68027190e1a606265 +--- + 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 0b7d21ae..f8561468 100755 +--- a/modules.d/35network-manager/module-setup.sh ++++ b/modules.d/35network-manager/module-setup.sh +@@ -38,6 +38,11 @@ install() { + inst "$dbussystem"/org.freedesktop.NetworkManager.conf + inst_multiple nmcli nm-online + ++ # teaming support under systemd+dbus ++ inst_multiple -o \ ++ "$dbussystem"/teamd.conf \ ++ "$dbussystemconfdir"/teamd.conf ++ + # Install a configuration snippet to prevent the automatic creation of + # "Wired connection #" DHCP connections for Ethernet interfaces + inst_simple "$moddir"/initrd-no-auto-default.conf /usr/lib/NetworkManager/conf.d/ +-- +2.31.1 + diff --git a/dracut.spec b/dracut.spec index a104985..3d449cc 100644 --- a/dracut.spec +++ b/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 2 +%define dist_free_release 3 Name: dracut Version: 055 @@ -36,6 +36,14 @@ Source1: https://www.gnu.org/licenses/lgpl-2.1.txt # for debugging) - workaround for RHBZ #1964879 / upstream #1521, to # be removed when that is properly fixed Patch0: 0001-Never-enable-the-bluetooth-module-by-default-1521.patch +# Fixes for NM running via systemd+dbus in the initramfs +# https://github.com/dracutdevs/dracut/pull/1547 +# https://github.com/dracutdevs/dracut/pull/1548 +Patch1: 0001-fix-network-manager-support-teaming-under-NM-systemd.patch +Patch2: 0001-fix-network-manager-pull-in-network.target-in-nm-ini.patch +# Drop requirement on deprecated systemd-udev-settle +# https://github.com/dracutdevs/dracut/pull/1552 +Patch3: 0001-fix-network-manager-don-t-pull-in-systemd-udev-settl.patch BuildRequires: bash BuildRequires: git-core @@ -489,6 +497,10 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Fri Jul 09 2021 Dusty Mabe - 055-3 +- Fixes for NM running via systemd+dbus in the initramfs +- Drop requirement on deprecated systemd-udev-settle + * Thu Jun 10 2021 Adam Williamson - 055-2 - Never include bluetooth module by default (rhbz 1964879) (workaround)