## Clone the DragonFly source
After creating a git-user to run the git mirror (I use 'gitlog', which came with the git-package under Debian), login as this user, and perform a checkout. To find a suitable git-server to clone from ( <tt>$MASTER_GIT_SERVER</tt> ), look at [[the list of mirrors|/mirrors]]. This system should be a system user, and does not need to have a homedirectory or valid shell.
+**NOTE:** You must use a version of git that supports <tt>clone --mirror</tt>.
+
<pre>
# REPODIR=/srv/git
-# cd $REPODIR && git clone --bare $MASTER_GIT_SERVER
+# cd $REPODIR && git clone --mirror $MASTER_GIT_SERVER
</pre>
Make sure this is done using the git-user.
Run every 20 minutes:
<pre>
-0,20,40 * * * * repodir=/srv/git srv/git/update-repo.git/update-git.sh
+0,20,40 * * * * repodir=/srv/git /srv/git/update-repo.git/update-git.sh
</pre>
Make sure you forward the mails from the git-user, to detect potential problems. This is usually done in <tt>/etc/aliases</tt>.
exec setuidgid gitlog git-daemon --export-all --verbose --base-path=/srv/git /srv/git
</pre>
-## Notes for Linux/Debian users
+## Notes for Linux users
-The update-repo script uses lockf(1), if this tool is not available to you, but you have lockfile(1), you can pull my workaround for lockfile(1). I say workaround, because it is not elegant - but it's the best I could think of at the time. To get this script, pull branch <tt>debian/linux</tt> from <tt>git://blazefire.danielbond.org/update-repo.git</tt>.
+The update-repo script uses lockf(1), I've created a version that supports Linux too (uses flock(1)): <tt>git://koan.bondconsult.net/update-repo.git</tt>.
### Crontab example
<pre>
-0,20,40 * * * * repodir=/srv/git locktype=lockfile /srv/git/update-repo.git/update-git.sh
+0,20,40 * * * * repodir=/srv/git locktype=flock /srv/git/update-repo.git/update-git.sh
</pre>