[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] CI: Add a CentOS 6 container and build jobs



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 <andrew.cooper3@xxxxxxxxxx>
---
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
CC: Doug Goldstein <cardoe@xxxxxxxxxx>

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@xxxxxxxxxxx/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@xxxxxxxxxxxxxxxxxxxx"
+
+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" ;;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.