1 Initialising a dak database schema
2 ==================================
4 The following packages are needed:
5 * postgresql-9.0 postgresql-client-9.0 postgresql-plperl-9.0 postgresql-plpython-9.0 postgresql-9.0-debversion
7 (the schema assumes at least postgresql 9.0; ftpmaster in Debian currently uses
8 the squeeze postgresql 9.0 backport)
10 The following roles are assumed to exist:
11 * dak: database superuser: needs to be an actual user
12 * ftpmaster: role which should be given to archive administrators
13 * ftpteam: people who can do NEW processing, overrides, removals, etc
14 * ftptrainee: people who can add notes to packages in NEW
16 For the purposes of this document, we'll be working in /srv/dak
18 Set up the dak user on both the system and in postgres:
20 # sudo addgroup ftpmaster
21 # sudo addgroup dak ftpmaster
22 # sudo -u postgres createuser -s dak
24 Set up the dak directory:
26 # sudo chown dak:ftpmaster /srv/dak
27 # sudo chmod 2775 /srv/dak
32 Create the additional roles:
33 # createuser -S -R -D ftpmaster
34 # createuser -S -R -D ftpteam
35 # createuser -S -R -D ftptrainee
37 Create an empty database with SQL_ASCII encoding:
38 # createdb -T template0 -E SQL_ASCII -O dak projectb
41 # psql -f current_schema.sql -d projectb
43 Set up some core data in projectb to get started (read the init_vars file if
44 you wish to customise various aspects):
47 Create a minimal dak.conf
49 # cp dak-minimal.conf /etc/dak/dak.conf
51 Set up a symlink somewhere
53 # ln -s /path/to/dak.py ~dak/bin/dak
55 Set up a private signing key
56 # gpg --no-default-keyring --secret-keyring /srv/dak/keyrings/s3kr1t/dot-gnupg/secring.gpg --keyring /srv/dak/keyrings/s3kr1t/dot-gnupg/pubring.gpg --gen-key
57 Remember the signing key id for when creating the suite below.
58 Here we'll pretend it is DDDDDDDD for convenience
60 Import some developer keys (here AAAAAAAA)
61 # gpg --no-default-keyring --keyring /srv/dak/keyrings/upload-keyring.gpg --recv-key AAAAAAAA
63 Add some architectures you care about:
64 # dak admin architecture add i386 "Intel x86 port"
65 # dak admin architecture add amd64 "AMD64 port"
67 Add a suite (origin=, label= and codename= are optional)
68 signingkey= will ensure that Release files are signed
69 # dak admin suite add-all-arches unstable x.y.z origin=MyDistro label=Master codename=sid signingkey=DDDDDDDD