1 |
On Mon, Sep 09, 2019 at 06:21:42PM -0500, William Hubbs wrote: |
2 |
> On Mon, Sep 09, 2019 at 03:57:18PM -0700, Georgy Yakovlev wrote: |
3 |
> > On Monday, September 9, 2019 2:46:16 PM PDT William Hubbs wrote: |
4 |
> > > On Tue, Sep 10, 2019 at 08:35:17AM +1200, Kent Fredric wrote: |
5 |
> > > > On Mon, 9 Sep 2019 12:34:18 -0500 |
6 |
> > > > |
7 |
> > > > William Hubbs <williamh@g.o> wrote: |
8 |
> > > > > There is another option I want to try which is adding "go mod vendor" to |
9 |
> > > > > src_unpack for go packages. |
10 |
> > > > |
11 |
> > > > Is it infeasible to write a tool that you execute as a maintainer, that |
12 |
> > > > simulates what "go mod vendor" would do, but instead emits a list of |
13 |
> > > > entries for SRC_URI, and then have an eclass or something construct the |
14 |
> > > > vendor dir from those? |
15 |
> > > > |
16 |
> > > > That's what is available for rust stuff. |
17 |
> > > |
18 |
> > > I'm not sure how feasible something like that is. |
19 |
> > > |
20 |
> > > $ go list -m all |
21 |
> > > |
22 |
> > > will list the dependencies of a module, but that doesn't look like it |
23 |
> > > can be translated into src_uri format. |
24 |
> > > |
25 |
> > > You would basically have to parse go.mod exactly the way upstream does |
26 |
> > > it and come up with a way to download the correct versions of the |
27 |
> > > source. |
28 |
> > > |
29 |
> > > William |
30 |
> > |
31 |
> > check mail-client/aerc ebuild. |
32 |
> > I use "go list -m all" and manually format EGO_VENDOR string which will be |
33 |
> > translated into SRC_URI by eclass. |
34 |
> > tool is certainly possible and should be quite easy to implement. |
35 |
> > some manual editing will still be needed if dealing with forked packages/ |
36 |
> > repos, but looks pretty straightforward. |
37 |
> > This is very similar approach to cargo ebuilds and it supports offline |
38 |
> > installs, PM checksumming and does not require packaging every single go |
39 |
> > dependency as a package. |
40 |
> |
41 |
> Ok, I took a quick look at this. |
42 |
> We will need another eclass similar to the golang-vcs-snapshot eclass, |
43 |
> but it doesn't need to mess with GOPATH since GOPATH isn't used by go |
44 |
> modules. |
45 |
> |
46 |
> I will also look at go list -m all and see what comes out of it. |
47 |
|
48 |
It looks like we would also need a way to honor the GOPROXY environment |
49 |
variable as well. |
50 |
|
51 |
Thanks, |
52 |
|
53 |
William |