public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Pavel Valena <pvalena@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/dracut] f44: fix(network-manager): hostname not set with old systemd service units
Date: Mon, 07 Sep 2026 22:14:39 GMT	[thread overview]
Message-ID: <178881927978.1.9228507015767126908.rpms-dracut-579b17117f26@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/dracut
            Branch : f44
            Commit : 579b17117f2683a44f770c7bcb7d43fd78e28fb5
            Author : Pavel Valena <pvalena@redhat.com>
            Date   : 2026-09-04T06:51:51+02:00
            Stats  : +51/-3 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/dracut/c/579b17117f2683a44f770c7bcb7d43fd78e28fb5?branch=f44

            Log:
            fix(network-manager): hostname not set with old systemd service units

From-source-git-commit: 40cbd7f9c851eb44ede1f168d39fa8b4f442776c

---
diff --git a/0014-fix-network-manager-hostname-not-set-with-old-system.patch b/0014-fix-network-manager-hostname-not-set-with-old-system.patch
new file mode 100644
index 0000000..4e9b291
--- /dev/null
+++ b/0014-fix-network-manager-hostname-not-set-with-old-system.patch
@@ -0,0 +1,42 @@
+From 3a38802f08e241deed18463d556a8715dd7540bc Mon Sep 17 00:00:00 2001
+From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
+Date: Mon, 6 Oct 2025 17:41:08 +0200
+Subject: [PATCH 14/14] fix(network-manager): hostname not set with old systemd
+ service units
+
+Commit 83dffc58f606ad7ad47a32716ce240831d7f018f added support for using the new
+systemd services provided by NetworkManager upstream if available, instead of
+the old custom systemd services provided by dracut. Specifically,
+`NetworkManager-config-initrd.service` sets /proc/sys/kernel/hostname if needed,
+that's why the old code doing this in the initqueue hook `nm-run.sh` was
+moved by mistake to the section that is executed when systemd is not present.
+
+Fixes #1743
+
+(cherry picked from commit 9b82d239a4967420fb7139ed164b9ad4d77c25d9)
+---
+ modules.d/35network-manager/nm-run.sh | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
+index 9a67b9128..c03e3a4e1 100755
+--- a/modules.d/35network-manager/nm-run.sh
++++ b/modules.d/35network-manager/nm-run.sh
+@@ -14,10 +14,11 @@ if [ -z "${DRACUT_SYSTEMD-}" ]; then
+             break
+         done
+     fi
++fi
+ 
+-    if [ -s /run/NetworkManager/initrd/hostname ]; then
+-        cat /run/NetworkManager/initrd/hostname > /proc/sys/kernel/hostname
+-    fi
++if [ -e /usr/lib/systemd/system/nm-initrd.service ] \
++    && [ -s /run/NetworkManager/initrd/hostname ]; then
++    cat /run/NetworkManager/initrd/hostname > /proc/sys/kernel/hostname
+ fi
+ 
+ kf_get_string() {
+-- 
+2.55.0
+

diff --git a/dracut.spec b/dracut.spec
index 3baaa7d..8307e1b 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -8,7 +8,7 @@
 
 Name: dracut
 Version: 108
-Release: 7%{?dist}
+Release: 8%{?dist}
 
 Summary: Initramfs generator using udev
 
@@ -17,9 +17,9 @@ Summary: Initramfs generator using udev
 # except util/* which is GPLv2
 License: GPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-2.0-only
 
-URL: https://github.com/dracut-ng/dracut-ng/wiki/
+URL: https://github.com/dracut-ng/dracut/wiki/
 
-Source0: https://github.com/dracut-ng/dracut-ng/archive/refs/tags/%{version}.tar.gz
+Source0: https://github.com/dracut-ng/dracut/archive/refs/tags/%{version}.tar.gz
 
 Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
 # revert: "fix(install.d): correctly install pre-genned image and die if no args"
@@ -61,6 +61,9 @@ Patch12: 0012-fix-dracut-use-grep-q-s-to-silence-output-error.patch
 # fix(tpm2-tss): add tss user/group in addition to sysusers config
 # Author: Benjamin Drung <benjamin.drung@canonical.com>
 Patch13: 0013-fix-tpm2-tss-add-tss-user-group-in-addition-to-sysus.patch
+# fix(network-manager): hostname not set with old systemd service units
+# Author: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
+Patch14: 0014-fix-network-manager-hostname-not-set-with-old-system.patch
 
 # Please use source-git to work with this spec file:
 # HowTo: https://packit.dev/source-git/work-with-source-git
@@ -493,6 +496,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
 %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
 
 %changelog
+* Fri Sep 04 2026 Pavel Valena <pvalena@redhat.com> - 108-8
+- fix(network-manager): hostname not set with old systemd service units
+
 * Wed Apr 29 2026 Pavel Valena <pvalena@redhat.com> - 108-7
 - fix(tpm2-tss): add tss user/group in addition to sysusers config
 

                 reply	other threads:[~2026-09-07 22:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178881927978.1.9228507015767126908.rpms-dracut-579b17117f26@fedoraproject.org \
    --to=pvalena@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox