public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/dracut] f44: fix(network-manager): hostname not set with old systemd service units
@ 2026-09-07 22:14 Pavel Valena
0 siblings, 0 replies; only message in thread
From: Pavel Valena @ 2026-09-07 22:14 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-07 22:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-07 22:14 [rpms/dracut] f44: fix(network-manager): hostname not set with old systemd service units Pavel Valena
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox