diff options
author | Pierre Ossman <ossman@cendio.se> | 2022-08-19 14:42:37 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2022-09-03 16:57:33 +0200 |
commit | b75cb76145c18e7dc7a31f27a9f133bf425e0f9b (patch) | |
tree | 8cca7f13fcab6d2168f018e75a39bad9a6c063c2 /.github | |
parent | 5ed9d6d3f08b97560040152b35a42785ab31da46 (diff) | |
download | tigervnc-b75cb76145c18e7dc7a31f27a9f133bf425e0f9b.tar.gz tigervnc-b75cb76145c18e7dc7a31f27a9f133bf425e0f9b.zip |
Add Ubuntu 22.04 (Jammy Jellyfish) packaging
Diffstat (limited to '.github')
-rw-r--r-- | .github/containers/jammy/Dockerfile | 13 | ||||
-rwxr-xr-x | .github/containers/jammy/build.sh | 57 | ||||
-rw-r--r-- | .github/workflows/build.yml | 1 |
3 files changed, 71 insertions, 0 deletions
diff --git a/.github/containers/jammy/Dockerfile b/.github/containers/jammy/Dockerfile new file mode 100644 index 00000000..a94675e6 --- /dev/null +++ b/.github/containers/jammy/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:jammy + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update +RUN apt-get -y install packaging-dev equivs + +RUN useradd -s /bin/bash -m deb +RUN echo >> /etc/sudoers +RUN echo "deb ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +USER deb +WORKDIR /home/deb diff --git a/.github/containers/jammy/build.sh b/.github/containers/jammy/build.sh new file mode 100755 index 00000000..8d40ebdc --- /dev/null +++ b/.github/containers/jammy/build.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +set -e +set -x + +## Basic variables + +CURDIR=$(dirname $(readlink -f $0)) +TOPDIR=$(git rev-parse --show-toplevel 2>/dev/null) + +DEBDIR=${TOPDIR}/contrib/packages/deb/ubuntu-jammy + +VERSION=$(grep '^set(VERSION ' ${TOPDIR}/CMakeLists.txt | sed 's@^set(VERSION \(.*\))@\1@') + +## Prepare the build directory + +rm -rf ${CURDIR}/build +mkdir -p ${CURDIR}/build +chmod a+w ${CURDIR}/build +[ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && chcon -Rt container_file_t ${CURDIR}/build + +## Copy over the source code + +(cd ${TOPDIR} && git archive --prefix tigervnc-${VERSION}/ HEAD) | xz > ${CURDIR}/build/tigervnc_${VERSION}.orig.tar.xz + +## Copy over the packaging files + +cp -r ${DEBDIR}/debian ${CURDIR}/build/debian + +chmod a+x ${CURDIR}/build/debian/rules + +# Assemble a fake changelog entry to get the correct version + +cat - > ${CURDIR}/build/debian/changelog << EOT +tigervnc (${VERSION}-1ubuntu1) UNRELEASED; urgency=low + + * Automated build for TigerVNC + + -- Build bot <tigervncbot@tigervnc.org> $(date -R) + +EOT +cat ${DEBDIR}/debian/changelog >> ${CURDIR}/build/debian/changelog + +## Start the build + +docker run --volume ${CURDIR}/build:/home/deb/build --interactive --rm tigervnc/${DOCKER} \ + bash -e -x -c " + tar -C ~/build -axf ~/build/tigervnc_${VERSION}.orig.tar.xz; + cp -a ~/build/debian ~/build/tigervnc-${VERSION}/debian; + sudo apt-get update; + mk-build-deps ~/build/tigervnc-${VERSION}/debian/control; + sudo apt-get install -y ~/tigervnc-build-deps_*.deb; + cd ~/build/tigervnc-${VERSION} && dpkg-buildpackage; + " + +mkdir -p ${CURDIR}/result +cp -av ${CURDIR}/build/*.deb ${CURDIR}/result diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d2fc801..ced28e53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,6 +110,7 @@ jobs: - centos7 - bionic - focal + - jammy fail-fast: false runs-on: ubuntu-latest env: |