debian/patches/0001-use-another-gcfg.patch changes
plumbing/format/config/decoder.go to import github.com/src-d/gcfg, but go.mod
still requires github.com/go-git/gcfg. Under GOPATH that did not matter. Under
dh-go, where the toolchain resolves imports from the module graph, every package
that build-depends on golang-github-go-git-go-git-v5-dev now fails:
src/github.com/go-git/go-git/v5/plumbing/format/config/decoder.go:6:2:
module github.com/src-d/gcfg provides package github.com/src-d/gcfg and is
replaced but not required
Adding the matching require to go.mod is enough. I have built 5.19.2-1 that way
in a clean chroot and can send a merge request:
- github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376
+ github.com/src-d/gcfg v1.4.0
Dropping the patch instead does not work today: golang-github-go-git-gcfg-dev
2.0.2-3 ships module github.com/go-git/gcfg/v2, while go-git 5.19.2 wants the
v1 path. Moving both the import and go.mod to gcfg/v2 would be the other way
round, and that is your call rather than mine.
No open or archived bug mentions gcfg or go.mod, so I do not think this is a
duplicate.
While there: debian/rules passes --buildsystem=golang without --with=golang.
dh-go 1.68 dropped Provides: dh-sequence-golang, so dh_golang no longer runs and
Static-Built-Using comes out empty.