From 059d216aff0dd1320c746a86aa7cee2abe3c0a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 2 Aug 2016 11:09:32 +0200 Subject: [PATCH 1/3] Re-add NDK r12b, now fixed. --- buildserver/config.buildserver.py | 1 + buildserver/provision-android-ndk | 5 +++++ docs/fdroid.texi | 6 +++--- examples/config.py | 3 ++- fdroidserver/build.py | 2 +- fdroidserver/common.py | 3 ++- fdroidserver/init.py | 2 +- fdroidserver/metadata.py | 2 +- makebuildserver | 2 ++ 9 files changed, 18 insertions(+), 8 deletions(-) diff --git a/buildserver/config.buildserver.py b/buildserver/config.buildserver.py index 50976dbe..57ae0b2b 100644 --- a/buildserver/config.buildserver.py +++ b/buildserver/config.buildserver.py @@ -2,6 +2,7 @@ sdk_path = "/home/vagrant/android-sdk" ndk_paths = { 'r9b': "/home/vagrant/android-ndk/r9b", 'r10e': "/home/vagrant/android-ndk/r10e", + 'r12b': "/home/vagrant/android-ndk/r12b", } java_paths = { '8': "/usr/lib/jvm/java-8-openjdk-i386", diff --git a/buildserver/provision-android-ndk b/buildserver/provision-android-ndk index 36aa1a5c..ce1a8683 100644 --- a/buildserver/provision-android-ndk +++ b/buildserver/provision-android-ndk @@ -20,5 +20,10 @@ if [ ! -e $NDK_BASE/r10e ]; then mv android-ndk-r10e r10e fi +if [ ! -e $NDK_BASE/r12b ]; then + unzip /vagrant/cache/android-ndk-r12b-linux-x86_64.zip > /dev/null + mv android-ndk-r12b r12b +fi + chmod -R a+rX $NDK_BASE/ find $NDK_BASE/ -type f -executable -print0 | xargs -0 chmod a+x diff --git a/docs/fdroid.texi b/docs/fdroid.texi index e61d0994..d84c59a5 100644 --- a/docs/fdroid.texi +++ b/docs/fdroid.texi @@ -1125,9 +1125,9 @@ Version of the NDK to use in this build. Defaults to the latest NDK release that included legacy toolchains, so as to not break builds that require toolchains no longer included in current versions of the NDK. -The buildserver supports r9b with its legacy toolchains and the latest release -as of writing this document, r10e. You may add support for more versions by -adding them to 'ndk_paths' in your config file. +The buildserver supports r9b with its legacy toolchains, r10e and the +latest release as of writing this document, r12b. You may add support +for more versions by adding them to 'ndk_paths' in your config file. @item gradle=[,,...] Build with Gradle instead of Ant, specifying what flavours to use. Flavours diff --git a/examples/config.py b/examples/config.py index 97628e7e..255b9c0c 100644 --- a/examples/config.py +++ b/examples/config.py @@ -12,7 +12,8 @@ # not installed. # ndk_paths = { # 'r9b': None, -# 'r10e': "$ANDROID_NDK", +# 'r10e': None, +# 'r12b': "$ANDROID_NDK", # } # java_paths = { diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 70ad1aee..d02947bd 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -460,7 +460,7 @@ def build_local(app, build, vcs, build_dir, output_dir, srclib_dir, extlib_dir, ndk_path = build.ndk_path() if build.ndk or (build.buildjni and build.buildjni != ['no']): if not ndk_path: - logging.critical("Android NDK version '%s' could not be found!" % build.ndk or 'r10e') + logging.critical("Android NDK version '%s' could not be found!" % build.ndk or 'r12b') logging.critical("Configured versions:") for k, v in config['ndk_paths'].items(): if k.endswith("_orig"): diff --git a/fdroidserver/common.py b/fdroidserver/common.py index d8defcb8..b0a27ac4 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -56,7 +56,8 @@ default_config = { 'sdk_path': "$ANDROID_HOME", 'ndk_paths': { 'r9b': None, - 'r10e': "$ANDROID_NDK", + 'r10e': None, + 'r12b': "$ANDROID_NDK", }, 'build_tools': "24.0.0", 'force_build_tools': False, diff --git a/fdroidserver/init.py b/fdroidserver/init.py index caa77734..f29b2d53 100644 --- a/fdroidserver/init.py +++ b/fdroidserver/init.py @@ -235,7 +235,7 @@ def main(): logging.info(' Android SDK:\t\t\t' + config['sdk_path']) if aapt: logging.info(' Android SDK Build Tools:\t' + os.path.dirname(aapt)) - logging.info(' Android NDK r10e (optional):\t$ANDROID_NDK') + logging.info(' Android NDK r12b (optional):\t$ANDROID_NDK') logging.info(' Keystore for signing key:\t' + keystore) if repo_keyalias is not None: logging.info(' Alias for key in store:\t' + repo_keyalias) diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index 9ba9b1fd..f20b2230 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -348,7 +348,7 @@ class Build(): def ndk_path(self): version = self.ndk if not version: - version = 'r10e' # falls back to latest + version = 'r12b' # falls back to latest paths = fdroidserver.common.config['ndk_paths'] if version not in paths: return '' diff --git a/makebuildserver b/makebuildserver index 6a4793f2..08be3829 100755 --- a/makebuildserver +++ b/makebuildserver @@ -245,6 +245,8 @@ cachefiles = [ '8956e9efeea95f49425ded8bb697013b66e162b064b0f66b5c75628f76e0f532'), ('https://dl.google.com/android/ndk/android-ndk-r9b-linux-x86_64-legacy-toolchains.tar.bz2', 'de93a394f7c8f3436db44568648f87738a8d09801a52f459dcad3fc047e045a1'), + ('https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip', + 'eafae2d614e5475a3bcfd7c5f201db5b963cc1290ee3e8ae791ff0c66757781e'), ] From 662aa2c938892e97373632d234fec152e34e3e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 2 Aug 2016 11:12:01 +0200 Subject: [PATCH 2/3] all: switch to build-tools 24.0.1 as default --- .travis.yml | 2 +- examples/config.py | 2 +- fdroidserver/common.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e7b004c0..45a80499 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ install: sudo pip3 install pep8 pyflakes pylint; sudo pip3 install -e .; sudo rm -rf fdroidserver.egg-info; - echo y | android --verbose update sdk --no-ui --all --filter platform-tools,build-tools-24.0.0; + echo y | android --verbose update sdk --no-ui --all --filter platform-tools,build-tools-24.0.1; elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository ppa:guardianproject/fdroidserver -y; sudo apt-get -q update -y; diff --git a/examples/config.py b/examples/config.py index 255b9c0c..464528db 100644 --- a/examples/config.py +++ b/examples/config.py @@ -21,7 +21,7 @@ # } # Build tools version to be used -# build_tools = "24.0.0" +# build_tools = "24.0.1" # Force all build to use the above version of build -tools, good for testing # builds without having all of the possible build-tools installed. diff --git a/fdroidserver/common.py b/fdroidserver/common.py index b0a27ac4..bbee6c30 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -59,7 +59,7 @@ default_config = { 'r10e': None, 'r12b': "$ANDROID_NDK", }, - 'build_tools': "24.0.0", + 'build_tools': "24.0.1", 'force_build_tools': False, 'java_paths': None, 'ant': "ant", From 4b5b1fca6f6445d53319059289ff36abbe2a1dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 2 Aug 2016 18:08:48 +0200 Subject: [PATCH 3/3] makebs: work around build-tools 24.0.1 version bug The zip contains 24.0.0 as the version, which means our magic was installing 24.0.0 twice and skipping 24.0.1. --- buildserver/provision-android-sdk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/buildserver/provision-android-sdk b/buildserver/provision-android-sdk index 31bb95b2..57eacdc4 100644 --- a/buildserver/provision-android-sdk +++ b/buildserver/provision-android-sdk @@ -41,6 +41,10 @@ done # install all cached build-tools for f in `ls -1 build-tools*.zip`; do ver=`unzip -c $f "*/source.properties" | sed -n 's,^Pkg.Revision=,,p'` + if [[ $ver == 24.0.0 ]] && [[ $f =~ .*r24\.0\.1.* ]]; then + # 24.0.1 has the wrong revision in the zip + ver=24.0.1 + fi cached=,build-tools-${ver}${cached} done