Skip to contentSkip to conversation

Improvement to docker-based build automation

PATCH In review Wei Liu 2 participants 11 messages Jul 9, 2018 – Jul 10, 2018

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

v2 cover Improvement to docker-based build automation

Wei Liu (4):
automation: install texinfo
automation: install some packages for CentOS from EPEL
automation: introduce stretch-i386.dockerfile
automation: build more stuff on x86 with docker

 automation/build/centos/7.2.dockerfile          |  7 ++++
 automation/build/debian/jessie.dockerfile       |  1 +
 automation/build/debian/stretch-i386.dockerfile | 50 +++++++++++++++++++++++++
 automation/build/debian/stretch.dockerfile      |  1 +
 automation/build/ubuntu/trusty.dockerfile       |  1 +
 automation/build/ubuntu/xenial.dockerfile       |  1 +
 automation/scripts/build                        |  6 +--
 7 files changed, 62 insertions(+), 5 deletions(-)
 create mode 100644 automation/build/debian/stretch-i386.dockerfile
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author
#1 lore raw

PATCH v2 1/4 automation: install texinfo

Stubdom's dependency newlib needs it.

---
 automation/build/centos/7.2.dockerfile     | 1 +
 automation/build/debian/jessie.dockerfile  | 1 +
 automation/build/debian/stretch.dockerfile | 1 +
 automation/build/ubuntu/trusty.dockerfile  | 1 +
 automation/build/ubuntu/xenial.dockerfile  | 1 +
 5 files changed, 5 insertions(+)
automation/build/centos/7.2.dockerfile +1 -0
index c6a1f46d3c..34eac9abd4 100644
@@ -39,4 +39,5 @@ RUN rpm --rebuilddb && \
         python-markdown \
         patch \
         checkpolicy \
+        texinfo \
     && yum clean all
automation/build/debian/jessie.dockerfile +1 -0
index 9bb1bdf104..3377a63334 100644
@@ -41,6 +41,7 @@ RUN apt-get update && \
         checkpolicy \
         wget \
         git \
+        texinfo \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/build/debian/stretch.dockerfile +1 -0
index f068457ab6..3d3f140737 100644
@@ -41,6 +41,7 @@ RUN apt-get update && \
         checkpolicy \
         wget \
         git \
+        texinfo \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/build/ubuntu/trusty.dockerfile +1 -0
index cc750873e3..de173891a7 100644
@@ -41,6 +41,7 @@ RUN apt-get update && \
         checkpolicy \
         wget \
         git \
+        texinfo \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
automation/build/ubuntu/xenial.dockerfile +1 -0
index aa551c1b5c..76a923fb97 100644
@@ -41,6 +41,7 @@ RUN apt-get update && \
         checkpolicy \
         wget \
         git \
+        texinfo \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author
#3 lore raw

Re: [PATCH v2 1/4] automation: install texinfo

Quoted 8 lines · Doug Goldstein
Quoted 3 lines · Wei Liu

Stubdom's dependency newlib needs it.

Could we consider <[email protected]> instead?

https://lists.xenproject.org/archives/html/xen-devel/2018-07/msg00810.html

I will stick as the first patch of this series.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#4 lore raw

PATCH v2 2/4 automation: install some packages for CentOS from EPEL

In reply to Wei Liu

They are needed to build tools.

---
 automation/build/centos/7.2.dockerfile | 6 ++++++
 1 file changed, 6 insertions(+)
automation/build/centos/7.2.dockerfile +6 -0
index 34eac9abd4..f46a5e3f2b 100644
@@ -6,6 +6,9 @@ LABEL maintainer.name="The Xen Project" \
 # the version we want
 COPY CentOS-7.2.repo /etc/yum.repos.d/CentOS-Base.repo
 
+# install EPEL for dev86, xz-devel and possibly other packages
+RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+
 RUN mkdir /build
 WORKDIR /build
 
@@ -40,4 +43,7 @@ RUN rpm --rebuilddb && \
         patch \
         checkpolicy \
         texinfo \
+        dev86 \
+        xz-devel \
+        bzip2 \
     && yum clean all
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v2 2/4
#5 lore raw

Re: [PATCH v2 2/4] automation: install some packages for CentOS from EPEL

Quoted 12 lines · Wei Liu

They are needed to build tools.

---
 automation/build/centos/7.2.dockerfile | 6 ++++++
 1 file changed, 6 insertions(+)
automation/build/centos/7.2.dockerfile +0 -0
index 34eac9abd4..f46a5e3f2b 100644

automation/build/centos/7.2.dockerfile LABEL maintainer.name="The Xen Project" \ · line 10

Quoted 5 lines
automation/build/centos/7.2.dockerfile +2 -0
@@ -6,6 +6,9 @@ LABEL maintainer.name="The Xen Project" \
 # the version we want
 COPY CentOS-7.2.repo /etc/yum.repos.d/CentOS-Base.repo
 
+# install EPEL for dev86, xz-devel and possibly other packages
+RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

"&& yum clean all" to keep the layer size down

With that added in there (unless Acked-by is more appropriate):

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#6 lore raw

Re: [PATCH v2 2/4] automation: install some packages for CentOS from EPEL

Quoted 16 lines · Doug Goldstein
Quoted 15 lines · Wei Liu

They are needed to build tools.

---
 automation/build/centos/7.2.dockerfile | 6 ++++++
 1 file changed, 6 insertions(+)
automation/build/centos/7.2.dockerfile +0 -0
index 34eac9abd4..f46a5e3f2b 100644
@@ -6,6 +6,9 @@ LABEL maintainer.name="The Xen Project" \
 # the version we want
 COPY CentOS-7.2.repo /etc/yum.repos.d/CentOS-Base.repo
 
Quoted 6 lines

automation/build/centos/7.2.dockerfile LABEL maintainer.name="The Xen Project" \ · line 10

Quoted 2 lines
automation/build/centos/7.2.dockerfile +2 -0
+# install EPEL for dev86, xz-devel and possibly other packages
+RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

"&& yum clean all" to keep the layer size down

With that added in there (unless Acked-by is more appropriate):

Either is fine.

Quoted 2 lines

Thanks.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#7 lore raw

PATCH v2 3/4 automation: introduce stretch-i386.dockerfile

In reply to Wei Liu
---
 automation/build/debian/stretch-i386.dockerfile | 50 +++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 automation/build/debian/stretch-i386.dockerfile
automation/build/debian/stretch-i386.dockerfile new file +50 -0
new file mode 100644
index 0000000000..add2204535
@@ -0,0 +1,50 @@
+FROM i386/debian:stretch
+LABEL maintainer.name="The Xen Project" \
+      maintainer.email="[email protected]"
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV USER root
+
+RUN mkdir /build
+WORKDIR /build
+
+ENTRYPOINT ["/usr/bin/setarch", "i686", "/bin/bash"]
+
+# build depends
+RUN apt-get update && \
+    apt-get --quiet --yes install \
+        build-essential \
+        zlib1g-dev \
+        libncurses5-dev \
+        libssl-dev \
+        python2.7-dev \
+        xorg-dev \
+        uuid-dev \
+        libyajl-dev \
+        libaio-dev \
+        libglib2.0-dev \
+        clang \
+        libpixman-1-dev \
+        pkg-config \
+        flex \
+        bison \
+        gettext \
+        acpica-tools \
+        bin86 \
+        bcc \
+        liblzma-dev \
+        libc6-dev \
+        libnl-3-dev \
+        ocaml-nox \
+        libfindlib-ocaml-dev \
+        markdown \
+        transfig \
+        pandoc \
+        checkpolicy \
+        wget \
+        git \
+        texinfo \
+        && \
+        apt-get autoremove -y && \
+        apt-get clean && \
+        rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v2 3/4
#8 lore raw

Re: [PATCH v2 3/4] automation: introduce stretch-i386.dockerfile

automation/build/debian/stretch-i386.dockerfile

Quoted 9 lines · Wei Liu
automation/build/debian/stretch-i386.dockerfile new file +1 -0
new file mode 100644
index 0000000000..add2204535
 
+        texinfo \

If
https://lists.xenproject.org/archives/html/xen-devel/2018-07/msg00810.html
gets accepted then we need to drop this. Otherwise looks good.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#9 lore raw

PATCH v2 4/4 automation: build more stuff on x86 with docker

In reply to Wei Liu

---
Untested

---
 automation/scripts/build | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
automation/scripts/build +1 -5
index b90fc43d26..b9e4c1e329 100755
@@ -11,8 +11,6 @@ fi
 
 # build up our configure options
 cfgargs=()
-cfgargs+=("--disable-stubdom") # more work needed into building this
-cfgargs+=("--disable-rombios")
 cfgargs+=("--enable-docs")
 
 # SeaBIOS cannot be built with clang
@@ -20,9 +18,7 @@ if [[ "${CC}" == "clang" ]]; then
     cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
 fi
 
-if [[ "${XEN_TARGET_ARCH}" == "x86_64" ]]; then
-    cfgargs+=("--enable-tools")
-else
+if [[ "${XEN_TARGET_ARCH}" == "arm64" || "${XEN_TARGET_ARCH}" == "arm32" ]]; then
     cfgargs+=("--disable-tools") # we don't have the cross depends installed
 fi
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel