Initialising a dak database schema ================================== The following packages are needed: * postgresql-9.0 postgresql-client-9.0 postgresql-plperl-9.0 postgresql-plpython-9.0 postgresql-9.0-debversion (the schema assumes at least postgresql 9.0; ftpmaster in Debian currently uses the squeeze postgresql 9.0 backport) The following roles are assumed to exist: * dak: database superuser: needs to be an actual user * ftpmaster: role which should be given to archive administrators * ftpteam: people who can do NEW processing, overrides, removals, etc * ftptrainee: people who can add notes to packages in NEW For the purposes of this document, we'll be working in /srv/dak Set up the dak user on both the system and in postgres: # sudo adduser dak # sudo addgroup ftpmaster # sudo addgroup dak ftpmaster # sudo -u postgres createuser -s dak Set up the dak directory: # sudo mkdir /srv/dak # sudo chown dak:ftpmaster /srv/dak # sudo chmod 2775 /srv/dak Become the dak user: # sudo -u dak -s -H Create the additional roles: # createuser -S -R -D ftpmaster # createuser -S -R -D ftpteam # createuser -S -R -D ftptrainee Create an empty database with SQL_ASCII encoding: # createdb -T template0 -E SQL_ASCII -O dak projectb Import the schema: # psql -f current_schema.sql -d projectb Set up some core data in projectb to get started (read the init_vars file if you wish to customise various aspects): # ./init_core Create a minimal dak.conf # ./init_minimal_conf # cp dak-minimal.conf /etc/dak/dak.conf Set up a symlink somewhere # mkdir ~dak/bin # ln -s /path/to/dak.py ~dak/bin/dak Add some architectures you care about: # dak admin architecture add i386 "Intel x86 port" # dak admin architecture add amd64 "AMD64 port" Add a suite (origin=, label= and codename= are optional) # dak admin suite add-all-arches unstable x.y.z origin=MyDistro label=Master codename=sid