[firmware-free] 19/19: genorig.py: Make orig tarballs really reproducible
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Sun May 22 22:54:45 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository firmware-free.
commit 84519e4fdb20d17f61c3b0e0390d74b58b32a9a8
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Sun Jan 10 20:51:37 2016 +0000
genorig.py: Make orig tarballs really reproducible
- Override umask while extracting/exporting files
- Override user and group names in tarball
[bwh: Cherry-picked from firmware-nonfree commit
013238c36401354fb14d417cd89273126da8336d. Don't mention this in the
changelog since we haven't released an unreproducible tarball for this
package.]
---
debian/bin/genorig.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py
index c85495e..08fc89c 100755
--- a/debian/bin/genorig.py
+++ b/debian/bin/genorig.py
@@ -32,6 +32,7 @@ class Main(object):
def __call__(self):
import tempfile
self.dir = tempfile.mkdtemp(prefix='genorig', dir='debian')
+ old_umask = os.umask(0o022)
try:
self.upstream_export()
@@ -46,8 +47,10 @@ class Main(object):
.st_mtime))
self.delete_excluded()
+ os.umask(old_umask)
self.tar(orig_date)
finally:
+ os.umask(old_umask)
shutil.rmtree(self.dir)
def upstream_export(self):
@@ -89,7 +92,7 @@ class Main(object):
self.log("Generate tarball %s\n" % out)
cmdline = '''(cd '%s' && find '%s' -print0) |
LC_ALL=C sort -z |
- tar -C '%s' --no-recursion --null -T - --mtime '%s' -caf '%s'
+ tar -C '%s' --no-recursion --null -T - --mtime '%s' --owner root --group root -caf '%s'
''' % (self.dir, self.orig, self.dir, orig_date, out)
try:
if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', cmdline]):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/firmware-free.git
More information about the Kernel-svn-changes
mailing list