Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Private SVN repository for live-ebuild
Date: Fri, 28 Jan 2011 20:34:50
Message-Id: 4D432875.3080303@gentoo.org
In Reply to: Re: [gentoo-dev] Private SVN repository for live-ebuild by Donnie Berkholz
1 On 01/28/2011 06:26 AM, Donnie Berkholz wrote:
2 > On 11:55 Thu 27 Jan , Zac Medico wrote:
3 >> On 01/27/2011 11:08 AM, Matthew Summers wrote:
4 >>> One question though. Since the 'portage' user has its $home set by default
5 >>> to /var/tmp/portage how would you recommend handling the ssh key situation
6 >>> since that directory is somewhat special?
7 >>
8 >> Well, I've never tried it, so I don't have any recommendation atm other
9 >> than to make sure FEATURES=userpriv is not enabled.
10 >>
11 >> Moving forward, maybe it would make sense to have a notion of a
12 >> configurable "fetcher home" that package managers and live/vcs eclasses
13 >> would use for the HOME variable only when fetching. For example, the
14 >> user could configure this by setting a FETCHER_HOME variable.
15 >
16 > This might be useful in other scenarios besides fetching that just
17 > haven't occurred to us yet. Perhaps we should treat the portage user as
18 > a regular user with a regular home directory that can be configured as
19 > desired, and flip in and out of that user on demand.
20
21 Well, the problem that I see with having a common $HOME for execution of
22 _all_ ebuilds is that it will be likely to accumulate all sorts of junk
23 from the various programs that are executed by ebuilds, and this can
24 lead to all sorts of bugs that may or may not be reproducible based on
25 the state of this directory on a given user's system.
26
27 Currently, portage always sets $HOME to a private temporary directory
28 which is a sibling of other private temporary directories such as
29 $WORKDIR, $T, and $D. This has the advantage of providing a clean slate
30 for each ebuild, ensuring reproducible results and no accumulation of junk.
31
32 This is why I suggested that we used a separate $HOME that is only for
33 fetching purposes, in order to minimize the risk of junk accumulation
34 and resulting problems with reproducibility.
35 --
36 Thanks,
37 Zac