port load/unload

Rainer Müller raimue at macports.org
Sat Sep 18 15:15:37 PDT 2010


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.

Rainer


More information about the macports-dev mailing list