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

Re: Using debian/vendor/ in Go packages?



Otto Kekäläinen <otto@debian.org> writes:

> Hi!
>
> After assessing pros and cons, I decided to stick with the `go mod
> vendor` -> debian/vendor/ approach. See example in
> https://salsa.debian.org/go-team/packages/usql/-/merge_requests/1 and
> specifically commit
> https://salsa.debian.org/go-team/packages/usql/-/merge_requests/1/diffs?commit_id=60a45c4e5e18b89c297b6cb6adf62115041a9d8b
>
> Having them downloaded separately with uscan would pull in a bunch of
> extra binary test files and whatnot those repositories have. When
> running `go mod vendor` only the files really needed for the build are
> fetched, and the file/directory sizes stay small. There is also less
> work to maintain d/copyright and d/source/include-binaries. Using `go
> mod vendor` also pulls in the specific versions defined in go.mod,
> resulting in the most exact and surgically small import. A watchfile
> would encourage to use the latest versions, which may not be the true
> intent.

Nice.  Could you describe with example commands how you do the import of
the debian/vendor/?  I think I can understand the end result, but not
how you get there.  Is it this step?

https://salsa.debian.org/go-team/packages/usql/-/blob/60a45c4e5e18b89c297b6cb6adf62115041a9d8b/debian/vendor/README.md

I think vendoring is the right approach for two build dependencies of
'ssh-tpm-agent' and I have an unfinished packaging of it that uses a
custom wget approach like this:

https://salsa.debian.org/go-team/packages/ssh-tpm-agent/-/blob/debian/sid/debian/README.source?ref_type=heads

I'd like to clean this up, either by using the uscan approach (which
seems a bit more Debianesque) or use your approach (or settle with my
wget-hack) but I find all of them a bit sub-optimal so I've postponed
work on 'ssh-tpm-agent'.  Insted I have been hoping that upstream
produce supported releases of the build dependencies, but it doesn't
seem to be happening.  Some background here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082814#12

/Simon

Attachment: signature.asc
Description: PGP signature


Reply to: