firejail/.gitlab-ci.yml
Kelvin M. Klann aa55949ca3
ci: upgrade debian:buster to debian:bullseye (#6832)
Instead of Debian 10, use Debian 11 in `build_debian_package`.

It currently fails to update the package index[1]:

    Executing "step_script" stage of the job script 00:01
    Using effective pull policy of [always] for container debian:buster
    Using docker image sha256:69530eaa9e7e18d0aad40c38b75a22b40c6ebdc374c059bd5f2eb07042caa50a for debian:buster with digest debian@sha256:58ce6f1271ae1c8a2006ff7d3e54e9874d839f573d8009c20154ad0f2fb0a225 ...
    $ apt-get update -qy
    Ign:1 http://deb.debian.org/debian buster InRelease
    Ign:2 http://deb.debian.org/debian-security buster/updates InRelease
    Ign:3 http://deb.debian.org/debian buster-updates InRelease
    Err:4 http://deb.debian.org/debian buster Release
      404  Not Found [IP: 151.101.2.132 80]
    Err:5 http://deb.debian.org/debian-security buster/updates Release
      404  Not Found [IP: 151.101.2.132 80]
    Err:6 http://deb.debian.org/debian buster-updates Release
      404  Not Found [IP: 151.101.2.132 80]
    Reading package lists...
    E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
    E: The repository 'http://deb.debian.org/debian-security buster/updates Release' does not have a Release file.
    E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
    Cleaning up project directory and file based variables 00:00
    ERROR: Job failed: exit code 1

Also, note that LTS support for Debian 10 ended on 2024-06-30, while
Debian 11 has LTS support until 2026-08-31[2].

See also commit 7b8ce3acf ("ci: upgrade debian:stretch to
debian:buster", 2023-04-25) / issue #5818.

[1] https://gitlab.com/Firejail/firejail_ci/-/jobs/10737624219
[2] https://wiki.debian.org/LTS
2025-07-19 07:04:53 +00:00

154 lines
5.1 KiB
YAML

# Builds on multiple systems using different package managers:
#
# - Debian-based systems: Use oldest working/supported debian image for
# reasonable backwards compatibility and ubuntu:rolling for new setups.
# Additionally, ensure that the package works without apparmor.
#
# - Redhat-based systems: Use a centos-like distribution for reasonable
# backwards compatibility and fedora:latest for new setups.
#
# - Alpine: Use it for installing directly from source.
build_ubuntu_package:
image: ubuntu:rolling
timeout: 10 minutes
variables:
DEBIAN_FRONTEND: noninteractive
script:
- apt-get update -qy
- >
apt-get install --no-install-recommends -qy
build-essential fakeroot lintian libapparmor-dev pkg-config gawk
| grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
- ./ci/printenv.sh
- ./configure || (cat config.log; exit 1)
- make dist
- ./mkdeb.sh --enable-fatal-warnings
- dpkg -i ./*.deb
- make installcheck
build_debian_package:
image: debian:bullseye
timeout: 10 minutes
variables:
DEBIAN_FRONTEND: noninteractive
script:
- apt-get update -qy
- >
apt-get install --no-install-recommends -qy
build-essential fakeroot lintian libapparmor-dev pkg-config gawk
| grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
- ./ci/printenv.sh
- ./configure || (cat config.log; exit 1)
- make dist
- ./mkdeb.sh --enable-fatal-warnings
- dpkg -i ./*.deb
- make installcheck
build_no_apparmor:
image: ubuntu:latest
timeout: 10 minutes
variables:
DEBIAN_FRONTEND: noninteractive
script:
- apt-get update -qy
- >
apt-get install --no-install-recommends -qy
build-essential fakeroot lintian pkg-config gawk
| grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
- ./ci/printenv.sh
- ./configure || (cat config.log; exit 1)
- make dist
- >
./mkdeb.sh --enable-fatal-warnings
--disable-apparmor
- dpkg -i ./*.deb
- make installcheck
- make installcheck | grep -F 'AppArmor support is disabled'
build_redhat_package:
image: almalinux:latest
timeout: 10 minutes
script:
- dnf update -y
- dnf install -y rpm-build gcc make
- ./ci/printenv.sh
- ./configure || (cat config.log; exit 1)
- make dist
- ./platform/rpm/mkrpm.sh --enable-fatal-warnings
- rpm -i ./*.rpm
- make installcheck
build_fedora_package:
image: fedora:latest
timeout: 10 minutes
script:
- dnf update -y
- dnf install -y rpm-build gcc make
- ./ci/printenv.sh
- ./configure || (cat config.log; exit 1)
- make dist
- ./platform/rpm/mkrpm.sh --enable-fatal-warnings
- rpm -i ./*.rpm
- make installcheck
# FIXME: Cannot build src/libtrace with musl (see #6610).
#build_src_package:
# image: alpine:latest
# timeout: 10 minutes
# script:
# - apk update
# - apk upgrade
# - apk add build-base linux-headers gawk
# - ./ci/printenv.sh
# # Note: Do not use ` --enable-fatal-warnings` because the build
# # currently produces warnings on Alpine (see #6224).
# - >
# ./configure --prefix=/usr
# || (cat config.log; exit 1)
# - make
# - make install-strip
# - make installcheck
debian_ci:
image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
timeout: 10 minutes
variables:
DEBFULLNAME: "$GITLAB_USER_NAME"
DEBEMAIL: "$GITLAB_USER_EMAIL"
DEBIAN_FRONTEND: noninteractive
PKGNAME: firejail
before_script:
- git checkout -B ci_build "$CI_COMMIT_SHA"
- gitlab-ci-enable-sid
- gitlab-ci-enable-experimental
- |
cat >>/etc/apt/sources.list <<EOF
deb-src http://deb.debian.org/debian sid main
deb-src http://deb.debian.org/debian experimental main
EOF
- apt-get update -qy
- git config user.name "$DEBFULLNAME"
- git config user.email "$DEBEMAIL"
- |
cd "$CI_PROJECT_DIR/.."
apt-get source --download-only -t experimental "$PKGNAME" ||
apt-get source --download-only "$PKGNAME"
- |
cd "$CI_PROJECT_DIR"
tar xf "../${PKGNAME}"_*.debian.tar.*
- rm -rf debian/patches/
- |
VERSION="$(grep ^PACKAGE_VERSION= configure | cut -d "'" -f 2)"
dch -v "${VERSION}-0.1~ci" 'Non-maintainer upload.'
git archive -o "../${PKGNAME}_${VERSION}.orig.tar.gz" HEAD
pristine-tar commit "../${PKGNAME}_${VERSION}.orig.tar.gz" ci_build
git branch -m pristine-tar origin/pristine-tar
- git add debian
- git commit -m 'add debian/'
- export CI_COMMIT_SHA="$(git rev-parse HEAD)"
script:
- apt-get install --no-install-recommends -qy gawk
- ./ci/printenv.sh
- gitlab-ci-git-buildpackage
- gitlab-ci-lintian