mass rewrite of find parameters to cross-platform style
Fixes #9044, close #9667. Thanks to @taku0 for suggesting this solution. Now we have no modes starting with `/` or `+`. Rewrite the `-perm` parameters of find: - completely safe: rewrite `/0100` and `+100` to `-0100`, - slightly semantics-changing: rewrite `+111` to `-0100`. I cross-verified the `find` manual pages for Linux, Darwin, FreeBSD.
This commit is contained in:
@@ -45,7 +45,7 @@ fi
|
||||
rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli
|
||||
|
||||
# set all the dynamic linkers
|
||||
find $out -type f -perm +100 \
|
||||
find $out -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ let result = stdenv.mkDerivation rec {
|
||||
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}
|
||||
|
||||
# set all the dynamic linkers
|
||||
find $out -type f -perm +100 \
|
||||
find $out -type f -perm -0100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$rpath" {} \;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user