treewide: remove paxutils from stdenv

More then one year ago we removed grsecurity kernels from nixpkgs:
https://github.com/NixOS/nixpkgs/pull/25277

This removes now also paxutils from stdenv.
This commit is contained in:
Jörg Thalheim
2018-12-22 12:55:05 +01:00
parent 0a2efa121d
commit 1b146a8c6f
65 changed files with 17 additions and 687 deletions
@@ -21,7 +21,6 @@ let
update = ".0.1";
build = "13";
repover = "jdk-${major}${update}+${build}";
paxflags = if stdenv.isi686 then "msp" else "m";
openjdk = stdenv.mkDerivation {
name = "openjdk-${major}${update}-b${build}";
@@ -106,14 +105,6 @@ let
rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
''}
# Set PaX markings
exes=$(file $out/lib/openjdk/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
echo "to mark: *$exes*"
for file in $exes; do
echo "marking *$file*"
paxmark ${paxflags} "$file"
done
ln -s $out/lib/openjdk/bin $out/bin
'';
-9
View File
@@ -25,7 +25,6 @@ let
build = "26";
baseurl = "http://hg.openjdk.java.net/jdk8u/jdk8u";
repover = "jdk8u${update}-b${build}";
paxflags = if stdenv.isi686 then "msp" else "m";
jdk8 = fetchurl {
url = "${baseurl}/archive/${repover}.tar.gz";
sha256 = "1hx5sfsglc101aqs9n7cz7rh447d6rxfxkbw03crvzbvy9n6ag2d";
@@ -176,14 +175,6 @@ let
rm -rf $out/lib/openjdk/jre/lib/cmm
ln -s {$jre,$out}/lib/openjdk/jre/lib/cmm
# Set PaX markings
exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
echo "to mark: *$exes*"
for file in $exes; do
echo "marking *$file*"
paxmark ${paxflags} "$file"
done
# Remove duplicate binaries.
for i in $(cd $out/lib/openjdk/bin && echo *); do
if [ "$i" = java ]; then continue; fi
@@ -36,13 +36,5 @@ let
patchelf --set-interpreter $(cat "${stdenv.cc}/nix-support/dynamic-linker") "$elf" || true
patchelf --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:${zlib}/lib:$LIBDIRS" "$elf" || true
done
# Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings:
find "$out/bin" -type f -print0 | while IFS= read -r -d "" elf; do
isELF "$elf" || continue
paxmark m "$elf"
# On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$elf"''}
done
'';
in bootstrap