public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/dracut] rawhide: fix(crypt): do not call return to exit a systemd generator
@ 2026-10-30 5:53 Pavel Valena
0 siblings, 0 replies; only message in thread
From: Pavel Valena @ 2026-10-30 5:53 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/dracut
Branch : rawhide
Commit : 98a3ed2d0dbb143768e4ac7d1d69249c41e2ca50
Author : Pavel Valena <pvalena@redhat.com>
Date : 2026-10-28T10:03:35+01:00
Stats : +49/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/dracut/c/98a3ed2d0dbb143768e4ac7d1d69249c41e2ca50?branch=rawhide
Log:
fix(crypt): do not call return to exit a systemd generator
Resolves: rhbz#2516033
From-source-git-commit: e410059dfba80d8ef8aa922690a48a5643330736
---
diff --git a/0023-fix-crypt-do-not-call-return-to-exit-a-systemd-gener.patch b/0023-fix-crypt-do-not-call-return-to-exit-a-systemd-gener.patch
new file mode 100644
index 0000000..befe2e3
--- /dev/null
+++ b/0023-fix-crypt-do-not-call-return-to-exit-a-systemd-gener.patch
@@ -0,0 +1,42 @@
+From 5e7ae5de0a72da47790747cee8af58a5614af5be Mon Sep 17 00:00:00 2001
+From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
+Date: Wed, 8 Jul 2026 08:53:02 +0200
+Subject: [PATCH 23/23] fix(crypt): do not call return to exit a systemd
+ generator
+
+systemd generators implemented via shell scripts are not sourced by systemd, so
+calling `return` within them to exit is incorrect.
+
+Fixes #2490
+
+(cherry picked from commit fbb7270edcf9fbc1c60959dc35e532dfe5c382b8)
+
+Resolves: rhbz#2516033
+---
+ modules.d/70crypt/crypt-generator.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/modules.d/70crypt/crypt-generator.sh b/modules.d/70crypt/crypt-generator.sh
+index 5c65f4cf9..f543e6a6e 100755
+--- a/modules.d/70crypt/crypt-generator.sh
++++ b/modules.d/70crypt/crypt-generator.sh
+@@ -22,13 +22,13 @@ generator_set_device_timeout() {
+
+ if ! getargbool 1 rd.luks; then
+ # crypto LUKS detection is disabled
+- return 0
++ exit 0
+ fi
+
+-[ -e /etc/crypttab ] || return 0
++[ -e /etc/crypttab ] || exit 0
+
+ GENERATOR_DIR="$1"
+-[ -n "$GENERATOR_DIR" ] || return 1
++[ -n "$GENERATOR_DIR" ] || exit 1
+ [ -d "$GENERATOR_DIR" ] || mkdir -p "$GENERATOR_DIR"
+
+ timeout=$(getarg rd.timeout)
+--
+2.55.0
+
diff --git a/dracut.spec b/dracut.spec
index 9419da2..7893b51 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -8,7 +8,7 @@
Name: dracut
Version: 111
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Initramfs generator using udev
@@ -88,6 +88,9 @@ Patch21: 0021-fix-dracut-install-remove-FTS_NOSTAT-in-install_modu.patch
# fix(drm): add leds-qcom-lpg to aarch64 specific modules needed by drm
# Author: Hans de Goede <johannes.goede@oss.qualcomm.com>
Patch22: 0022-fix-drm-add-leds-qcom-lpg-to-aarch64-specific-module.patch
+# fix(crypt): do not call return to exit a systemd generator
+# Author: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
+Patch23: 0023-fix-crypt-do-not-call-return-to-exit-a-systemd-gener.patch
# Please use source-git to work with this spec file:
# HowTo: https://packit.dev/source-git/work-with-source-git
@@ -537,6 +540,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
%changelog
+* Wed Sep 30 2026 Angel Cervera Roldan <angelcerveraroldan@protonmail.com> - 111-5
+- fix(crypt): do not call return to exit a systemd generator
+
* Wed Sep 09 2026 Pavel Valena <pvalena@redhat.com> - 111-4
- build: add Requires: kbd for i18n
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-30 5:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 5:53 [rpms/dracut] rawhide: fix(crypt): do not call return to exit a systemd generator Pavel Valena
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox