chiark / gitweb /
buildserver: allow gradle/sdkmanager to install into the new m2repository
authorHans-Christoph Steiner <hans@eds.org>
Thu, 16 Mar 2017 10:43:46 +0000 (11:43 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 16 Mar 2017 12:23:42 +0000 (13:23 +0100)
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

index 56f72e068f8ee4817b80df7903ec291a6e56ff55..e5a4202a25afff10c26479da2b83c36df8241820 100644 (file)
@@ -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