chiark / gitweb /
fdroidserver.git
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.

6 years agonightly: resign APKs with provided debug.keystore
Hans-Christoph Steiner [Thu, 30 Nov 2017 20:12:34 +0000 (21:12 +0100)]
nightly: resign APKs with provided debug.keystore

Rather than needing to run a command before and after the build, in order
to first install the debug.keystore, then after to fetch and publish the
APK, this makes `fdroid nightly` just resign the APK with the provided
debug.keystore.  Then `fdroid nightly` can be run as the final step in a CI
build, and still ensure that the APKs are always signed by the provided
debug.keystore.

6 years agoadd common.sign_apk() for nighly as test for using in publish
Hans-Christoph Steiner [Thu, 30 Nov 2017 20:10:41 +0000 (21:10 +0100)]
add common.sign_apk() for nighly as test for using in publish

Since the MD5 migration was quite a bit of work, it makes sense to start
on moving away from SHA1 as much as possible while it is easy to do. SHA256
will only work in APK signatures on android-18 (4.3) or newer.  So if an
APK has a minSdkVersion of 18 or newer, then sign with SHA256.

https://issuetracker.google.com/issues/36956587
https://android-review.googlesource.com/c/platform/libcore/+/44491

6 years agoMerge branch 'CVE-2017-1000117' into 'master'
Hans-Christoph Steiner [Mon, 4 Dec 2017 18:48:24 +0000 (18:48 +0000)]
Merge branch 'CVE-2017-1000117' into 'master'

block all SSH connections for VCS, for usabililty and security

See merge request fdroid/fdroidserver!396

6 years agoblock all SSH connections for VCS, for usabililty and security
Hans-Christoph Steiner [Mon, 4 Dec 2017 16:49:59 +0000 (17:49 +0100)]
block all SSH connections for VCS, for usabililty and security

If we allow SSH, then we'd have to manage known_hosts.

All VCS and submodule URLs should use HTTPS.  SSH URLs have security vulns:
https://blogs.msdn.microsoft.com/devops/2017/08/15/git-vulnerability-with-submodules/
https://www.theregister.co.uk/2017/08/13/ssh_flaw_in_git_mercurial_svn/
CVE-2017-1000117

I did a manual scan of the setup on jenkins.debian.net to see if I could
find any suspicious URLs.  Looks good so far.  This is what I used:

find . -type f -print0 |xargs -0 grep -Eo 'ssh[:+][svn/]+...................'
find . -type f -print0 |xargs -0 grep -Eo 'ssh://-[^ "]+'

Also, some ssh://_ URLs in submodules might still work, because of the URL
rewriting in fdbfb4d1.  But https://-oProxyCommand=pwnme does not really do
anything, unlike ssh://-oProxyCommand=pwnme

6 years agoMerge branch 'submodules_ucm' into 'master'
Marcus [Mon, 4 Dec 2017 16:29:11 +0000 (16:29 +0000)]
Merge branch 'submodules_ucm' into 'master'

checkupdates: don't fail when we can't init submodules

Closes #231

See merge request fdroid/fdroidserver!395

6 years agocheckupdates: don't fail when we can't init submodules
Marcus Hoffmann [Mon, 4 Dec 2017 14:10:21 +0000 (15:10 +0100)]
checkupdates: don't fail when we can't init submodules

Later revisions might have removed the submodules so we want to keep
going when there are no submodules present.
We still abort when there is an error initializing submodules.

Fixes fdroid/fdroidserver#231

6 years agoMerge branch 'git_clone_fix' into 'master'
Michael Pöhn [Sun, 3 Dec 2017 16:49:42 +0000 (16:49 +0000)]
Merge branch 'git_clone_fix' into 'master'

GitFetchFDroidPopen: don't change cwd when cloning

See merge request fdroid/fdroidserver!393

6 years agoGitFetchFDroidPopen: don't change cwd per default
Marcus Hoffmann [Sun, 3 Dec 2017 13:18:18 +0000 (14:18 +0100)]
GitFetchFDroidPopen: don't change cwd per default

Fix for ca24aa4ca85da123df613f7105249605764f1321.
For git clone we don't want to change cwd because clone actually
creates the repo dir.

6 years agostop `git clone` from hanging at prompts
Hans-Christoph Steiner [Sun, 3 Dec 2017 12:12:43 +0000 (13:12 +0100)]
stop `git clone` from hanging at prompts

Forgot this in fdbfb4d1a2b4f97ff0e1b93739fee2f0c5652e63 !378

reviewed in person with @bubu @uniqx

6 years agoMerge branch 'log_git' into 'master'
relan [Sun, 3 Dec 2017 06:03:03 +0000 (06:03 +0000)]
Merge branch 'log_git' into 'master'

build: log vcs tools version on every build attempt

See merge request fdroid/fdroidserver!391

6 years agobuild: log vcs tools version on every build attempt
Marcus Hoffmann [Sat, 2 Dec 2017 21:41:08 +0000 (22:41 +0100)]
build: log vcs tools version on every build attempt

6 years agoMerge branch 'metadataFlavours' into 'master'
Hans-Christoph Steiner [Sat, 2 Dec 2017 20:51:24 +0000 (20:51 +0000)]
Merge branch 'metadataFlavours' into 'master'

Add flavour to metadata

See merge request fdroid/fdroidserver!370

6 years agobuild: hard exit on success to avoid hanging
Hans-Christoph Steiner [Sat, 2 Dec 2017 12:24:13 +0000 (13:24 +0100)]
build: hard exit on success to avoid hanging

Something is preventing `fdroid build --all` from exiting after a long
run.  @bubu, @uniqx and I think it is because of the use of
AsynchronousFileReader, somehow it's thread does not exit. So the
workaround for now is to just try a hard exit instead of waiting for
things to finish cleanly with `sys.exit(0)`.

https://jenkins.debian.net/job/reproducible_fdroid_build_apps/94/console

6 years agoMerge branch 'no_sleep' into 'master'
Michael Pöhn [Sat, 2 Dec 2017 12:49:05 +0000 (12:49 +0000)]
Merge branch 'no_sleep' into 'master'

vmtools: remove old vagrant workaround

See merge request fdroid/fdroidserver!380

6 years agoMerge branch 'sort-fdroid-build-all' into 'master'
Marcus [Sat, 2 Dec 2017 12:34:27 +0000 (12:34 +0000)]
Merge branch 'sort-fdroid-build-all' into 'master'

sort `fdroid build --all` by most recent first

See merge request fdroid/fdroidserver!390

6 years agoadd flavour to metadata
tobiasKaminsky [Sun, 12 Nov 2017 15:32:42 +0000 (16:32 +0100)]
add flavour to metadata

6 years agotests: use standard dir setup so all tests start in same dir
Hans-Christoph Steiner [Thu, 30 Nov 2017 09:14:38 +0000 (10:14 +0100)]
tests: use standard dir setup so all tests start in same dir

6 years agotests: name temp test dir after test function that used it
Hans-Christoph Steiner [Thu, 30 Nov 2017 08:59:02 +0000 (09:59 +0100)]
tests: name temp test dir after test function that used it

6 years agobuild: sort `fdroid build --all` by most recently changed first
Hans-Christoph Steiner [Wed, 29 Nov 2017 21:03:26 +0000 (22:03 +0100)]
build: sort `fdroid build --all` by most recently changed first

6 years agomirror: fix syntax error on Python 3.4
Hans-Christoph Steiner [Thu, 30 Nov 2017 13:02:02 +0000 (14:02 +0100)]
mirror: fix syntax error on Python 3.4

It seems that Python 3.5 is more flexible with * expansion, Python 3.4 says:

SyntaxError: only named arguments may follow *expression
https://travis-ci.org/f-droid/fdroidserver/jobs/309194065

6 years agoMerge branch 'gradleFlavor' into 'master'
Hans-Christoph Steiner [Thu, 30 Nov 2017 12:44:47 +0000 (13:44 +0100)]
Merge branch 'gradleFlavor' into 'master'

gradle file: use flavour specific versionCode/versionName, fall back to parsing line by line

See merge request fdroid/fdroidserver!389

6 years agoPEP8 fixes
Hans-Christoph Steiner [Thu, 30 Nov 2017 12:42:37 +0000 (13:42 +0100)]
PEP8 fixes

6 years agoMerge branch 'polish-for-1.0' into 'master'
Hans-Christoph Steiner [Thu, 30 Nov 2017 12:28:28 +0000 (12:28 +0000)]
Merge branch 'polish-for-1.0' into 'master'

Polish for 1.0

Closes #421

See merge request fdroid/fdroidserver!388

6 years agoadded test case
tobiasKaminsky [Thu, 30 Nov 2017 10:12:18 +0000 (11:12 +0100)]
added test case

6 years agovmtools: in KVM mode, only call sudo hack when file is not readable
Hans-Christoph Steiner [Wed, 29 Nov 2017 19:04:18 +0000 (20:04 +0100)]
vmtools: in KVM mode, only call sudo hack when file is not readable

6 years agoserver: prevent crash when uploading to virustotal
Hans-Christoph Steiner [Wed, 29 Nov 2017 12:24:19 +0000 (13:24 +0100)]
server: prevent crash when uploading to virustotal

6 years agoinit: handle case where keystore.jks is present but config.py is not
Hans-Christoph Steiner [Tue, 28 Nov 2017 11:04:07 +0000 (12:04 +0100)]
init: handle case where keystore.jks is present but config.py is not

6 years agocommon: document read_pkg_args() and read_app_args()
Hans-Christoph Steiner [Tue, 28 Nov 2017 09:40:11 +0000 (10:40 +0100)]
common: document read_pkg_args() and read_app_args()

It took me a long time to figure out how `fdroid build --all` builds the
whole list of apps...

6 years agobuild: set open file limit based on how many apps are being processed
Hans-Christoph Steiner [Tue, 28 Nov 2017 09:39:35 +0000 (10:39 +0100)]
build: set open file limit based on how many apps are being processed

When running `fdroid build --all` on a buildserver with thousands of apps,
it was frequently hitting the open file limit.  This increases the open
file limit based on how many apps are being process.  It is doubled to
provide a margin of safety.

There are probably open file leaks which ideally would be fixed, but this
is also useful to make things more resilient to all the random stuff apps
include in their build systems.

6 years agobuildserver: include all Android SDK licenses in their exact format
Hans-Christoph Steiner [Fri, 24 Nov 2017 08:21:28 +0000 (09:21 +0100)]
buildserver: include all Android SDK licenses in their exact format

I tried to clone the files I got from `sdkmanager --licenses`, byte for
byte.

6 years agonightly: automatically create and manage app metadata
Hans-Christoph Steiner [Mon, 27 Nov 2017 21:35:57 +0000 (22:35 +0100)]
nightly: automatically create and manage app metadata

This also allows the developer to edit the metadata in the *-nightly git
repo to customize it.

closes #421

6 years agonightly: fix QR code repo icon generation
Hans-Christoph Steiner [Mon, 27 Nov 2017 21:29:11 +0000 (22:29 +0100)]
nightly: fix QR code repo icon generation

6 years agonightly: include 'qrcode' as dependency
Hans-Christoph Steiner [Mon, 27 Nov 2017 21:24:59 +0000 (22:24 +0100)]
nightly: include 'qrcode' as dependency

6 years agoupdate: use KnownApks dates to check system clock on offline machines
Hans-Christoph Steiner [Wed, 29 Nov 2017 10:21:34 +0000 (11:21 +0100)]
update: use KnownApks dates to check system clock on offline machines

KnownApks provides a reliable source of a relatively recent date.

6 years agoMerge branch 's3cfg' into 'master'
Hans-Christoph Steiner [Wed, 29 Nov 2017 19:34:11 +0000 (19:34 +0000)]
Merge branch 's3cfg' into 'master'

server: allow user to specify custom s3cfg file

Closes #413

See merge request fdroid/fdroidserver!385

6 years agoserver: allow user to specify custom s3cfg file (closes #413)
Hans-Christoph Steiner [Tue, 28 Nov 2017 11:07:51 +0000 (12:07 +0100)]
server: allow user to specify custom s3cfg file (closes #413)

This lets people do advanced S3 setups like CloudFront caching, and
anything else s3cmd lets you do.

6 years agoMerge branch 'fdroid-mirror' into 'master'
Marcus [Wed, 29 Nov 2017 17:29:42 +0000 (17:29 +0000)]
Merge branch 'fdroid-mirror' into 'master'

mirror: new command to make a mirror of a repo

See merge request fdroid/fdroidserver!389

6 years agomirror: fix downloading of graphics
Hans-Christoph Steiner [Wed, 29 Nov 2017 16:12:38 +0000 (17:12 +0100)]
mirror: fix downloading of graphics

It was downloading them all directly into the 'repo' folder.

6 years agomirror: forward --verbose flag to wget to control output
Hans-Christoph Steiner [Wed, 29 Nov 2017 15:54:52 +0000 (16:54 +0100)]
mirror: forward --verbose flag to wget to control output

6 years agomirror: verify index signature if fingerprint included in URL
Hans-Christoph Steiner [Wed, 29 Nov 2017 15:54:27 +0000 (16:54 +0100)]
mirror: verify index signature if fingerprint included in URL

This keeps the old handling without signature checks so that it works
without requiring Java/apksigner or the whole config.py parsing stuff.

6 years agomirror: show help if no URL is provided
Hans-Christoph Steiner [Wed, 29 Nov 2017 13:59:48 +0000 (14:59 +0100)]
mirror: show help if no URL is provided

6 years agomirror: new command to make a mirror of a repo
Hans-Christoph Steiner [Wed, 29 Nov 2017 11:40:04 +0000 (12:40 +0100)]
mirror: new command to make a mirror of a repo

This creates a mirror of a full repo by downloading all files listed in
the index, and the ones that are generated based on that data, e.g. icons
of different resolutions.  This could be useful for setting up mirrors of
small repositories, instead of having to learn and manage rsync or
something else for mirroring.  This just needs a working repo.

It uses wget in a batch mode with the aim as being as efficient as
possible.  wget mirroring over HTTP is always going to be less efficient
than rsync, but it shouldn't be so bad since it uses --continue to check
whether it has already downloaded a file.  I suppose it could be extended
to use ETags for a little more efficiency.

I developed this creating a test mirror of f-droid.org, which is now a bit
ironic, since I added a specific check to prevent people from using this
on f-droid.org.

6 years agogradle file: use flavour specific versionCode/versionName, fall back to parsing line...
tobiasKaminsky [Wed, 29 Nov 2017 07:32:55 +0000 (08:32 +0100)]
gradle file: use flavour specific versionCode/versionName, fall back to parsing line by line

6 years agojenkins-test: make new keystore on each test so the password is known
Hans-Christoph Steiner [Tue, 28 Nov 2017 11:03:39 +0000 (12:03 +0100)]
jenkins-test: make new keystore on each test so the password is known

6 years agoBump to 0.9.1 for release process fixes 0.9.1
Hans-Christoph Steiner [Mon, 27 Nov 2017 14:54:48 +0000 (15:54 +0100)]
Bump to 0.9.1 for release process fixes

6 years agorename test files to work round filename length limits
Hans-Christoph Steiner [Mon, 27 Nov 2017 15:35:58 +0000 (16:35 +0100)]
rename test files to work round filename length limits

It seems a lot of things like tar, Windows, some filesystems, etc. do not
handle long filenames. #416

6 years agocheck git is on correct tag before making a release
Hans-Christoph Steiner [Mon, 27 Nov 2017 14:23:02 +0000 (15:23 +0100)]
check git is on correct tag before making a release

6 years agoMerge branch 'tests-fedora' into 'master'
Hans-Christoph Steiner [Mon, 27 Nov 2017 15:58:24 +0000 (15:58 +0000)]
Merge branch 'tests-fedora' into 'master'

tests: fix pycodestyle lookup

See merge request fdroid/fdroidserver!386

6 years agotests: fix pycodestyle lookup
relan [Mon, 27 Nov 2017 13:32:41 +0000 (16:32 +0300)]
tests: fix pycodestyle lookup

Pycodestyle is available as /usr/bin/pycodestyle-3 on Fedora.

6 years agoBump to 1.0.dev0
Hans-Christoph Steiner [Mon, 27 Nov 2017 12:08:04 +0000 (13:08 +0100)]
Bump to 1.0.dev0

6 years agoBump to 0.9 0.9
Hans-Christoph Steiner [Mon, 27 Nov 2017 12:02:33 +0000 (13:02 +0100)]
Bump to 0.9

6 years agoMerge branch 'weblate' into 'master'
Hans-Christoph Steiner [Mon, 27 Nov 2017 12:28:35 +0000 (12:28 +0000)]
Merge branch 'weblate' into 'master'

Weblate

See merge request fdroid/fdroidserver!384

6 years agoWeblate
Hans-Christoph Steiner [Mon, 27 Nov 2017 12:28:34 +0000 (12:28 +0000)]
Weblate

6 years agonightly: fix PEP8 E722 do not use bare except
Hans-Christoph Steiner [Mon, 27 Nov 2017 09:41:08 +0000 (10:41 +0100)]
nightly: fix PEP8 E722 do not use bare except

6 years agojenkins: require successful `git fetch` before running tests
Hans-Christoph Steiner [Mon, 27 Nov 2017 09:06:47 +0000 (10:06 +0100)]
jenkins: require successful `git fetch` before running tests

6 years agojenkins-setup-build-env: actually run tests in the new buildserver VM
Hans-Christoph Steiner [Mon, 27 Nov 2017 08:58:51 +0000 (09:58 +0100)]
jenkins-setup-build-env: actually run tests in the new buildserver VM

Oops, this has been failing, since it was running the build on the vm host,
not in the buildserver VM.

6 years agojenkins-test: don't overwrite `fdroid init` config.py and rm test files
Hans-Christoph Steiner [Mon, 27 Nov 2017 08:36:01 +0000 (09:36 +0100)]
jenkins-test: don't overwrite `fdroid init` config.py and rm test files

6 years agojenkins-test: force new repo setup for each build
Hans-Christoph Steiner [Sun, 26 Nov 2017 21:45:04 +0000 (22:45 +0100)]
jenkins-test: force new repo setup for each build

jenkins-build-all just sets `build_server_always = True`, these tests need
a whole keystore setup.  So just delete the existing config, and let
`fdroid init` do the rest.

6 years agoMerge branch 'rsync' into 'master'
Hans-Christoph Steiner [Sun, 26 Nov 2017 21:50:24 +0000 (21:50 +0000)]
Merge branch 'rsync' into 'master'

build: rsync instead of sftp dirs to the buildserver

Closes #227

See merge request fdroid/fdroidserver!379

6 years agoMerge branch 'ndk' into 'master'
Hans-Christoph Steiner [Sun, 26 Nov 2017 21:48:04 +0000 (21:48 +0000)]
Merge branch 'ndk' into 'master'

makebuildserver: add ndk r16

See merge request fdroid/fdroidserver!383

6 years agomakebuildserver: add ndk r16
Marcus Hoffmann [Sun, 26 Nov 2017 16:08:26 +0000 (17:08 +0100)]
makebuildserver: add ndk r16

6 years agoMerge branch 'vm-provider-lookup-flaw' into 'master'
Hans-Christoph Steiner [Sat, 25 Nov 2017 17:10:43 +0000 (17:10 +0000)]
Merge branch 'vm-provider-lookup-flaw' into 'master'

fix vm provider lookup flaw

See merge request fdroid/fdroidserver!382

6 years agoMerge branch 'no_rm' into 'master'
Hans-Christoph Steiner [Sat, 25 Nov 2017 16:43:44 +0000 (16:43 +0000)]
Merge branch 'no_rm' into 'master'

common: use python instead of calling out to 'rm'

See merge request fdroid/fdroidserver!381

6 years agofix vm provider lookup flaw
Michael Pöhn [Sat, 25 Nov 2017 16:30:15 +0000 (17:30 +0100)]
fix vm provider lookup flaw

6 years agobuild: rsync instead of sftp dirs to the buildserver
Marcus Hoffmann [Fri, 24 Nov 2017 21:41:06 +0000 (22:41 +0100)]
build: rsync instead of sftp dirs to the buildserver

Sending many small files with paramiko's sftp implementation is quite
slow. There seems to be no way around this, other projects (ansible)
recommend to use rsync in this case.

Our sourcecode directories sometimes have a LOT of files, it can take
up to an hour to copy all required things inside the buildserver.

Instead we just use rsync with the ssh options we get from vagrant.
For rsync specific options we use:

* sync permissions as before
* sync symlinks (was done partially before)
* don't sync hardlinks and ownership as these don't make for things
  coming from a VCS

Closes fdroid/fdroidserver#227.

6 years agocommon: use python instead of calling out to 'rm'
Marcus Hoffmann [Sat, 25 Nov 2017 02:05:59 +0000 (03:05 +0100)]
common: use python instead of calling out to 'rm'

Be platform agnostic by not calling other utilities.

6 years agoMerge branch 'stop-hanging-on-git-ssh' into 'master'
Hans-Christoph Steiner [Sat, 25 Nov 2017 10:25:52 +0000 (10:25 +0000)]
Merge branch 'stop-hanging-on-git-ssh' into 'master'

Stop hanging on git ssh

See merge request fdroid/fdroidserver!378

6 years agovmtools: remove old vagrant workaround
Marcus Hoffmann [Fri, 24 Nov 2017 23:38:00 +0000 (00:38 +0100)]
vmtools: remove old vagrant workaround

This was introduced in cd23bb933c7c5d67cff35ada0f5edeac917c791f
apparently to work around problems in vagrant 1.3.5.

This seems not to be necessary any more, I have never had a problem with
those sleeps removed.

6 years agonever wait for SSH prompts when running git commands
Hans-Christoph Steiner [Thu, 23 Nov 2017 20:19:45 +0000 (21:19 +0100)]
never wait for SSH prompts when running git commands

We never allow git via SSH or password/key access, and right now, this
causes things to hang forever.  This sets things up to fail quickly
with invalid ssh connections.

BatchMode=yes - passphrase/password querying will be disabled.

StrictHostKeyChecking=yes - never automatically prompt, or add host keys to
the ~/.ssh/known_hosts file, and refuse to connect to hosts whose host key
has changed.

6 years agobuild: stop git from waiting forever at username/password prompts
Hans-Christoph Steiner [Thu, 23 Nov 2017 16:08:57 +0000 (17:08 +0100)]
build: stop git from waiting forever at username/password prompts

If a git fetch/clone/submodule URL points to gitlab, github, bitbucket, etc
and that repo does not exist any more, those services will prompt the user
for a username/password so that the service can check if its a private
repo.  Private repos show up the same as non-existent repos.  This employs
two techniques for making sure that git never waits at those prompts.  It
instead should just fail immediately.  The buildserver has been hanging on
these prompts forever, until manually killed.  This change will apply to
updates both on the buildserver host, and the buildserver guest vm.

This uses the "insteadOf" git config option to rewrite URLs to always use
HTTPS and then include a fake username/password so that git will use those
in the prompts and fail immediately.  This trick has been in use on the
verification server for a long while and has been working well.  It has
also been used on jenkins.debian.net in the host.
https://f-droid.org/en/docs/Verification_Server/

It also includes GIT_TERMINAL_PROMPT, which also prevents the bad behavior,
which was added in git 2.3.
https://github.com/blog/1957-git-2-3-has-been-released

6 years agobuildserver: use git from jessie-backports to get better workflow
Hans-Christoph Steiner [Thu, 23 Nov 2017 20:21:06 +0000 (21:21 +0100)]
buildserver: use git from jessie-backports to get better workflow

A number of key features around username/password handling where added in
2.3, like GIT_SSH_COMMAND and GIT_TERMINAL_PROMPT.

6 years agoMerge branch 'nightly' into 'master'
Hans-Christoph Steiner [Thu, 23 Nov 2017 22:13:42 +0000 (22:13 +0000)]
Merge branch 'nightly' into 'master'

nightly: new command to setup nightly builds in CI systems

See merge request fdroid/fdroidserver!377

6 years agonightly: new command to setup nightly builds in CI systems
Hans-Christoph Steiner [Wed, 22 Nov 2017 22:27:07 +0000 (23:27 +0100)]
nightly: new command to setup nightly builds in CI systems

This lets people using CI systems easily setup a nightly build repo hosted
for free in github or gitlab.

https://github.com/zom/Zom-Android/pull/355
https://gitlab.com/fdroid/fdroidclient/merge_requests/594

environment variables:
* https://docs.gitlab.com/ce/ci/variables/README.html
* https://docs.travis-ci.com/user/environment-variables
* https://circleci.com/docs/1.0/environment-variables

6 years agorename test file to fit within eCryptfs filename limits (closes #416)
Hans-Christoph Steiner [Wed, 22 Nov 2017 10:19:03 +0000 (11:19 +0100)]
rename test file to fit within eCryptfs filename limits (closes #416)

6 years agomake common.local_rsync() method for pre-configured local rsyncs
Hans-Christoph Steiner [Mon, 20 Nov 2017 14:54:00 +0000 (15:54 +0100)]
make common.local_rsync() method for pre-configured local rsyncs

6 years agocommon.get_examples_dir() to get path to fdroidserver examples
Hans-Christoph Steiner [Fri, 17 Nov 2017 14:48:45 +0000 (15:48 +0100)]
common.get_examples_dir() to get path to fdroidserver examples