GSoC 2018 Project: Improve startupitem code

Joshua Root jmr at
Thu Feb 15 18:47:14 UTC 2018

On 2018-2-16 05:04 , Bradley Giesbrecht wrote:
> I don’t know that I have a great idea of how to improve startupitems functionality.
> I know that over time I have found a few issues. Take the clamav port for example. I needs two launchd plists, one for clamd which is daemon and another for freshclam which updates the antivirus database.
> How to handle two launchd plists with “port load” command? Separate ports?

This is <>.

> And freshclam is not a service and only needs to run once a day (StartInterval). Currently I have plists in the files directory copy them to distroot.
> I think the current system largely works but if there was a way to register launchd plists so “port load clam-server” would load one of more plists multiple locations that might be a nice way to make the “port load” command work in most all cases.

I've thought about that. It should be possible to allow not setting
startupitem.create but rather providing your own plist if you require a
level of customisation beyond what base allows. That way we don't have
to add Tcl options for every launchd key under the sun.

> The common locations where launchd plists need to be loaded from:
> ~/Library/LaunchAgents

Installing into ~ is problematic in general. I don't think it's really
needed; per-user stuff can live in /Library/LaunchAgents.

> /Library/LaunchAgents
> /Library/LaunchDaemons
> Josh, worth considering?

More information about the macports-dev mailing list