[kernel] r19351 - in dists/trunk/linux-tools/debian: . bin source

Ben Hutchings benh at alioth.debian.org
Tue Aug 21 04:49:37 UTC 2012


Author: benh
Date: Tue Aug 21 04:49:15 2012
New Revision: 19351

Log:
Add xz support, thanks to Sedat Dilek

Added:
   dists/trunk/linux-tools/debian/source/options
Modified:
   dists/trunk/linux-tools/debian/bin/genorig.py
   dists/trunk/linux-tools/debian/changelog
   dists/trunk/linux-tools/debian/rules

Modified: dists/trunk/linux-tools/debian/bin/genorig.py
==============================================================================
--- dists/trunk/linux-tools/debian/bin/genorig.py	Tue Aug 21 03:50:56 2012	(r19350)
+++ dists/trunk/linux-tools/debian/bin/genorig.py	Tue Aug 21 04:49:15 2012	(r19351)
@@ -66,7 +66,7 @@
         self.log('Using source name %s, version %s, dfsg %s\n' % (source, version.upstream, self.version_dfsg))
 
         self.orig = '%s-%s' % (source, version.upstream)
-        self.orig_tar = '%s_%s.orig.tar.gz' % (source, version.upstream)
+        self.orig_tar = '%s_%s.orig.tar.xz' % (source, version.upstream)
         self.tag = 'v' + re.sub(r"^(\d+\.\d+)\.0", r"\1",
                                 version.upstream.replace('~', '-'))
 
@@ -92,7 +92,7 @@
                                          '--prefix=temp/', 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)
 
         ret1 = archive_proc.wait()
@@ -102,15 +102,11 @@
 
     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")
@@ -119,7 +115,7 @@
 
     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 = []
@@ -127,6 +123,8 @@
             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)
@@ -177,7 +175,7 @@
         except OSError:
             pass
         self.log("Generate tarball %s\n" % out)
-        cmdline = ['tar -czf', out, '-C', self.dir, self.orig]
+        cmdline = ['tar -caf', out, '-C', self.dir, self.orig]
         try:
             if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]):
                 raise RuntimeError("Can't patch source")

Modified: dists/trunk/linux-tools/debian/changelog
==============================================================================
--- dists/trunk/linux-tools/debian/changelog	Tue Aug 21 03:50:56 2012	(r19350)
+++ dists/trunk/linux-tools/debian/changelog	Tue Aug 21 04:49:15 2012	(r19351)
@@ -1,3 +1,11 @@
+linux-tools (3.5-1~experimental.2) UNRELEASED; urgency=low
+
+  * genorig: Accept xz-compressed upstream tarballs and patches, and
+    generate an xz-compressed orig tarball, thanks to Sedat Dilek
+  * source: Enable xz-compression for debian directory tarball
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Tue, 21 Aug 2012 05:05:42 +0100
+
 linux-tools (3.5-1~experimental.1) experimental; urgency=low
 
   * New upstream release

Modified: dists/trunk/linux-tools/debian/rules
==============================================================================
--- dists/trunk/linux-tools/debian/rules	Tue Aug 21 03:50:56 2012	(r19350)
+++ dists/trunk/linux-tools/debian/rules	Tue Aug 21 04:49:15 2012	(r19351)
@@ -20,7 +20,7 @@
 	@[ -d $@ ] || mkdir $@
 
 DIR_ORIG = ../orig/$(SOURCE)-$(VERSION)
-TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz
+TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.xz
 TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
 
 orig: $(DIR_ORIG)
@@ -31,7 +31,7 @@
 	$(error Cannot find orig tarball $(TAR_ORIG_NAME))
 else
 	mkdir -p ../orig
-	tar -C ../orig -xzf $(TAR_ORIG)
+	tar -C ../orig -xaf $(TAR_ORIG)
 endif
 
 maintainerclean:

Added: dists/trunk/linux-tools/debian/source/options
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-tools/debian/source/options	Tue Aug 21 04:49:15 2012	(r19351)
@@ -0,0 +1 @@
+compression = "xz"



More information about the Kernel-svn-changes mailing list