Bug 1161075: build android with JDK from tooltool; r=nalexander

This commit is contained in:
Dustin J. Mitchell 2015-06-30 11:18:01 -04:00
parent 68537755b0
commit 9ffbc75b42
9 changed files with 57 additions and 10 deletions

View File

@ -163,7 +163,7 @@ proguard_config_dir=$(topsrcdir)/mobile/android/config/proguard
# time. The idea is to set a high-water mark that is not to be crossed.
classycle_jar := $(topsrcdir)/mobile/android/build/classycle/classycle-1.4.1.jar
.geckoview.deps: geckoview.ddf $(classycle_jar) $(ALL_JARS)
java -cp $(classycle_jar) \
$(JAVA) -cp $(classycle_jar) \
classycle.dependency.DependencyChecker \
-mergeInnerClasses \
-dependencies=@$< \
@ -184,7 +184,7 @@ classycle_jar := $(topsrcdir)/mobile/android/build/classycle/classycle-1.4.1.jar
.bundled.proguard.deps: gecko-R.jar $(proguard_config_dir)/strip-libs.cfg
$(REPORT_BUILD)
@$(TOUCH) $@
java \
$(JAVA) \
-Xmx512m -Xms128m \
-jar $(ANDROID_SDK_ROOT)/tools/proguard/lib/proguard.jar \
@$(proguard_config_dir)/strip-libs.cfg \
@ -199,7 +199,7 @@ classycle_jar := $(topsrcdir)/mobile/android/build/classycle/classycle-1.4.1.jar
.proguard.deps: .geckoview.deps .bundled.proguard.deps $(ALL_JARS) $(proguard_config_dir)/proguard.cfg
$(REPORT_BUILD)
@$(TOUCH) $@
java \
$(JAVA) \
-Xmx512m -Xms128m \
-jar $(ANDROID_SDK_ROOT)/tools/proguard/lib/proguard.jar \
@$(proguard_config_dir)/proguard.cfg \

View File

@ -10,6 +10,18 @@ fi
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/build/mozconfig.common"
# In TaskCluster, the Java JRE/JDK are installed from tooltool, but that
# install doesn't work on the old Buildbot mock builders (CentOS 6.2), so
# the relevant env vars are not set up in that case, leaving the build to
# run from the JRE/JDK in /usr/lib/jvm.
if [ ! -f /etc/redhat-release ] || [ "$(< /etc/redhat-release)" != "CentOS release 6.2 (Final)" ]; then
# set JAVA_HOME to find the JRE/JDK from tooltool. Several scripts in the JDK
# assume `java` is in PATH, so set that too. To see how this tarball is built,
# see testing/taskcluster/scripts/misc/repackage-jdk.sh
export JAVA_HOME="$topsrcdir/java_home"
export PATH="$PATH:$topsrcdir/java_home/bin"
fi
# Set the most aggressive settings for szip. Not the default because it's
# much slower and we didn't want to slow down developers builds.
# Has no effect when MOZ_ENABLE_SZIP is not set in mobile/android/confvars.sh.

View File

@ -49,5 +49,13 @@
"digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad",
"algorithm": "sha512",
"filename": "gcc.tar.xz"
},
{
"size": 55391032,
"visibility": "public",
"digest": "a15fbba949fbb5039bef717f55370d40050a537a2b3a1ffe5e8b655ae90b54419020783c183bba72ce2610f35e3611e259df09b5844a72bd161b512fb54898fb",
"algorithm": "sha512",
"unpack": true,
"filename": "java_home-7u79-2.5.5-0ubuntu0.14.04.2-amd64.tar.xz"
}
]

View File

@ -1,4 +1,4 @@
FROM quay.io/mozilla/ubuntu-build:0.0.2
FROM quay.io/mozilla/ubuntu-build:0.0.3
MAINTAINER Morgan Reece Phillips <winter2718@gmail.com>
# Add build scripts; these are the entry points from the taskcluster worker, and

View File

@ -1 +1 @@
quay.io/mrrrgn
quay.io/djmitche

View File

@ -1 +1 @@
0.0.20
0.0.21

View File

@ -1 +1 @@
0.0.2
0.0.3

View File

@ -18,9 +18,6 @@ apt-get install -y \
uuid-dev \
sqlite3
# see https://bugzilla.mozilla.org/show_bug.cgi?id=1161075
apt-get install -y openjdk-7-jdk
# the Android SDK contains some 32-bit binaries (aapt among them) that require this
apt-get install -y lib32z1

View File

@ -0,0 +1,30 @@
#! /bin/bash
set -e -x
# VERSION must be supplied to the task; example:
# VERSION=7u79-2.5.5-0ubuntu0.14.04.2
test VERSION
# this only needs to correspond to the build architecture, which for our purposes
# (building Fennec) is always amd64
arch=amd64
mkdir artifacts
cd build
rm -rf root && mkdir root
for pkg in openjdk-7-{jdk,jre,jre-headless}; do
curl -v --fail -o the.deb http://mirrors.kernel.org/ubuntu/pool/main/o/openjdk-7/${pkg}_${VERSION}_${arch}.deb
dpkg-deb -x the.deb root
done
# package up the contents of usr/lib/jvm
(
cd root/usr/lib/jvm
# rename the root dir to something non-arch-specific
mv java-7-openjdk* java_home
( echo "VERSION=$VERSION"; echo "arch=$arch" ) > java_home/VERSION
tar -Jvcf ~/artifacts/java_home-${VERSION}-${arch}.tar.xz java_home
)