From 9a928e32325c399999342fcf24d9fd3074137a90 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Fri, 16 Sep 2016 16:25:54 -0400 Subject: [PATCH] ppc64le: add files for supporting 14.04 'make debs' This PR adds the necessary files needed in order to make ubuntu 14.04 ppc64le docker debs Signed-off-by: Christopher Jones --- contrib/builder/deb/ppc64le/generate.sh | 33 ++++++++++++++++--- .../deb/ppc64le/ubuntu-trusty/Dockerfile | 24 ++++++++++++++ .../deb/ppc64le/ubuntu-xenial/Dockerfile | 2 +- 3 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 contrib/builder/deb/ppc64le/ubuntu-trusty/Dockerfile diff --git a/contrib/builder/deb/ppc64le/generate.sh b/contrib/builder/deb/ppc64le/generate.sh index 3acf7e7d22..cd669612c5 100755 --- a/contrib/builder/deb/ppc64le/generate.sh +++ b/contrib/builder/deb/ppc64le/generate.sh @@ -50,17 +50,40 @@ for version in "${versions[@]}"; do dh-apparmor # for apparmor debhelper dh-systemd # for systemd debhelper integration git # for "git commit" info in "docker -v" - golang-go # ppc64le needs go to bootstrap go libapparmor-dev # for "sys/apparmor.h" libdevmapper-dev # for "libdevmapper.h" libltdl-dev # for pkcs11 "ltdl.h" - libseccomp-dev # for "seccomp.h" & "libseccomp.so" libsqlite3-dev # for "sqlite3.h" - libsystemd-dev pkg-config # for detecting things like libsystemd-journal dynamically ) - + + # trusty uses a different go package name then xenial and newer, so track that for later + goPackage= case "$suite" in + trusty) + # ppc64le doesn't have go binaries, so install go to bootstrap go + # trusty doesn't have a ppc64le golang-go package + packages+=( golang-1.6 ) + goPackage='golang-1.6' + + packages+=( libsystemd-journal-dev ) + ;; + *) + # libseccomp isn't available until ubuntu xenial and is required for "seccomp.h" & "libseccomp.so" + packages+=( golang-go ) + goPackage='golang-go' + + packages+=( libseccomp-dev ) + packages+=( libsystemd-dev ) + ;; + esac + + # buildtags + case "$suite" in + # trusty has no seccomp package + trusty) + runcBuildTags="apparmor selinux" + ;; # ppc64le support was backported into libseccomp 2.2.3-2, # so enable seccomp by default *) @@ -84,7 +107,7 @@ for version in "${versions[@]}"; do echo ' && tar -C /usr/local -xzf golang.tar.gz \' >> "$version/Dockerfile" echo ' && rm golang.tar.gz \' >> "$version/Dockerfile" echo ' && cd /usr/local/go/src && ./make.bash 2>&1 \' >> "$version/Dockerfile" - echo ' && apt-get purge -y golang-go && apt-get autoremove -y' >> "$version/Dockerfile" + echo " && apt-get purge -y $goPackage && apt-get autoremove -y" >> "$version/Dockerfile" echo >> "$version/Dockerfile" echo 'ENV PATH $PATH:/usr/local/go/bin' >> "$version/Dockerfile" diff --git a/contrib/builder/deb/ppc64le/ubuntu-trusty/Dockerfile b/contrib/builder/deb/ppc64le/ubuntu-trusty/Dockerfile new file mode 100644 index 0000000000..a075ce8725 --- /dev/null +++ b/contrib/builder/deb/ppc64le/ubuntu-trusty/Dockerfile @@ -0,0 +1,24 @@ +# +# THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/ppc64le/generate.sh"! +# + +FROM ppc64le/ubuntu:trusty + +RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libsqlite3-dev pkg-config golang-1.6 libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* + +ENV GO_VERSION 1.7.1 +ENV GO_DOWNLOAD_URL https://golang.org/dl/go${GO_VERSION}.src.tar.gz +ENV GOROOT_BOOTSTRAP /usr/lib/go-1.6 + +RUN curl -fsSL "$GO_DOWNLOAD_URL" -o golang.tar.gz \ + && tar -C /usr/local -xzf golang.tar.gz \ + && rm golang.tar.gz \ + && cd /usr/local/go/src && ./make.bash 2>&1 \ + && apt-get purge -y golang-1.6 && apt-get autoremove -y + +ENV PATH $PATH:/usr/local/go/bin + +ENV AUTO_GOPATH 1 + +ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux +ENV RUNC_BUILDTAGS apparmor selinux diff --git a/contrib/builder/deb/ppc64le/ubuntu-xenial/Dockerfile b/contrib/builder/deb/ppc64le/ubuntu-xenial/Dockerfile index a7da27a38a..b81556b612 100644 --- a/contrib/builder/deb/ppc64le/ubuntu-xenial/Dockerfile +++ b/contrib/builder/deb/ppc64le/ubuntu-xenial/Dockerfile @@ -4,7 +4,7 @@ FROM ppc64le/ubuntu:xenial -RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git golang-go libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev libsqlite3-dev libsystemd-dev pkg-config --no-install-recommends && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libsqlite3-dev pkg-config golang-go libseccomp-dev libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* ENV GO_VERSION 1.6.3 ENV GO_DOWNLOAD_URL https://golang.org/dl/go${GO_VERSION}.src.tar.gz