attempt to get the new db updater script working: nope 2011091400
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Wed, 14 Sep 2011 15:59:31 +0200
branch2011091400
changeset 62 a170d243ea64
parent 61 66d75379a0c6
child 63 4b1a3d9a3cae
attempt to get the new db updater script working: nope
.hgignore
debian/control
debian/littlebird-tc-core.install
debian/littlebird-tc-sql.install
debian/littlebird-tc-sql.postinst
debian/patches/db-update
debian/patches/series
--- a/.hgignore	Wed Sep 14 14:45:21 2011 +0200
+++ b/.hgignore	Wed Sep 14 15:59:31 2011 +0200
@@ -1,5 +1,10 @@
 syntax: glob
-LittleBird
+TrustCenter
+CA
+Database
+3rdparty
+RestInterface
+library
 debian/files
 debian/littlebird-tc-common
 debian/littlebird-tc-core
--- a/debian/control	Wed Sep 14 14:45:21 2011 +0200
+++ b/debian/control	Wed Sep 14 15:59:31 2011 +0200
@@ -24,7 +24,7 @@
 
 Package: littlebird-tc-sql
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, littlebird-tc-core (>= ${source:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, littlebird-tc-core (>= ${source:Version}), bash
 Suggests: mysql-server
 Description: littlebird sql files
  This package contains the sql files for initializing or
--- a/debian/littlebird-tc-core.install	Wed Sep 14 14:45:21 2011 +0200
+++ b/debian/littlebird-tc-core.install	Wed Sep 14 15:59:31 2011 +0200
@@ -1,2 +1,2 @@
-LittleBird/{CA,library,TrustCenter,RestInterface} /srv/www/littlebird
+{CA,library,TrustCenter,RestInterface} /srv/www/littlebird
 debian/examples/apache /usr/share/doc/littlebird-tc/examples
--- a/debian/littlebird-tc-sql.install	Wed Sep 14 14:45:21 2011 +0200
+++ b/debian/littlebird-tc-sql.install	Wed Sep 14 15:59:31 2011 +0200
@@ -1,1 +1,1 @@
-LittleBird/Database/. /usr/share/littlebird-tc/sql
+Database/. /usr/share/littlebird-tc/sql
--- a/debian/littlebird-tc-sql.postinst	Wed Sep 14 14:45:21 2011 +0200
+++ b/debian/littlebird-tc-sql.postinst	Wed Sep 14 15:59:31 2011 +0200
@@ -61,15 +61,19 @@
 		    # create or update the user
 
 		    _mysql <<EOF
-		    CREATE DATABASE $name;
+		    -- CREATE DATABASE $name;
 		    GRANT ALL ON $name.* TO '$user'@'$client' IDENTIFIED BY '$pass';
 		    FLUSH PRIVILEGES;
 EOF
 	    
+		    if false;
 		    /usr/share/littlebird-tc/sql/install_test_iteration_2011-06.sh \
 			--host "$host" --db "$name" \
 			--adminuser "$adminuser" --adminpass "$adminpass" \
 			--user "$user" --pass "$pass"
+		    fi
+		    bash /srv/www/littlebird/TrustCenter/scripts/install_update_db.sh \
+			"$adminuser" "$adminpass"
 
 		# avoid stupid messages next time
 	        db_set littlebird-tc/db/have-admin false || true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/patches/db-update	Wed Sep 14 15:59:31 2011 +0200
@@ -0,0 +1,36 @@
+Description: Upstream changes introduced in version 2011091400-0
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ littlebird (2011091400-0) stable; urgency=low
+ .
+   * new upstream 2011-09-14
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Heiko Schlittermann <hs@schlittermann.de>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- littlebird-2011091400.orig/TrustCenter/scripts/install_update_db.sh
++++ littlebird-2011091400/TrustCenter/scripts/install_update_db.sh
+@@ -1,6 +1,6 @@
+-#!/bin/sh
++#!/bin/bash
+ # cron script actual statistic
+ ZF_CONF=$(dirname `readlink -f $0`)/../zf_conf.sh
+ source $ZF_CONF
+ 
+-$ZEND_PROJECT_PATH/zf.sh database update root L1ttleB1rd
++$ZEND_PROJECT_PATH/zf.sh database update ${1-root} ${2-L1ttleB1rd}
--- a/debian/patches/series	Wed Sep 14 14:45:21 2011 +0200
+++ b/debian/patches/series	Wed Sep 14 15:59:31 2011 +0200
@@ -1,4 +1,1 @@
-debian-changes-2011072500-8
-debian-changes-2011072500-14
-debian-changes-2011072500-17
-debian-changes-2011072500-18
+db-update