Backed out changeset 44f885bc7c22 (bug 1405412)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 12 Oct 2017 23:41:25 +0200
changeset 385935 0e81b421af3564b89e2a9a646af24d83c36ba9fc
parent 385934 64a408bde7d2f24606f0806ce36f27480251a442
child 385936 a6fab9d472152a3582869bac6088eb31b2957403
push id32672
push userarchaeopteryx@coole-files.de
push dateFri, 13 Oct 2017 09:00:05 +0000
treeherdermozilla-central@3efcb26e5f37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1405412
milestone58.0a1
backs out44f885bc7c227aa6c6c7862629f55e2e16c1f4d4
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 44f885bc7c22 (bug 1405412)
taskcluster/scripts/builder/build-android-dependencies/repackage-jdk-centos.sh
new file mode 100644
--- /dev/null
+++ b/taskcluster/scripts/builder/build-android-dependencies/repackage-jdk-centos.sh
@@ -0,0 +1,53 @@
+#!/bin/bash -vex
+
+set -e -x
+
+: WORKSPACE ${WORKSPACE:=/builds/worker/workspace}
+
+set -v
+
+mkdir -p $WORKSPACE/java
+pushd $WORKSPACE/java
+
+# change these variables when updating java version
+mirror_url_base="http://mirror.centos.org/centos/6/os/x86_64/Packages"
+openjdk=java-1.8.0-openjdk-headless-1.8.0.121-1.b13.el6.x86_64.rpm
+openjdk_devel=java-1.8.0-openjdk-devel-1.8.0.121-1.b13.el6.x86_64.rpm
+jvm_openjdk_dir=java-1.8.0-openjdk-1.8.0.121-1.b13.el6.x86_64
+
+# grab the rpm and unpack it
+wget ${mirror_url_base}/${openjdk}
+wget ${mirror_url_base}/${openjdk_devel}
+rpm2cpio $openjdk | cpio -ivd
+rpm2cpio $openjdk_devel | cpio -ivd
+
+cd usr/lib/jvm
+mv $jvm_openjdk_dir java_home
+
+# cacerts is a relative symlink, which doesn't work when we repackage.  Make it
+# absolute.  We could use tar's --dereference option, but there's a subtle
+# difference between making the symlink absolute and using --dereference.
+# Making the symlink absolute lets the consuming system set the cacerts; using
+# --dereference takes the producing system's cacerts and sets them in stone.  We
+# prefer the flexibility of the former.
+rm java_home/jre/lib/security/cacerts
+ln -s /etc/pki/java/cacerts java_home/jre/lib/security/cacerts
+
+# tzdb.dat is an absolute symlink, which might not work when we
+# repackage.  Copy the underlying timezone database.  Copying the
+# target file from the toolchain producing system avoids requiring the
+# consuming system to have java-tzdb installed, which would bake in a
+# subtle dependency that has been addressed in modern versions of
+# CentOS.  See https://bugzilla.redhat.com/show_bug.cgi?id=1130800 for
+# discussion.
+rm java_home/jre/lib/tzdb.dat
+cp /usr/share/javazi-1.8/tzdb.dat java_home/jre/lib/tzdb.dat
+
+# document version this is based on
+echo "Built from ${mirror_url_Base}
+    ${openjdk}
+    ${openjdk_devel}
+
+Run through rpm2cpio | cpio, and /usr/lib/jvm/${jvm_openjdk_dir} renamed to 'java_home'." > java_home/VERSION
+
+popd