Hi Balachandran and Team,

We really needed help to get `dh-make-golang` ready for Module-Aware
builds. I did some tests and found some issue and solutions. See
below:

On Thu, Sep 17, 2026 at 12:10 PM Balachandran Sivakumar
<[email protected]> wrote:
> On 17/09/26 13:16, Andrew Lee wrote:
> > Thank you. I have commented on your MR for DEP-3:
> >    
> > https://salsa.debian.org/go-team/packages/dh-make-golang/-/merge_requests/9
>      Thanks and sorry about missing those. Fixed and pushed again.

I merged Balachandran's merge request into the `debian/experimental`
branch, cleaned up the patches, and reformatted the patch headers to
follow the DEP-3 standard. However, when testing the package, I found
this error:
```
$ dh-make-golang make github.com/google/go-github/v61
2026/09/20 18:47:28 Starting "dh-make-golang v0.8.3 linux/amd64"
2026/09/20 18:47:28 Continuing with repository root
"github.com/google/go-github" instead of specified import path
"github.com/google/go-github/v61" (repositories are the unit of
packaging in Debian)
2026/09/20 18:47:28 Using "github.com/google/go-github/v61" to create
the debian package name
2026/09/20 18:47:28 Building package for a Go module with a major version
2026/09/20 18:47:28 Building package for a Go module with a major version
2026/09/20 18:47:28 Downloading "github.com/google/go-github/..."
go get: 24.14 MiB2026/09/20 18:47:32 ERROR: Could not checkout tag
2026/09/20 18:47:32 Could not create a tarball of the upstream source:
go get: exit status 1
```

I think the error because upstream git do not always mark their
releases tag as `v61`; they nomarlly tag version like `v61.0.0`,
`v61.0.1`..etc. So that we cannot simply always append `.0.0` right
after the major version string. Because I found the tagged version
format is differen depends on upstream projects.

eg:
github.com/google/go-github/v61 upstream tagged `v61.0.0`.
github.com/aws/aws-sdk-go-v2 upstream tagged `v1.47.0`.

Instead of hardcoding tag patterns or guessing version strings, I
found we can simply query the version in the import path directly
using `go list` command:
```
$ go list -m -f '{{.Version}}' github.com/google/go-github/v61@latest
v61.0.0
$ go list -m -f '{{.Version}}' github.com/aws/aws-sdk-go-v2@latest
v1.47.0
$ go list -m -f '{{.Version}}' github.com/aws/[email protected]
v0.1.0
```

I hope someone can help to quickly update dh-make-golang to simply run
`go list -m -f '{{.Version}}' <importPath>@$version(defaults to
latest)` to handle module path resolution and return the exact git tag
needed for checkout.

Best regards,
-- 
-Andrew

Reply via email to