From 64ea4caac1a5863ed85b51f669121d6a2b08b0f6 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 16 Mar 2017 11:43:46 +0100 Subject: [PATCH] buildserver: allow gradle/sdkmanager to install into the new m2repository Google is pushing gradle towards downloading all the SDK components that it needs, rather than having a preconfigured SDK installed. The buildserver strongly supports the old model, with added checksum checking even. We can still support the old model by pre-configuring the SDK and locking it down as root. This can then also support the new model by setting the file perms so that new packages can be auto-installed, but they cannot overwrite any packages that come pre-installed and pre-verified. fdroiddata!2096 closes #247 --- buildserver/provision-android-sdk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/buildserver/provision-android-sdk b/buildserver/provision-android-sdk index 56f72e06..e5a4202a 100644 --- a/buildserver/provision-android-sdk +++ b/buildserver/provision-android-sdk @@ -34,6 +34,8 @@ disabled=" @disabled@https\://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml=disabled " test -d ${HOME}/.android || mkdir ${HOME}/.android +# there are currently zero user repos +echo 'count=0' > ${HOME}/.android/repositories.cfg for line in $disabled; do echo $line >> ${HOME}/.android/sites-settings.cfg done @@ -85,3 +87,8 @@ find $ANDROID_HOME/ -type f -executable -print0 | xargs -0 chmod a+x # allow gradle to install newer build-tools versions chgrp vagrant $ANDROID_HOME/build-tools chmod g+w $ANDROID_HOME/build-tools + +# allow gradle/sdkmanager to install into the new m2repository +test -d $ANDROID_HOME/extras/m2repository || mkdir -p $ANDROID_HOME/extras/m2repository +find $ANDROID_HOME/extras/m2repository -type d | xargs chgrp vagrant +find $ANDROID_HOME/extras/m2repository -type d | xargs chmod g+w -- 2.30.2