Hi,

I've been running my own server for a while, but thought this was worth
writing up, to hopefully save someone else the time.

http://autometa.degabrielle.name/2011/12/using-mac-os-x-as-fossil-scm-server.html

---

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.

Pre-requistites:

   - fossil binary somewhere on your system (I used ~/bin/fossil )
   - a fossil repository (or repositories) in a folder (I used
   ~/fossil-repository )

The steps:

   1. put the *org.fossil-scm.service.plist* file(below) in
   /Library/LaunchDaemons
   2. change references to '/Users/spdegabrielle/'( ~/ ) to your own path
   3. open Terminal and type the following: sudo launchctl unload
   /Library/LaunchDaemons/org.fossil-scm.service.plist
   4. 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<http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html>
.

org.fossil-scm.service.plist



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 /Users/spdegabrielle/bin/fossil http --localauth
   --notfound projects /Users/spdegabrielle/fossil-repository 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 the
   launched program



-- 

--
Stephen De Gabrielle

Attachment: org.fossil-scm.service.plist
Description: Binary data

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to