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