Skip to content

Commit

Permalink
Merge pull request #373 from aafeijoo-suse/SLFO_Main-bsc1230354
Browse files Browse the repository at this point in the history
fix(dracut): do not add all lib subdirs to `LD_LIBRARY_PATH` with `--sysroot` (bsc#1230354) (SLFO)
  • Loading branch information
aafeijoo-suse authored Sep 12, 2024
2 parents 824fcff + af3b9f6 commit 0639552
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 1 addition & 4 deletions dracut-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ fi
# ldd needs LD_LIBRARY_PATH pointing to the libraries within the sysroot directory
if [[ -n $dracutsysrootdir ]]; then
for lib in $libdirs; do
mapfile -t -d '' lib_subdirs < <(find "$lib" -type d -print0 2> /dev/null)
for lib_subdir in "${lib_subdirs[@]}"; do
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH":}$dracutsysrootdir$lib_subdir"
done
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH":}$dracutsysrootdir$lib"
done
export LD_LIBRARY_PATH
fi
Expand Down
3 changes: 2 additions & 1 deletion modules.d/00systemd/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ EOF
# Install library file(s)
_arch=${DRACUT_ARCH:-$(uname -m)}
inst_libdir_file \
{"tls/$_arch/",tls/,"$_arch/",}"libnss_*"
{"tls/$_arch/",tls/,"$_arch/",}"libnss_*" \
{"tls/$_arch/",tls/,"$_arch/",}"systemd/libsystemd*.so"

}
2 changes: 2 additions & 0 deletions suse/README.susemaint
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,5 @@ b5a35f9d feat(zfcp_rules): remove zfcp handling consolidated in s390-tools
6611c6e4 fix(dracut-functions.sh): only return block devices from get_persistent_dev
6c99c073 feat(systemd*): include systemd config files from /usr/lib/systemd
e0b87682 fix(dracut): ldd output borked with `--sysroot`
d0c82322 fix(dracut): do not add all lib subdirs to `LD_LIBRARY_PATH` with `--sysroot`
921792f2 feat(systemd): always install libsystemd libraries

0 comments on commit 0639552

Please sign in to comment.