[lintian] 02/04: coll: Explicitly tell tar to ignore user+perms on extraction
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit a0b2667528bd1ecedcebab602b6dd01bd1c96595
Author: Niels Thykier <niels@thykier.net>
Date: Mon Oct 6 21:53:39 2014 +0200
coll: Explicitly tell tar to ignore user+perms on extraction
This is the default for tar (except for extracting as root), but it
never hurt to be explicit.
Signed-off-by: Niels Thykier <niels@thykier.net>
---
collection/bin-pkg-control | 7 ++++++-
collection/unpacked | 6 +++++-
debian/changelog | 3 +++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/collection/bin-pkg-control b/collection/bin-pkg-control
index 0db1779..497beaf 100755
--- a/collection/bin-pkg-control
+++ b/collection/bin-pkg-control
@@ -58,7 +58,12 @@ sub collect {
$job = { fail => 'error', err => "$dir/control-errors" };
push @jobs, $job;
# extract the tarball's contents
- spawn($job, ['tar', '-mxf', "$dir/control.tar", '-C', "$dir/control", '&']);
+ spawn(
+ $job,
+ [
+ 'tar', '--no-same-owner','--no-same-permissions', '-mxf',
+ "$dir/control.tar", '-C',"$dir/control", '&'
+ ]);
$job = {
fail => 'error',
diff --git a/collection/unpacked b/collection/unpacked
index dcdbe24..77acf71 100755
--- a/collection/unpacked
+++ b/collection/unpacked
@@ -157,7 +157,11 @@ sub extract_and_index_deb {
@jobs,
{
'fail' => 'error',
- '_pipeline' => [['tar', '-mxf', '-', '-C', "$dir/unpacked"]],
+ '_pipeline' => [[
+ 'tar', '--no-same-owner', '--no-same-permissions', '-mxf',
+ '-', '-C', "$dir/unpacked"
+ ]
+ ],
'pipe_in' => FileHandle->new,
'err' => "$dir/unpacked-errors",
});
diff --git a/debian/changelog b/debian/changelog
index fe40557..36cf228 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ lintian (2.5.29) UNRELEASED; urgency=medium
timestamp of the extracted files. Lintian does not need
it for correctness, so it can make tar save a few syscalls
here.
+ + [NT] Explicitly pass tar options to make it extract files
+ as the current user and applying the users umask. This is
+ mostly to be explicit about how things are extracted.
-- Niels Thykier <niels@thykier.net> Thu, 02 Oct 2014 22:22:31 +0200
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: