port load/unload

Bradley Giesbrecht brad at pixilla.com
Sat Sep 18 15:33:58 PDT 2010


On Sep 18, 2010, at 3:15 PM, Rainer Müller wrote:

> On 2010-09-18 22:23 , Ryan Schmidt wrote:
>>> if {${build.asroot} == "yes"} {
>>> ui_msg (no newline) "sudo "
>>> }
>>> ui_msg "port load ${name}"
>
> No, build.asroot does not have anything to do whether we are using
> Leopard or Snow Leopard, so that's not the solution. Also note that  
> you
> don't need sudo for LaunchAgents (per-user), while loading  
> LaunchDaemons
> (system-wide, what we install by default) still requires root  
> privileges.
>
>> Perhaps someone could first explain the purpose of the *.asroot
>> options. I still don't understand it, or frankly any of the
>> gsoc08-privileges stuff. All it's been for me is one big headache. To
>> this day my non-root MacPorts installations don't work right thanks
>> to this branch.
>
> *.asroot means that this phase cannot drop privileges because it does
> stuff which requires root privileges to complete. An example would be
> adding system users or groups.
>
> Are you using the --with-install-user, --with-install-group,
> --with-macports-user and --with-tclpackage options? Probably
> --without-root-privileges should also set --with-macports-user as we  
> are
> now using nobody on trunk by default. I admit that I didn't use this  
> for
> a while so I cannot tell if it works at all with either 1.9 branch or
> trunk...
>
> The usage of the alternate prefix for building is something I  
> personally
> never liked, but Paul did a lot. In my opinion it only complicates
> things and is actually not used right now. I wouldn't mind ripping it
> out. Dropping privileges to 'nobody' is much more sane than using your
> own user account as that can still cause harm to your data.

Please always error on the side of preserving user data. I haven't  
been following this thread but "your data" caught my eye. Whether conf  
files or db's, same thing, we need to preserve them and that is one  
thing I do not see enforced by port.

// Brad


More information about the macports-dev mailing list