diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2020-11-29 11:51:07 -0500 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2020-12-19 21:18:01 -0500 |
commit | 2a0eabec3140c5bfbff83f2c68659259ab9cd34d (patch) | |
tree | d465bc66324693ff956137e502f0bb53e187c6ef /.travis/centos8 | |
parent | 1eb0f86fb2fc91337b2193b61a00498a4d0c36a8 (diff) | |
download | tigervnc-2a0eabec3140c5bfbff83f2c68659259ab9cd34d.tar.gz tigervnc-2a0eabec3140c5bfbff83f2c68659259ab9cd34d.zip |
Add packages for CentOS 8
Diffstat (limited to '.travis/centos8')
-rw-r--r-- | .travis/centos8/Dockerfile | 15 | ||||
-rwxr-xr-x | .travis/centos8/build.sh | 40 |
2 files changed, 55 insertions, 0 deletions
diff --git a/.travis/centos8/Dockerfile b/.travis/centos8/Dockerfile new file mode 100644 index 00000000..86bb74a7 --- /dev/null +++ b/.travis/centos8/Dockerfile @@ -0,0 +1,15 @@ +FROM centos:8 + +RUN dnf -y group install 'Development Tools' +RUN dnf -y install sudo +RUN dnf -y install dnf-plugins-core +RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +RUN dnf config-manager --set-enabled powertools +RUN dnf -y install xorg-x11-server-source + +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/.travis/centos8/build.sh b/.travis/centos8/build.sh new file mode 100755 index 00000000..fcb902d3 --- /dev/null +++ b/.travis/centos8/build.sh @@ -0,0 +1,40 @@ +#!/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/el8 + +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 --tty --rm tigervnc/${DOCKER} \ + bash -c " + 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 + " |