1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00
Commit Graph

5003 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
7eef6eac93 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.
2017-11-29 19:50:57 +01:00
Marcus
528d5a0d1a Merge branch 'fdroid-mirror' into 'master'
mirror: new command to make a mirror of a repo

See merge request fdroid/fdroidserver!389
2017-11-29 17:29:42 +00:00
Hans-Christoph Steiner
09a6b37ac0 mirror: fix downloading of graphics
It was downloading them all directly into the 'repo' folder.
2017-11-29 17:12:38 +01:00
Hans-Christoph Steiner
79a4c469b3 mirror: forward --verbose flag to wget to control output 2017-11-29 16:54:52 +01:00
Hans-Christoph Steiner
94e67a7623 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.
2017-11-29 16:54:27 +01:00
Hans-Christoph Steiner
d5481927f2 mirror: show help if no URL is provided 2017-11-29 16:31:48 +01:00
Hans-Christoph Steiner
2162703a1a 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.
2017-11-29 12:40:04 +01:00
tobiasKaminsky
f8492f05a8
gradle file: use flavour specific versionCode/versionName, fall back to parsing line by line 2017-11-29 09:40:44 +01:00
Hans-Christoph Steiner
5607ccdc41 jenkins-test: make new keystore on each test so the password is known 2017-11-28 12:10:13 +01:00
Hans-Christoph Steiner
cee65dbfb6 Bump to 0.9.1 for release process fixes 2017-11-27 16:57:30 +01:00
Hans-Christoph Steiner
743ef9ba00 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
2017-11-27 16:57:30 +01:00
Hans-Christoph Steiner
875dfd0d60 check git is on correct tag before making a release 2017-11-27 16:57:30 +01:00
Hans-Christoph Steiner
ff5717b37e Merge branch 'tests-fedora' into 'master'
tests: fix pycodestyle lookup

See merge request fdroid/fdroidserver!386
2017-11-27 15:58:24 +00:00
relan
6498d24f36 tests: fix pycodestyle lookup
Pycodestyle is available as /usr/bin/pycodestyle-3 on Fedora.
2017-11-27 16:32:41 +03:00
Hans-Christoph Steiner
80bd6f5fe2 Bump to 1.0.dev0 2017-11-27 13:59:35 +01:00
Hans-Christoph Steiner
2c32071f24 Bump to 0.9 2017-11-27 13:59:35 +01:00
Hans-Christoph Steiner
e89dc399ff Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidserver!384
2017-11-27 12:28:35 +00:00
Hans-Christoph Steiner
0768b4db0f Weblate 2017-11-27 12:28:34 +00:00
Hans-Christoph Steiner
ec453eac8a nightly: fix PEP8 E722 do not use bare except 2017-11-27 10:42:31 +01:00
Hans-Christoph Steiner
35ff37b1e2 jenkins: require successful git fetch before running tests 2017-11-27 10:07:17 +01:00
Hans-Christoph Steiner
2cf6110860 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.
2017-11-27 10:07:17 +01:00
Hans-Christoph Steiner
c7f859c168 jenkins-test: don't overwrite fdroid init config.py and rm test files 2017-11-27 10:07:17 +01:00
Hans-Christoph Steiner
d6c2ec092f 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.
2017-11-26 22:48:53 +01:00
Hans-Christoph Steiner
9fda492b2f Merge branch 'rsync' into 'master'
build: rsync instead of sftp dirs to the buildserver

Closes #227

See merge request fdroid/fdroidserver!379
2017-11-26 21:50:24 +00:00
Hans-Christoph Steiner
c65398cb8a Merge branch 'ndk' into 'master'
makebuildserver: add ndk r16

See merge request fdroid/fdroidserver!383
2017-11-26 21:48:04 +00:00
Marcus Hoffmann
f9b853ab91 makebuildserver: add ndk r16 2017-11-26 17:17:55 +01:00
Hans-Christoph Steiner
9aacdf3fe3 Merge branch 'vm-provider-lookup-flaw' into 'master'
fix vm provider lookup flaw

See merge request fdroid/fdroidserver!382
2017-11-25 17:10:43 +00:00
Hans-Christoph Steiner
a3815039d8 Merge branch 'no_rm' into 'master'
common: use python instead of calling out to 'rm'

See merge request fdroid/fdroidserver!381
2017-11-25 16:43:44 +00:00
Michael Pöhn
1e83bd306f fix vm provider lookup flaw 2017-11-25 17:30:15 +01:00
Marcus Hoffmann
597fc04c9e 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.
2017-11-25 14:07:06 +01:00
Marcus Hoffmann
c790f43bf3 common: use python instead of calling out to 'rm'
Be platform agnostic by not calling other utilities.
2017-11-25 13:49:33 +01:00
Hans-Christoph Steiner
0f28c805b3 Merge branch 'stop-hanging-on-git-ssh' into 'master'
Stop hanging on git ssh

See merge request fdroid/fdroidserver!378
2017-11-25 10:25:52 +00:00
Marcus Hoffmann
b9b262422f vmtools: remove old vagrant workaround
This was introduced in cd23bb933c
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.
2017-11-25 00:38:00 +01:00
Hans-Christoph Steiner
09828f4a73 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.
2017-11-23 23:31:38 +01:00
Hans-Christoph Steiner
fdbfb4d1a2 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
2017-11-23 23:31:37 +01:00
Hans-Christoph Steiner
c45264b190 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.
2017-11-23 23:27:59 +01:00
Hans-Christoph Steiner
4b51cc273a Merge branch 'nightly' into 'master'
nightly: new command to setup nightly builds in CI systems

See merge request fdroid/fdroidserver!377
2017-11-23 22:13:42 +00:00
Hans-Christoph Steiner
f670634450 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
2017-11-22 23:27:07 +01:00
Hans-Christoph Steiner
cbd9669105 rename test file to fit within eCryptfs filename limits (closes #416) 2017-11-22 11:40:16 +01:00
Hans-Christoph Steiner
8bf70338e4 make common.local_rsync() method for pre-configured local rsyncs 2017-11-22 11:40:16 +01:00
Hans-Christoph Steiner
ed80391bb5 common.get_examples_dir() to get path to fdroidserver examples 2017-11-22 11:40:16 +01:00
Hans-Christoph Steiner
e33684fc9b tests: new tests for stacktraces caused by translated help strings 2017-11-22 11:40:16 +01:00
Hans-Christoph Steiner
0beaa4701b remove --create-key from completion, its only for migrations
If people want to create repos, they should be using `fdroid init`.  This
flag is for very specific cases: migrating old unsigned repos to signed.
It shouldn't be promoted for anything else since there are better tools for
those tasks.
2017-11-22 11:40:16 +01:00
Hans-Christoph Steiner
b72d6d7dbb Merge branch 'gradle-platform-install' into 'master'
Allow Gradle to install new platforms

See merge request fdroid/fdroidserver!373
2017-11-20 08:36:07 +00:00
Hans-Christoph Steiner
0e3d63fa1b Merge branch 'remove-ubuntu-trusty-paramiko-hack' into 'master'
buildserver: remove special sshd setup for Ubuntu 14.04

See merge request fdroid/fdroidserver!374
2017-11-20 08:30:37 +00:00
relan
14f95f7750 buildserver: remove special sshd setup for Ubuntu 14.04
Now that fdroidserver requires Python 3, there's no need to tune sshd for
an old version of Paramiko because Ubuntu 14.04 does not have
python3-paramiko package in its repositories:

    https://packages.ubuntu.com/search?keywords=python3-paramiko

We can safely assume that Ubuntu 14.04 users have installed a more recent
version of Paramiko from PIP.
2017-11-17 21:15:18 +03:00
relan
3a7a043c68 buildserver: add new android-sdk-license hash
The old hash does not work anymore, at least for platform-27. Where this
new one comes from:

1. Download command line tools from
   https://developer.android.com/studio/index.html#command-tools
2. Unzip the package
3. Run ./tools/bin/sdkmanager --licenses
4. Read and accept licenses
5. Find the hash in ./licenses/android-sdk-license
2017-11-14 19:00:30 +03:00
Marcus
c798183bc7 Merge branch 'gradle-4.3.1' into 'master'
makebuildserver: add Gradle 4.3.1

See merge request fdroid/fdroidserver!372
2017-11-14 12:27:00 +00:00
relan
358fedc611 buildserver: allow gradle/sdkmanager to install new platforms
Google releases new API SDKs quite rarely (about 2 times a year), but when
they do this, many apps quickly start using it. Allow downloading new API
SDKs to avoid waiting for the next buildserver rebuild.
2017-11-14 12:31:52 +03:00
relan
c859ffe145 makebuildserver: add Gradle 4.3.1 2017-11-14 10:36:12 +03:00