On 24/11/2025 10:07 pm, Arnaud Rebillout wrote:

On 24/11/2025 15:45, Hugh McMaster wrote:
On 24/11/2025 5:46 pm, Arnaud Rebillout wrote:
[2] is not reachable, maybe it's private?

Sorry, that should be fixed now.

Thanks!

So I `git clone` your repo, then I found out that... I need to pass
--recurse-submodules, of course.

I updated the test repository with debian/gbp.conf.

So I `git clone --recurse-submodules` and all looks good. The
`test-data` directory is populated, and I get some output with `git
submodule status`, showing that the submodule was properly initialized.

Now let's try an update this repo, we're going to update from git HEAD
since there's no new upstream release:

```
# create upstream branch
git branch upstream 8b6ffca

# edit d/watch to track git head
Mode: git
Source: https://github.com/oschwald/maxminddb-golang.git
Matching-Pattern: HEAD
Git-Modules: all
Git-Pretty: 2.1.0+git%cd.%h

Upstream tags each release, with the most recent version tagged v2.1.0.

What I had in the test repository debian/watch is fine:

====
Version: 5

Mode: git
Source: https://github.com/oschwald/maxminddb-golang.git
Matching-Pattern: refs/tags/v@ANY_VERSION@
Git-Modules: all
====

# commit
git add debian
git commit -m "Update watch file"
```

Then I run `uscan`, it gets me the right tarball, including the
submodule. All good.

Excellent, although you don't need to do this, as we don't want a source tarball (see below).

Now, I want to import that in my git repo, and also track upstream git
history:

```
# Add and fetch upstream remote
git remote add upstreamvcs https://github.com/oschwald/maxminddb-golang.git
# Import
gbp import-orig
../golang-github-oschwald-maxminddb-golang-v2_2.1.0+git20251120.4d0333b.orig.tar.xz
--upstream-vcs-tag=4d0333b --debian-branch=debian/latest
```

You are overwriting the upstream branch by importing the source tarball.
Try: `gbp import-orig --uscan` for automation.

And... Alas! gbp added the test-data directory to the "New upstream
version" commit, and now the submodule is gone, `git submodule status`
returns nothing. We're back to the beginning.

Did I do something wrong?

Try what I said above. Also, try following Otto's guide, even just from your local machine. It's quick to do, and you can skip a lot of steps, since you only want the branch setup.

Off-Topic: I had to be careful to add the upstream vcs only AFTER
running uscan, otherwise I hit #1120533 (uscan doesn't fetch the right
git HEAD), which doesn't seem to be fixed in devscripts 2.25.27.

Yes, #1120533 is fixed in the devscripts repository but not yet uploaded. If you use tags, the patch isn't required. But just in case, you can run PERL5LIB=/path/to/devscripts/clone/lib/ /path/to/devscripts/clone/scripts/uscan.pl

Hugh

Reply via email to