1 |
On 03:01 Sun 06 Mar , Brian Harring wrote: |
2 |
[snip] |
3 |
Thanks for your feedback, your remarks were correct :). I updated the |
4 |
eclass appropriately. |
5 |
|
6 |
> I'd take a different approach here; this code basically assumes that |
7 |
> the PM knows of it- note the chmod -s. The use flag protection you |
8 |
> tried adding, without some profile hacks, is user modifiable- meaning |
9 |
> users can flip it on even if the PM doesn't support it. |
10 |
> |
11 |
> Or consider that the code above is purely doing it's thing during the |
12 |
> install phase, specifically against whatever filesystem is used for |
13 |
> building- while capabilities might be able to be set there, it's |
14 |
> possible the final merge location won't support it. End result of |
15 |
> that is you'll get a setuid stripped binary merged to the |
16 |
> livefs lacking the caps- borkage. Or consider the inverse- the |
17 |
> buildroot can't do capabilities, but the livefs could. You get the |
18 |
> idea. |
19 |
> |
20 |
> Instead, write the code so the PM has to export a marker in some |
21 |
> fashion to explicitly state "yes, I can do capabilities"- I'm |
22 |
> specifically suggestining checking for a callback function exposed to |
23 |
> the env. |
24 |
> |
25 |
> If that function isn't there, then the PM can't do it- end of story. |
26 |
> If it is, the PM takes the args and will try to apply the |
27 |
> capabilities at the correct time- stripping setuid/setgid if it |
28 |
> succeeds. |
29 |
> |
30 |
> Please go that route; and please do not stick "portage" into the |
31 |
> function name, something generic we can use for a later EAPI is |
32 |
> better. |
33 |
> |
34 |
> Implementing it as I suggested has the nice side affect of not being |
35 |
> limited by PMS also, although it's an approach that still requires |
36 |
> planning for compatibility. |
37 |
I'm currently in search of a good fallback mechanism respectivly a good |
38 |
mechanism to deal with cap-setting in src_install. As I already said in |
39 |
my mail to ciaran, I'm going to give the new ideas some thought :). |
40 |
|
41 |
Cheers, |
42 |
constanze |