genorig: Accept xz-compressed upstream tarballs and patches, thanks to Sedat Dilek

svn path=/dists/trunk/linux/; revision=19885
This commit is contained in:
Ben Hutchings 2013-03-02 16:02:15 +00:00
parent 3161f5713d
commit 9c86ce9fbb
2 changed files with 8 additions and 8 deletions

14
debian/bin/genorig.py vendored
View File

@ -58,7 +58,7 @@ class Main(object):
'--prefix=%s/' % self.orig, self.tag],
cwd=input_repo,
stdout=subprocess.PIPE)
extract_proc = subprocess.Popen(['tar', '-xf', '-'], cwd=self.dir,
extract_proc = subprocess.Popen(['tar', '-xaf', '-'], cwd=self.dir,
stdin=archive_proc.stdout)
if extract_proc.wait():
@ -66,15 +66,11 @@ class Main(object):
def upstream_extract(self, input_tar):
self.log("Extracting tarball %s\n" % input_tar)
match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P<extension>(bz2|gz)))?$', input_tar)
match = re.match(r'(^|.*/)(?P<dir>linux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P<extension>(bz2|gz|xz)))?$', input_tar)
if not match:
raise RuntimeError("Can't identify name of tarball")
cmdline = ['tar', '-xf', input_tar, '-C', self.dir]
if match.group('extension') == 'bz2':
cmdline.append('-j')
elif match.group('extension') == 'gz':
cmdline.append('-z')
cmdline = ['tar', '-xaf', input_tar, '-C', self.dir]
if subprocess.Popen(cmdline).wait():
raise RuntimeError("Can't extract tarball")
@ -83,7 +79,7 @@ class Main(object):
def upstream_patch(self, input_patch):
self.log("Patching source with %s\n" % input_patch)
match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz)))?$', input_patch)
match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P<extension>(bz2|gz|xz)))?$', input_patch)
if not match:
raise RuntimeError("Can't identify name of patch")
cmdline = []
@ -91,6 +87,8 @@ class Main(object):
cmdline.append('bzcat')
elif match.group('extension') == 'gz':
cmdline.append('zcat')
elif match.group('extension') == 'xz':
cmdline.append('xzcat')
else:
cmdline.append('cat')
cmdline.append(input_patch)

2
debian/changelog vendored
View File

@ -6,6 +6,8 @@ linux (3.8.1-1~experimental.1) UNRELEASED; urgency=low
[ Ben Hutchings ]
* linux-image: Increase minimum version of initramfs-tools to 0.110~
which copes with the recently renamed EHCI and NFS modules
* genorig: Accept xz-compressed upstream tarballs and patches,
thanks to Sedat Dilek
[ Aurelien Jarno ]
* [mips/octeon] Change HW_RANDOM and HW_RANDOM_OCTEON to modules.