You need DH_GOLANG_INSTALL_EXTRA https://manpages.debian.org/testing/dh-golang/Debian::Debhelper::Buildsystem::golang.3pm.en.html#DH_GOLANG_INSTALL_EXTRA
- Tianon On Sat, Dec 6, 2025, 14:54 Federico Grau <[email protected]> wrote: > Hello Debian Golang collaborators -- > > I am working on updating the `pat' package from v0.16.0 to v0.19.1, but > encountering some challenges around "//go:embed" statements. > > https://tracker.debian.org/pkg/pat > > > For my debian package build environment I'm using "gbp" and "sbuild" with > an > unshare backend. This has worked well for several other debian package > builds. > > > Sample build errors (more build logs are below): > > src/github.com/la5nta/pat/internal/cmsapi/api.go:192:12: pattern > gateway_status.json.gz: no matching files found > > src/github.com/la5nta/pat/internal/propagation/silso/silso.go:31:12: > pattern KFprediCM.txt: no matching files found > > > The files to be embedded are located in the same directories as the Golang > source files. > > *** However, I'm not clear if the build process may copy the Golang source > files to another directory (and may be missing the embed files, or if that > can > be adjusted). > > > > Any tips, guidance, or pointers to similar debian packages I should study > would be welcome. In the mean time I'm reading over the Golang docs on > embed > and a couple other blogs on the topic. > > https://pkg.go.dev/embed > > https://blog.saintmalik.me/embedding-static-files-in-go-cli/ > > https://blog.carlana.net/post/2021/how-to-use-go-embed/ > > https://gobyexample.com/embed-directive > > > Regards, > donfede > > > > > ############## > # > # sbuild "Build step" excerpt > # > > time sbuild -A -v -d unstable --no-clean-source > ... > > > +------------------------------------------------------------------------------+ > | Build Sat, 06 Dec 2025 22:22:44 > +0000 > | > > +------------------------------------------------------------------------------+ > > > Unpack source > ------------- > > Format: 3.0 (quilt) > Source: pat > Binary: pat > Architecture: any > Version: 0.19.1-1 > Maintainer: Debian Hamradio Maintainers <[email protected]> > Uploaders: Taowa <[email protected]>, Federico Grau <[email protected]> > Homepage: https://getpat.io > Standards-Version: 4.7.0 > Vcs-Browser: https://salsa.debian.org/debian-hamradio-team/pat > Vcs-Git: https://salsa.debian.org/debian-hamradio-team/pat.git > Testsuite: autopkgtest-pkg-go > Build-Depends: debhelper-compat (= 13), dh-golang, golang-any, > golang-github-adrg-xdg-dev, golang-github-bndr-gotabulate-dev, > golang-github-dimchansky-utfbom-dev, > golang-github-elazarl-go-bindata-assetfs-dev, > golang-github-fsnotify-fsnotify-dev, golang-github-gorhill-cronexpr-dev, > golang-github-gorilla-mux-dev, golang-github-harenber-ptc-go-dev, > golang-github-hashicorp-go-version-dev, golang-github-howeyc-gopass-dev, > golang-github-imdario-mergo-dev, golang-github-jteeuwen-go-bindata-dev, > golang-github-kelseyhightower-envconfig-dev, > golang-github-la5nta-wl2k-go-dev > (>= 0.11.4), golang-github-microcosm-cc-bluemonday-dev, > golang-github-nfnt-resize-dev, golang-github-pd0mz-go-maidenhead-dev, > golang-github-peterh-liner-dev, golang-github-spf13-pflag-dev, > golang-github-gorilla-websocket-dev, golang-github-tarm-serial-dev, > golang-golang-x-sync-dev, libax25-dev > Package-List: > pat deb hamradio optional arch=any > Checksums-Sha1: > 7ed3592fd3944107f1609b2321cab02fe3434a34 1700040 pat_0.19.1.orig.tar.gz > 109bebaffcb14d33d488d94638996a88d139356c 18700 pat_0.19.1-1.debian.tar.xz > Checksums-Sha256: > c3d98b46dba4ce89d1d3f7b1294160fca883e1598866bf89e3bfa21082ae8f82 1700040 > pat_0.19.1.orig.tar.gz > 453a1d23095857ad4c339af71b7f41bd14b2e9c9fc2d1f06fd6f04cc5b7d3f66 18700 > pat_0.19.1-1.debian.tar.xz > Files: > c9297709c53eea24ac7f277d292e931f 1700040 pat_0.19.1.orig.tar.gz > 797a0d6e11b6a5efcb35aee05eebd552 18700 pat_0.19.1-1.debian.tar.xz > Go-Import-Path: github.com/la5nta/pat > > dpkg-source: warning: extracting unsigned source package (pat_0.19.1-1.dsc) > dpkg-source: info: extracting pat in /build/reproducible-path/pat-0.19.1 > dpkg-source: info: unpacking pat_0.19.1.orig.tar.gz > dpkg-source: info: unpacking pat_0.19.1-1.debian.tar.xz > dpkg-source: info: using patch list from debian/patches/series > dpkg-source: info: applying 02_fix_manpage.patch > dpkg-source: info: applying 03_upstream_changelog.patch > dpkg-source: info: applying > 04-update_man_pages_for_renamed_binary_994822.patch > dpkg-source: info: applying vendor-n8jja-pat-vara.patch > > Check disk space > ---------------- > > Sufficient free space for build > > User Environment > ---------------- > > APT_CONFIG=/var/lib/sbuild/apt.conf > HOME=/sbuild-nonexistent > LANG=en_US.UTF-8 > LC_ALL=C.UTF-8 > LC_TIME=C.UTF-8 > LOGNAME=sbuild > > PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games > SHELL=/bin/sh > USER=sbuild > > dpkg-buildpackage > ----------------- > > Command: dpkg-buildpackage --sanitize-env -us -uc -b > dpkg-buildpackage: info: source package pat > dpkg-buildpackage: info: source version 0.19.1-1 > dpkg-buildpackage: info: source distribution unstable > dpkg-buildpackage: info: source changed by Federico Grau > <[email protected]> > dpkg-source --before-build . > dpkg-buildpackage: info: host architecture amd64 > debian/rules clean > dh clean --builddirectory=_build --buildsystem=golang --with=golang > dh_auto_clean -O--builddirectory=_build -O--buildsystem=golang > dh_autoreconf_clean -O--builddirectory=_build -O--buildsystem=golang > dh_clean -O--builddirectory=_build -O--buildsystem=golang > debian/rules binary > dh binary --builddirectory=_build --buildsystem=golang --with=golang > dh_update_autotools_config -O--builddirectory=_build > -O--buildsystem=golang > dh_autoreconf -O--builddirectory=_build -O--buildsystem=golang > dh_auto_configure -O--builddirectory=_build -O--buildsystem=golang > debian/rules override_dh_auto_build > make[1]: Entering directory '/build/reproducible-path/pat-0.19.1' > dh_auto_build -- -tags libax25 > cd _build && go install -trimpath -v -p 2 -tags libax25 > github.com/la5nta/pat github.com/la5nta/pat/api > github.com/la5nta/pat/api/types github.com/la5nta/pat/app > github.com/la5nta/pat/cfg github.com/la5nta/pat/cli > github.com/la5nta/pat/internal/buildinfo > github.com/la5nta/pat/internal/cmsapi > github.com/la5nta/pat/internal/debug > github.com/la5nta/pat/internal/directories > github.com/la5nta/pat/internal/editor github.com/la5nta/pat/internal/forms > github.com/la5nta/pat/internal/gpsd github.com/la5nta/pat/internal/osutil > github.com/la5nta/pat/internal/patapi > github.com/la5nta/pat/internal/prehook > github.com/la5nta/pat/internal/propagation > github.com/la5nta/pat/internal/propagation/silso > github.com/la5nta/pat/internal/propagation/voacap > src/github.com/la5nta/pat/internal/cmsapi/api.go:192:12: pattern > gateway_status.json.gz: no matching files found > src/github.com/la5nta/pat/internal/propagation/silso/silso.go:31:12: > pattern > KFprediCM.txt: no matching files found > dh_auto_build: error: cd _build && go install -trimpath -v -p 2 -tags > libax25 > github.com/la5nta/pat github.com/la5nta/pat/api > github.com/la5nta/pat/api/types github.com/la5nta/pat/app > github.com/la5nta/pat/cfg github.com/la5nta/pat/cli > github.com/la5nta/pat/internal/buildinfo > github.com/la5nta/pat/internal/cmsapi > github.com/la5nta/pat/internal/debug > github.com/la5nta/pat/internal/directories > github.com/la5nta/pat/internal/editor github.com/la5nta/pat/internal/forms > github.com/la5nta/pat/internal/gpsd github.com/la5nta/pat/internal/osutil > github.com/la5nta/pat/internal/patapi > github.com/la5nta/pat/internal/prehook > github.com/la5nta/pat/internal/propagation > github.com/la5nta/pat/internal/propagation/silso > github.com/la5nta/pat/internal/propagation/voacap returned exit code 1 > make[1]: *** [debian/rules:9: override_dh_auto_build] Error 25 > make[1]: Leaving directory '/build/reproducible-path/pat-0.19.1' > make: *** [debian/rules:6: binary] Error 2 > dpkg-buildpackage: error: debian/rules binary subprocess returned exit > status > 2 > > -------------------------------------------------------------------------------- > Build finished at 2025-12-06T22:22:46Z > > Finished > -------- > > > > +------------------------------------------------------------------------------+ > | Generic Build Failed Commands Sat, 06 Dec 2025 22:22:46 > +0000 > | > > +------------------------------------------------------------------------------+ > > > bash -i </dev/tty >/dev/tty 2>/dev/tty > -------------------------------------- > > root@sbuild:/build/reproducible-path# > > # > ############## > >
