From patchwork Fri Mar 22 11:13:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 10865521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E3291390 for ; Fri, 22 Mar 2019 11:15:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 821D92A69B for ; Fri, 22 Mar 2019 11:15:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 767692A6A4; Fri, 22 Mar 2019 11:15:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 021F32A69B for ; Fri, 22 Mar 2019 11:15:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h7I7Q-0004uR-R5; Fri, 22 Mar 2019 11:13:48 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h7I7P-0004uJ-HT for xen-devel@lists.xen.org; Fri, 22 Mar 2019 11:13:47 +0000 X-Inumbo-ID: 8de95626-4c93-11e9-8511-b3b94a099722 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8de95626-4c93-11e9-8511-b3b94a099722; Fri, 22 Mar 2019 11:13:44 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,256,1549929600"; d="scan'208";a="81343204" From: Andrew Cooper To: Xen-devel Date: Fri, 22 Mar 2019 11:13:40 +0000 Message-ID: <1553253220-23838-1-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] CI: Add a CentOS 6 container and build jobs X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Doug Goldstein Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP CentOS 6 is probably the most frequently broken build, so adding it to CI would be a very good move. One problem is that CentOS 6 comes with Python 2.6, and Qemu requires 2.7. There appear to be no sensible ways to get Python 2.7 into a CentOS 6 environments, so modify the build script to skip the Qemu upstream build instead. Signed-off-by: Andrew Cooper Acked-by: Wei Liu --- CC: Wei Liu CC: Doug Goldstein I've already pushed this container to the registry, for testing purposes. A sample pipeline is: https://gitlab.com/xen-project/people/andyhhp/xen/pipelines/53121963 This patch is also blocked on one build fix which I've submitted to SeaBIOS: https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/WV64JDCUGSFZAUMZUSTQWHBFEFVFTXQQ/ --- automation/build/centos/6.dockerfile | 51 ++++++++++++++++++++++++++++++++++++ automation/gitlab-ci/build.yaml | 10 +++++++ automation/scripts/build | 5 ++++ automation/scripts/containerize | 1 + 4 files changed, 67 insertions(+) create mode 100644 automation/build/centos/6.dockerfile diff --git a/automation/build/centos/6.dockerfile b/automation/build/centos/6.dockerfile new file mode 100644 index 0000000..54d022b --- /dev/null +++ b/automation/build/centos/6.dockerfile @@ -0,0 +1,51 @@ +FROM centos:6 +LABEL maintainer.name="The Xen Project" \ + maintainer.email="xen-devel@lists.xenproject.org" + +RUN mkdir /build +WORKDIR /build + +# work around https://github.com/moby/moby/issues/10180 +# and add EPEL for dev86 +RUN rpm --rebuilddb && \ + yum -y install \ + yum-plugin-ovl \ + epel-release \ + && yum clean all && \ + rm -rf /var/cache/yum + +# install Xen depends +RUN yum -y install \ + gcc \ + gcc-c++ \ + ncurses-devel \ + zlib-devel \ + openssl-devel \ + python-devel \ + libuuid-devel \ + pciutils-devel \ + pkgconfig \ + gettext \ + flex \ + bison \ + libaio-devel \ + glib2-devel \ + yajl-devel \ + pixman-devel \ + glibc-devel \ + glibc-devel.i686 \ + make \ + binutils \ + git \ + wget \ + acpica-tools \ + python-markdown \ + patch \ + checkpolicy \ + dev86 \ + iasl \ + xz-devel \ + bzip2 \ + nasm \ + && yum clean all && \ + rm -rf /var/cache/yum diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 48bb039..b70797e 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -149,6 +149,16 @@ centos-7-gcc-debug: variables: CONTAINER: centos:7 +centos-6-gcc: + extends: .gcc-x86-64-build + variables: + CONTAINER: centos:6 + +centos-6-gcc-debug: + extends: .gcc-x86-64-build-debug + variables: + CONTAINER: centos:6 + debian-jessie-clang: extends: .clang-x86-64-build variables: diff --git a/automation/scripts/build b/automation/scripts/build index db4bac3..cd87f44 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -22,6 +22,11 @@ if [[ "${CC}" == "clang" ]]; then cfgargs+=("--disable-stubdom") fi +if python -c "import sys; exit(not(sys.version_info < (2, 7)))"; then + # Qemu requires Python >=2.7. Skip it in older distro containers + cfgargs+=("--with-system-qemu=/bin/false") +fi + ./configure "${cfgargs[@]}" make -j$(nproc) dist diff --git a/automation/scripts/containerize b/automation/scripts/containerize index b50ff99..09d130b 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -15,6 +15,7 @@ die() { # BASE="registry.gitlab.com/xen-project/xen" case "_${CONTAINER}" in + _centos6) CONTAINER="${BASE}/centos:6" ;; _centos7) CONTAINER="${BASE}/centos:7" ;; _centos72) CONTAINER="${BASE}/centos:7.2" ;; _trusty) CONTAINER="${BASE}/ubuntu:trusty" ;;