<div dir="ltr">Hey,<div><br></div><div>I noticed recently that we have 13 packages in the archive which ship with a patch similar to <a href="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">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</a>, i.e. a patch which modifies the upstream code to look for testdata files not in the current directory, but in the Debian sources.</div><div><br></div><div>The cited rationale for such a patch is an apparent issue with the Debian packaging executing tests in the wrong directory.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Read <a href="https://manpages.debian.org/unstable/dh-golang/Debian::Debhelper::Buildsystem::golang.3pm.en.html">https://manpages.debian.org/unstable/dh-golang/Debian::Debhelper::Buildsystem::golang.3pm.en.html</a> if you’re curious about more details of the inner workings of dh-golang, and let me know if you have any questions.</div><div><br></div><div>Thanks!<br clear="all"><div><br></div>-- <br><div class="gmail_signature">Best regards,<br>Michael</div>

</div></div>