Lintian nag missing-built-using-field-for-golang-package (Re: Status with Static-Built-Using substvar?)
Hi!
The man page https://manpages.debian.org/unstable/dh-golang/dh_golang.1p.en.html
recommends using `Built-Using: ${misc:Static-Built-Using}`, which was
confirmed by Nilesh to be correct and advisable practice, but any
package using this will run into the Lintian nag that recommends using
the old `Built-Using: ${misc:Built-Using}` instead:
Example:
I: prometheus-phpfpm-exporter source:
missing-built-using-field-for-golang-package (in section for
prometheus-phpfpm-exporter) [debian/control:24]
N:
N: The stanza for a Golang installation package in the debian/control file
N: does not include a Built-Using field that contains the ${misc:Built-Using}
N: substitution variable.
N:
N: The dh_golang(1) build system provides the ${misc:Built-Using} variable.
N: It is used when scheduling binNMUs.
N:
N: Please add the following line to the relevant stanza:
N:
N: Built-Using: ${misc:Built-Using}
N:
N: Visibility: info
N: Show-Always: no
N: Check: languages/golang/built-using
This is just plain outdated now and should be updated in LIntian, right?
This check was added in 2018 in
https://salsa.debian.org/lintian/lintian/-/commit/e83f69fd2f1ea31ce0ecc2d86f55ad9ef0dfded3,
and resides after refactoring in
https://salsa.debian.org/lintian/lintian/-/blob/master/lib/Lintian/Check/Languages/Golang/BuiltUsing.pm
We are waiting for
https://salsa.debian.org/lintian/lintian/-/merge_requests/456 to get
finalized first, but I don't think that is enough to fix both of these
Linian nags from surfacing.
> > I was reviewing a new Debian package at
> > https://salsa.debian.org/lintian/lintian-ssg/-/merge_requests/2 where
> > Lintian nags about `statically-linked-binary`.
> >
> > I have been reading
> > https://manpages.debian.org/unstable/dh-golang/dh_golang.1p.en.html
> > about `Static-Built-Using: ${misc:Static-Built-Using},` and I see it
> > in the example at
>
> Static-Built-Using is the right field. Earlier go packages were using
> just Built-Using
> which is a policy violation. More details at
>
> https://wiki.debian.org/Static-Built-Using
> https://wiki.debian.org/StaticLinking#Go
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069256
>
> > https://salsa.debian.org/go-team/packages/dh-golang/-/tree/debian/sid/example
> > but when I review recently updated packages (via
> > https://salsa.debian.org/groups/go-team/-/merge_requests) seems nobody
> > is actually using it.
>
> Most of them are library packages which do not use such a field. You
> need it for statically
> linked binaries and hence only go binary packages would need such a
> field.
>
> If that is missing in a go binary package, it is a bug and the field
> should be added.
Reply to: