[dpkg] 01/01: Cleaner way of normalizing control.tar but not data.tar
Ximin Luo
infinity0 at debian.org
Fri Sep 16 19:40:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit c91ae35c572df765963185541cb1ce5fd83bfcf6
Author: Ximin Luo <infinity0 at debian.org>
Date: Fri Sep 16 21:36:12 2016 +0200
Cleaner way of normalizing control.tar but not data.tar
--mode=+ (or --mode=-) is a nop according to syntax described in `man chmod`;
you can also verify this via:
$ touch lol && ls -og lol
-rw-r--r-- 1 0 Sep 16 21:38 lol
$ tar -cJ --mode=a+x -f lol.tar lol && tar -tvvf lol.tar
-rwxr-xr-x infinity0/infinity0 0 2016-09-16 21:38 lol
$ tar -cJ --mode=+ -f lol.tar lol && tar -tvvf lol.tar
-rw-r--r-- infinity0/infinity0 0 2016-09-16 21:38 lol
---
dpkg-deb/build.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 49df9ba..b15ab90 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -446,15 +446,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
snprintf(mtime, sizeof(mtime), "@%ld", timestamp);
- if (ctrl)
- execlp(TAR, "tar", "-cf", "-", "--format=gnu",
- "--mtime", mtime, "--clamp-mtime",
- "--mode=go=rX,u+rw,a-s",
- "--null", "--no-unquote",
- "--no-recursion", "-T", "-", NULL);
- else
- execlp(TAR, "tar", "-cf", "-", "--format=gnu",
+ execlp(TAR, "tar", "-cf", "-", "--format=gnu",
"--mtime", mtime, "--clamp-mtime",
+ ctrl ? "--mode=go=rX,u+rw,a-s" : "--mode=+",
"--null", "--no-unquote",
"--no-recursion", "-T", "-", NULL);
ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
--
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