Bug#748474: mk-origtargz: Please allow extra actions

Osamu Aoki osamu at debian.org
Sat Sep 26 15:24:39 UTC 2015


Hi David,

I have been working on uscan related topic recently :-).  Since it is a
bit rough, my latest work is living in a branch off alioth's main branch
(multitar).  So far, multiple upstream tarball, separate URL search for
SIG file, better uupdate integration have been done.

As I see https://bugs.debian.org/748474 , this seems to be something
easily handled by the released code as is. (Maybe there is some corner
case where we may need to address if you wish to use command such as
"gbp import-orig --uscan" which I have not looked into yet.

Just create a script debian/uupdate and create watch file like

version=3
http://www.example.org/downloadguide \
        foo/bar-([\d.]+).tar.xz debian debian/uupdate

The content of debian/uupdate can be:

-------------------
#!/bin/sh
# Assume recent uscan v=3 "--upstream-version <version> <path>"
while [ "$1" ]; do
    case $1 in
    --upstream-version|-v)
        shift; NEW_VERSION="$1"
        ;;
    --force-bad-version|-b|--find|-f)
        :
        ;;
    esca
    shift
done
# ignore <path> and rely on ../ being the path to the orig.tar.xz
# using source package name $SPKG from debian/changelog
# This makes it more robust for newer uupdate in future
SPKG=$(dpkg-parsechangelog -SSource)
cd ..
# Now ${SPKG}_${NEW_VERSION}.orig.tar.xz is upstream tarball
mv -f ${SPKG}_${NEW_VERSION}.orig.tar.xz ${SPKG}_${NEW_VERSION}.orig.tar.xz.orig
tar --xz -xf ${SPKG}_${NEW_VERSION}.orig.tar.xz
# make any modification to files in ${SPKG}-${NEW_VERSION}
# exiftool -icc_profile"-<=" $listoffiles
tar --xz -cf ${SPKG}_${NEW_VERSION}.orig.tar.xz ${SPKG}-${NEW_VERSION}
cd -
uupdate --no-symlink --upstream-version ${NEW_VERSION} ../${SPKG}_${NEW_VERSION}.orig.tar.xz
-------------------

As for "gbp import-orig --uscan", this needs to be updated to cope with
multiple upstream tarballs.  Then we just need to make it honor
debian/uupdate in the watch file at that time.

Regards,

Osamu



More information about the devscripts-devel mailing list