]> source.dussan.org Git - tigervnc.git/commitdiff
Build RHEL 6 packages in Travis
authorPierre Ossman <ossman@cendio.se>
Mon, 14 Jan 2019 17:55:13 +0000 (18:55 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 21 Jan 2019 15:35:22 +0000 (16:35 +0100)
.travis.yml
.travis/centos6/Dockerfile [new file with mode: 0644]
.travis/centos6/build.sh [new file with mode: 0755]
contrib/packages/rpm/el6/SPECS/tigervnc.spec

index 691984634591da9174091c57743ae72aad8a6433..7055a58316b998178468c286b5b06da8d380c975 100644 (file)
@@ -1,6 +1,7 @@
 language: minimal
 
 env:
+  - DOCKER=centos6
   - DOCKER=centos7
 
 matrix:
diff --git a/.travis/centos6/Dockerfile b/.travis/centos6/Dockerfile
new file mode 100644 (file)
index 0000000..e223b43
--- /dev/null
@@ -0,0 +1,13 @@
+FROM centos:6
+
+RUN yum -y groupinstall 'Development Tools'
+RUN yum -y install yum-utils
+
+RUN yum -y install sudo
+
+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/centos6/build.sh b/.travis/centos6/build.sh
new file mode 100755 (executable)
index 0000000..c219f35
--- /dev/null
@@ -0,0 +1,49 @@
+#!/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/el6
+
+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
+
+# Extra dependencies built because the distribution lacks what we need
+
+curl -L -o ${CURDIR}/rpmbuild/SOURCES/fltk-1.3.4-2-source.tar.gz https://www.fltk.org/pub/fltk/1.3.4/fltk-1.3.4-2-source.tar.gz
+curl -L -o ${CURDIR}/rpmbuild/SOURCES/libpng-1.6.34.tar.gz https://downloads.sourceforge.net/project/libpng/libpng16/1.6.34/libpng-1.6.34.tar.gz
+curl -L -o ${CURDIR}/rpmbuild/SOURCES/gmp-6.1.2.tar.bz2 https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2
+curl -L -o ${CURDIR}/rpmbuild/SOURCES/libtasn1-4.13.tar.gz https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.13.tar.gz
+curl -L -o ${CURDIR}/rpmbuild/SOURCES/nettle-3.4.tar.gz https://ftp.gnu.org/gnu/nettle/nettle-3.4.tar.gz
+curl -L -o ${CURDIR}/rpmbuild/SOURCES/gnutls-3.3.30.tar.xz https://www.gnupg.org/ftp/gcrypt/gnutls/v3.3/gnutls-3.3.30.tar.xz
+
+## 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 yum-builddep -y ~/rpmbuild/SPECS/tigervnc.spec &&
+        sudo chown 0.0 ~/rpmbuild/SOURCES/* &&
+        sudo chown 0.0 ~/rpmbuild/SPECS/* &&
+       rpmbuild -ba ~/rpmbuild/SPECS/tigervnc.spec
+       "
index ab4efb20fa8ba6e9a59555bb21a9f21f80d1b28f..53efba67e71315065a5638f03fcb47b9a15f91a7 100644 (file)
@@ -20,7 +20,7 @@ URL: http://www.tigervnc.com
 Source0: %{name}-%{version}%{?snap:-%{snap}}.tar.bz2
 Source1: vncserver.service
 Source2: vncserver.sysconfig
-Source11: http://fltk.org/pub/fltk/1.3.4/fltk-1.3.4-1-source.tar.gz
+Source11: http://fltk.org/pub/fltk/1.3.4/fltk-1.3.4-2-source.tar.gz
 Source13: http://downloads.sourceforge.net/project/libpng/libpng16/1.6.34/libpng-1.6.34.tar.gz
 Source14: https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2
 Source15: http://ftp.gnu.org/gnu/libtasn1/libtasn1-4.13.tar.gz