MacPorts as non-root (and non-admin)

Anders F Björklund afb at macports.org
Wed Jan 30 05:07:40 PST 2008


The old request of being able to run MacPorts as non-root
resurfaced, something that isn't supported at the moment...

Most ports do install under the configurable ${prefix}
(and ${x11prefix} for some of the optional X11 ports),
but there are also a bunch that are hardcoding the (admin)
locations of /Applications/MacPorts and /Library/Frameworks.

So the Mac OS X tree (macosx.mtree) probably also needs
a prefix added, so that they would instead install under
~/Applications and ~/Library, when running as non-admin ?
(and probably default to ~/Library/Tcl for macports1.0)

As a first step, I added* two parameters to configure:
--with-applications-dir and --with-frameworks-dir


It also needs a new Portfile setting added somewhere:
a flag for "this port requires root/admin priviledges"
It would be set for things like servers or extensions,
that really *needs* root in order to run properly...

Possibly tying in with the "startupitem.type none",
http://lists.macosforge.org/pipermail/macports-dev/2006-October/ 
000136.html
Then the above two variables could go in as something
like: ${destroot.applications} ${destroot.frameworks}

--anders

* http://trac.macosforge.org/projects/macports/changeset/33499



More information about the macports-dev mailing list