Gentoo Archives: gentoo-soc

From: Rich Freeman <rich0@g.o>
To: gentoo-soc@l.g.o
Cc: Antoine Pinsard <antoine.pinsard@×××××××××××.fr>
Subject: Re: [gentoo-soc] Project Proposal : GenCC for "Gentoo Community Compiling"
Date: Mon, 18 Feb 2013 19:13:30
Message-Id: CAGfcS_nNcZwOqfv9M5VChF4CSrm1MbxWp5eT_zuxihis6Sq8Jw@mail.gmail.com
In Reply to: Re: [gentoo-soc] Project Proposal : GenCC for "Gentoo Community Compiling" by Patrick Lauer
1 On Mon, Feb 18, 2013 at 9:03 AM, Patrick Lauer <patrick@g.o> wrote:
2
3 (note, switching order I comment in)
4
5 (Note also - I'm not sold on any of this being practical - this is an
6 outline of how the obstacles might be surmounted.)
7
8 >
9 > How do you manage to get a precise environment (including useflags,
10 > correct gcc version, ...) onto the compile host? Wouldn't that be slower
11 > than building it locally?
12
13 So, the premise is that if you build a package with identical
14 dependencies you'll get an identical output. That is using a
15 definition of dependency as anything involved in the creation of the
16 package.
17
18 So, for this to work you'd need to:
19 1. ID all the dependencies of a package (INCLUDING system packages).
20 We don't do this for various reasons, and that would be a problem,
21 unless the data is somehow gathered by the tool or we change our
22 policies.
23
24 2. ID the versions and configurations of all the dependencies. That
25 would include USE flags at least. Hopefully nothing build-time
26 depends on configuration files, but that might also be an issue.
27
28 3. ID hosts who have identical configurations, and use them to build.
29
30 However, if you're going to do all of that stuff, you could just as
31 easily assemble a binary packages catalog. Why distribute all the
32 compiling when you can just ask for what should be an identical final
33 executable?
34
35 > So, how do you handle people being evil? What happens if my genccd
36 > always returns 0-byte files? what if it adds random things to execute
37 > code on the user's system?
38
39 I'd also want to make sure that the attacks can't go the other way as
40 well. If nothing else you're open to a CPU-using DOS (compile this
41 2GB file full of really complex C++ abstractions for me).
42
43 For the output you could have some kind of web-of-trust where multiple
44 people do the work and report the hash/etc.
45
46 Again, a binary package repository shouldn't really be any harder to
47 implement and makes far more sense all around. Then everybody just
48 reports their hashes, or we could have an official list of these and
49 mirrors/etc.
50
51 Distributed CC within an organization makes more sense as it
52 eliminates the trust issues, mostly (you might still care about
53 reliability, but not malicious attacks). However, a single
54 organization is also likely to have more uniform configuration, and
55 thus a binary repository makes even more sense.
56
57 I think the big question is - what does distributed compilation get us
58 that a binary repository doesn't get us, or in what way is it easier?
59 I can't really think of any advantages of the former over the latter.
60 Both will still be a challenge to implement, and that might start with
61 fully identifying dependencies.
62
63 Rich

Replies

Subject Author
Re: [gentoo-soc] Project Proposal : GenCC for "Gentoo Community Compiling" Antoine Pinsard <antoine.pinsard@×××××××××××.fr>