[Fusionforge-commits] r12328 - in trunk/src/plugins/mailman: etc packaging/control packaging/install var/lib/mailman/lists

Christian Bayle cbayle at fusionforge.org
Sun Feb 20 01:20:47 CET 2011


Author: cbayle
Date: 2011-02-20 01:20:46 +0100 (Sun, 20 Feb 2011)
New Revision: 12328

Modified:
   trunk/src/plugins/mailman/etc/mailman.ini
   trunk/src/plugins/mailman/packaging/control/222plugin-mailman
   trunk/src/plugins/mailman/packaging/install/plugin-mailman
   trunk/src/plugins/mailman/var/lib/mailman/lists/extend.py
Log:
Remove use of database.py, use mailman.ini


Modified: trunk/src/plugins/mailman/etc/mailman.ini
===================================================================
--- trunk/src/plugins/mailman/etc/mailman.ini	2011-02-19 22:02:39 UTC (rev 12327)
+++ trunk/src/plugins/mailman/etc/mailman.ini	2011-02-20 00:20:46 UTC (rev 12328)
@@ -6,3 +6,7 @@
 ; Any other strings means it's under work or broken and plugin 
 ; is available in installation_environment = development only.
 plugin_status = valid
+dbhost = 
+dbuser = list
+dbpassword =
+database =  gforge

Modified: trunk/src/plugins/mailman/packaging/control/222plugin-mailman
===================================================================
--- trunk/src/plugins/mailman/packaging/control/222plugin-mailman	2011-02-19 22:02:39 UTC (rev 12327)
+++ trunk/src/plugins/mailman/packaging/control/222plugin-mailman	2011-02-20 00:20:46 UTC (rev 12328)
@@ -1,6 +1,6 @@
 Package: @PACKAGE at -plugin-mailman
 Architecture: all
-Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -mta-exim4 | @OLDPACKAGE at -mta, apache2 (>= 2.0.52), perl, libdbi-perl, libdbd-pg-perl, debianutils (>= 1.7), debconf (>= 1.0.32) | debconf-2.0, ucf, mailman (>= 2.1.13), python-psycopg2, python-mysqldb, ${misc:Depends}
+Depends: @OLDPACKAGE at -common, @OLDPACKAGE at -db-postgresql | @OLDPACKAGE at -db, @OLDPACKAGE at -mta-exim4 | @OLDPACKAGE at -mta, apache2 (>= 2.0.52), perl, libdbi-perl, libdbd-pg-perl, debianutils (>= 1.7), debconf (>= 1.0.32) | debconf-2.0, ucf, mailman (>= 2.1.13), python-psycopg2, python-mysqldb, python-iniparse, ${misc:Depends}
 Provides: @OLDPACKAGE at -lists
 Conflicts: @OLDPACKAGE at -lists
 Description: collaborative development tool - mailing-lists plugin (using Mailman)

Modified: trunk/src/plugins/mailman/packaging/install/plugin-mailman
===================================================================
--- trunk/src/plugins/mailman/packaging/install/plugin-mailman	2011-02-19 22:02:39 UTC (rev 12327)
+++ trunk/src/plugins/mailman/packaging/install/plugin-mailman	2011-02-20 00:20:46 UTC (rev 12328)
@@ -6,5 +6,6 @@
 plugins/mailman/cronjobs/*                usr/share/gforge/cronjobs
 plugins/mailman/etc/plugins/mailman/*     etc/gforge/plugins/mailman/
 plugins/mailman/etc/httpd.d/*             usr/share/gforge/etc/httpd.d/
+plugins/mailman/etc/mailman.ini           etc/gforge/config.ini.d/
 plugins/mailman/usr/lib/mailman/Mailman/* usr/lib/mailman/Mailman/
 plugins/mailman/var/lib/mailman/lists/*   var/lib/mailman/lists/

Modified: trunk/src/plugins/mailman/var/lib/mailman/lists/extend.py
===================================================================
--- trunk/src/plugins/mailman/var/lib/mailman/lists/extend.py	2011-02-19 22:02:39 UTC (rev 12327)
+++ trunk/src/plugins/mailman/var/lib/mailman/lists/extend.py	2011-02-20 00:20:46 UTC (rev 12328)
@@ -12,17 +12,18 @@
 import sys
 
 def extendMemberAdaptor(list):
-    sys.path.append('/etc/gforge')
-    import database 
+    from iniparse import INIConfig
+    cfg = INIConfig(open('/etc/gforge/config.ini.d/mailman.ini'))
     dbparam={}
     #Config to connect to database
-    dbparam['dbhost'] = database.sys_dbhost 
-    dbparam['dbuser']=  database.sys_dbuser
-    dbparam['dbpassword'] = database.sys_dbpasswd 
-    dbparam['database'] =  database.sys_dbname
+    dbparam['dbhost'] = cfg['mailman']['dbhost']
+    dbparam['dbuser']=  cfg['mailman']['dbuser']
+    dbparam['dbpassword'] = cfg['mailman']['dbpassword']
+    dbparam['database'] =  cfg['mailman']['database']
     dbparam['refresh'] = 360
 
-    dbparam['mailman_table']= 'plugin_mailman'#table where mailman stores memeberships info
+    #table where mailman stores memeberships info
+    dbparam['mailman_table']= 'plugin_mailman'
 
     ######################	
     # Session Management #




More information about the Fusionforge-commits mailing list