1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-20 13:50:12 +01:00

Merge branch 'bookworm' into 'master'

Upgrade build server images to Bookworm

See merge request fdroid/fdroidserver!1439
This commit is contained in:
Hans-Christoph Steiner 2024-03-14 12:26:14 +00:00
commit f003492574
10 changed files with 51 additions and 49 deletions

View File

@ -199,7 +199,7 @@ arch_pip_install:
# The gradlew-fdroid tests are isolated from the rest of the test # The gradlew-fdroid tests are isolated from the rest of the test
# suite, so they run as their own job. # suite, so they run as their own job.
gradlew-fdroid: gradlew-fdroid:
image: debian:bullseye-slim image: debian:bookworm-slim
<<: *apt-template <<: *apt-template
only: only:
changes: changes:
@ -371,7 +371,7 @@ macOS:
gradle: gradle:
image: debian:bullseye image: debian:bookworm-slim
<<: *apt-template <<: *apt-template
variables: variables:
GIT_DEPTH: 1000 GIT_DEPTH: 1000
@ -469,7 +469,7 @@ fdroid build:
# fdroiddata because that one is known to work, and this is a CI job, # fdroiddata because that one is known to work, and this is a CI job,
# so it should be isolated from the normal churn of fdroiddata. # so it should be isolated from the normal churn of fdroiddata.
plugin_fetchsrclibs: plugin_fetchsrclibs:
image: debian:bullseye image: debian:bookworm-slim
<<: *apt-template <<: *apt-template
only: only:
changes: changes:
@ -513,7 +513,7 @@ plugin_fetchsrclibs:
# test a full update and deploy cycle to gitlab.com # test a full update and deploy cycle to gitlab.com
servergitmirrors: servergitmirrors:
image: debian:bullseye-backports image: debian:bookworm-slim
<<: *apt-template <<: *apt-template
only: only:
- master@fdroid/fdroidserver - master@fdroid/fdroidserver
@ -534,7 +534,7 @@ servergitmirrors:
python3-venv python3-venv
rsync rsync
wget wget
- apt-get install -t bullseye-backports apksigner - apt-get install apksigner
- python3 -m venv --system-site-packages env - python3 -m venv --system-site-packages env
- . env/bin/activate - . env/bin/activate
- export PYTHONPATH=`pwd` - export PYTHONPATH=`pwd`
@ -557,7 +557,7 @@ servergitmirrors:
- diff repo/index-v1.jar index-v1.jar - diff repo/index-v1.jar index-v1.jar
Build documentation: Build documentation:
image: debian:bookworm image: debian:bookworm-slim
<<: *apt-template <<: *apt-template
script: script:
- apt-get install make python3-sphinx python3-numpydoc python3-pydata-sphinx-theme pydocstyle fdroidserver - apt-get install make python3-sphinx python3-numpydoc python3-pydata-sphinx-theme pydocstyle fdroidserver
@ -658,7 +658,7 @@ docker:
- cd buildserver - cd buildserver
- docker build -t $TEST_IMAGE --build-arg GIT_REV_PARSE_HEAD=$(git rev-parse HEAD) . - docker build -t $TEST_IMAGE --build-arg GIT_REV_PARSE_HEAD=$(git rev-parse HEAD) .
- docker tag $TEST_IMAGE $RELEASE_IMAGE - docker tag $TEST_IMAGE $RELEASE_IMAGE
- docker tag $TEST_IMAGE ${RELEASE_IMAGE}-bullseye - docker tag $TEST_IMAGE ${RELEASE_IMAGE}-bookworm
- echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com - echo $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin registry.gitlab.com
# This avoids filling up gitlab.com free tier accounts with unused docker images. # This avoids filling up gitlab.com free tier accounts with unused docker images.
- if test -z "$FDROID_PUSH_DOCKER_IMAGE"; then - if test -z "$FDROID_PUSH_DOCKER_IMAGE"; then
@ -668,4 +668,4 @@ docker:
exit 0; exit 0;
fi fi
- docker push $RELEASE_IMAGE - docker push $RELEASE_IMAGE
- docker push $RELEASE_IMAGE-bullseye - docker push $RELEASE_IMAGE-bookworm

View File

@ -1,5 +1,5 @@
FROM debian:bullseye FROM debian:bookworm
ENV LANG=C.UTF-8 \ ENV LANG=C.UTF-8 \
DEBIAN_FRONTEND=noninteractive DEBIAN_FRONTEND=noninteractive
@ -41,7 +41,7 @@ RUN printf "path-exclude=/usr/share/locale/*\npath-exclude=/usr/share/man/*\npat
&& mkdir -p /usr/share/man/man1 \ && mkdir -p /usr/share/man/man1 \
&& apt-get update \ && apt-get update \
&& apt-get install ca-certificates \ && apt-get install ca-certificates \
&& sed -i 's,http:,https:,' /etc/apt/sources.list \ && sed -i 's,http:,https:,' /etc/apt/sources.list.d/debian.sources \
&& apt-get upgrade \ && apt-get upgrade \
&& apt-get dist-upgrade \ && apt-get dist-upgrade \
&& apt-get install openssh-client iproute2 python3 openssh-server sudo \ && apt-get install openssh-client iproute2 python3 openssh-server sudo \

View File

@ -35,7 +35,7 @@ Vagrant.configure("2") do |config|
config.cache.enable :chef config.cache.enable :chef
end end
config.vm.box = "fdroid/bullseye64" config.vm.box = "debian/bookworm64"
if not configfile.has_key? "vm_provider" or configfile["vm_provider"] == "virtualbox" if not configfile.has_key? "vm_provider" or configfile["vm_provider"] == "virtualbox"
# default to VirtualBox if not set # default to VirtualBox if not set
@ -53,6 +53,8 @@ Vagrant.configure("2") do |config|
libvirt.uri = "qemu:///system" libvirt.uri = "qemu:///system"
libvirt.cpus = configfile["cpus"] libvirt.cpus = configfile["cpus"]
libvirt.memory = configfile["memory"] libvirt.memory = configfile["memory"]
# Debian Vagrant image is only 20G, so allocate more
libvirt.machine_virtual_size = 1024
if configfile.has_key? "libvirt_disk_bus" if configfile.has_key? "libvirt_disk_bus"
libvirt.disk_bus = configfile["libvirt_disk_bus"] libvirt.disk_bus = configfile["libvirt_disk_bus"]
end end
@ -86,6 +88,12 @@ Vagrant.configure("2") do |config|
# necessary with 9p synced folders # necessary with 9p synced folders
Dir.mkdir('cache') unless File.exists?('cache') Dir.mkdir('cache') unless File.exists?('cache')
# Root partition needs to be resized to the new allocated space
config.vm.provision "shell", inline: <<-SHELL
growpart -v -u auto /dev/vda 1
resize2fs /dev/vda1
SHELL
config.vm.provision "shell", name: "setup-env-vars", path: "setup-env-vars", config.vm.provision "shell", name: "setup-env-vars", path: "setup-env-vars",
args: ["/opt/android-sdk"] args: ["/opt/android-sdk"]
config.vm.provision "shell", name: "apt-get-install", path: "provision-apt-get-install", config.vm.provision "shell", name: "apt-get-install", path: "provision-apt-get-install",

View File

@ -39,28 +39,29 @@ if echo $debian_mirror | grep '^https' 2>&1 > /dev/null; then
fi fi
cat << EOF > /etc/apt/sources.list cat << EOF > /etc/apt/sources.list
deb ${debian_mirror} bullseye main deb ${debian_mirror} bookworm main
deb https://security.debian.org/debian-security bullseye-security main deb https://security.debian.org/debian-security bookworm-security main
deb ${debian_mirror} bullseye-updates main deb ${debian_mirror} bookworm-updates main
EOF EOF
echo "deb ${debian_mirror} bullseye-backports main" > /etc/apt/sources.list.d/backports.list echo "deb ${debian_mirror} bookworm-backports main" > /etc/apt/sources.list.d/backports.list
apt-get update || apt-get update apt-get update || apt-get update
# purge things that might come from the base box, but we don't want # purge things that might come from the base box, but we don't want
# https://salsa.debian.org/cloud-team/debian-vagrant-images/-/tree/master/config_space/package_config # https://salsa.debian.org/cloud-team/debian-vagrant-images/-/tree/master/config_space/package_config
# cat config_space/package_config/* | sort -u | grep -v '[A-Z#]' # cat config_space/package_config/* | sort -u | grep -v '[A-Z#]'
purge=" purge="
apt-listchanges apt-listchanges
apt-utils apt-utils
bash-completion bash-completion
bind9-* bind9-*
bsdextrautils bsdextrautils
build-essential
bzip2 bzip2
chrony chrony
cloud-utils cloud-utils
cron cron
cron-daemon-common
dbus dbus
debconf-i18n debconf-i18n
debian-faq debian-faq
@ -69,6 +70,7 @@ purge="
fdisk fdisk
file file
groff-base groff-base
inetutils-telnet
krb5-locales krb5-locales
less less
locales locales
@ -82,14 +84,13 @@ purge="
reportbug reportbug
rsyslog rsyslog
tasksel tasksel
telnet
traceroute traceroute
unattended-upgrades unattended-upgrades
usrmerge
vim-* vim-*
wamerican wamerican
wget wget
whiptail whiptail
xxd
xz-utils xz-utils
" "
# clean up files packages to be purged, then purge the packages # clean up files packages to be purged, then purge the packages
@ -106,6 +107,7 @@ packages="
apksigner apksigner
default-jdk-headless default-jdk-headless
default-jre-headless default-jre-headless
curl
dexdump dexdump
fdroidserver fdroidserver
git-svn git-svn
@ -116,6 +118,7 @@ packages="
rsync rsync
sdkmanager sdkmanager
sudo sudo
unzip
" "
apt-get install $packages --download-only apt-get install $packages --download-only

View File

@ -617,19 +617,23 @@ def checkupdates_app(app: metadata.App) -> None:
if not gotcur: if not gotcur:
newbuilds = copy.deepcopy(builds[-len(vercodes):]) newbuilds = copy.deepcopy(builds[-len(vercodes):])
bullseye_blocklist = [ # These are either built-in or invalid in newer system versions
bookworm_blocklist = [
'apt-get install -y openjdk-11-jdk', 'apt-get install -y openjdk-11-jdk',
'apt-get install openjdk-11-jdk-headless', 'apt-get install openjdk-11-jdk-headless',
'apt-get install -y openjdk-11-jdk-headless', 'apt-get install -y openjdk-11-jdk-headless',
'apt-get install -t stretch-backports openjdk-11-jdk-headless openjdk-11-jre-headless', 'apt-get install -t stretch-backports openjdk-11-jdk-headless openjdk-11-jre-headless',
'apt-get install -y -t stretch-backports openjdk-11-jdk-headless openjdk-11-jre-headless', 'apt-get install -y -t stretch-backports openjdk-11-jdk-headless openjdk-11-jre-headless',
'apt-get install -y openjdk-17-jdk',
'apt-get install openjdk-17-jdk-headless',
'apt-get install -y openjdk-17-jdk-headless',
'update-alternatives --auto java', 'update-alternatives --auto java',
] ]
for build in newbuilds: for build in newbuilds:
if "sudo" in build: if "sudo" in build:
if any("openjdk-11" in line for line in build["sudo"]): if any("openjdk-11" in line for line in build["sudo"]) or any("openjdk-17" in line for line in build["sudo"]):
build["sudo"] = [line for line in build["sudo"] if line not in bullseye_blocklist] build["sudo"] = [line for line in build["sudo"] if line not in bookworm_blocklist]
if build["sudo"] == ['apt-get update']: if build["sudo"] == ['apt-get update']:
build["sudo"] = '' build["sudo"] = ''

View File

@ -215,7 +215,7 @@ contains() {
# (key) should accept. plugin versions are actually prefixes and catch sub- # (key) should accept. plugin versions are actually prefixes and catch sub-
# versions as well. Pairs are taken from: # versions as well. Pairs are taken from:
# https://developer.android.com/studio/releases/gradle-plugin#updating-gradle # https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
d_gradle_plugin_ver_k=(8.4 8.3 8.2 8.1 8.0 7.4 7.3 7.2.0 7.1 7.0 4.2 4.1 4.0 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.3 2.2 2.1.3 2.1 2.0 1.5 1.3 1.2 1.1 1.0 0.14 0.13 0.12 0.11 0.10 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2) d_gradle_plugin_ver_k=(8.4 8.3 8.2 8.1 8.0 7.4 7.3 7.2.0 7.1 7.0 4.2 4.1 4.0 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.3 2.2 2.1.3 2.1 2.0)
d_plugin_min_gradle_v=(8.6 8.4 8.2 8.0 8.0 7.5 7.4 7.3.3 7.2 7.0.2 6.7.1 6.5 6.1.1 5.6.4 5.4.1 5.1.1 4.10.1 4.6 4.4 4.1 3.3 2.14.1 2.14.1 2.12 2.12 2.4 2.4 2.3 2.2.1 2.2.1 2.1 2.1 1.12 1.12 1.12 1.11 1.10 1.9 1.8 1.6 1.6 1.4 1.4) d_plugin_min_gradle_v=(8.6 8.4 8.2 8.0 8.0 7.5 7.4 7.3.3 7.2 7.0.2 6.7.1 6.5 6.1.1 5.6.4 5.4.1 5.1.1 4.10.1 4.6 4.4 4.1 3.3 2.14.1 2.14.1 2.12 2.12 2.4 2.4 2.3 2.2.1 2.2.1 2.1 2.1 1.12 1.12 1.12 1.11 1.10 1.9 1.8 1.6 1.6 1.4 1.4)
# All gradle versions we know about # All gradle versions we know about

View File

@ -47,35 +47,22 @@ logging.basicConfig(format=logformat, level=loglevel)
tail = None tail = None
BASEBOX_DEFAULT = 'fdroid/bullseye64' BASEBOX_DEFAULT = 'debian/bookworm64'
BASEBOX_VERSION_DEFAULT = "11.20221010.1" BASEBOX_VERSION_DEFAULT = "12.20231211.1"
BASEBOX_CHECKSUMS = { BASEBOX_CHECKSUMS = {
"11.20221010.1": { "12.20231211.1": {
"libvirt": { "libvirt": {
"box.img": "c2114aa276c176fa65b8072f5dcd1e8a6ab9f7d15fd5da791727a0164fd43254", "box.img": "80b048312c423b7fbbbac934c348f9a29bdf2f98fae96dd13b3af70ddfe7f12a",
"Vagrantfile": "f9c6fcbb47a4d0d33eb066859c8e87efd642287a638bd7da69a9e7a6f25fec47", "Vagrantfile": "f9c6fcbb47a4d0d33eb066859c8e87efd642287a638bd7da69a9e7a6f25fec47",
"metadata.json": "42b96a01106c25f3a222ddad0baead0b811cc64926f924fb836bbfa43580e646", "metadata.json": "9d717678c19bb81d077e4e7eeb3602c168b6568cc38fee8fd3aa9d8f3cfe639b",
}, },
"virtualbox": { "virtualbox": {
"box.ovf": "5e4de5f1f4b481b2c1917c0b2f6e6334f4741cc18c5b278e3bafb094535ff2cb", "box.ovf": "8ad49ba600fbd1027e35c8fd41d37383c04bad30fdbafa860a29911d207a3e7b",
"box.vmdk": "737053bc886037ae76bb38a1776eba2a5579d49423de990e93ef4a3f0cab4f1c", "box.vmdk": "57602a776860805e82bd3f61cdca9711f39781011db0f8f1dee9b2a614b2c889",
"Vagrantfile": "0bbc2ae97668d8da27ab97b766752dcd0bf9e41900e21057de15a58ee7fae47d", "Vagrantfile": "0bbc2ae97668d8da27ab97b766752dcd0bf9e41900e21057de15a58ee7fae47d",
"metadata.json": "ffdaa989f2f6932cd8042e1102371f405cc7ad38e324210a1326192e4689e83a", "metadata.json": "ffdaa989f2f6932cd8042e1102371f405cc7ad38e324210a1326192e4689e83a",
} }
}, },
'11.20220317.1': {
'libvirt': {
'box.img': 'fbde152a2f61d191983be9d1dbeae2591af32cca1ec27daa342485d97187515e',
'metadata.json': '42b96a01106c25f3a222ddad0baead0b811cc64926f924fb836bbfa43580e646',
'Vagrantfile': 'f9c6fcbb47a4d0d33eb066859c8e87efd642287a638bd7da69a9e7a6f25fec47',
},
'virtualbox': {
'box.ovf': 'becd5cea2666d42e12def13a91766aa0d4b0e8e6f53102486c2a6cdb4e401b08',
'box.vmdk': '49c96a58a3ee99681d348075864a290c60a8d334fddd21be453c825fcee75eda',
'metadata.json': 'ffdaa989f2f6932cd8042e1102371f405cc7ad38e324210a1326192e4689e83a',
'Vagrantfile': '0bbc2ae97668d8da27ab97b766752dcd0bf9e41900e21057de15a58ee7fae47d',
}
},
} }
configfile = 'buildserver/Vagrantfile.yaml' configfile = 'buildserver/Vagrantfile.yaml'

View File

@ -56,7 +56,7 @@ run_test osmandapp/osmand 2.2.1
cd $tmpdir cd $tmpdir
mkdir -p download_cache_test/gradle/wrapper mkdir -p download_cache_test/gradle/wrapper
cd download_cache_test cd download_cache_test
echo 'distributionUrl=https\://services.gradle.org/distributions/gradle-0.7-bin.zip' \ echo 'distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip' \
> gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties
printf "task helloWorld {\n\tdoLast {\n\t\tprintln '$TEST_VALUE'\n\t}\n}" > build.gradle printf "task helloWorld {\n\tdoLast {\n\t\tprintln '$TEST_VALUE'\n\t}\n}" > build.gradle
@ -65,11 +65,11 @@ mkdir -p $GRADLE_VERSION_DIR
unset https_proxy unset https_proxy
printf "download, unpack, and run: " printf "download, unpack, and run: "
download_cache_test 0.7 download_cache_test 7.3
printf "unpack and run: " printf "unpack and run: "
rm -rf $GRADLE_VERSION_DIR/0.7/ rm -rf $GRADLE_VERSION_DIR/7.3/
download_cache_test 0.7 download_cache_test 7.3
printf "just run: " printf "just run: "
download_cache_test 0.7 download_cache_test 7.3
exit $exit_value exit $exit_value

View File

@ -53,7 +53,7 @@ Builds:
subdir: addons/languages/dutch subdir: addons/languages/dutch
sudo: sudo:
- apt-get update || apt-get update - apt-get update || apt-get update
- apt-get install -t stretch-backports openjdk-11-jdk-headless openjdk-11-jre-headless - apt-get install -t bullseye openjdk-11-jdk-headless openjdk-11-jre-headless
- update-alternatives --auto java - update-alternatives --auto java
gradle: gradle:
- yes - yes

View File

@ -499,7 +499,7 @@ Builds:
subdir: ime/app subdir: ime/app
sudo: sudo:
- apt-get update || apt-get update - apt-get update || apt-get update
- apt-get install -t stretch-backports openjdk-11-jdk-headless openjdk-11-jre-headless - apt-get install -t bullseye openjdk-11-jdk-headless openjdk-11-jre-headless
- update-alternatives --auto java - update-alternatives --auto java
gradle: gradle:
- yes - yes