diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -31,8 +31,6 @@ build contrib/chg/chg contrib/hgsh/hgsh contrib/vagrant/.vagrant -contrib/packaging/docker/debian-* -contrib/packaging/docker/ubuntu-* dist packages doc/common.txt diff --git a/contrib/packaging/Makefile b/contrib/packaging/Makefile --- a/contrib/packaging/Makefile +++ b/contrib/packaging/Makefile @@ -47,50 +47,44 @@ deb: ppa: ./builddeb --source-only -docker/debian-%: docker/debian.template - sed "s/__CODENAME__/$*/" $< > $@ - .PHONY: docker-debian-jessie -docker-debian-jessie: docker/debian-jessie +docker-debian-jessie: ./dockerdeb debian jessie .PHONY: docker-debian-stretch -docker-debian-stretch: docker/debian-stretch +docker-debian-stretch: ./dockerdeb debian stretch -docker/ubuntu-%: docker/ubuntu.template - sed "s/__CODENAME__/$*/" $< > $@ - .PHONY: docker-ubuntu-trusty -docker-ubuntu-trusty: docker/ubuntu-trusty +docker-ubuntu-trusty: ./dockerdeb ubuntu trusty .PHONY: docker-ubuntu-trusty-ppa -docker-ubuntu-trusty-ppa: docker/ubuntu-trusty +docker-ubuntu-trusty-ppa: ./dockerdeb ubuntu trusty --source-only .PHONY: docker-ubuntu-xenial -docker-ubuntu-xenial: docker/ubuntu-xenial +docker-ubuntu-xenial: ./dockerdeb ubuntu xenial .PHONY: docker-ubuntu-xenial-ppa -docker-ubuntu-xenial-ppa: docker/ubuntu-xenial +docker-ubuntu-xenial-ppa: ./dockerdeb ubuntu xenial --source-only .PHONY: docker-ubuntu-artful -docker-ubuntu-artful: docker/ubuntu-artful +docker-ubuntu-artful: ./dockerdeb ubuntu artful .PHONY: docker-ubuntu-artful-ppa -docker-ubuntu-artful-ppa: docker/ubuntu-artful +docker-ubuntu-artful-ppa: ./dockerdeb ubuntu artful --source-only .PHONY: docker-ubuntu-bionic -docker-ubuntu-bionic: docker/ubuntu-bionic +docker-ubuntu-bionic: ./dockerdeb ubuntu bionic .PHONY: docker-ubuntu-bionic-ppa -docker-ubuntu-bionic-ppa: docker/ubuntu-bionic +docker-ubuntu-bionic-ppa: ./dockerdeb ubuntu bionic --source-only .PHONY: fedora20 diff --git a/contrib/packaging/docker/debian.template b/contrib/packaging/docker/debian.template --- a/contrib/packaging/docker/debian.template +++ b/contrib/packaging/docker/debian.template @@ -1,4 +1,4 @@ -FROM debian:__CODENAME__ +FROM debian:%CODENAME% RUN groupadd -g 1000 build && \ useradd -u 1000 -g 1000 -s /bin/bash -d /build -m build diff --git a/contrib/packaging/docker/ubuntu.template b/contrib/packaging/docker/ubuntu.template --- a/contrib/packaging/docker/ubuntu.template +++ b/contrib/packaging/docker/ubuntu.template @@ -1,4 +1,4 @@ -FROM ubuntu:__CODENAME__ +FROM ubuntu:%CODENAME% RUN groupadd -g 1000 build && \ useradd -u 1000 -g 1000 -s /bin/bash -d /build -m build diff --git a/contrib/packaging/dockerdeb b/contrib/packaging/dockerdeb --- a/contrib/packaging/dockerdeb +++ b/contrib/packaging/dockerdeb @@ -15,7 +15,10 @@ CONTAINER=hg-docker-$PLATFORM DOCKER=$($BUILDDIR/hg-docker docker-path) -$BUILDDIR/hg-docker build $BUILDDIR/docker/$PLATFORM $CONTAINER +$BUILDDIR/hg-docker build \ + --build-arg CODENAME=$CODENAME \ + $BUILDDIR/docker/$DISTID.template \ + $CONTAINER # debuild only appears to be able to save built debs etc to .., so we # have to share the .. of the current directory with the docker