[Pkg-tcltk-commits] r1111 - in openacs/tags: . 5.5.1+dfsg-3/debian

geox-guest at alioth.debian.org geox-guest at alioth.debian.org
Mon Dec 13 11:52:52 UTC 2010


Author: geox-guest
Date: 2010-12-13 11:52:51 +0000 (Mon, 13 Dec 2010)
New Revision: 1111

Added:
   openacs/tags/5.5.1+dfsg-3/
   openacs/tags/5.5.1+dfsg-3/debian/changelog
   openacs/tags/5.5.1+dfsg-3/debian/control
   openacs/tags/5.5.1+dfsg-3/debian/postinst
Removed:
   openacs/tags/5.5.1+dfsg-3/debian/changelog
   openacs/tags/5.5.1+dfsg-3/debian/control
   openacs/tags/5.5.1+dfsg-3/debian/postinst
Log:
[svn-buildpackage] Tagging openacs 5.5.1+dfsg-3

Deleted: openacs/tags/5.5.1+dfsg-3/debian/changelog
===================================================================
--- openacs/trunk/debian/changelog	2010-11-25 13:09:46 UTC (rev 1108)
+++ openacs/tags/5.5.1+dfsg-3/debian/changelog	2010-12-13 11:52:51 UTC (rev 1111)
@@ -1,133 +0,0 @@
-openacs (5.5.1+dfsg-2) unstable; urgency=high
-
-  * Fixed severe vulnerability in the api-browser: it was possible to pass 
-    to the query parameter "path" a relative path, which might contain path 
-    traversals like ../../.. . With these all files with read permissions 
-    can be delivered via the server. Applied Patch: 
-    http://fisheye.openacs.org/changelog/OpenACS/?cs=oacs-5-5:gustafn:20101125091953
-  * Updated translations:
-    - Vietnamese. Closes: #599607
-    - Czech. Closes: #599606
-    - Danish. Closes: #599004
-    - Japanese. Closes: #598364 
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Thu, 25 Nov 2010 13:48:45 +0100
-
-openacs (5.5.1+dfsg-1) unstable; urgency=high
-
-  * Removed non DFSG files, check README.Debian for details. Closes: #591207
-  * Success to install even if postgresql is not installed (this is the same
-    fix introduced for #591210 in dotlrn).
-  * Added info about PostgreSQL dependency to README.Debian. 
-  * Fixed postinst script that failed to reload postgresql. 
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Sun, 05 Sep 2010 00:51:43 +0200
-
-openacs (5.5.1-4) unstable; urgency=low
-
-  * Updated translations:
-    - Spanish. Closes: #579512
-  * Fixed bashisms. Closes: #581133
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Tue, 11 May 2010 09:57:30 +0200
-
-openacs (5.5.1-3) unstable; urgency=low
-
-  * Updated standards to 3.8.4 (no changes required)
-  * Added debian/source/format file, with value of 1.0.
-  * Updated translations:
-    - Vietnamese.
-    - Czech. Closes: #565882
-    - Portuguese. Closes: #575166
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Tue, 20 Apr 2010 19:13:44 +0200
-
-openacs (5.5.1-2) unstable; urgency=low
-
-  * Changed aolserver4-daemon dependency to >= 4.5.1-11
-  * Added watch file. 
-  * Added get-orig-source on debian/rules.
-  * debian/control reviewed by the debian-l10n-english team (thanks 
-  Ben Finney)
-  * Template bugs (thanks Thomas Mueller, Christian Perrier
-  and Justin B. Rye)
-    - Reviewed by the debian-l10n-english team
-    - Removed openacs/notconfigured, openacs/pg_grant_access_manual*,
-    openacs/create_tables and openacs/dba_confirm.
-  * Added after install and manual database access instructions to 
-  README.Debian.
-  * Debconf Translation Updates
-    - Norwegian.
-    - Slovak. Closes: #564097
-    - Russian. Closes: #564102
-    - Swedish. Closes: #564130
-    - French. Closes: #564178
-    - Finnish. Closes: #564493
-    - German. Closes: #564674
-    - Catalan
-    - Czech
-    - Danish
-    - Spanish
-    - Euskara
-    - Galician
-    - Italian
-    - Korean
-    - Malay
-    - Dutch
-    - Portuguese
-    - Brazilian Portuguese
-    - Vietnamese
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Mon, 18 Jan 2010 16:25:38 +0100
-
-openacs (5.5.1-1) unstable; urgency=low
-
-  * New upstream release
-  * Changed aolserver4-daemon dependency to >= 4.5.1-7
-  * Updated to the new aolserver config environment:
-    - Basic config stored on /etc/aolserver4/conf.d/openacs.sh.
-    - Removed init script, now the instance is started by the 
-      aolserver init script.
-    - Removed /etc/default/openacs.
-    - Updated daemontools script and README.
-  * Removed tsearch checks, because it is built into postgresql since 8.3.
-  * Removed README.tsearch
-  * Added README.source
-  * Added tinymce and Crystal iconset for xinha licenses to copyright file.
-  * Removed Xinha Tango Iconset because of its non DFSG compliant license.
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Sat, 21 Nov 2009 00:20:39 +0100
-
-openacs (5.4.3-3) unstable; urgency=low
-
-  [ Hector Romojaro ]
-  * Updated standards to 3.8.2.
-
-  [ Francesco Paolo Lovergine ]
-  * Added me as an uploader.
-  * Updated standards to 3.8.3. 
-  * Added Homepage field to debian/control.
-  * Added Vcs-* field to debian/control.
-  * Now using dh_prep instead of dh_clean -k.
-
- -- Francesco Paolo Lovergine <frankie at debian.org>  Mon, 07 Sep 2009 15:20:37 +0200
-
-openacs (5.4.3-2) unstable; urgency=low
-
-  * Removed nscache from config.tcl
-  * Fixed install.tcl to show the command to restart the server once installed.
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Wed, 22 Apr 2009 12:06:21 +0200
-
-openacs (5.4.3-1) unstable; urgency=low
-
-  * Removed aolserver4-nscache dependency 
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Thu, 26 Mar 2009 17:58:58 +0100
-
-openacs (5.4.3) unstable; urgency=low
-
-  * Initial release (Closes: #483126)
-
- -- Hector Romojaro <hromojaro at dia.uned.es>  Tue, 28 Oct 2008 20:01:49 +0200
-

Copied: openacs/tags/5.5.1+dfsg-3/debian/changelog (from rev 1110, openacs/trunk/debian/changelog)
===================================================================
--- openacs/tags/5.5.1+dfsg-3/debian/changelog	                        (rev 0)
+++ openacs/tags/5.5.1+dfsg-3/debian/changelog	2010-12-13 11:52:51 UTC (rev 1111)
@@ -0,0 +1,140 @@
+openacs (5.5.1+dfsg-3) unstable; urgency=low
+
+  * Policy bumped to 3.9.1 without changes.
+  * Removed recursive chown in postinst (see #606554). 
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Mon, 13 Dec 2010 12:12:30 +0100
+
+openacs (5.5.1+dfsg-2) unstable; urgency=high
+
+  * Fixed severe vulnerability in the api-browser: it was possible to pass 
+    to the query parameter "path" a relative path, which might contain path 
+    traversals like ../../.. . With these all files with read permissions 
+    can be delivered via the server. Applied Patch: 
+    http://fisheye.openacs.org/changelog/OpenACS/?cs=oacs-5-5:gustafn:20101125091953
+  * Updated translations:
+    - Vietnamese. Closes: #599607
+    - Czech. Closes: #599606
+    - Danish. Closes: #599004
+    - Japanese. Closes: #598364 
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Thu, 25 Nov 2010 13:48:45 +0100
+
+openacs (5.5.1+dfsg-1) unstable; urgency=high
+
+  * Removed non DFSG files, check README.Debian for details. Closes: #591207
+  * Success to install even if postgresql is not installed (this is the same
+    fix introduced for #591210 in dotlrn).
+  * Added info about PostgreSQL dependency to README.Debian. 
+  * Fixed postinst script that failed to reload postgresql. 
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Sun, 05 Sep 2010 00:51:43 +0200
+
+openacs (5.5.1-4) unstable; urgency=low
+
+  * Updated translations:
+    - Spanish. Closes: #579512
+  * Fixed bashisms. Closes: #581133
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Tue, 11 May 2010 09:57:30 +0200
+
+openacs (5.5.1-3) unstable; urgency=low
+
+  * Updated standards to 3.8.4 (no changes required)
+  * Added debian/source/format file, with value of 1.0.
+  * Updated translations:
+    - Vietnamese.
+    - Czech. Closes: #565882
+    - Portuguese. Closes: #575166
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Tue, 20 Apr 2010 19:13:44 +0200
+
+openacs (5.5.1-2) unstable; urgency=low
+
+  * Changed aolserver4-daemon dependency to >= 4.5.1-11
+  * Added watch file. 
+  * Added get-orig-source on debian/rules.
+  * debian/control reviewed by the debian-l10n-english team (thanks 
+  Ben Finney)
+  * Template bugs (thanks Thomas Mueller, Christian Perrier
+  and Justin B. Rye)
+    - Reviewed by the debian-l10n-english team
+    - Removed openacs/notconfigured, openacs/pg_grant_access_manual*,
+    openacs/create_tables and openacs/dba_confirm.
+  * Added after install and manual database access instructions to 
+  README.Debian.
+  * Debconf Translation Updates
+    - Norwegian.
+    - Slovak. Closes: #564097
+    - Russian. Closes: #564102
+    - Swedish. Closes: #564130
+    - French. Closes: #564178
+    - Finnish. Closes: #564493
+    - German. Closes: #564674
+    - Catalan
+    - Czech
+    - Danish
+    - Spanish
+    - Euskara
+    - Galician
+    - Italian
+    - Korean
+    - Malay
+    - Dutch
+    - Portuguese
+    - Brazilian Portuguese
+    - Vietnamese
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Mon, 18 Jan 2010 16:25:38 +0100
+
+openacs (5.5.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Changed aolserver4-daemon dependency to >= 4.5.1-7
+  * Updated to the new aolserver config environment:
+    - Basic config stored on /etc/aolserver4/conf.d/openacs.sh.
+    - Removed init script, now the instance is started by the 
+      aolserver init script.
+    - Removed /etc/default/openacs.
+    - Updated daemontools script and README.
+  * Removed tsearch checks, because it is built into postgresql since 8.3.
+  * Removed README.tsearch
+  * Added README.source
+  * Added tinymce and Crystal iconset for xinha licenses to copyright file.
+  * Removed Xinha Tango Iconset because of its non DFSG compliant license.
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Sat, 21 Nov 2009 00:20:39 +0100
+
+openacs (5.4.3-3) unstable; urgency=low
+
+  [ Hector Romojaro ]
+  * Updated standards to 3.8.2.
+
+  [ Francesco Paolo Lovergine ]
+  * Added me as an uploader.
+  * Updated standards to 3.8.3. 
+  * Added Homepage field to debian/control.
+  * Added Vcs-* field to debian/control.
+  * Now using dh_prep instead of dh_clean -k.
+
+ -- Francesco Paolo Lovergine <frankie at debian.org>  Mon, 07 Sep 2009 15:20:37 +0200
+
+openacs (5.4.3-2) unstable; urgency=low
+
+  * Removed nscache from config.tcl
+  * Fixed install.tcl to show the command to restart the server once installed.
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Wed, 22 Apr 2009 12:06:21 +0200
+
+openacs (5.4.3-1) unstable; urgency=low
+
+  * Removed aolserver4-nscache dependency 
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Thu, 26 Mar 2009 17:58:58 +0100
+
+openacs (5.4.3) unstable; urgency=low
+
+  * Initial release (Closes: #483126)
+
+ -- Hector Romojaro <hromojaro at dia.uned.es>  Tue, 28 Oct 2008 20:01:49 +0200
+

Deleted: openacs/tags/5.5.1+dfsg-3/debian/control
===================================================================
--- openacs/trunk/debian/control	2010-11-25 13:09:46 UTC (rev 1108)
+++ openacs/tags/5.5.1+dfsg-3/debian/control	2010-12-13 11:52:51 UTC (rev 1111)
@@ -1,21 +0,0 @@
-Source: openacs 
-Section: web
-Priority: optional
-Maintainer: Hector Romojaro <hromojaro at dia.uned.es>
-Uploaders: Francesco Paolo Lovergine <frankie at debian.org>
-Build-Depends-Indep: po-debconf
-Build-Depends: debhelper (>= 7), dpatch
-Standards-Version: 3.8.4
-Vcs-Browser: http://svn.debian.org/viewsvn/pkg-tcltk/openacs/trunk
-Vcs-Svn: svn://svn.debian.org/svn/pkg-tcltk/openacs/trunk
-Homepage: http://www.openacs.org/
-
-Package: openacs
-Architecture: all
-Depends: ${misc:Depends}, aolserver4-daemon (>= 4.5.1-11), aolserver4-nspostgres, aolserver4-nssha1, postgresql-client, adduser, tclthread (>= 1:2.6.5-3), tcllib,
- tcl (>= 8.4), wwwconfig-common, debconf, xotcl, aolserver4-xotcl, imagemagick, zip, unzip, tdom (>= 0.8.3~20080525)
-Suggests: postgresql, daemontools, daemontools-run
-Description: toolkit for building community-oriented web applications
- OpenACS (Open Architecture Community System) is a toolkit for building
- scalable, community-oriented web applications. It is based on the
- Tcl language and the AOLServer web server.

Copied: openacs/tags/5.5.1+dfsg-3/debian/control (from rev 1110, openacs/trunk/debian/control)
===================================================================
--- openacs/tags/5.5.1+dfsg-3/debian/control	                        (rev 0)
+++ openacs/tags/5.5.1+dfsg-3/debian/control	2010-12-13 11:52:51 UTC (rev 1111)
@@ -0,0 +1,21 @@
+Source: openacs 
+Section: web
+Priority: optional
+Maintainer: Hector Romojaro <hromojaro at dia.uned.es>
+Uploaders: Francesco Paolo Lovergine <frankie at debian.org>
+Build-Depends-Indep: po-debconf
+Build-Depends: debhelper (>= 7), dpatch
+Standards-Version: 3.9.1
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-tcltk/openacs/trunk
+Vcs-Svn: svn://svn.debian.org/svn/pkg-tcltk/openacs/trunk
+Homepage: http://www.openacs.org/
+
+Package: openacs
+Architecture: all
+Depends: ${misc:Depends}, aolserver4-daemon (>= 4.5.1-11), aolserver4-nspostgres, aolserver4-nssha1, postgresql-client, adduser, tclthread (>= 1:2.6.5-3), tcllib,
+ tcl (>= 8.4), wwwconfig-common, debconf, xotcl, aolserver4-xotcl, imagemagick, zip, unzip, tdom (>= 0.8.3~20080525)
+Suggests: postgresql, daemontools, daemontools-run
+Description: toolkit for building community-oriented web applications
+ OpenACS (Open Architecture Community System) is a toolkit for building
+ scalable, community-oriented web applications. It is based on the
+ Tcl language and the AOLServer web server.

Deleted: openacs/tags/5.5.1+dfsg-3/debian/postinst
===================================================================
--- openacs/trunk/debian/postinst	2010-11-25 13:09:46 UTC (rev 1108)
+++ openacs/tags/5.5.1+dfsg-3/debian/postinst	2010-12-13 11:52:51 UTC (rev 1111)
@@ -1,206 +0,0 @@
-#! /bin/sh -e
-# postinst script for openacs 
-#
-# see: dh_installdeb(1)
-#
-# 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>
-#        * <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
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-get_config() {
-    db_get openacs/db_host
-    db_host="$RET"
-
-    db_type="postgres7"
-    db_port=5432 
-
-    db_get openacs/dba_name
-    dba_name="$RET"
-
-    db_get openacs/dba_password
-    dba_password="$RET"
-
-    db_get openacs/dbu_name
-    dbu_name="$RET"
-
-    db_get openacs/dbu_password
-    dbu_password="$RET"
- 
-    db_get openacs/pg_grant_access
-    if [ ! -z "$RET" ]; then
-        grant_access="$RET"
-    else
-        grant_access="false"
-    fi
-}
-
-db_not_installed() {
-    echo "Please install the chosen OpenACS SGBD: postgresql, then try"
-    echo "dpkg-reconfigure openacs"
-}
-
-case "$1" in
-    configure)
-	. /usr/share/debconf/confmodule
-	db_version 2.0
-
-	# Read debconf and edit the config file accordingly
-	get_config
-	db_stop
-	exec 0<&1
-	
-	 # Care about the repository
-        repository=/var/lib/openacs
-        if [ -d $repository ]; then
-            # set the owner and change rights accordingly
-            chown -R www-data:www-data $repository
-            chmod 0755 $repository
-        fi
-
-	# Care about the log directory
-	logdir=/var/log/aolserver4/openacs
-        if [ -d $logdir ]; then
-            # set the owner and change rights accordingly
-            chown -R www-data:www-data $logdir
-            chmod 0755 $logdir
-        fi
-	
-	# Care about the app dir
-        appdir=/usr/share/openacs
-        if [ -d $appdir ]; then
-            # set the owner and change rights accordingly
-            chown -R www-data:www-data $appdir
-        fi
-
-	# care about the database creation
-	dbname=openacs
-	dbserver=$db_host
-	dbadmin=$dba_name
-	dbadmpass=$dba_password
-	dbuser=$dbu_name
-        dbpass=$dbu_password
-	
-	# is the database server available? Then create the user.
-        . /usr/share/wwwconfig-common/pgsql-createuser.sh > /dev/null
-        if [ "$status" = "error" ]
-        then
-                err=1
-                echo "* Error trying to connect to Postgresql server."
-                if [ "$db_host" = "localhost" ]
-                then
-                        echo "(TIP: is the postgresql package installed?)"
-                fi
-        else
-		. /usr/share/wwwconfig-common/pgsql-createdb.sh
-		if [ "$status" = "error" ]
-		then
-			err=1
-			echo $error
-		fi
-	
-		# Modify the pg_hba.conf to grant openacs user access to postgresql
-		# 1- Do we want to do that?
-		if [ "$grant_access" = true ]; then
-	
-			# 2- Where is the pg_hba.conf from this database instance?
-			dbuser=$dba_name
-	                dbpass=$dba_password
-			. /usr/share/wwwconfig-common/pgsql.get
-			pg_hba_file=$($pgsqlcmd -c "SELECT * from pg_settings where name='hba_file';" 2>/dev/null | grep hba | cut -d\| -f2)
-			pg_version=$(echo "$pg_hba_file" | cut -d\/ -f4)
-			if [ "$status" = "error" ]
-          			then
-                		err=1
-	                	echo $error
-        	  	else
-				# 3- Modify the file
-				# Select connection method
-				if [ "A$dbu_password" != "A" ]; then 	
-					# No Blank Password
-					pg_conn_method="md5"
-				else
-					# Blank Password
-					pg_conn_method="trust"
-				fi
-				# Delete all lines between ## Openacs ... ## and ########### from previous configurations.
-				# Insert connection line after the first local connection line (the postgres user connection line).
-				sed -i "/^## Openacs package debconf changes (DO NOT EDIT BYHAND) ##/,/^##########################################################/d;1,/^local/{
-        /^local/a ## Openacs package debconf changes (DO NOT EDIT BYHAND) ##\nlocal   openacs     $dbu_name                              $pg_conn_method\n##########################################################
-} " $pg_hba_file
-			
-				# 4-Reload postgresql conf
-				/etc/init.d/postgresql reload
-			fi
-		fi
-
-		# Modify config.tcl with debconf values
-		dbuser=$dbu_name
-        	dbpass=$dbu_password	
-		sed -i "/^    set db_host/,/^    set db_user/d;s/## Debconf changes (DO NOT EDIT BYHAND) ##/&\n    set db_host               $dbserver\n    set db_password           \"$dbpass\"\n    set db_port               \"5432\"\n    set db_user               $dbuser/" /etc/openacs/config.tcl
-
-		# Install plpgsql on database and enable compatibility options
-		dbuser=$dba_name
-		dbpass=$dba_password
-		sqlfile=$(mktemp)
-		echo "CREATE LANGUAGE plpgsql;
-			ALTER DATABASE openacs SET add_missing_from = on;
-			ALTER DATABASE openacs SET default_with_oids = on;
-			ALTER DATABASE openacs SET regex_flavor = extended;
-			" > $sqlfile
-        	. /usr/share/wwwconfig-common/pgsql-exec.sh
-		rm -f $sqlfile
-
-		# Restart aolserver
-		invoke-rc.d aolserver4 restart
-
-	        if [ "$status" = "error" ]
-        	then
-                	err=1
-	                echo $error
-        	fi
-
-	
-		if [ "$err" = "1" ]
-		then
-			echo "-------------------------------------------------------------"
-			echo "I've tried my best to create the OpenACS user and database"
-			echo "but an error has occurred"
-			echo "-------------------------------------------------------------"
-			echo "You will have to set up the OpenACS user and database yourself"
-			echo "-------------------------------------------------------------"
-		fi
-	fi
-    ;;
-
-    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
-
-

Copied: openacs/tags/5.5.1+dfsg-3/debian/postinst (from rev 1110, openacs/trunk/debian/postinst)
===================================================================
--- openacs/tags/5.5.1+dfsg-3/debian/postinst	                        (rev 0)
+++ openacs/tags/5.5.1+dfsg-3/debian/postinst	2010-12-13 11:52:51 UTC (rev 1111)
@@ -0,0 +1,206 @@
+#! /bin/sh -e
+# postinst script for openacs 
+#
+# see: dh_installdeb(1)
+#
+# 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>
+#        * <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
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+get_config() {
+    db_get openacs/db_host
+    db_host="$RET"
+
+    db_type="postgres7"
+    db_port=5432 
+
+    db_get openacs/dba_name
+    dba_name="$RET"
+
+    db_get openacs/dba_password
+    dba_password="$RET"
+
+    db_get openacs/dbu_name
+    dbu_name="$RET"
+
+    db_get openacs/dbu_password
+    dbu_password="$RET"
+ 
+    db_get openacs/pg_grant_access
+    if [ ! -z "$RET" ]; then
+        grant_access="$RET"
+    else
+        grant_access="false"
+    fi
+}
+
+db_not_installed() {
+    echo "Please install the chosen OpenACS SGBD: postgresql, then try"
+    echo "dpkg-reconfigure openacs"
+}
+
+case "$1" in
+    configure)
+	. /usr/share/debconf/confmodule
+	db_version 2.0
+
+	# Read debconf and edit the config file accordingly
+	get_config
+	db_stop
+	exec 0<&1
+	
+	 # Care about the repository
+        repository=/var/lib/openacs
+        if [ -d $repository ]; then
+            # set the owner and change rights accordingly
+            chown www-data:www-data $repository $repository/content-repository-content-files/
+            chmod 0755 $repository $repository/content-repository-content-files/
+        fi
+
+	# Care about the log directory
+	logdir=/var/log/aolserver4/openacs
+        if [ -d $logdir ]; then
+            # set the owner and change rights accordingly
+            chown www-data:www-data $logdir
+            chmod 0755 $logdir
+        fi
+	
+	# Care about the app dir
+        appdir=/usr/share/openacs
+        if [ -d $appdir ]; then
+            # set the owner and change rights accordingly
+            chown -R www-data:www-data $appdir
+        fi
+
+	# care about the database creation
+	dbname=openacs
+	dbserver=$db_host
+	dbadmin=$dba_name
+	dbadmpass=$dba_password
+	dbuser=$dbu_name
+        dbpass=$dbu_password
+	
+	# is the database server available? Then create the user.
+        . /usr/share/wwwconfig-common/pgsql-createuser.sh > /dev/null
+        if [ "$status" = "error" ]
+        then
+                err=1
+                echo "* Error trying to connect to Postgresql server."
+                if [ "$db_host" = "localhost" ]
+                then
+                        echo "(TIP: is the postgresql package installed?)"
+                fi
+        else
+		. /usr/share/wwwconfig-common/pgsql-createdb.sh
+		if [ "$status" = "error" ]
+		then
+			err=1
+			echo $error
+		fi
+	
+		# Modify the pg_hba.conf to grant openacs user access to postgresql
+		# 1- Do we want to do that?
+		if [ "$grant_access" = true ]; then
+	
+			# 2- Where is the pg_hba.conf from this database instance?
+			dbuser=$dba_name
+	                dbpass=$dba_password
+			. /usr/share/wwwconfig-common/pgsql.get
+			pg_hba_file=$($pgsqlcmd -c "SELECT * from pg_settings where name='hba_file';" 2>/dev/null | grep hba | cut -d\| -f2)
+			pg_version=$(echo "$pg_hba_file" | cut -d\/ -f4)
+			if [ "$status" = "error" ]
+          			then
+                		err=1
+	                	echo $error
+        	  	else
+				# 3- Modify the file
+				# Select connection method
+				if [ "A$dbu_password" != "A" ]; then 	
+					# No Blank Password
+					pg_conn_method="md5"
+				else
+					# Blank Password
+					pg_conn_method="trust"
+				fi
+				# Delete all lines between ## Openacs ... ## and ########### from previous configurations.
+				# Insert connection line after the first local connection line (the postgres user connection line).
+				sed -i "/^## Openacs package debconf changes (DO NOT EDIT BYHAND) ##/,/^##########################################################/d;1,/^local/{
+        /^local/a ## Openacs package debconf changes (DO NOT EDIT BYHAND) ##\nlocal   openacs     $dbu_name                              $pg_conn_method\n##########################################################
+} " $pg_hba_file
+			
+				# 4-Reload postgresql conf
+				/etc/init.d/postgresql reload
+			fi
+		fi
+
+		# Modify config.tcl with debconf values
+		dbuser=$dbu_name
+        	dbpass=$dbu_password	
+		sed -i "/^    set db_host/,/^    set db_user/d;s/## Debconf changes (DO NOT EDIT BYHAND) ##/&\n    set db_host               $dbserver\n    set db_password           \"$dbpass\"\n    set db_port               \"5432\"\n    set db_user               $dbuser/" /etc/openacs/config.tcl
+
+		# Install plpgsql on database and enable compatibility options
+		dbuser=$dba_name
+		dbpass=$dba_password
+		sqlfile=$(mktemp)
+		echo "CREATE LANGUAGE plpgsql;
+			ALTER DATABASE openacs SET add_missing_from = on;
+			ALTER DATABASE openacs SET default_with_oids = on;
+			ALTER DATABASE openacs SET regex_flavor = extended;
+			" > $sqlfile
+        	. /usr/share/wwwconfig-common/pgsql-exec.sh
+		rm -f $sqlfile
+
+		# Restart aolserver
+		invoke-rc.d aolserver4 restart
+
+	        if [ "$status" = "error" ]
+        	then
+                	err=1
+	                echo $error
+        	fi
+
+	
+		if [ "$err" = "1" ]
+		then
+			echo "-------------------------------------------------------------"
+			echo "I've tried my best to create the OpenACS user and database"
+			echo "but an error has occurred"
+			echo "-------------------------------------------------------------"
+			echo "You will have to set up the OpenACS user and database yourself"
+			echo "-------------------------------------------------------------"
+		fi
+	fi
+    ;;
+
+    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
+
+




More information about the Pkg-tcltk-commits mailing list