gsoc08-privileges branch merged

Joshua Root jmr at macports.org
Wed Feb 18 17:18:50 PST 2009


Paul Magrath wrote:
> Hey Josh,
> 
> If you have any questions, give me a shout. I'm still around I just
> haven't had much time - I'm in final year of my Computer Science course
> and workload is crazy.

Sure, no worries.

>> I just finished merging the changes from the gsoc08-privileges branch
>> back into trunk. This of course has the potential for breakage, though I
>> changed the default back to running as root, so you should hopefully not
>> see any problems unless you pass --with-macports-user=you to configure.
>>
>> The privilege dropping has its issues. For example, if you start port
>> with sudo, the configure and build phases will be run as root. But then
>> root privileges will be dropped by the time it tries to clean after
>> installing, with predictable results.
> 
> I was aware of this problem. The solution is to elevate privileges if
> clean fails, which I thought I'd written code to do so. However, as I'm
> sure you noticed, I haven't had time to keep the branch up to date so it
> is entirely possible that the code has been bypassed in the flow of
> control somehow.

Seems like it would also make sense to drop privileges for configure and
build if possible?

>> So there's still some tweaking to be done, but I figured the sooner it
>> was merged, the less bitrot there'd be to deal with.
> 
> Agreed, thanks actually for going ahead. I had meant to get it merged
> into trunk at the end of the summer but with all the v1.7 release stuff
> and the change in port managers, it didn't really seem the best time to
> merge in a large amount of code. I amn't sure if you have seen:
> https://trac.macports.org/wiki/gsoc08-privileges , if not it might be
> worth a read.

Right, it made sense to wait to merge this until after 1.7 was branched
off. Feel free to improve things directly on trunk now, if you ever have
a spare moment. :-)

- Josh


More information about the macports-dev mailing list