Gentoo Archives: gentoo-alt

From: Dirk Tilger <dirk@××××××.de>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] enewuser() and consorts in eutils.eclass
Date: Sun, 21 Oct 2007 09:41:23
Message-Id: 8ADF0465-0C59-46E7-9FCD-17CD1B54113D@miriup.de
In Reply to: [gentoo-alt] enewuser() and consorts in eutils.eclass by Dirk Tilger
1 On Oct 18, 2007, at 1:53 AM, Dirk Tilger wrote:
2
3 > I was wondering what the motivation behind this is, i.e. what you guys
4 > count as the issues that have to be addressed (and that are not
5 > addressed in the current form), before this function and its
6 > friends in
7 > eutils can be called again.
8
9 I was partially able to answer the question myself and for the record
10 and anyone heading in the same direction, I thought I give some feedback
11 of what I have discovered.
12
13 The main misconception I had was that prefixed portage was all about
14 having
15 all the software sitting below some prefixed location ($EPREFIX).
16 However,
17 it is also a single-user package management system. A nice
18 illustration to
19 me was:
20
21 | me@here ~ $ sudo emerge --config postgresql
22 | Password:
23 | emerge: superuser access is required.
24
25 > I've seen parts in enewuser() for example calling `dscl` to create
26 > Darwin NetInfo user accounts.
27
28 To take full advantage of the created user accounts in portage, one has
29 IMHO also to allow automatically changing ownership of files to them.
30
31 Changing ownership and permissions of files can be at least done in the
32 following ways:
33
34 - `fowners` and `fperms`
35 - calls to `chown` and `chmod` commands from ebuilds
36 - calls to `chown` and `chmod` commands from Makefile's and
37 installation shellscripts
38 - calls to `chown` and `chmod` libc functions (i.e. BSD's `install`)
39
40 So a solution that would suit my taste [of minimizing the change] would
41 be to catch function calls to `chown` and `chmod` with a mechanism
42 similar
43 to LD_PRELOAD. Now that is IMHO what the sandbox can do.
44
45 What is the current porting status of the sandbox?
46 Does anyone of you have some nice links for discussions on the topic?
47
48 Best regards,
49 Dirk.
50 --
51 gentoo-alt@g.o mailing list