#34 Fixes for F38
Merged a year ago by pvalena. Opened a year ago by pvalena.
rpms/ pvalena/dracut rebase-f38  into  f38

@@ -0,0 +1,38 @@ 

+ From 5dc6aede4b99f1c76219370660b5b62e935a3cb8 Mon Sep 17 00:00:00 2001

+ From: Lubomir Rintel <lkundrak@v3.sk>

+ Date: Tue, 20 Dec 2022 13:06:43 +0100

+ Subject: [PATCH] revert(network-manager): avoid restarting NetworkManager

+ 

+ This reverts commit 77630365aed201a729c73a9ffda0733a75f3fee4.

+ 

+ Its commit message states:

+ 

+   On EL8.3 the NetworkManager keep restarting even if it exits successfully

+   while waiting for Clevis to unlock. This patch ensures NetworkManager runs

+   only once in initrd.

+ 

+ Yes; NetworkManager is run multiple times, so that it's able to

+ configure interfaces that haven't been seen previously (because bus was

+ slow to scan or device took time to initialize).

+ 

+ It's not clear what problem was the original commit trying to fix.

+ I suspect there was no problem, just a misunderstanding.

+ ---

+  modules.d/35network-manager/nm-run.sh | 4 ----

+  1 file changed, 4 deletions(-)

+ 

+ diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh

+ index 7d8d61fa7..14b9cb1ad 100755

+ --- a/modules.d/35network-manager/nm-run.sh

+ +++ b/modules.d/35network-manager/nm-run.sh

+ @@ -2,10 +2,6 @@

+  

+  type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh

+  

+ -if [ -e /tmp/nm.done ]; then

+ -    return

+ -fi

+ -

+  if [ -z "$DRACUT_SYSTEMD" ]; then

+      # Only start NM if networking is needed

+      if [ -e /run/NetworkManager/initrd/neednet ]; then

@@ -0,0 +1,67 @@ 

+ From f6810b69ae722096184eaaf282e12a2caa6928b9 Mon Sep 17 00:00:00 2001

+ From: Dusty Mabe <dusty@dustymabe.com>

+ Date: Tue, 21 Feb 2023 22:21:35 -0500

+ Subject: [PATCH] feat(network): include 98-default-mac-none.link if it exists

+ 

+ In Fedora Linux there was a new 98-default-mac-none.link file added

+ to set the MACAddressPolicy=none for bond/bridge/team devices. We'd

+ like for this policy to apply in the initramfs as well. See

+ 

+ - https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none

+ - https://src.fedoraproject.org/rpms/systemd/pull-request/100#

+ ---

+  modules.d/01systemd-networkd/module-setup.sh | 1 +

+  modules.d/35network-legacy/module-setup.sh   | 6 ++++--

+  modules.d/35network-manager/module-setup.sh  | 6 ++++--

+  3 files changed, 9 insertions(+), 4 deletions(-)

+ 

+ diff --git a/modules.d/01systemd-networkd/module-setup.sh b/modules.d/01systemd-networkd/module-setup.sh

+ index 27d90101..46033549 100755

+ --- a/modules.d/01systemd-networkd/module-setup.sh

+ +++ b/modules.d/01systemd-networkd/module-setup.sh

+ @@ -44,6 +44,7 @@ install() {

+          "$systemdnetwork"/80-container-vz.network \

+          "$systemdnetwork"/80-vm-vt.network \

+          "$systemdnetwork"/80-wifi-adhoc.network \

+ +        "$systemdnetwork"/98-default-mac-none.link \

+          "$systemdnetwork"/99-default.link \

+          "$systemdsystemunitdir"/systemd-networkd.service \

+          "$systemdsystemunitdir"/systemd-networkd.socket \

+ diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh

+ index 868ea8fc..a42f5797 100755

+ --- a/modules.d/35network-legacy/module-setup.sh

+ +++ b/modules.d/35network-legacy/module-setup.sh

+ @@ -23,9 +23,11 @@ installkernel() {

+  install() {

+      local _arch

+  

+ -    #Adding default link

+ +    # Adding default link and (if exists) 98-default-mac-none.link

+      if dracut_module_included "systemd"; then

+ -        inst_multiple -o "${systemdnetwork}/99-default.link"

+ +        inst_multiple -o \

+ +            "${systemdnetwork}/99-default.link" \

+ +            "${systemdnetwork}/98-default-mac-none.link"

+          [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"

+      fi

+  

+ diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh

+ index c5d568f0..6e6cd6cf 100755

+ --- a/modules.d/35network-manager/module-setup.sh

+ +++ b/modules.d/35network-manager/module-setup.sh

+ @@ -51,8 +51,10 @@ install() {

+          inst_simple "$moddir"/nm-initrd.service "$systemdsystemunitdir"/nm-initrd.service

+          inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service

+  

+ -        # Adding default link

+ -        inst_multiple -o "${systemdnetwork}/99-default.link"

+ +        # Adding default link and (if exists) 98-default-mac-none.link

+ +        inst_multiple -o \

+ +            "${systemdnetwork}/99-default.link" \

+ +            "${systemdnetwork}/98-default-mac-none.link"

+          [[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"

+  

+          $SYSTEMCTL -q --root "$initdir" enable nm-initrd.service

+ -- 

+ 2.39.2

+ 

@@ -0,0 +1,26 @@ 

+ From 0e780720efe6488c4e07af39926575ee12f40339 Mon Sep 17 00:00:00 2001

+ From: Laszlo Gombos <laszlo.gombos@gmail.com>

+ Date: Fri, 24 Feb 2023 01:57:19 +0000

+ Subject: [PATCH] fix(dmsquash-live): restore compatibility with earlier

+  releases

+ 

+ Follow-up to 40dd5c90e0efcb9ebaa9abb42a38c7316e9706bd .

+ ---

+  modules.d/90dmsquash-live/dmsquash-live-root.sh | 4 ++++

+  1 file changed, 4 insertions(+)

+ 

+ diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh

+ index 62d1b5e7c..a98e258c2 100755

+ --- a/modules.d/90dmsquash-live/dmsquash-live-root.sh

+ +++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh

+ @@ -403,6 +403,10 @@ fi

+  

+  ROOTFLAGS="$(getarg rootflags)"

+  

+ +if [ "$overlayfs" = required ]; then

+ +    echo "rd.live.overlay.overlayfs=1" > /etc/cmdline.d/dmsquash-need-overlay.conf

+ +fi

+ +

+  if [ -n "$overlayfs" ]; then

+      if [ -n "$FSIMG" ]; then

+          mkdir -m 0755 -p /run/rootfsbase

@@ -0,0 +1,28 @@ 

+ From 6fb0f4b4d54eeb1b1e89c06cc54bdcab504138da Mon Sep 17 00:00:00 2001

+ From: Pavel Valena <pvalena@redhat.com>

+ Date: Fri, 24 Feb 2023 19:19:59 +0100

+ Subject: [PATCH] fix(dracut.sh): kmoddir does not handle trailing /

+ 

+ Fixes https://github.com/dracutdevs/dracut/issues/2236

+ 

+ +(/) only works in bash interactive mode. Using any non-interactive

+ bash run simply doesn't remove anything.

+ 

+ The solution is copied from dracut-lib.sh, trim().

+ ---

+  dracut.sh | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/dracut.sh b/dracut.sh

+ index 1aa3f8e1f..0c0f85c2d 100755

+ --- a/dracut.sh

+ +++ b/dracut.sh

+ @@ -1033,7 +1033,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))

+  ((stdloglvl < 0)) && stdloglvl=0

+  

+  [[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l

+ -drivers_dir="${drivers_dir%%+(/)}"

+ +drivers_dir="${drivers_dir%"${drivers_dir##*[!/]}"}"

+  [[ $do_strip_l ]] && do_strip=$do_strip_l

+  [[ $do_strip ]] || do_strip=yes

+  [[ $aggressive_strip_l ]] && aggressive_strip=$aggressive_strip_l

file modified
+25 -1
@@ -7,7 +7,7 @@ 

  %global __requires_exclude pkg-config

  

  # rpmdev-bumpspec and releng automation compatible variable

- %global baserelease 1

+ %global baserelease 2

  

  Name: dracut

  Version: 059
@@ -40,6 +40,24 @@ 

  # https://github.com/dracutdevs/dracut/pull/2218

  Patch3: 2218-add-module-driver-support-for-macbook-keyboards.patch

  

+ # fix(dmsquash-live): restore compatibility with earlier releases

+ # https://github.com/dracutdevs/dracut/pull/2233/

+ # https://bugzilla.redhat.com/show_bug.cgi?id=2172269

+ Patch4: 2233-dmsquash-live-restore-compatibility.patch

+ 

+ # Fix: dracut --kmoddir fails on paths with traling /

+ # https://bugzilla.redhat.com/show_bug.cgi?id=2173100

+ Patch5: 2237-kmoddir-fix-trailing-forwardslash-handling.patch

+ 

+ # revert(network-manager): avoid restarting NetworkManager

+ # https://github.com/dracutdevs/dracut/pull/2134

+ Patch6: 2134-revert-avoid-restarting-NetworkManager.patch

+ 

+ # Support MACAddressPolicy=none for bond/bridge/team devices

+ # https://fedoraproject.org/wiki/Changes/MAC_Address_Policy_none

+ # https://github.com/dracutdevs/dracut/pull/2224

+ Patch7: 2224-network-include-default-mac-none-link.patch

+ 

  BuildRequires: bash

  BuildRequires: git-core

  BuildRequires: pkgconfig(libkmod) >= 23
@@ -446,6 +464,12 @@ 

  %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install

  

  %changelog

+ * Tue Mar 14 2023  Pavel Valena <pvalena@redhat.com> - 059-2

+ - fix(dmsquash-live): restore compatibility with earlier releases

+ - fix(dracut.sh): handle --kmoddir with trailing /

+ - revert(network-manager): avoid restarting NetworkManager

+ - feat(network): include 98-default-mac-none.link if it exists

+ 

  * Mon Feb 13 2023 Pavel Valena <pvalena@redhat.com> - 059-1

  - Update to 059

  - feat(dracut.sh): option to skip creating initrd

059 was untagged for F38; needs thorough testing

Additional fixes:

  • fix(dmsquash-live): restore compatibility with earlier releases
  • fix(dracut.sh): handle --kmoddir with trailing /
  • revert(network-manager): avoid restarting NetworkManager
  • feat(network): include 98-default-mac-none.link if it exists

FYI: No difference to rawhide patches or version (just changelog + release change)

Smoke test: works on F37

Let's run this via openQA (in bodhi).

LGTM

Thanks! I've posted to devel ML. Let's give others some time to test check this as well.

I did run the openQA update tests on https://koji.fedoraproject.org/koji/taskinfo?taskID=98696049 , as requested, and they all passed. The compose test suite (run only on nightly composes) is rather broader, but the update tests at least check that building and booting a live installer, a network installer, and an ostree installer work.

I did run the openQA update tests on https://koji.fedoraproject.org/koji/taskinfo?taskID=98696049 , as requested, and they all passed. The compose test suite (run only on nightly composes) is rather broader, but the update tests at least check that building and booting a live installer, a network installer, and an ostree installer work.

Thanks a lot!

Pull-Request has been merged by pvalena

a year ago