diff options
author | Pierre Ossman <ossman@cendio.se> | 2022-08-19 14:38:17 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2022-10-14 13:23:02 +0200 |
commit | 966fc36d9ddb7bc3eecc09ad83066e0ef7dd1b2a (patch) | |
tree | 5457c1db0314b68152b4531d0432d7824b388dd9 /.github | |
parent | bbc8620dd811230b94d3ca361e73a075f85cf036 (diff) | |
download | tigervnc-966fc36d9ddb7bc3eecc09ad83066e0ef7dd1b2a.tar.gz tigervnc-966fc36d9ddb7bc3eecc09ad83066e0ef7dd1b2a.zip |
Add RHEL/CentOS 9 packaging
Diffstat (limited to '.github')
-rw-r--r-- | .github/containers/centos9/Dockerfile | 12 | ||||
-rwxr-xr-x | .github/containers/centos9/build.sh | 45 | ||||
-rw-r--r-- | .github/workflows/build.yml | 3 |
3 files changed, 59 insertions, 1 deletions
diff --git a/.github/containers/centos9/Dockerfile b/.github/containers/centos9/Dockerfile new file mode 100644 index 00000000..168dfe45 --- /dev/null +++ b/.github/containers/centos9/Dockerfile @@ -0,0 +1,12 @@ +FROM quay.io/centos/centos:stream9 + +RUN dnf -y group install 'Development Tools' +RUN dnf -y install sudo +RUN dnf config-manager --set-enabled crb + +RUN useradd -s /bin/bash -m rpm +RUN echo >> /etc/sudoers +RUN echo "rpm ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +USER rpm +WORKDIR /home/rpm diff --git a/.github/containers/centos9/build.sh b/.github/containers/centos9/build.sh new file mode 100755 index 00000000..ae2371b6 --- /dev/null +++ b/.github/containers/centos9/build.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +set -e +set -x + +## Basic variables + +CURDIR=$(dirname $(readlink -f $0)) +TOPDIR=$(git rev-parse --show-toplevel 2>/dev/null) + +RPMDIR=${TOPDIR}/contrib/packages/rpm/el9 + +VERSION=$(grep '^set(VERSION ' ${TOPDIR}/CMakeLists.txt | sed 's@^set(VERSION \(.*\))@\1@') + +## Prepare the build directory + +rm -rf ${CURDIR}/rpmbuild +mkdir -p ${CURDIR}/rpmbuild/{BUILD,BUILDROOT,SRPMS,SOURCES,SPECS,RPMS} +chmod a+w ${CURDIR}/rpmbuild/{BUILD,BUILDROOT,SRPMS,RPMS} +[ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && chcon -Rt container_file_t ${CURDIR}/rpmbuild + +## Copy over the packaging files + +cp ${RPMDIR}/SOURCES/* ${CURDIR}/rpmbuild/SOURCES +cp ${RPMDIR}/SPECS/tigervnc.spec ${CURDIR}/rpmbuild/SPECS +sed -i "s/@VERSION@/${VERSION}/" ${CURDIR}/rpmbuild/SPECS/tigervnc.spec + +## Copy over the source code + +(cd ${TOPDIR} && git archive --prefix tigervnc-${VERSION}/ HEAD) | bzip2 > ${CURDIR}/rpmbuild/SOURCES/tigervnc-${VERSION}.tar.bz2 + +## Start the build + +docker run --volume ${CURDIR}/rpmbuild:/home/rpm/rpmbuild --interactive --rm tigervnc/${DOCKER} \ + bash -e -x -c " + sudo dnf install -y xorg-x11-server-devel; + sudo dnf builddep -y ~/rpmbuild/SPECS/tigervnc.spec; + sudo chown 0.0 ~/rpmbuild/SOURCES/*; + sudo chown 0.0 ~/rpmbuild/SPECS/*; + rpmbuild -ba ~/rpmbuild/SPECS/tigervnc.spec; + " + +mkdir -p ${CURDIR}/result +cp -av ${CURDIR}/rpmbuild/RPMS ${CURDIR}/result +cp -av ${CURDIR}/rpmbuild/SRPMS ${CURDIR}/result diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9baad113..3caa0342 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -106,8 +106,9 @@ jobs: strategy: matrix: target: - - centos8 - centos7 + - centos8 + - centos9 - bionic - focal - jammy |