oraclejdk7: Add support for grsecurity

This commit is contained in:
Ricardo M. Correia 2013-12-26 11:40:40 +01:00
parent 06725e95eb
commit 601bd3e6e5

View File

@ -2,6 +2,7 @@
, stdenv
, requireFile
, unzip
, file
, xlibs ? null
, installjdk ? true
, pluginSupport ? true
@ -71,10 +72,20 @@ stdenv.mkDerivation rec {
else
abort "jdk requires i686-linux or x86_64 linux";
buildInputs = if installjce then [ unzip ] else [];
nativeBuildInputs = [ file ]
++ stdenv.lib.optional installjce unzip;
installPhase = ''
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
mv $sourceRoot/jre $out
else