2

Note: I originally asked this question on Server Fault (https://serverfault.com/questions/148052/automatically-starting-svnserve-on-snow-leopard), but I thought this may be a more appropriate place to ask.

I have installed Subversion onto my iMac running Snow Leopard, but am having trouble getting svnserve to start up automatically. As I understand it (I'm still fairly green with OSX), the best way to do that is to utilize launchd. To that end, I have created the following .plist file in the /Library/LaunchDaemons folder. If I use launchctl to execute this file, svnserve starts as expected, but it doesn't automatically start when the system starts up or I log in.

<?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>Disabled</key>
<false/>
<key>Label</key>
<string>org.tigris.subversion.svnserve</string>
<key>UserName</key>
<string>Dave</string>
<key>ProgramArguments</key>
<array>
    <string>/opt/subversion/bin/svnserve</string>
    <string>--inetd</string>
    <string>--root=/Users/Shared/SVNrep</string>
</array>
<key>ServiceDescription</key>
<string>Subversion Standalone Server</string>
<key>Sockets</key>
<dict>
    <key>Listeners</key>
    <array>
        <dict>
            <key>SockFamily</key>
            <string>IPv4</string>
            <key>SockServiceName</key>
            <string>svn</string>
            <key>SockType</key>
            <string>stream</string>
        </dict>
        <dict>
            <key>SockFamily</key>
            <string>IPv6</string>
            <key>SockServiceName</key>
            <string>svn</string>
            <key>SockType</key>
            <string>stream</string>
        </dict>
    </array>
</dict>
<key>inetdCompatibility</key>
<dict>
    <key>Wait</key>
    <false/>
</dict>
</dict>
</plist>

I have tried many different configs in the .plist, including auto-starting, simplifying the listeners section, removing dependence on inetd, but they all show the same symptom. The files work when started using launchctl load, but do not automatically start up svnserve if the iMac is rebooted.

If anyone here could provide any suggestions as to how to get this to work, I'd really appreciate it.

1

Here’s my plist: (located in /Library/LaunchDaemons)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/bin/svnserve</string>
                <string>--daemon</string>
                <string>--root</string>
                <string>/opt/srv/myreponame</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>Disabled</key>
        <false/>
        <key>StandardErrorPath</key>
        <string>/dev/null</string>
        <key>UserName</key>
        <string>root</string>
</dict>
</plist>

And here’s ls output (and permissions):

-rw-r--r--@ 1 root  wheel  604 Apr 23  2009 org.tigris.Subversion.plist

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.