Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] go: patching dependency versions w/ go modules?
@ 2022-06-25 22:37 Christian Stewart via buildroot
  2022-06-25 23:20 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Stewart via buildroot @ 2022-06-25 22:37 UTC (permalink / raw)
  To: Buildroot Mailing List; +Cc: Yann E. MORIN, Thomas Petazzoni

Hi all,

There's a particular issue I've run into with the Go implementation
while trying to fix the gocryptfs package.

Currently the process is:

 1. Download the package source code.
 2. Run "go mod vendor" and re-bundle into a .tar.gz.
 3. Hash the resulting .tar.gz
 4. Extract it to the build/ tree
 5. Apply any patches
 6. Run the build.

The problem with this is, if we try to patch the versions of any
dependencies, for example by editing go.mod and go.sum, this is after
the download step at #2.

So currently it is not possible to change the version of dependencies
with a patch.

Is there any clean way to fix this?

The only thing I can think of is to add a new variable which contains
a list of "go mod edit" commands to run just before "go mod vendor" in
the download & extract step.

go mod edit -replace
github.com/jacobsa/crypto=github.com/piggynl/jacobsa-crypto@xorblock-generic

Thanks & best regards,
Christian Stewart
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-27 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-25 22:37 [Buildroot] go: patching dependency versions w/ go modules? Christian Stewart via buildroot
2022-06-25 23:20 ` Thomas Petazzoni via buildroot
2022-06-27 19:56   ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox