oraclejdk8: Add support for grsecurity
This commit is contained in:
parent
a056940066
commit
4f745ce8b2
@ -12,6 +12,7 @@
|
|||||||
, stdenv
|
, stdenv
|
||||||
, requireFile
|
, requireFile
|
||||||
, unzip
|
, unzip
|
||||||
|
, file
|
||||||
, xlibs ? null
|
, xlibs ? null
|
||||||
, installjdk ? true
|
, installjdk ? true
|
||||||
, pluginSupport ? true
|
, pluginSupport ? true
|
||||||
@ -79,13 +80,23 @@ stdenv.mkDerivation rec {
|
|||||||
else
|
else
|
||||||
abort "jdk requires i686-linux or x86_64 linux";
|
abort "jdk requires i686-linux or x86_64 linux";
|
||||||
|
|
||||||
buildInputs = if installjce then [ unzip ] else [];
|
nativeBuildInputs = [ file ]
|
||||||
|
++ stdenv.lib.optional installjce unzip;
|
||||||
|
|
||||||
# See: https://github.com/NixOS/patchelf/issues/10
|
# See: https://github.com/NixOS/patchelf/issues/10
|
||||||
dontStrip = 1;
|
dontStrip = 1;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
# Set PaX markings
|
||||||
|
exes=$(file $sourceRoot/bin/* $sourceRoot/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
|
||||||
|
for file in $exes; do
|
||||||
|
paxmark m "$file"
|
||||||
|
# On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
|
||||||
|
${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$file"''}
|
||||||
|
done
|
||||||
|
|
||||||
if test -z "$installjdk"; then
|
if test -z "$installjdk"; then
|
||||||
mv $sourceRoot/jre $out
|
mv $sourceRoot/jre $out
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user