Commit Graph

370 Commits

Author SHA1 Message Date
proletarius101 1bd35fc37f
upgrade basebox to 12.20231211.1 2024-03-14 13:14:41 +01:00
Licaon_Kter 5dc327e867
add missed file 2024-03-14 13:14:40 +01:00
Hans-Christoph Steiner 9749b26baa pylint: Reenable C0201 consider-iterating-dictionary
* C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
2023-03-20 16:33:16 +01:00
FestplattenSchnitzel a4c1ca48ad pylint: Reenable R1722 consider-using-sys-exit
* R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
2023-03-20 16:33:16 +01:00
Jochen Sprickerhof 629b2650d0 makebuildserver: make sure config is a dict
yaml.safe_load returns None for an empty file.
2023-02-08 21:17:12 +00:00
Adam Novak a15fc28982 Point user to Vagrant log if build server failed to build 2022-11-16 12:22:40 +01:00
Hans-Christoph Steiner c1342ab9d6 stop pre-installing the ndk 2022-11-15 13:25:19 +00:00
Hans-Christoph Steiner e395cd4f79
makebuildserver: delete unused libvirt image after process is complete
This process creates three copies of the buildserver image, all of which
are large.  So deleting the unused one is quite helpful:

```
-rw-r--r-- 1 fdroid       fdroid       20G  8. Nov 15:22 /home/fdroid/.vagrant.d/boxes/buildserver/0/libvirt/box.img
-rw------- 1 root         root         19G  8. Nov 14:07 /var/lib/libvirt/images/buildserver_default.img
-rwxr--r-- 1 libvirt-qemu libvirt-qemu 20G  8. Nov 16:08 /var/lib/libvirt/images/buildserver_vagrant_box_image_0_box.img
```
2022-11-09 18:40:26 +01:00
Hans-Christoph Steiner 6ec7e05c76
makebuildserver: stop trying to write to Vagrantfile.yaml
If Vagrantfile.yaml exists, makebuildserver should no longer try to write
to it.  It is now manully managed now that makebuildserver.config.py no
longer exists.  Also, now that the buildserver is smaller, the workflow is
to always destroy and recreate it rather than ever try to reprovision it.
2022-11-04 11:33:55 +01:00
Hans-Christoph Steiner abf535aabe
buildserver: move config to buildserver/Vagrantfile.yaml 2022-11-03 13:27:16 +01:00
Hans-Christoph Steiner e2fcd633fc
buildserver: hard code basebox name and version
This is not user-configurable, so it should not be setup to be.  This
process is only tested on the one basebox, and devs can just edit
Vagrantfile directly to test other base boxes.

# Conflicts:
#	makebuildserver
2022-11-03 13:27:15 +01:00
Hans-Christoph Steiner abdd02f33a
makebuildserver: move copy_caches_from_host to command line flag 2022-11-03 13:27:13 +01:00
Hans-Christoph Steiner 21ea1c1c89
makebuildserver: purge apt_package_cache feature
This is unmaintained, lightly used, a tangled mess, and can be replaced by
things like the vagrant-cachier plugin or #418
2022-11-03 13:27:11 +01:00
Hans-Christoph Steiner 6c5ffdc428
buildserver: clean up secondary libvirt box image after rebuild
Boxes are stored in two places when using vagrant-libvirt:

 1. `vagrant box add` -> ~/.vagrant.d/boxes/buildserver/0/libvirt/
 2. `vagrant up` -> /var/lib/libvirt/images/buildserver_vagrant_box_image_0_box.img

If the second box is not cleaned up, then `fdroid build` will continue
to use the one from the second location, thereby ignoring the updated
one at the first location.  This keeps the second one around until the
new box is ready in case `fdroid build` is using it while this script
is running.
2022-11-03 12:58:58 +01:00
Hans-Christoph Steiner 1e2e82fbde
makebuildserver: use HTTPS in default debian apt source 2022-10-20 17:42:50 +02:00
Hans-Christoph Steiner b4d25d2834 makebuildserver: use `vagrant package`; purge custom code
Years ago, vagrant-libvirt did not implement the `vagrant package` command
that we needed, and there were no Ruby people around to implement it for us.
So we hacked a custom version in our Python wrapper.  Now, vagrant-libvirt
v0.7.0 does implement it, so this switches things to just using
`vagrant package`
2022-10-13 13:56:56 +00:00
Hans-Christoph Steiner daa5ad152e buildserver: install default SDK packages using fdroid/sdkmanager
fdroid/sdkmanager provides a root of trust to verify all the packages it
downloads, so it fully replaces what makebuildserver was doing.

closes #927
2022-10-12 20:57:55 +02:00
Hans-Christoph Steiner e4f1066bb1 stop installing ancient plaforms: 2.1 (7), 2.2 (8), 2.3 (9)
fdroid/sdkmanager has bugs with some of these, and some of these have been
taken down. https://dl.google.com/android/repository/android-2.3_r01-linux.zip
gives a 404.
2022-10-12 20:57:55 +02:00
Hans-Christoph Steiner 1d710947b9 buildserver: stop installing 'android;m2repository' by default
It is a huge package, it is rarely used, its not supported by
fdroid/sdkmanager yet, and it is a pain to manage the install.  If this
breaks any app builds, the package can be installed as part of the build
metadata.
2022-10-12 20:57:55 +02:00
Hans-Christoph Steiner 4e839ac63b switch to latest vagrant boxes 2022-10-10 21:22:59 +02:00
Jochen Sprickerhof b4f8ab289d Use yaml.safe_* 2022-10-10 21:22:59 +02:00
FestplattenSchnitzel df46eb86c3 Upgrade Buildserver VM
Use Vagrant boxes built with cloud-team/debian-vagrant-images instead of fdroid/basebox,
Use Debian Bullseye (11) instead of Debian Stretch (9)
2022-10-10 21:22:59 +02:00
Jochen Sprickerhof cf0100cf11
Merge comparisons with 'in' 2022-09-05 17:14:51 +02:00
Jochen Sprickerhof eb79522a36 Fix flake8 E275 missing whitespace after keyword 2022-07-31 09:48:14 +02:00
linsui 5472cf88b8 Update preinstalled NDK to r23c 2022-06-14 11:03:42 +00:00
Licaon_Kter e678df14ce
buildserver: remove old LTS NDK and only pre-install current LTS 2022-04-26 10:25:31 +02:00
linsui 3f62e0ebde update preinstalled ndk to r23b 2022-02-10 16:47:03 +08:00
Hans-Christoph Steiner 57447f18e1
buildserver: move buildserverid to provisioner
In order to support Docker, this should be able to operate without ssh,
e.g. using vagrant-communicator-docker.  This removes the buildserverid
hack and makes it a provisioner shell script.
2022-01-11 11:23:36 +01:00
linsui 576ca7ad13 Add build-tools;31.0.0 and platforms;android-31 2021-07-22 19:26:32 +08:00
Michael Pöhn af088c9c91 add checksums for basebox 0.6.1 2021-05-28 08:55:43 +00:00
Hans-Christoph Steiner 6eb895a700
makebuilserver: only install most recent two releases 2021-05-28 10:24:53 +02:00
Hans-Christoph Steiner 7a1d236c8d
only support zipballs in NDK provisioning
Since I discovered there is an r10e zipball, this can now get all NDKs
in zipball form.
fdroid/android-sdk-transparency-log@447fea86e7

closes #902
2021-05-28 09:13:36 +02:00
Hans-Christoph Steiner ec2cace222
buildserver: trim pre-installed NDK list down to the bare minimum
This keeps the Long Term Support release and the latest release installed.
r10e was kept in because it needs a special extraction method, since it is
a .bin file, not a .zip.  r12b is kept in because it is the old default.
Here is a survey of the NDK versions used in the most recent Builds entry
in each app that uses the NDK:

{'r10e': 6,
 'r12b': 93,
 'r13b': 4,
 'r14b': 5,
 'r15c': 7,
 'r16b': 14,
 'r17b': 4,
 'r17c': 7,
 'r18b': 9,
 'r19c': 17,
 'r20': 1,
 'r20b': 22,
 'r21': 3,
 'r21d': 56,
 'r21e': 65,
 'r22': 9,
 'r22b': 15,
 'r9b': 1}

#517


import glob
import os
import yaml

try:
    from yaml import CSafeLoader as SafeLoader
except ImportError:
    from yaml import SafeLoader

ndks = dict()
for f in glob.glob('metadata/*.yml'):
    with open(f) as fp:
        app = yaml.load(fp, Loader=SafeLoader)
        if app.get('Disable'):
            continue
        build = app.get('Builds', [])[-1]
        if build.get('disabled'):
            continue
        ndk = build.get('ndk')
        if ndk and ndk[1] == '9':
            print(f, build)
        elif ndk and int(ndk[2:3]) < 18:
            print(f, build)
        if ndk:
            print(f, ndk)
            if ndk not in ndks:
                ndks[ndk] = 0
            ndks[ndk] += 1

import pprint

pprint.pprint(ndks)
2021-05-25 17:06:28 +02:00
fdroid-bot 927aa95cd8 gradle v7.0.2 2021-05-17 16:59:55 +00:00
fdroid-bot e0f825d636 gradle v7.0.1 2021-05-13 12:02:17 +00:00
fdroid-bot 0298eef46f gradle v7.0 2021-04-12 07:15:28 +00:00
relan 6d9410597b Upgrade NDK r22 to r22b 2021-04-07 12:12:04 +03:00
Hans-Christoph Steiner fc368dc291 makebuildserver: print message before rsyncing caches
This process can take a very long time if the caches are large, so at least
print something about what it is doing.
2021-03-15 10:29:08 +01:00
Hans-Christoph Steiner 4b05854ffc buildserver: only install the latest gradle version
gradle checksums are now handled by gradlew-fdroid

refs #370 #517 #737
2021-03-11 08:40:34 +01:00
Licaon_Kter d683a40f96 Add NDK 21e 2021-03-10 16:36:14 +02:00
Felix C. Stegerman 7fa7270589 fix "vritualbox" typo in BASEBOX_CHECKSUMS 2021-03-09 12:42:43 +00:00
fdroid-bot 898b5dbb4a gradle v6.8.3 2021-03-01 21:34:31 +00:00
fdroid-bot 59a4ec79b3 gradle v6.8.2 2021-02-08 10:42:22 +00:00
fdroid-bot d89dea63c3 gradle v6.8.1 2021-01-25 10:36:37 +00:00
Licaon_Kter 67ae164293 Gradle 6.8 2021-01-11 14:10:52 +02:00
TacoTheDank c88a3f56a1 Update NDK to r22 and add buildtools 30.0.3 2020-12-26 19:51:22 -05:00
Hans-Christoph Steiner 2cca336a29
add gradle 6.7.1 2020-11-27 11:35:18 +01:00
Leonhard Künzler ce46978099 Add platform 30 2020-11-09 11:23:40 +01:00
Marcus Hoffmann 7fbf08fbbe add gradle 6.7 2020-10-14 22:41:27 +02:00
Licaon_Kter de9e0f4fc3 build-tools 30.0.2 2020-09-16 15:58:50 +03:00