Package: dh-golang
Version: 1.35
Severity: normal

Dear Maintainer,

it's been reported lately that the Built-Using field in docker.io is
incorrect [1].

I started to investigate, but docker.io is a complicated package with
some embedded libraries and a hell of a debian/rules, so it's not the
best package to investigate this issue.

Instead, I found a more suitable package that also exhibits the issue:
notary [2]. This package has a simple debian/rule, and excludes the
vendor directory entirely.

So I built the latest version of this package (0.6.1~ds1-2 at the
moment), and checked the resulting Built-Using. It turns out that the
following libraries from Build-Depends are missing in Built-Using:

- golang-github-cloudflare-cfssl-dev
- golang-github-mattn-go-sqlite3-dev
- golang-github-miekg-pkcs11-dev

Let's take these packages one by one:

----

  * golang-github-miekg-pkcs11-dev

This build dependency is optional. We need it because we build notary
with the build tag 'pkcs11'. dh_golang is not aware of that, so I guess
that's why it doesn't detect this dependency.

  * golang-github-cloudflare-cfssl-dev

This dependency is needed for the testsuite only. If we don't have it,
then there you go...

    # github.com/theupdateframework/notary/trustpinning
    src/github.com/theupdateframework/notary/trustpinning/certs_test.go:15:2: \
      cannot find package "github.com/cloudflare/cfssl/config" in any of ...

Should such a dep be eligigle to Built-Using or not?

  * golang-github-mattn-go-sqlite3-dev

Similar to cloudflare: it's only needed for the testsuite.

----

As a sidenote, I also spent some time investigating this issue on the
docker.io package, and there's probably other problems to be solved
there.

I'm wondering, couldn't we generate the Built-Using field by recursing
on the Build-Depends? Wouldn't it be more generic and failproof?

Best regards,
  Arnaud

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908055
[2] https://salsa.debian.org/go-team/packages/notary

----

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.16.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dh-golang depends on:
ii  debhelper     11.3.5
ii  dpkg          1.19.0.5+b1
ii  libdpkg-perl  1.19.0.5
ii  perl          5.26.2-7

dh-golang recommends no packages.

dh-golang suggests no packages.

-- no debconf information

Reply via email to