From 8f33b8cc93006c97a8f6b7ede20214992ed31fa8 Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sun, 6 Sep 2015 10:21:43 +0200 Subject: 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. --- pkgs/development/compilers/ghc/6.10.2-binary.nix | 2 +- pkgs/development/compilers/ghc/7.0.4-binary.nix | 2 +- pkgs/development/compilers/ghc/7.4.2-binary.nix | 2 +- pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh | 2 +- pkgs/development/compilers/oraclejdk/jdk-linux-base.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pkgs/development/compilers') diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index 4e660853f200..96ec4e6c114a 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. (if stdenv.isLinux then '' - find . -type f -perm +100 \ + find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \; for prog in ld ar gcc strip ranlib; do diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix index 7a6f1b78fa49..31df7f1fa355 100644 --- a/pkgs/development/compilers/ghc/7.0.4-binary.nix +++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. stdenv.lib.optionalString stdenv.isLinux '' - find . -type f -perm +100 \ + find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "${ncurses}/lib:${gmp}/lib" {} \; sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix index 3d781e9d558f..03dd4dcd35bb 100644 --- a/pkgs/development/compilers/ghc/7.4.2-binary.nix +++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { stdenv.lib.optionalString stdenv.isLinux '' mkdir -p "$out/lib" ln -sv "${ncurses}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5" - find . -type f -perm +100 \ + find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "$out/lib:${gmp}/lib" {} \; sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 diff --git a/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh b/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh index 56669ae0f2f6..459bfce50988 100644 --- a/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh +++ b/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh @@ -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" {} \; diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix index 35ee1a04a268..c5588787922a 100644 --- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix +++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix @@ -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" {} \; -- cgit 1.4.1