Package: gitweb
Version: 1.4.1.1-1
I just finished setting up git.parisc-linux.org and installation could
have been easier. I offer you some suggestions:
First, an init script is good to have to start the git daemon running
automatically. Here's the one I'm using; I'm sure it can be improved.
diff -urpN git-core-1.4.1.1/debian/init.d git-core-willy/debian/init.d
--- git-core-1.4.1.1/debian/init.d 1969-12-31 19:00:00.000000000 -0500
+++ git-core-willy/debian/init.d 2006-08-15 13:28:05.000000000 -0400
@@ -0,0 +1,32 @@
+#! /bin/sh
+set -e
+
+GITD=/usr/bin/git-daemon
+GITD_OPTS='--syslog --base-path=/var/cache'
+GITD_DIR="/var/cache/git"
+
+test -x $GITD || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting git daemon: git-daemon"
+ start-stop-daemon --start --quiet --background \
+ --pidfile /var/run/gitd.pid --make-pidfile \
+ --exec $GITD -- $GITD_OPTS $GITD_DIR
+ echo "."
+ ;;
+
+ stop)
+ echo -n "Stopping git daemon: git-daemon"
+ start-stop-daemon --stop --quiet --oknodo \
+ --pidfile /var/run/gitd.pid
+ rm -f /var/run/gitd.pid
+ echo "."
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/gitd {start|stop}"
+ exit 1
+esac
+
+exit 0
Then there's some more things which could go in README.Debian:
When setting up a git.example.org server, there are several things to
configure to make everything work nicely together.
1. Run a git-daemon. This allows people to use a git:// URL to access
your repos.
2. Install rsync. This allows people to use rsync:// URLs to access your
repositories. You then need to add a stanza to /etc/rsyncd.conf that looks
like this:
[git]
path = /var/cache/git
readonly = yes
Now git-clone rsync://git.example.org/git/repo will work.
3. Configure an apache virtual server (XXX: other webservers with virtual
hosting abilities?). Add a stanza to your apache configuration that
looks like this:
<VirtualHost *:80>
ServerName git.example.org
ServerAdmin [EMAIL PROTECTED]
HeaderName HEADER
# bogus but safe DocumentRoot
DocumentRoot /var/cache/git
ErrorLog /var/log/apache-ssl/git.example.org-error.log
CustomLog /var/log/apache-ssl/git.example.org-access.log combined
Alias /robots.txt /var/www/cvs.robots.txt
Alias /gitweb.css /usr/share/doc/gitweb/gitweb.css
Alias /git /var/git
ScriptAlias / /usr/lib/cgi-bin/gitweb.cgi
RedirectMatch permanent "^/~(.*)$" "http://example.org/~$1"
</VirtualHost>
Now git.example.org will display a list of repositories, and people can
git-clone http://git.example.org/git/repo.
I think that was about all of the things I had a problem with. Hope this
is helpful.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]