Hey, I noticed recently that we have 13 packages in the archive which ship with a patch similar to https://anonscm.debian.org/cgit/pkg-go/packages/golang-bindata.git/tree/debian/patches/test-fixture-locations.patch?h=debian/3.0.7%2bgit20151023.72.a0ff256-2&id=704d22e89d455b581d92e0a36d551d399275d502, i.e. a patch which modifies the upstream code to look for testdata files not in the current directory, but in the Debian sources.
The cited rationale for such a patch is an apparent issue with the Debian packaging executing tests in the wrong directory. This is incorrect: dh-golang runs go test, which ensures the directory is correct. Instead, what is happening is that dh-golang constructs a temporary GOPATH and, by default, only copies Go source files into that path. The proper solution is to have dh-golang install the required files. Up until dh-golang 1.30, this would be accomplished with e.g. export DH_GOLANG_INSTALL_EXTRA := html/charset/testdata in debian/rules. To make this a little easier for everyone, I just uploaded dh-golang 1.31, which honors the testdata/ convention and copies testdata/ contents by default. I will also update the affected packages and drop the now-unnecessary patch from them. I just wanted to bring this to people’s attention to ensure that — when required — we add installation directives to debian/rules instead of patching upstream source. Read https://manpages.debian.org/unstable/dh-golang/Debian::Debhelper::Buildsystem::golang.3pm.en.html if you’re curious about more details of the inner workings of dh-golang, and let me know if you have any questions. Thanks! -- Best regards, Michael
_______________________________________________ Pkg-go-maintainers mailing list Pkg-go-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers