#10879 closed enhancement (fixed)
RFE: apache2 and other ports won't install as non-root users because of startupitems
Reported by: | plambert@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.0.0 |
Component: | base | Version: | |
Keywords: | Cc: | jameskyle@… | |
Port: |
Description
Installed macports from source with --disable-launchd-support and tried to install apache2. The install failed as follows:
---> Creating systemstarter control script Error: Target com.apple.destroot returned: could not set owner for file "/ngs/lpp/macports/var/db/dports/build/_ngs_lpp_macports_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_www_apache2/work/destroot/Library/StartupItems/apache2": not owner Warning: the following items did not execute (for apache2): com.apple.activate com.apple.destroot com.apple.install Error: Status 1 encountered during processing.
There should either be a variant to each port with a startupitem to not create it, or better, 'port' should not attempt to chown startupitems when it's not running as root and not installing as root.
Change History (13)
comment:1 Changed 18 years ago by plambert@…
comment:2 Changed 18 years ago by plambert@…
OK, I created a (very minor) patch to allow a startupitem type of "none."
No patch yet for documentation, etc. I'll try to get that done soon. Once it's done, I'll upload it here.
comment:3 Changed 18 years ago by imajes@…
Owner: | changed from darwinports-bugs@… to imajes@… |
---|---|
Status: | new → assigned |
accepting ticket. let me know when you patch it and i'll test&apply
comment:4 Changed 18 years ago by markd@…
Summary: | apache2 and other ports won't install as non-root users → RFE: apache2 and other ports won't install as non-root users |
---|
comment:5 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
FYI: A +no_startupitem variant was added to apache2 in r22490.
comment:6 Changed 17 years ago by nox@…
Component: | base → ports |
---|---|
Milestone: | → Port Enhancements |
Priority: | Expected → Normal |
Type: | defect → enhancement |
Version: | 1.3.2 |
comment:7 Changed 17 years ago by nox@…
Component: | ports → base |
---|---|
Milestone: | Port Enhancements → MacPorts base enhancements |
comment:8 follow-up: 9 Changed 16 years ago by www.macports.org@…
I have been having a similar problem installing dbus as a non root user since it also installs StartupItems. Editing DESTROOT/share/macports/Tcl/port1.0/portstartupitem.tcl and the dbus Portfile fixed it.
The changes are simple: In portstartupitem.tcl, replace all instances of "root" by "${install.user}" and all instances of "wheel" by "${install.group}". In the dbus portfile, same process. Note that there's a misspelling at some point : "error" is spelled "erorr".
This allows dbus to properly install the Startup Items in the /User/<my-user-name>/Library/StartupItems folders. They run perfectly when activated. Before that, I could only install dbus by selecting the no_root and no_startupitems variants.
However, it is possible that these changes cause a standard MacPorts installation (ie, as root) to break, since the installation user won't be root but most likely a simple administrator. I'll let the experts judge if that's a problem.
comment:9 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to www.macports.org@…:
Note that there's a misspelling at some point : "error" is spelled "erorr".
Fixed in r57326.
comment:10 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | jameskyle@… added |
---|
Has duplicate #20217.
comment:11 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from imajes@… to macports-tickets@… |
---|
James Cox (imajes) retires as MacPorts maintainer (see macports-mgr archives)
comment:12 Changed 14 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 2.0.0 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
comment:13 Changed 14 years ago by jmroot (Joshua Root)
Summary: | RFE: apache2 and other ports won't install as non-root users → RFE: apache2 and other ports won't install as non-root users because of startupitems |
---|
It looks like the right place to fix this is portstartupitem.tcl.
Ideally, I'd like to have "port install foo" still create the startup script (rcng, systemstarter, or launchd, doesn't matter) but put it in the ${prefix} tree with no special permissions.
But I'm going to try to come up with an interim patch now that just avoids creating startupitems altogether. Hopefully I can figure out how!