Skip to contentSkip to conversation

Improvements to docker-based build automation

RFC PATCH Superseded Wei Liu 3 participants 10 messages May 23, 2018 – Jul 6, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

cover Improvements to docker-based build automation

RFC because I haven't tested all dockerfiles.

Wei Liu (3):
automation: install texinfo in debian
automation: build stubdom and rombios, and tools on 32 bit
automation: introduce stretch-i386.dockerfile

 automation/build/debian/jessie.dockerfile       |  1 +
 automation/build/debian/stretch-i386.dockerfile | 50 +++++++++++++++++++++++++
 automation/build/debian/stretch.dockerfile      |  1 +
 automation/scripts/build                        |  8 ----
 4 files changed, 52 insertions(+), 8 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

RFC PATCH 1/3 automation: install texinfo in debian

Stubdom build requires that.

---
 automation/build/debian/jessie.dockerfile  | 1 +
 automation/build/debian/stretch.dockerfile | 1 +
 2 files changed, 2 insertions(+)
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 && \
Signature · 7 lines
2.11.0


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

Re: [PATCH RFC 1/3] automation: install texinfo in debian

Quoted 2 lines · Wei Liu

Stubdom build requires that.

CentOS & Ubuntu will need the change too. Though in a way I'd almost ask why --enable-docs doesn't need it but stubdoms do? Seems like a weird dep for stubdom...

Signature · 6 lines
Doug Goldstein

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

Re: [PATCH RFC 1/3] automation: install texinfo in debian

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

Stubdom build requires that.

CentOS & Ubuntu will need the change too. Though in a way I'd almost ask why --enable-docs doesn't need it but stubdoms do? Seems like a weird dep for stubdom...

It is needed by newlib IIRC.

Wei.

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

author
#4 lore raw

RFC PATCH 2/3 automation: build stubdom and rombios, and tools on 32 bit

In reply to Wei Liu

Now we're using docker to build. They shouldn't be a problem anymore.

---
RFC because I haven't tested if other dockerfiles need changes.

---
 automation/scripts/build | 8 --------
 1 file changed, 8 deletions(-)
automation/scripts/build +0 -8
index b90fc43d26..21fb029e8a 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,12 +18,6 @@ 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
-    cfgargs+=("--disable-tools") # we don't have the cross depends installed
-fi
-
 ./configure "${cfgargs[@]}"
 
 make dist
Signature · 7 lines
2.11.0


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

Re: [PATCH RFC 2/3] automation: build stubdom and rombios, and tools on 32 bit

automation/scripts/build if [[ "${CC}" == "clang" ]]; then · line 28

Quoted 12 lines · Wei Liu

# SeaBIOS cannot be built with clang

automation/scripts/build +0 -6
@@ -20,12 +18,6 @@ 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
-    cfgargs+=("--disable-tools") # we don't have the cross depends installed
-fi
-

This still horribly fails when targeting arm because we have to actually execute a compiled binary on the host. The tools build system doesn't seem to comprehend host != target.

A few people have stepped forward with ideas and said they'd take point on the patches but I haven't seen anything land yet.

Signature · 6 lines
Doug Goldstein

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

Re: [PATCH RFC 2/3] automation: build stubdom and rombios, and tools on 32 bit

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

# SeaBIOS cannot be built with clang

automation/scripts/build +0 -0
@@ -20,12 +18,6 @@ if [[ "${CC}" == "clang" ]]; then
     cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
 fi
 
Quoted 11 lines

automation/scripts/build if [[ "${CC}" == "clang" ]]; then · line 28

Quoted 6 lines
automation/scripts/build +0 -6
-if [[ "${XEN_TARGET_ARCH}" == "x86_64" ]]; then
-    cfgargs+=("--enable-tools")
-else
-    cfgargs+=("--disable-tools") # we don't have the cross depends installed
-fi
-

This still horribly fails when targeting arm because we have to actually execute a compiled binary on the host. The tools build system doesn't seem to comprehend host != target.

OK. Let's only enable tools build for x86 for now.

Quoted 3 lines

A few people have stepped forward with ideas and said they'd take point on the patches but I haven't seen anything land yet.

Any reference?

Wei.

Quoted 2 lines
Signature · 1 line
Doug Goldstein

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

#7 lore raw

Re: [PATCH RFC 2/3] automation: build stubdom and rombios, and tools on 32 bit

Quoted 23 lines · Wei Liu
Quoted 8 lines · Doug Goldstein
Quoted 6 lines · Wei Liu

# SeaBIOS cannot be built with clang

automation/scripts/build +0 -0
@@ -20,12 +18,6 @@ if [[ "${CC}" == "clang" ]]; then
     cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
 fi
 
Quoted 11 lines

automation/scripts/build if [[ "${CC}" == "clang" ]]; then · line 28

Quoted 6 lines
automation/scripts/build +0 -6
-if [[ "${XEN_TARGET_ARCH}" == "x86_64" ]]; then
-    cfgargs+=("--enable-tools")
-else
-    cfgargs+=("--disable-tools") # we don't have the cross depends installed
-fi
-

This still horribly fails when targeting arm because we have to actually execute a compiled binary on the host. The tools build system doesn't seem to comprehend host != target.

OK. Let's only enable tools build for x86 for now.

Quoted 7 lines
Quoted 3 lines

A few people have stepped forward with ideas and said they'd take point on the patches but I haven't seen anything land yet.

Any reference?

Wei.

Stefano originally offered I believe. He also offered to help with some of the bits again at the Summit. Matt Spencer suggested that ARM could help out with info on how to build the containers and potentially some resources where they could run as well.

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

#8 lore raw

Re: [PATCH RFC 2/3] automation: build stubdom and rombios, and tools on 32 bit

Quoted 28 lines · Doug Goldstein
Quoted 27 lines · Wei Liu
Quoted 8 lines · Doug Goldstein
Quoted 6 lines · Wei Liu

# SeaBIOS cannot be built with clang

automation/scripts/build +0 -0
@@ -20,12 +18,6 @@ if [[ "${CC}" == "clang" ]]; then
     cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
 fi
 
Quoted 11 lines

automation/scripts/build if [[ "${CC}" == "clang" ]]; then · line 28

Quoted 6 lines
automation/scripts/build +0 -6
-if [[ "${XEN_TARGET_ARCH}" == "x86_64" ]]; then
-    cfgargs+=("--enable-tools")
-else
-    cfgargs+=("--disable-tools") # we don't have the cross depends installed
-fi
-

This still horribly fails when targeting arm because we have to actually execute a compiled binary on the host. The tools build system doesn't seem to comprehend host != target.

OK. Let's only enable tools build for x86 for now.

Quoted 3 lines

A few people have stepped forward with ideas and said they'd take point on the patches but I haven't seen anything land yet.

Quoted 6 lines
Quoted 3 lines

Any reference?

Wei.

Stefano originally offered I believe. He also offered to help with some of the bits again at the Summit.

Yes, containerized builds and stubdoms support are on the ViryaOS roadmap (as mentioned in my talk). We are not there yet, but we should have something to share by the end of the year.

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

author
#9 lore raw

RFC PATCH 3/3 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