mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
Currently, mkdeb.sh (which is used to make a .deb package) runs
./configure with hardcoded options (some of which are automatically
detected based on configure-time variables). To work around the
hardcoding, contrib/fj-mkdeb.py is used to add additional options by
rewriting the actual call to ./configure on mkdeb.sh. For example, the
following invocation adds --disable-firetunnel to mkdeb.sh:
$ ./configure && ./contrib/fj-mkdeb.py --disable-firetunnel
To avoid depending on another script and to avoid re-generating
mkdeb.sh, just let the latter pass the remaining arguments (the first
one is an optional package filename suffix) to ./configure directly.
Example:
$ make distclean && ./configure && make dist &&
./mkdeb.sh "" --disable-firetunnel
Additionally, change contrib/fj-mkdeb.py to do roughly the same as the
above example, by simply forwarding the arguments that it receives to
./mkdeb.sh (which then forwards them to ./configure). Also, remove the
--only-fix-mkdeb option, since the script does not change mkdeb.sh
anymore. With these changes, the script's usage (other than when using
--only-fix-mkdeb) should remain the same.
Note: To clean the generated files and then make a .deb package using
the default configuration, the invocation is still the same:
$ make distclean && ./configure && make deb
Note2: Running ./configure in the above examples is only needed for
generating Makefile/mkdeb.sh from Makefile.in/mkdeb.sh.in after running
distclean, so that running `make` / `./mkdeb.sh` afterwards works.
Should fully fix #772.
Relates to #1205 #3414 #5148.
83 lines
3.7 KiB
YAML
83 lines
3.7 KiB
YAML
# Basic notes: builds firejail on 5 different systems for 2 package systems:
|
|
# 1. Debian-based systems. Use debian:jessie to ensure reasonable backwards
|
|
# compat and ubuntu:rolling for new setups
|
|
# 2. Redhat-based systems. Use centos:latest for reasonable backwards compat
|
|
# and fedora:latest for new setups
|
|
# 3. Alpine for installing directly from source
|
|
# Also builds apparmor package for Ubuntu LTS
|
|
build_ubuntu_package:
|
|
image: ubuntu:rolling
|
|
script:
|
|
- apt-get update -qq
|
|
- DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential lintian pkg-config python3 gawk
|
|
- ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb
|
|
- command -V firejail && firejail --version
|
|
- python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc
|
|
|
|
build_debian_package:
|
|
image: debian:stretch
|
|
script:
|
|
- apt-get update -qq
|
|
- apt-get install -y -qq build-essential lintian pkg-config gawk
|
|
- ./configure --prefix=/usr && make deb && dpkg -i firejail*.deb
|
|
- command -V firejail && firejail --version
|
|
|
|
build_redhat_package:
|
|
image: almalinux:latest
|
|
script:
|
|
- dnf update -y
|
|
- dnf install -y rpm-build gcc make
|
|
- ./configure --prefix=/usr && make rpms && rpm -i firejail*.rpm
|
|
- command -V firejail && firejail --version
|
|
|
|
build_fedora_package:
|
|
image: fedora:latest
|
|
script:
|
|
- dnf update -y
|
|
- dnf install -y rpm-build gcc make
|
|
- ./configure --prefix=/usr && make rpms && rpm -i firejail*.rpm
|
|
- command -V firejail && firejail --version
|
|
- python3 contrib/sort.py etc/profile-*/*.profile etc/inc/*.inc
|
|
|
|
build_src_package:
|
|
image: alpine:latest
|
|
script:
|
|
- apk update
|
|
- apk upgrade
|
|
- apk add build-base linux-headers python3 gawk
|
|
- ./configure --prefix=/usr && make && make install-strip
|
|
- command -V firejail && firejail --version
|
|
# - python3 contrib/sort.py etc/*.{profile,inc}
|
|
|
|
build_apparmor:
|
|
image: ubuntu:latest
|
|
script:
|
|
- apt-get update -qq
|
|
- DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential lintian libapparmor-dev pkg-config gawk
|
|
- ./configure && make deb-apparmor && dpkg -i firejail*.deb
|
|
- command -V firejail && firejail --version
|
|
- firejail --version | grep -F 'AppArmor support is enabled'
|
|
|
|
debian_ci:
|
|
image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
|
|
variables:
|
|
DEBFULLNAME: "$GITLAB_USER_NAME"
|
|
DEBEMAIL: "$GITLAB_USER_EMAIL"
|
|
before_script:
|
|
- git checkout -B ci_build $CI_COMMIT_SHA
|
|
- gitlab-ci-enable-sid
|
|
- gitlab-ci-enable-experimental
|
|
- echo "deb-src http://deb.debian.org/debian sid main" >> /etc/apt/sources.list
|
|
- echo "deb-src http://deb.debian.org/debian experimental main" >> /etc/apt/sources.list
|
|
- apt-get update
|
|
- git config user.email "$GITLAB_USER_NAME" && git config user.name "$GITLAB_USER_EMAIL"
|
|
- cd $CI_PROJECT_DIR/.. && (apt-get source --download-only -t experimental firejail || apt-get source --download-only firejail)
|
|
- cd $CI_PROJECT_DIR && tar xf ../firejail_*.debian.tar.*
|
|
- rm -rf debian/patches/
|
|
- VERSION=$(grep ^PACKAGE_VERSION= configure | cut -d"'" -f2) && dch -v ${VERSION}-0.1~ci "Non-maintainer upload." && git archive -o ../firejail_${VERSION}.orig.tar.gz HEAD && pristine-tar commit ../firejail_${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 --no-install-recommends install -y -qq gawk
|
|
- gitlab-ci-git-buildpackage
|
|
- gitlab-ci-lintian
|