[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gbp import-orig --uscan for the non-trivial cases



On Wed, Aug 27, 2025 at 08:04:33PM +0100, Ahmad Khalifa wrote:
I haven't tried v5, but in v4 syntax, without the repacking, this works:

d/watch
opts="mode=git, pgpmode=none, pretty=0.6.1+git%cd" \
 https://github.com/dlundquist/sniproxy.git HEAD

Doesn't work for me:
| $ cat debian/watch
| version=4
| | opts="mode=git, pgpmode=none, pretty=0.6.1+git%cd" \
|    https://github.com/dlundquist/sniproxy.git HEAD
| $ uscan --debug
| uscan info: Scan watch files in .
| uscan debug: Found ./debian
| 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 debug: Version 5 parser returned: Unable to parse line 'version=4', skipping at /usr/share/perl5/Devscripts/Uscan/WatchSource/Parser.pm line 18, <$watchFileHandle> chunk 1.
| uscan info: debian/watch isn't formatted in version 5, trying version 4
| uscan debug: opts: mode=git, pgpmode=none, pretty=0.6.1+git%cd
| uscan debug: line: https://github.com/dlundquist/sniproxy.git HEAD
| uscan debug: Parsing  pgpmode=none
| uscan debug: Parsing  pretty=0.6.1+git%cd
| uscan debug: Parsing mode=git
| uscan info: File debian/watch converted into << ==EOF==
| Version: 5
| | Source: https://github.com/dlundquist/sniproxy.git
| Matching-Pattern: HEAD
| Mode: git
| Pgpmode: none
| Git-Pretty: 0.6.1+git%cd
| | ==EOF==
| uscan info: Reset watch_version to 4 because default value may change in version 5
| uscan debug: parse options: << ==EOF==
| Source: https://github.com/dlundquist/sniproxy.git
| Matching-Pattern: HEAD
| Mode: git
| Pgpmode: none
| Git-Pretty: 0.6.1+git%cd
| ==EOF==
| uscan info: Parsing gitpretty: 0.6.1+git%cd
| uscan info: Parsing mode: git
| uscan info: Parsing pgpmode: none
| uscan debug: $self->{'pgpmode'}=none, $self->{'pgpsigurlmangle'}=undef
| 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 debug: watch file has:
|     $base        = https://github.com/dlundquist/sniproxy.git
|     $filepattern = HEAD
|     $lastversion = 0.6.1+git20250616
|     $action      =
|     mode         = git
|     pgpmode      = none
|     versionmode  = newer
|     $site        = https://github.com/dlundquist/sniproxy.git
|     $basedir     =
| uscan debug: line: search()
| uscan debug: Execute: git clone --bare --depth=1 https://github.com/dlundquist/sniproxy.git ../sniproxy-temporary.365871.git...
| Cloning into bare repository '../sniproxy-temporary.365871.git'...
| remote: Enumerating objects: 107, done.
| remote: Counting objects: 100% (107/107), done.
| remote: Compressing objects: 100% (94/94), done.
| remote: Total 107 (delta 27), reused 27 (delta 1), pack-reused 0 (from 0)
| Receiving objects: 100% (107/107), 103.52 KiB | 3.98 MiB/s, done.
| Resolving deltas: 100% (27/27), done.
| uscan debug: git log -1 --date=format-local:%Y%m%d --no-show-signature --pretty=0.6.1+git%cd
| uscan info: Looking at $base        = https://github.com/dlundquist/sniproxy.git with
|     $filepattern        = HEAD found
|     $newfile            = HEAD
|     $mangled_newversion = 0.6.1+git20240702
|     $newversion         = 0.6.1+git20240702
|     $lastversion        = 0.6.1+git20250616
| uscan debug: line: get_upstream_url()
| uscan info: Upstream URL(+tag) to download is identified as    https://github.com/dlundquist/sniproxy.git HEAD
| uscan debug: line: get_newfile_base()
| uscan info: Filename (filenamemangled) for downloaded file: sniproxy-0.6.1+git20240702.tar.xz
| uscan debug: line: cmp_versions()
| 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 debug: line: download_file_and_sig()
| uscan debug: line: mkorigtargz()
| uscan debug: Keep git repo (../sniproxy-temporary.365871.git)
| uscan info: Scan finished
| (exit code 1)

Where does uscan get the 0.6.1+git20250616 version from? Is that what it guesses from debian/changelog?

$ uscan -dd
$ ls ..
sniproxy_0.6.1+git20240702.orig.tar.xz -> sniproxy-0.6.1+git20240702.tar.xz
sniproxy-0.6.1+git20240702.tar.xz

That's the upstream tarball that is already in Debian, probably generated from upstream/latest and pristine-tar.

I am trying to get current git head as a new version _INTO_ upstream/latest and pristine-tar.

Am I supposed to build the upstream tarball myself wit git archive?

No, uscan git-clones in a temp dir (watch ../) and creates a tarball from it. Then gbp continues from the tarball.

It generates ../sniproxy-temporary.$some-id$.git, but no tarball is built.

$ gbp clone some-repo.git
$ cd some-repo
$ gbp import-orig --uscan

Then you should have 2 updated branches + orig tarball.

Yes, that's how it SHOULD work. But it doesn't.

Where is the repo where you get the gbp-import-orig error? I could try that.

For reference, the package is on salsa, git@salsa.debian.org:debian/sniproxy.git, and the debian/watch file in question was pushed as wip/watchfile. (That's repeat information but I want to save you from having to look up my earlier message)

Greetings
Marc


--
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: