From 99f4a6062255b3622afc810fd6d69a51bfe2eda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= Date: Sun, 28 Dec 2014 12:52:01 +0100 Subject: Use debian/changelog timestamp as mtime for devices.tar members (Closes: #774069) We also remove the timestamp in gzip header. This enables debootstap to be built reproducibly. Signed-off-by: Cyril Brulebois --- Makefile | 3 ++- debian/changelog | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f70f35..c2d93aa 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ # avoid dpkg-dev dependency; fish out the version with sed VERSION := $(shell sed 's/.*(\(.*\)).*/\1/; q' debian/changelog) +DATE := $(shell sed -n '/^ -- /{s/.*> \(.*\)/\1/p;q}' debian/changelog) MAKEDEV := /sbin/MAKEDEV @@ -35,7 +36,7 @@ devices.tar.gz: chown 0:0 dev chmod 755 dev (cd dev && $(MAKEDEV) std ptmx fd consoleonly) - tar cf - dev | gzip -9 >devices.tar.gz + tar --mtime="$(DATE)" -cf - dev | gzip -9n >devices.tar.gz @if [ "$$(tar tvf devices.tar.gz | wc -l)" -lt 2 ]; then \ echo " ** devices.tar.gz is empty!" >&2; \ exit 1; \ diff --git a/debian/changelog b/debian/changelog index 6095d86..925c8c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +debootstrap (1.0.67) UNRELEASED; urgency=medium + + * Apply patch by Jérémy Bobbio to support reproducible builds: specify + a modification time on the tar side, and add the -n option to gzip + (Closes: #774069). Thanks, Jérémy! + + -- Cyril Brulebois Mon, 29 Dec 2014 15:01:57 +0100 + debootstrap (1.0.66) unstable; urgency=low [ Cyril Brulebois ] -- cgit v0.12