Reference:32f6f364ddb2c6b584e29aa332cad7(cherry picked from commit c0528bd057cb8b3128e6038e56cc43566d43cc9b)
47 lines
1.8 KiB
Diff
47 lines
1.8 KiB
Diff
From b2c6b584e2227e68f54c8843925dcb73aefe87ac Mon Sep 17 00:00:00 2001
|
|
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
|
|
Date: Wed, 9 Aug 2023 11:28:15 +0200
|
|
Subject: [PATCH] fix(dracut.sh): exit if resolving executable dependencies
|
|
fails
|
|
|
|
We came across an issue where, when resolving executable dependencies, a call to
|
|
a buggy glib function in `dracut-install` was causing a termination with
|
|
SIGSEGV, but dracut didn't stop the build process, which resulted in an
|
|
unbootable initrd, due to missing required libraries.
|
|
|
|
```
|
|
dracut: *** Resolving executable dependencies ***
|
|
xargs: /usr/lib/dracut/dracut-install: terminated by signal 11
|
|
dracut: *** Resolving executable dependencies done ***
|
|
```
|
|
|
|
Therefore, stop the initrd creation in this case.
|
|
|
|
Conflict:code context adaption; delete 'exit 1' because we only want to see alarms and do not want the process to exit
|
|
Reference:https://github.com/dracutdevs/dracut/commit/b2c6b584e2227e68f54c8843925dcb73aefe87ac
|
|
---
|
|
dracut.sh | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/dracut.sh b/dracut.sh
|
|
index fe2954a0..d7bf4b07 100755
|
|
--- a/dracut.sh
|
|
+++ b/dracut.sh
|
|
@@ -2045,7 +2045,12 @@ if [[ $kernel_only != yes ]]; then
|
|
dinfo "*** Resolving executable dependencies ***"
|
|
find "$initdir" -type f -perm /0111 -not -path '*.ko' -print0 \
|
|
| xargs -r -0 "$DRACUT_INSTALL" ${initdir:+-D "$initdir"} ${dracutsysrootdir:+-r "$dracutsysrootdir"} -R ${DRACUT_FIPS_MODE:+-f} --
|
|
- dinfo "*** Resolving executable dependencies done ***"
|
|
+ # shellcheck disable=SC2181
|
|
+ if (($? == 0)); then
|
|
+ dinfo "*** Resolving executable dependencies done ***"
|
|
+ else
|
|
+ dfatal "Resolving executable dependencies failed"
|
|
+ fi
|
|
fi
|
|
|
|
# Now we are done with lazy resolving, always install dependencies
|
|
--
|
|
2.33.0
|
|
|