Source: debdelta
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: umask
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Several files in debdelta and debdelta-doc use the umask of the build
environment and end up in the package with inconsistent mode as a
result.

Affected files in /usr/share/debdelta-doc/html/* in debdelta-doc and
/usr/share/debdelta/debmirror*.patch in debdelta.

The attached patch sets the modes of these files appropriately, enabling
reproducible builds for debdelta.


Thanks for maintaining debdelta!


live well,
  vagrant
From 68b5ee2b286b013584c38048c8951f5a90569487 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Fri, 25 Sep 2020 01:43:50 +0000
Subject: [PATCH] Ensure correct mode of html documentation and shipped
 patches.

This ensures reproducible builds regardless of the umask.
---
 debdelta/debian/rules | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/debdelta/debian/rules b/debdelta/debian/rules
index f103fbf..9d47190 100755
--- a/debdelta/debian/rules
+++ b/debdelta/debian/rules
@@ -68,6 +68,9 @@ binary-indep:	checkroot build
 	chown -R root:root $(D2)
 	find debian/debdelta-doc -newermt '$(BUILD_DATE)' -print0 | \
 		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
+	# Ensure correct mode for files for reproducible builds
+	chmod -c 0755 $(docdir2doc)/html/
+	chmod -c 0644 $(docdir2doc)/html/*
 	dpkg-deb --build $(D2) ..
 
 binary-arch:	checkroot build
@@ -117,6 +120,8 @@ binary-arch:	checkroot build
 	chown -R root:root $(D)
 	find debian/debdelta -newermt '$(BUILD_DATE)' -print0 | \
 		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
+	# Ensure correct mode for files for reproducible builds
+	chmod -c 0644 $(D)/usr/share/debdelta/*.patch
 	dpkg-deb --build $(D) ..
 
 define checkdir
-- 
2.28.0

Attachment: signature.asc
Description: PGP signature

Reply via email to