diff options
author | Florian Weimer <fw@deneb.enyo.de> | 2008-06-17 19:52:51 +0000 |
---|---|---|
committer | Florian Weimer <fw@deneb.enyo.de> | 2008-06-17 19:52:51 +0000 |
commit | 4e28d0988b44fcb8443ac324851d7ddd87462df8 (patch) | |
tree | 889037eeab9a96aac15774fe5d487e1e0c85e5fb /lib | |
parent | 57ed7a5cc8600ca4fad01de88aa8cf8f028b95f5 (diff) |
lib/python/dist_config.py: New file
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@9091 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib')
-rw-r--r-- | lib/python/dist_config.py | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/lib/python/dist_config.py b/lib/python/dist_config.py new file mode 100644 index 0000000000..ebb166755e --- /dev/null +++ b/lib/python/dist_config.py @@ -0,0 +1,75 @@ +# dist_config.py -- describe how the Debian package database is assembled +# Copyright (C) 2008 Florian Weimer <fw@deneb.enyo.de> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +""" +This Python moule describes how different views of the Debian package +database are assembled from a set of on-disk files. + +Each view is labeled by a purpose. Currently defined purposes are: + + overview: Used to generate the release overview web page. This + should not contain vulnerabilities which the security team + considers processed. + + debsecan: Used to generate the "fix is available" data for debsecan. + This should reflect the recommended set of sources.list + entries for the release. +""" + +###################################################################### +# Configuration section +###################################################################### + +def apply_config(): + # Invoked at the end of the file. Edit this to suit your needs. + + etch_archs = 'alpha,amd64,arm,hppa,i386,ia64,mips,mipsel,powerpc,s390,sparc'.split(',') + lenny_archs = etch_archs + ['armel',] + + add_release(name='etch', + architectures=etch_archs, + ) + + add_release(name='lenny', + architectures=lenny_archs, + ) + + add_release(name='sid', + architectures=lenny_archs, + ) + +###################################################################### +# Support routines +###################################################################### + +releases = {} + +def add_release(name, architectures, + debsecan_part=('', 'security'), + overview_part=('', 'security', 'proposed-updates')): + import debian_support + name = debian_support.internRelease(name) + if releases.has_key(name): + raise ValueError("duplicate release", name) + releases[name] = {'architectures' : architectures, + 'purpose' : {'debsecan' : debsecan_part, + 'overview' : overview_part}} + +# Run the code in the configuration section + +apply_config() +del apply_config |