]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(squash): apply FIPS and libpthread workaround
authorKairui Song <kasong@redhat.com>
Mon, 9 Aug 2021 10:23:43 +0000 (18:23 +0800)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 9 Aug 2021 17:08:52 +0000 (17:08 +0000)
There are some workarounds in dracut.sh for FIPS/libpthread covering
some hidden lib dependency issues. These workarounds didn't take effect
for the squash loader since the squash loader is installed
independently. So apply these workarounds again.

Also skip the lib detection code, since these extra installed libs
are small, and squash loader contents are dropped after switch root,
won't be an issue to be always installed. And this makes the code
cleaner.

Signed-off-by: Kairui Song <kasong@redhat.com>
modules.d/99squash/module-setup.sh

index e14c4fe206b601aeba9b6a8766f4b1efc1277a17..c42eb679d4137ca961306ad441bb4f2d8beef104 100644 (file)
@@ -52,6 +52,12 @@ installpost() {
         done
     else
         DRACUT_RESOLVE_DEPS=1 inst_multiple sh mount modprobe mkdir switch_root grep umount
+
+        # libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so
+        inst_libdir_file -o "libgcc_s.so*"
+
+        # FIPS workaround for Fedora/RHEL: libcrypto needs libssl when FIPS is enabled
+        [[ $DRACUT_FIPS_MODE ]] && inst_libdir_file -o "libssl.so*"
     fi
 
     hostonly="" instmods "loop" "squashfs" "overlay"