Merge pull request #13601 from tianon/precise

Finally add precise/12.04 as a build-deb target
This commit is contained in:
Jessie Frazelle 2015-05-29 14:35:07 -07:00
commit d96ca04f24
3 changed files with 35 additions and 2 deletions

View file

@ -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
@ -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"
@ -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

View file

@ -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

View file

@ -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)