distro_tracker.project

Package containing the main project settings.

distro_tracker.settings

Distro Tracker settings

The settings are created dynamically by first importing defaults values from distro_tracker.project.settings.defaults and then values from distro_tracker.project.settings.local (or from distro_tracker.project.settings.selected if the latter has not been created by the administrator). The test suite is special cased and doesn’t use any of those, instead it uses distro_tracker.project.settings.test.

distro_tracker.settings.defaults

Default Django settings for the Distro Tracker project.

Most settings are documented in this file and they are initialized to some reasonable default values when possible. They will be extended (and possibly overridden) by settings from the other modules in this package depending on the setup selected by the administrator. You likely won’t have to modify that file.

You should instead create local.py to put your site-specific settings (use local.py.sample as template).

Here are the most important settings:

DISTRO_TRACKER_FQDN

The fully qualified domain name of the distro-tracker installation. It should be a service-specific DNS entry like “tracker.example.com”. Defaults to the FQDN of the machine which might not be adequate.

DISTRO_TRACKER_DATA_PATH

The directory where distro-tracker will hold its data. The directory is further sub-divided in multiple directories for specific use cases (e.g. cache, keyring, static, media, logs, templates, etc.). Defaults to the “data” sub-directory in the distro-tracker base directory (where the code lives).

DISTRO_TRACKER_DEBCI_URL

The URL where debc lives. Example: “https://ci.debian.net”, “http://autopkgtest.kali.org” Defaults to “https://ci.debian.net”.

MEDIA_URL

URL that handles the media served from MEDIA_ROOT. Make sure to use a trailing slash. Examples: “http://example.com/media/”, “http://media.example.com/” Defaults to “/media/”.

STATIC_URL

URL prefix for static files. Example: “http://example.com/static/”, “http://static.example.com/” Defaults to “/static/”

Some settings have default values which are computed dynamically from other settings. Those settings can also be overridden. Here’s the list of those settings.

DISTRO_TRACKER_VENDOR_NAME

The name of the vendor. Equivalent to the Vendor field of an /etc/dpkg/origins file. Default value computed from the domain name of DISTRO_TRACKER_FQDN.

DISTRO_TRACKER_VENDOR_URL

The URL of the vendor. Equivalent to the Vendor-URL field of an /etc/dpkg/origins file. Default value computed as “www.” + the domain name of DISTRO_TRACKER_FQDN.

STATIC_ROOT

Absolute path to the directory static files should be collected to. Don’t put anything in this directory yourself; store your static files in apps’ “static/” subdirectories and in STATICFILES_DIRS. Defaults to the “static” sub-directory of DISTRO_TRACKER_DATA_PATH.

MEDIA_ROOT

Absolute filesystem path to the directory that will hold user-uploaded files. Defaults to the “media” sub-directory of DISTRO_TRACKER_DATA_PATH.

DISTRO_TRACKER_CACHE_DIRECTORY

This directory is used to store the locally cached resources. Any Distro Tracker app should be able to use this directory to store its caches. For example, it is used to store the APT cache of repository information and the cache of retrieved Web resources. Defaults to the “cache” sub-directory of DISTRO_TRACKER_DATA_PATH.

DISTRO_TRACKER_KEYRING_DIRECTORY

This directory should contain a gpg.conf listing the GPG keyrings of known public keys. It’s used to identify authors of package uploads. Defaults to the “keyring” sub-directory of py:data:DISTRO_TRACKER_DATA_PATH.

DISTRO_TRACKER_LOG_DIRECTORY

This directory will hold log files generated by distro-tracker. Defaults to the “logs” sub-directory of py:data:DISTRO_TRACKER_DATA_PATH.

DISTRO_TRACKER_MAILDIR_DIRECTORY

This directory is used as a mailbox in the Maildir format. All incoming mails are stored here. Defaults to the “maildir” sub-directory of py:data:DISTRO_TRACKER_DATA_PATH.

DISTRO_TRACKER_TEMPLATE_DIRECTORY

This directory can hold custom templates that will override the templates supplied by distro-tracker. Defaults to the “templates” sub-directory of py:data:DISTRO_TRACKER_DATA_PATH.

DISTRO_TRACKER_CONTROL_EMAIL

The email address which is to receive control emails. It does not necessarily have to be in the same domain as specified in DISTRO_TRACKER_FQDN. Defaults to “control@” + DISTRO_TRACKER_FQDN.

DISTRO_TRACKER_CONTACT_EMAIL

The email address which is to receive contact emails. It does not necessarily have to be in the same domain as specified in DISTRO_TRACKER_FQDN. Defaults to “owner@” + DISTRO_TRACKER_FQDN.

DISTRO_TRACKER_BOUNCES_EMAIL

The email address which is to be used as the sender address when no bounce processing should happen. It does not necessarily have to be in the same domain as specified in DISTRO_TRACKER_FQDN. Defaults to “bounces@” + DISTRO_TRACKER_FQDN.

DISTRO_TRACKER_BOUNCES_LIKELY_SPAM_EMAIL

The email address which should receive bounces that are likely the result of incoming spam.

More settings:

distro_tracker.project.settings.defaults.DISTRO_TRACKER_TRUSTED_GPG_MAIN_FILE = '/etc/apt/trusted.gpg'

This file is the trusted.gpg main file to hand out to APT

distro_tracker.project.settings.defaults.DISTRO_TRACKER_TRUSTED_GPG_PARTS_DIR = '/etc/apt/trusted.gpg.d/'

This directory is trusted.gpg.d directory to hand out to APT

distro_tracker.project.settings.defaults.DISTRO_TRACKER_MAX_DAYS_TOLERATE_BOUNCE = 4

The number of days to tolerate bounced messages for subscribers.

distro_tracker.project.settings.defaults.DISTRO_TRACKER_MAX_ALLOWED_ERRORS_CONTROL_COMMANDS = 5

The number of errors after which the processing of a command email stops.

distro_tracker.project.settings.defaults.DISTRO_TRACKER_CONFIRMATION_EXPIRATION_DAYS = 3

The number of days a command confirmation key should be valid.

distro_tracker.project.settings.defaults.DISTRO_TRACKER_NEWS_PANEL_LIMIT = 30

The maximum number of news to include in the news panel of a package page

distro_tracker.project.settings.defaults.DISTRO_TRACKER_RSS_ITEM_LIMIT = 30

The maximum number of RSS news items to include in the news feed

distro_tracker.project.settings.defaults.DISTRO_TRACKER_EMAIL_NEWS_HEADERS = ('Date',)

A list of extra headers to include when rendering an email news item. See: distro_tracker.core.models.EmailNewsRenderer

distro_tracker.project.settings.defaults.DISTRO_TRACKER_APT_CACHE_MAX_SIZE = 5368709120

The maximum size that the distro_tracker.core.utils.packages.AptCache should consume for all of its cached source files, given in bytes.

distro_tracker.project.settings.defaults.DISTRO_TRACKER_CA_BUNDLE = None

The path to the CA bundle used to verify TLS connections. Defaults to the system-wide CA bundle.

distro_tracker.project.settings.defaults.DISTRO_TRACKER_ACCEPT_UNQUALIFIED_EMAILS = False

Whether we accept foo@domain.com as valid emails to dispatch to the foo package

distro_tracker.project.settings.defaults.DJANGO_EMAIL_ACCOUNTS_USE_CAPTCHA = False

Whether we include a captcha check on the new user registration form

distro_tracker.project.settings.defaults.compute_default_settings(target)[source]

Dynamically generate some default settings.

There are many settings whose default value depends on another setting. They are defined in the _COMPUTE_DEFAULT_SETTINGS dict with a function that evaluates them.

distro_tracker.project.settings.defaults.GET_INSTANCE_NAME()[source]

Return the name of the Package Tracker instance.

distro_tracker.settings.local

distro_tracker.settings.production

This file has appropriate settings for running in production.

When running in production, selected.py should point to this file.

distro_tracker.settings.development

Appropriate settings to run during development.

When running in development mode, selected.py should point to this file.

distro_tracker.settings.test

Appropriate settings to run the test suite.