Bug#757194: [uscan] manpage example for GitHub incorrectly names downloaded file
Anthony Fok
foka at debian.org
Wed Aug 6 06:46:00 UTC 2014
Package: devscripts
Version: 2.14.6
Severity: normal
File: /usr/share/man/man1/uscan.1.gz
Hello,
In the uscan.1 manpage, the current sample entry for fetching new upstream
tarball from GitHub seems to be problematic. While it correctly finds the new
upstream version, e.g. "vX.Y.Z.tar.gz", it would incorrectly name the
downloaded file "projectname-Z.tar.gz".
Fortunately, https://wiki.debian.org/debian/watch has an updated sample entry
for GitHub:
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/<project>-$1\.tar\.gz/ \
https://github.com/<user>/<project>/tags .*/v?(\d\S*)\.tar\.gz
which correctly names the downloaded file as "projectname-X.Y.Z.tar.gz".
Using
opts="filenamemangle=s/.+\/v? ..."
rather than
opts="filenamemangle=s/(?:.*)?v? ..."
fixes the issue for me.
Note that Bart Martens made other fixes too to the version on Wiki, e.g.
changing (\d[\d.]*) and (\d[\d\.]+) to (\d\S*), as shown in:
https://wiki.debian.org/debian/watch?action=diff&rev1=37&rev2=38
I wish I had more time to look into this in depth, but Real Life beckons, and
I'd better get back to my other works. :-)
==================
Steps to reproduce
==================
1. Following this example in the current uscan.1 manpage:
opts="filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/<project>-$1.tar.gz/" \
https://github.com/<user>/<project>/tags (?:.*/)?v?(\d[\d\.]*)\.tar\.gz
I wrote a debian/watch file like so:
version=3
opts="filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/frescobaldi-$1.tar.gz/" \
https://github.com/wbsoft/frescobaldi/tags (?:.*/)?v?(\d[\d\.]*)\.tar\.gz
Now, if I run uscan, I get this:
$ uscan
frescobaldi: Newer version (2.0.16) available on remote site:
https://github.com/wbsoft/frescobaldi/archive/v2.0.16.tar.gz
(local version is 2.0.13+ds1)
Successfully downloaded updated package frescobaldi-6.tar.gz
Successfully symlinked ../frescobaldi-6.tar.gz to
../frescobaldi_2.0.16.orig.tar.gz.
==================
Expected behaviour
==================
Now, following the example on https://wiki.debian.org/debian/watch instead:
version=3
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/frescobaldi-$1\.tar\.gz/ \
https://github.com/wbsoft/frescobaldi/tags .*/v?(\d\S*)\.tar\.gz
the resulting tarball is named correctly:
frescobaldi: Newer version (2.0.16) available on remote site:
https://github.com/wbsoft/frescobaldi/archive/v2.0.16.tar.gz
(local version is 2.0.13+ds1)
Successfully downloaded updated package frescobaldi-2.0.16.tar.gz
Successfully symlinked ../frescobaldi-2.0.16.tar.gz to
../frescobaldi_2.0.16.orig.tar.gz.
Thanks for looking into this!
Anthony
-- Package-specific info:
--- /etc/devscripts.conf ---
--- ~/.devscripts ---
DEBCHANGE_RELEASE_HEURISTIC=changelog
DEBUILD_DPKG_BUILDPACKAGE_OPTS=-k12C59ACF
DEBUILD_LINTIAN_OPTS="-i -I --show-overrides"
DEBSIGN_KEYID=12C59ACF
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages devscripts depends on:
ii dpkg-dev 1.17.10
ii libc6 2.19-7
ii perl 5.18.2-7
ii python3 3.4.1-1
pn python3:any <none>
Versions of packages devscripts recommends:
ii at 3.1.14-1
ii curl 7.37.1-1
ii dctrl-tools 2.23
ii debian-keyring 2014.04.25
ii dput 0.9.6.4
ii equivs 2.0.9
ii fakeroot 1.20.1-1
ii file 1:5.19-1
ii gnupg 1.4.18-2
ii libdistro-info-perl 0.13
ii libencode-locale-perl 1.03-1
ii libjson-perl 2.61-1
ii liblwp-protocol-https-perl 6.06-2
ii libparse-debcontrol-perl 2.005-4
ii libsoap-lite-perl 1.11-1
ii liburi-perl 1.64-1
ii libwww-perl 6.08-1
ii lintian 2.5.25
ii man-db 2.6.7.1-1
ii patch 2.7.1-5
ii patchutils 0.3.3-1
ii python3-debian 0.1.22
ii python3-magic 1:5.19-1
ii sensible-utils 0.0.9
ii strace 4.8-1.1
ii unzip 6.0-12
ii wdiff 1.2.2-1
ii wget 1.15-1+b1
ii xz-utils 5.1.1alpha+20120614-2
Versions of packages devscripts suggests:
ii bsd-mailx [mailx] 8.1.2-0.20131005cvs-1
ii build-essential 11.6
pn cvs-buildpackage <none>
pn devscripts-el <none>
ii gnuplot 4.6.5-10
ii gpgv 1.4.18-2
ii libauthen-sasl-perl 2.1600-1
ii libfile-desktopentry-perl 0.07-1
ii libnet-smtp-ssl-perl 1.01-3
pn libterm-size-perl <none>
ii libtimedate-perl 2.3000-2
pn libyaml-syck-perl <none>
ii mutt 1.5.23-1
ii openssh-client [ssh-client] 1:6.6p1-7
ii svn-buildpackage 0.8.5
ii w3m 0.5.3-16
More information about the devscripts-devel
mailing list