Getting the Fossil SCM setup as a server on Mac OS X.
This works on 10.7, but should work back to 10.4 AFAIK.
- fossil binary somewhere on your system (I used ~/bin/fossil )
- a fossil repository (or repositories) in a folder (I used ~/fossil-repository )
- put the org.fossil-scm.service.plist file(below) in /Library/LaunchDaemons
- change references to '/Users/spdegabrielle/'( ~/ ) to your own path
- open Terminal and type the following: sudo launchctl unload /Library/LaunchDaemons/org.fossil-scm.service.plist
- open your browser to http://localhost:8081/reponame (I used 'projects' the name of my main repository as the default repository)
For more info, check Creating Launch Daemons and Agents.
Some explanation as to what is going on:
- /Library/LaunchDaemons/ is where the .plist files defining 'User Daemons' that are launched as system startup are kept. Some other useful locations: ~/Library/LaunchAgents for each user, and /Library/LaunchAgents for all users.
- KeepAlive Don't restart the service; this way of using fossil works by starting it in response to a request on port 8081.
- Label org.fossil-scm.service names the service, so is can be started sudo launchctl load and stopped using sudo launchctl load
- ProgramArguments is the launchd way of saying fossil http --localauth --notfound projects /Users/spdegabrielle/fossil-repository
The meanings of the arguments are as follows:
- fossil http action the request coming from port 8081(in this case), provide the response and quit. (see fossil help http)
- --localauth auto-sign-in if you are accessing fossil from your server directly with http://127.0.0.1:8081/ or http://localhost:8081/ (see fossil help http)
- --notfound projects sets the default repository when specifying the repository location as a folder (next) rather than as a specific
- /Users/spdegabrielle/fossil-repository is the respository location (--notfound projects sets the default)
- RunAtLoad - Don't run it on load - it will be run on demand
- inetdCompatibility causes launchd will behave like inetd for fossil (or any other server)
These instructions should be easily adapted to other servers. (e.g. your own private dropbox type service with rsync)