dh-make-golang (or perhaps git-buildpackage) sometimes fails to find
upstream git tags, even though they exist:
$ dh-make-golang make -type l -git_revision v1.0.0 github.com/bradenhilton/mozillainstallhash
2022/07/17 15:11:21 Starting "dh-make-golang v0.6.0 linux/amd64"
2022/07/17 15:11:21 Downloading "github.com/bradenhilton/mozillainstallhash/..."
2022/07/17 15:11:21 Determining upstream version number
2022/07/17 15:11:21 Found latest tag "v1.0.0"
2022/07/17 15:11:21 Latest tag "v1.0.0" matches master
2022/07/17 15:11:21 Package version is "1.0.0"
2022/07/17 15:11:21 Determining dependencies
2022/07/17 15:11:22 Downloading https://github.com/bradenhilton/mozillainstallhash/archive/v1.0.0.tar.gz
2022/07/17 15:11:23 Moving tempfile to "golang-github-bradenhilton-mozillainstallhash_1.0.0.orig.tar.gz"
2022/07/17 15:11:23 Adding remote "origin" with URL "git@salsa.debian.org:go-team/packages/golang-github-bradenhilton-mozillainstallhash.git"
2022/07/17 15:11:23 Adding remote "github" with URL "https://github.com/bradenhilton/mozillainstallhash"
2022/07/17 15:11:23 Running "git fetch github"
remote: Enumerating objects: 49, done.
remote: Counting objects: 100% (49/49), done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 49 (delta 26), reused 36 (delta 16), pack-reused 0
Unpacking objects: 100% (49/49), 9.71 KiB | 1.94 MiB/s, done.
From https://github.com/bradenhilton/mozillainstallhash
* [new branch] main -> github/main
gbp:error: Import of /tmp/golang-github-bradenhilton-mozillainstallhash_1.0.0.orig.tar.gz failed: Can't find upstream vcs tag at 'v1.0.0'
2022/07/17 15:11:23 Could not create git repository: import-orig: exit status 1
However, if we clone the git repository, we see that the tag exists:
$ git clone https://github.com/bradenhilton/mozillainstallhash ; cd mozillainstallhash
Cloning into 'mozillainstallhash'...
remote: Enumerating objects: 52, done.
remote: Counting objects: 100% (52/52), done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 52 (delta 28), reused 37 (delta 16), pack-reused 0
Receiving objects: 100% (52/52), 10.50 KiB | 10.50 MiB/s, done.
Resolving deltas: 100% (28/28), done.
$ git tag; git reset --hard v1.0.0
v1.0.0
HEAD is now at 1eb17be Update README
[As a separate wishlist, which should get its own bug: it would be
helpful for debugging purposes if dh-make-golang had a flag to keep it
from cleaning up after itself in the event of failure.]