The mysql5 port works fine without the +server option, and still installs the server, just not the startup items, etc. The apache2 port tries to install a startup item, so I've made a simple patch to macports to allow a startupitem type of "none" that just ignores it. I think that's 90% of the problem, really. As I find more ports with issues, I'll bring them up. It's definitely a lot of trouble to get this working, but the alternative is to install every piece of software by hand for multiple users. So it's definitely the lesser of two evils. Below is the patch for the "none" startupitem type; I'll need to update any docs, etc, to match. What's the best, most reasonable approach for encouraging portfile maintainers to accept my patches? I suspect I'll have to work out a way for commands specifying root/ wheel/admin/etc. to have a simple variable to interpret that is set to the installation user. If anyone sees any serious issues with this, let me know. As this will mostly be used for libraries, etc., I don't expect to run into it often. Mostly just mysql and apache and a few other common servers. Thanks! Paul M. Lambert Index: base/src/port1.0/portstartupitem.tcl =================================================================== --- base/src/port1.0/portstartupitem.tcl (revision 20071) +++ base/src/port1.0/portstartupitem.tcl (working copy) @@ -628,12 +628,15 @@ } } - ui_msg "$UI_PREFIX [msgcat::mc "Creating ${startupitem.type} control script"]" + if {${startupitem.type} != "none"} { + ui_msg "$UI_PREFIX [msgcat::mc "Creating $ {startupitem.type} control script"]" + } switch -- ${startupitem.type} { launchd { startupitem_create_darwin_launchd } systemstarter { startupitem_create_darwin_systemstarter } rcng { startupitem_create_rcng } + none { } default { ui_error "$UI_PREFIX [msgcat::mc "Unrecognized startupitem type %s" ${startupitem.type}]" } } } On Oct 15, 2006, at 13:46, Salvatore Domenick Desiano wrote:
I tried, for a while, to run MacPorts without root, but it ends up being more trouble than its worth. A fair number of packages (like mysql) just can't install without adding users or making priviledged files. Most will build without root, so you can do port build as user and port install as root, but even that runs into problems. I also suspect that a number of undiagnosed problems with my install stem from packages being built as a user (even though it shouldn't matter).
The short version is that I don't think we have a stable system that can be run strictly as a user, and that the changes required to make one go far beyond MacPorts and into the individual packages, themselves.
Just my 2c.
-- Sal smile.
On Sun, 15 Oct 2006, Daniel J. Luke wrote:
o On Oct 14, 2006, at 8:59 PM, Paul M. Lambert wrote: o > I'm trying to build a macports installation that runs entirely out o > of a user's home directory. o > o > I've compiled macports without launchd support, and set the install o > user and group to the appropriate user. o > o > However, when I try to run "port install mysql5" it fails, o > apparently because it's trying to chown a file to root. o > o > Is this a problem with that port, or does macports require root in o > general? o o It looks like the server variant of that port wants to set everything o up for a 'normal' mysql server install. o o You could probably run the regular (non-server) variant and then o configure mysql how you want it after the install without needing root. o o > If it's the latter, any suggestions on how I could go about o > patching it to allow fully non-root user installations? o o I think most of the issues you will find will be with individual o ports, but I don't know if anyone else is still running macports as o non-root, so you could stumble across other issues that we haven't o seen before. o o -- o Daniel J. Luke o +========================================================+ o | *---------------- dluke@geeklair.net ----------------* | o | *-------------- http://www.geeklair.net -------------* | o +========================================================+ o | Opinions expressed are mine and do not necessarily | o | reflect the opinions of my employer. | o +========================================================+ o o o
-------------- Salvatore Domenick Desiano Doctoral Candidate Robotics Institute Carnegie Mellon University