From b3f45ca024c5db5608a778c9c47b121af3295de3 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 11 May 2018 11:05:11 +0200 Subject: [PATCH 01/11] split pip tests to run separately for Ubuntu/trusty and Debian/stretch Trying to reuse the pip test run is now a lot more work than just writing it cutstom for each target platform. Ubuntu/trusty does not have androguard 3.1.x nor aapt >= 26.x, so using trusty's aapt will always have errors scraping some names from APKs. This continues to use Google's binary. `apt-get update` is now disabled by default by Travis, this adds it back so that the latest files from the PPA are used. Here's one example of an issue with pip on trusty: https://github.com/requests/requests/issues/4006 pip3 install --quiet -e /home/travis/build/fdroidtravis/fdroidserver Exception: Traceback (most recent call last): File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2482, in _dep_map return self.__dep_map File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2344, in __getattr__ raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/req.py", line 1266, in prepare_files req_to_install.extras): File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2291, in requires dm = self._dep_map File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2484, in _dep_map self.__dep_map = self._compute_dependencies() File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2517, in _compute_dependencies common = frozenset(reqs_for_extra(None)) File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2514, in reqs_for_extra if req.marker_fn(override={'extra':extra}): File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/_markerlib/markers.py", line 113, in marker_fn return eval(compiled_marker, environment) File "", line 1, in NameError: name 'platform_system' is not defined --- .travis.yml | 32 ++++++++++---------------------- tests/complete-ci-tests | 28 ++++++---------------------- 2 files changed, 16 insertions(+), 44 deletions(-) diff --git a/.travis.yml b/.travis.yml index 952eda78..1c887fed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,27 +24,18 @@ matrix: # is used on Windows Subsystem for Linux. addons: apt: + update: true sources: - sourceline: 'ppa:fdroid/fdroidserver' packages: - - bash - - dash - - pylint - - pep8 - - python3-babel - - python3-dev - - python3-pip - - python3-ruamel.yaml - - python3-setuptools - - python3.4-venv - - libjpeg-dev - - zlib1g-dev - - fdroidserver + - python3-babel + - python3-setuptools + - fdroidserver android: components: - android-23 # required for `fdroid build` test - - build-tools-25.0.3 # required for `fdroid build` test + - build-tools-27.0.3 # required for `fdroid build` test licenses: - 'android-sdk-preview-.+' - 'android-sdk-license-.+' @@ -101,15 +92,12 @@ install: fi # The OSX tests seem to run slower, they often timeout. So only run -# the test suite with the installed version of fdroid, instead of the -# three rounds that ./complete-ci-tests does. +# the test suite with the installed version of fdroid. +# +# Supporting pip on Ubuntu/trusty was too painful here, since it seems +# that pip installs conflict with the Ubuntu packages. script: - - cd tests - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - ./run-tests; - else - ./complete-ci-tests; - fi + - ./tests/run-tests after_failure: - cd $TRAVIS_BUILD_DIR diff --git a/tests/complete-ci-tests b/tests/complete-ci-tests index 6201eb2c..c1c812b2 100755 --- a/tests/complete-ci-tests +++ b/tests/complete-ci-tests @@ -27,6 +27,11 @@ if [ -z $ANDROID_HOME ]; then fi fi +if ! which pyvenv; then + echo "pyvenv required to run this test suite!" + exit 1 +fi + apksource=$1 #------------------------------------------------------------------------------# @@ -35,31 +40,12 @@ if [ -z $PIP_DOWNLOAD_CACHE ]; then export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache fi - -#------------------------------------------------------------------------------# -# required Java 7 or later keytool/jarsigner for :file support - -export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH - - #------------------------------------------------------------------------------# # run local tests, don't scan fdroidserver/ project for APKs cd $WORKSPACE/tests ./run-tests $apksource -#------------------------------------------------------------------------------# -# find pyvenv, to support Ubuntu/trusty's python3.4-venv - -if which pyvenv; then - pyvenv=pyvenv -elif which pyvenv-3.4; then - pyvenv=pyvenv-3.4 -else - echo "pyvenv required to run this test suite!" - exit 1 -fi - #------------------------------------------------------------------------------# # make sure that translations do not cause stacktraces @@ -78,10 +64,8 @@ done # test install using install direct from git repo cd $WORKSPACE rm -rf $WORKSPACE/env -$pyvenv $WORKSPACE/env +pyvenv $WORKSPACE/env . $WORKSPACE/env/bin/activate -# workaround https://github.com/pypa/setuptools/issues/937 -pip3 install --quiet setuptools==33.1.1 Babel pip3 install --quiet -e $WORKSPACE python3 setup.py compile_catalog install From 5610b3f0d74a2c9087678d19c672f06c7a0763ae Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 14 May 2018 09:38:37 +0200 Subject: [PATCH 02/11] set pyasn1 required version to prevent conflict with pyasn1-modules pyasn1-modules v0.2.1 requires pyasn1 <0.5.0, >=0.4.1 but for whatever reason, `pip3 install` is not picking it up properly. Perhaps because pip3 finds an older version of pyasn1 installed but does not upgrade it. * https://github.com/etingof/pyasn1-modules/issues/10 * https://gitlab.com/eighthave/fdroidserver/-/jobs/67781548 --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f50c4d86..5094497c 100755 --- a/setup.py +++ b/setup.py @@ -88,8 +88,8 @@ setup(name='fdroidserver', 'paramiko', 'Pillow', 'apache-libcloud >= 0.14.1', - 'pyasn1', - 'pyasn1-modules', + 'pyasn1 <0.5.0, >=0.4.1', + 'pyasn1-modules == 0.2.1', 'python-vagrant', 'PyYAML', 'qrcode', From feac3fa0677ebd5e24c35d3a0bc12a0cb60b8f38 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 11 May 2018 16:45:03 +0200 Subject: [PATCH 03/11] jenkins: remove most troublesome test case to avoid false fails --- jenkins-setup-build-environment | 2 -- 1 file changed, 2 deletions(-) diff --git a/jenkins-setup-build-environment b/jenkins-setup-build-environment index dc9a7751..cab721c6 100755 --- a/jenkins-setup-build-environment +++ b/jenkins-setup-build-environment @@ -107,5 +107,3 @@ fi ../fdroid build --verbose --stop org.adaway:55 # building old versions should still work ../fdroid build --verbose --stop org.fdroid.fdroid:96150 -# test OTA update ZIP build and publish -../fdroid build --verbose --stop org.fdroid.fdroid.privileged.ota:2070 From 0bd276de1c943e251ab74dca326717057385ea19 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 11 May 2018 16:57:22 +0200 Subject: [PATCH 04/11] gitlab-ci: add new security scanner pyup.io/safety https://pyup.io/safety/ --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3049262f..97cb0fe7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,6 +98,14 @@ pip_install: - fdroid readmeta - fdroid update --help +pyup_io_safety_check: + image: archlinux/base + script: + - pacman --sync --sysupgrade --refresh --noconfirm grep python-pip python-virtualenv tar + - ./setup.py compile_catalog install + - pip install safety + - safety check --full-report + fedora_latest: image: fedora:latest only: From 3c9cc59c3808b483be7f92c1a4955f0a2056cd0f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 11 May 2018 17:12:57 +0200 Subject: [PATCH 05/11] gitlab-ci: include fdroiddata yml files in metadata_v0 test --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97cb0fe7..12c39156 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,7 @@ metadata_v0: - git reset --hard - git checkout $GITCOMMIT - cd fdroiddata + - echo "accepted_formats = ('txt', 'yml')" >> config.py - ../tests/dump_internal_metadata_format.py - sed -i -e '/Translation:/d' From 54b21a6d224366211bded74cb23eb1b68f911677 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 14 May 2018 12:02:30 +0200 Subject: [PATCH 06/11] move pylint run to standalone gitlab-ci job --- .gitlab-ci.yml | 16 ++++++++++++++++ tests/complete-ci-tests | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12c39156..210bbbc2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -107,6 +107,22 @@ pyup_io_safety_check: - pip install safety - safety check --full-report +pylint: + image: alpine:3.7 + variables: + LANG: C.UTF-8 + script: + - apk add --no-cache ca-certificates python3 + - python3 -m ensurepip + - pip3 install pylint + - pylint --rcfile=.pylint-rcfile --output-format=colorized --reports=n + fdroid + makebuildserver + setup.py + fdroidserver/*.py + tests/*.py + tests/*.TestCase + fedora_latest: image: fedora:latest only: diff --git a/tests/complete-ci-tests b/tests/complete-ci-tests index c1c812b2..75fe515e 100755 --- a/tests/complete-ci-tests +++ b/tests/complete-ci-tests @@ -74,19 +74,3 @@ test -e $WORKSPACE/env/share/locale/de/LC_MESSAGES/fdroidserver.mo # run tests in new pip+pyvenv install fdroid=$WORKSPACE/env/bin/fdroid $WORKSPACE/tests/run-tests $apksource - - -#------------------------------------------------------------------------------# -# run pylint - -# only run it where it will work, for example, the pyvenvs above don't have pylint -if which pylint3 && python3 -c "import pylint" 2> /dev/null; then - cd $WORKSPACE - pylint3 --rcfile=.pylint-rcfile --output-format=colorized --reports=n \ - fdroid \ - makebuildserver \ - setup.py \ - fdroidserver/*.py \ - tests/*.py \ - tests/*.TestCase -fi From 6db9ba8334fe7fd082fbb87b806bb1968517167b Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 14 May 2018 13:17:49 +0200 Subject: [PATCH 07/11] androguard >= 3.1.0 is in pypi, so add it to install_requires --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 5094497c..e9ef1b7e 100755 --- a/setup.py +++ b/setup.py @@ -82,6 +82,7 @@ setup(name='fdroidserver', 'babel', ], install_requires=[ + 'androguard >= 3.1.0rc2', 'clint', 'GitPython', 'mwclient', From 43c61aecee9a99035e39d645f4c6d428ad9ac067 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 14 May 2018 14:07:40 +0200 Subject: [PATCH 08/11] fix pylint Unused argument --- fdroidserver/index.py | 4 ++-- fdroidserver/publish.py | 2 +- fdroidserver/signatures.py | 2 +- tests/index.TestCase | 2 +- tests/signatures.TestCase | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fdroidserver/index.py b/fdroidserver/index.py index 56caaad1..29bd24cb 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -163,7 +163,7 @@ def make_v1(apps, packages, repodir, repodict, requestsdict, fdroid_signing_key_ output['requests'] = requestsdict # establish sort order of the index - v1_sort_packages(packages, repodir, fdroid_signing_key_fingerprints) + v1_sort_packages(packages, fdroid_signing_key_fingerprints) appslist = [] output['apps'] = appslist @@ -252,7 +252,7 @@ def make_v1(apps, packages, repodir, repodict, requestsdict, fdroid_signing_key_ signindex.sign_index_v1(repodir, json_name) -def v1_sort_packages(packages, repodir, fdroid_signing_key_fingerprints): +def v1_sort_packages(packages, fdroid_signing_key_fingerprints): """Sorts the supplied list to ensure a deterministic sort order for package entries in the index file. This sort-order also expresses installation preference to the clients. diff --git a/fdroidserver/publish.py b/fdroidserver/publish.py index d50bfaa1..c0dd55d3 100644 --- a/fdroidserver/publish.py +++ b/fdroidserver/publish.py @@ -52,7 +52,7 @@ def publish_source_tarball(apkfilename, unsigned_dir, output_dir): logging.debug('...no source tarball for %s', apkfilename) -def key_alias(appid, resolve=False): +def key_alias(appid): """Get the alias which F-Droid uses to indentify the singing key for this App in F-Droids keystore. """ diff --git a/fdroidserver/signatures.py b/fdroidserver/signatures.py index 7d82ad14..e104b483 100644 --- a/fdroidserver/signatures.py +++ b/fdroidserver/signatures.py @@ -45,7 +45,7 @@ def extract_signature(apkpath): return sigdir -def extract(config, options): +def extract(options): # Create tmp dir if missing… tmp_dir = 'tmp' diff --git a/tests/index.TestCase b/tests/index.TestCase index 1fd89f7e..15fc4deb 100755 --- a/tests/index.TestCase +++ b/tests/index.TestCase @@ -211,7 +211,7 @@ class IndexTest(unittest.TestCase): pass fdroidserver.index.v1_sort_packages( - i, 'repo', fdroidserver.common.load_stats_fdroid_signing_key_fingerprints()) + i, fdroidserver.common.load_stats_fdroid_signing_key_fingerprints()) self.maxDiff = None self.assertEqual(json.dumps(i, indent=2), json.dumps(o, indent=2)) diff --git a/tests/signatures.TestCase b/tests/signatures.TestCase index bd6648cd..276f9144 100755 --- a/tests/signatures.TestCase +++ b/tests/signatures.TestCase @@ -36,7 +36,7 @@ class SignaturesTest(unittest.TestCase): APK = [os.path.abspath(os.path.join('repo', 'com.politedroid_3.apk'))] with TemporaryDirectory() as tmpdir, TmpCwd(tmpdir): - signatures.extract(common.config, OptionsFixture()) + signatures.extract(OptionsFixture()) # check if extracted signatures are where they are supposed to be # also verify weather if extracted file contian what they should From 2d3e7ef9501372e880e7e57283b59b9f59c73f02 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 14 May 2018 14:41:49 +0200 Subject: [PATCH 09/11] tests: allow tests to run without any Android SDK installed --- tests/run-tests | 51 +++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/tests/run-tests b/tests/run-tests index 4d35d8bf..26e17eb8 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -156,31 +156,32 @@ $fdroid --version #------------------------------------------------------------------------------# echo_header 'run process when building and signing are on separate machines' -REPOROOT=`create_test_dir` -cd $REPOROOT -cp $WORKSPACE/tests/keystore.jks $REPOROOT/ -$fdroid init --keystore keystore.jks --repo-keyalias=sova -echo 'keystorepass = "r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI="' >> config.py -echo 'keypass = "r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI="' >> config.py -echo "accepted_formats = ['txt', 'yml']" >> config.py -echo 'keydname = "CN=Birdman, OU=Cell, O=Alcatraz, L=Alcatraz, S=California, C=US"' >> config.py -test -d archive || mkdir archive -test -d metadata || mkdir metadata -cp $WORKSPACE/tests/metadata/info.guardianproject.urzip.yml metadata/ -test -d repo || mkdir repo -test -d unsigned || mkdir unsigned -cp $WORKSPACE/tests/urzip-release-unsigned.apk unsigned/info.guardianproject.urzip_100.apk -$fdroid publish --verbose -$fdroid update --verbose --nosign -$fdroid signindex --verbose -test -e repo/index.xml -test -e repo/index.jar -test -e repo/index-v1.jar -test -e tmp/apkcache -! test -z tmp/apkcache -test -L urzip.apk -grep -F '> config.py + echo 'keypass = "r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI="' >> config.py + echo "accepted_formats = ['txt', 'yml']" >> config.py + echo 'keydname = "CN=Birdman, OU=Cell, O=Alcatraz, L=Alcatraz, S=California, C=US"' >> config.py + test -d archive || mkdir archive + test -d metadata || mkdir metadata + cp $WORKSPACE/tests/metadata/info.guardianproject.urzip.yml metadata/ + test -d repo || mkdir repo + test -d unsigned || mkdir unsigned + cp $WORKSPACE/tests/urzip-release-unsigned.apk unsigned/info.guardianproject.urzip_100.apk + $fdroid publish --verbose + $fdroid update --verbose --nosign + $fdroid signindex --verbose + test -e repo/index.xml + test -e repo/index.jar + test -e repo/index-v1.jar + test -e tmp/apkcache + ! test -z tmp/apkcache + test -L urzip.apk + grep -F ' Date: Mon, 14 May 2018 15:24:21 +0200 Subject: [PATCH 11/11] tests: git repo mirror tests require git >= 2.3 --- tests/run-tests | 104 ++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/tests/run-tests b/tests/run-tests index 26e17eb8..df03a2e2 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -1030,62 +1030,62 @@ test -e $KEYSTORE #------------------------------------------------------------------------------# echo_header "sign binary repo in offline box, then publishing from online box" -OFFLINE_ROOT=`create_test_dir` -KEYSTORE=$WORKSPACE/tests/keystore.jks -LOCAL_COPY_DIR=`create_test_dir`/fdroid -mkdir $LOCAL_COPY_DIR -ONLINE_ROOT=`create_test_dir` -SERVERWEBROOT=`create_test_dir` - -# create offline binary transparency log -cd $OFFLINE_ROOT -mkdir binary_transparency -cd binary_transparency -git init - -# fake git remote server for binary transparency log -BINARY_TRANSPARENCY_REMOTE=`create_test_dir` - -# fake git remote server for repo mirror -SERVER_GIT_MIRROR=`create_test_dir` -cd $SERVER_GIT_MIRROR -git init if have_git_2_3; then + OFFLINE_ROOT=`create_test_dir` + KEYSTORE=$WORKSPACE/tests/keystore.jks + LOCAL_COPY_DIR=`create_test_dir`/fdroid + mkdir $LOCAL_COPY_DIR + ONLINE_ROOT=`create_test_dir` + SERVERWEBROOT=`create_test_dir` + + # create offline binary transparency log + cd $OFFLINE_ROOT + mkdir binary_transparency + cd binary_transparency + git init + + # fake git remote server for binary transparency log + BINARY_TRANSPARENCY_REMOTE=`create_test_dir` + + # fake git remote server for repo mirror + SERVER_GIT_MIRROR=`create_test_dir` + cd $SERVER_GIT_MIRROR + git init git config receive.denyCurrentBranch updateInstead + + cd $OFFLINE_ROOT + fdroid_init_with_prebuilt_keystore + cp -a $WORKSPACE/tests/metadata $WORKSPACE/tests/repo $WORKSPACE/tests/stats $OFFLINE_ROOT/ + + echo "mirrors = ['http://foo.bar/fdroid', 'http://asdflkdsfjafdsdfhkjh.onion/fdroid']" >> config.py + echo "servergitmirrors = '$SERVER_GIT_MIRROR'" >> config.py + echo "local_copy_dir = '$LOCAL_COPY_DIR'" >> config.py + echo "accepted_formats = ['json', 'txt', 'yml']" >> config.py + $fdroid update --pretty + grep -F '' repo/index.xml + grep -F '/fdroid/archive' archive/index.xml + test `grep '' repo/index.xml | wc -l` -eq 2 + test `grep '' archive/index.xml | wc -l` -eq 2 + cd binary_transparency + [ `git rev-list --count HEAD` == "1" ] + cd .. + $fdroid server update --verbose + grep -F '> config.py + echo "sync_from_local_copy_dir = True" >> config.py + echo "serverwebroots = '$SERVERWEBROOT'" >> config.py + echo "servergitmirrors = '$SERVER_GIT_MIRROR'" >> config.py + echo "local_copy_dir = '$LOCAL_COPY_DIR'" >> config.py + echo "binary_transparency_remote = '$BINARY_TRANSPARENCY_REMOTE'" >> config.py + $fdroid server update --verbose + cd $BINARY_TRANSPARENCY_REMOTE + [ `git rev-list --count HEAD` == "1" ] + cd $SERVER_GIT_MIRROR + [ `git rev-list --count HEAD` == "1" ] fi -cd $OFFLINE_ROOT -fdroid_init_with_prebuilt_keystore -cp -a $WORKSPACE/tests/metadata $WORKSPACE/tests/repo $WORKSPACE/tests/stats $OFFLINE_ROOT/ - -echo "mirrors = ['http://foo.bar/fdroid', 'http://asdflkdsfjafdsdfhkjh.onion/fdroid']" >> config.py -echo "servergitmirrors = '$SERVER_GIT_MIRROR'" >> config.py -echo "local_copy_dir = '$LOCAL_COPY_DIR'" >> config.py -echo "accepted_formats = ['json', 'txt', 'yml']" >> config.py -$fdroid update --pretty -grep -F '' repo/index.xml -grep -F '/fdroid/archive' archive/index.xml -test `grep '' repo/index.xml | wc -l` -eq 2 -test `grep '' archive/index.xml | wc -l` -eq 2 -cd binary_transparency -[ `git rev-list --count HEAD` == "1" ] -cd .. -$fdroid server update --verbose -grep -F '> config.py -echo "sync_from_local_copy_dir = True" >> config.py -echo "serverwebroots = '$SERVERWEBROOT'" >> config.py -echo "servergitmirrors = '$SERVER_GIT_MIRROR'" >> config.py -echo "local_copy_dir = '$LOCAL_COPY_DIR'" >> config.py -echo "binary_transparency_remote = '$BINARY_TRANSPARENCY_REMOTE'" >> config.py -$fdroid server update --verbose -cd $BINARY_TRANSPARENCY_REMOTE -[ `git rev-list --count HEAD` == "1" ] -cd $SERVER_GIT_MIRROR -[ `git rev-list --count HEAD` == "1" ] - #------------------------------------------------------------------------------#