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

4357 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
764b99acd6 buildserver: only auto-detect KVM in ./makebuildserver
Having a second, different KVM auto-detect routine in Vagrantfile will only
confuse things.  This also removes the direct call to the systemd utility.
2016-09-28 10:16:30 +02:00
Hans-Christoph Steiner
1b09ab5a79 buildserver: run dir check as very first thing
No point in running any other code if the script is just going to bail
out with an error.  This assumes that ./makebuildserver is only ever
run from a git clone of fdroidserver.git.
2016-09-28 09:52:49 +02:00
Hans-Christoph Steiner
a3d32c65a4 buildserver: use py3's pathlib to generate cache file URL
This should handle edge cases better, like odd characters in the path, etc.
2016-09-28 09:52:49 +02:00
Hans-Christoph Steiner
97be5a1d00 jenkins-build-makebuildserver: remove errant blank line 2016-09-28 09:52:49 +02:00
Hans-Christoph Steiner
84500b0049 Merge branch 'master' into 'master'
Add qt sdk support

Qt SDK extraction on the VM

See merge request !172
2016-09-27 12:54:02 +00:00
est31
91c5fb567a Add qt sdk support 2016-09-27 14:36:12 +02:00
Ciaran Gultnieks
d3a215c12b Merge branch 'checkupdates-crash' into 'master'
checkupdates: avoid crash with --auto and None CVC

As reported by @CiaranG.

See merge request !173
2016-09-26 21:46:16 +00:00
Daniel Martí
bcd31401ac checkupdates: avoid crash with --auto and None CVC
Reproducible via `fdroid checkupdates --auto subreddit.android.appstore`
at fdroiddata HEAD (e76449ab).

WARNING: ...subreddit.android.appstore : Couldn't find package ID
CRITICAL: Unknown exception found!
Traceback (most recent call last):
  File "/home/mvdan/.bin/fdroid", line 147, in <module>
    main()
  File "/home/mvdan/.bin/fdroid", line 124, in main
    mod.main()
  File "/home/mvdan/git/fsr/fdroidserver/checkupdates.py", line 571, in main
    checkupdates_app(app)
  File "/home/mvdan/git/fsr/fdroidserver/checkupdates.py", line 469, in checkupdates_app
    if int(build.vercode) >= int(app.CurrentVersionCode):
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
2016-09-26 21:07:55 +01:00
Ciaran Gultnieks
7cbdaedf2e Merge branch 'fix-post-kvm' into 'master'
Fix post KVM

A couple of fixes to the KVM support that was just merged, as reported by @CiaranG

See merge request !171
2016-09-23 16:33:52 +00:00
Hans-Christoph Steiner
1001e5e9b9 buildserver: bochs can also be used with KVM
jenkins.debian.net is being detected as 'bochs' rather than 'qemu'.
2016-09-23 17:41:41 +02:00
Hans-Christoph Steiner
1e8fd01c1e buildserver: only check cache permissions when using libvirt
VirtualBox runs as the same user as `fdroid`, so the cache does not need to
be accessible by the world.  On libvirt, libvirtd runs the VMs as its own
user, so in that case, the cache dirs must have permissions to let that
user access them.
2016-09-23 15:20:05 +02:00
Hans-Christoph Steiner
f6a487eee4 buildserver: wipe snapshot from libvirt store on --clean 2016-09-23 15:06:41 +02:00
Ciaran Gultnieks
5667d16498 Merge branch 'buildserver-qemu-kvm' into 'master'
buildserver running in qemu/kvm to support KVM on KVM

jenkins.debian.net runs in QEMU/KVM instances, so in order to run the F-Droid buildserver there, it needs to work inside of a KVM guest.  The best way I found to do that is to create QEMU/KVM instances via KVM's "nested" virtualization support.  This collection of commits enables using QEMU/KVM as the buildserver when `./makebuildserver` detects that it is running inside of KVM.  Otherwise, the old behavior is default: running in VirtualBox.

I have run these tests inside of ubuntu/16.04 on bare metal, which uses VirtualBox, and ubuntu/16.04 KVM guest, which uses QEMU/KVM.  It'll also run on the Guardian Project jenkins box, which is Debian/jessie.

@mvdan @CiaranG @krt

See merge request !168
2016-09-23 12:25:12 +00:00
Hans-Christoph Steiner
1216125f6e Merge branch 'master' into 'master'
makebs: add gradle 3.1



See merge request !170
2016-09-23 06:36:58 +00:00
est31
56a0077183 makebs: add gradle 3.1 2016-09-23 07:50:52 +02:00
Daniel Martí
ee54fbc1b8 Merge branch 'vagrant' into 'master'
docs: update vagrant link

As pointed out in https://f-droid.org/forums/topic/documentation-bug-fix-report/#post-21839 , the link to the vagrant doc is 404. I'd assume that this is the correct link, but please verify this before merge.

See merge request !169
2016-09-20 16:19:08 +00:00
Boris Kraut
42031031e6 docs: update vagrant link 2016-09-20 11:38:12 +02:00
Hans-Christoph Steiner
a2a630c83c buildserver: only include latest m2 when provisioning
I think the `android update sdk` tool is installing all of the m2 files
that are present in the temp cache, and it seems to do it in order of
newest to oldest.  Well done, and I thought that tool couldn't get any
worse.  So only include the latest version of android_m2repository*.zip in
the temp cache.
2016-09-19 16:33:12 +02:00
Hans-Christoph Steiner
0a0ba6de84 buildserver: ensure dirs to mount cache exist in guest VM instance
It seems that the 9p synced folder setup is not as flexible and easy as the
VirtualBox one, so we have to do more little things like this.
2016-09-19 16:33:12 +02:00
Hans-Christoph Steiner
988647a387 buildserver: fix jenkins build to support QEMU/KVM 2016-09-19 16:33:12 +02:00
Hans-Christoph Steiner
3651e7eb9a buildserver: retry apt-get downloads 20 times
Try harder before failing the whole buildserver setup.
2016-09-19 16:33:12 +02:00
Hans-Christoph Steiner
68ec7c2e88 buildserver: auto-detect and use libvirt's QEMU+KVM
For running in QEMU/KVM guests like on jenkins.debian.net, this sets up the
whole process automatically.  This only really covers the case where this
is running in a KVM guest, and the original case of running VirtualBox on
bare metal.  It could be extended to cover more cases if someone wanted to.
2016-09-19 16:33:12 +02:00
Hans-Christoph Steiner
f306e32636 buildserver: make sure cachedir is accessible to VM instance
It seems that KVM/QEMU's 9p sharing is more sensitive to file perms.  If
~/.cache is 0700, then ~/.cache/fdroidserver cannot be mounted in the guest
2016-09-19 16:33:12 +02:00
Hans-Christoph Steiner
0ae2df6646 buildserver: support optionally using qemu+kvm
This makes it possible to run the full build process in a KVM virtual
machine, like jenkins.debian.net.

closes #190
2016-09-19 16:33:12 +02:00
Hans-Christoph Steiner
5af53238d3 buildserver: ignore android sdk repos of proprietary bits
The Android SDK by default includes some Google repositories of their
proprietary SDKs.  We of course do not want that stuff ever.  We also do
not need the emulator images since this process does not currently install
or run an emulator.
2016-09-19 16:33:12 +02:00
Hans-Christoph Steiner
b5e57a7aa6 example file for public read only S3 bucket policy
This is the locked down S3 policy as created by Benetech for their Secure
App Generator project.
2016-09-15 23:20:18 +02:00
Hans-Christoph Steiner
008b4a31eb skip fdroid import test if gitlab is not available
This prevents CI build failures when gitlab is deploying or has other
issues that might cause a 500.
2016-09-15 23:20:18 +02:00
Daniel Martí
89010a1ba5 Merge branch 'gradle-wrapper' into 'master'
Make the gradle wrapper smarter

@eighthave PTAL

This will help with issues like https://gitlab.com/fdroid/fdroiddata/issues/515

See merge request !166
2016-09-15 20:45:44 +00:00
Hans-Christoph Steiner
8fc27680cb Merge branch 'makebs-updates' into 'master'
Makebs updates



See merge request !167
2016-09-15 20:38:43 +00:00
Daniel Martí
8797cc01a8 makebs: bump support repo to 38 2016-09-15 20:07:25 +01:00
Daniel Martí
02c006a685 makebs: bump tools to 25.2.2 2016-09-15 20:07:16 +01:00
Daniel Martí
737dbc4f0a gradle: support gradle-wrapper.properties version
Brings our wrapper closer to gradlew's functionality.

Updates #98.
2016-09-15 19:16:38 +01:00
Daniel Martí
12653741cc gradle: delay calculating some versions
Simplifies the wrapper script.
2016-09-15 19:10:18 +01:00
Daniel Martí
071376b7f4 Merge branch 'control-errors-warnings' into 'master'
make metadata exceptions optional based on CLI flag

In many cases, there are times where metadata errors need to be ignored, or
at least not stop the command from running.  For example, there will
inevitably be new metadata fields added, in which case a packaged version
of fdroidserver will throw errors on each one.  This adds a standard -W
flag to customize the response: ignore, default, or error.

* by default, the errors are still errors
* `fdroid readmeta -W` will just print errors
* `fdroid readmeta -Wignore` will not even print errors

https://gitlab.com/fdroid/fdroidserver/issues/150

See merge request !164
2016-09-12 14:16:42 +00:00
Daniel Martí
352c1ff448 Merge branch 'buildserver-fixes-pre-kvm' into 'master'
buildserver fixes pre-KVM

This is a collection of little fixes to the buildserver setup that I did while implementing the QEMU+KVM support.  Since I was running the whole process repeatedly, I had opportunity to find and fix little things like this.

See merge request !165
2016-09-12 14:16:15 +00:00
Hans-Christoph Steiner
14de399bb7 buildserver: remove Kivy, unused since 2013 and out of date
This is the last thing using Chef, which adds a lot of time to the time it
takes to fully provision the buildserver.  This slows down development on
the things we are actually using, like running all builds on
jenkins.debian.net.

#210 #165
2016-09-12 14:58:08 +02:00
Hans-Christoph Steiner
91c1e8313f buildserver: download apt package first to increase reliability
This does not have the careful result rechecking that chef has, when it
installs each package in the list one at a time.  So to help with failures
caused by a package failing to download, first try downloading all the
package, then run the install.  The install pass will try to download any
missing packages.

Really, this should use ansible or perhaps chef again since those include
lots of tricks around this stuff.
2016-09-12 14:58:08 +02:00
Hans-Christoph Steiner
7b64bdcf0b buildserver: only specify lib*-dev to future proof package list
Using libssl-dev will work on all releases of Debian, but Debian/stretch
does not have libssl1.0.0.
2016-09-12 14:58:08 +02:00
Hans-Christoph Steiner
73947092fa buildserver: test build of Checkey and old F-Droid
The buildserver should still be able to build old versions of apps, and
Checkey is a verified, reproducible build.
2016-09-12 14:58:08 +02:00
Hans-Christoph Steiner
b717271c61 buildserver: force a known-good version of chef
This forces the release channel and version of chef-solo to install on the
guest VM.  I was getting really massive, odd stacktraces without specifying
this, and chef is only used for Kivy now anyway.
2016-09-12 14:58:08 +02:00
Hans-Christoph Steiner
dc2f53b48c buildserver: vagrant-cachier conflicts with custom apt cache
The technique where /var/cache/apt is mounted as a shared folder conflicts
with vagrant-cachier's workings.  Therefore, ignore vagrant-cachier if the
user selects ./makebuildserver's custom apt cache.  The shared folder way
has the advantage for CI builds of storing the cache outside of
VAGRANT_HOME, which is set to be in the git project.  That gets wiped by
`git clean -fdx` on each CI build.
2016-09-12 14:58:08 +02:00
Hans-Christoph Steiner
d522988d8c make metadata exceptions optional based on CLI flag
In many cases, there are times where metadata errors need to be ignored, or
at least not stop the command from running.  For example, there will
inevitably be new metadata fields added, in which case a packaged version
of fdroidserver will throw errors on each one.  This adds a standard -W
flag to customize the response: ignore, default, or error.

* by default, the errors are still errors
* `fdroid readmeta -W` will just print errors
* `fdroid readmeta -Wignore` will not even print errors

https://gitlab.com/fdroid/fdroidserver/issues/150
2016-09-12 12:55:48 +02:00
Daniel Martí
34f451361f Bump to 0.7.0 2016-09-11 11:52:11 +02:00
Daniel Martí
9f88bc6324 Merge branch 'updates' into 'master'
all: bump to build-tools 24.0.2

Update the docker image to include it there too.

See merge request !163
2016-09-10 10:06:44 +00:00
Daniel Martí
fd7a8c83c8 all: bump to build-tools 24.0.2
Update the docker image to include it there too.
2016-09-10 11:45:39 +02:00
Hans-Christoph Steiner
12d0fbf8c5 Merge branch 'buildserver-fixes' into 'master'
buildserver fixes

updates to the Android SDK packages used by `./makebuildserver`

See merge request !162
2016-09-05 08:48:49 +00:00
Hans-Christoph Steiner
91ceb5aff3 update to platform-24_r02 in ./makebuildserver 2016-08-30 19:48:07 +02:00
Hans-Christoph Steiner
d831ccab20 add build-tools_r24.0.2-linux.zip to ./makebuildserver 2016-08-30 19:17:30 +02:00
Hans-Christoph Steiner
bf1dff7986 new build-tools_r24.0.1.zip sha256, Google keeps changing it
I validated this versus the Google repository XML downloaded from two
separate paths from:
https://dl.google.com/android/repository/repository-12.xml

Using their SHA1:
84f18c392919a074fcbb9b1d967984e6b2fef8b4
2016-08-30 19:16:31 +02:00
Hans-Christoph Steiner
0bcd4f958b Merge branch 'patch-1' into 'master'
Add buildserver lxml requirement for pEp



See merge request !161
2016-08-30 16:09:10 +00:00