[Pkg-tcltk-commits] r1112 - in dotlrn/tags: . 2.5.0+dfsg-3/debian
geox-guest at alioth.debian.org
geox-guest at alioth.debian.org
Mon Dec 13 11:53:08 UTC 2010
Author: geox-guest
Date: 2010-12-13 11:53:08 +0000 (Mon, 13 Dec 2010)
New Revision: 1112
Added:
dotlrn/tags/2.5.0+dfsg-3/
dotlrn/tags/2.5.0+dfsg-3/debian/changelog
dotlrn/tags/2.5.0+dfsg-3/debian/control
dotlrn/tags/2.5.0+dfsg-3/debian/postinst
Removed:
dotlrn/tags/2.5.0+dfsg-3/debian/changelog
dotlrn/tags/2.5.0+dfsg-3/debian/control
dotlrn/tags/2.5.0+dfsg-3/debian/postinst
Log:
[svn-buildpackage] Tagging dotlrn 2.5.0+dfsg-3
Deleted: dotlrn/tags/2.5.0+dfsg-3/debian/changelog
===================================================================
--- dotlrn/trunk/debian/changelog 2010-11-25 13:09:46 UTC (rev 1108)
+++ dotlrn/tags/2.5.0+dfsg-3/debian/changelog 2010-12-13 11:53:08 UTC (rev 1112)
@@ -1,136 +0,0 @@
-dotlrn (2.5.0+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:
- - Japanease. Closes: #602151
- - Vietnamese. Closes: #599609
- - Czech. Closes: #599608
-
- -- Hector Romojaro <hromojaro at dia.uned.es> Thu, 25 Nov 2010 13:48:29 +0100
-
-dotlrn (2.5.0+dfsg-1) unstable; urgency=high
-
- * Removed non DFSG files, check README.Debian for details. Closes: #591210
- * Fixed postinst script that failed to reload postgresql.
- * Success to install even if postgresql is not installed. Closes: #595499
- * Added info about PostgreSQL dependency to README.Debian.
-
- -- Hector Romojaro <hromojaro at dia.uned.es> Sun, 05 Sep 2010 01:24:37 +0200
-
-dotlrn (2.5.0-4) unstable; urgency=low
-
- * Updated translations:
- - Spanish. Closes: #579513
- - Danish. Closes: #580786
- * Fixed bashisms. Closes: #581080
-
- -- Hector Romojaro <hromojaro at dia.uned.es> Tue, 11 May 2010 09:56:38 +0200
-
-dotlrn (2.5.0-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: #565881
- - Portuguese. Closes: #575169
-
- -- Hector Romojaro <hromojaro at dia.uned.es> Tue, 20 Apr 2010 19:13:36 +0200
-
-dotlrn (2.5.0-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
- * Template bugs (thanks Thomas Mueller, Christian Perrier
- and Justin B. Rye)
- - Fixed some typo and wrong text (closes: #562897, #562893)
- - Use PostgreSQL instead of postgresql (closes: #562894)
- - Removed dotlrn/notconfigured and dotlrn/pg_grant_access_manual*
- (closes: #562936, #562899), and added manual database access
- instructions to README.Debian.
- - Moved dotlrn/create_tables info to README.Debian.
- - Removed dotlrn/dba_confirm.
- - Reviewed by the debian-l10n-english team
- * Debconf Translation Updates
- - Norwegian.
- - Russian. Closes: #564101
- - Slovak. Closes: #564094
- - Swedish. Closes: #564128
- - Finnish. Closes: #564492
- - French. Closes: #564179
- - German. Closes: #564672
- - Portuguese. Closes: #565345
- - Catalan
- - Czech
- - Danish
- - Spanish
- - Euskara
- - Galician
- - Italian
- - Korean
- - Malay
- - Dutch
- - Brazilian Portuguese
- - Vietnamese
-
- -- Hector Romojaro <hromojaro at dia.uned.es> Mon, 18 Jan 2010 16:45:19 +0100
-
-dotlrn (2.5.0-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:22:56 +0100
-
-dotlrn (2.4.1-3) unstable; urgency=low
-
- [ Hector Romojaro ]
- * Policy bumped to 3.8.2.
-
- [ Francesco Paolo Lovergine ]
- * Added Homepage and Vcs-* fields.
- * Updated to standards 3.8.3, now uses dh_prep instead of dh_clean -k
- * Revised dependencies towards current AOLserver packages.
- * Bumped debhelper level to 7.
- * Now depends on Tcl default version.
- * Cleaned debian/rules of commented debhelper rules.
- * Added me as an uploader.
-
- -- Francesco Paolo Lovergine <frankie at debian.org> Mon, 07 Sep 2009 15:22:37 +0200
-
-dotlrn (2.4.1-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:08:50 +0200
-
-dotlrn (2.4.1-1) unstable; urgency=low
-
- * Removed aolserver4-nscache dependency
-
- -- Hector Romojaro <hromojaro at dia.uned.es> Thu, 26 Mar 2009 18:03:54 +0100
-
-dotlrn (2.4.1) unstable; urgency=low
-
- * Initial release (Closes: #483125)
-
- -- Hector Romojaro <hromojaro at dia.uned.es> Wed, 29 Oct 2008 11:12:54 +0200
-
Copied: dotlrn/tags/2.5.0+dfsg-3/debian/changelog (from rev 1109, dotlrn/trunk/debian/changelog)
===================================================================
--- dotlrn/tags/2.5.0+dfsg-3/debian/changelog (rev 0)
+++ dotlrn/tags/2.5.0+dfsg-3/debian/changelog 2010-12-13 11:53:08 UTC (rev 1112)
@@ -0,0 +1,143 @@
+dotlrn (2.5.0+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:14:25 +0100
+
+dotlrn (2.5.0+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:
+ - Japanease. Closes: #602151
+ - Vietnamese. Closes: #599609
+ - Czech. Closes: #599608
+
+ -- Hector Romojaro <hromojaro at dia.uned.es> Thu, 25 Nov 2010 13:48:29 +0100
+
+dotlrn (2.5.0+dfsg-1) unstable; urgency=high
+
+ * Removed non DFSG files, check README.Debian for details. Closes: #591210
+ * Fixed postinst script that failed to reload postgresql.
+ * Success to install even if postgresql is not installed. Closes: #595499
+ * Added info about PostgreSQL dependency to README.Debian.
+
+ -- Hector Romojaro <hromojaro at dia.uned.es> Sun, 05 Sep 2010 01:24:37 +0200
+
+dotlrn (2.5.0-4) unstable; urgency=low
+
+ * Updated translations:
+ - Spanish. Closes: #579513
+ - Danish. Closes: #580786
+ * Fixed bashisms. Closes: #581080
+
+ -- Hector Romojaro <hromojaro at dia.uned.es> Tue, 11 May 2010 09:56:38 +0200
+
+dotlrn (2.5.0-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: #565881
+ - Portuguese. Closes: #575169
+
+ -- Hector Romojaro <hromojaro at dia.uned.es> Tue, 20 Apr 2010 19:13:36 +0200
+
+dotlrn (2.5.0-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
+ * Template bugs (thanks Thomas Mueller, Christian Perrier
+ and Justin B. Rye)
+ - Fixed some typo and wrong text (closes: #562897, #562893)
+ - Use PostgreSQL instead of postgresql (closes: #562894)
+ - Removed dotlrn/notconfigured and dotlrn/pg_grant_access_manual*
+ (closes: #562936, #562899), and added manual database access
+ instructions to README.Debian.
+ - Moved dotlrn/create_tables info to README.Debian.
+ - Removed dotlrn/dba_confirm.
+ - Reviewed by the debian-l10n-english team
+ * Debconf Translation Updates
+ - Norwegian.
+ - Russian. Closes: #564101
+ - Slovak. Closes: #564094
+ - Swedish. Closes: #564128
+ - Finnish. Closes: #564492
+ - French. Closes: #564179
+ - German. Closes: #564672
+ - Portuguese. Closes: #565345
+ - Catalan
+ - Czech
+ - Danish
+ - Spanish
+ - Euskara
+ - Galician
+ - Italian
+ - Korean
+ - Malay
+ - Dutch
+ - Brazilian Portuguese
+ - Vietnamese
+
+ -- Hector Romojaro <hromojaro at dia.uned.es> Mon, 18 Jan 2010 16:45:19 +0100
+
+dotlrn (2.5.0-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:22:56 +0100
+
+dotlrn (2.4.1-3) unstable; urgency=low
+
+ [ Hector Romojaro ]
+ * Policy bumped to 3.8.2.
+
+ [ Francesco Paolo Lovergine ]
+ * Added Homepage and Vcs-* fields.
+ * Updated to standards 3.8.3, now uses dh_prep instead of dh_clean -k
+ * Revised dependencies towards current AOLserver packages.
+ * Bumped debhelper level to 7.
+ * Now depends on Tcl default version.
+ * Cleaned debian/rules of commented debhelper rules.
+ * Added me as an uploader.
+
+ -- Francesco Paolo Lovergine <frankie at debian.org> Mon, 07 Sep 2009 15:22:37 +0200
+
+dotlrn (2.4.1-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:08:50 +0200
+
+dotlrn (2.4.1-1) unstable; urgency=low
+
+ * Removed aolserver4-nscache dependency
+
+ -- Hector Romojaro <hromojaro at dia.uned.es> Thu, 26 Mar 2009 18:03:54 +0100
+
+dotlrn (2.4.1) unstable; urgency=low
+
+ * Initial release (Closes: #483125)
+
+ -- Hector Romojaro <hromojaro at dia.uned.es> Wed, 29 Oct 2008 11:12:54 +0200
+
Deleted: dotlrn/tags/2.5.0+dfsg-3/debian/control
===================================================================
--- dotlrn/trunk/debian/control 2010-11-25 13:09:46 UTC (rev 1108)
+++ dotlrn/tags/2.5.0+dfsg-3/debian/control 2010-12-13 11:53:08 UTC (rev 1112)
@@ -1,22 +0,0 @@
-Source: dotlrn
-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/dotlrn/trunk
-Vcs-Svn: svn://svn.debian.org/svn/pkg-tcltk/dotlrn/trunk
-Homepage: http://www.dotlrn.org/
-
-Package: dotlrn
-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: e-learning portal system based on OpenACS
- dotLRN is a complete Learning Management System that integrates course
- and content administration tools and collaborative tools into a
- sophisticated portal system.
Copied: dotlrn/tags/2.5.0+dfsg-3/debian/control (from rev 1109, dotlrn/trunk/debian/control)
===================================================================
--- dotlrn/tags/2.5.0+dfsg-3/debian/control (rev 0)
+++ dotlrn/tags/2.5.0+dfsg-3/debian/control 2010-12-13 11:53:08 UTC (rev 1112)
@@ -0,0 +1,22 @@
+Source: dotlrn
+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/dotlrn/trunk
+Vcs-Svn: svn://svn.debian.org/svn/pkg-tcltk/dotlrn/trunk
+Homepage: http://www.dotlrn.org/
+
+Package: dotlrn
+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: e-learning portal system based on OpenACS
+ dotLRN is a complete Learning Management System that integrates course
+ and content administration tools and collaborative tools into a
+ sophisticated portal system.
Deleted: dotlrn/tags/2.5.0+dfsg-3/debian/postinst
===================================================================
--- dotlrn/trunk/debian/postinst 2010-11-25 13:09:46 UTC (rev 1108)
+++ dotlrn/tags/2.5.0+dfsg-3/debian/postinst 2010-12-13 11:53:08 UTC (rev 1112)
@@ -1,205 +0,0 @@
-#! /bin/sh -e
-# postinst script for dotlrn
-#
-# 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 dotlrn/db_host
- db_host="$RET"
-
- db_type="postgres7"
- db_port=5432
-
- db_get dotlrn/dba_name
- dba_name="$RET"
-
- db_get dotlrn/dba_password
- dba_password="$RET"
-
- db_get dotlrn/dbu_name
- dbu_name="$RET"
-
- db_get dotlrn/dbu_password
- dbu_password="$RET"
-
- db_get dotlrn/pg_grant_access
- if [ ! -z "$RET" ]; then
- grant_access="$RET"
- else
- grant_access="false"
- fi
-}
-
-db_not_installed() {
- echo "Please install the chosen dotLRN SGBD: postgresql, then try"
- echo "dpkg-reconfigure dotlrn"
-}
-
-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/dotlrn
- 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/dotlrn
- 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/dotlrn
- 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=dotlrn
- 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 dotlrn 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 ## dotLRN ... ## and ########### from previous configurations.
- # Insert connection line after the first local connection line (the postgres user connection line).
- sed -i "/^## dotLRN package debconf changes (DO NOT EDIT BYHAND) ##/,/^##########################################################/d;1,/^local/{
- /^local/a ## dotLRN package debconf changes (DO NOT EDIT BYHAND) ##\nlocal dotlrn $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/dotlrn/config.tcl
-
- # Install plpgsql on database and enable compatibility options
- dbuser=$dba_name
- dbpass=$dba_password
- sqlfile=$(mktemp)
- echo "CREATE LANGUAGE plpgsql;
- ALTER DATABASE dotlrn SET add_missing_from = on;
- ALTER DATABASE dotlrn SET default_with_oids = on;
- ALTER DATABASE dotlrn 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 dotLRN user and database"
- echo "but an error has occurred"
- echo "-------------------------------------------------------------"
- echo "You will have to set up the dotLRN 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: dotlrn/tags/2.5.0+dfsg-3/debian/postinst (from rev 1109, dotlrn/trunk/debian/postinst)
===================================================================
--- dotlrn/tags/2.5.0+dfsg-3/debian/postinst (rev 0)
+++ dotlrn/tags/2.5.0+dfsg-3/debian/postinst 2010-12-13 11:53:08 UTC (rev 1112)
@@ -0,0 +1,205 @@
+#! /bin/sh -e
+# postinst script for dotlrn
+#
+# 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 dotlrn/db_host
+ db_host="$RET"
+
+ db_type="postgres7"
+ db_port=5432
+
+ db_get dotlrn/dba_name
+ dba_name="$RET"
+
+ db_get dotlrn/dba_password
+ dba_password="$RET"
+
+ db_get dotlrn/dbu_name
+ dbu_name="$RET"
+
+ db_get dotlrn/dbu_password
+ dbu_password="$RET"
+
+ db_get dotlrn/pg_grant_access
+ if [ ! -z "$RET" ]; then
+ grant_access="$RET"
+ else
+ grant_access="false"
+ fi
+}
+
+db_not_installed() {
+ echo "Please install the chosen dotLRN SGBD: postgresql, then try"
+ echo "dpkg-reconfigure dotlrn"
+}
+
+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/dotlrn
+ 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/dotlrn
+ 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/dotlrn
+ 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=dotlrn
+ 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 dotlrn 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 ## dotLRN ... ## and ########### from previous configurations.
+ # Insert connection line after the first local connection line (the postgres user connection line).
+ sed -i "/^## dotLRN package debconf changes (DO NOT EDIT BYHAND) ##/,/^##########################################################/d;1,/^local/{
+ /^local/a ## dotLRN package debconf changes (DO NOT EDIT BYHAND) ##\nlocal dotlrn $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/dotlrn/config.tcl
+
+ # Install plpgsql on database and enable compatibility options
+ dbuser=$dba_name
+ dbpass=$dba_password
+ sqlfile=$(mktemp)
+ echo "CREATE LANGUAGE plpgsql;
+ ALTER DATABASE dotlrn SET add_missing_from = on;
+ ALTER DATABASE dotlrn SET default_with_oids = on;
+ ALTER DATABASE dotlrn 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 dotLRN user and database"
+ echo "but an error has occurred"
+ echo "-------------------------------------------------------------"
+ echo "You will have to set up the dotLRN 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