Merge pull request #144948 from helsinki-systems/feat/samba-patch-all-libs

samba4: Fix all libraries

Changed files
+2 -2
pkgs
servers
samba
+2 -2
pkgs/servers/samba/4.x.nix
···
# Use find -type f -executable -exec echo {} \; -exec sh -c 'ldd {} | grep "not found"' \;
# Looks like a bug in installer scripts.
postFixup = ''
-
export SAMBA_LIBS="$(find $out -type f -name \*.so -exec dirname {} \; | sort | uniq)"
+
export SAMBA_LIBS="$(find $out -type f -regex '.*\.so\(\..*\)?' -exec dirname {} \; | sort | uniq)"
read -r -d "" SCRIPT << EOF || true
[ -z "\$SAMBA_LIBS" ] && exit 1;
BIN='{}';
···
patchelf --set-rpath "\$ALL_LIBS" "\$BIN" 2>/dev/null || exit $?;
patchelf --shrink-rpath "\$BIN";
EOF
-
find $out -type f -name \*.so -exec $SHELL -c "$SCRIPT" \;
+
find $out -type f -regex '.*\.so\(\..*\)?' -exec $SHELL -c "$SCRIPT" \;
# Samba does its own shebang patching, but uses build Python
find "$out/bin" -type f -executable -exec \