SF.net SVN: postfixadmin:[1296] trunk/debian
Brought to you by:
christian_boltz,
gingerdog
|
From: <no...@us...> - 2011-12-18 21:30:28
|
Revision: 1296
http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1296&view=rev
Author: normes
Date: 2011-12-18 21:30:21 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
- added missing files/dirs (smarty, *.js etc.) into the package
- simplified the DB credential patch and removing ucf registrations on package purge...
Modified Paths:
--------------
trunk/debian/patches/series
trunk/debian/postfixadmin.install
trunk/debian/postfixadmin.postinst
trunk/debian/postfixadmin.postrm
Added Paths:
-----------
trunk/debian/patches/db_credentials
Removed Paths:
-------------
trunk/debian/patches/20110523_db-credentials
Deleted: trunk/debian/patches/20110523_db-credentials
===================================================================
--- trunk/debian/patches/20110523_db-credentials 2011-12-18 20:41:40 UTC (rev 1295)
+++ trunk/debian/patches/20110523_db-credentials 2011-12-18 21:30:21 UTC (rev 1296)
@@ -1,30 +0,0 @@
-Index: config.inc.php
-===================================================================
---- trunk.orig/config.inc.php (revision 1060)
-+++ trunk/config.inc.php (working copy)
-@@ -23,7 +23,7 @@
- * Doing this implies you have changed this file as required.
- * i.e. configuring database etc; specifying setup.php password etc.
- */
--$CONF['configured'] = false;
-+$CONF['configured'] = true;
-
- // In order to setup Postfixadmin, you MUST specify a hashed password here.
- // To create the hash, visit setup.php in a browser and type a password into the field,
-@@ -45,11 +45,11 @@
- // mysql = MySQL 3.23 and 4.0, 4.1 or 5
- // mysqli = MySQL 4.1+
- // pgsql = PostgreSQL
--$CONF['database_type'] = 'mysql';
--$CONF['database_host'] = 'localhost';
--$CONF['database_user'] = 'postfix';
--$CONF['database_password'] = 'postfixadmin';
--$CONF['database_name'] = 'postfix';
-+$CONF['database_type'] = '_DBC_DBTYPE_';
-+$CONF['database_host'] = '_DBC_DBSERVER_';
-+$CONF['database_user'] = '_DBC_DBUSER_';
-+$CONF['database_password'] = '_DBC_DBPASS_';
-+$CONF['database_name'] = '_DBC_DBNAME_';
- // If you need to specify a different port for a MYSQL database connection, use e.g.
- // $CONF['database_host'] = '172.30.33.66:3308';
- // If you need to specify a different port for POSTGRESQL database connection
Added: trunk/debian/patches/db_credentials
===================================================================
--- trunk/debian/patches/db_credentials (rev 0)
+++ trunk/debian/patches/db_credentials 2011-12-18 21:30:21 UTC (rev 1296)
@@ -0,0 +1,56 @@
+Description: This patch sets the dbconfig placeholders in config.inc.php.
+Forwarded: not-needed
+Author: Norman Messtorff <no...@no...>
+Last-Update: 2011-12-18
+
+Index: postfixadmin/config.inc.php
+===================================================================
+--- postfixadmin.orig/config.inc.php 2011-12-18 05:22:05.000000000 +0100
++++ postfixadmin/config.inc.php 2011-12-18 05:31:16.000000000 +0100
+@@ -16,6 +16,11 @@
+ * Contains configuration options.
+ */
+
++// This loads the automatic generated DB credentials from /etc/postfixadmin/dbconfig.inc.php
++require_once('dbconfig.inc.php');
++if (!isset($dbserver) || empty($dbserver))
++ $dbserver='localhost';
++
+ /*****************************************************************
+ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ * You have to set $CONF['configured'] = true; before the
+@@ -23,7 +28,7 @@
+ * Doing this implies you have changed this file as required.
+ * i.e. configuring database etc; specifying setup.php password etc.
+ */
+-$CONF['configured'] = false;
++$CONF['configured'] = true;
+
+ // In order to setup Postfixadmin, you MUST specify a hashed password here.
+ // To create the hash, visit setup.php in a browser and type a password into the field,
+@@ -32,7 +37,7 @@
+ // Postfix Admin Path
+ // Set the location of your Postfix Admin installation here.
+ // YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
+-$CONF['postfix_admin_url'] = '';
++$CONF['postfix_admin_url'] = '/postfixadmin';
+
+ // Language config
+ // Language files are located in './languages', change as required..
+@@ -85,11 +90,11 @@
+ // mysql = MySQL 3.23 and 4.0, 4.1 or 5
+ // mysqli = MySQL 4.1+
+ // pgsql = PostgreSQL
+-$CONF['database_type'] = 'mysql';
+-$CONF['database_host'] = 'localhost';
+-$CONF['database_user'] = 'postfix';
+-$CONF['database_password'] = 'postfixadmin';
+-$CONF['database_name'] = 'postfix';
++$CONF['database_type'] = $dbtype;
++$CONF['database_host'] = $dbserver;
++$CONF['database_user'] = $dbuser;
++$CONF['database_password'] = $dbpass;
++$CONF['database_name'] = $dbname;
+ // If you need to specify a different port for a MYSQL database connection, use e.g.
+ // $CONF['database_host'] = '172.30.33.66:3308';
+ // If you need to specify a different port for POSTGRESQL database connection
Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series 2011-12-18 20:41:40 UTC (rev 1295)
+++ trunk/debian/patches/series 2011-12-18 21:30:21 UTC (rev 1296)
@@ -1 +1 @@
-20110523_db-credentials
+db_credentials
Modified: trunk/debian/postfixadmin.install
===================================================================
--- trunk/debian/postfixadmin.install 2011-12-18 20:41:40 UTC (rev 1295)
+++ trunk/debian/postfixadmin.install 2011-12-18 21:30:21 UTC (rev 1296)
@@ -1,10 +1,16 @@
*.php usr/share/postfixadmin
+*.js usr/share/postfixadmin
admin usr/share/postfixadmin
+configs usr/share/postfixadmin
css usr/share/postfixadmin
images usr/share/postfixadmin
languages usr/share/postfixadmin
model usr/share/postfixadmin
+scripts usr/share/postfixadmin
+smarty usr/share/postfixadmin
templates usr/share/postfixadmin
+templates_c usr/share/postfixadmin
+tests usr/share/postfixadmin
users usr/share/postfixadmin
debian/apache.conf etc/postfixadmin
debian/lighttpd.conf etc/postfixadmin
Modified: trunk/debian/postfixadmin.postinst
===================================================================
--- trunk/debian/postfixadmin.postinst 2011-12-18 20:41:40 UTC (rev 1295)
+++ trunk/debian/postfixadmin.postinst 2011-12-18 21:30:21 UTC (rev 1296)
@@ -2,14 +2,14 @@
set -e
if [ "$1" = "configure" ]; then
+ # configure DB stuff via dbconfig-common
+ dbc_generate_include=php:/etc/postfixadmin/dbconfig.inc.php
+ dbc_generate_include_args="-O root:www-data -m 640 -U"
. /usr/share/debconf/confmodule
- db_version 2.0
- dbc_generate_include='template:/etc/postfixadmin/config.inc.php'
- dbc_generate_include_owner='root:www-data'
- dbc_generate_include_perms='640'
- dbc_generate_include_args="-U -o template_infile=/usr/share/postfixadmin/config.inc.php"
. /usr/share/dbconfig-common/dpkg/postinst
dbc_go postfixadmin $@
+
+ # configure webserver stuff
db_get postfixadmin/reconfigure-webserver
servers="$RET"
restart="$servers"
@@ -26,4 +26,6 @@
#DEBHELPER#
+chown www-data /usr/share/postfixadmin/templates_c
+
exit 0
Modified: trunk/debian/postfixadmin.postrm
===================================================================
--- trunk/debian/postfixadmin.postrm 2011-12-18 20:41:40 UTC (rev 1295)
+++ trunk/debian/postfixadmin.postrm 2011-12-18 21:30:21 UTC (rev 1296)
@@ -19,6 +19,16 @@
dbc_go postfixadmin $@
fi
fi
+
+ if [ "$1" = "purge" ]; then
+ rm -f /etc/postfixadmin/dbconfig.inc.php
+ if which ucf >/dev/null 2>&1; then
+ ucf --purge /etc/postfixadmin/dbconfig.inc.php
+ fi
+
+ db_purge || true
+
+ fi
fi
#DEBHELPER#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|