|
|
28ab1c |
From 2ee3efdfa0c7f12c2f8446721937bfe713858854 Mon Sep 17 00:00:00 2001
|
|
|
28ab1c |
From: Kairui Song <kasong@redhat.com>
|
|
|
28ab1c |
Date: Mon, 9 Aug 2021 18:23:43 +0800
|
|
|
28ab1c |
Subject: [PATCH] fix(squash): apply FIPS and libpthread workaround
|
|
|
28ab1c |
|
|
|
28ab1c |
There are some workarounds in dracut.sh for FIPS/libpthread covering
|
|
|
28ab1c |
some hidden lib dependency issues. These workarounds didn't take effect
|
|
|
28ab1c |
for the squash loader since the squash loader is installed
|
|
|
28ab1c |
independently. So apply these workarounds again.
|
|
|
28ab1c |
|
|
|
28ab1c |
Also skip the lib detection code, since these extra installed libs
|
|
|
28ab1c |
are small, and squash loader contents are dropped after switch root,
|
|
|
28ab1c |
won't be an issue to be always installed. And this makes the code
|
|
|
28ab1c |
cleaner.
|
|
|
28ab1c |
|
|
|
28ab1c |
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
|
28ab1c |
(cherry picked from commit 5ab18dee996f0eeb2b0bfe354570e1b1af46d025)
|
|
|
28ab1c |
|
|
|
28ab1c |
Resolves: #1990847
|
|
|
28ab1c |
---
|
|
|
28ab1c |
modules.d/99squash/module-setup.sh | 6 ++++++
|
|
|
28ab1c |
1 file changed, 6 insertions(+)
|
|
|
28ab1c |
|
|
|
28ab1c |
diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh
|
|
|
28ab1c |
index 7f5d365a..e73d3184 100644
|
|
|
28ab1c |
--- a/modules.d/99squash/module-setup.sh
|
|
|
28ab1c |
+++ b/modules.d/99squash/module-setup.sh
|
|
|
28ab1c |
@@ -53,6 +53,12 @@ installpost() {
|
|
|
28ab1c |
done
|
|
|
28ab1c |
else
|
|
|
28ab1c |
DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep umount
|
|
|
28ab1c |
+
|
|
|
28ab1c |
+ # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so
|
|
|
28ab1c |
+ inst_libdir_file -o "libgcc_s.so*"
|
|
|
28ab1c |
+
|
|
|
28ab1c |
+ # FIPS workaround for Fedora/RHEL: libcrypto needs libssl when FIPS is enabled
|
|
|
28ab1c |
+ [[ $DRACUT_FIPS_MODE ]] && inst_libdir_file -o "libssl.so*"
|
|
|
28ab1c |
fi
|
|
|
28ab1c |
|
|
|
28ab1c |
hostonly="" instmods "loop" "squashfs" "overlay"
|
|
|
28ab1c |
|