On Friday, July 15 2016, Ole Streicher wrote: > Hi,
Hey, > I want to create a watch file for a package that contains a single text > file (which itself has the version into it): > version=3 > http://www.ngdc.noaa.gov/IAGA/vmod/igrf.html igrf(\d+)coeffs.txt \ > debian debian/repackage.sh > > The "repackage.sh" script would then just create a tarball: > #!/bin/sh > set -e > > VERSION=$2 > BASEDIR=$(dirname $3) > > cd $BASEDIR > tar cf igrf-coefficients_$VERSION.orig.tar igrf${VERSION}coeffs.txt > rm -f igrf${VERSION}coeffs.txt > xz igrf-coefficients_$VERSION.orig.tar > exec uupdate --no-symlink --upstream-version ${VERSION} > igrf_${VERSION}.orig.tar.xz > > However, when I run this, uscan complaints: > $ uscan > uscan: Newest version of igrf-coefficients on remote site is 12, local > version is 10 > uscan: => Newer package available from > http://www.ngdc.noaa.gov/IAGA/vmod/igrf12coeffs.txt > Parameter ../igrf12coeffs.txt does not look like a tar archive or a zip file. > at /usr/bin/mk-origtargz line 375. > uscan: error: mk-origtargz --package igrf-coefficients --version 12 > --compression gzip --directory .. --copyright-file debian/copyright > ../igrf12coeffs.txt gave error exit status 255 > > --debug does not show more here. > What is wrong here? I thought that mk-orig.tar.gz should be called only > when it is a tar archive? Yeah, uscan is the responsible for invoking mk-origtargz. That can be a problem indeed for cases like yours. Here's a hacky solution. First, in order to avoid calling mk-origtargz you need to pass the --no-symlink option to uscan (or set the USCAN_SYMLINK environment variable to "no"). That is unfortunately the only way, and there is also no opts available that you can use inside the watch file. Also, I found a few problems with your repackaging script. uupdate will expect a certain pattern when decompressing it, like a directory named package-version/, so you need to create that as well. Attached on this message is an updated script that seems to work (as far as I have tested; I don't have the full package here). Another option would be to create a redirector like the one we have for PyPi, but that demands a bit more work I suppose. Cheers, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/
#!/bin/sh set -e VERSION=$2 OLDDIR=$PWD BASEDIR=$PWD/../ cd $BASEDIR mkdir igrf-coefficients-${VERSION}/ mv igrf${VERSION}coeffs.txt igrf-coefficients-${VERSION}/ tar cf igrf-coefficients_$VERSION.orig.tar igrf-coefficients-${VERSION}/ rm -rf igrf-coefficients-${VERSION}/ xz igrf-coefficients_$VERSION.orig.tar cd $OLDDIR exec uupdate --no-symlink --upstream-version ${VERSION} $BASEDIR/igrf-coefficients_$VERSION.orig.tar.xz
signature.asc
Description: PGP signature