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

4401 Commits

Author SHA1 Message Date
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
huss
261fde8ac7 Add buildserver lxml requirement for pEp 2016-08-28 12:47:12 +00:00
Daniel Martí
b92ee2b5c6 Merge branch 'fix-push-requests' into 'master'
Fix push requests

Two bug fixes found in the process of implementing the client side of the push requests in https://gitlab.com/fdroid/fdroidclient/merge_requests/386

This is related to !156.

See merge request !160
2016-08-26 22:26:17 +00:00
Hans-Christoph Steiner
c98ce54991 make build reproducible by fixing sort order in docs
From Debian https://bugs.debian.org/835463
 Description: Make the build reproducible
 Author: Chris Lamb <lamby@debian.org>
 Last-Update: 2016-08-26
2016-08-26 13:41:14 +02:00
Hans-Christoph Steiner
6126b55136 rename server request from "delete" to "uninstall"
This matches the Android API's current Intent action for this, rather than
the deprecated one:

https://gitlab.com/fdroid/fdroidclient/blob/v0.101-alpha5/app/src/main/java/org/fdroid/fdroid/installer/DefaultInstallerActivity.java#L147
https://developer.android.com/reference/android/content/Intent.html#ACTION_UNINSTALL_PACKAGE
https://developer.android.com/reference/android/content/Intent.html#ACTION_DELETE
2016-08-24 23:05:34 +02:00
Hans-Christoph Steiner
a6a8d34528 sanitize mirror URLs to prevent path segments from being removed
urllib.parse.urljoin() will strip off the last path segment before joining
if that last path segment does not end with /.  That's a "feature" to make
it easy to replace file names.  Here it was stripping off the essential
'fdroid' segment, making URLs like:

https://foo.com/repo

when they should be

https://foo.com/fdroid/repo
2016-08-24 23:05:34 +02:00
Daniel Martí
1c49c3af1d Merge branch 'ci-bump' into 'master'
CI: bump docker image



See merge request !159
2016-08-22 09:25:19 +00:00