From: Benjamin Drung Date: Fri, 6 Feb 2026 22:00:14 +0000 (+0100) Subject: fix(dracut): also check libraries when resolving lazy X-Git-Tag: 110~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9becd78c0882f55cf1158993bd68be472b8a8793;p=thirdparty%2Fdracut-ng.git fix(dracut): also check libraries when resolving lazy Dracut might resolve executable dependencies lazy. In this case all libraries are installed without resolving their dependencies. Later Dracut will resolve dependencies of the included executables, but it will not explicitly check libraries. This will miss resolving dependencies of libraries that are used via `dlopen()`. Fixes: https://github.com/dracut-ng/dracut-ng/issues/2193 --- diff --git a/dracut.sh b/dracut.sh index e1aafac7b..40bd07b5e 100755 --- a/dracut.sh +++ b/dracut.sh @@ -2860,15 +2860,15 @@ if [[ $kernel_only != yes ]]; then fi if [[ ${DRACUT_RESOLVE_LAZY-} ]] && [[ $DRACUT_INSTALL ]]; then - dinfo "*** Resolving executable dependencies ***" + dinfo "*** Resolving dependencies for executables and libraries ***" # shellcheck disable=SC2086 - find "$initdir" -type f -perm /0111 -not -name '*.ko*' -print0 \ + find "$initdir" -type f \( -perm /0111 -or -name '*.so*' \) -not -name '*.ko*' -print0 \ | xargs -r -0 $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${dracutsysrootdir:+-r "$dracutsysrootdir"} -R ${DRACUT_FIPS_MODE:+-f} -- # shellcheck disable=SC2181 if (($? == 0)); then - dinfo "*** Resolving executable dependencies done ***" + dinfo "*** Resolving dependencies for executables and libraries done ***" else - dfatal "Resolving executable dependencies failed" + dfatal "Resolving dependencies for executables and libraries failed" exit 1 fi fi