diff --git a/0005.patch b/0005.patch index 58eafc0..a03f5e9 100644 --- a/0005.patch +++ b/0005.patch @@ -22,3 +22,4 @@ index 815797a4..e076f50b 100644 After=dracut-cmdline.service Before=network.target ConditionPathExists=/run/NetworkManager/initrd/neednet + diff --git a/0006.patch b/0006.patch new file mode 100644 index 0000000..41ec723 --- /dev/null +++ b/0006.patch @@ -0,0 +1,29 @@ +From 7d3226fe3462685a4a0ad6b8cbe704c9d08f4e77 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 12 Aug 2021 11:46:35 +0200 +Subject: [PATCH] fix(kernel-modules): add blk_mq_alloc_disk and + blk_cleanup_disk to blockfuncs + +Since kernel 5-14 those are used by many drivers for example: +xen-blkfront, loop, nbd, pd + +Cherry-picked from: rhel-only +Resolves: #1986909 +--- + 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 499fc066..36f8ca3c 100755 +--- a/modules.d/90kernel-modules/module-setup.sh ++++ b/modules.d/90kernel-modules/module-setup.sh +@@ -2,7 +2,7 @@ + + # called by dracut + installkernel() { +- 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' ++ 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|blk_mq_alloc_disk|blk_cleanup_disk' + local -A _hostonly_drvs + + find_kernel_modules_external() { + diff --git a/0007.patch b/0007.patch new file mode 100644 index 0000000..5cef064 --- /dev/null +++ b/0007.patch @@ -0,0 +1,45 @@ +From 5f8012de4cb73b90d69075e8118d904302d41c20 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Mon, 9 Aug 2021 09:28:46 +0200 +Subject: [PATCH] fix(network-manager): check for nm-initrd-generator in both + /usr/{libexec,lib} + +Sice commit 22d6863ef1b2 ("fix(network-manager): cope with distributions not +using `libexec`") nm-initrd-generator can be installed in either /usr/libexec +or /usr/lib. Change other modules to check for the binary in both locations. + +(cherry picked from commit 5ee7e249b8cc74461122ccd7efe954b3402c23da) + +Resolves: #1975929 +--- + modules.d/40network/module-setup.sh | 2 +- + modules.d/80cms/cmsifup.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 60824da6..9fd5d806 100755 +--- a/modules.d/40network/module-setup.sh ++++ b/modules.d/40network/module-setup.sh +@@ -19,7 +19,7 @@ depends() { + if [ -z "$network_handler" ]; then + if [[ -x $dracutsysrootdir$systemdsystemunitdir/wicked.service ]]; then + network_handler="network-wicked" +- elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]]; then ++ elif [[ -x $dracutsysrootdir/usr/libexec/nm-initrd-generator ]] || [[ -x $dracutsysrootdir/usr/lib/nm-initrd-generator ]]; then + network_handler="network-manager" + elif [[ -x $dracutsysrootdir$systemdutildir/systemd-networkd ]]; then + network_handler="systemd-networkd" +diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh +index a319227a..73d76fbf 100755 +--- a/modules.d/80cms/cmsifup.sh ++++ b/modules.d/80cms/cmsifup.sh +@@ -34,7 +34,7 @@ fi + IFACES="$IFACES $DEVICE" + echo "$IFACES" >> /tmp/net.ifaces + +-if [ -x /usr/libexec/nm-initrd-generator ]; then ++if [ -x /usr/libexec/nm-initrd-generator ] || [ -x /usr/lib/nm-initrd-generator ]; then + type nm_generate_connections > /dev/null 2>&1 || . /lib/nm-lib.sh + nm_generate_connections + else + diff --git a/0008.patch b/0008.patch new file mode 100644 index 0000000..24b32b6 --- /dev/null +++ b/0008.patch @@ -0,0 +1,42 @@ +From aa561847a82c2446ead5e41742f453629f112b63 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 4 Aug 2021 09:37:31 +0200 +Subject: [PATCH] fix(cms): reload NetworkManager connections + +When NetworkManager is running as systemd service, it's not enough to write +connection files; the module should also tell NetworkManager to reload the +connections from disk so that any new connection can be auto-activated. + +https://bugzilla.redhat.com/show_bug.cgi?id=1975929 +(cherry picked from commit 07977ee5c5294a5d30c1f33f292a0b31303750fb) + +Resolves: #1975929 +--- + modules.d/35network-manager/nm-lib.sh | 4 ++++ + modules.d/80cms/cmsifup.sh | 1 + + 2 files changed, 5 insertions(+) + +diff --git a/modules.d/35network-manager/nm-lib.sh b/modules.d/35network-manager/nm-lib.sh +index 2d27e079..1f749587 100644 +--- a/modules.d/35network-manager/nm-lib.sh ++++ b/modules.d/35network-manager/nm-lib.sh +@@ -28,3 +28,7 @@ nm_generate_connections() { + done + fi + } ++ ++nm_reload_connections() { ++ [ -n "$DRACUT_SYSTEMD" ] && systemctl is-active nm-initrd.service && nmcli connection reload ++} +diff --git a/modules.d/80cms/cmsifup.sh b/modules.d/80cms/cmsifup.sh +index 73d76fbf..285e20d1 100755 +--- a/modules.d/80cms/cmsifup.sh ++++ b/modules.d/80cms/cmsifup.sh +@@ -37,6 +37,7 @@ echo "$IFACES" >> /tmp/net.ifaces + if [ -x /usr/libexec/nm-initrd-generator ] || [ -x /usr/lib/nm-initrd-generator ]; then + type nm_generate_connections > /dev/null 2>&1 || . /lib/nm-lib.sh + nm_generate_connections ++ nm_reload_connections + else + exec ifup "$DEVICE" + fi diff --git a/dracut.spec b/dracut.spec index f5d44ad..b32bff2 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,11 +5,11 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 6.git20210709 +%define dist_free_release 9.git20210812 Name: dracut Version: 055 -Release: %{dist_free_release}%{?dist}.1 +Release: %{dist_free_release}%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -34,6 +34,9 @@ Patch2: 0002.patch Patch3: 0003.patch Patch4: 0004.patch Patch5: 0005.patch +Patch6: 0006.patch +Patch7: 0007.patch +Patch8: 0008.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -489,6 +492,11 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Thu Aug 12 2021 Lukas Nykryn - 055-9.git20210812 +- fix(kernel-modules): add blk_mq_alloc_disk and +- fix(network-manager): check for nm-initrd-generator in both +- fix(cms): reload NetworkManager connections + * Mon Aug 09 2021 Mohan Boddu - 055-6.git20210709.1 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688