Red Hat Bugzilla – Bug 480755
init.d script for git-daemon
Last modified: 2013-01-10 05:29:34 EST
Created attachment 329445 [details]
init script for git-deamon
I used the git-daemon epel5 rpm, however it was missing an init.d script,
which can be useful to run git-daemon as a service for various purposes,
especially if you don't like to use xinetd.
As I couldn't find in any other fedora/redhat based rpm such a script I
decided to write one on my own.
Please have a look at the attached 2 files. One is git-daemon.init which
is the actual init.d script. To configure the daemon the script uses the
file /etc/sysconfig/git-daemon, for which the example file in the default
(proposed) configuration is attached as git-daemon.sysconfig.
I have been pointed by Chris Wright to the discussion on: https://kerneltrap.org/mailarchive/git/2008/8/18/2974454/thread . However I was unable to fetch mentioned repository, hence unable to have a look a it. I'll notify the author of the mentioned thread about this bug report, so maybe he can provide his stuff as well.
I'm willing to merge his and mine work if I'm able to get a version.
Created attachment 329447 [details]
sysconfig file for the git-daemon
Sorry it's taken so long to reply. I'm not sure how best to move on with this. While I understand that not everyone will want to run git-daemon via xinetd, it may be unrealistic for us to properly support both an init script and xinetd.
I have wondered whether having a subpackage for init.d and xinetd would be workable, with a meta-package that pulled in whichever we thought was a better default. At the same time, that seems like it may be far more complicated than it would be worth.
At the least, _if_ we were to add an init.d script, we'd probably want to ensure that it followed the guidelines in http://fedoraproject.org/wiki/Packaging:SysVInitScript and http://fedoraproject.org/wiki/FCNewInit/Initscripts, unless we want to field more bugs asking for us to properly support LSB headers in the initscript and such. :)
As discussed via IRC, I think we agreed that the benefit is not worth the effort in this case. It _may_ be worthwhile to submit an initscript upstream for the contrib section, but it might be hard to make something that works on the wide variety of systems git can be installed on to be acceptable upstream.