[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging usql - help to limit the scope of the build?



On 3/20/25 8:13 PM, Otto Kekäläinen wrote:
It has in go.mod a massive list of requires, mainly because it has
support for so many database drivers. I am not interested in packaging
all of them, and I see that e.g. in Arch the maintainer limited the
build by passing custom tags to 'go build'
(https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=usql). This
does not work in Debian as dh_golang will always try to include and
build everything before starting 'go build'. I also tried limiting the
scope with having just a subset of Go project paths in
DH_GOLANG_BUILDPKG, which does the first 'go install' run with a
smaller scope, but the next step want's to build everything anyway.

Any suggestions on what to try next?

It is possible to pass build tags in d/rules, for example src:soju has this:

override_dh_auto_build:
	dh_auto_build -O--buildsystem=golang -- -tags="pam"

See https://salsa.debian.org/go-team/packages/soju/-/blob/26db296cac685b77b103a94f83c8b6381367145a/debian/rules#L12 for an example.

Taavi


Reply to: