[pkg-go] RFC: Enhancements to dh-golang

Martín Ferrari tincho at tincho.org
Sat May 14 13:50:07 UTC 2016


Since nobody has voiced strong concerns about this, I will merge this
change later today or tomorrow and upload.

I wanted to wait for Michael S. to chime in, but I guess he's not
strongly opposed either :-)


On 08/05/16 05:31, Martín Ferrari 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
> 
> 
> * 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
> 
> 
> * 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
> 
> 
> Thoughts?
> 


-- 
Martín Ferrari (Tincho)



More information about the Pkg-go-maintainers mailing list