Jérémy Bobbio:
> The attached patch is based on the available master branch.

I apologize. Here it is.

-- 
Lunar                                .''`. 
lu...@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
From 3f0b7accdbdf908fa56e3ba4607d749f10670783 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lu...@debian.org>
Date: Sun, 7 Jun 2015 10:16:50 +0000
Subject: [PATCH] Normalize file permissions when creating control.tar

Permissions of file in control.tar will likely be affected by a
different umask. While `dh_fixperms` already normalizes permissions for
most packages, debhelper is not used by everywhere. As there is no use
cases for having different permissions for control files than 644 or
755, we can normalize them directly in dpkg.

This helps packages to build reproducibly when built with different
umasks.
---
 dpkg-deb/build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 94d75ff..343e008 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -504,7 +504,7 @@ do_build(const char *const *argv)
       ohshite(_("failed to chdir to '%.255s'"), dir);
     if (chdir(BUILDCONTROLDIR))
       ohshite(_("failed to chdir to '%.255s'"), ".../DEBIAN");
-    execlp(TAR, "tar", "-cf", "-", "--format=gnu", ".", NULL);
+    execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--mode=go=rX,u+rw,a-s", ".", NULL);
     ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
   }
   close(p1[1]);
-- 
2.1.4

Attachment: signature.asc
Description: Digital signature

Reply via email to