10 minute setup guide
It is really less than 10 minutes work to set up a new repository, if you
already have the packages you want to share with the rest of the world
somewhere. Let's get started!
Serving the packages
For hosting a repository you will need an http or ftp server such as apache2 or
vsftpd. Setting up such services is beyond the scope of this document. If you
use Debian or Ubuntu and you haven't installed apache yet, simply install the
apache2 package. In that case
/var/www will be the rootdir of
your website. In the rest of this tutorial, I will assume you use
/var/www/falcon as root of your repository.
Signing packages
Falcon can cryptographically sign your repository. For this you need to have
gnupg installed and you need to have a signing key in your gpg keyring. If you
don't know how to create a key, read
this gpg example.
(The time needed to create a gpg key is not part of the 10 minutes :))
Terminology: pockets and components
You have to put packages in your repository according to a specific directory
structure. If we take a line from
/etc/apt/sources.list, you'll see
why:
deb http://archive.ubuntu.com/ubuntu feisty main restricted
In this line,
feisty is called the pocket and
main and
restricted are called components. Falcon will know which packages
belong to which pockets and components by looking at their location in your
repository. If we have a .deb file with the name
falcon_2-1.deb which
should be in the
extras component of the
feisty-seveas
pocket, we put it in
/var/www/falcon/pool/feisty-seveas/extras Now
please put all your packages in the locations where they should be and
we'll continue with the next step.
Configuring falcon
The only thing Falcon really needs to know is the root of your repository. You
can tell falcon its location via a commandline argument, but you can also point
a symlink in your homedir to it. We again assume
/var/www/falcon is the
root of the repository:
dennis@blackbird:~$ mkdir ~/.falcon
dennis@blackbird:~$ ln -s /var/www/falcon ~/.falcon/rootdir
For more configuration, falcon has an interactive configuration editor which
you can start with the command
falcon configure. For some of its
questions, the configuration editor will launch an external text editor. If you
don't like its choice of text editor, you can use the
-e parameter or
the
$EDITOR environment variable to specify an alternative.
General configuration
Please launch the configuration editor in a full-screen terminal window. Some
screens only fit in larger windows, which is a bug that will be fixed some day.
If you launch the interactive configuration editor, you will be greeted with the
following menu:

You can navigate the editor with the arrow keys, the enter key (to choose OK)
or the escape key (to cancel). Choose general configuration and falcon will
ask for basic information about your repository. None of the things it asks are
absolutely needed, but giving falcon this information will polish your
repository a bit more.

If you don't specify a GPG key, falcon will not be able to sign your repository.
If you do not specify a webroot, falcon will not create nice HTML indices. The
content listings it asks about will be used by
apt-file so people can
search for files in packages in your repository without installing them.
Pockets and Components
Go back to the main menu and select the next item. You will be greeted with
another menu, choose the pocket you wish to configure.

Each pocket should have a version number, Debian Etch for instace is version
4.0 and Ubuntu Gutsy is 7.10. This version number is used in the Release file.
You can also give each pocket and component a short description which will be
used on generated webpages.
Terminology: metacomponents
A feature unique to falcon is the possibility to create metacomponents. This
allows you to divide your repository in logical components (such as
'backports', 'custom', 'extra', 'daily') instead of the less flexible 'main'
and 'contrib' whilst still keeping your repository easy to use by creating
metacomponents. For instance, I always create a metacomponent called all,
that contains all components.

For each metacomponent you can specify which real components it should contain
and you can give them a short description.
Running falcon
When you've done the basic configuration above, your repository can be
created. This is a 2-step process.
- falcon scan will scan your pool and update the internal database
- falcon export will create all files needed by apt as well as the
HTML indices of your repository
The reason these are two separate commands is that it is also possible to
install packages in the repository without scanning. You will learn how
in the other parts of this documentation.
That's it!
There's your simple repository, all ready to be used! Don't forget that Falcon
can do advanced tricks for your repository as well, it'll make your life
easier!