[Reproducible-commits] [dpkg] 04/05: *ugly* hack to fix out patch normalizing control.tar to not affect data.tar too
Mattia Rizzolo
mattia at debian.org
Mon Aug 1 10:27:27 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit 9f29885298c6a1ec852a4f6070781dd360b1cb7c
Author: Mattia Rizzolo <mattia at debian.org>
Date: Mon Jul 4 13:30:29 2016 +0000
*ugly* hack to fix out patch normalizing control.tar to not affect data.tar too
---
dpkg-deb/build.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 80f025d..49df9ba 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -422,7 +422,7 @@ typedef void filenames_feed_func(const char *dir, int fd_out);
static void
tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
time_t timestamp,
- struct compress_params *tar_compress_params, int fd_out)
+ struct compress_params *tar_compress_params, int fd_out, bool ctrl)
{
int pipe_filenames[2], pipe_tarball[2];
pid_t pid_tar, pid_comp;
@@ -446,11 +446,17 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
snprintf(mtime, sizeof(mtime), "@%ld", timestamp);
- execlp(TAR, "tar", "-cf", "-", "--format=gnu",
+ 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",
+ "--mtime", mtime, "--clamp-mtime",
+ "--null", "--no-unquote",
+ "--no-recursion", "-T", "-", NULL);
ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
}
close(pipe_filenames[0]);
@@ -573,7 +579,7 @@ do_build(const char *const *argv)
/* Fork a tar to package the control-section of the package. */
tarball_pack(ctrldir, control_treewalk_feed, timestamp,
- &control_compress_params, gzfd);
+ &control_compress_params, gzfd, 1);
free(ctrldir);
@@ -634,7 +640,7 @@ do_build(const char *const *argv)
}
/* Pack the directory into a tarball, feeding files from the callback. */
- tarball_pack(dir, file_treewalk_feed, timestamp, &compress_params, gzfd);
+ tarball_pack(dir, file_treewalk_feed, timestamp, &compress_params, gzfd, 0);
/* Okay, we have data.tar as well now, add it to the ar wrapper. */
if (deb_format.major == 2) {
--
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