firejail/.gitlab-ci.yml
Kelvin M. Klann b5e3086870
ci: gitlab: install missing git-buildpackage dependency (#7017)
Fixes the following error in `debian_ci`[1]:

    Running with gitlab-runner 18.7.0~pre.433.g3a5f2314 (3a5f2314)
      on green-1.saas-linux-small-amd64.runners-manager.gitlab.com/default JLgUopmMV, system ID: s_deaa2ca09de7
    Preparing the "docker+machine" executor
    Using Docker executor with image registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest ...
    Using effective pull policy of [always] for container registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
    Pulling docker image registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest ...
    Using docker image sha256:d3583847cf2ed2f794f97a09510fd08a07c483a37718e81fe01d5576d4aca1a7 for registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest with digest registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage@sha256:1416995f1e5984f414b083806cc591223d176678a9252de990b38b887981efc3 ...
    [...]
    Executing "step_script" stage of the job script
    Using effective pull policy of [always] for container registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
    Using docker image sha256:d3583847cf2ed2f794f97a09510fd08a07c483a37718e81fe01d5576d4aca1a7 for registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest with digest registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage@sha256:1416995f1e5984f414b083806cc591223d176678a9252de990b38b887981efc3 ...
    $ git checkout -B ci_build "$CI_COMMIT_SHA"
    Switched to a new branch 'ci_build'
    $ gitlab-ci-enable-sid
    $ gitlab-ci-enable-experimental
    [...]
    $ apt-get install --no-install-recommends -qy gawk
    [...]
    $ gitlab-ci-git-buildpackage
    [...]
    make master branch current for gbp
    Switched to a new branch 'master'
    + '[' -z '' ']'
    + gbp buildpackage -uc -us --git-pristine-tar --git-debian-branch=master
    /usr/bin/gitlab-ci-git-buildpackage: line 66: gbp: command not found
    Cleaning up project directory and file based variables

    ERROR: Job failed: exit code 1

[1] https://gitlab.com/Firejail/firejail_ci/-/jobs/12593768999
2026-01-04 15:44:51 +00:00

154 lines
5.2 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 git-buildpackage
- ./ci/printenv.sh
- gitlab-ci-git-buildpackage
- gitlab-ci-lintian