Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: Go ebuilds bundling multiple upstream sources
Date: Tue, 30 Jun 2015 18:12:59
Message-Id: 5592DC1E.7060802@gentoo.org
In Reply to: Re: [gentoo-dev] rfc: Go ebuilds bundling multiple upstream sources by Michael Orlitzky
1 On 06/30/2015 08:49 AM, Michael Orlitzky wrote:
2 > On 06/29/2015 11:25 PM, Zac Medico wrote:
3 >>
4 >> Considering that Go binaries are statically linked, you'll end up with a
5 >> bunch of Go libraries installed that you don't need during run-time.
6 >>
7 >
8 > They'll eventually give this up, because everyone does when their
9 > language starts seeing serious use. I won't pretend that's a real
10 > argument though.
11
12 Yeah, we'll see. We need to deal with the current version of reality
13 though...
14
15 > Suppose ten years from now everything is written in Go. I have 500
16 > statically linked Go packages on my system, all of whose dependencies
17 > were built and compiled-in at install time. Now someone finds a remote
18 > root vulnerability in the go-openssl library. I know some of the
19 > packages I have installed were built against it. What do I do?
20
21 Use slot-operator := deps, together with the emerge --with-bdeps=y
22 option. Then, if you bump the sub-slot of the go-openssl library, all of
23 your go packages that have it in DEPEND with a slot-operator :=
24 dependency will be rebuilt automatically.
25
26 > At least with the useless dev-go/go-openssl installed, I can use
27 > subslots to rebuild everything after an upgrade to the fixed version.
28
29 As I mentioned in my reply to William [1], we might invent a notion of
30 having one ebuild execute another ebuild in order to install static
31 dependencies into a temporary build directory. That way, static
32 libraries would be built on-demand, and discarded as soon as possible.
33
34 [1]
35 https://archives.gentoo.org/gentoo-dev/message/4b150fe36bf9e0ba1eb29b1d695a3193
36 --
37 Thanks,
38 Zac

Replies