Skip to content

Commit

Permalink
Merge pull request moby#13601 from tianon/precise
Browse files Browse the repository at this point in the history
Finally add precise/12.04 as a build-deb target
  • Loading branch information
Jessie Frazelle committed May 29, 2015
2 parents ec16797 + 98180b8 commit d96ca04
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
21 changes: 20 additions & 1 deletion contrib/builder/deb/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ for version in "${versions[@]}"; do

echo >> "$version/Dockerfile"

extraBuildTags=

# this list is sorted alphabetically; please keep it that way
packages=(
bash-completion # for bash-completion debhelper integration
Expand All @@ -54,6 +56,23 @@ for version in "${versions[@]}"; do
libdevmapper-dev # for "libdevmapper.h"
libsqlite3-dev # for "sqlite3.h"
)

if [ "$suite" = 'precise' ]; then
# precise has a few package issues

# - dh-systemd doesn't exist at all
packages=( "${packages[@]/dh-systemd}" )

# - libdevmapper-dev is missing critical structs (too old)
packages=( "${packages[@]/libdevmapper-dev}" )
extraBuildTags+=' exclude_graphdriver_devicemapper'

# - btrfs-tools is missing "ioctl.h" (too old), so it's useless
# (since kernels on precise are old too, just skip btrfs entirely)
packages=( "${packages[@]/btrfs-tools}" )
extraBuildTags+=' exclude_graphdriver_btrfs'
fi

echo "RUN apt-get update && apt-get install -y ${packages[*]} --no-install-recommends && rm -rf /var/lib/apt/lists/*" >> "$version/Dockerfile"

echo >> "$version/Dockerfile"
Expand All @@ -65,5 +84,5 @@ for version in "${versions[@]}"; do
echo >> "$version/Dockerfile"

echo 'ENV AUTO_GOPATH 1' >> "$version/Dockerfile"
awk '$1 == "ENV" && $2 == "DOCKER_BUILDTAGS" { print; exit }' ../../../Dockerfile >> "$version/Dockerfile"
awk '$1 == "ENV" && $2 == "DOCKER_BUILDTAGS" { print $0 "'"$extraBuildTags"'"; exit }' ../../../Dockerfile >> "$version/Dockerfile"
done
14 changes: 14 additions & 0 deletions contrib/builder/deb/ubuntu-debootstrap-precise/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# THIS FILE IS AUTOGENERATED; SEE "contrib/builder/deb/generate.sh"!
#

FROM ubuntu-debootstrap:precise

RUN apt-get update && apt-get install -y bash-completion build-essential curl ca-certificates debhelper git libapparmor-dev libsqlite3-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*

ENV GO_VERSION 1.4.2
RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local
ENV PATH $PATH:/usr/local/go/bin

ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS apparmor selinux exclude_graphdriver_devicemapper exclude_graphdriver_btrfs
2 changes: 1 addition & 1 deletion hack/make/.build-deb/rules
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ override_dh_installudev:
dh_installudev --priority=z80

%:
dh $@ --with=systemd,bash-completion
dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)

0 comments on commit d96ca04

Please sign in to comment.