This directory contains the script used to create the server-side
database used by the osc collab plugin, as well as the web API used by
the plugin.

All data created will be created in ./cache/ unless the cache-dir option
in a configuration file is set. You can choose the configuration file
via the -o command-line option, or via the OBS_OPTIONS environment
variable. The format of the file is the one described in
obs-db/data/defaults.conf.

There are runme scripts that should help people get started. Ideally,
those scripts would be run in cron jobs:

 ./obs-db/runme: a good period should be between every 10 minutes and
                 every 30 minutes (it has to be tweaked)

 ./obs-db/runme-attributes: a good period should be every 30 minutes

 ./upstream/runme: a good period should be every 30 minutes


Note: if the script seems to be hanging forever, then it's likely the
following python bug: http://bugs.python.org/issue5103
See the analysis at https://bugzilla.novell.com/show_bug.cgi?id=525295
The solution is to edit ssl.py, as mentioned in the above bugs.


#######################################################################


obs-db/
    Contains a script that will checks out the relevant data from the
    build service, and creates a database for osc collab. It was
    designed to not be too expensive in resources for the build service,
    by using hermes to know what has changed in the past.

    The default configuration file data/defaults.conf is a good
    introduction on how to use this script (what to check out, eg). An
    example configuration, data/opensuse.conf, is available: it is the
    one used to create the osc collab openSUSE database, which means it
    will check out a lot of projects.

    All the data will be put in a cache subdirectory, unless the
    cache-dir option is set in a configuration file.


    Here is a quick overview of the structure of the code:

        data/defaults.conf:
        Configuration file documenting the configuration format and the
        defaults value.

        data/opensuse.conf:
        Configuration file used to create the database for the osc
        collab openSUSE database. It can be used with the --opensuse
        option of obs-db, or with the -s option of runme.

        buildservice.py:
        Checks out data from the build service.

        config.py:
        Handles the configuration.

        database.py:
        Creates a database based on the checkout and the upstream data.

        hermes.py:
        Looks at hermes feeds to know what has changed.

        obs-db:
        Executable script that will call shell.py.

        obs-manual-checkout:
        Executable script to manually download a project or package,
        in the same way as obs-db does.

        obs-upstream-attributes:
        Executable script to update the openSUSE:UpstreamVersion and
        openSUSE:UpstreamTarballURL attributes in the build service with the
        upstream data we have.

        osc_copy.py:
        Some convenience functions copied from osc.

        runme:
        Small helper to launch the script.

        runme-attributes:
        Small helper to launch the obs-upstream-attributes script.

        shell.py:
        Shell part of the script.

        shellutils.py:
        Miscellaneous functions to create an application using those modules.

        TODO:
        List of things to do :-)

        upstream.py:
        Creates a database about upstream data.

        util.py:
        Miscellaneous functions that make life easier.


openSUSE-setup/
    Contains a near real-life example of how the server is setup for
    osc-collab.opensuse.org. See openSUSE-setup/README for more
    information.


upstream/
    download-upstream-versions:
        Download information about the latest versions of various
        modules that are not hosted on ftp.gnome.org.

    runme:
    Small helper to update the upstream data.

    upstream-limits.txt:
        Information about limits for upstream versions. We might not
        want to look for unstable versions of a module, eg.

    upstream-packages-match.txt:
        Data file that matches upstream GNOME module names to openSUSE
        source package names.

    upstream-tarballs.txt:
        Information about where to find the latest upstream tarballs.


web/
    Contains the web API that the osc collab plugin connects to. To
    deploy it, simply install the files on a web server, copy
    libdissector/config.py.in to libdissector/config.py and edit it for
    the configuration.

    Note that there is a .htaccess file in libdissector/. You will want
    to check it will not be ignored because of the apache configuration
    before deploying.
