1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 02:50:12 +01:00
Commit Graph

6674 Commits

Author SHA1 Message Date
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
Marcus
1ae4bd77b2 Merge branch 'master' into 'master'
Changed setup.py +x for easy invocation

Closes #410

See merge request fdroid/fdroidserver!371
2017-11-14 01:38:19 +00:00
Benji Wiebe
3e20ed8590 Changed setup.py +x for easy invocation 2017-11-13 19:09:51 -06:00
Marcus
1fef00589a Merge branch 'build-tools_r26.0.3' into 'master'
makebuildserver: add build-tools_r26.0.3

See merge request fdroid/fdroidserver!369
2017-11-12 17:18:22 +00:00
relan
16465c7a17 makebuildserver: add build-tools_r26.0.3 2017-11-12 10:48:00 +03:00
relan
f7d09afe91 Merge branch 'master' into 'master'
makebuildserver: add build-tools_r27.0.1

See merge request fdroid/fdroidserver!368
2017-11-12 07:44:22 +00:00
Hans-Christoph Steiner
c89649057a jenkins: some reliability fixes to the test scripts 2017-11-10 22:08:51 +01:00
Sergey Eremin
0ec17495af makebuildserver: add build-tools_r27.0.1 2017-11-10 18:38:58 +03:00
Hans-Christoph Steiner
daa9635286 jenkins-test: ./run-tests won't work with only unsigned APKs 2017-11-10 09:30:02 +01:00
Hans-Christoph Steiner
d7a51fd058 README: add new jenkins.debian.net test 2017-11-09 15:02:37 +01:00
Hans-Christoph Steiner
cd3e763953 tests: only test fdroid build if the right build-tools is installed 2017-11-09 14:07:40 +01:00
Hans-Christoph Steiner
a14124955a tests: fix fdroid build test with Debian gradle 2017-11-09 13:11:49 +01:00
Hans-Christoph Steiner
2ee32f3524 fix tests to work when only Debian Android SDK is installed
jenkins.debian.net only had `apt install android-sdk`, it does not have any
of Google's packages installed.
2017-11-08 14:05:17 +01:00
Hans-Christoph Steiner
3d3050d04f jenkins-test: tame debug output to keep logs at a reasonable length 2017-11-08 14:05:17 +01:00
Hans-Christoph Steiner
9ade09349b update: improve help strings 2017-11-08 14:05:17 +01:00
Hans-Christoph Steiner
6bcdf6439b jenkins-test: ./run-tests needs ANDROID_HOME 2017-11-08 13:15:16 +01:00
Hans-Christoph Steiner
8cfc590b39 hooks: add new jenkins scripts to syntax checker 2017-11-08 12:40:18 +01:00
Hans-Christoph Steiner
e844c18d6e jenkins: make test script executable 2017-11-08 12:04:51 +01:00
Hans-Christoph Steiner
3a04ec91b7 jenkins: rename scripts based on jenkins.debian.net names
Make things self-documenting by reusing the exact same names everywhere.
2017-11-08 09:46:56 +01:00
Hans-Christoph Steiner
d347f3ebb2 jenkins: move tests to separate job
The setup and build_all jobs take a very long time to run, so its really
annoying when they are marked as failed just because one small thing in the
test suite failed.  So move the test suite to its own job that can be run
more frequently.
2017-11-08 09:46:56 +01:00
Hans-Christoph Steiner
dc23defb41 README: add Weblate badge for translation status 2017-11-08 09:46:56 +01:00
Hans-Christoph Steiner
1ad75f3258 jenkins-build-makebuildserver: bump cpus to 2 and memory to 6144
profitbricks-build7-amd64 has 8 gigs of RAM and 2 cores, so might as well
use them!
2017-11-07 16:25:16 +01:00
Hans-Christoph Steiner
f28016002f jenkins-build: clean / fix paths to buildserver base box setup
[skip ci]
2017-11-07 15:53:59 +01:00
Marcus
17cf121eec Merge branch 'build-tools_r27' into 'master'
makebuildserver: add build-tools_r27

See merge request fdroid/fdroidserver!367
2017-11-05 10:10:59 +00:00
relan
db65ef5ed3 makebuildserver: add build-tools_r27 2017-11-05 10:59:01 +03:00
Hans-Christoph Steiner
975fcea6b3 Merge branch 'vcs-info' into 'master'
build: raise VCS client version logging level

See merge request fdroid/fdroidserver!366
2017-11-03 13:16:13 +00:00
Hans-Christoph Steiner
ccccc0743f Merge branch 'gradle-4.3' into 'master'
makebuildserver: add Gradle 4.3

See merge request fdroid/fdroidserver!365
2017-11-03 13:15:11 +00:00
Hans-Christoph Steiner
7c3333ac02 Merge branch 'platform-27_r01' into 'master'
makebuildserver: add platform-27_r01

See merge request fdroid/fdroidserver!364
2017-11-03 13:14:16 +00:00
relan
cd8a86a2a2 build: raise VCS client version logging level
Debug logging is not saved in buildserver logs. Also move this line into
build.py's main() to avoid duplication: common.setup_vcs(app) may be
called from parse_metadata() too.
2017-11-02 08:52:02 +03:00
relan
86512d3655 makebuildserver: add Gradle 4.3 2017-10-31 17:19:57 +03:00