1. Plugins
==========

Each supported distribution needs to have its proper plugin. The plugin
itself consists of 3 parts:

* plugin file - A python file dropped in /usr/share/retrace-server/plugins
                containing:

  - distribution: String considered plugin name and identifier.

  - abrtparser:   Parser able to get release from ABRT's os_release file.

  - guessparser:  Parser able to guess release from package's name. Can not
                  be relied on (e.g. el6 does not give enough information).

  - repos:        An array of public repositories and their mirrors.
                  The synchronization is realized using rsync, so repository
                  path is either a directory in the filesystem or rsync:// URL.
                  Example:
                  repos = [
                            [ #repo1
                              /srv/repos/repo1_mirror1,
                              rsync://repo1/mirror2,
                            ],
                            [ #repo2
                              /srv/repos/repo2_mirror1,
                              /srv/repos/repo2_mirror2,
                            ],
                            [ #repo3
                              rsync://repo3/mirror1,
                            ],
                          ]

* local repos file - A .repo file dropped in /etc/yum.repos.d to access local
                     repositories created by retrace-server-reposync
                     (by default /var/cache/retrace-server/dist-ver-arch)

* GPG keys - Files containig GPG keys to verify downloaded package's signature.
             Dropped in /usr/share/retrace-server/gpg.

2. Repository synchronization
=============================

Since older versions of packages are deleted from public repositories (Fedora),
Retrace server needs to maintain local copies of repositories containing all
versions of all packages. This job is realized by retrace-server-reposync tool
by running 'retrace-server-reposync distribution version architecture' where
'distribution' is a plugin name (see 1. Plugins). The retrace-server-reposync
tool should be set up in root's crontab (it drops privileges ASAP) to run
2-3 times a day.

3. Garbage collection
=====================

There are 3 types of garbage:

* old tasks - Tasks older than DeleteTaskAfter config option.

* failed tasks - Tasks which made Retrace server crash. This most probably
                 signifies Retrace server application error. These are not
                 tasks finished by FINISHED_FAILURE.

* long running tasks - Task running for > 1 hour. Tasks who got stuck in
                       an endless loop, deadlocks etc. It may happen that
                       if the server is hard loaded, regular tasks do not
                       finish in time, but it is server admin's job to
                       limit task count by setting MaxParallelTasks config
                       option. No real user will wait 1 hour for the backtrace.

The retrace-server-cleanup tool handles all of these types. It should be set up
in root's crontab (it needs root privileges to clean up mock chroots) to run
every hour.

4. SELinux
==========

At the moment you need to disable SELinux to make Retrace server work properly.
We are working on the policy.
