Gentoo Archives: gentoo-dev

From: Pacho Ramos <pacho@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Enable FEATURES="userpriv usersandbox" by default?
Date: Tue, 03 Jul 2012 07:19:04
Message-Id: 1341299891.3626.0.camel@belkin4
In Reply to: Re: [gentoo-dev] RFC: Enable FEATURES="userpriv usersandbox" by default? by Zac Medico
1 El lun, 02-07-2012 a las 13:45 -0700, Zac Medico escribió:
2 > On 07/02/2012 01:36 PM, vivo75@×××××.com wrote:
3 > > Il 02/07/2012 22:01, Zac Medico ha scritto:
4 > >> On 07/02/2012 12:48 PM, Pacho Ramos wrote:
5 > >>> El lun, 28-05-2012 a las 14:34 -0700, Zac Medico escribió:
6 > >>>> Hi,
7 > >>>>
8 > >>>> In case you aren't familiar with FEATURES=userpriv, here's the
9 > >>>> description from the make.conf(5) man page:
10 > >>>>
11 > >>>> Allow portage to drop root privileges and compile packages as
12 > >>>> portage:portage without a sandbox (unless usersandbox is also used).
13 > >>>>
14 > >>>> The rationale for having the separate "usersandbox" setting, to enable
15 > >>>> use of sys-apps/sandbox, is that people who enable userpriv sometimes
16 > >>>> prefer to have sandbox disabled in order to slightly improve
17 > >>>> performance. However, I would recommend to enable usersandbox by
18 > >>>> default, for the purpose of logging sandbox violations.
19 > >>>>
20 > >>>> Note that ebuilds can set RESTRICT="userpriv" if they require superuser
21 > >>>> privileges during any of the src_* phases that userpriv affects.
22 > >>>>
23 > >>>> I've been using FEATURES="userpriv usersandbox" for years, and I don't
24 > >>>> remember experiencing any problems because of it, so I think that it
25 > >>>> would be reasonable to have it enabled by default. Objections?
26 > >>> Looks like non important problems arised and, then, these could probably
27 > >>> be enabled by default, no? :)
28 > >> I'm not sure about the best way to handle migration for directories
29 > >> inside $DISTDIR that are used by live ebuilds, since src_unpack will run
30 > >> with different privileges when userpriv is enabled.
31 > > tell the user to chown/remove the files/directories if and when needed,
32 >
33 > How should we tell them? Elog message, news item, or both?
34 >
35 > > unless there is a very good reason (try) to automate it.
36 >
37 > I guess something like this might work in pkg_postinst of the portage
38 > ebuild:
39 >
40 > find "$DISTDIR" -maxdepth 1 -type d -uid 0 | xargs chown -R
41 > portage:portage
42 >
43 > I would only trigger something like this once, when upgrading from a
44 > version that doesn't have userpriv enabled by default.
45
46 This looks reasonable, I think

Attachments

File name MIME type
signature.asc application/pgp-signature