Package: gdb-source
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps umask username
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The tarball produced in gdb-source binary package includes metadata from
the filesystem, including umask, timestamps, and potentially username,
group, and sort order of the files in the tarball.

The attached patch passes arguments to tar to ensure reproducible builds
of this package.

There are several outstanding reproducibility issues with the other
packages produced by gdb, but please consider applying this to improve
the signal to noise ratio.


Thanks for maintaining gdb!


live well,
  vagrant
From cb9a4e0584e3f3dca2efa25078b81b5821ef747a Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 4 Feb 2020 03:16:30 +0000
Subject: [PATCH] debian/rules: Use tar arguments to ensure consistant
 tarballs, setting file mode, uid/gid, timestamps and sort order.

---
 debian/rules | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/debian/rules b/debian/rules
index a6ad6ac71..d05d28ad7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -287,6 +287,11 @@ binary-post-install/gdb-source ::
 	cd $(BUILDDIRSOURCE) && debian/rules clean
 	cd $(dir $(BUILDDIRSOURCE)) \
 	  && tar -cjf $(shell pwd)/debian/gdb-source/usr/src/gdb.tar.bz2 \
+	     --format=gnu \
+	     --mode=755 \
+	     --mtime="@$${SOURCE_DATE_EPOCH}" --clamp-mtime \
+	     --numeric-owner --owner=0 --group=0 \
+	     --sort=name \
 	     $(notdir $(BUILDDIRSOURCE))
 
 debian/control:: debian/control.in $(CROSS_FORCE)
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to