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:
parent
fd9e9201d6
commit
862900e42e
@ -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" {} \;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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)
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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^"
|
||||||
|
@ -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
|
||||||
|
@ -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" '{}' \;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user