Hi all,
I have done a pretty exaustive search online for similar problems.
I also trawled through the Debian Mailing lists for this and couldn't find a solution.
BEGIN PROBLEM
>>>>>>>>>
uscan has no problem downloading the upstream source if the watch file looks like this:
Notice the uppercase F in Fastaq.
Running
uscan --verbose --force-download
I get
js21@builder:~/deb_alioth/current/fastaq_packaging/fastaq$ uscan --verbose --force-download
-- Scanning for watchfiles in .
-- Found watchfile in ./debian
-- In debian/watch, processing watchfile line:
https://github.com/sanger-pathogens/Fastaq/tags /sanger-pathogens/Fastaq/archive/([.\d]+)\.tar\.gz
-- Found the following matching hrefs:
/sanger-pathogens/Fastaq/archive/1.5.0.tar.gz
/sanger-pathogens/Fastaq/archive/1.1.0.tar.gz
Newest version on remote site is 1.5.0, local version is 1.5.0
=> Package is up to date
Newest version on remote site is 1.5.0, local version is 1.5.0
=> Forcing download as requested
-- Downloading updated package 1.5.0.tar.gz
-- Successfully downloaded updated package 1.5.0.tar.gz
and symlinked Fastaq_1.5.0.orig.tar.gz to it
-- Scan finished
The source is downloaded. All good there.
When I run git-buildpackage I get:
js21@builder:~/deb_alioth/current/fastaq_packaging/fastaq$ git-buildpackage --git-pbuilder --git-arch=amd64 --git-dist=sid --git-ignore-new
dh clean --with python3 --buildsystem=pybuild
dh_testdir -O--buildsystem=pybuild
debian/rules override_dh_auto_clean
make[1]: Entering directory `/home/js21/deb_alioth/current/fastaq_packaging/fastaq'
rm -rf build .pybuild
make[1]: Leaving directory `/home/js21/deb_alioth/current/fastaq_packaging/fastaq'
dh_clean -O--buildsystem=pybuild
rm -f debian/fastaq.substvars
rm -f debian/fastaq.*.debhelper
rm -rf debian/fastaq/
rm -f debian/*.debhelper.log
rm -f debian/files
find . \( \( -type f -a \
\( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
-o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
-o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
-o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
\) -exec rm -f {} \; \) -o \
\( -type d -a -name autom4te.cache -prune -exec rm -rf {} \; \) \)
rm -f *-stamp
Building with cowbuilder for distribution sid, architecture amd64
Source format 1.0 detected, adding exclude flags
I: using cowbuilder as pbuilder
dpkg-checkbuilddeps: warning: can't parse dependency samtools
asciidoc
dpkg-checkbuilddeps: error: error occurred while parsing Build-Depends/Build-Depends-Arch/Build-Depends-Indep
W: Unmet build-dependency in source
dpkg-buildpackage: source package Fastaq
dpkg-buildpackage: source version 1.5.0-1
dpkg-buildpackage: source changed by DMPT <
debian-med-packaging@lists.alioth.debian.org>
dpkg-source -i(?:^|/)\.git(attributes)?(?:$|/.*$) -I.git --before-build fastaq
dpkg-source: error: source package name 'Fastaq' is illegal: character 'F' not allowed
dpkg-buildpackage: error: dpkg-source -i(?:^|/)\.git(attributes)?(?:$|/.*$) -I.git --before-build fastaq gave error exit status 255
gbp:error: Couldn't run 'git-pbuilder': git-pbuilder returned 255
I understand why:
dpkg-source: error: source package name 'Fastaq' is illegal: character 'F' not allowed
So looking at the uscan man page, searching for mangle I find:
# <A href="" href="http://foo.bar.org/download/?path=&download_version=0.1.1">http://foo.bar.org/download/?path=&download_version=0.1.1">
# could be handled as:
# opts=filenamemangle=s/.*=(.*)/foo-$1\.tar\.gz/ \
#
http://foo.bar.org/download/\?path=&download_version=(.+)So I set the filenamemangle options in the watch file to replace uppercase F with lowercase f like so:
And then run
uscan --verbose --force-download
I get
js21@builder:~/deb_alioth/current/fastaq_packaging/fastaq$ uscan --verbose --force-download
-- Scanning for watchfiles in .
-- Found watchfile in ./debian
-- In debian/watch, processing watchfile line:
opts=filenamemangle=s/F(.*)/f$1/
https://github.com/sanger-pathogens/Fastaq/tags /sanger-pathogens/Fastaq/archive/([.\d]+)\.tar\.gz
-- Found the following matching hrefs:
/sanger-pathogens/Fastaq/archive/1.5.0.tar.gz
/sanger-pathogens/Fastaq/archive/1.1.0.tar.gz
Newest version on remote site is 1.5.0, local version is 1.5.0
=> Package is up to date
Newest version on remote site is 1.5.0, local version is 1.5.0
=> Forcing download as requested
-- Downloading updated package /sanger-pathogens/fastaq/archive/1.5.0.tar.gz
uscan warning: ..//sanger-pathogens/fastaq/archive/1.5.0.tar.gz does not appear to be a compressed file;
the file command says: ERROR: cannot open `..//sanger-pathogens/fastaq/archive/1.5.0.tar.gz' (No such file or directory)
Not processing this file any further!
-- Scan finished
It seems to have replaced the uppercase F with the lowercase f but now it can't get the source tarball.
I also tried differenl iterations of the filenamemangle regex:
opts=filenamemangle=s/F/f/ \
and
opts=filenamemangle=s/(.*)F(.*)/$1f$2/
And others... But I still get the same error.
<<<<<<<<<
END PROBLEM
Does anyone have an idea on how to solve this issue?
Regards,
Jorge