From: Brian P. Hinz Date: Sat, 21 Dec 2019 22:59:08 +0000 (-0500) Subject: Add ubuntu-bionic to travis-ci builds X-Git-Tag: v1.10.90~67 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4b1be9de90c5a07e3cdf44f3805053163e9388ad;p=tigervnc.git Add ubuntu-bionic to travis-ci builds --- diff --git a/.travis.yml b/.travis.yml index 141164f9..36006fe9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ env: - DOCKER=centos6 - DOCKER=centos7 - DOCKER=xenial + - DOCKER=bionic matrix: include: diff --git a/.travis/bionic/Dockerfile b/.travis/bionic/Dockerfile new file mode 100644 index 00000000..71b0e872 --- /dev/null +++ b/.travis/bionic/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:bionic + +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/.travis/bionic/build.sh b/.travis/bionic/build.sh new file mode 100755 index 00000000..92434476 --- /dev/null +++ b/.travis/bionic/build.sh @@ -0,0 +1,54 @@ +#!/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-bionic + +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 $(date -R) + +EOT +cat ${DEBDIR}/debian/changelog >> ${CURDIR}/build/debian/changelog + +## Start the build + +docker run --volume ${CURDIR}/build:/home/deb/build --interactive --tty --rm tigervnc/${DOCKER} \ + bash -c " + tar -C ~/build -axf ~/build/tigervnc_${VERSION}.orig.tar.xz && + cp -a ~/build/debian ~/build/tigervnc-${VERSION}/debian && + mk-build-deps ~/build/tigervnc-${VERSION}/debian/control && + sudo dpkg --unpack ~/tigervnc-build-deps_*.deb && + sudo apt-get -f install -y && + cd ~/build/tigervnc-${VERSION} && dpkg-buildpackage + "