[pkg-go] RFC: Enhancements to dh-golang
Michael Hudson-Doyle
michael.hudson at canonical.com
Mon May 9 01:12:37 UTC 2016
On 8 May 2016 at 16:31, Martín Ferrari <tincho at tincho.org> wrote:
> Hi all,
>
> I have just pushed a branch (tincho_extensions) to dh-golang,
> implementing a few changes that I believe are beneficial for golang
> packaging. If there are no objections, I would like to merge this to
> master and release 0.17.
>
>
> * Export DH_GOLANG_INSTALL_EXTRA with a list of space-separated paths to
> copy to the build dir, for tests and other files not automatically
> installed.
>
> This means we can stop using the INSTALL_ALL=1+rm combo, which I think
> is pretty awkward. Instead, one would do (real example from the
> prometheus package):
>
> export DH_GOLANG_INSTALL_EXTRA := retrieval/discovery/fixtures \
> storage/local/fixtures config/testdata promql/testdata \
> retrieval/testdata
+1
(parenthetically, as I think I said on IRC, dh-golang should just copy
testdata by default)
> * Add --no-source and --no-binaries options to install target.
>
> This avoids the need to remove debian/prometheus/usr/share/gocode, and
> would go a long way to fix #814690, and I think is generally a good
> idea, to make it simple to split packages in binary and sources. Again,
> a real (and tested) example from prometheus:
>
> override_dh_auto_install:
> dh_auto_install -O--buildsystem=golang -- --no-source
Like Dmitry, I guess I'm only +0 on this.
> * Display a debug message when copying files to the build tree.
>
> A minor change, I think that when DH_VERBOSE is set, all the copy and
> symlink operations during preparation of the source tree should be
> printed. It looks like this:
>
> Copy retrieval/testdata/server.cer ->
> build/src/github.com/prometheus/prometheus/retrieval/testdata/server.cer
> Copy retrieval/testdata/client.cer ->
> build/src/github.com/prometheus/prometheus/retrieval/testdata/client.cer
> Symlink /usr/share/gocode/src/code.google.com -> build/src/code.google.com
> Symlink /usr/share/gocode/src/github.com/asaskevich ->
> build/src/github.com/asaskevich
Hmmm. Can see the point, but it would be a loooot of output in some
cases. DH_VERBOSE doesn't really support levels of verbosity does it?
Cheers,
mwh
More information about the Pkg-go-maintainers
mailing list