* postrm should remove config files on purge! littlebird-2011091400-4
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Fri, 16 Sep 2011 10:16:08 +0200
changeset 75 a587bc920c3d
parent 74 875e0c6a6c1c
child 76 6313170a9e13
* postrm should remove config files on purge!
debian/README.Debian
debian/changelog
debian/control
debian/copyright
debian/examples/apache/littlebird-tc
debian/examples/apache/littlebird-tc.conf
debian/littlebird-tc-common.postinst
debian/littlebird-tc-common.templates
debian/littlebird-tc-core.dirs
debian/littlebird-tc-core.install
debian/littlebird-tc-core.links
debian/littlebird-tc-core.postinst
debian/littlebird-tc-core.postrm
debian/littlebird-tc-core.templates
debian/littlebird-tc-sql.install
debian/littlebird-tc-sql.postinst
debian/littlebird-tc-sql.templates
debian/po/de.po
debian/po/templates.pot
debian/rules
--- a/debian/README.Debian	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/README.Debian	Fri Sep 16 10:16:08 2011 +0200
@@ -93,7 +93,7 @@
 INSTALLED and NOW?
 ==================
 
-Take your browser and enter the servername you have choosen during
+Take your browser and enter the servername you have chosen during
 package configuration. If you didn't provide the SSL certificate, the
 server will use a self signed cert, your browser will complain, it's up
 to you to accept it anyway.
--- a/debian/changelog	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/changelog	Fri Sep 16 10:16:08 2011 +0200
@@ -1,3 +1,23 @@
+littlebird (2011091400-4) stable; urgency=low
+
+  * postrm should remove config files on purge!
+
+ -- Heiko Schlittermann <hs@schlittermann.de>  Fri, 16 Sep 2011 10:15:32 +0200
+
+littlebird (2011091400-3) stable; urgency=low
+
+  * moved to /usr/lib/littlebird-tc/
+  * transition to /etc/apache2/littlebird-tc.conf 
+  * moved data/logs to /var/log/littlebird-tc
+  * moved data/* to /var/lib/littlebird-tc
+  * remove /etc/apache2/littlebird-tc.ucf* 
+  * littlebird-tc-common: fixed lintian errors 
+  * littlebird-tc-core:	  fixed lintian errors (moved to /usr/lib/littlebird)
+  * littlebird-tc-sql:	  fixed lintian errors (moved to /usr/lib/littlebird)
+  * fixed some of the lintian warnings 
+
+ -- Heiko Schlittermann <hs@schlittermann.de>  Fri, 16 Sep 2011 09:54:15 +0200
+
 littlebird (2011091400-2) stable; urgency=low
 
   * lowest prio for name of the database (since it is currently ignored) 
--- a/debian/control	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/control	Fri Sep 16 10:16:08 2011 +0200
@@ -11,6 +11,8 @@
 Architecture: all
 Depends: ${misc:Depends}
 Description: littlebird trustcenter common files
+ This package contains files, mainly debconf templates shared by all 
+ trustcenter packages.
 
 Package: littlebird-tc-core
 Architecture: all
--- a/debian/copyright	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/copyright	Fri Sep 16 10:16:08 2011 +0200
@@ -2,36 +2,23 @@
 
     Heiko Schlittermann <hs@schlittermann.de> on Tue, 30 Aug 2011 11:28:39 +0200
 
-It was downloaded from:
-
-    <url://example.com>
-
+It was downloaded from a repository provided by Little Bird GmbH.
 Upstream Author(s):
 
-    <put author's name and email here>
-    <likewise for another author>
+    Little Bird GmbH.
 
 Copyright:
 
-    <Copyright (C) YYYY Firstname Lastname>
-    <likewise for another author>
+    Little Bird GmbH.
 
 License:
 
-    <Put the license of the package here indented by 4 spaces>
+   Closed License.
 
 The Debian packaging is:
 
     Copyright (C) 2011 Heiko Schlittermann <hs@schlittermann.de>
 
-# Please chose a license for your packaging work. If the program you package
-# uses a mainstream license, using the same license is the safest choice.
-# Please avoid to pick license terms that are more restrictive than the
-# packaged work, as it may make Debian's contributions unacceptable upstream.
-# If you just want it to be GPL version 3, leave the following lines in.
+    and is licensed under the GPL version 3,
+    see "/usr/share/common-licenses/GPL-3".
 
-and is licensed under the GPL version 3,
-see "/usr/share/common-licenses/GPL-3".
-
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
--- a/debian/examples/apache/littlebird-tc	Thu Sep 15 14:14:13 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-# Note: all lines following a # debconf line are managed
-# by debconf. If you want to take control, just remove the
-# # debconf line.
-<IfModule mod_ssl.c>
-    # debconf: {{listen}}
-    # Listen 443
-</IfModule>
-
-<VirtualHost *:80>
-    # debconf: ServerAdmin {{serveradmin}}
-    ServerAdmin webmaster@example.com
-    # debconf: ServerName {{servername}}
-    ServerName www.example.com
-    # debconf: Redirect permanent / {{serverurl}}
-    Redirect permanent / https://www.example.com/
-</VirtualHost>
-
-<IfModule mod_ssl.c>
-    # debconf: <VirtualHost _default_:{{serverport}}>
-    <VirtualHost _default_:443>
-
-        # debconf: ServerAdmin {{serveradmin}}
-        ServerAdmin webmaster@example.com
-        # debconf: ServerName {{servername}}
-        ServerName www.example.com
-
-        DocumentRoot /srv/www/littlebird/TrustCenter/public
-        <Directory /srv/www/littlebird/TrustCenter/public>
-            RewriteEngine On
-            RewriteCond %{REQUEST_FILENAME} -s [OR]
-            RewriteCond %{REQUEST_FILENAME} -l [OR]
-            RewriteCond %{REQUEST_FILENAME} -d
-            RewriteRule ^.*$ - [NC,L]
-            RewriteRule ^.*$ index.php [NC,L]
-            AllowOverride All
-            Order allow,deny
-            allow from all
-        </Directory>
-
-        SSLEngine on
-        # debconf: SSLCertificateFile {{crt}}
-        SSLCertificateFile /etc/ssl/certs/www.example.com-crt.pem
-        # debconf: SSLCertificateKeyFile {{key}}
-        SSLCertificateKeyFile /etc/ssl/key/www.example.com-key.pem
-
-        SSLOptions +ExportCertData
-
-        SSLVerifyClient require
-        SSLVerifyDepth 2
-        SSLCACertificateFile /srv/www/littlebird/CA/certs/Trustcenter_CA_LB.pem
-        SSLCADNRequestFile   /srv/www/littlebird/CA/certs/Trustcenter_CA.pem
-        <Location /css>
-            SSLVerifyClient none
-        </Location>
-        <Location /js>
-            SSLVerifyClient none
-        </Location>
-        <Location /images>
-            SSLVerifyClient none
-        </Location>
-
-        LogLevel warn
-        # debconf: ErrorLog ${APACHE_LOG_DIR}/{{servername}}/error.log
-        ErrorLog ${APACHE_LOG_DIR}/www.example.com/error.log
-        # debconf: CustomLog ${APACHE_LOG_DIR}/{{servername}}/access.log combined
-        CustomLog ${APACHE_LOG_DIR}/www.example.com/access.log combined
-    </VirtualHost>
-</IfModule>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/examples/apache/littlebird-tc.conf	Fri Sep 16 10:16:08 2011 +0200
@@ -0,0 +1,68 @@
+# Note: all lines following a # debconf line are managed
+# by debconf. If you want to take control, just remove the
+# # debconf line.
+<IfModule mod_ssl.c>
+    # debconf: {{listen}}
+    # Listen 443
+</IfModule>
+
+<VirtualHost *:80>
+    # debconf: ServerAdmin {{serveradmin}}
+    ServerAdmin webmaster@example.com
+    # debconf: ServerName {{servername}}
+    ServerName www.example.com
+    # debconf: Redirect permanent / {{serverurl}}
+    Redirect permanent / https://www.example.com/
+</VirtualHost>
+
+<IfModule mod_ssl.c>
+    # debconf: <VirtualHost _default_:{{serverport}}>
+    <VirtualHost _default_:443>
+
+        # debconf: ServerAdmin {{serveradmin}}
+        ServerAdmin webmaster@example.com
+        # debconf: ServerName {{servername}}
+        ServerName www.example.com
+
+        DocumentRoot /usr/lib/littlebird-tc/TrustCenter/public
+        <Directory /usr/lib/littlebird-tc/TrustCenter/public>
+            RewriteEngine On
+            RewriteCond %{REQUEST_FILENAME} -s [OR]
+            RewriteCond %{REQUEST_FILENAME} -l [OR]
+            RewriteCond %{REQUEST_FILENAME} -d
+            RewriteRule ^.*$ - [NC,L]
+            RewriteRule ^.*$ index.php [NC,L]
+            AllowOverride All
+            Order allow,deny
+            allow from all
+        </Directory>
+
+        SSLEngine on
+        # debconf: SSLCertificateFile {{crt}}
+        SSLCertificateFile /etc/ssl/certs/www.example.com-crt.pem
+        # debconf: SSLCertificateKeyFile {{key}}
+        SSLCertificateKeyFile /etc/ssl/key/www.example.com-key.pem
+
+        SSLOptions +ExportCertData
+
+        SSLVerifyClient require
+        SSLVerifyDepth 2
+        SSLCACertificateFile /usr/lib/littlebird-tc/CA/certs/Trustcenter_CA_LB.pem
+        SSLCADNRequestFile   /usr/lib/littlebird-tc/CA/certs/Trustcenter_CA.pem
+        <Location /css>
+            SSLVerifyClient none
+        </Location>
+        <Location /js>
+            SSLVerifyClient none
+        </Location>
+        <Location /images>
+            SSLVerifyClient none
+        </Location>
+
+        LogLevel warn
+        # debconf: ErrorLog ${APACHE_LOG_DIR}/{{servername}}/error.log
+        ErrorLog ${APACHE_LOG_DIR}/www.example.com/error.log
+        # debconf: CustomLog ${APACHE_LOG_DIR}/{{servername}}/access.log combined
+        CustomLog ${APACHE_LOG_DIR}/www.example.com/access.log combined
+    </VirtualHost>
+</IfModule>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/littlebird-tc-common.postinst	Fri Sep 16 10:16:08 2011 +0200
@@ -0,0 +1,40 @@
+#!/bin/sh
+# postinst script for littlebird
+#
+# see: dh_installdeb(1)
+. /usr/share/debconf/confmodule
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- a/debian/littlebird-tc-common.templates	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/littlebird-tc-common.templates	Fri Sep 16 10:16:08 2011 +0200
@@ -5,9 +5,9 @@
 Template: littlebird-tc/db/host
 Type: string
 Default: localhost
-_Description: The name or address of the MySQL server (hostname[:port]).
- We need to know how to connect to your database server. Please note,
- that some mysql clients use a local UNIX socket connection if you enter
+_Description: MySQL Server (name or address) to use (hostname[:port]):
+ It is necessary to connect to your database server. Please note,
+ that some MySQL clients use a local UNIX socket connection if you enter
  "localhost", but use a local TCP connection, if you enter "127.0.0.1".
  .
  You may append (separeted by a colon (":")) a port number, if your
@@ -16,17 +16,17 @@
 Template: littlebird-tc/db/name
 Type: string
 Default: trustcenter_history
-_Description: The name of the database we should use.
- NOTE: currenty this name is ignored!
+_Description: database name to use:
+ NOTE: currently this name is ignored!
 
 Template: littlebird-tc/db/user
 Type: string
 Default: littlebird
-_Description: The database user to be used for the database connection.
+_Description: database user to be used for the database connection:
  This is the user to be used for all normal operations. If this is a
- fresh installation, we will create the account.
+ fresh installation, the account will be created.
 
 Template: littlebird-tc/db/pass
 Type: password
 Default:
-_Description: The password to be used for the database connection.
+_Description: The password to be used for the database connection:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/littlebird-tc-core.dirs	Fri Sep 16 10:16:08 2011 +0200
@@ -0,0 +1,2 @@
+/var/log
+/var/lib/littlebird-tc
--- a/debian/littlebird-tc-core.install	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/littlebird-tc-core.install	Fri Sep 16 10:16:08 2011 +0200
@@ -1,2 +1,2 @@
-{CA,library,TrustCenter,RestInterface} /srv/www/littlebird
+{CA,library,TrustCenter,RestInterface} /usr/lib/littlebird-tc
 debian/examples/apache /usr/share/doc/littlebird-tc/examples
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/littlebird-tc-core.links	Fri Sep 16 10:16:08 2011 +0200
@@ -0,0 +1,1 @@
+/var/log/littlebird-tc /usr/lib/littlebird-tc/TrustCenter/data/logs
--- a/debian/littlebird-tc-core.postinst	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/littlebird-tc-core.postinst	Fri Sep 16 10:16:08 2011 +0200
@@ -24,9 +24,9 @@
 case "$1" in
     configure)
 
-    DIR=/srv/www/littlebird/TrustCenter/data
-    chown -R :www-data "$DIR"
-    chmod -R g+w "$DIR"
+    dirs="/var/log/littlebird-tc /var/lib/littlebird-tc"
+    chown -R :www-data $dirs
+    chmod -R g+w $dirs
 
     # Timezone in /usr/local/zend/etc/php.ini
     # note: this file is handled as a conffile under ucf control
@@ -102,7 +102,7 @@
 
     # tweak the config file, but just the lines following a magical
     # debconf line
-    cp /usr/share/doc/littlebird-tc/examples/apache/littlebird-tc $tmp
+    cp /usr/share/doc/littlebird-tc/examples/apache/littlebird-tc.conf $tmp
     perl - "$tmp" serveradmin="$serveradmin" servername="$servername" serverport="$serverport" \
 	   crt="$crt" key="$key" <<'_'
 	use strict;
@@ -130,14 +130,25 @@
 	close(F);
 _
 
-    ucf --debconf-ok $tmp /etc/apache2/conf.d/littlebird-tc
+    # transition to *.conf
+    old_conf=/etc/apache2/conf.d/littlebird-tc
+    conf=/etc/apache2/conf.d/littlebird-tc.conf
+
+    if test -f $old_conf; then
+	ucf --debconf-ok $old_conf $conf
+	ucf --purge $old_conf
+	rm -f $old_conf $old_conf.ucf*
+    fi
+
+    ucf --debconf-ok $tmp $conf
+    rm -f $conf.ucf*
 
     # need log dir(s)
     ( . /etc/apache2/envvars
-      file=`perl -ne '/^\s*errorlog\s+(\S+)/i&&print "$1\n"' /etc/apache2/conf.d/littlebird-tc`
+      file=`perl -ne '/^\s*errorlog\s+(\S+)/i&&print "$1\n"' $conf`
       dir=`eval dirname "$file"`
       mkdir -p "$dir"
-      file=`perl -ne '/^\s*customlog\s+(\S+)/i&&print "$1\n"' /etc/apache2/conf.d/littlebird-tc`
+      file=`perl -ne '/^\s*customlog\s+(\S+)/i&&print "$1\n"' $conf`
       dir=`eval dirname "$file"`
       mkdir -p "$dir"
     )
@@ -159,7 +170,7 @@
 	if ($o{serverport} eq "443") { $o{serverurl} = "https://$o{servername}" } 
 	else { $o{serverurl} = "https://$o{servername}:$o{serverport}" }
 
-        open(F, "+</srv/www/littlebird/TrustCenter/application/configs/application_installation.ini")
+        open(F, "+</usr/lib/littlebird-tc/TrustCenter/application/configs/application_installation.ini")
             or die;
         $_ = join "" => <F>;
         s|^(\Qresources.db.params.dbname\E\s*=).*|$1 $o{dbname}|mig;
@@ -167,7 +178,7 @@
         s|^(\Qresources.db.params.username\E\s*=).*|$1 $o{dbuser}|mig;
         s|^(\Qresources.db.params.password\E\s*=).*|$1 $o{dbpass}|mig;
         s|^(\Qlittlebird.trustcenter.url\E\s*=).*|$1 $o{serverurl}|mig;
-        s|/opt/LittleBird/LittleBird(?:-Test)?|/srv/www/littlebird|mig;
+        s|/opt/LittleBird/LittleBird(?:-Test)?|/usr/lib/littlebird-tc|mig;
         seek(F, 0, 0);
         print(F $_);
         truncate(F, tell F);
--- a/debian/littlebird-tc-core.postrm	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/littlebird-tc-core.postrm	Fri Sep 16 10:16:08 2011 +0200
@@ -25,19 +25,20 @@
 
 	case "$1" in
 	purge)
-	    ucf --debconf-ok --purge /etc/apache2/conf.d/littlebird-tc
+	    ucf --debconf-ok --purge /etc/apache2/conf.d/littlebird-tc.conf
+	    rm -fv /etc/apache2/conf.d/littlebird-tc.conf
 
 	    ucfq --with-colons littlebird-tc-core | while IFS=: read file rest
 	    do
 		ucfr --purge littlebird-tc-core "$file"
+		# rm -fv "$file" # certificates!
 	    done
 
-	    db_subst littlebird-tc/removal action purging || true
-	    db_input high littlebird-tc/removal || true
-	    db_go || true
 	    ;;
-	remove)
-	    db_subst littlebird-tc/removal action removing || true
+	esac
+
+	case "$1" in
+	purge|remove)
 	    db_input high littlebird-tc/removal || true
 	    db_go || true
 	    ;;
--- a/debian/littlebird-tc-core.templates	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/littlebird-tc-core.templates	Fri Sep 16 10:16:08 2011 +0200
@@ -4,41 +4,43 @@
 
 Template: littlebird-tc/web/servername
 Type: string
-_Description: The hostname the clients use to connect to the web server.
- To connect to the web service we need a hostname. Please enter
+_Description: The hostname the clients use to connect to the web server:
+ To connect to the web service a hostname is necessary. Please enter
  the name of the host, the clients will try to connect to. 
  The name should match the CN of your SSL certificate, if you have any. 
 
 Template: littlebird-tc/web/serverport
 Type: string
 Default: 443
-_Description: The port your SSL (HTTPS) server listens on.
+_Description: The port your SSL (HTTPS) server listens on:
  If you choose any other than the default, please beware that your
  clients may not be able to connect to your HTTPS server.
 
 Template: littlebird-tc/web/serveradmin
 Type: string
-_Description: Mail address of the (web) server admin.
+_Description: Mail address of the (web) server admin:
 
 Template: littlebird-tc/removal
 Type: note
-_Description: The database needs to be cleaned!?
- You are ${action} the littlebird trustcenter,
- however we do not purge/empty/clean the database.
+_Description: The database and /var-files need to be cleaned!
+ You are removing or purging the littlebird trustcenter package,
+ however the database, and the created files under 
+ /var/log/littlebird-tc/ and /var/lib/littlebird-tc will 
+ not be cleaned or removed!
  .
  Please think about it, if you need to remove ANY traces,
- you should consider dropping the database. Contact your friendly
- database admin for doing it :-)
+ you should consider dropping the database and purging the above
+ mentioned directories.
 
 Template: littlebird-tc/web/crt
 Type: string
-_Description: pathname of the SSL certificate file
+_Description: Pathname of the SSL certificate file:
  The HTTPS server uses an SSL certificate. Where is or where 
  will be the certificate file located?
 
 Template: littlebird-tc/web/key
 Type: string
-_Description: pathname of the SSL certificate key file
+_Description: Pathname of the SSL certificate key file:
  The HTTPS server uses an SSL certificate. Where is or where 
  will be the certificate *KEY* file located?
 
--- a/debian/littlebird-tc-sql.install	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/littlebird-tc-sql.install	Fri Sep 16 10:16:08 2011 +0200
@@ -1,1 +1,1 @@
-Database /srv/www/littlebird/
+Database /usr/lib/littlebird-tc/
--- a/debian/littlebird-tc-sql.postinst	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/littlebird-tc-sql.postinst	Fri Sep 16 10:16:08 2011 +0200
@@ -73,14 +73,14 @@
 			--user "$user" --pass "$pass"
 		    fi
 
-		    if test -x /srv/www/littlebird/TrustCenter/scripts/install_update_db
+		    if test -x /usr/lib/littlebird-tc/TrustCenter/scripts/install_update_db
 		    then
 			env PATH=/usr/local/zend/bin:$PATH \
-			    /srv/www/littlebird/TrustCenter/scripts/install_update_db \
+			    /usr/lib/littlebird-tc/TrustCenter/scripts/install_update_db \
 			    "$adminuser" "$adminpass"
 		    else
 			env PATH=/usr/local/zend/bin:$PATH \
-			    bash /srv/www/littlebird/TrustCenter/scripts/install_update_db.sh \
+			    bash /usr/lib/littlebird-tc/TrustCenter/scripts/install_update_db.sh \
 			    "$adminuser" "$adminpass"
 		    fi
 
--- a/debian/littlebird-tc-sql.templates	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/littlebird-tc-sql.templates	Fri Sep 16 10:16:08 2011 +0200
@@ -4,11 +4,11 @@
 
 Template: littlebird-tc/db/have-admin
 Type: boolean
-Default: no
+Default: false
 _Description: Do you know how to access your database server as *admin*?
- During the package configuration (postinst) we need to connect
- to your database server and setup the littlebird schema, install
- a littlebird user etcpp. If you can provide us the data to access
+ During the package configuration (postinst) the database server
+ needs to be contacted to setup the littlebird schema, install
+ a littlebird user etcpp. If you can provide the data to access
  this server, please answer "yes", if not, 
  please answer "no" and return later and run 
  .
@@ -18,22 +18,22 @@
 Type: string
 Default: root
 _Description: The user to be used for the *administrative* database connection.
- Some operations during install need administrative privileges, we need
+ Some operations during install need administrative privileges, enter
  the name of the user who is empowered enough.
 
 Template: littlebird-tc/db/adminpass
 Type: password
 Default:
 _Description: The password to be used for the *administrative* database connection.
- Some operations during install need *administrative* privileges, we need
- the password for the user who is empowered enough. (The password will be securly kept
+ Some operations during install need *administrative* privileges, enter
+ the the password for the user who is empowered enough. (The password will be securly kept
  in the debconf database.)
 
 Template: littlebird-tc/db/exists
 Type: error
 _Description: The database "${name}" exists already.
- Since the database "${name}" seems to exist already, we will not
- start any attempt to do anything.
+ Since the database "${name}" seems to exist already, nothing
+ will be done!
  .
  Sorry, if this is not what you expected.
 
@@ -41,7 +41,7 @@
 Type: error
 _Description: Admin access to database failed.
  We cannot access the database "${name}" on host "${host}".
- The excuse we got:
+ The excuse reads:
  .
  ${message}
  .
--- a/debian/po/de.po	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/po/de.po	Fri Sep 16 10:16:08 2011 +0200
@@ -7,8 +7,8 @@
 msgstr ""
 "Project-Id-Version: littlebird 2011072500\n"
 "Report-Msgid-Bugs-To: littlebird@packages.debian.org\n"
-"POT-Creation-Date: 2011-09-15 14:08+0200\n"
-"PO-Revision-Date: 2011-09-15 14:12+0100\n"
+"POT-Creation-Date: 2011-09-16 09:59+0200\n"
+"PO-Revision-Date: 2011-09-16 10:05+0100\n"
 "Last-Translator: Heiko Schlittermann <hs@schlittermann.de>\n"
 "Language-Team: German\n"
 "Language: de\n"
@@ -21,19 +21,19 @@
 #. Description
 #: ../littlebird-tc-common.templates:1001
 msgid "This is the littlebird trust center package."
-msgstr "Little Bird Trustcenter"
+msgstr "Little Bird Trustcenter."
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:2001
-msgid "The name or address of the MySQL server (hostname[:port])."
-msgstr "Name und Adresse des MySQL-Servers (hostname[:port])."
+msgid "MySQL Server (name or address) to use (hostname[:port]):"
+msgstr "MySQL-Server hostname[:port]):"
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:2001
-msgid "We need to know how to connect to your database server. Please note, that some mysql clients use a local UNIX socket connection if you enter \"localhost\", but use a local TCP connection, if you enter \"127.0.0.1\"."
-msgstr "Das Trustcenter benutzt eine MySQL-Datenbank. Dafür benötigen wir die Zugangsdaten. Unter welcher Adresse ist dieser Datenbankserver erreichbar? Bitte beachten Sie, daß es für einige Clients eine lokale UNIX-Verbindung verwenden, wenn Sie \"localhost\" angeben, aber eine TCP-Verbindung, wenn Sie \"127.0.0.1\" angeben."
+msgid "It is necessary to connect to your database server. Please note, that some MySQL clients use a local UNIX socket connection if you enter \"localhost\", but use a local TCP connection, if you enter \"127.0.0.1\"."
+msgstr "Das Trustcenter benutzt eine MySQL-Datenbank. Dafür sind Zugangsdaten notwendig. Unter welcher Adresse ist dieser Datenbankserver erreichbar? Bitte beachten Sie, daß es für einige Clients eine lokale UNIX-Verbindung verwenden, wenn Sie \"localhost\" angeben, aber eine TCP-Verbindung, wenn Sie \"127.0.0.1\" angeben."
 
 #. Type: string
 #. Description
@@ -44,32 +44,32 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:3001
-msgid "The name of the database we should use."
-msgstr "Name der Datenbank für das Trustcenter."
+msgid "database name to use:"
+msgstr "Datenbank-Name für das Trustcenter:"
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:3001
-msgid "NOTE: currenty this name is ignored!"
-msgstr "ACHTUNG: gegenwärtig wird der Datenbank-Name ignoriert!"
+msgid "NOTE: currently this name is ignored!"
+msgstr "ACHTUNG: Gegenwärtig wird der Datenbank-Name ignoriert!"
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:4001
-msgid "The database user to be used for the database connection."
-msgstr "Nutzername für Zugriff auf die Trustcenter-Datenbank"
+msgid "database user to be used for the database connection:"
+msgstr "Nutzername für Zugriff auf die Trustcenter-Datenbank:"
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:4001
-msgid "This is the user to be used for all normal operations. If this is a fresh installation, we will create the account."
-msgstr "Mit welchem Nutzernamen sollen wir auf die Datenbank des Trustcenterszugreifen?"
+msgid "This is the user to be used for all normal operations. If this is a fresh installation, the account will be created."
+msgstr "Mit welchem Nutzernamen soll die Trustcenter-Anwendung auf die Datenbank zugreifen?"
 
 #. Type: password
 #. Description
 #: ../littlebird-tc-common.templates:5001
-msgid "The password to be used for the database connection."
-msgstr "Passwort für den Zugriff auf die Trustcenter-Datenbank"
+msgid "The password to be used for the database connection:"
+msgstr "Passwort für den Zugriff auf die Trustcenter-Datenbank:"
 
 #. Type: title
 #. Description
@@ -80,20 +80,20 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:2001
-msgid "The hostname the clients use to connect to the web server."
-msgstr "Unter welchem Hostnamen möchten die Clients den Webserver erreichen?"
+msgid "The hostname the clients use to connect to the web server:"
+msgstr "Unter welchem Hostnamen möchten die Clients den Webserver erreichen:"
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:2001
-msgid "To connect to the web service we need a hostname. Please enter the name of the host, the clients will try to connect to.  The name should match the CN of your SSL certificate, if you have any."
-msgstr "Um auf den Webserver zugreifen zu können, benötigen wir dessen Hostnamen, so wie ihn die Clients aufrufen müssen. Dieser Name sollte zum CN des ausgestellten (oder auszustellenden) SSL-Zertifkates passen."
+msgid "To connect to the web service a hostname is necessary. Please enter the name of the host, the clients will try to connect to.  The name should match the CN of your SSL certificate, if you have any."
+msgstr "Um auf den Webserver zugreifen zu können, wird dessen Hostname benötigt, so wie ihn die Clients aufrufen müssen. Dieser Name sollte zum CN des ausgestellten (oder auszustellenden) SSL-Zertifkates passen."
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:3001
-msgid "The port your SSL (HTTPS) server listens on."
-msgstr "Auf welchem Port soll der SSL (HTTPS)-Server die Verbindungen erwarten?"
+msgid "The port your SSL (HTTPS) server listens on:"
+msgstr "Auf welchem Port soll der SSL (HTTPS)-Server die Verbindungen erwarten:"
 
 #. Type: string
 #. Description
@@ -104,32 +104,37 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:4001
-msgid "Mail address of the (web) server admin."
-msgstr "Mailadresse des Webserver-Verwalters"
+msgid "Mail address of the (web) server admin:"
+msgstr "Mailadresse des Webserver-Verwalters:"
 
 #. Type: note
 #. Description
 #: ../littlebird-tc-core.templates:5001
-msgid "The database needs to be cleaned!?"
-msgstr "Soll die Datenbank entfernt werden!?"
+#| msgid "The database needs to be cleaned!"
+msgid "The database and /var-files need to be cleaned!"
+msgstr "Die Datenbank und einige Files unterhalb von /var müssen manuell gelöscht werden."
 
 #. Type: note
 #. Description
 #: ../littlebird-tc-core.templates:5001
-msgid "You are ${action} the littlebird trustcenter, however we do not purge/empty/clean the database."
-msgstr "Sie sind dabei, das Trustcenter zu entfernen. Wir werden jedoch *NICHT* die Datenbank leeren."
+msgid "You are removing or purging the littlebird trustcenter package, however the database, and the created files under  /var/log/littlebird-tc/ and /var/lib/littlebird-tc will  not be cleaned or removed!"
+msgstr "Sie entfernen gerade das Littlebird-Trustcenter-Paket. Wir werden die Datenbank und auch die während des Betriebs unter /var/log/littlebird-tcund unter /var/lib/littlebird-tc angelegten Files nicht entfernen!"
 
 #. Type: note
 #. Description
 #: ../littlebird-tc-core.templates:5001
-msgid "Please think about it, if you need to remove ANY traces, you should consider dropping the database. Contact your friendly database admin for doing it :-)"
-msgstr "Bitte denken Sie daran, wenn Sie alle Spuren des Trustcenters verwischen möchten, müssten Sie auch die Datenbank enfernen. Fragen Sie Ihren freundlichen Datenbankadministrator, was dafür zu tun ist."
+#| msgid ""
+#| "Please think about it, if you need to remove ANY traces, you should "
+#| "consider dropping the database. Contact your friendly database admin for "
+#| "doing it :-)"
+msgid "Please think about it, if you need to remove ANY traces, you should consider dropping the database and purging the above mentioned directories."
+msgstr "Bitte denken Sie daran, wenn Sie alle Spuren des Trustcenters verwischen möchten, müssten Sie auch die Datenbank und die /var/-Files enfernen. "
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:6001
-msgid "pathname of the SSL certificate file"
-msgstr "Pfadname des SSL-Zertifikat-Files"
+msgid "Pathname of the SSL certificate file:"
+msgstr "Pfadname des SSL-Zertifikates:"
 
 #. Type: string
 #. Description
@@ -140,8 +145,8 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:7001
-msgid "pathname of the SSL certificate key file"
-msgstr "Pfadname für den zum Zertifikat gehörigen Schlüssel"
+msgid "Pathname of the SSL certificate key file:"
+msgstr "Pfadname des SSL-Zertifikats-Schlüssels:"
 
 #. Type: string
 #. Description
@@ -188,8 +193,8 @@
 #. Type: boolean
 #. Description
 #: ../littlebird-tc-sql.templates:2001
-msgid "During the package configuration (postinst) we need to connect to your database server and setup the littlebird schema, install a littlebird user etcpp. If you can provide us the data to access this server, please answer \"yes\", if not,  please answer \"no\" and return later and run"
-msgstr "Während der Konfiguration des Trustcenters müssen wir uns mit Ihrem Datenbankserver verbinden und dort einige Dinge als ADMIN ausführen (Schema-Installation, Nutzer Anlegen, …). Wenn Sie wissen, mit welchen Daten wir uns mit dem Server verbinden können, antworten Sie jetzt mit \"ja\", andernfalls müssten Sie später nochmal wieder kommen und folgendes Kommando ausführen: "
+msgid "During the package configuration (postinst) the database server needs to be contacted to setup the littlebird schema, install a littlebird user etcpp. If you can provide the data to access this server, please answer \"yes\", if not,  please answer \"no\" and return later and run"
+msgstr "Während der Konfiguration des Trustcenters muss eine Verbindung mit Ihrem Datenbankserver hergestellt werden und dort einige Dinge als ADMIN erledigt werden (Schema-Installation, Nutzer Anlegen, …). Wenn Sie wissen, mit welchen Daten der Server erreichbar ist, antworten Sie jetzt mit \"ja\", andernfalls müssten Sie später nochmal wieder kommen und folgendes Kommando ausführen: "
 
 #. Type: boolean
 #. Description
@@ -206,8 +211,8 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-sql.templates:3001
-msgid "Some operations during install need administrative privileges, we need the name of the user who is empowered enough."
-msgstr "Wie erwähnt benötigen wir für einige Dinge ADMIN-Rechte auf der Datenbank. Mit welchem Nutzernamen dürfen wir uns mit der Datenbank verbinden? "
+msgid "Some operations during install need administrative privileges, enter the name of the user who is empowered enough."
+msgstr "Wie erwähnt benötigen sind für einige Dinge ADMIN-Rechte auf der Datenbank notwendig. Welches ist der Nutzername mit Admin-Rechten für die Datenbank?"
 
 #. Type: password
 #. Description
@@ -218,8 +223,8 @@
 #. Type: password
 #. Description
 #: ../littlebird-tc-sql.templates:4001
-msgid "Some operations during install need *administrative* privileges, we need the password for the user who is empowered enough. (The password will be securly kept in the debconf database.)"
-msgstr "Passend zum ADMIN-User benötigen wir auch dessen ADMIN-Passwort, um auf den Datenbank-Server zugreifen zu können. (Das Passwort wird sicher in der debconf-Datenbank verwahrt.)"
+msgid "Some operations during install need *administrative* privileges, enter the the password for the user who is empowered enough. (The password will be securly kept in the debconf database.)"
+msgstr "Passend zum ADMIN-User ist auch dessen ADMIN-Passwort notwendig, um auf den Datenbank-Server zugreifen zu können. (Das Passwort wird sicher in der debconf-Datenbank verwahrt.)"
 
 #. Type: error
 #. Description
@@ -230,8 +235,8 @@
 #. Type: error
 #. Description
 #: ../littlebird-tc-sql.templates:5001
-msgid "Since the database \"${name}\" seems to exist already, we will not start any attempt to do anything."
-msgstr "Da die Datenbank \"${name}\" schon existiert, machen wir überhaupt ganz und gar nichts mit dieser Datenbank."
+msgid "Since the database \"${name}\" seems to exist already, nothing will be done!"
+msgstr "Da die Datenbank \"${name}\" schon existiert, wird nichts weiter gemacht."
 
 #. Type: error
 #. Description
@@ -251,8 +256,8 @@
 #. Type: error
 #. Description
 #: ../littlebird-tc-sql.templates:6001
-msgid "We cannot access the database \"${name}\" on host \"${host}\". The excuse we got:"
-msgstr "Leider können wir die Datenbank \"${name}\" auf dem Host \"${host}\"nicht erreichen. Die Ausrede ist: "
+msgid "We cannot access the database \"${name}\" on host \"${host}\". The excuse reads:"
+msgstr "Leider kann die Datenbank \"${name}\" auf dem Host \"${host}\" nicht erreicht werden. Die Ausrede ist: "
 
 #. Type: error
 #. Description
@@ -260,3 +265,10 @@
 msgid "${message}"
 msgstr "${message}"
 
+#~ msgid ""
+#~ "You are ${action} the littlebird trustcenter, however the database does "
+#~ "not get purged or cleaned."
+#~ msgstr ""
+#~ "Sie sind dabei, das Trustcenter zu entfernen. Die Datenbank wird *nicht* "
+#~ "entfernt oder gelöscht."
+
--- a/debian/po/templates.pot	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/po/templates.pot	Fri Sep 16 10:16:08 2011 +0200
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: littlebird@packages.debian.org\n"
-"POT-Creation-Date: 2011-09-15 14:08+0200\n"
+"POT-Creation-Date: 2011-09-16 09:59+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -26,16 +26,16 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:2001
-msgid "The name or address of the MySQL server (hostname[:port])."
+msgid "MySQL Server (name or address) to use (hostname[:port]):"
 msgstr ""
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:2001
 msgid ""
-"We need to know how to connect to your database server. Please note, that "
-"some mysql clients use a local UNIX socket connection if you enter "
-"\"localhost\", but use a local TCP connection, if you enter \"127.0.0.1\"."
+"It is necessary to connect to your database server. Please note, that some "
+"MySQL clients use a local UNIX socket connection if you enter \"localhost\", "
+"but use a local TCP connection, if you enter \"127.0.0.1\"."
 msgstr ""
 
 #. Type: string
@@ -49,19 +49,19 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:3001
-msgid "The name of the database we should use."
+msgid "database name to use:"
 msgstr ""
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:3001
-msgid "NOTE: currenty this name is ignored!"
+msgid "NOTE: currently this name is ignored!"
 msgstr ""
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-common.templates:4001
-msgid "The database user to be used for the database connection."
+msgid "database user to be used for the database connection:"
 msgstr ""
 
 #. Type: string
@@ -69,13 +69,13 @@
 #: ../littlebird-tc-common.templates:4001
 msgid ""
 "This is the user to be used for all normal operations. If this is a fresh "
-"installation, we will create the account."
+"installation, the account will be created."
 msgstr ""
 
 #. Type: password
 #. Description
 #: ../littlebird-tc-common.templates:5001
-msgid "The password to be used for the database connection."
+msgid "The password to be used for the database connection:"
 msgstr ""
 
 #. Type: title
@@ -87,22 +87,22 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:2001
-msgid "The hostname the clients use to connect to the web server."
+msgid "The hostname the clients use to connect to the web server:"
 msgstr ""
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:2001
 msgid ""
-"To connect to the web service we need a hostname. Please enter the name of "
-"the host, the clients will try to connect to.  The name should match the CN "
-"of your SSL certificate, if you have any."
+"To connect to the web service a hostname is necessary. Please enter the name "
+"of the host, the clients will try to connect to.  The name should match the "
+"CN of your SSL certificate, if you have any."
 msgstr ""
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:3001
-msgid "The port your SSL (HTTPS) server listens on."
+msgid "The port your SSL (HTTPS) server listens on:"
 msgstr ""
 
 #. Type: string
@@ -116,21 +116,22 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:4001
-msgid "Mail address of the (web) server admin."
+msgid "Mail address of the (web) server admin:"
 msgstr ""
 
 #. Type: note
 #. Description
 #: ../littlebird-tc-core.templates:5001
-msgid "The database needs to be cleaned!?"
+msgid "The database and /var-files need to be cleaned!"
 msgstr ""
 
 #. Type: note
 #. Description
 #: ../littlebird-tc-core.templates:5001
 msgid ""
-"You are ${action} the littlebird trustcenter, however we do not purge/empty/"
-"clean the database."
+"You are removing or purging the littlebird trustcenter package, however the "
+"database, and the created files under  /var/log/littlebird-tc/ and /var/lib/"
+"littlebird-tc will  not be cleaned or removed!"
 msgstr ""
 
 #. Type: note
@@ -138,13 +139,13 @@
 #: ../littlebird-tc-core.templates:5001
 msgid ""
 "Please think about it, if you need to remove ANY traces, you should consider "
-"dropping the database. Contact your friendly database admin for doing it :-)"
+"dropping the database and purging the above mentioned directories."
 msgstr ""
 
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:6001
-msgid "pathname of the SSL certificate file"
+msgid "Pathname of the SSL certificate file:"
 msgstr ""
 
 #. Type: string
@@ -158,7 +159,7 @@
 #. Type: string
 #. Description
 #: ../littlebird-tc-core.templates:7001
-msgid "pathname of the SSL certificate key file"
+msgid "Pathname of the SSL certificate key file:"
 msgstr ""
 
 #. Type: string
@@ -212,10 +213,10 @@
 #. Description
 #: ../littlebird-tc-sql.templates:2001
 msgid ""
-"During the package configuration (postinst) we need to connect to your "
-"database server and setup the littlebird schema, install a littlebird user "
-"etcpp. If you can provide us the data to access this server, please answer "
-"\"yes\", if not,  please answer \"no\" and return later and run"
+"During the package configuration (postinst) the database server needs to be "
+"contacted to setup the littlebird schema, install a littlebird user etcpp. "
+"If you can provide the data to access this server, please answer \"yes\", if "
+"not,  please answer \"no\" and return later and run"
 msgstr ""
 
 #. Type: boolean
@@ -234,7 +235,7 @@
 #. Description
 #: ../littlebird-tc-sql.templates:3001
 msgid ""
-"Some operations during install need administrative privileges, we need the "
+"Some operations during install need administrative privileges, enter the "
 "name of the user who is empowered enough."
 msgstr ""
 
@@ -248,9 +249,9 @@
 #. Description
 #: ../littlebird-tc-sql.templates:4001
 msgid ""
-"Some operations during install need *administrative* privileges, we need the "
-"password for the user who is empowered enough. (The password will be securly "
-"kept in the debconf database.)"
+"Some operations during install need *administrative* privileges, enter the "
+"the password for the user who is empowered enough. (The password will be "
+"securly kept in the debconf database.)"
 msgstr ""
 
 #. Type: error
@@ -263,8 +264,7 @@
 #. Description
 #: ../littlebird-tc-sql.templates:5001
 msgid ""
-"Since the database \"${name}\" seems to exist already, we will not start any "
-"attempt to do anything."
+"Since the database \"${name}\" seems to exist already, nothing will be done!"
 msgstr ""
 
 #. Type: error
@@ -285,8 +285,8 @@
 #. Description
 #: ../littlebird-tc-sql.templates:6001
 msgid ""
-"We cannot access the database \"${name}\" on host \"${host}\". The excuse we "
-"got:"
+"We cannot access the database \"${name}\" on host \"${host}\". The excuse "
+"reads:"
 msgstr ""
 
 #. Type: error
--- a/debian/rules	Thu Sep 15 14:14:13 2011 +0200
+++ b/debian/rules	Fri Sep 16 10:16:08 2011 +0200
@@ -8,17 +8,29 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
+root=debian/littlebird-tc-core
 
 %:
 	dh $@ 
 
 override_dh_install:
 	@dh_install
-	@cd debian/littlebird-tc-core/srv/www/littlebird/CA/certs \
+	@cd ${root}/usr/lib/littlebird-tc/CA/certs \
 	&& { \
 	   test -f Trustcenter_CA_LB.pem || cp -av Test_Trustcenter_CA_LB.pem Trustcenter_CA_LB.pem; \
 	   test -f Trustcenter_CA.pem || cp -av Test_Trustcenter_CA.pem Trustcenter_CA.pem; \
 	   }
+	mv ${root}/usr/lib/littlebird-tc/TrustCenter/data/logs ${root}/var/log/littlebird-tc 
+	mv ${root}/usr/lib/littlebird-tc/TrustCenter/data/* ${root}/var/lib/littlebird-tc/
+
+override_dh_link:
+	@dh_link
+	for dir in ${root}/var/lib/littlebird-tc/*; do \
+	    dir=`basename $$dir`; \
+	    dh_link --package littlebird-tc-core /var/lib/littlebird-tc/$$dir /usr/lib/littlebird-tc/TrustCenter/data/$$dir ;\
+	done
+		
+
 
 
 # to speed up things during build process