<div dir="ltr">If the package doesn't build with "go install" but some other way, you're going to be fighting dh_golang a bit I think.</div><div class="gmail_extra"><br><div class="gmail_quote">On 13 December 2016 at 01:02, Félix Sipma <span dir="ltr"><<a href="mailto:felix+debian@gueux.org" target="_blank">felix+debian@gueux.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I forgot to add the debian/rules:<br>
<br>
    #!/usr/bin/make -f<br>
<br>
    export DH_OPTIONS<br>
<br>
    export DH_GOPKG := <a href="http://github.com/restic/restic" rel="noreferrer" target="_blank">github.com/restic/restic</a><br>
<br>
    %:<br>
            dh $@ --buildsystem=golang --with=golang<br>
<br>
    override_dh_auto_build:<br>
            go run build.go<br>
<br>
    override_dh_auto_test:<br>
            go run build.go --test<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 2016-12-12 13:00+0100, Félix Sipma wrote:<br>
> Hi!<br>
><br>
> I'm trying to package restic. The build seems to go well, but it fails at the<br>
> end, failing to find library files. I've tried to add this to<br>
> debian/restic.install:<br>
><br>
>   src/restic usr/lib/go/src<br>
><br>
> but it did not seem to work...<br>
><br>
> Do you have any advice?<br>
><br>
> Here is the build log:<br>
><br>
>   dpkg-buildpackage<br>
>   -----------------<br>
><br>
>   dpkg-buildpackage: info: source package restic<br>
>   dpkg-buildpackage: info: source version 0.3.0-1<br>
>   dpkg-buildpackage: info: source distribution UNRELEASED<br>
>   dpkg-buildpackage: info: source changed by Félix Sipma <<a href="mailto:felix%2Bdebian@gueux.org">felix+debian@gueux.org</a>><br>
>    dpkg-source --before-build restic-0.3.0<br>
>   dpkg-buildpackage: info: host architecture amd64<br>
>    fakeroot debian/rules clean<br>
>   dh clean --buildsystem=golang --with=golang<br>
>      dh_testdir -O--buildsystem=golang<br>
>      dh_auto_clean -O--buildsystem=golang<br>
>      dh_autoreconf_clean -O--buildsystem=golang<br>
>      dh_clean -O--buildsystem=golang<br>
>    dpkg-source -b restic-0.3.0<br>
>   dpkg-source: info: using source format '3.0 (quilt)'<br>
>   dpkg-source: info: building restic using existing ./restic_0.3.0.orig.tar.gz<br>
>   dpkg-source: info: building restic in restic_0.3.0-1.debian.tar.xz<br>
>   dpkg-source: info: building restic in restic_0.3.0-1.dsc<br>
>    debian/rules build<br>
>   dh build --buildsystem=golang --with=golang<br>
>      dh_testdir -O--buildsystem=golang<br>
>      dh_update_autotools_config -O--buildsystem=golang<br>
>      dh_autoreconf -O--buildsystem=golang<br>
>      dh_auto_configure -O--buildsystem=golang<br>
>      debian/rules override_dh_auto_build<br>
>   make[1]: Entering directory '/<<PKGBUILDDIR>>'<br>
>   go run build.go<br>
>   make[1]: Leaving directory '/<<PKGBUILDDIR>>'<br>
>      debian/rules override_dh_auto_test<br>
>   make[1]: Entering directory '/<<PKGBUILDDIR>>'<br>
>   go run build.go --test<br>
>   ok          restic  7.455s<br>
>   ok          restic/archiver 65.526s<br>
>   ok          restic/backend  1.198s<br>
>   ok          restic/backend/local    1.365s<br>
>   ok          restic/backend/mem      1.125s<br>
>   ok          restic/backend/rest     0.023s<br>
>   ok          restic/backend/s3       0.006s<br>
>   ok          restic/backend/sftp     0.004s<br>
>   ok          restic/backend/test     0.868s<br>
>   ok          restic/checker  4.417s<br>
>   ok          restic/crypto   0.511s<br>
>   ?           restic/debug    [no test files]<br>
>   ?           restic/errors   [no test files]<br>
>   ok          restic/filter   0.439s<br>
>   ?           restic/fs       [no test files]<br>
>   ok          restic/fuse     1.022s<br>
>   ok          restic/index    59.633s<br>
>   ?           restic/list     [no test files]<br>
>   ok          restic/location 0.005s<br>
>   ?           restic/mock     [no test files]<br>
>   ok          restic/pack     0.020s<br>
>   ok          restic/pipe     0.028s<br>
>   ok          restic/repository       4.921s<br>
>   ?           restic/test     [no test files]<br>
>   ok          restic/walk     1.254s<br>
>   ok          restic/worker   0.003s<br>
>   make[1]: Leaving directory '/<<PKGBUILDDIR>>'<br>
>    fakeroot debian/rules binary<br>
>   dh binary --buildsystem=golang --with=golang<br>
>      dh_testroot -O--buildsystem=golang<br>
>      dh_prep -O--buildsystem=golang<br>
>      dh_auto_install -O--buildsystem=golang<br>
>       mkdir -p /<<PKGBUILDDIR>>/debian/<wbr>restic/usr/share/gocode/src/<a href="http://github.com/restic/restic" rel="noreferrer" target="_blank">gi<wbr>thub.com/restic/restic</a><br>
>       cp -r -T src/<a href="http://github.com/restic/restic" rel="noreferrer" target="_blank">github.com/restic/restic</a> /<<PKGBUILDDIR>>/debian/<wbr>restic/usr/share/gocode/src/<a href="http://github.com/restic/restic" rel="noreferrer" target="_blank">gi<wbr>thub.com/restic/restic</a><br>
>      dh_install -O--buildsystem=golang<br>
>      dh_installdocs -O--buildsystem=golang<br>
>      dh_installchangelogs -O--buildsystem=golang<br>
>      dh_perl -O--buildsystem=golang<br>
>      dh_link -O--buildsystem=golang<br>
>      dh_strip_nondeterminism -O--buildsystem=golang<br>
>      dh_compress -O--buildsystem=golang<br>
>      dh_fixperms -O--buildsystem=golang<br>
>      dh_strip -O--buildsystem=golang<br>
>      dh_makeshlibs -O--buildsystem=golang<br>
>      dh_shlibdeps -O--buildsystem=golang<br>
>      dh_installdeb -O--buildsystem=golang<br>
>      dh_golang -O--buildsystem=golang<br>
>   can't load package: package restic: cannot find package "restic" in any of:<br>
>       /usr/lib/go-1.7/src/restic (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic (from $GOPATH)<br>
>   can't load package: package restic/archiver: cannot find package "restic/archiver" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>archiver (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/archiver (from $GOPATH)<br>
>   can't load package: package restic/backend: cannot find package "restic/backend" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>backend (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/backend (from $GOPATH)<br>
>   can't load package: package restic/backend/local: cannot find package "restic/backend/local" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>backend/local (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/backend/<wbr>local (from $GOPATH)<br>
>   can't load package: package restic/backend/mem: cannot find package "restic/backend/mem" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>backend/mem (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/backend/<wbr>mem (from $GOPATH)<br>
>   can't load package: package restic/backend/rest: cannot find package "restic/backend/rest" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>backend/rest (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/backend/<wbr>rest (from $GOPATH)<br>
>   can't load package: package restic/backend/s3: cannot find package "restic/backend/s3" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>backend/s3 (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/backend/<wbr>s3 (from $GOPATH)<br>
>   can't load package: package restic/backend/sftp: cannot find package "restic/backend/sftp" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>backend/sftp (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/backend/<wbr>sftp (from $GOPATH)<br>
>   can't load package: package restic/checker: cannot find package "restic/checker" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>checker (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/checker (from $GOPATH)<br>
>   can't load package: package restic/crypto: cannot find package "restic/crypto" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>crypto (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/crypto (from $GOPATH)<br>
>   can't load package: package restic/debug: cannot find package "restic/debug" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>debug (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/debug (from $GOPATH)<br>
>   can't load package: package restic/errors: cannot find package "restic/errors" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>errors (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/errors (from $GOPATH)<br>
>   can't load package: package restic/filter: cannot find package "restic/filter" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>filter (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/filter (from $GOPATH)<br>
>   can't load package: package restic/fs: cannot find package "restic/fs" in any of:<br>
>       /usr/lib/go-1.7/src/restic/fs (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/fs (from $GOPATH)<br>
>   can't load package: package restic/fuse: cannot find package "restic/fuse" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>fuse (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/fuse (from $GOPATH)<br>
>   can't load package: package restic/index: cannot find package "restic/index" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>index (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/index (from $GOPATH)<br>
>   can't load package: package restic/list: cannot find package "restic/list" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>list (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/list (from $GOPATH)<br>
>   can't load package: package restic/location: cannot find package "restic/location" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>location (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/location (from $GOPATH)<br>
>   can't load package: package restic/pack: cannot find package "restic/pack" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>pack (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/pack (from $GOPATH)<br>
>   can't load package: package restic/pipe: cannot find package "restic/pipe" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>pipe (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/pipe (from $GOPATH)<br>
>   can't load package: package restic/repository: cannot find package "restic/repository" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>repository (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/<wbr>repository (from $GOPATH)<br>
>   can't load package: package restic/test: cannot find package "restic/test" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>test (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/test (from $GOPATH)<br>
>   can't load package: package restic/walk: cannot find package "restic/walk" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>walk (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/walk (from $GOPATH)<br>
>   can't load package: package restic/worker: cannot find package "restic/worker" in any of:<br>
>       /usr/lib/go-1.7/src/restic/<wbr>worker (from $GOROOT)<br>
>       /<<PKGBUILDDIR>>/obj-x86_64-<wbr>linux-gnu/src/restic/worker (from $GOPATH)<br>
>   go list of dependencies failed with code 31488,  at /usr/bin/dh_golang line 55.<br>
>   debian/rules:8: recipe for target 'binary' failed<br>
>   make: *** [binary] Error 123<br>
>   dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2<br>
>   ------------------------------<wbr>------------------------------<wbr>--------------------<br>
<br>
<br>
</div></div><br>______________________________<wbr>_________________<br>
Pkg-go-maintainers mailing list<br>
<a href="mailto:Pkg-go-maintainers@lists.alioth.debian.org">Pkg-go-maintainers@lists.<wbr>alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-go-maintainers</a><br></blockquote></div><br></div>