Package: devscripts Version: 2.11.1 Severity: wishlist Tags: patch Hello,
Now that the source format 3.0 (quilt) supports upstream tarballs compressed with LZMA or XZ, it would be nice to support it with uscan: here is a git-formatted patch for that. You can apply it with: $ git am 0001-Updated-uscan-to-support-orig.tar.-lzma-xz.patch Regards, -- Tanguy Ortolo -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- DEBEMAIL="tanguy+deb...@ortolo.eu" DEBSIGN_KEYID=4B10D847 USCAN_SYMLINK=rename -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.39-2-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages devscripts depends on: ii dpkg-dev 1.16.0.3 Debian package development tools ii libc6 2.13-7 Embedded GNU C Library: Shared lib ii perl 5.12.3-7+b1 Larry Wall's Practical Extraction ii python 2.6.6-14 interactive high-level object-orie ii python2.6 2.6.6-10 An interactive high-level object-o ii python2.7 2.7.1-8 An interactive high-level object-o Versions of packages devscripts recommends: ii at 3.1.12-1 Delayed job execution and batch pr ii curl 7.21.6-1 Get a file from an HTTP, HTTPS or pn dctrl-tools <none> (no description available) pn debian-keyring <none> (no description available) pn debian-maintainers <none> (no description available) ii dput 0.9.6.2 Debian package upload tool ii dupload 2.7.0 utility to upload Debian packages pn equivs <none> (no description available) ii fakeroot 1.16-1 tool for simulating superuser priv ii gnupg 1.4.11-3 GNU privacy guard - a free PGP rep ii libcrypt-ssleay-perl 0.57-2+b2 Support for https protocol in LWP ii libjson-perl 2.53-1 module for manipulating JSON-forma pn libparse-debcontrol-perl <none> (no description available) pn libsoap-lite-perl <none> (no description available) ii liburi-perl 1.58-1 module to manipulate and access UR ii libwww-perl 6.02-1 simple and consistent interface to ii lintian 2.5.0 Debian package checker ii man-db 2.6.0.2-1 on-line manual pager ii patch 2.6.1-2 Apply a diff file to an original pn patchutils <none> (no description available) ii python-debian 0.1.20 Python modules to work with Debian ii python-magic 5.04-5+b1 File type determination library us ii sensible-utils 0.0.6 Utilities for sensible alternative pn strace <none> (no description available) ii unzip 6.0-4 De-archiver for .zip files pn wdiff <none> (no description available) ii wget 1.12-3.1 retrieves files from the web ii xz-utils 5.0.0-2 XZ-format compression utilities Versions of packages devscripts suggests: ii bsd-mailx [mailx] 8.1.2-0.20100314cvs-1 simple mail user agent ii build-essential 11.5 Informational list of build-essent pn cvs-buildpackage <none> (no description available) pn devscripts-el <none> (no description available) pn gnuplot <none> (no description available) pn libauthen-sasl-per <none> (no description available) ii libfile-desktopent 0.04-2 Perl module to handle freedesktop pn libnet-smtp-ssl-pe <none> (no description available) ii libterm-size-perl 0.2-4+b2 Perl extension for retrieving term ii libtimedate-perl 1.2000-1 collection of modules to manipulat pn libyaml-syck-perl <none> (no description available) ii mutt 1.5.21-5 text-based mailreader supporting M ii openssh-client [ss 1:5.5p1-6 secure shell (SSH) client, for sec pn svn-buildpackage <none> (no description available) ii w3m 0.5.3-2+b1 WWW browsable pager with excellent -- no debconf information
>From 7ad081ba76a3ac140ad8e3bdbdf78c4615326505 Mon Sep 17 00:00:00 2001 From: Tanguy Ortolo <tan...@ortolo.eu> Date: Sun, 26 Jun 2011 15:09:26 +0200 Subject: [PATCH] Updated uscan to support orig.tar.{lzma|xz}. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.7.5.4" This is a multi-part message in MIME format. --------------1.7.5.4 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- scripts/uscan.pl | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 86 insertions(+), 5 deletions(-) --------------1.7.5.4 Content-Type: text/x-patch; name="0001-Updated-uscan-to-support-orig.tar.-lzma-xz.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Updated-uscan-to-support-orig.tar.-lzma-xz.patch" diff --git a/scripts/uscan.pl b/scripts/uscan.pl index c1599d3..e361efb 100755 --- a/scripts/uscan.pl +++ b/scripts/uscan.pl @@ -92,9 +92,10 @@ Options: servers to respond (default 20 seconds) --symlink Make an orig.tar.gz symlink to downloaded file (default) --rename Rename to orig.tar.gz instead of symlinking - (Both will use orig.tar.bz2 if appropriate) - --repack Repack downloaded archives from orig.tar.bz2 or orig.zip to - orig.tar.gz + (Both will use orig.tar.bz2, orig.tar.lzma or orig.tar.xz if + appropriate) + --repack Repack downloaded archives from orig.tar.bz2, orig.tar.lzma, + orig.tar.xz or orig.zip to orig.tar.gz (does nothing if downloaded archive orig.tar.gz) --no-symlink Don\'t make symlink or rename --verbose Give verbose output @@ -164,7 +165,7 @@ my $download = 1; my $download_version; my $force_download = 0; my $report = 0; # report even on up-to-date packages? -my $repack = 0; # repack .tar.bz2 or .zip to .tar.gz +my $repack = 0; # repack .tar.bz2, .tar.lzma, .tar.xz or .zip to .tar.gz my $symlink = 'symlink'; my $verbose = 0; my $check_dirname_level = 1; @@ -1264,6 +1265,16 @@ EOF if $verbose or ($download == 0 and ! $dehs); return 0; } + elsif (-f "$destdir/${pkg}_${newversion}.orig.tar.lzma") { + print " => ${pkg}_${newversion}.orig.tar.lzma already in package directory '$destdir'\n" + if $verbose or ($download == 0 and ! $dehs); + return 0; + } + elsif (-f "$destdir/${pkg}_${newversion}.orig.tar.xz") { + print " => ${pkg}_${newversion}.orig.tar.xz already in package directory '$destdir'\n" + if $verbose or ($download == 0 and ! $dehs); + return 0; + } } if ($force_download and $verbose) { @@ -1387,7 +1398,7 @@ EOF $newfile_base = $newfile_base_gz; } - if ($newfile_base =~ /\.(tar\.gz|tgz|tar\.bz2|tbz2?)$/) { + if ($newfile_base =~ /\.(tar\.gz|tgz|tar\.bz2|tbz2?|tar\.lzma|tar\.xz|txz)$/) { my $filetype = `file -b -k $destdir/$newfile_base`; unless ($filetype =~ /compressed data/) { warn "$progname warning: $destdir/$newfile_base does not appear to be a compressed file;\nthe file command says: $filetype\nNot processing this file any further!\n"; @@ -1409,6 +1420,20 @@ EOF move "$destdir/$newfile_base", "$destdir/${pkg}_${newversion}.orig.tar.bz2"; } } + elsif ($newfile_base =~ /\.(tar\.lzma)$/) { + if ($symlink eq 'symlink') { + symlink $newfile_base, "$destdir/${pkg}_${newversion}.orig.tar.lzma"; + } elsif ($symlink eq 'rename') { + move "$destdir/$newfile_base", "$destdir/${pkg}_${newversion}.orig.tar.lzma"; + } + } + elsif ($newfile_base =~ /\.(tar\.xz|txz)$/) { + if ($symlink eq 'symlink') { + symlink $newfile_base, "$destdir/${pkg}_${newversion}.orig.tar.xz"; + } elsif ($symlink eq 'rename') { + move "$destdir/$newfile_base", "$destdir/${pkg}_${newversion}.orig.tar.xz"; + } + } if ($verbose) { print "-- Successfully downloaded updated package $newfile_base\n"; @@ -1426,6 +1451,20 @@ EOF print " and renamed it as ${pkg}_${newversion}.orig.tar.bz2\n"; } } + elsif ($newfile_base =~ /\.(tar\.lzma)$/) { + if ($symlink eq 'symlink') { + print " and symlinked ${pkg}_${newversion}.orig.tar.lzma to it\n"; + } elsif ($symlink eq 'rename') { + print " and renamed it as ${pkg}_${newversion}.orig.tar.lzma\n"; + } + } + elsif ($newfile_base =~ /\.(tar\.xz|txz)$/) { + if ($symlink eq 'symlink') { + print " and symlinked ${pkg}_${newversion}.orig.tar.xz to it\n"; + } elsif ($symlink eq 'rename') { + print " and renamed it as ${pkg}_${newversion}.orig.tar.xz\n"; + } + } } elsif ($dehs) { my $msg = "Successfully downloaded updated package $newfile_base"; if ($newfile_base =~ /\.(tar\.gz|tgz)$/) { @@ -1448,6 +1487,26 @@ EOF $dehs_tags{'target'} = $newfile_base; } } + elsif ($newfile_base =~ /\.(tar\.lzma)$/) { + $dehs_tags{'target'} = "${pkg}_${newversion}.orig.tar.lzma"; + if ($symlink eq 'symlink') { + $msg .= " and symlinked ${pkg}_${newversion}.orig.tar.lzma to it"; + } elsif ($symlink eq 'rename') { + $msg .= " and renamed it as ${pkg}_${newversion}.orig.tar.lzma"; + } else { + $dehs_tags{'target'} = $newfile_base; + } + } + elsif ($newfile_base =~ /\.(tar\.xz|txz)$/) { + $dehs_tags{'target'} = "${pkg}_${newversion}.orig.tar.xz"; + if ($symlink eq 'symlink') { + $msg .= " and symlinked ${pkg}_${newversion}.orig.tar.xz to it"; + } elsif ($symlink eq 'rename') { + $msg .= " and renamed it as ${pkg}_${newversion}.orig.tar.xz"; + } else { + $dehs_tags{'target'} = $newfile_base; + } + } dehs_msg($msg); } else { print "$pkg: Successfully downloaded updated package $newfile_base\n"; @@ -1465,6 +1524,20 @@ EOF print " and renamed it as ${pkg}_${newversion}.orig.tar.bz2\n"; } } + elsif ($newfile_base =~ /\.(tar\.lzma)$/) { + if ($symlink eq 'symlink') { + print " and symlinked ${pkg}_${newversion}.orig.tar.lzma to it\n"; + } elsif ($symlink eq 'rename') { + print " and renamed it as ${pkg}_${newversion}.orig.tar.lzma\n"; + } + } + elsif ($newfile_base =~ /\.(tar\.xz|txz)$/) { + if ($symlink eq 'symlink') { + print " and symlinked ${pkg}_${newversion}.orig.tar.xz to it\n"; + } elsif ($symlink eq 'rename') { + print " and renamed it as ${pkg}_${newversion}.orig.tar.xz\n"; + } + } } # Do whatever the user wishes to do @@ -1479,6 +1552,14 @@ EOF and $newfile_base =~ /\.(tar\.bz2|tbz2)$/) { $usefile = "$destdir/${pkg}_${newversion}.orig.tar.bz2"; } + elsif ($symlink =~ /^(symlink|rename)$/ + and $newfile_base =~ /\.(tar\.lzma)$/) { + $usefile = "$destdir/${pkg}_${newversion}.orig.tar.lzma"; + } + elsif ($symlink =~ /^(symlink|rename)$/ + and $newfile_base =~ /\.(tar\.xz|txz)$/) { + $usefile = "$destdir/${pkg}_${newversion}.orig.tar.xz"; + } # Any symlink requests are already handled by uscan if ($action =~ /^uupdate(\s|$)/) { --------------1.7.5.4--