[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: problem creating Mac OS X launchd plist for svnserve

From: Quinn Taylor <quinntaylor_at_mac.com>
Date: Mon, 21 Jul 2008 09:37:00 -0600

> I've created the following plist, installed it as
> com.subversion.svnserve.plist in /Library/LaunchDaemons as user
> root:wheel
>
> ...
>
> But when I try to install it using launchctl I get the following:
>
> bash-3.2# launchctl load /Library/LaunchDaemons/
> com.subversion.svnserve.plist
> launchctl: propertyList is NULL
> launchctl: no plist was returned for: /Library/LaunchDaemons/
> com.subversion.svnserve.plist
> launchctl: no plist was returned for: /Library/LaunchDaemons/
> com.subversion.svnserve.plist
> nothing found to load
> bash-3.2#
>
> Can anyone spot what I'm doing wrong?
>
> Thanks,
> Jim

Jim —

I fought with launchd and Subversion last summer while interning at
Apple, so I had the resources to fix it a little closer at hand.... ;-)

IIRC, the Program and ProgramArgument keys are mutually exclusive—if
you use the latter, the first array element must be the executable name.

Also, in the name of correct style, I would suggest naming the plist
file org.tigris.subversion.svnserve.plist instead, using proper
reverse-DNS naming.

Here is my launchd file, also installed in /Library/LaunchDaemons/,
belongs to root:wheel, and is loaded using `launchctl load
org.tigris.subversion.svnserve.plist`.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>org.tigris.subversion.svnserve</string>
        <key>ServiceDescription</key>
        <string>Publish SVN repositories using svn:// schema.</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/bin/svnserve</string>
                <string>--inetd</string>
                <string>--root=/svn</string>
        </array>
        <key>GroupName</key>
        <string>admin</string>
        <key>UserName</key>
        <string>quinn</string>
        <key>OnDemand</key>
        <true/>
        <key>Disabled</key>
        <false/>
        <key>inetdCompatibility</key>
        <dict>
                <key>Wait</key>
                <false/>
        </dict>
        <key>Sockets</key>
        <dict>
                <key>Listeners</key>
                <dict>
                        <key>Bonjour</key>
                        <true/>
                        <key>SockServiceName</key>
                        <string>svn</string>
                </dict>
        </dict>
</dict>
</plist>

Note the section under the Sockets key, which I think was necessary to
get it to work correctly. Also, I used the OnDemand key so launchctl
only runs svnserve when someone actually performs a Subversion action.
(This is one really nice thing about launchd, in that you can save CPU
cycles and memory that an unused executable might otherwise consume.)
You'll find you don't even need a subversion user—my user is a machine
administrator, and it works just fine.

HTH,
  - Quinn Taylor

  • application/pkcs7-signature attachment: smime.p7s
Received on 2008-07-21 17:37:23 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.