From aa4482a2239bfa0e3fc07a50f438d45603b24691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 19 Jun 2020 12:56:03 +0100 Subject: [PATCH] gitlab: refactor recipe for native builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently on every distro we build against the latest git libvirt and related deps. We need to test multiple axis: - A variety of libvirt versions - A variety of distro versions So this changes most jobs to build against the distro provided libvirt and related deps. The CentOS 8 job is kept building against latest git master libvirt and deps. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.yml | 101 ++++++++++++++++++++--------------- ci/centos-7.Dockerfile | 19 +++---- ci/centos-8.Dockerfile | 5 +- ci/debian-10.Dockerfile | 24 +++------ ci/debian-9.Dockerfile | 23 +++----- ci/debian-sid.Dockerfile | 24 +++------ ci/fedora-31.Dockerfile | 21 +++----- ci/fedora-32.Dockerfile | 21 +++----- ci/fedora-rawhide.Dockerfile | 21 +++----- ci/opensuse-151.Dockerfile | 20 +++---- ci/refresh | 7 ++- ci/ubuntu-1804.Dockerfile | 23 +++----- ci/ubuntu-2004.Dockerfile | 24 +++------ 13 files changed, 139 insertions(+), 194 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 04e5c87..9865238 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,17 +20,29 @@ stages: after_script: - docker logout -.git_build_job_template: &git_build_job_definition +.script_variables: &script_variables | + export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)" + export SCRATCH_DIR="/tmp/scratch" + export VROOT="$SCRATCH_DIR/vroot" + export LD_LIBRARY_PATH="$VROOT/lib" + export PATH="$VROOT/bin:$PATH" + export PKG_CONFIG_PATH="$VROOT/lib/pkgconfig" + +.dist_native_build_job_template: &dist_native_build_job_definition image: $CI_REGISTRY_IMAGE/ci-$NAME:latest stage: builds before_script: - - export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)" - - export SCRATCH_DIR="/tmp/scratch" - - export VROOT="$SCRATCH_DIR/vroot" - - export LD_LIBRARY_PATH="$VROOT/lib" - - export PATH="$VROOT/bin:$PATH" - - export PKG_CONFIG_PATH="$VROOT/lib/pkgconfig" - - export TEST_MAINTAINER=1 + - *script_variables + script: + - ./autogen.sh --prefix="$VROOT" + - $MAKE dist + - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta virt-viewer*.tar.gz ; fi + +.git_native_build_job_template: &git_native_build_job_definition + image: $CI_REGISTRY_IMAGE/ci-$NAME:latest + stage: builds + before_script: + - *script_variables script: - pushd "$PWD" - mkdir -p "$SCRATCH_DIR" @@ -54,9 +66,10 @@ stages: - $NINJA -C build install - popd - ./autogen.sh --prefix="$VROOT" - - $MAKE - $MAKE syntax-check - - $MAKE install + - $MAKE dist + - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ; then rpmbuild --nodeps -ta virt-viewer*.tar.gz ; fi + # Check that all commits are signed-off for the DCO. # Skip on "virt-viewer" namespace, since we only need to run @@ -71,113 +84,115 @@ check-dco: variables: - $CI_PROJECT_NAMESPACE == 'virt-viewer' -centos-7-container: +x86-centos-7-container: <<: *container_job_definition variables: NAME: centos-7 -centos-8-container: +x86-centos-8-container: <<: *container_job_definition variables: NAME: centos-8 -debian-9-container: +x86-debian-9-container: <<: *container_job_definition variables: NAME: debian-9 -debian-10-container: +x86-debian-10-container: <<: *container_job_definition variables: NAME: debian-10 -debian-sid-container: +x86-debian-sid-container: <<: *container_job_definition variables: NAME: debian-sid -fedora-31-container: +x86-fedora-31-container: <<: *container_job_definition variables: NAME: fedora-31 -fedora-32-container: +x86-fedora-32-container: <<: *container_job_definition variables: NAME: fedora-32 -fedora-rawhide-container: +x86-fedora-rawhide-container: <<: *container_job_definition variables: NAME: fedora-rawhide -opensuse-151-container: +x86-opensuse-151-container: <<: *container_job_definition variables: NAME: opensuse-151 -ubuntu-1804-container: +x86-ubuntu-1804-container: <<: *container_job_definition variables: NAME: ubuntu-1804 -ubuntu-2004-container: +x86-ubuntu-2004-container: <<: *container_job_definition variables: NAME: ubuntu-2004 -centos-7-git-build: - <<: *git_build_job_definition +x86-centos-7-dist-build: + <<: *dist_native_build_job_definition variables: NAME: centos-7 -centos-8-git-build: - <<: *git_build_job_definition +x86-centos-8-git-build: + <<: *git_native_build_job_definition variables: NAME: centos-8 + RPM: skip -debian-9-git-build: - <<: *git_build_job_definition +x86-debian-9-dist-build: + <<: *dist_native_build_job_definition variables: NAME: debian-9 -debian-10-git-build: - <<: *git_build_job_definition +x86-debian-10-dist-build: + <<: *dist_native_build_job_definition variables: NAME: debian-10 -debian-sid-git-build: - <<: *git_build_job_definition +x86-debian-sid-dist-build: + <<: *dist_native_build_job_definition variables: NAME: debian-sid -fedora-31-git-build: - <<: *git_build_job_definition +x86-fedora-31-dist-build: + <<: *dist_native_build_job_definition variables: NAME: fedora-31 -fedora-32-git-build: - <<: *git_build_job_definition +x86-fedora-32-dist-build: + <<: *dist_native_build_job_definition variables: NAME: fedora-32 -fedora-rawhide-git-build: - <<: *git_build_job_definition +x86-fedora-rawhide-dist-build: + <<: *dist_native_build_job_definition variables: NAME: fedora-rawhide -opensuse-151-git-build: - <<: *git_build_job_definition +x86-opensuse-151-dist-build: + <<: *dist_native_build_job_definition variables: NAME: opensuse-151 + RPM: skip -ubuntu-1804-git-build: - <<: *git_build_job_definition +x86-ubuntu-1804-dist-build: + <<: *dist_native_build_job_definition variables: NAME: ubuntu-1804 -ubuntu-2004-git-build: - <<: *git_build_job_definition +x86-ubuntu-2004-dist-build: + <<: *dist_native_build_job_definition variables: NAME: ubuntu-2004 diff --git a/ci/centos-7.Dockerfile b/ci/centos-7.Dockerfile index 4f01eb5..5b6e7a9 100644 --- a/ci/centos-7.Dockerfile +++ b/ci/centos-7.Dockerfile @@ -40,48 +40,41 @@ WEiJKtQrZDJloqtyi/mmRa1VsV7RYR0VPJjhK/R8EQ7Ysshy\n\ ca-certificates \ ccache \ chrony \ - cyrus-sasl-devel \ gcc \ gdb \ - gdk-pixbuf2-devel \ gettext \ gettext-devel \ git \ glib2-devel \ glibc-common \ glibc-devel \ - gnutls-devel \ - gobject-introspection-devel \ - gtk-doc \ + gtk-vnc2-devel \ gtk3-devel \ - intltool \ - libgcrypt-devel \ + icoutils \ libgovirt-devel \ - libnl3-devel \ - libtirpc-devel \ libtool \ + libvirt-devel \ + libvirt-gobject-devel \ libxml2 \ libxml2-devel \ - libxslt \ lsof \ make \ net-tools \ ninja-build \ patch \ perl \ + perl-App-cpanminus \ pkgconfig \ - pulseaudio-libs-devel \ python3 \ python3-pip \ python3-setuptools \ python3-wheel \ - python36-docutils \ + rest-devel \ rpm-build \ screen \ spice-gtk3-devel \ strace \ sudo \ - vala \ vim && \ yum autoremove -y && \ yum clean all -y && \ diff --git a/ci/centos-8.Dockerfile b/ci/centos-8.Dockerfile index 1fe21db..255c1aa 100644 --- a/ci/centos-8.Dockerfile +++ b/ci/centos-8.Dockerfile @@ -1,7 +1,7 @@ FROM centos:8 RUN dnf install 'dnf-command(config-manager)' -y && \ - dnf config-manager --set-enabled PowerTools -y && \ + dnf config-manager --set-enabled -y PowerTools && \ dnf install -y epel-release && \ dnf update -y && \ dnf install -y \ @@ -26,6 +26,7 @@ RUN dnf install 'dnf-command(config-manager)' -y && \ gobject-introspection-devel \ gtk-doc \ gtk3-devel \ + icoutils \ intltool \ libgcrypt-devel \ libnl3-devel \ @@ -41,10 +42,12 @@ RUN dnf install 'dnf-command(config-manager)' -y && \ ninja-build \ patch \ perl \ + perl-App-cpanminus \ pkgconfig \ pulseaudio-libs-devel \ python3 \ python3-docutils \ + python3-pip \ python3-setuptools \ python3-wheel \ rpcgen \ diff --git a/ci/debian-10.Dockerfile b/ci/debian-10.Dockerfile index 040d956..6e2a5e5 100644 --- a/ci/debian-10.Dockerfile +++ b/ci/debian-10.Dockerfile @@ -12,29 +12,23 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ca-certificates \ ccache \ chrony \ + cpanminus \ gcc \ gdb \ gettext \ git \ - gtk-doc-tools \ - intltool \ - libc-dev-bin \ + icoutils \ libc6-dev \ - libgcrypt20-dev \ - libgdk-pixbuf2.0-dev \ - libgirepository1.0-dev \ libglib2.0-dev \ - libgnutls28-dev \ libgovirt-dev \ libgtk-3-dev \ - libnl-3-dev \ - libnl-route-3-dev \ - libpulse-dev \ - libsasl2-dev \ + libgtk-vnc-2.0-dev \ + librest-dev \ libspice-client-gtk-3.0-dev \ - libtirpc-dev \ libtool \ libtool-bin \ + libvirt-dev \ + libvirt-glib-1.0-dev \ libxml2-dev \ libxml2-utils \ locales \ @@ -47,15 +41,13 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ perl \ pkgconf \ python3 \ - python3-docutils \ + python3-pip \ python3-setuptools \ python3-wheel \ screen \ strace \ sudo \ - valac \ - vim \ - xsltproc && \ + vim && \ apt-get autoremove -y && \ apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ diff --git a/ci/debian-9.Dockerfile b/ci/debian-9.Dockerfile index e986eaa..b8b4aec 100644 --- a/ci/debian-9.Dockerfile +++ b/ci/debian-9.Dockerfile @@ -12,29 +12,23 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ca-certificates \ ccache \ chrony \ + cpanminus \ gcc \ gdb \ gettext \ git \ - gtk-doc-tools \ - intltool \ - libc-dev-bin \ + icoutils \ libc6-dev \ - libgcrypt20-dev \ - libgdk-pixbuf2.0-dev \ - libgirepository1.0-dev \ libglib2.0-dev \ - libgnutls28-dev \ libgovirt-dev \ libgtk-3-dev \ - libnl-3-dev \ - libnl-route-3-dev \ - libpulse-dev \ - libsasl2-dev \ + libgtk-vnc-2.0-dev \ + librest-dev \ libspice-client-gtk-3.0-dev \ - libtirpc-dev \ libtool \ libtool-bin \ + libvirt-dev \ + libvirt-glib-1.0-dev \ libxml2-dev \ libxml2-utils \ locales \ @@ -46,16 +40,13 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ perl \ pkgconf \ python3 \ - python3-docutils \ python3-pip \ python3-setuptools \ python3-wheel \ screen \ strace \ sudo \ - valac \ - vim \ - xsltproc && \ + vim && \ apt-get autoremove -y && \ apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ diff --git a/ci/debian-sid.Dockerfile b/ci/debian-sid.Dockerfile index 5c48421..4cf0061 100644 --- a/ci/debian-sid.Dockerfile +++ b/ci/debian-sid.Dockerfile @@ -12,29 +12,23 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ca-certificates \ ccache \ chrony \ + cpanminus \ gcc \ gdb \ gettext \ git \ - gtk-doc-tools \ - intltool \ - libc-dev-bin \ + icoutils \ libc6-dev \ - libgcrypt20-dev \ - libgdk-pixbuf2.0-dev \ - libgirepository1.0-dev \ libglib2.0-dev \ - libgnutls28-dev \ libgovirt-dev \ libgtk-3-dev \ - libnl-3-dev \ - libnl-route-3-dev \ - libpulse-dev \ - libsasl2-dev \ + libgtk-vnc-2.0-dev \ + librest-dev \ libspice-client-gtk-3.0-dev \ - libtirpc-dev \ libtool \ libtool-bin \ + libvirt-dev \ + libvirt-glib-1.0-dev \ libxml2-dev \ libxml2-utils \ locales \ @@ -47,15 +41,13 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ perl \ pkgconf \ python3 \ - python3-docutils \ + python3-pip \ python3-setuptools \ python3-wheel \ screen \ strace \ sudo \ - valac \ - vim \ - xsltproc && \ + vim && \ apt-get autoremove -y && \ apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ diff --git a/ci/fedora-31.Dockerfile b/ci/fedora-31.Dockerfile index 79a030f..7c8a9ec 100644 --- a/ci/fedora-31.Dockerfile +++ b/ci/fedora-31.Dockerfile @@ -10,29 +10,23 @@ RUN dnf update -y && \ ccache \ chrony \ cppi \ - cyrus-sasl-devel \ gcc \ gdb \ - gdk-pixbuf2-devel \ gettext \ gettext-devel \ git \ glib2-devel \ glibc-devel \ glibc-langpack-en \ - gnutls-devel \ - gobject-introspection-devel \ - gtk-doc \ + gtk-vnc2-devel \ gtk3-devel \ - intltool \ - libgcrypt-devel \ + icoutils \ libgovirt-devel \ - libnl3-devel \ - libtirpc-devel \ libtool \ + libvirt-devel \ + libvirt-gobject-devel \ libxml2 \ libxml2-devel \ - libxslt \ lsof \ make \ meson \ @@ -40,19 +34,18 @@ RUN dnf update -y && \ ninja-build \ patch \ perl \ + perl-App-cpanminus \ pkgconfig \ - pulseaudio-libs-devel \ python3 \ - python3-docutils \ + python3-pip \ python3-setuptools \ python3-wheel \ - rpcgen \ + rest-devel \ rpm-build \ screen \ spice-gtk3-devel \ strace \ sudo \ - vala \ vim && \ dnf autoremove -y && \ dnf clean all -y && \ diff --git a/ci/fedora-32.Dockerfile b/ci/fedora-32.Dockerfile index a4a184f..eeee73b 100644 --- a/ci/fedora-32.Dockerfile +++ b/ci/fedora-32.Dockerfile @@ -10,29 +10,23 @@ RUN dnf update -y && \ ccache \ chrony \ cppi \ - cyrus-sasl-devel \ gcc \ gdb \ - gdk-pixbuf2-devel \ gettext \ gettext-devel \ git \ glib2-devel \ glibc-devel \ glibc-langpack-en \ - gnutls-devel \ - gobject-introspection-devel \ - gtk-doc \ + gtk-vnc2-devel \ gtk3-devel \ - intltool \ - libgcrypt-devel \ + icoutils \ libgovirt-devel \ - libnl3-devel \ - libtirpc-devel \ libtool \ + libvirt-devel \ + libvirt-gobject-devel \ libxml2 \ libxml2-devel \ - libxslt \ lsof \ make \ meson \ @@ -40,19 +34,18 @@ RUN dnf update -y && \ ninja-build \ patch \ perl \ + perl-App-cpanminus \ pkgconfig \ - pulseaudio-libs-devel \ python3 \ - python3-docutils \ + python3-pip \ python3-setuptools \ python3-wheel \ - rpcgen \ + rest-devel \ rpm-build \ screen \ spice-gtk3-devel \ strace \ sudo \ - vala \ vim && \ dnf autoremove -y && \ dnf clean all -y && \ diff --git a/ci/fedora-rawhide.Dockerfile b/ci/fedora-rawhide.Dockerfile index 7bd429c..8a49a7b 100644 --- a/ci/fedora-rawhide.Dockerfile +++ b/ci/fedora-rawhide.Dockerfile @@ -11,29 +11,23 @@ RUN dnf update -y --nogpgcheck fedora-gpg-keys && \ ccache \ chrony \ cppi \ - cyrus-sasl-devel \ gcc \ gdb \ - gdk-pixbuf2-devel \ gettext \ gettext-devel \ git \ glib2-devel \ glibc-devel \ glibc-langpack-en \ - gnutls-devel \ - gobject-introspection-devel \ - gtk-doc \ + gtk-vnc2-devel \ gtk3-devel \ - intltool \ - libgcrypt-devel \ + icoutils \ libgovirt-devel \ - libnl3-devel \ - libtirpc-devel \ libtool \ + libvirt-devel \ + libvirt-gobject-devel \ libxml2 \ libxml2-devel \ - libxslt \ lsof \ make \ meson \ @@ -41,19 +35,18 @@ RUN dnf update -y --nogpgcheck fedora-gpg-keys && \ ninja-build \ patch \ perl \ + perl-App-cpanminus \ pkgconfig \ - pulseaudio-libs-devel \ python3 \ - python3-docutils \ + python3-pip \ python3-setuptools \ python3-wheel \ - rpcgen \ + rest-devel \ rpm-build \ screen \ spice-gtk3-devel \ strace \ sudo \ - vala \ vim && \ dnf autoremove -y && \ dnf clean all -y && \ diff --git a/ci/opensuse-151.Dockerfile b/ci/opensuse-151.Dockerfile index b483618..aaa78a6 100644 --- a/ci/opensuse-151.Dockerfile +++ b/ci/opensuse-151.Dockerfile @@ -10,49 +10,41 @@ RUN zypper update -y && \ ccache \ chrony \ cppi \ - cyrus-sasl-devel \ gcc \ gdb \ - gdk-pixbuf-devel \ gettext \ gettext-devel \ git \ glib2-devel \ glibc-devel \ glibc-locale \ - gobject-introspection-devel \ - gtk-doc \ + gtk-vnc2-devel \ gtk3-devel \ - intltool \ - libgcrypt-devel \ - libgnutls-devel \ + icoutils \ libgovirt-devel \ - libnl3-devel \ - libpulse-devel \ - libtirpc-devel \ + librest-devel \ libtool \ + libvirt-devel \ + libvirt-glib-devel \ libxml2 \ libxml2-devel \ - libxslt \ lsof \ make \ net-tools \ ninja \ patch \ perl \ + perl-App-cpanminus \ pkgconfig \ python3 \ - python3-docutils \ python3-pip \ python3-setuptools \ python3-wheel \ - rpcgen \ rpm-build \ screen \ spice-gtk-devel \ strace \ sudo \ - vala \ vim && \ zypper clean --all && \ mkdir -p /usr/libexec/ccache-wrappers && \ diff --git a/ci/refresh b/ci/refresh index e2a9142..01661b5 100755 --- a/ci/refresh +++ b/ci/refresh @@ -18,5 +18,10 @@ HOSTS=$($LCITOOL hosts | grep -v freebsd | sed -e 's/libvirt-//') for host in $HOSTS do - $LCITOOL dockerfile libvirt-$host libvirt+minimal,libvirt-glib,gtk-vnc,virt-viewer > $host.Dockerfile + if test "$host" = "centos-8" || test "$host" = "centos-stream" + then + $LCITOOL dockerfile libvirt-$host libvirt+minimal,libvirt-glib,gtk-vnc,virt-viewer > $host.Dockerfile + else + $LCITOOL dockerfile libvirt-$host libvirt+dist,libvirt-glib+dist,gtk-vnc+dist,virt-viewer > $host.Dockerfile + fi done diff --git a/ci/ubuntu-1804.Dockerfile b/ci/ubuntu-1804.Dockerfile index 900d132..24d5bbc 100644 --- a/ci/ubuntu-1804.Dockerfile +++ b/ci/ubuntu-1804.Dockerfile @@ -12,28 +12,22 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ca-certificates \ ccache \ chrony \ + cpanminus \ gcc \ gdb \ gettext \ git \ - gtk-doc-tools \ - intltool \ - libc-dev-bin \ + icoutils \ libc6-dev \ - libgcrypt20-dev \ - libgdk-pixbuf2.0-dev \ - libgirepository1.0-dev \ libglib2.0-dev \ - libgnutls28-dev \ libgtk-3-dev \ - libnl-3-dev \ - libnl-route-3-dev \ - libpulse-dev \ - libsasl2-dev \ + libgtk-vnc-2.0-dev \ + librest-dev \ libspice-client-gtk-3.0-dev \ - libtirpc-dev \ libtool \ libtool-bin \ + libvirt-dev \ + libvirt-glib-1.0-dev \ libxml2-dev \ libxml2-utils \ locales \ @@ -45,16 +39,13 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ perl \ pkgconf \ python3 \ - python3-docutils \ python3-pip \ python3-setuptools \ python3-wheel \ screen \ strace \ sudo \ - valac \ - vim \ - xsltproc && \ + vim && \ apt-get autoremove -y && \ apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ diff --git a/ci/ubuntu-2004.Dockerfile b/ci/ubuntu-2004.Dockerfile index 9da5aea..4b8039c 100644 --- a/ci/ubuntu-2004.Dockerfile +++ b/ci/ubuntu-2004.Dockerfile @@ -12,28 +12,22 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ca-certificates \ ccache \ chrony \ + cpanminus \ gcc \ gdb \ gettext \ git \ - gtk-doc-tools \ - intltool \ - libc-dev-bin \ + icoutils \ libc6-dev \ - libgcrypt20-dev \ - libgdk-pixbuf2.0-dev \ - libgirepository1.0-dev \ libglib2.0-dev \ - libgnutls28-dev \ libgtk-3-dev \ - libnl-3-dev \ - libnl-route-3-dev \ - libpulse-dev \ - libsasl2-dev \ + libgtk-vnc-2.0-dev \ + librest-dev \ libspice-client-gtk-3.0-dev \ - libtirpc-dev \ libtool \ libtool-bin \ + libvirt-dev \ + libvirt-glib-1.0-dev \ libxml2-dev \ libxml2-utils \ locales \ @@ -46,15 +40,13 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ perl \ pkgconf \ python3 \ - python3-docutils \ + python3-pip \ python3-setuptools \ python3-wheel \ screen \ strace \ sudo \ - valac \ - vim \ - xsltproc && \ + vim && \ apt-get autoremove -y && \ apt-get autoclean -y && \ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \