working?
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Tue, 30 Aug 2011 15:09:38 +0200
changeset 1 5a522231424b
parent 0 7585b3934c11
child 2 e503cd76d135
working?
.hgignore
debian/README.source
debian/changelog
debian/control
debian/littlebird-tc-common.config
debian/littlebird-tc-common.templates
debian/littlebird-tc-core.postinst
debian/rules
--- a/.hgignore	Tue Aug 30 11:33:13 2011 +0200
+++ b/.hgignore	Tue Aug 30 15:09:38 2011 +0200
@@ -1,1 +1,3 @@
-opt
+LittleBird
+debian/littlebird-tc-core
+debian/littlebird-tc-sql
--- a/debian/README.source	Tue Aug 30 11:33:13 2011 +0200
+++ b/debian/README.source	Tue Aug 30 15:09:38 2011 +0200
@@ -4,11 +4,15 @@
 1. obtain the source littlebird*.tar.gz from 
    schlittermann@92.51.155.210
 
-2. rename the archive to littlebird-YYYYMMDDNN.tar.gz
+2. rename the archive to littlebird-YYYYMMDDNN.orig.tar.gz
    (NN is some per day increment)
 
-3. check the tar, it should contain opt/ as the uppermost
-   directory
+3. go into the source dir (the dir containing debian/)
+   mkdir tmp
+   cd tmp && tar xzf ../../littlebird-YYYYMMDDNN.orig.tar.gz
+   mv opt/* ..
+   cd ..
+   rm -r tmp
 
 4. continue as usual
 
--- a/debian/changelog	Tue Aug 30 11:33:13 2011 +0200
+++ b/debian/changelog	Tue Aug 30 15:09:38 2011 +0200
@@ -1,5 +1,11 @@
+littlebird (2011072500-2) unstable; urgency=low
+
+  * fixed depends, fixed permissions in /srv/www/littlebird/TrustCenter/Data 
+
+ -- Heiko Schlittermann <hs@schlittermann.de>  Tue, 30 Aug 2011 13:57:36 +0200
+
 littlebird (2011072500-1) unstable; urgency=low
 
-  * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
+  * Initial release 
 
  -- Heiko Schlittermann <hs@schlittermann.de>  Tue, 30 Aug 2011 11:28:39 +0200
--- a/debian/control	Tue Aug 30 11:33:13 2011 +0200
+++ b/debian/control	Tue Aug 30 15:09:38 2011 +0200
@@ -8,8 +8,25 @@
 #Vcs-Git: git://git.debian.org/collab-maint/littlebird.git
 #Vcs-Browser: http://git.debian.org/?p=collab-maint/littlebird.git;a=summary
 
-Package: littlebird
-Architecture: any
+Package: littlebird-tc-common
+Architecture: all
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: <insert up to 60 chars description>
- <insert long description, indented with spaces>
+Description: littlebird trustcenter common files
+
+Package: littlebird-tc-core
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, littlebird-tc-common (>= 2011072500)
+Pre-Depends: littlebird-tc-common (>= 2011072500)
+Recommends: littlebird-tc-sql (>= 2011072500)
+Replaces: littlebird
+Conflicts: littlebird
+Description: littlebird trustcenter core
+ This is the trustcenter package for little bird.
+
+Package: littlebird-tc-sql
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, mysql-client
+Pre-Depends: littlebird-tc-common (>= 2011072500)
+Description: littlebird sql files
+ This package contains the sql files for initializing or
+ updating the trustcenter database
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/littlebird-tc-common.config	Tue Aug 30 15:09:38 2011 +0200
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+PKG=littlebird-tc-common
+set -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+if test "$1" = "clear"; then
+    db_reset $PKG/db/host
+    db_reset $PKG/db/user
+    db_reset $PKG/db/pass
+    db_reset $PKG/db/name
+fi
+
+db_beginblock
+    db_settitle $PKG/TITLE
+    db_input high $PKG/db/host
+    db_input high $PKG/db/user
+    db_input high $PKG/db/pass
+    db_input medium $PKG/db/name
+db_endblock
+
+db_go || true
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/littlebird-tc-common.templates	Tue Aug 30 15:09:38 2011 +0200
@@ -0,0 +1,26 @@
+Template: littlebird-tc-common/TITLE
+Type: title
+Description: This is the Little Bird Trust Center Common package.
+
+Template: littlebird-tc-common/db/host
+Type: string
+Default: localhost
+Description: The name or IP address of the MySQL server.
+ Optionally you may append a port number (default port
+ used is 3306), separated by a colon ":".
+
+Template: littlebird-tc-common/db/user
+Type: string
+Default: littlebird
+Description: The user to be used for the database connection.
+
+Template: littlebird-tc-common/db/pass
+Type: password
+Default:
+Description: The password to be used for the database connection.
+
+Template: littlebird-tc-common/db/name
+Type: string
+Default: littlebird
+Description: The name of the database we should use.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/littlebird-tc-core.postinst	Tue Aug 30 15:09:38 2011 +0200
@@ -0,0 +1,44 @@
+#!/bin/sh
+# postinst script for littlebird
+#
+# see: dh_installdeb(1)
+
+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)
+
+    DIR=/srv/www/littlebird/TrustCenter/Data
+    chown -R :www-data "$DIR"
+    chmod -R g+w "$DIR"
+
+    ;;
+
+    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/rules	Tue Aug 30 11:33:13 2011 +0200
+++ b/debian/rules	Tue Aug 30 15:09:38 2011 +0200
@@ -9,5 +9,19 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+SHELL=/bin/bash
+core=debian/littlebird-tc-core
+sql=debian/littlebird-tc-sql
+
+
 %:
 	dh $@ 
+
+override_dh_auto_install:
+	# install everything to `${r}'
+	# *** tc core
+	install -d -m 0755 ${core}/srv/www/littlebird-tc-core/
+	rsync -a LittleBird/encoded/LittleBird-Test/{CA,library,TrustCenter} ${core}/srv/www/littlebird/
+	# *** tc sql
+	install -d -m 0755 ${sql}/usr/share/littlebird/tc-sql/
+	rsync -a LittleBird/encoded/LittleBird-Test/Database/ ${sql}/usr/share/littlebird/tc-sql/