From 9c86ce9fbb34900b93e53eb47d42b96ff3103672 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 2 Mar 2013 16:02:15 +0000 Subject: [PATCH] genorig: Accept xz-compressed upstream tarballs and patches, thanks to Sedat Dilek svn path=/dists/trunk/linux/; revision=19885 --- debian/bin/genorig.py | 14 ++++++-------- debian/changelog | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index 6ec909161..f780d42b2 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -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'(^|.*/)(?Plinux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P(bz2|gz)))?$', input_tar) + match = re.match(r'(^|.*/)(?Plinux-\d+\.\d+(\.\d+)?(-\S+)?)\.tar(\.(?P(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(bz2|gz)))?$', input_patch) + match = re.match(r'(^|.*/)patch-\d+\.\d+\.\d+(-\S+?)?(\.(?P(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) diff --git a/debian/changelog b/debian/changelog index 2c18b44eb..e15b754a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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.