[vhffs-dev] [svn] commit: r68 - in trunk: debian/control debian/vhffs-backend.postinst debian/vhffs-backend.postrm debian/vhffs-configfile.postinst debian/vhffs-panel.postinst debian/vhffs-panel.postrm debian/vhffs-panel.templates vhffs-backend/tools/vhffs-initdb

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Author: soda
Date: Wed Jul 27 02:00:06 2005
New Revision: 68

Log:
Improve debian packaging, fixes bug in vhffs-backend tools


Modified:
    trunk/debian/control
    trunk/debian/vhffs-backend.postinst
    trunk/debian/vhffs-backend.postrm
    trunk/debian/vhffs-configfile.postinst
    trunk/debian/vhffs-panel.postinst
    trunk/debian/vhffs-panel.postrm
    trunk/debian/vhffs-panel.templates
    trunk/vhffs-backend/tools/vhffs-initdb

Modified: trunk/debian/control
==============================================================================
--- trunk/debian/control (original)
+++ trunk/debian/control Wed Jul 27 02:00:06 2005
@@ -26,7 +26,7 @@
 
 Package: vhffs-panel
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, liblocale-gettext-perl, libhtml-template-perl, libcgi-session-perl, libxml-rss-perl, libxml-parser, vhffs-api, vhffs-intl , vhffs-configfile
+Depends: ${shlibs:Depends}, ${misc:Depends}, liblocale-gettext-perl, libhtml-template-perl, libcgi-session-perl, libxml-rss-perl, libxml-parser-perl, vhffs-api, vhffs-intl , vhffs-configfile, apache | apache-ssl | apache2
 Description: panel of VHFFS
  This is the panel of VHFFS, a web GUI to control VHFFS
 

Modified: trunk/debian/vhffs-backend.postinst
==============================================================================
--- trunk/debian/vhffs-backend.postinst (original)
+++ trunk/debian/vhffs-backend.postinst Wed Jul 27 02:00:06 2005
@@ -19,15 +19,6 @@
 
 case "$1" in
 	configure)
-        # Source debconf library
-        . /usr/share/debconf/confmodule
-        db_version 2.0
-
-        get_debconf
-		if [ "$db_create" = "true" ]; then
-		#APPEL A DBINIT
-		sleep 2
-		fi
 	;;
     abort-upgrade|abort-remove|abort-deconfigure)
 

Modified: trunk/debian/vhffs-backend.postrm
==============================================================================
--- trunk/debian/vhffs-backend.postrm (original)
+++ trunk/debian/vhffs-backend.postrm Wed Jul 27 02:00:06 2005
@@ -24,14 +24,6 @@
 
 case "$1" in
     purge)
-	. /usr/share/debconf/confmodule
-	db_version 2.0
-	get_debconf
-
-	if [ "${purge_db}" = "true" ]
-	then
-	    echo "I: Dropping database">&2
-	fi
     ;;
 
 	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

Modified: trunk/debian/vhffs-configfile.postinst
==============================================================================
--- trunk/debian/vhffs-configfile.postinst (original)
+++ trunk/debian/vhffs-configfile.postinst Wed Jul 27 02:00:06 2005
@@ -24,23 +24,9 @@
 
 case "$1" in
 	configure)
-        # Source debconf library
-        . /usr/share/debconf/confmodule
-        db_version 2.0
-
-        get_debconf
 
 		if [ "$create_config" = "yes" ]; then
 			configfile="/etc/vhffs/vhffs.conf"
-			sed -i -e "s/.*datadir.*/\tdatadir = $datadir/" $configfile
-			sed -i -e "s/.*host_name.*/\thost_name = $title/" $configfile
-			sed -i -e "s/.*vhffs_master.*/\tvhffs_master = $admin/" $configfile
-			sed -i -e "s/.*alert_mail.*/\talert_mail = $admin/" $configfile
-			sed -i -e "s/.*db_name.*/\t\tdb_name = $dbname/g" $configfile
-			sed -i -e "s/.*db_username.*/\t\tdb_username = $dbuser/g" $configfile
-			sed -i -e "s/.*db_password.*/\t\tdb_password = $dbpass/g" $configfile
-			sed -i -e "s/.*db_password.*/\t\tdb_password = $dbpass/g" $configfile
-
 
 			sed -i -e "s/.*use_web.*/\t\tuse_web = yes/g" $configfile
 			sed -i -e "s/.*use_dns.*/\t\tuse_dns = yes/g" $configfile

Modified: trunk/debian/vhffs-panel.postinst
==============================================================================
--- trunk/debian/vhffs-panel.postinst (original)
+++ trunk/debian/vhffs-panel.postinst Wed Jul 27 02:00:06 2005
@@ -4,21 +4,19 @@
 
 get_debconf()
 {
-	db_get vhffs/webserver
+	db_get vhffs-panel/webserver
 	webservers=`echo "$RET" | sed -e 's/ *, */ /g'`
 }
 
 case "$1" in
 	configure)
-        . /usr/share/debconf/confmodule
-        db_version 2.0
-
-        get_debconf
 
 		servers="apache apache-perl apache-ssl apache2"
-		for webserver in "$webservers"; do
-			if [ ! -e /etc/${webserver}/conf.d/vhffs-panel ]; then
-				ln -s /etc/vhffs/apache-panel.conf /etc/${webserver}/conf.d/vhffs-panel
+		for webserver in "$servers"; do
+			if [ -d "/etc/$webserver/conf.d/" ]; then
+				if [ ! -e /etc/${webserver}/conf.d/vhffs-panel ]; then
+					ln -s /etc/vhffs/apache-panel.conf /etc/${webserver}/conf.d/vhffs-panel
+				fi
 			fi
 		done
 	;;

Modified: trunk/debian/vhffs-panel.postrm
==============================================================================
--- trunk/debian/vhffs-panel.postrm (original)
+++ trunk/debian/vhffs-panel.postrm Wed Jul 27 02:00:06 2005
@@ -8,36 +8,27 @@
 includefile=/etc/vhffs/apache-panel.conf
 get_debconf()
 {
-    db_get vhffs/webserver
+    db_get vhffs-panel/webserver
     webservers=`echo "$RET" | sed -e 's/ *, */ /g'`
 }
 
 case "$1" in
     purge)
-	. /usr/share/debconf/confmodule
-	db_version 2.0
-	get_debconf
-
-	for server in ${webservers}; do
-	    link=/etc/${server}/conf.d/vhffs-panel
+	servers="apache apache-perl apache-ssl apache2"
+	for server in ${servers}; do
+	    link="/etc/$server/conf.d/vhffs-panel"
 	    if [ -L "$link" ] && [ "`readlink $link`" = "$includefile" ]; then
 			rm $link
-		restart="$restart $server"
 	    fi
 	done
-	# FIXME restart server
-	 . /usr/share/wwwconfig-common/restart.sh
 
     ;;
 
     remove)
-	. /usr/share/debconf/confmodule
-	db_version 2.0
-	get_debconf
 
 	servers=${webservers}
 	for server in ${webservers}; do
-	    link=/etc/${server}/conf.d/vhffs-panel
+	    link="/etc/$server/conf.d/vhffs-panel"
 	    if [ -L "$link" ] && [ "`readlink $link`" = "$includefile" ]; then
 		rm $link
 		restart="$restart $server"

Modified: trunk/debian/vhffs-panel.templates
==============================================================================
--- trunk/debian/vhffs-panel.templates (original)
+++ trunk/debian/vhffs-panel.templates Wed Jul 27 02:00:06 2005
@@ -1,8 +1,6 @@
 Template: vhffs-panel/webserver
 Type: multiselect
 __Choices: apache, apache-ssl, apache-perl, apache2
-_DefaultChoice: apache [ default : Translators, do not put what's inside bracket
-s into translations. Put apache,apache-ssl or apache-perl here but UNTRANSLATED 
-just like it is in the ENGLISH template]
+_DefaultChoice: apache 
 _Description: Web server(s) that should be configured automatically
 

Modified: trunk/vhffs-backend/tools/vhffs-initdb
==============================================================================
--- trunk/vhffs-backend/tools/vhffs-initdb (original)
+++ trunk/vhffs-backend/tools/vhffs-initdb Wed Jul 27 02:00:06 2005
@@ -34,10 +34,12 @@
 
 echo "Create database"
 for v in $FILES; do
-	psql -U $1 -f "$SCRIPTDIR/$v" $DB 2>/dev/null 1>&2
+	psql  -f "$SCRIPTDIR/$v" $DB 2>/dev/null 1>&2
 done
 
 echo "Init database"
 
 echo "Database created"
+
+echo "Don't forget to create user permission in pg_hba.conf !"
 exit 1




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/