<div dir="ltr">Would such a flag be useful for any other package than the fscrypt package?<div><br></div><div>If no, I’d recommend to not change dh-golang for the time being, and let this be a one-off in the fscrypt package until it makes sense to centralize the logic.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 9, 2018 at 12:15 PM, Paride Legovini <span dir="ltr"><<a href="mailto:pl@ninthfloor.org" target="_blank">pl@ninthfloor.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Package: dh-golang<br>
Version: 1.34<br>
Severity: normal<br>
<br>
Hi,<br>
<br>
There is at least one case when it would be preferable to have the build<br>
dh stage to call ’go build’ instead of ’go install’. This is when<br>
building c-shared libraries with -buildmode=c-shared. In this case ‘go<br>
install’ builds the shared library object, but gives it a ‘.a’ extension<br>
and installs it in a not well defined location. This is discussed in this<br>
upstream issue:<br>
<br>
<a href="https://github.com/golang/go/issues/24253" rel="noreferrer" target="_blank">https://github.com/golang/go/<wbr>issues/24253</a><br>
<br>
The upstream indication is that "The expectation is that people will use<br>
go build -buildmode=c-shared -o foo.so" and that using ‘go install’ "will<br>
put the shared library in a relatively unpredictable place".<br>
<br>
Given these facts, I think dh-golang should support a ‘go build’ mode.<br>
One way this could be implemented is via a --build-only flag to be<br>
passed to dh_auto_build. If there is consensus on this I can send a<br>
patch implementing it.<br>
<br>
This problem arose while packaging fscrypt, see in particular:<br>
<br>
<a href="https://salsa.debian.org/go-team/packages/fscrypt/blob/d15d123eb301d50c0376a10615e472054dd3b88d/debian/rules#L36" rel="noreferrer" target="_blank">https://salsa.debian.org/go-<wbr>team/packages/fscrypt/blob/<wbr>d15d123eb301d50c0376a10615e472<wbr>054dd3b88d/debian/rules#L36</a><br>
<br>
Paride<br>
______________________________<wbr>_________________<br>
Pkg-go-maintainers mailing list<br>
<a href="mailto:Pkg-go-maintainers@alioth-lists.debian.net">Pkg-go-maintainers@alioth-<wbr>lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-go-maintainers" rel="noreferrer" target="_blank">https://alioth-lists.debian.<wbr>net/cgi-bin/mailman/listinfo/<wbr>pkg-go-maintainers</a></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Michael</div>
</div>