[Reproducible-commits] [dpkg] 58/61: Normalize file permissions when creating control.tar

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 21 09:57:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit 484a02d56be36ca8a9b27cc2d5acc51e10453d85
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Thu Jun 4 18:48:28 2015 +0200

    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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index edcbf19..83fa289 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -259,7 +259,8 @@ create_control_tar(const char *dir, struct compress_params *control_compress_par
     if (chdir(BUILDCONTROLDIR))
       ohshite(_("failed to chdir to '%.255s'"), ".../DEBIAN");
     execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--null", "--no-unquote",
-                       "-T", "-", "--no-recursion", NULL);
+                       "-T", "-", "--no-recursion", "--mode=go=rX,u+rw,a-s",
+                       NULL);
     ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
   }
   close(tar_pipefd[0]);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list