Gentoo Archives: gentoo-dev

From: Alec Warner <antarus@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>, Zac Medico <zmedico@g.o>, Ulrich Mueller <ulm@g.o>, "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-dev] rfc: go 1.13 and go modules
Date: Mon, 09 Sep 2019 22:25:51
Message-Id: CAAr7Pr8OQshyif46XWN7=8bhHN=1aRSVQ4YXwZhAXPqDj0OVzQ@mail.gmail.com
In Reply to: Re: [gentoo-dev] rfc: go 1.13 and go modules by William Hubbs
1 On Mon, Sep 9, 2019 at 3:10 PM William Hubbs <williamh@g.o> wrote:
2
3 > On Mon, Sep 09, 2019 at 09:00:31PM +0200, Michał Górny wrote:
4 > > On Mon, 2019-09-09 at 13:41 -0500, William Hubbs wrote:
5 > > > On Mon, Sep 09, 2019 at 11:19:02AM -0700, Zac Medico wrote:
6 > > > > On 9/9/19 10:34 AM, William Hubbs wrote:
7 > > > >
8 > > > > > There is another option I want to try which is adding "go mod
9 > vendor" to
10 > > > > > src_unpack for go packages.
11 > > > >
12 > > > > If you do that then it will violate FEATURES=network-sandbox
13 > (default)
14 > > > > unless you also do PROPERTIES+=" live".
15 > > > >
16 > > > > We could add a separate PROPERTIES value for this, I've suggested it
17 > > > > before but both Michał Górny and Ulrich Mueller were against it:
18 > > > >
19 > > > >
20 > https://archives.gentoo.org/gentoo-portage-dev/message/6d696661b29b6e2b8c82061e89e4718f
21 > > >
22 > > > If checksum verification is the concern, Go 1.13 also has this:
23 > > >
24 > > > https://blog.golang.org/module-mirror-launch
25 > > >
26 > > > Thoughts? Does this make the case for a property for these kinds of
27 > > > ebuilds?
28 > > >
29 > >
30 > > Checksum verification is only one of the problems. The other one is
31 > > that it won't work if you don't have permanent Internet access or are
32 > > using strong firewalling.
33 > >
34 > > Ebuilds are using a single fetching mechanisms so that people can adjust
35 > > it as necessary for their setup. It's not fine to try to silently work
36 > > around that and access Internet.
37 >
38 > This argument is pretty irrelivent, because if you are using that strong
39 > firewalling, you will block people from compiling go sourcewith external
40 > dependencies whether or not they are using ebuilds.
41 > Also, you will block emerge --sync since it uses rsync and that protocol
42 > is more likely to be blocked than http.
43 >
44 > This also applies to your comment about not having a permanent internet
45 > connection.
46 >
47
48 There are multiple ways to sync (e.g. websync, snapshots, rsync, git..) but
49 the idea is that you can do things like:
50
51 emerge --sync # download new tree
52 emerge --fetchonly # download my stuff
53
54 # Disconnect my computer
55 emerge foo # use downloaded stuff
56
57 You will note that there is no pkg_fetch function; the sources are all in
58 SRC_URI and the package-manager fetches all of them. So golang modules
59 would need to follow this in order to emulate this functionality or be
60 marked LIVE and not be able to be installed in this scheme.
61
62 I'm not quite grasping why we cannot parse the dependency syntax and build
63 the SRC_URIs from the dependency listing? Because its too hard? Because we
64 can't do it in bash? Some other reason?
65
66 -A
67
68
69 >
70 > William
71 >
72 >