Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch dependency/duplicate check to newly-added api.ftp-master.debian.org/binary/by_metadata/Go-Import-Path #73

Open
stapelberg opened this issue Oct 25, 2017 · 3 comments
Assignees

Comments

@stapelberg
Copy link
Collaborator

stapelberg commented Oct 25, 2017

The current heuristic is not precise. For example, when packaging github.com/coreos/dex, I got:

2017/10/21 18:19:49 Build-Dependency "golang-github-gtank-cryptopasta-dev" is not yet available in Debian
2017/10/21 18:19:49 Build-Dependency "golang-github-golang-protobuf-dev" is not yet available in Debian
2017/10/21 18:19:49 Build-Dependency "golang-gopkg-ldap.v2-dev" is not yet available in Debian
2017/10/21 18:19:49 Build-Dependency "golang-github-cockroachdb-cockroach-go-dev" is not yet available in Debian
2017/10/21 18:19:49 Build-Dependency "golang-gopkg-square-go-jose.v2-dev" is not yet available in Debian
2017/10/21 18:19:49 Build-Dependency "golang-github-beevik-etree-dev" is not yet available in Debian
2017/10/21 18:19:49 Build-Dependency "golang-github-russellhaering-goxmldsig-dev" is not yet available in Debian

But, github.com/golang/protobuf and gopkg.in/ldap.v2 are in fact packaged (in golang-goprotobuf-dev and golang-github-go-ldap-ldap-dev, respectively).

@paultag suggested using the XS-Go-Import-Path field in debian/control instead of setting DH_GOPKG (see also https://manpages.debian.org/unstable/dh-golang/Debian::Debhelper::Buildsystem::golang.3pm.en.html), which allows us to precisely list all binary packages by their Go import path.

I recently implemented a query for this in dakweb, see https://lists.debian.org/debian-dak/2017/10/msg00012.html for the patch.

We should switch dh-make-golang to make use of that, and convert all of our remaining packages to set XS-Go-Import-Path (I’ll analyze which these are in a bit).

@stapelberg
Copy link
Collaborator Author

stapelberg commented Oct 25, 2017

The following packages have not yet been converted to XS-Go-Import-Path:

"golang-redhat-audit-dev"
"golang-github-google-cadvisor-dev"
"golang-github-shiguredo-fuji-dev"
"golang-mode"
"golang-gopkg-libgit2-git2go.v24-dev"
"golang-github-gosexy-gettext-dev"
"golang-github-mvo5-goconfigparser-dev"
"golang-gosqlite-dev"
"golang-guestfs-dev"
"golang-github-opencontainers-runc-dev"

Generated using:

% wget https://api.ftp-master.debian.org/binary/by_metadata/Go-Import-Path
% wget https://people.debian.org/~stapelberg/dh-make-golang/binary-amd64-grep-golang
% grep -v -f <(jq '.[].binary' Go-Import-Path) <(sed 's,^Package: ,",g; s,$,",g' binary-amd64-grep-golang)

@rajudev
Copy link
Contributor

rajudev commented Feb 4, 2018

While running dh-make-golang on a package today, I got this line in the output.

2018/02/04 11:03:42 Could not check for existing Go packages in Debian: getting "https://api.ftp-master.debian.org/binary/by\_metadata/Go-Import-Path": %!v(MISSING)

Is it related to this issue?

I asked this on IRC, after no replies there posting here.

stapelberg added a commit that referenced this issue Feb 4, 2018
@stapelberg
Copy link
Collaborator Author

I pushed an update to fix the error message. Please try again and open a separate issue if the error persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants