Re: gbp import-orig --uscan for the non-trivial cases
On 28/08/2025 08:58, Marc Haber wrote:
On Wed, Aug 27, 2025 at 08:04:33PM +0100, Ahmad Khalifa wrote:
Where is the repo where you get the gbp-import-orig error? I could try
that.
I pushed the branch with the new debian/watch file to wip/watchfile in
the salsa repo on git@salsa.debian.org:debian/sniproxy.git
Short version,
- your d/changelog is newer than anything upstream and uscan is rightly
refusing to play.
- uscan's default git versioning is "0.0~git%cd.%h" so that's also lower
than 0.6.1, so prefix pretty with 0.6.1 at least.
Long version...
$ gbp clone git@salsa.debian.org:debian/sniproxy.git
$ git checkout -t origin/wip/watchfile
$ uscan -v
My uscan doesn't understand v5, change to v4 with 'pretty' and using
0.6.1 prefix as upstream. I also kept 'repack' but you don't have any
d/copyright exclusions, should remove reapack/dversionmangle.
Also vaguely recall compression is xz by default now.
$ cat > debian/watch
version=4
opts="mode=git, pretty=0.6.1+git%cd, compression=xz, repacksuffix=+ds, dversionmangle=s/\+ds$//" \
https://github.com/dlundquist/sniproxy.git HEAD
I use -v enough, --debug is too much
$ uscan -v
uscan info: uscan (version 2.25.14) See uscan(1) for help
uscan info: Scan watch files in .
uscan info: Check debian/watch and debian/changelog in .
uscan info: package="sniproxy" version="0.6.1+git20250616-1~" (as seen in debian/changelog)
uscan info: package="sniproxy" version="0.6.1+git20250616" (no epoch/revision)
uscan info: ./debian/changelog sets package="sniproxy" version="0.6.1+git20250616"
uscan info: Process watch file at: debian/watch
package = sniproxy
version = 0.6.1+git20250616
pkg_dir = .
uscan info: opts: mode=git, pretty=0.6.1+git%cd, compression=xz, repacksuffix=+ds, dversionmangle=s/\+ds$//
uscan info: line: https://github.com/dlundquist/sniproxy.git HEAD
uscan info: Parsing mode=git
uscan info: Parsing pretty=0.6.1+git%cd
uscan info: Parsing compression=xz
uscan info: Parsing repacksuffix=+ds
uscan info: Parsing dversionmangle=s/\+ds$//
uscan info: line: https://github.com/dlundquist/sniproxy.git HEAD
uscan info: Last orig.tar.* tarball version (from debian/changelog): 0.6.1+git20250616
uscan info: Last orig.tar.* tarball version (dversionmangled): 0.6.1+git20250616
uscan info: Looking at $base = https://github.com/dlundquist/sniproxy.git with
$filepattern = HEAD found
$newfile = HEAD
$newversion = 0.6.1+git20240702
$lastversion = 0.6.1+git20250616
These are the two 'decision' versions - current is higher.
uscan info: Upstream URL(+tag) to download is identified as https://github.com/dlundquist/sniproxy.git HEAD
uscan info: Filename (filenamemangled) for downloaded file: sniproxy-0.6.1+git20240702.tar.xz
uscan info: Newest version of sniproxy on remote site is 0.6.1+git20240702, local version is 0.6.1+git20250616
uscan info: => Only older package available from:
=> https://github.com/dlundquist/sniproxy.git HEAD
uscan is correct, d/changelog is newer than anything upstream
uscan info: Removing git repo (../sniproxy-temporary.965228.git)
uscan info: Scan finished
Downgrade current version from 2025 to 2024
$ sed -i 's/0.6.1+git20250616-1~/0.6.1+git20240321-0.3/' debian/changelog
$ uscan
Newest version of sniproxy on remote site is 0.6.1+git20240702, local version is 0.6.1+git20240321
=> Newer package available from:
=> https://github.com/dlundquist/sniproxy.git HEAD
Successfully symlinked ../sniproxy-0.6.1+git20240702.tar.xz to ../sniproxy_0.6.1+git20240702.orig.tar.xz.
Tarball!
$ git commit -a -m "Testing only"
$ gbp import-orig --uscan --upstream-vcs-tag=
Your upstream doesn't have tags, should unconfig upstream-vcs-tag as it
won't be found in `git tag`
$ git branch -v
debian/latest 7610c4e [ahead 6] Update upstream source from tag 'upstream/0.6.1+git20240702'
pristine-tar 2e7f204 [ahead 1] pristine-tar data for sniproxy_0.6.1+git20240702.orig.tar.xz
upstream/latest b545641 [ahead 1] New upstream version 0.6.1+git20240702
* wip/watchfile 8a304ff [ahead 1] Testing only
I forgot --debian-branch and imported to wrong branch, but still success
on debian/latest + upstream/latest :)
Even pristine-tar, but I never use that.
If I had updated the current branch, I would have done...
$ gbp dch
$ gbp buildpackage --git-ignore-new
Point d/changelog at new version and build it without committing yet.
But I usually start with dpkg-buildpackage or debuild as I run lintian
pedantic.
--
Regards,
Ahmad
Reply to: