]> git.decadent.org.uk Git - dak.git/blobdiff - setup/README
Merge remote-tracking branch 'jcristau/fix-orig-sig-check'
[dak.git] / setup / README
index 4c8a9ebfded3eeb32613294196d50a1a862bb649..d53fb229a945a48a39a3819340c402aea889e5ff 100644 (file)
@@ -1,11 +1,15 @@
 Initialising a dak database schema
 ==================================
 
 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 following packages are needed for the database:
+ * postgresql-9.4 postgresql-client-9.4 postgresql-9.4-debversion
+and the following packages for dak itself:
+ * python-psycopg2 python-sqlalchemy python-apt gnupg dpkg-dev lintian
+   binutils-multiarch python-yaml less python-ldap python-pyrss2gen python-rrdtool
+   symlinks python-debian python-debianbts
 
 
-(the schema assumes at least postgresql 9.0; ftpmaster in Debian currently uses
-the squeeze postgresql 9.0 backport)
+(the schema assumes at least postgresql 9.1; ftpmaster in Debian currently uses
+the postgresql 9.4 version from Debian 8)
 
 The following roles are assumed to exist:
  * dak: database superuser: needs to be an actual user
 
 The following roles are assumed to exist:
  * dak: database superuser: needs to be an actual user
@@ -15,11 +19,21 @@ The following roles are assumed to exist:
 
 For the purposes of this document, we'll be working in /srv/dak
 
 
 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
+Set up the dak user:
 # sudo addgroup ftpmaster
 # sudo addgroup ftpmaster
-# sudo addgroup dak ftpmaster
-# sudo -u postgres createuser -s dak
+# sudo adduser dak --disabled-login --ingroup ftpmaster --shell /bin/bash
+
+Create postgres roles and database:
+# sudo -u postgres psql
+  CREATE USER dak CREATEROLE;
+  CREATE ROLE ftpmaster WITH ROLE dak;
+  CREATE ROLE ftpteam WITH ROLE ftpmaster;
+  CREATE ROLE ftptrainee WITH ROLE ftpmaster, ftpteam;
+
+  CREATE DATABASE projectb WITH OWNER dak TEMPLATE template0 ENCODING 'SQL_ASCII';
+  \c projectb
+  CREATE EXTENSION IF NOT EXISTS plpgsql;
+  CREATE EXTENSION IF NOT EXISTS debversion;
 
 Set up the dak directory:
 # sudo mkdir /etc/dak
 
 Set up the dak directory:
 # sudo mkdir /etc/dak
@@ -34,16 +48,9 @@ Create a symlink to /srv/dak/dak.conf in /etc/dak
 Become the dak user:
 # sudo -u dak -s -H
 
 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
+Import the schema.  We redirect STDOUT to /dev/null as otherwise it's
+impossible to see if something fails.
+# psql -1 -f current_schema.sql -d projectb >/dev/null
 
 Set up some core data in projectb to get started (read the init_vars file if
 you wish to customise various aspects):
 
 Set up some core data in projectb to get started (read the init_vars file if
 you wish to customise various aspects):
@@ -68,7 +75,9 @@ WARNING: Please check these templates over and customise as necessary
 # cp templates/* /srv/dak/templates/
 
 Set up a private signing key: don't set a passphrase as dak will not
 # cp templates/* /srv/dak/templates/
 
 Set up a private signing key: don't set a passphrase as dak will not
-pass one through to gpg.  Guard this key carefully
+pass one through to gpg.  Guard this key carefully!
+The key only needs to be able to sign, it doesn't need to be able
+to encrypt.
 # 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
 Remember the signing key id for when creating the suite below.
 Here we'll pretend it is DDDDDDDD for convenience
 # 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
 Remember the signing key id for when creating the suite below.
 Here we'll pretend it is DDDDDDDD for convenience
@@ -91,6 +100,9 @@ Add a suite (origin=, label= and codename= are optional)
 signingkey= will ensure that Release files are signed
 # dak admin suite add-all-arches unstable x.y.z origin=MyDistro label=Master codename=sid signingkey=DDDDDDDD
 
 signingkey= will ensure that Release files are signed
 # dak admin suite add-all-arches unstable x.y.z origin=MyDistro label=Master codename=sid signingkey=DDDDDDDD
 
+Add the components to the suite
+# dak admin s-c add unstable main contrib non-free
+
 Re-run dak init-dirs to add new suite directories to /srv/dak
 # dak init-dirs
 
 Re-run dak init-dirs to add new suite directories to /srv/dak
 # dak init-dirs
 
@@ -103,41 +115,27 @@ for AMD64 and copied it into /srv/dak/queue/unchecked.
 
 We start by performing initial package checks which will
 result in the package being moved to NEW
 
 We start by performing initial package checks which will
 result in the package being moved to NEW
-# cd /srv/dak/queue/unchecked
-# dak process-upload *.changes
+# dak process-upload -d /srv/dak/queue/unchecked
 
 -----------------------------------------------------------------------
 hello_2.6-1_amd64.changes
 
 -----------------------------------------------------------------------
 hello_2.6-1_amd64.changes
-NEW for unstable
 
 
-
-(new) hello_2.6-1.debian.tar.gz optional devel
-(new) hello_2.6-1.dsc optional devel
-(new) hello_2.6-1_amd64.deb optional devel
-The classic greeting, and a good example
- The GNU hello program produces a familiar, friendly greeting.  It
- allows non-programmers to use a classic computer science tool which
- would otherwise be unavailable to them.
- .
- Seriously, though: this is an example of how to do a Debian package.
- It is the Debian version of the GNU Project's `hello world' program
- (which is itself an example for the GNU Project).
-(new) hello_2.6.orig.tar.gz optional devel
-Changes: hello (2.6-1) unstable; urgency=low
+hello (2.6-1) unstable; urgency=low
  .
  .
-  * New upstream release.
-  * Drop unused INSTALL_PROGRAM stuff.
-  * Switch to 3.0 (quilt) source format.
-  * Standards-Version: 3.9.1 (no special changes for this).
-
+   * New upstream release.
+   * Drop unused INSTALL_PROGRAM stuff.
+   * Switch to 3.0 (quilt) source format.
+   * Standards-Version: 3.9.1 (no special changes for this).
 
 
-Override entries for your package:
+source:hello
+binary:hello
 
 
-Announcing to debian-devel-changes@lists.debian.org
+binary:hello is NEW.
+source:hello is NEW.
 
 
-[N]ew, Skip, Quit ?N
-Moving to NEW queue.
-Sending new ack.
+[N]ew, Skip, Quit ? N
+ACCEPT-TO-NEW
+Installed 1 package set, 646 KB.
 -----------------------------------------------------------------------
 
 We can now look at the NEW queue-report
 -----------------------------------------------------------------------
 
 We can now look at the NEW queue-report
@@ -146,53 +144,36 @@ We can now look at the NEW queue-report
 NEW
 ---
 
 NEW
 ---
 
-hello | 2.6-1 | source amd64 | 5 seconds old
+hello | 2.6-1 | source amd64 | 42 seconds old
 
 
-1 new source package / 1 new package in total.
+1 new source package / 1 new package in total / 0 new package to be processed.
 -----------------------------------------------------------------------
 
 And we can then process the NEW queue:
 -----------------------------------------------------------------------
 
 And we can then process the NEW queue:
-# cd /srv/dak/queue/new
-# dak process-new *.changes
+# dak process-new
 
 -----------------------------------------------------------------------
 hello_2.6-1_amd64.changes
 
 -----------------------------------------------------------------------
 hello_2.6-1_amd64.changes
+-------------------------
+
+   Target:     unstable
+   Changed-By: Santiago Vila <sanvila@debian.org>
+
 NEW
 
 hello                optional             devel
 NEW
 
 hello                optional             devel
+dsc:hello            extra                misc
 Add overrides, Edit overrides, Check, Manual reject, Note edit, Prod, [S]kip, Quit ?A
 Add overrides, Edit overrides, Check, Manual reject, Note edit, Prod, [S]kip, Quit ?A
-ACCEPT
+PENDING ACCEPT
 -----------------------------------------------------------------------
 
 -----------------------------------------------------------------------
 
-At this stage, the package has been ACCEPTed from NEW into NEWSTAGE.
-We now need to finally ACCEPT it into the pool:
-
-# cd /srv/dak/queue/newstage
-# dak process-upload *.changes
+At this stage, the package has been marked as ACCEPTed from NEW.
+We now need to process the NEW policy queue:
 
 
+# dak process-policy new
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
-hello_2.6-1_amd64.changes
-ACCEPT
-
-
-hello_2.6-1.debian.tar.gz
-  to main/h/hello/hello_2.6-1.debian.tar.gz
-hello_2.6-1.dsc
-  to main/h/hello/hello_2.6-1.dsc
-hello_2.6-1_amd64.deb
-  to main/h/hello/hello_2.6-1_amd64.deb
-hello_2.6.orig.tar.gz
-  to main/h/hello/hello_2.6.orig.tar.gz
-
-
-Override entries for your package:
-hello_2.6-1.dsc - optional devel
-hello_2.6-1_amd64.deb - optional devel
-
-Announcing to debian-devel-changes@lists.debian.org
-[A]ccept, Skip, Quit ?A
-Installing.
-Installed 1 package set, 646 KB.
+Processing changes file: hello_2.6-1_amd64.changes
+  ACCEPT
 -----------------------------------------------------------------------
 
 We can now see that dak knows about the package:
 -----------------------------------------------------------------------
 
 We can now see that dak knows about the package:
@@ -217,6 +198,8 @@ And finally, we can generate the signed Release files:
 # dak generate-release
 
 -----------------------------------------------------------------------
 # dak generate-release
 
 -----------------------------------------------------------------------
+Processing new
+Processing byhand
 Processing unstable
 -----------------------------------------------------------------------
 (Look at /srv/dak/ftp/dists/unstable/Release, Release.gpg and InRelease)
 Processing unstable
 -----------------------------------------------------------------------
 (Look at /srv/dak/ftp/dists/unstable/Release, Release.gpg and InRelease)