The darcs-patcher
E-mail-based server allows you to (easily?) set up
a centralized darcs repository to which multiple users can commit patches
without giving those users accounts on the server machine.
darcs-patcher
authentication is performed using gnupg signatures.
Users use darcs push --sign
to email a signed patch to the
repository. darcs-patcher
verifies that the patch is signed by an
authorized user. It then runs the darcs_test
, if available, to make
sure the patch doesn't break anything (in which case it would reject it),
and applies the patch to the repo.
To use darcs-patcher
, you first need to creat a user for its use
(one user per repository, I'm afraid). In this user's home directory,
create a repository named ``repo''. You have to be a bit careful when
creating this repo since if you just run a darcs get on a local repository
owned by a different user, darcs will use hard links for the patch files,
which may not work since you won't have the right to change them later.
This is a bug in darcs get (FIXME).
You next need to set up a gnupg keyring named allowed_keys
in the
.gnupg/
directory containing the gnupg public keys of all users
authorized to commit to the repository. Finally, you create a
.forward
file containing the single line
``|/usr/sbin/darcs-patcher
'' (adjusted for where you actually
install darcs-patcher
), which tells your mailer to pipe any mail
that user receives through darcs-patcher
. Note also that darcs
itself must reside in the system path.
A convenient utility called darcs-createrepo
is provided to easily
set up darcs-patcher
-based repositories. This utility creates a new
user and sets that user up to recieve and validate patches via email.
Because darcs-createrepo
must create a new user, it needs to be run
as root. It will prompt you for all the information it needs.
darcs-createrepo
creates a repo with no users having write
privileges. Moreover, the allowed_keys
file is created as
root-owned, so only root will be able to add allowed users. You probably
will want to chown
this file to some administrative user. In any
case, you'll need to add a few users' gpg keys to this file via gpg's
--import
or --recv-keys
commands.