mass-replace deprecated usage of find -perm (Fixes #9044)

sed 's|-perm +0|-perm /0|g'
It's a mass-rebuild due to usage in stdenv's default setup hooks.
This commit is contained in:
Vladimír Čunát 2015-07-30 10:30:17 +02:00
parent fd9e9201d6
commit 862900e42e
9 changed files with 10 additions and 10 deletions

View File

@ -52,7 +52,7 @@ in stdenv.mkDerivation {
RPATH=${libPaths}:$out/${appdir} RPATH=${libPaths}:$out/${appdir}
echo "Updating rpaths to $RPATH in:" echo "Updating rpaths to $RPATH in:"
find "$out/${appdir}" -type f -a -perm +0100 \ find "$out/${appdir}" -type f -a -perm /0100 \
-print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \; -print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \;
''; '';

View File

@ -101,12 +101,12 @@ in stdenv.mkDerivation {
rm "$out/${appdir}/qt.conf" rm "$out/${appdir}/qt.conf"
rm -fr "$out/${appdir}/plugins" rm -fr "$out/${appdir}/plugins"
find "$out/${appdir}" -type f -a -perm +0100 \ find "$out/${appdir}" -type f -a -perm /0100 \
-print -exec patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} {} \; -print -exec patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} {} \;
RPATH=${ldpath}:${gcc.cc}/lib:$out/${appdir} RPATH=${ldpath}:${gcc.cc}/lib:$out/${appdir}
echo "updating rpaths to: $RPATH" echo "updating rpaths to: $RPATH"
find "$out/${appdir}" -type f -a -perm +0100 \ find "$out/${appdir}" -type f -a -perm /0100 \
-print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \; -print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \;
mkdir -p "$out/share/applications" mkdir -p "$out/share/applications"

View File

@ -569,7 +569,7 @@ let inherit (builtins) head tail trace; in
# Interpreters that are already in the store are left untouched. # Interpreters that are already in the store are left untouched.
echo "patching script interpreter paths" echo "patching script interpreter paths"
local f local f
for f in $(find "${dir}" -xtype f -perm +0100); do for f in $(find "${dir}" -xtype f -perm /0100); do
local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f") local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f")
if test -n "$oldPath" -a "''${oldPath:0:''${#NIX_STORE}}" != "$NIX_STORE"; then if test -n "$oldPath" -a "''${oldPath:0:''${#NIX_STORE}}" != "$NIX_STORE"; then
local newPath=$(type -P $(basename $oldPath) || true) local newPath=$(type -P $(basename $oldPath) || true)

View File

@ -18,7 +18,7 @@ patchShebangs() {
local oldInterpreterLine local oldInterpreterLine
local newInterpreterLine local newInterpreterLine
find "$dir" -type f -perm +0100 | while read f; do find "$dir" -type f -perm /0100 | while read f; do
if [ "$(head -1 "$f" | head -c +2)" != '#!' ]; then if [ "$(head -1 "$f" | head -c +2)" != '#!' ]; then
# missing shebang => not a script # missing shebang => not a script
continue continue

View File

@ -10,7 +10,7 @@ buildRubyGem {
}; };
dontPatchShebangs = true; dontPatchShebangs = true;
postInstall = '' postInstall = ''
find $out -type f -perm +0100 | while read f; do find $out -type f -perm /0100 | while read f; do
substituteInPlace $f \ substituteInPlace $f \
--replace "/usr/bin/env" "${coreutils}/bin/env" --replace "/usr/bin/env" "${coreutils}/bin/env"
done done

View File

@ -6,7 +6,7 @@ buildRubyGem {
sha256 = "1zkxw6699bbmsamrij2lirscbh0j58p1p3bql22jsxvx34j6w5nc"; sha256 = "1zkxw6699bbmsamrij2lirscbh0j58p1p3bql22jsxvx34j6w5nc";
dontPatchShebangs = true; dontPatchShebangs = true;
postInstall = '' postInstall = ''
find $out -type f -perm +0100 | while read f; do find $out -type f -perm /0100 | while read f; do
substituteInPlace $f \ substituteInPlace $f \
--replace "/usr/bin/env" "${coreutils}/bin/env" --replace "/usr/bin/env" "${coreutils}/bin/env"
done done

View File

@ -26,7 +26,7 @@ wrapPythonProgramsIn() {
done done
# Find all regular files in the output directory that are executable. # Find all regular files in the output directory that are executable.
for f in $(find "$dir" -type f -perm +0100); do for f in $(find "$dir" -type f -perm /0100); do
# Rewrite "#! .../env python" to "#! /nix/store/.../python". # Rewrite "#! .../env python" to "#! /nix/store/.../python".
if head -n1 "$f" | grep -q '#!.*/env.*\(python\|pypy\)'; then if head -n1 "$f" | grep -q '#!.*/env.*\(python\|pypy\)'; then
sed -i "$f" -e "1 s^.*/env[ ]*\(python\|pypy\)^#! $python^" sed -i "$f" -e "1 s^.*/env[ ]*\(python\|pypy\)^#! $python^"

View File

@ -9,7 +9,7 @@ patchELF() {
if [ -e "$prefix" ]; then if [ -e "$prefix" ]; then
find "$prefix" \( \ find "$prefix" \( \
\( -type f -a -name "*.so*" \) -o \ \( -type f -a -name "*.so*" \) -o \
\( -type f -a -perm +0100 \) \ \( -type f -a -perm /0100 \) \
\) -print -exec patchelf --shrink-rpath '{}' \; \) -print -exec patchelf --shrink-rpath '{}' \;
fi fi
stopNest stopNest

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
patchelf --set-rpath "$out/usr/lib/plexmediaserver" "$out/usr/lib/plexmediaserver/$bin" patchelf --set-rpath "$out/usr/lib/plexmediaserver" "$out/usr/lib/plexmediaserver/$bin"
done done
find $out/usr/lib/plexmediaserver/Resources -type f -a -perm +0100 \ find $out/usr/lib/plexmediaserver/Resources -type f -a -perm /0100 \
-print -exec patchelf --set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" '{}' \; -print -exec patchelf --set-interpreter "${glibc}/lib/ld-linux-x86-64.so.2" '{}' \;