Creating An Archive
In the CVS and Subversion models if you want to work on a project, you need to beg for commit access to the repository. This isn't the case with Arch, instead you can create a branch you can work on in your own archive.
Obviously for this you'll need your own archive. What we'll set up here is a private writeable copy of your archive on your machine and a public read-only mirror on a server with more bandwidth for everybody else.
Making the Archive
Firstly you'll need to pick a name for your archive and a location on your disk to put it. The naming convention is <email-address>--<year> and the location can be wherever you see fit.
$ mkdir ~/arch $ tla make-archive --signed jbloggs@debian.org--2005 ~/arch/jbloggs@debian.org--2005
We've created a ~/arch directory to store all of our archives, and in that created a jbloggs@debian.org--2005 archive in a directory of the same name. The --signed parameter tells Arch that all changes in this archive must be signed.
We can check this worked using the tla archives command.
$ tla archives
jbloggs@debian.org--2005
/home/jbloggs/arch/jbloggs@debian.org--2005
If you use this naming convention then at start of each new year you should perform the tasks outlined in the ArchRepository/NewYear page to create a new archive. An alternative is to omit the --<year> part and have a single archive for all eternity.
Mirroring your Archive
This is the archive you can read and write to, but as it's in the home directory on your personal machine nobody else can reach it. Arch allows easy mirroring of archives to places with more bandwidth, we'll set up an HTTP-accessible mirror of your archive on people.debian.org, though you can put it somewhere different if you prefer.
Note that you do these commands on your machine.
$ ssh people.debian.org mkdir -p public_html/arch
$ tla make-archive --signed --listing \
--mirror jbloggs@debian.org--2005 \
sftp://people.debian.org/home/jbloggs/public_html/arch/jbloggs@debian.org--2005
First we created a public_html/arch directory on the remote machine to store all our archive mirrors, and next we made the mirror itself. The --listing parameter tells Arch to generate .listing files in each directory to avoid the problems with HTTP Indexes, the --signed parameter tells Arch the the changes in the mirror should also be signed.
The --mirror jbloggs@debian.org--2005 bit is what creates the new archive as a mirror of an existing one, rather than an ordinary archive. The final parameter is again the location to place the archive, except that this time we use an SFTP URL to transport the data across SSH.
We can check this worked again.
$ tla archives
jbloggs@debian.org--2005
/home/jbloggs/arch/jbloggs@debian.org--2005
jbloggs@debian.org--2005-MIRROR
sftp://people.debian.org/home/jbloggs/public_html/arch/jbloggs@debian.org--2005-MIRROR
Note that the mirror is also a registered archive, with a name that Arch invented for you. When you wish to tell others how to access your archive, you simply give them the HTTP address of the mirror http://people.debian.org/~jbloggs/arch/jbloggs@debian.org--2005/.
Other Configuration
A couple of final pieces of configuration remain. Firstly now that you have multiple archives registered, you should tell Arch which of them is your default. This allows you to avoid typing jbloggs@debian.org--2005 all the time.
$ tla my-default-archive jbloggs@debian.org--2005
And secondly when the changes are copied to the mirror it will ask you to resign them. Instead we can instruct Arch to simply copy the signatures from your own copy, the files they refer to will be identical.
$ echo "jbloggs@debian.org--2005" \
> ~/.arch-params/signing/jbloggs@debian.org--2005-MIRROR
To synchronise the mirror with your personal copy of the archive you need to run the following command on your machine.
$ tla archive-mirror
This adds any new branches or changes to the mirror. If you like, you can put this in 'cron' or, if you learn about them in the Arch documentation, a commit hook script.