3
0
Fork 0
forked from mirrors/nixpkgs

openjdk-bootstrap: Don't depend on the length of the Glibc version

Building the bootstrap OpenJDK failed if the Glibc version string is
not 4 characters, e.g. "2.12.1" would cause a corrupt tarball.
This commit is contained in:
Eelco Dolstra 2015-01-19 23:24:47 +01:00
parent ec6b82a0c2
commit 365ce3ddba

View file

@ -16,9 +16,13 @@ let
in
runCommand "openjdk-bootstrap" {} ''
xz -dc ${src} | sed "s/e*-glibc-[^/]*/$(basename ${glibc})/g" | tar xv
tar xvf ${src}
mv openjdk-bootstrap $out
for i in $out/bin/*; do
patchelf --set-interpreter ${glibc}/lib/ld-linux*.so.2 $i
done
# Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings:
exes=$(${file}/bin/file $out/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
for file in $exes; do