[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#819883: debootstrap: please make the build reproducible



Hi KiBi,

On Mon, Apr 04, 2016 at 11:11:26PM +0200, Cyril Brulebois wrote:
> I'm not sure it's reasonable to introduce a versioned build-dep on tar
> at this point: 1.28 is only available in sid and stretch, and we tend to
> backport debootstrap semi-regularly to stable.
> 
> Is there any chance we could detect which tar version/features we have,
> and only add --sort=name when it's fine to do so?

I attached a different patch, which isn't as nice, but works also with
older tar versions.

Regards,
  Reiner
diff --git a/Makefile b/Makefile
index 1020cbc..e317eb0 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@ devices.tar.gz:
 	chown 0:0 dev
 	chmod 755 dev
 	(cd dev && $(MAKEDEV) std ptmx fd consoleonly)
-	tar --mtime="$(DATE)" -cf - dev | gzip -9n >devices.tar.gz
+	find dev -print0 | LC_ALL=C sort -z | tar --mtime="$(DATE)" --no-recursion --null -T - -cf - | 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; \

Attachment: signature.asc
Description: PGP signature


Reply to: