chiark / gitweb /
fdroidserver.git
6 years agoMerge branch 'master' into 'master'
Hans-Christoph Steiner [Wed, 28 Feb 2018 21:42:06 +0000 (21:42 +0000)]
Merge branch 'master' into 'master'

update: make icon extraction less dependent on aapt

Closes fdroid-website#192

See merge request fdroid/fdroidserver!469

6 years agolint: ban all dangerous HTML tags
Hans-Christoph Steiner [Tue, 27 Feb 2018 11:09:54 +0000 (12:09 +0100)]
lint: ban all dangerous HTML tags

* https://en.wikipedia.org/wiki/HTML_sanitization
* https://asostack.com/enhance-your-google-play-store-description-with-rich-formatting-and-emojis-5f50ff354e5f

6 years agoupdate: make icon extraction less dependent on aapt
Hans-Christoph Steiner [Mon, 26 Feb 2018 22:43:42 +0000 (23:43 +0100)]
update: make icon extraction less dependent on aapt

For androguard, @thezero already developed a way to get all the icons after
only extracting the icon name.  So this uses that for the aapt-based scans
also, to make them less brittle.

This should fix the problem where `fdroid update` was choosing the XML icon
for apps that include one, like NewPipe.

closes fdroid/fdroid-website#192

6 years agogitlab-ci: set metadata_v0 test to use 1.0.2 as the baseline
Hans-Christoph Steiner [Fri, 23 Feb 2018 21:48:44 +0000 (22:48 +0100)]
gitlab-ci: set metadata_v0 test to use 1.0.2 as the baseline

6 years agorewritemeta: fix proper_format() so lint works with .yml files
Hans-Christoph Steiner [Fri, 23 Feb 2018 21:42:46 +0000 (22:42 +0100)]
rewritemeta: fix proper_format() so lint works with .yml files

6 years agoMerge branch 'allow-dashes-and-underscores-in-signature-file-names-when-checking...
Hans-Christoph Steiner [Thu, 22 Feb 2018 23:23:50 +0000 (23:23 +0000)]
Merge branch 'allow-dashes-and-underscores-in-signature-file-names-when-checking-for-reproducability' into 'master'

allow dashes and underscores in signature file names when checking for reproducability

See merge request fdroid/fdroidserver!468

6 years agoallow dashes and underscores in signature file names when checking for reproducability
Michael Pöhn [Thu, 22 Feb 2018 22:29:30 +0000 (23:29 +0100)]
allow dashes and underscores in signature file names when checking for reproducability

6 years agobump to 1.0.2 to placate pypi 1.0.2
Hans-Christoph Steiner [Thu, 22 Feb 2018 20:23:19 +0000 (21:23 +0100)]
bump to 1.0.2 to placate pypi

I mistakenly uploaded the dist tarball to pypi without the PGP signature.
So I deleted the release, thinking I could reupload it.  It is not possible:
https://github.com/pypa/packaging-problems/issues/74

So this is really just a bump so I can reupload to pypi.

6 years agocommon: tighten up regexs when searching for version name/code and appid
Hans-Christoph Steiner [Thu, 22 Feb 2018 20:15:41 +0000 (21:15 +0100)]
common: tighten up regexs when searching for version name/code and appid

This should have less of a change of matching bad things.
thanks to @stf for the report.  I ran tests comparing the original vs these
new patterns, and it was a 100% match. So at least it didn't make things
worse.

Here's the test script:
#!/usr/bin/env python3

import os
import re

old_vcsearch_g = re.compile(r'''.*[Vv]ersionCode[ =]+["']*([0-9]+)["']*''').search
old_vnsearch_g = re.compile(r'.*[Vv]ersionName *=* *(["\'])((?:(?=(\\?))\3.)*?)\1.*').search
old_psearch_g = re.compile(r'.*(packageName|applicationId) *=* *["\']([^"]+)["\'].*').search
new_vcsearch_g = re.compile(r'''.*[Vv]ersionCode\s*=?\s*["']*([0-9]+)["']*''').search
new_vnsearch_g = re.compile(r'''.*[Vv]ersionName\s*=?\s*(["'])((?:(?=(\\?))\3.)*?)\1.*''').search
new_psearch_g = re.compile(r'''.*(packageName|applicationId)\s*=*\s*["']([^"']+)["'].*''').search

old = re.compile(r'.*(packageName|applicationId) *=* *["\']([^"]+)["\'].*').search
new = re.compile(r'''.*(packageName|applicationId)\s*=*\s*["']([^"']+)["'].*''').search

for root, dirs, files in os.walk('build'):
    for f in files:
        if f.endswith('.gradle'):
            with open(os.path.join(root, f)) as fp:
                for line in fp:
                    for old, new in ((old_vcsearch_g, new_vcsearch_g),
                                     (old_vnsearch_g, new_vnsearch_g),
                                     (old_psearch_g, new_psearch_g)):
                        found_old = old(line)
                        found_new = new(line)
                        oldresult = None
                        newresult = None
                        if found_old or found_new:
                            if found_old:
                                oldresult = found_old.groups()
                                #print('OLD', oldresult)
                            if found_new:
                                newresult = found_new.groups()
                                #print('NEW', newresult)
                            if oldresult != newresult:
                                print('--------------------------------')
                                print(f, oldresult, newresult)

6 years agoBump to 1.0.1! 1.0.1
Hans-Christoph Steiner [Thu, 22 Feb 2018 19:01:43 +0000 (20:01 +0100)]
Bump to 1.0.1!

6 years agoMerge branch 'weblate' into 'master'
Hans-Christoph Steiner [Thu, 22 Feb 2018 14:59:32 +0000 (14:59 +0000)]
Merge branch 'weblate' into 'master'

Weblate

See merge request fdroid/fdroidserver!467

6 years agoWeblate
Hans-Christoph Steiner [Thu, 22 Feb 2018 14:59:32 +0000 (14:59 +0000)]
Weblate

6 years agoMerge branch 'androguard-fixes' into 'master'
Hans-Christoph Steiner [Thu, 22 Feb 2018 14:39:34 +0000 (14:39 +0000)]
Merge branch 'androguard-fixes' into 'master'

Androguard fixes

See merge request fdroid/fdroidserver!466

6 years agosignatures: future-proof fetching app ID info from APK
Hans-Christoph Steiner [Thu, 22 Feb 2018 13:30:39 +0000 (14:30 +0100)]
signatures: future-proof fetching app ID info from APK

We're not using platformBuildVersionName and it might go away just like it
appeared: with no good reason or announcement.

6 years agoupdate: switch to improved androguard detection
Hans-Christoph Steiner [Thu, 22 Feb 2018 12:39:41 +0000 (13:39 +0100)]
update: switch to improved androguard detection

6 years agogitlab-ci: remove apt-get progress dumps from build log
Hans-Christoph Steiner [Thu, 22 Feb 2018 09:32:27 +0000 (10:32 +0100)]
gitlab-ci: remove apt-get progress dumps from build log

6 years agogitlab-ci: try to download PPA keys until they succeed
Hans-Christoph Steiner [Thu, 22 Feb 2018 09:27:10 +0000 (10:27 +0100)]
gitlab-ci: try to download PPA keys until they succeed

This download occasionally fails, so this keeps retrying till it succeeds.
The CI job has a time limit, so no need to figure out an exit condition.

6 years agotests: do not automatically run install.TestCase, its troublesome
Hans-Christoph Steiner [Wed, 21 Feb 2018 13:08:03 +0000 (14:08 +0100)]
tests: do not automatically run install.TestCase, its troublesome

`fdroid install` is rarely used, if at all, and the test frequently fails
for no reason in gitlab-ci, because it can't start the adb server.

6 years agogitlab-ci: test against latest build-tools 27.0.3
Hans-Christoph Steiner [Wed, 21 Feb 2018 12:59:34 +0000 (13:59 +0100)]
gitlab-ci: test against latest build-tools 27.0.3

6 years agogitlab-ci: androguard from Debian/unstable til it stabilizes
Hans-Christoph Steiner [Thu, 22 Feb 2018 13:40:03 +0000 (14:40 +0100)]
gitlab-ci: androguard from Debian/unstable til it stabilizes

6 years agomake is_apk_and_debuggable() default to using androguard before aapt
Hans-Christoph Steiner [Thu, 22 Feb 2018 14:08:53 +0000 (15:08 +0100)]
make is_apk_and_debuggable() default to using androguard before aapt

6 years agoinit: do not try to find aapt if androguard is available
Hans-Christoph Steiner [Thu, 22 Feb 2018 11:10:53 +0000 (12:10 +0100)]
init: do not try to find aapt if androguard is available

6 years agoupdate: include implied permissions when using androguard
Hans-Christoph Steiner [Wed, 21 Feb 2018 11:34:54 +0000 (12:34 +0100)]
update: include implied permissions when using androguard

`aapt dump badging` includes these when listing uses-permissions:
https://github.com/androguard/androguard/pull/428

6 years agoupdate: 'features' list only includes required features
Hans-Christoph Steiner [Tue, 20 Feb 2018 16:08:55 +0000 (17:08 +0100)]
update: 'features' list only includes required features

The F-Droid index 'features' list is not the same as what is in the
AndroidManifest.xml.  It only includes "required" features, for example.

6 years agogitlab-ci: switch debian_testing to use androguard
Hans-Christoph Steiner [Fri, 16 Feb 2018 13:25:47 +0000 (14:25 +0100)]
gitlab-ci: switch debian_testing to use androguard

6 years agoupdate: fix crash from missing file extension in extracted icon
Hans-Christoph Steiner [Tue, 20 Feb 2018 14:45:27 +0000 (15:45 +0100)]
update: fix crash from missing file extension in extracted icon

I missed this in 40fac10ebcd95095741a243ff621b67335cf9e5b, yay tests!

6 years agoMerge branch 'use-androguard-first' into 'master'
Hans-Christoph Steiner [Mon, 19 Feb 2018 18:53:42 +0000 (18:53 +0000)]
Merge branch 'use-androguard-first' into 'master'

use androguard first

Closes #236

See merge request fdroid/fdroidserver!465

6 years agoMerge branch 'support-xml-icons' into 'master'
Hans-Christoph Steiner [Mon, 19 Feb 2018 16:58:28 +0000 (16:58 +0000)]
Merge branch 'support-xml-icons' into 'master'

Support XML icons

Closes #392

See merge request fdroid/fdroidserver!464

6 years agoupdate: use androguard by default if it is available
Hans-Christoph Steiner [Wed, 14 Feb 2018 16:22:25 +0000 (17:22 +0100)]
update: use androguard by default if it is available

closes #236

6 years agoupdate: extract and store XML icons
Hans-Christoph Steiner [Wed, 14 Feb 2018 12:44:58 +0000 (13:44 +0100)]
update: extract and store XML icons

These can then be used by the client.

#344
#392

6 years agoupdate: switch to new androguard v3.1 API based on lxml
Hans-Christoph Steiner [Wed, 14 Feb 2018 21:03:00 +0000 (22:03 +0100)]
update: switch to new androguard v3.1 API based on lxml

apkobject.get_android_manifest_xml() used to return a xml.dom.minidom
object, now it returns an lxml.etree.Element object.

6 years agoupdate: find alternate PNGs for apps that have an XML app icon
Hans-Christoph Steiner [Wed, 14 Feb 2018 11:04:39 +0000 (12:04 +0100)]
update: find alternate PNGs for apps that have an XML app icon

Apps can now use an XML icon, but if the app supports older Android
versions, it'll also contain PNG versions of the same icon.  This finds
those PNGs and uses them instead.

#344
closes #392
fdroiddata#913

6 years agoupdate: fix min/target/max edge case parsing with androguard
Hans-Christoph Steiner [Wed, 14 Feb 2018 21:00:42 +0000 (22:00 +0100)]
update: fix min/target/max edge case parsing with androguard

In order to test that aapt defaults minSdkVersion to 3, I ran this script
then compared the output with meld:

cd $ANDROID_HOME/build-tools
for d in *.*; do echo $d; $ANDROID_HOME/build-tools/$d/aapt dump badging /home/hans/code/fdroid/server/tests/repo/com.politedroid_3.apk > /tmp/${d}.txt; done
meld /tmp/17.0.0.txt /tmp/26.0.2.txt /tmp/27.0.3.txt

6 years agoMerge branch 'fix-excessive-ndk' into 'master'
Marcus [Wed, 14 Feb 2018 23:54:00 +0000 (23:54 +0000)]
Merge branch 'fix-excessive-ndk' into 'master'

makebuildserver: do not provision excessive NDKs

See merge request fdroid/fdroidserver!463

6 years agoMerge branch 'fdroid-deploy' into 'master'
Marcus [Wed, 14 Feb 2018 21:51:11 +0000 (21:51 +0000)]
Merge branch 'fdroid-deploy' into 'master'

rename `fdroid server` to `fdroid deploy` and deprecate 'init'

Closes #264

See merge request fdroid/fdroidserver!462

6 years agomakebuildserver: do not provision excessive NDKs
relan [Wed, 14 Feb 2018 06:01:37 +0000 (09:01 +0300)]
makebuildserver: do not provision excessive NDKs

When a new minor version of an NDK is released, it replaces an older one,
e.g. r16 with r16b (see commit 6f295cb). But old NDK package remains in
the cache and provisioning script unpacks it too as it matches the mask.

Fix NDK provisioning to unzip only while-listed versions.

6 years agorename `fdroid server` to `fdroid deploy` and deprecate 'init'
Hans-Christoph Steiner [Tue, 13 Feb 2018 11:54:48 +0000 (12:54 +0100)]
rename `fdroid server` to `fdroid deploy` and deprecate 'init'

`fdroid server init` is has not been needed for a long time.  And 'server'
is the only subcommand that has its own subsubcommands.  This turns it into
only `fdroid deploy`, which does what `fdroid server update` does. This
also changes the bash completion to use `fdroid deploy`.  But the old
`fdroid server update` and `fdroid server init` commands remain working.

closes #264

6 years agoTranslated using Weblate (Tibetan)
Hans-Christoph Steiner [Tue, 13 Feb 2018 08:40:40 +0000 (08:40 +0000)]
Translated using Weblate (Tibetan)

Currently translated at 87.6% (397 of 453 strings)

Translation: F-Droid/F-Droid Server
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/bo/

fix all errors in Weblate

6 years agoTranslated using Weblate (Tibetan)
Hans-Christoph Steiner [Tue, 13 Feb 2018 08:34:09 +0000 (08:34 +0000)]
Translated using Weblate (Tibetan)

Currently translated at 87.6% (397 of 453 strings)

Translation: F-Droid/F-Droid Server
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/bo/

6 years agofix format string issues in Tibetan
Hans-Christoph Steiner [Tue, 13 Feb 2018 08:22:57 +0000 (09:22 +0100)]
fix format string issues in Tibetan

6 years agoswitch gettext translation files to po-unwrapped format
Hans-Christoph Steiner [Tue, 13 Feb 2018 08:17:28 +0000 (09:17 +0100)]
switch gettext translation files to po-unwrapped format

Weblate, gettext, and Python-Babel all seem to have slightly different
wrapping rules.  This leads to lots of annoying diffs and git merge
conflicts.  So just don't wrap at all! :-D

6 years agoWeblate (closes !461)
Hans-Christoph Steiner [Tue, 13 Feb 2018 07:53:05 +0000 (08:53 +0100)]
Weblate (closes !461)

Squashed commit of the following:

commit ecf5d514554f105e887d7c47cc6b4378ed83202c
Author: Tobias_Groza <tobias.groza@outlook.de>
Date:   Fri Feb 9 15:45:56 2018 +0000

    Translated using Weblate (German)

    Currently translated at 45.3% (180 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 8e88ed041a7892460a5dc06f2daced4fbc352912
Author: Takumi Shoji <azumukupoe1999@gmail.com>
Date:   Wed Feb 7 13:31:22 2018 +0000

    Added translation using Weblate (Japanese)

commit 1cb941084b806d082f67eef59c72f516cddca77f
Author: Марс Ямбар <mjambarmeta@gmail.com>
Date:   Sun Feb 4 11:31:42 2018 +0000

    Translated using Weblate (Ukrainian)

    Currently translated at 42.4% (169 of 398 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/uk/

commit 765b98f46f0ede79320dc9558b29695188ca1f6b
Author: anonymous <>
Date:   Sun Feb 4 09:24:22 2018 +0000

    Translated using Weblate (German)

    Currently translated at 43.0% (171 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 9cadc4463acbd87ad715703c444a192d4acab14b
Author: Follpvosten <wolfi@karpador.xyz>
Date:   Sun Feb 4 09:24:10 2018 +0000

    Translated using Weblate (German)

    Currently translated at 42.8% (170 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 50065b4e3594bd7990ae5bf27523ea05c6e43d22
Author: anonymous <>
Date:   Sun Feb 4 09:22:12 2018 +0000

    Translated using Weblate (German)

    Currently translated at 42.5% (169 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 8a752cdd9d8cceba4a6659b8ef67d346424a3599
Author: ezjerry liao <ezjerry@gmail.com>
Date:   Fri Feb 2 08:56:38 2018 +0000

    Translated using Weblate (Chinese (Traditional))

    Currently translated at 100.0% (397 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/zh_Hant/

commit dd63360aae5b8827a5593f751e206f8759406902
Author: Andreas Kleinert <Andy.Kleinert@gmail.com>
Date:   Thu Feb 1 18:53:17 2018 +0000

    Translated using Weblate (German)

    Currently translated at 41.0% (163 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 51b8b24f549c05d146dd9683c2c8b65dcbf85374
Author: anonymous <>
Date:   Thu Feb 1 18:48:47 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.7% (158 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 41c9716d20b46e695540a7c70d9ea9656ed7b712
Author: Andreas Kleinert <Andy.Kleinert@gmail.com>
Date:   Thu Feb 1 18:47:31 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.5% (157 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 50cc7dba100db09cccb30d9229c3e8446b6171f8
Author: anonymous <>
Date:   Thu Feb 1 18:45:21 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.5% (157 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 4ac4c4d829b1bc772bf8b7bafb18e37fb8e5036f
Author: Andreas Kleinert <Andy.Kleinert@gmail.com>
Date:   Thu Feb 1 18:45:08 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.5% (157 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 95fe106077ea50f7e4ab8b65fa794c82fa1fb890
Author: anonymous <>
Date:   Thu Feb 1 18:44:58 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.5% (157 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 1b08bc809ebfdc65bb3814a5bf2c04fcd0590afa
Author: Andreas Kleinert <Andy.Kleinert@gmail.com>
Date:   Thu Feb 1 18:44:08 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.5% (157 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 96e9647bde958cf2fd4cd7a9a49f215568f4fb6f
Author: anonymous <>
Date:   Thu Feb 1 18:41:24 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.5% (157 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit fe2b29d4326f44b8b07df0a3f9e77cd7390bdf4d
Author: Andreas Kleinert <Andy.Kleinert@gmail.com>
Date:   Thu Feb 1 18:40:49 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.5% (157 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 7c7877ededd8d7c7f79cfefa70f15077f6a20e2e
Author: Luca D'Amico <damico.luca91@live.it>
Date:   Mon Jan 29 16:54:49 2018 +0000

    Translated using Weblate (Italian)

    Currently translated at 36.2% (144 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/it/

commit 51a301b2061b99f5a44b434fadefeb4a99c00232
Author: anonymous <>
Date:   Sun Jan 28 22:10:11 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.5% (157 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 8956165544aab77074460d91106cb0daebbdf606
Author: dadnal <liberapay-weblate@com.beintner.de>
Date:   Sun Jan 28 22:09:42 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.2% (156 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit f9ef03ddc373ccf0baf034e47ac7c54fcbe5291e
Author: anonymous <>
Date:   Sun Jan 28 22:09:32 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.2% (156 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit d26423fb9a00df6dce939983347ad1c62220addd
Author: dadnal <liberapay-weblate@com.beintner.de>
Date:   Sun Jan 28 22:09:20 2018 +0000

    Translated using Weblate (German)

    Currently translated at 39.0% (155 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 4b2f03f3102061c75199f4f7ffa2499deb07c85a
Author: anonymous <>
Date:   Sun Jan 28 22:08:41 2018 +0000

    Translated using Weblate (German)

    Currently translated at 38.7% (154 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit c13c602ae66356cd977da0452f3ff4e9fa406b36
Author: dadnal <liberapay-weblate@com.beintner.de>
Date:   Sun Jan 28 22:08:06 2018 +0000

    Translated using Weblate (German)

    Currently translated at 38.5% (153 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 195dddd89aee5512bc51c1590297436d89a5a0be
Author: anonymous <>
Date:   Sun Jan 28 22:07:22 2018 +0000

    Translated using Weblate (German)

    Currently translated at 38.5% (153 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit e44c705053983c9bd084efca5b02963b57cb7bdd
Author: dadnal <liberapay-weblate@com.beintner.de>
Date:   Sun Jan 28 22:06:51 2018 +0000

    Translated using Weblate (German)

    Currently translated at 38.2% (152 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 02a6882ea2b1e42c0cb8a9357a55950796dc243c
Author: anonymous <>
Date:   Sun Jan 28 22:05:31 2018 +0000

    Translated using Weblate (German)

    Currently translated at 37.7% (150 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 68b8c4bc0661ad3da65ef9003eca1d1b3f03c1a5
Author: dadnal <liberapay-weblate@com.beintner.de>
Date:   Sun Jan 28 22:05:17 2018 +0000

    Translated using Weblate (German)

    Currently translated at 37.5% (149 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/

commit 40810ad9f938d4b45a5f2f4cbd049bd91986ad8c
Author: Alireza A. A <alir425p@gmail.com>
Date:   Thu Jan 18 17:22:49 2018 +0000

    Translated using Weblate (Persian)

    Currently translated at 0.2% (1 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/fa/

commit f1c8192d0e7a548c857a6d9566df601cde05fdc2
Author: ezjerry liao <ezjerry@gmail.com>
Date:   Mon Jan 22 09:04:22 2018 +0000

    Translated using Weblate (Chinese (Traditional))

    Currently translated at 100.0% (397 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/zh_Hant/

commit e92e8664f96998dcee399d32147ae3be5005bb7f
Author: Jeff Huang <s8321414@gmail.com>
Date:   Tue Jan 16 02:37:32 2018 +0000

    Translated using Weblate (Chinese (Traditional))

    Currently translated at 100.0% (397 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/zh_Hant/

commit e09a832dd053323816aecab11fa80229d83a9fcd
Author: jxt <chihsun.tsai@gmail.com>
Date:   Mon Jan 15 00:38:41 2018 +0000

    Translated using Weblate (Chinese (Traditional))

    Currently translated at 100.0% (397 of 397 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/zh_Hant/

commit b22859288f609f62e8628970009ac694b9b3f497
Author: monolifed <monolifed@gmail.com>
Date:   Sat Jan 6 23:24:19 2018 +0000

    Translated using Weblate (Turkish)

    Currently translated at 37.4% (149 of 398 strings)

    Translation: F-Droid/F-Droid Server
    Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/tr/

6 years agoRevert "wiki: include per-app link to all related activity on gitlab.com"
Hans-Christoph Steiner [Fri, 9 Feb 2018 17:17:35 +0000 (18:17 +0100)]
Revert "wiki: include per-app link to all related activity on gitlab.com"

This reverts commit a57f17b2765a7475eeaac27c8b72a539148c5d05.

Turns out this was totally useless, this can be fully handled in
https://f-droid.org/wiki/page/Template:App since it already has the
Application ID there.

6 years agoMerge branch 'git-svn-improvements' into 'master'
Hans-Christoph Steiner [Mon, 12 Feb 2018 11:18:02 +0000 (11:18 +0000)]
Merge branch 'git-svn-improvements' into 'master'

git-svn improvements

See merge request fdroid/fdroidserver!453

6 years agoMerge branch 'import-for-issuebot' into 'master'
Hans-Christoph Steiner [Mon, 12 Feb 2018 11:08:55 +0000 (11:08 +0000)]
Merge branch 'import-for-issuebot' into 'master'

`fdroid import` fixes for issuebot

See merge request fdroid/fdroidserver!452

6 years agogit-svn: check HTTPS connection with Python Requests
Hans-Christoph Steiner [Mon, 5 Feb 2018 13:44:59 +0000 (14:44 +0100)]
git-svn: check HTTPS connection with Python Requests

git-svn will put up the "Reject/Accept" prompt if it encounters a bad HTTPS
certificate.  I could find no way to stop it from doing that.  So instead,
this checks the HTTPS connection with an HTTP HEAD request first.

6 years agogit-svn: require working HTTPS for all Subversion URLs
Hans-Christoph Steiner [Mon, 5 Feb 2018 13:43:39 +0000 (14:43 +0100)]
git-svn: require working HTTPS for all Subversion URLs

Subversion does not verify each commit as strongly as git does, so HTTPS is
really important.  Also, there is the possibility of injecting code into
`fdroid checkupdate` calls if plain HTTP is used.

6 years agogit: use /bin/true for 'askpass' to prevent all password prompts
Hans-Christoph Steiner [Mon, 5 Feb 2018 12:24:32 +0000 (13:24 +0100)]
git: use /bin/true for 'askpass' to prevent all password prompts

This uses both the env vars and the command line options to ensure
that it works with as many versions of git as possible.  Also, git-svn
uses the env vars, but not necessarily the command line options.

This uses /bin/true to pretend that it succesfully got the password.
If password auth is truly required, then it will fail further on down
the line.

6 years agogit: make explicit that git configs are calling cmd line utilities
Hans-Christoph Steiner [Mon, 5 Feb 2018 12:23:44 +0000 (13:23 +0100)]
git: make explicit that git configs are calling cmd line utilities

These are not boolean values, but command line utilities which return a
guaranteed exit status.

6 years agogit-svn: use '--' to isolate user input in command lines
Hans-Christoph Steiner [Mon, 5 Feb 2018 12:22:06 +0000 (13:22 +0100)]
git-svn: use '--' to isolate user input in command lines

6 years agoMerge branch 'build-36h' into 'master'
Hans-Christoph Steiner [Mon, 12 Feb 2018 11:06:34 +0000 (11:06 +0000)]
Merge branch 'build-36h' into 'master'

build: set overall timeout to 36 hours

See merge request fdroid/fdroidserver!460

6 years agoimport: fix crash when importing from local git repo
Hans-Christoph Steiner [Wed, 31 Jan 2018 08:59:06 +0000 (09:59 +0100)]
import: fix crash when importing from local git repo

6 years agoimport: get build dir from settings.gradle
Hans-Christoph Steiner [Tue, 30 Jan 2018 22:07:16 +0000 (23:07 +0100)]
import: get build dir from settings.gradle

Most projects set a single build dir in settings.gradle, so its worth
trying here.

6 years agoimport: switch to .yml as default metadata format
Hans-Christoph Steiner [Tue, 30 Jan 2018 22:06:24 +0000 (23:06 +0100)]
import: switch to .yml as default metadata format

6 years agoMerge branch 'timeout_flag' into 'master'
Hans-Christoph Steiner [Mon, 12 Feb 2018 11:01:46 +0000 (12:01 +0100)]
Merge branch 'timeout_flag' into 'master'

build: clear timeout flag before every build

See merge request fdroid/fdroidserver!455

6 years agoMerge branch 'metadata-write-int' into 'master'
Hans-Christoph Steiner [Mon, 12 Feb 2018 10:57:38 +0000 (10:57 +0000)]
Merge branch 'metadata-write-int' into 'master'

metadata: write values of TYPE_INT fields

See merge request fdroid/fdroidserver!456

6 years agoMerge branch 'remove-ndk-r9b' into 'master'
Hans-Christoph Steiner [Mon, 12 Feb 2018 10:55:02 +0000 (10:55 +0000)]
Merge branch 'remove-ndk-r9b' into 'master'

makebuildserver: remove NDK r9b to save 1.6 GB of disk space

See merge request fdroid/fdroidserver!459

6 years agoMerge branch 'ndk-r16b' into 'master'
Hans-Christoph Steiner [Mon, 12 Feb 2018 10:54:31 +0000 (10:54 +0000)]
Merge branch 'ndk-r16b' into 'master'

makebuildserver: upgrade NDK r16 to r16b

See merge request fdroid/fdroidserver!458

6 years agoMerge branch 'gradle-4.5.1' into 'master'
Hans-Christoph Steiner [Mon, 12 Feb 2018 10:54:06 +0000 (10:54 +0000)]
Merge branch 'gradle-4.5.1' into 'master'

makebuildserver: add Gradle 4.5.1

See merge request fdroid/fdroidserver!457

6 years agobuild: set overall timeout to 36 hours
relan [Mon, 12 Feb 2018 10:45:49 +0000 (13:45 +0300)]
build: set overall timeout to 36 hours

Currently f-droid.org has a lot of pending builds and big delays
between "fdroid build --all" runs. Bump overall build time limit from
12 hours to 36 hours to increase buildserver throughput.

6 years agomakebuildserver: remove NDK r9b to save 1.6 GB of disk space
relan [Mon, 12 Feb 2018 06:16:03 +0000 (09:16 +0300)]
makebuildserver: remove NDK r9b to save 1.6 GB of disk space

NDK r9b is used by only one app (net.gorry.android.input.nicownng) that
was last updated in 2015.

6 years agomakebuildserver: upgrade NDK r16 to r16b
relan [Sun, 11 Feb 2018 07:20:42 +0000 (10:20 +0300)]
makebuildserver: upgrade NDK r16 to r16b

6 years agomakebuildserver: add Gradle 4.5.1
relan [Sun, 11 Feb 2018 07:08:06 +0000 (10:08 +0300)]
makebuildserver: add Gradle 4.5.1

6 years agometadata: write values of TYPE_INT fields
relan [Tue, 6 Feb 2018 09:27:34 +0000 (12:27 +0300)]
metadata: write values of TYPE_INT fields

Otherwise we end up with empty values after "fdroid rewritemeta".

6 years agobuild: clear timeout flag before every build
Marcus Hoffmann [Wed, 7 Feb 2018 19:46:29 +0000 (20:46 +0100)]
build: clear timeout flag before every build

This fixes the weird logging behaviour where after a build that timed
out all subsequent failed builds would also show up as timed out.

6 years agoMerge branch 'translation-app-field' into 'master'
Hans-Christoph Steiner [Mon, 5 Feb 2018 15:16:43 +0000 (15:16 +0000)]
Merge branch 'translation-app-field' into 'master'

metadata: add new Translation app field for URL for contributions

See merge request fdroid/fdroidserver!450

6 years agoMerge branch 'popen-stdin-devnull' into 'master'
Hans-Christoph Steiner [Mon, 5 Feb 2018 14:46:08 +0000 (14:46 +0000)]
Merge branch 'popen-stdin-devnull' into 'master'

common: use /dev/null as stdin when calling subprocess.Popen()

See merge request fdroid/fdroidserver!451

6 years agometadata: add new Translation app field for URL for contributions
Hans-Christoph Steiner [Tue, 30 Jan 2018 10:14:36 +0000 (11:14 +0100)]
metadata: add new Translation app field for URL for contributions

This is a field requested from a bunch of translators so they can easily
find where to translate apps:
https://forum.f-droid.org/t/translation-field-for-app-entries/1403/5

6 years agocommon: use /dev/null as stdin when calling subprocess.Popen()
relan [Mon, 5 Feb 2018 12:34:42 +0000 (15:34 +0300)]
common: use /dev/null as stdin when calling subprocess.Popen()

We always want to run all utilities non-interactively. By default
subprocess.Popen() inherits stdin descriptor from parent process, i.e.
when fdroid is run from an interactive shell, subprocesses may expect
input from it.

Reading from /dev/null immediately returns EOF, failing any user prompt
and preventing us from hang.

6 years agolint: check srclibs has name and @ in it
Hans-Christoph Steiner [Wed, 31 Jan 2018 12:33:06 +0000 (13:33 +0100)]
lint: check srclibs has name and @ in it

fdroiddata!2863

6 years agoMerge branch 'master' into 'master'
Hans-Christoph Steiner [Wed, 31 Jan 2018 10:01:18 +0000 (10:01 +0000)]
Merge branch 'master' into 'master'

Option --resetserver does nothing; have it used instead

See merge request fdroid/fdroidserver!449

6 years agoChange --resetserver to --reset-server for consistency
csagan5 [Tue, 30 Jan 2018 19:45:03 +0000 (20:45 +0100)]
Change --resetserver to --reset-server for consistency

6 years agoOption --resetserver does nothing; have it used instead
csagan5 [Tue, 30 Jan 2018 13:50:35 +0000 (14:50 +0100)]
Option --resetserver does nothing; have it used instead

6 years agoMerge branch 'build-timeout-customization' into 'master'
Hans-Christoph Steiner [Tue, 30 Jan 2018 10:22:08 +0000 (11:22 +0100)]
Merge branch 'build-timeout-customization' into 'master'

build: make per-build hard time limit customizable

See merge request fdroid/fdroidserver!446

6 years agofix metadata test: remove timeout= from comparison
Hans-Christoph Steiner [Tue, 30 Jan 2018 10:20:30 +0000 (11:20 +0100)]
fix metadata test: remove timeout= from comparison

6 years agobuild: make per-build hard time limit customizable
relan [Sun, 28 Jan 2018 06:56:19 +0000 (09:56 +0300)]
build: make per-build hard time limit customizable

Add "timeout=n" metadata field that overrides build timeout (in seconds).
The default is 7200, i.e. 2 hours.

6 years agoMerge branch 'gradle-4.5' into 'master'
relan [Tue, 30 Jan 2018 06:12:32 +0000 (06:12 +0000)]
Merge branch 'gradle-4.5' into 'master'

makebuildserver: add gradle 4.5

See merge request fdroid/fdroidserver!448

6 years agomakebuildserver: add gradle 4.5
Marcus Hoffmann [Mon, 29 Jan 2018 16:55:48 +0000 (17:55 +0100)]
makebuildserver: add gradle 4.5

6 years agoMerge branch 'crash-and-standard-imports' into 'master'
Hans-Christoph Steiner [Mon, 29 Jan 2018 09:24:48 +0000 (09:24 +0000)]
Merge branch 'crash-and-standard-imports' into 'master'

Crash and standard imports

See merge request fdroid/fdroidserver!445

6 years agoMerge branch 'minor-security-ish-tweaks' into 'master'
Hans-Christoph Steiner [Mon, 29 Jan 2018 09:23:25 +0000 (09:23 +0000)]
Merge branch 'minor-security-ish-tweaks' into 'master'

security-ish tweaks

See merge request fdroid/fdroidserver!442

6 years agovmtools: use standard imports: os.remove()
Hans-Christoph Steiner [Fri, 26 Jan 2018 09:18:07 +0000 (10:18 +0100)]
vmtools: use standard imports: os.remove()

The rest of the code uses os.remove()

6 years agovmtools: use standard imports: os.path.join()
Hans-Christoph Steiner [Fri, 26 Jan 2018 09:17:19 +0000 (10:17 +0100)]
vmtools: use standard imports: os.path.join()

The rest of the code uses os.path.join()

6 years agometadata: fix crash when there are duplicate metadata files
Hans-Christoph Steiner [Thu, 25 Jan 2018 09:02:13 +0000 (10:02 +0100)]
metadata: fix crash when there are duplicate metadata files

The string had the variable 'appid' while the format() call had only the
variable 'path'.  This also standardizes on 'appid' like the rest of the
code.

6 years agouse standard User-Agent in check-fdroid-apk
Hans-Christoph Steiner [Wed, 24 Jan 2018 05:39:23 +0000 (06:39 +0100)]
use standard User-Agent in check-fdroid-apk

6 years agoshell=True is too dangerous to allow; there are unfiltered user inputs
Hans-Christoph Steiner [Tue, 23 Jan 2018 22:56:15 +0000 (23:56 +0100)]
shell=True is too dangerous to allow; there are unfiltered user inputs

There are all sorts of unfiltered user inputs like tag and branch names in
source repos.  If those names are fed into popen calls that use shell=True,
that opens up a wide range of exploits.  All core operations should never
use shell=True.

6 years agouse '--' in source vcs calls to protect against malicious input
Hans-Christoph Steiner [Tue, 23 Jan 2018 21:42:32 +0000 (22:42 +0100)]
use '--' in source vcs calls to protect against malicious input

This is a quick and very incomplete addition of '--' to command line calls
to source VCSs like git and hg that could manipulated by malicious
tag/branch names or other vectors.

These were all manually tested by calling the command lines on my own
machine.

6 years agoscanner: allow running without versionCode and as API
Hans-Christoph Steiner [Tue, 23 Jan 2018 20:55:37 +0000 (21:55 +0100)]
scanner: allow running without versionCode and as API

This lets `fdroid scanner my.package.name` run without requiring that the
versionCode is also specified.  It also allows scanner.scan_source() to be
called as a function in the public API of fdroidserver.

6 years agolint: check description for forbidden HTML tags: iframe, link, script, etc.
Hans-Christoph Steiner [Tue, 23 Jan 2018 16:13:49 +0000 (17:13 +0100)]
lint: check description for forbidden HTML tags: iframe, link, script, etc.

6 years agobuildserver: include python3-git for future use
Hans-Christoph Steiner [Tue, 23 Jan 2018 16:12:32 +0000 (17:12 +0100)]
buildserver: include python3-git for future use

We should be replacing all our custom git shell commands with python3-git,
since it is a common library for doing that.  It will receive a lot more
attention and maintenance than our code for doing it.  For example, we
should not ever use shell=True, since that opens up a lot of security
risks.

6 years agowiki: include per-app link to all related activity on gitlab.com
Hans-Christoph Steiner [Tue, 23 Jan 2018 08:35:41 +0000 (09:35 +0100)]
wiki: include per-app link to all related activity on gitlab.com

6 years agoMerge branch 'platform27' into 'master'
Hans-Christoph Steiner [Fri, 26 Jan 2018 09:09:15 +0000 (09:09 +0000)]
Merge branch 'platform27' into 'master'

makebuildserver: re-add platform 27

Closes #445

See merge request fdroid/fdroidserver!444

6 years agomakebuildserver: re-add platform 27
Marcus Hoffmann [Thu, 25 Jan 2018 13:09:16 +0000 (14:09 +0100)]
makebuildserver: re-add platform 27

Closes #445

6 years agoMerge branch 'build_tools_27.0.3' into 'master'
Marcus [Thu, 25 Jan 2018 13:12:53 +0000 (13:12 +0000)]
Merge branch 'build_tools_27.0.3' into 'master'

makebuildserver: add build-tools 27.0.3

See merge request fdroid/fdroidserver!443

6 years agomakebuildserver: add build-tools 27.0.3
Marcus Hoffmann [Thu, 25 Jan 2018 10:53:27 +0000 (11:53 +0100)]
makebuildserver: add build-tools 27.0.3

6 years agoMerge branch 'remove-kivy' into 'master'
Hans-Christoph Steiner [Wed, 24 Jan 2018 05:35:32 +0000 (05:35 +0000)]
Merge branch 'remove-kivy' into 'master'

build: remove unused, unmaintained Kivy build method

See merge request fdroid/fdroidserver!441

6 years agobuild: remove unused, unmaintained Kivy build method
Hans-Christoph Steiner [Tue, 23 Jan 2018 22:16:05 +0000 (23:16 +0100)]
build: remove unused, unmaintained Kivy build method

This code has never been used and contains some insecure uses of shell=True
Building Kivy apps should be done with the buildozer=yes method.  The
buildozer method should probably be moved to a provisioner once that is in
place.

6 years agoMerge branch 'remove-qt' into 'master'
Hans-Christoph Steiner [Tue, 23 Jan 2018 20:52:22 +0000 (20:52 +0000)]
Merge branch 'remove-qt' into 'master'

buildserver: remove Qt installer, its huge, outdated, and being replaced

See merge request fdroid/fdroidserver!440

6 years agobuildserver: remove Qt installer, its huge, outdated, and being replaced
Hans-Christoph Steiner [Tue, 23 Jan 2018 16:55:48 +0000 (17:55 +0100)]
buildserver: remove Qt installer, its huge, outdated, and being replaced

The currently included Qt has known security issues and is outdated.  This
can now be replaced by downloading and installing the Qt installer using
the sudo= build field.  @relan's provisioner system will also replace this
once that's done.  There are only two apps that currently use the Qt stuff:

* csd.qtproject.minesweeper
* org.openorienteering.mapper

6 years agoMerge branch 'build_timeout' into 'master'
Hans-Christoph Steiner [Mon, 22 Jan 2018 20:49:01 +0000 (20:49 +0000)]
Merge branch 'build_timeout' into 'master'

Build timeout

See merge request fdroid/fdroidserver!437

6 years agomain: force exit on keyboard interrupt
Marcus Hoffmann [Sat, 20 Jan 2018 19:48:02 +0000 (20:48 +0100)]
main: force exit on keyboard interrupt

This applies the same workaround as b8ed892ad9ed7e125278b.