chiark / gitweb /
fdroidserver.git
6 years agomakebuildserver: remove platform-27
Marcus Hoffmann [Sun, 24 Dec 2017 17:51:28 +0000 (18:51 +0100)]
makebuildserver: remove platform-27

The hash changes all the time and gradle will install this on the fly
anyway when missing.

6 years agoMerge branch 'master' into 'master'
Michel Le Bihan [Sat, 23 Dec 2017 12:01:12 +0000 (12:01 +0000)]
Merge branch 'master' into 'master'

Revert: gradle file: use flavour specific versionCode/versionName, fall back to…

See merge request fdroid/fdroidserver!425

6 years agoRevert: gradle file: use flavour specific versionCode/versionName, fall back to parsi...
mimi89999 [Sat, 23 Dec 2017 11:43:16 +0000 (12:43 +0100)]
Revert: gradle file: use flavour specific versionCode/versionName, fall back to parsing line by line

6 years agoMerge branch 'limit-build-all' into 'master'
Marcus [Fri, 22 Dec 2017 13:09:16 +0000 (13:09 +0000)]
Merge branch 'limit-build-all' into 'master'

build: limit --all to 10 apps at a time

See merge request fdroid/fdroidserver!420

6 years agoMerge branch 'typo' into 'master'
Hans-Christoph Steiner [Fri, 22 Dec 2017 08:50:49 +0000 (08:50 +0000)]
Merge branch 'typo' into 'master'

Fix a typo in vmtools.py

See merge request fdroid/fdroidserver!421

6 years agoFix a typo in vmtools.py
Pierre Rudloff [Fri, 22 Dec 2017 00:14:29 +0000 (00:14 +0000)]
Fix a typo in vmtools.py

6 years agobuild: limit --all to 10 apps at a time
Hans-Christoph Steiner [Thu, 21 Dec 2017 22:15:08 +0000 (23:15 +0100)]
build: limit --all to 10 apps at a time

This needed now because the buildserver is hanging so often, that we are
often going a week or more without any builds published.  Perhaps this is
only temporary, or maybe we will want to flush this feature out more as a
standard thing.  But we really need it for now to at least get some builds
out on a daily basis.

Since the website deploy is also triggered by this cycle, making the build
finish more often means the website will be published more often.

6 years agoMerge branch 'additional_tests' into 'master'
Hans-Christoph Steiner [Thu, 21 Dec 2017 09:18:13 +0000 (09:18 +0000)]
Merge branch 'additional_tests' into 'master'

readme: add note about additional CI tests

See merge request fdroid/fdroidserver!419

6 years agoreadme: add note about additional CI tests
Marcus Hoffmann [Wed, 20 Dec 2017 23:51:26 +0000 (00:51 +0100)]
readme: add note about additional CI tests

[ci-skip]

6 years agoMerge branch 'nail-down-tests' into 'master'
Hans-Christoph Steiner [Wed, 20 Dec 2017 23:16:03 +0000 (23:16 +0000)]
Merge branch 'nail-down-tests' into 'master'

Nail down tests

Closes #432

See merge request fdroid/fdroidserver!418

6 years agotravis-ci: install babel with pip to stop easy_install
Hans-Christoph Steiner [Wed, 20 Dec 2017 17:04:37 +0000 (18:04 +0100)]
travis-ci: install babel with pip to stop easy_install

easy_install just fails, trying to install into ./.eggs
https://travis-ci.org/fdroidtravis/fdroidserver/jobs/319144754

6 years agotravis-ci: include new android-sdk-license on OSX
Hans-Christoph Steiner [Wed, 20 Dec 2017 16:04:19 +0000 (17:04 +0100)]
travis-ci: include new android-sdk-license on OSX

6 years agotests: only generate keystores when that is actually being tested
Hans-Christoph Steiner [Wed, 20 Dec 2017 16:03:48 +0000 (17:03 +0100)]
tests: only generate keystores when that is actually being tested

Generating a keystore is quite slow since it means a new RSA key is created.
That only needs to happen in the tests that check that it actually happened,
otherwise the test can just reuse the stored test keystore.

closes #432

6 years agoREADME: document test suite (closes #432)
Hans-Christoph Steiner [Wed, 20 Dec 2017 15:33:39 +0000 (16:33 +0100)]
README: document test suite (closes #432)

6 years agotravis-ci: show sdkmanager logs
Hans-Christoph Steiner [Wed, 20 Dec 2017 12:18:31 +0000 (13:18 +0100)]
travis-ci: show sdkmanager logs

6 years agoupdate: support working with old versions of PIL/Pillow
Hans-Christoph Steiner [Wed, 20 Dec 2017 10:38:54 +0000 (11:38 +0100)]
update: support working with old versions of PIL/Pillow

Image.close() was added in Pillow 2.4 or so.

6 years agobuild: use dpkg to purge sudo, for less spammy debug logs
Hans-Christoph Steiner [Mon, 18 Dec 2017 09:02:19 +0000 (10:02 +0100)]
build: use dpkg to purge sudo, for less spammy debug logs

apt is quite verbose:
DEBUG: buildserver > DEBUG: > sudo SUDO_FORCE_REMOVE=yes apt-get -y purge sudo
DEBUG: buildserver > Reading package lists...

DEBUG: buildserver > Building dependency tree...
DEBUG: buildserver > Reading state information...
DEBUG: buildserver > The following package was automatically installed and is no longer required:
DEBUG: buildserver >   libasprintf0c2
DEBUG: buildserver > Use 'apt-get autoremove' to remove it.
DEBUG: buildserver > The following packages will be REMOVED:
DEBUG: buildserver >   sudo*

DEBUG: buildserver > 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
DEBUG: buildserver > After this operation, 2,391 kB disk space will be freed.
DEBUG: buildserver > (Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 73055 files and directories currently installed.)
DEBUG: buildserver > Removing sudo (1.8.10p3-1+deb8u5) ...
DEBUG: buildserver > Purging configuration files for sudo (1.8.10p3-1+deb8u5) ...
DEBUG: buildserver > Processing triggers for man-db (2.7.0.2-5) ...

6 years agoalways hide PIL.PngImagePlugin's "STREAM" debug messages
Hans-Christoph Steiner [Thu, 14 Dec 2017 19:30:00 +0000 (20:30 +0100)]
always hide PIL.PngImagePlugin's "STREAM" debug messages

Otherwise, enabling verbose messages gives tons of these messages:
DEBUG: STREAM b'IHDR' 16 13
DEBUG: STREAM b'IDAT' 41 32768

6 years agoRevert "revert reverted checksum of platform-27_r01.zip (google tampered there again)"
Hans-Christoph Steiner [Wed, 20 Dec 2017 09:44:10 +0000 (10:44 +0100)]
Revert "revert reverted checksum of platform-27_r01.zip (google tampered there again)"

This reverts commit 7f13675b8c321d350d49ccc4bbbfab89d2df4f8b.

6 years agojenkins-test: import secret key into test GNUPGHOME
Hans-Christoph Steiner [Wed, 20 Dec 2017 12:35:20 +0000 (13:35 +0100)]
jenkins-test: import secret key into test GNUPGHOME

Can't run `fdroid gpgsign` without a secret key!

6 years agoscanner: fix tests so they work on all tested platforms
Hans-Christoph Steiner [Tue, 19 Dec 2017 21:51:03 +0000 (22:51 +0100)]
scanner: fix tests so they work on all tested platforms

The standard test configuration is needed to make the tests reliably. Also,
these tests used some odd yield logic.  Who knows what exactly failed, but
these tests should be reliable.

* https://gitlab.com/fdroid/fdroidserver/-/jobs/44984595
* https://gitlab.com/fdroid/fdroidserver/-/jobs/44984596
* https://travis-ci.org/f-droid/fdroidserver/builds/318071369

6 years agoMerge branch 'whitelist-firebase' into 'master'
Hans-Christoph Steiner [Mon, 18 Dec 2017 12:30:30 +0000 (12:30 +0000)]
Merge branch 'whitelist-firebase' into 'master'

Whitelist some open-source firebase libs

See merge request fdroid/fdroidserver!411

6 years agoMerge branch '430-UnboundLocalError-local-variable-im-referenced-before-assignment...
Hans-Christoph Steiner [Mon, 18 Dec 2017 08:56:27 +0000 (08:56 +0000)]
Merge branch '430-UnboundLocalError-local-variable-im-referenced-before-assignment' into 'master'

fix handling unreadable images in update.extract_apk_icons

Closes #430

See merge request fdroid/fdroidserver!416

6 years agofix handling unreadable images in update.extract_apk_icons
Michael Pöhn [Sat, 16 Dec 2017 21:06:20 +0000 (22:06 +0100)]
fix handling unreadable images in update.extract_apk_icons

6 years agoMerge branch '431-Invalid-checksum-platform-27_r01.zip' into 'master'
Marcus [Sat, 16 Dec 2017 15:46:10 +0000 (15:46 +0000)]
Merge branch '431-Invalid-checksum-platform-27_r01.zip' into 'master'

revert reverted checksum of platform-27_r01.zip (google tampered there again)

Closes #431

See merge request fdroid/fdroidserver!415

6 years agorevert reverted checksum of platform-27_r01.zip (google tampered there again)
Michael Pöhn [Sat, 16 Dec 2017 15:23:06 +0000 (16:23 +0100)]
revert reverted checksum of platform-27_r01.zip (google tampered there again)

6 years agoMerge branch 'build-tools_r27.0.2' into 'master'
Marcus [Fri, 15 Dec 2017 12:14:00 +0000 (12:14 +0000)]
Merge branch 'build-tools_r27.0.2' into 'master'

makebuildserver: add build-tools_r27.0.2

See merge request fdroid/fdroidserver!413

6 years agoMerge branch 'gradle-4.4' into 'master'
Marcus [Fri, 15 Dec 2017 11:55:13 +0000 (11:55 +0000)]
Merge branch 'gradle-4.4' into 'master'

makebuildserver: add Gradle 4.4

See merge request fdroid/fdroidserver!412

6 years agomakebuildserver: add build-tools_r27.0.2
relan [Fri, 15 Dec 2017 11:34:40 +0000 (14:34 +0300)]
makebuildserver: add build-tools_r27.0.2

6 years agomakebuildserver: add Gradle 4.4
relan [Fri, 15 Dec 2017 11:32:34 +0000 (14:32 +0300)]
makebuildserver: add Gradle 4.4

6 years agoMerge branch 'security-fixes' into 'master'
Hans-Christoph Steiner [Fri, 15 Dec 2017 11:22:56 +0000 (11:22 +0000)]
Merge branch 'security-fixes' into 'master'

security fixes for Janus and image metadata exploits

See merge request fdroid/fdroidserver!409

6 years agoConvert to string
Jan Berkel [Thu, 14 Dec 2017 23:47:57 +0000 (00:47 +0100)]
Convert to string

6 years agoAdd a simple test for scanner
Jan Berkel [Thu, 14 Dec 2017 23:29:38 +0000 (00:29 +0100)]
Add a simple test for scanner

6 years agowhitelist some open-source firebase libs
Jan Berkel [Thu, 14 Dec 2017 20:58:06 +0000 (21:58 +0100)]
whitelist some open-source firebase libs

6 years agobuild: force purging of sudo, ignore error message
Hans-Christoph Steiner [Thu, 14 Dec 2017 13:42:09 +0000 (14:42 +0100)]
build: force purging of sudo, ignore error message

Fixes bb758d3f, spotted by @bubu:
DEBUG: buildserver > DEBUG: > sudo apt-get -y purge sudo
DEBUG: buildserver > Reading package lists...
DEBUG: buildserver > Building dependency tree...
DEBUG: buildserver > Reading state information...
DEBUG: buildserver > The following packages will be REMOVED:
DEBUG: buildserver >   sudo*
DEBUG: buildserver > 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
DEBUG: buildserver > After this operation, 2,391 kB disk space will be freed.
(Reading database ... 68491 files and directories currently installed.)
DEBUG: buildserver > Removing sudo (1.8.10p3-1+deb8u4) ...
DEBUG: buildserver > You have asked that the sudo package be removed,
DEBUG: buildserver > but no root password has been set.
DEBUG: buildserver > Without sudo, you may not be able to gain administrative privileges.
DEBUG: buildserver >
DEBUG: buildserver > If you would prefer to access the root account with su(1)
DEBUG: buildserver > or by logging in directly,
DEBUG: buildserver > you must set a root password with "sudo passwd".
DEBUG: buildserver >
DEBUG: buildserver > If you have arranged other means to access the root account,
DEBUG: buildserver > and you are sure this is what you want,
DEBUG: buildserver > you may bypass this check by setting an environment variable
DEBUG: buildserver > (export SUDO_FORCE_REMOVE=yes).
DEBUG: buildserver >
DEBUG: buildserver > Refusing to remove sudo.
DEBUG: buildserver > dpkg: error processing package sudo (--purge):
DEBUG: buildserver >  subprocess installed pre-removal script returned error exit status 1
DEBUG: buildserver > Errors were encountered while processing:
DEBUG: buildserver >  sudo
DEBUG: buildserver > E: Sub-process /usr/bin/dpkg returned an error code (1)

6 years agoupdate: do not crash if AndroidManifest.xml in APK has invalid date
Hans-Christoph Steiner [Thu, 14 Dec 2017 09:58:02 +0000 (10:58 +0100)]
update: do not crash if AndroidManifest.xml in APK has invalid date

This crash actually blocked a Janus exploit APK from being added to the
repo, but crashing isn't really the appropriate way to do that.

6 years agoupdate: close unclosed Image instance
Hans-Christoph Steiner [Wed, 13 Dec 2017 11:28:11 +0000 (12:28 +0100)]
update: close unclosed Image instance

6 years agoupdate: strip all metadata from PNGs
Hans-Christoph Steiner [Wed, 13 Dec 2017 10:51:34 +0000 (11:51 +0100)]
update: strip all metadata from PNGs

This strips metadata and optimizes the compression of all PNGs copied
from the app's source repo as well as all the icons extracted from the
APKs.  There have been exploits delivered via image metadata, and
F-Droid isn't using it all, so its best to just remove it.

This unfortunately uncompresses and recompresses the files.  Luckily,
that's a lossless procedure with PNGs, and we might end up with
smaller files.  The only tool I could find that strips without
changing the image data is exiftool, but that is written in Perl.

6 years agoupdate: strip EXIF data from all JPEGs
Hans-Christoph Steiner [Wed, 13 Dec 2017 10:57:36 +0000 (11:57 +0100)]
update: strip EXIF data from all JPEGs

EXIF data can be abused to exploit systems a lot easier than the JPEG image
data can.  The F-Droid ecosystem does not use the EXIF data, so keep things
safe and strip it all away.  There is a chance that some images might rely
on the rotation to be set by EXIF, but I think having a safe system is more
important.

If needed, only the rotation data could be saved.  But that then makes it
hard to tell which images have been stripped.  This way, if there is no
EXIF, it has been stripped.  And if there is EXIF data, then it is suspect.

https://securityaffairs.co/wordpress/51043/mobile-2/android-cve-2016-3862-flaw.html
https://threatpost.com/google-shuts-down-potentially-massive-android-bug/120393/
https://blog.sucuri.net/2013/07/malware-hidden-inside-jpg-exif-headers.html

The big downside of this is that it decompresses and recompresses the
image data.  That should be replaced by a technique from jhead,
exiftool, ObscuraCam, etc. that only strips the metadata.

6 years agoupdate: reject APKs with invalid file sig, probably Janus exploits
Hans-Christoph Steiner [Mon, 11 Dec 2017 17:36:21 +0000 (18:36 +0100)]
update: reject APKs with invalid file sig, probably Janus exploits

This just checks the first four bytes of the APK file, aka the "file
signature", to make sure it is the ZIP signature and not the DEX signature.
This was checked against the test APK, and I ran it against some known
malware and all of f-droid.org to make sure it works.

All valid ZIP files (therefore APK files) should start with the ZIP
Local File Header of four bytes.

https://www.guardsquare.com/en/blog/new-android-vulnerability-allows-attackers-modify-apps-without-affecting-their-signatures

6 years agoupdate: print warnings for all KnownVulns found
Hans-Christoph Steiner [Mon, 11 Dec 2017 16:56:04 +0000 (17:56 +0100)]
update: print warnings for all KnownVulns found

Some baby steps towards making the KnownVuln stuff more visible.

6 years agoupdate: switch tests to using standardized setUp() method
Hans-Christoph Steiner [Thu, 14 Dec 2017 10:06:22 +0000 (11:06 +0100)]
update: switch tests to using standardized setUp() method

6 years agoMerge branch 'fixFlavor' into 'master'
Hans-Christoph Steiner [Thu, 14 Dec 2017 15:56:01 +0000 (16:56 +0100)]
Merge branch 'fixFlavor' into 'master'

Regex only for flavor blocks: flavor { ... }

See merge request fdroid/fdroidserver!407

6 years agoadd Conversations as gradle flavor test case
Hans-Christoph Steiner [Thu, 14 Dec 2017 15:52:02 +0000 (16:52 +0100)]
add Conversations as gradle flavor test case

6 years agojenkins-build-all: improve detection of working buildserver VM
Hans-Christoph Steiner [Thu, 14 Dec 2017 09:41:02 +0000 (10:41 +0100)]
jenkins-build-all: improve detection of working buildserver VM

If I manually run some steps of the process, not all of the normal cruft
might be left behind.  I'm not really sure which of the multiple copies of
the images are actually required, but these both seem to work when present.

6 years agoMerge branch '428-Signature-key-fingerprint-of-file-stats-publishsigkeys-jar-does...
Hans-Christoph Steiner [Thu, 14 Dec 2017 08:50:10 +0000 (08:50 +0000)]
Merge branch '428-Signature-key-fingerprint-of-file-stats-publishsigkeys-jar-does-not-match-repo_key_sha256-in-config-py' into 'master'

jenkins test: clear singing-key-fingerpring from previous run

Closes #428

See merge request fdroid/fdroidserver!410

6 years agojenkins test: clear singing-key-fingerpring from previous run
Michael Pöhn [Wed, 13 Dec 2017 16:39:55 +0000 (17:39 +0100)]
jenkins test: clear singing-key-fingerpring from previous run

6 years agoMerge branch 'fdroidserver-liberapay' into 'master'
Hans-Christoph Steiner [Tue, 12 Dec 2017 15:55:05 +0000 (16:55 +0100)]
Merge branch 'fdroidserver-liberapay' into 'master'

Add Liberapay support

See merge request fdroid/fdroidserver!408

6 years agofix metadata_v0 tests
Hans-Christoph Steiner [Tue, 12 Dec 2017 15:54:35 +0000 (16:54 +0100)]
fix metadata_v0 tests

The old metadata format didn't know anything of LiberapayID, so no need to
check for it.

6 years agoAdd Liberapay support
Andrea Scarpino [Tue, 12 Dec 2017 09:53:34 +0000 (10:53 +0100)]
Add Liberapay support

6 years agoMerge branch '1.0-polish' into 'master'
Hans-Christoph Steiner [Mon, 11 Dec 2017 21:44:16 +0000 (21:44 +0000)]
Merge branch '1.0-polish' into 'master'

1.0 polish

Closes #424

See merge request fdroid/fdroidserver!405

6 years agoremove XML files from bash completion, they are not supported anymore
Hans-Christoph Steiner [Thu, 7 Dec 2017 23:09:41 +0000 (00:09 +0100)]
remove XML files from bash completion, they are not supported anymore

6 years agobuild: `apt-get purge sudo` after using it for sudo= build field
Hans-Christoph Steiner [Thu, 7 Dec 2017 21:26:13 +0000 (22:26 +0100)]
build: `apt-get purge sudo` after using it for sudo= build field

Once `sudo` has been used to execute the commands in sudo=, then it should
be removed from the build VM.  That prevents any other part of the build
from using sudo.  That means that all commands run with `sudo` must be
committed to fdroiddata.git, making them very visible.

closes #424

6 years agometadata: error if .fdroid.txt exists, it is unsupported
Hans-Christoph Steiner [Thu, 7 Dec 2017 20:40:15 +0000 (21:40 +0100)]
metadata: error if .fdroid.txt exists, it is unsupported

Using .txt format has bugs when used embedded in an app's git repo, so
tell the user to use YAML or JSON.

#364

6 years agomakebuildserver: quiet rsync for copy_caches_from_host
Hans-Christoph Steiner [Thu, 7 Dec 2017 14:56:09 +0000 (15:56 +0100)]
makebuildserver: quiet rsync for copy_caches_from_host

6 years agoMerge branch 'rational-jarsigner-logging' into 'master'
Hans-Christoph Steiner [Mon, 11 Dec 2017 20:27:06 +0000 (20:27 +0000)]
Merge branch 'rational-jarsigner-logging' into 'master'

handle jarsigner/apksigner output cleanly for rational logging

Closes #405

See merge request fdroid/fdroidserver!404

6 years agoregex only for flavor blocks: flavor { ... } and nothing else
tobiasKaminsky [Mon, 11 Dec 2017 11:04:17 +0000 (12:04 +0100)]
regex only for flavor blocks: flavor { ... } and nothing else

6 years agoRevert "makebuildserver: update SHA-256 for platform-27_r01.zip"
Hans-Christoph Steiner [Fri, 8 Dec 2017 08:43:43 +0000 (09:43 +0100)]
Revert "makebuildserver: update SHA-256 for platform-27_r01.zip"

Looks like Google switched back to the old binary, which I guess is
good news?
https://issuetracker.google.com/issues/70292819

This reverts commit 956660085a417989a0a1e35081071da6ab36b5c2.

!401

6 years agoMerge branch 'yml_completion' into 'master'
Hans-Christoph Steiner [Thu, 7 Dec 2017 23:10:18 +0000 (23:10 +0000)]
Merge branch 'yml_completion' into 'master'

bash completion: use correct yml suffix

See merge request fdroid/fdroidserver!406

6 years agobash completion: use correct yml suffix
Marcus Hoffmann [Thu, 7 Dec 2017 22:29:34 +0000 (23:29 +0100)]
bash completion: use correct yml suffix

6 years agoMerge branch 'more-nightly' into 'master'
Hans-Christoph Steiner [Thu, 7 Dec 2017 22:11:40 +0000 (22:11 +0000)]
Merge branch 'more-nightly' into 'master'

More `fdroid nightly` polish

Closes #423

See merge request fdroid/fdroidserver!402

6 years agonightly: replace / from fingerprint in SSH key filename, fixes #423
Hans-Christoph Steiner [Thu, 7 Dec 2017 14:04:39 +0000 (15:04 +0100)]
nightly: replace / from fingerprint in SSH key filename, fixes #423

The SSH key fingerprint is used in the filename.  The base64 used for SSH
key fingerprints includes /.  Not all keys will end up having a / in them.
For those that do, this will crash since the ssh key filename ends up being
non-existent dirs:

$ fdroid nightly
Importing keystore /home/mhoffmann/.android/debug.keystore to /tmp/.cqswaeo8/.keystore.p12...
MAC verified OK
writing RSA key
CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/usr/lib/python3.6/shutil.py", line 544, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.cqswaeo8/.privkey' -> '/tmp/.cqswaeo8/debug_keystore_PZtS/4Tzk4dpzKiX9AAf1GrhAVi9U7UE1aYEHr6evKo_id_rsa'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mhoffmann/projects/oss/fdroidserver/fdroid", line 156, in <module>
    main()
  File "/home/mhoffmann/projects/oss/fdroidserver/fdroid", line 132, in main
    mod.main()
  File "/home/mhoffmann/projects/oss/fdroidserver/fdroidserver/nightly.py", line 284, in main
    privkey = _ssh_key_from_debug_keystore()
  File "/home/mhoffmann/projects/oss/fdroidserver/fdroidserver/nightly.py", line 73, in _ssh_key_from_debug_keystore
    shutil.move(privkey, ssh_private_key_file)
  File "/usr/lib/python3.6/shutil.py", line 558, in move
    copy_function(src, real_dst)
  File "/usr/lib/python3.6/shutil.py", line 257, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.6/shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/.cqswaeo8/debug_keystore_PZtS/4Tzk4dpzKiX9AAf1GrhAVi9U7UE1aYEHr6evKo_id_rsa'

6 years agonightly: prompt user to create a debug.keystore if its not there
Hans-Christoph Steiner [Wed, 6 Dec 2017 22:20:00 +0000 (23:20 +0100)]
nightly: prompt user to create a debug.keystore if its not there

#423

6 years agonightly: fix QR icon.png generation
Hans-Christoph Steiner [Wed, 6 Dec 2017 21:42:11 +0000 (22:42 +0100)]
nightly: fix QR icon.png generation

6 years agoupdate: do not replace Name/Summary from template unless blank
Hans-Christoph Steiner [Wed, 6 Dec 2017 21:33:46 +0000 (22:33 +0100)]
update: do not replace Name/Summary from template unless blank

`fdroid nightly` needs this change so it can set the Summary using the
template.

6 years agonightly: create app metadata using template of parsed data
Hans-Christoph Steiner [Wed, 6 Dec 2017 21:32:24 +0000 (22:32 +0100)]
nightly: create app metadata using template of parsed data

6 years agoMerge branch 'remove-fd-commit' into 'master'
Marcus [Thu, 7 Dec 2017 20:31:09 +0000 (20:31 +0000)]
Merge branch 'remove-fd-commit' into 'master'

remove fd-commit, no active devs use it, and requires Auto Name/Name

See merge request fdroid/fdroidserver!392

6 years agoMerge branch 'help_message_fix' into 'master'
Hans-Christoph Steiner [Thu, 7 Dec 2017 20:03:17 +0000 (20:03 +0000)]
Merge branch 'help_message_fix' into 'master'

metadata: make help for common -W option clearer

See merge request fdroid/fdroidserver!350

6 years agometadata: make help for metadata -W option clearer
Marcus Hoffmann [Fri, 6 Oct 2017 15:42:01 +0000 (17:42 +0200)]
metadata: make help for metadata -W option clearer

specify possible choices and provide clearer help text

6 years agohandle jarsigner/apksigner output cleanly for rational logging
Hans-Christoph Steiner [Thu, 7 Dec 2017 16:32:14 +0000 (17:32 +0100)]
handle jarsigner/apksigner output cleanly for rational logging

These were both spamming the output with lots of confusing messages, even
when --verbose was not used.  Jarsigner especially has confusing messages,
since it has warnings that do not pertain to APK signatures at all, like
the ones about timestamps and missing Certificate Authority.

closes #405

6 years agoMerge branch 'syntaxfix' into 'master'
Hans-Christoph Steiner [Thu, 7 Dec 2017 14:17:25 +0000 (14:17 +0000)]
Merge branch 'syntaxfix' into 'master'

correct "usage" output (--help; see #405)

See merge request fdroid/fdroidserver!403

6 years agocorrect "usage" output (--help; see #405)
Izzy [Thu, 7 Dec 2017 13:51:27 +0000 (14:51 +0100)]
correct "usage" output (--help; see #405)

6 years agomakebuildserver: fix join() syntax error, it needs a list/tuple
Hans-Christoph Steiner [Thu, 7 Dec 2017 10:52:10 +0000 (11:52 +0100)]
makebuildserver: fix join() syntax error, it needs a list/tuple

If only there was a way to test this without taking hours to run...

fixes 964ef996a01ceac8d6735668f2c9fd9119512346

6 years agoMerge branch 'update-platform-27_r01' into 'master'
relan [Thu, 7 Dec 2017 06:05:46 +0000 (06:05 +0000)]
Merge branch 'update-platform-27_r01' into 'master'

makebuildserver: update SHA-256 for platform-27_r01.zip

See merge request fdroid/fdroidserver!401

6 years agoremove fd-commit, no active devs use it, and requires Auto Name/Name
Hans-Christoph Steiner [Wed, 6 Dec 2017 21:48:08 +0000 (22:48 +0100)]
remove fd-commit, no active devs use it, and requires Auto Name/Name

fd-commit and checkupdates both require that there are two name fields,
AutoName: and Name:.  This is only used for the commit messages.  Since the
current devs do it manually, we can remove the fd-commit shell script, then
focus on checkupdates when revamping AutoName/Name.

https://botbot.me/freenode/fdroid-dev/msg/82539152

6 years agomakebuildserver: update SHA-256 for platform-27_r01.zip
Hans-Christoph Steiner [Wed, 6 Dec 2017 21:05:09 +0000 (22:05 +0100)]
makebuildserver: update SHA-256 for platform-27_r01.zip

Someone forgot to call this _r02.zip:
-ro.​build.​version.​incremental=4402310
+ro.​build.​version.​incremental=4458339

https://verification.f-droid.org/build-metadata/platform-27_r01.html

!364

6 years agoMerge branch 'gitlab-ci-testing-xenial-fedora' into 'master'
Hans-Christoph Steiner [Wed, 6 Dec 2017 19:44:58 +0000 (19:44 +0000)]
Merge branch 'gitlab-ci-testing-xenial-fedora' into 'master'

gitlab CI runs on  Debian/testing,  Ubuntu/xenial,  Fedora

See merge request fdroid/fdroidserver!398

6 years agogitlab-ci: move sdist test run to new fedora job
Hans-Christoph Steiner [Wed, 6 Dec 2017 16:51:12 +0000 (17:51 +0100)]
gitlab-ci: move sdist test run to new fedora job

A full run of the test suite takes quite a bit of time.  This removes one
of the 3 runs from the main 'tests' job, and puts it into the Fedora job.
That test run is mostly to make sure the setup.py and source tarball are
correctly, so that doesn't affect merge requests very often.

This also tests `pip install --user`, which was not really being tested
before.

6 years agoinit: fix test for aapt when no aapt has been found
Hans-Christoph Steiner [Wed, 6 Dec 2017 12:41:03 +0000 (13:41 +0100)]
init: fix test for aapt when no aapt has been found

Just give a proper error message rather than this stack trace:

Traceback (most recent call last):
  File "/home/hans/code/fdroid/server/fdroid", line 156, in <module>
    main()
  File "/home/hans/code/fdroid/server/fdroid", line 132, in main
    mod.main()
  File "/export/share/code/fdroid/server/fdroidserver/init.py", line 148, in main
    if os.path.isfile(aapt):
  File "/usr/lib/python3.5/genericpath.py", line 30, in isfile
    st = os.stat(path)

6 years agomakebuildserver: make copy_caches_from_host do rsync like `fdroid build`
Hans-Christoph Steiner [Wed, 6 Dec 2017 08:47:08 +0000 (09:47 +0100)]
makebuildserver: make copy_caches_from_host do rsync like `fdroid build`

This rsync hung because of an SSH unknown key prompt.  Since this is just
the vm host sshing to the vm guest, it is not essential to check the host
keys.

6 years agosetup requires Babel aka python3-babel to compile translations
Hans-Christoph Steiner [Tue, 5 Dec 2017 15:11:10 +0000 (16:11 +0100)]
setup requires Babel aka python3-babel to compile translations

https://forum.f-droid.org/t/f-droid-server-building-error/1670

6 years agogitlab-ci: add `pip install` test on Arch Linux
Hans-Christoph Steiner [Wed, 6 Dec 2017 09:13:45 +0000 (10:13 +0100)]
gitlab-ci: add `pip install` test on Arch Linux

6 years agogitlab-ci: add test runs on Ubuntu, Debian/testing, Fedora
Hans-Christoph Steiner [Mon, 4 Dec 2017 21:43:41 +0000 (22:43 +0100)]
gitlab-ci: add test runs on Ubuntu, Debian/testing, Fedora

6 years agocommon.testCase: fix find_sdk_tools when aapt is installed in /usr/bin
Marcus Hoffmann [Sun, 3 Dec 2017 14:01:48 +0000 (15:01 +0100)]
common.testCase: fix find_sdk_tools when aapt is installed in /usr/bin

The testlogic was broken when having both aapt in /usr/bin and also as
part of the android sdk.

6 years agohooks/pre-commit: make ruby and dash tests optional
Hans-Christoph Steiner [Mon, 4 Dec 2017 11:10:46 +0000 (12:10 +0100)]
hooks/pre-commit: make ruby and dash tests optional

These are only used for checking syntax in buildserver/Vagrantfile.
Not requiring ruby makes doing CI tests on lots of distros easier
and faster. dash is an 'essential' package on Debian derivs, so
those tests will always be run somewhere.

6 years agocommon: aapt 24.0.0 (v0.2-2964546) is now required
Hans-Christoph Steiner [Mon, 4 Dec 2017 20:22:16 +0000 (21:22 +0100)]
common: aapt 24.0.0 (v0.2-2964546) is now required

Without a recent aapt, the <uses-permission-sdk-23> tag will not be found.

6 years agoMerge branch 'lint-fixes' into 'master'
Hans-Christoph Steiner [Wed, 6 Dec 2017 09:41:39 +0000 (09:41 +0000)]
Merge branch 'lint-fixes' into 'master'

Lint fixes, plus changing the standard link format in descriptions

See merge request fdroid/fdroidserver!397

6 years agoMerge branch 'rsync_improvements' into 'master'
Hans-Christoph Steiner [Wed, 6 Dec 2017 08:55:19 +0000 (08:55 +0000)]
Merge branch 'rsync_improvements' into 'master'

Rsync improvements

See merge request fdroid/fdroidserver!400

6 years agolint: greatly expand the list of link shorteners to ban
Hans-Christoph Steiner [Mon, 4 Dec 2017 19:54:06 +0000 (20:54 +0100)]
lint: greatly expand the list of link shorteners to ban

Since we are now getting credit for fighting trackers, might as well step
up the fight!

gleaned from these sources:
* https://bit.do/list-of-url-shorteners.php
* https://www.hashtags.org/featured/list-of-url-shorteners/
* http://l-lists.com/en/lists/gvaoif.html

6 years agolint: enforce HTTPS and shortener ban in descriptions as well
Hans-Christoph Steiner [Mon, 4 Dec 2017 19:34:13 +0000 (20:34 +0100)]
lint: enforce HTTPS and shortener ban in descriptions as well

6 years agolint: switch links to plain URLS rather than mediawiki syntax
Hans-Christoph Steiner [Mon, 4 Dec 2017 19:33:42 +0000 (20:33 +0100)]
lint: switch links to plain URLS rather than mediawiki syntax

fdroidclient#1000

6 years agolint: add more VCS HTTPS checks
Hans-Christoph Steiner [Mon, 4 Dec 2017 19:28:57 +0000 (20:28 +0100)]
lint: add more VCS HTTPS checks

I manually checked that these work with HTTPS. fdroiddata!2710 should fix
all of these issues.

6 years agobuild: write out full rsync options
Marcus Hoffmann [Tue, 5 Dec 2017 20:37:04 +0000 (21:37 +0100)]
build: write out full rsync options

Also put target host:dir on one line to make it more readable

6 years agobuild: better logging output on rsync failures
Marcus Hoffmann [Tue, 5 Dec 2017 20:31:55 +0000 (21:31 +0100)]
build: better logging output on rsync failures

Save rsync error output and combine that with the command invocation
into an FDroidException which can be logged to the wiki.

This additionally sets -q for rsync to only print errors.

6 years agoMerge branch 'nightly-fixes' into 'master'
Torsten Grote [Tue, 5 Dec 2017 17:42:57 +0000 (17:42 +0000)]
Merge branch 'nightly-fixes' into 'master'

more `fdroid nightly` polishing

See merge request fdroid/fdroidserver!399

6 years agofix `hg pull`, was stupid mistake in 7bba20c6626152abded6b1cd6bef4f72dcf865b6
Hans-Christoph Steiner [Tue, 5 Dec 2017 15:49:28 +0000 (16:49 +0100)]
fix `hg pull`, was stupid mistake in 7bba20c6626152abded6b1cd6bef4f72dcf865b6

fdroid/fdroidserver!396

6 years agojenkins-setup-build-environment: delete libvirt images before test run
Hans-Christoph Steiner [Tue, 5 Dec 2017 11:26:15 +0000 (12:26 +0100)]
jenkins-setup-build-environment: delete libvirt images before test run

profitbricks-build7-amd64 was running out of disk space when running this
job...

6 years agonightly: use shutil.move() only so all ops work across filesystems
Hans-Christoph Steiner [Tue, 5 Dec 2017 08:13:19 +0000 (09:13 +0100)]
nightly: use shutil.move() only so all ops work across filesystems

https://gitlab.com/fdroid/fdroidserver/merge_requests/377#note_49998712

6 years agoshutil.move() in apk_strip_signature() to work across filesystems
Hans-Christoph Steiner [Fri, 1 Dec 2017 13:08:42 +0000 (14:08 +0100)]
shutil.move() in apk_strip_signature() to work across filesystems

os.rename() only works if source and destination are on the same file
system, shutil.move() works across file systems.

OSError: [Errno 18] Invalid cross-device link: '/builds/eighthave/fdroidclient/app/build/outputs/apk/app-debug.apk' -> '/tmp/tmp966vh75f/tmp.apk'

6 years agonightly: only use read_config to load final, generated config.py
Hans-Christoph Steiner [Fri, 1 Dec 2017 09:07:21 +0000 (10:07 +0100)]
nightly: only use read_config to load final, generated config.py

This needs to use the config loading routine to find Java `keytool`, but
since it doesn't need to fully load the config, isolate that usage in the
function.  Then read_config() is only ever called once, as is it meant to
be used, once the config.py is generated.

Using `from . import common; common.config = foo` will not always work,
due to some oddities to how the `from` imports work. So the full module
has to be imported in order to make sure its always properly set.