[Pkg-voip-commits] r3110 - in freepbx/trunk/debian: . patches
Diego Iastrubni
elcuco-guest at alioth.debian.org
Sun Feb 4 17:35:42 CET 2007
Author: elcuco-guest
Date: 2007-02-04 17:35:42 +0100 (Sun, 04 Feb 2007)
New Revision: 3110
Added:
freepbx/trunk/debian/patches/fix-warning-sqlite.dpatch
Modified:
freepbx/trunk/debian/changelog
freepbx/trunk/debian/lintian
freepbx/trunk/debian/patches/00list
freepbx/trunk/debian/patches/add-sqlite3-support.dpatch
freepbx/trunk/debian/rules
Log:
- removed an evil old hack i had to do in the old sarge days, lintian is smarter now
- enhanced the support for sqlite3
- i have no idea what is the change in the rules file :)
i am now actually working (on a test environment) on freepbx over sqlite, and another one on mysql. quite cool.
Modified: freepbx/trunk/debian/changelog
===================================================================
--- freepbx/trunk/debian/changelog 2007-02-03 22:51:30 UTC (rev 3109)
+++ freepbx/trunk/debian/changelog 2007-02-04 16:35:42 UTC (rev 3110)
@@ -4,8 +4,9 @@
* New upstream release
* Lets use the new ugly debian scheme for versions
* Updated list of virtual packages
+ * Removed evil lintian workarounds
* freepbx-admin: applied a patch to fix a bug in enum lookups
- * freepbx-admin: added a workarround for upstream bug 1694 (fixed upstream already)
+ * freepbx-admin: added a workaround for upstream bug 1694 (fixed upstream already)
* freepbx-admin: fixed a problem which happens uninstall of buggy modules (fixes upstream bug 1731)
* freepbx-admin: added a patch to support sqlite3, backport from trunk
* asterisk-config-freepbx: sox is not longer a requirement, it's only recommended now
Modified: freepbx/trunk/debian/lintian
===================================================================
--- freepbx/trunk/debian/lintian 2007-02-03 22:51:30 UTC (rev 3109)
+++ freepbx/trunk/debian/lintian 2007-02-04 16:35:42 UTC (rev 3110)
@@ -1,6 +1,2 @@
-# when lintain stops sucking ass, i will remove this
-freepbx-admin: php-script-but-no-php-cli-dep
-freepbx-agi: php-script-but-no-php-cli-dep
-
# i know this is an evil hack... ignore it
freepbx-admin: lengthy-symlink
Modified: freepbx/trunk/debian/patches/00list
===================================================================
--- freepbx/trunk/debian/patches/00list 2007-02-03 22:51:30 UTC (rev 3109)
+++ freepbx/trunk/debian/patches/00list 2007-02-04 16:35:42 UTC (rev 3110)
@@ -1,6 +1,7 @@
# fix bugs
fix-enums
fix-module_admin
+fix-warning-sqlite
# debian/xorcom enhancements
ast-config-dirs
Modified: freepbx/trunk/debian/patches/add-sqlite3-support.dpatch
===================================================================
--- freepbx/trunk/debian/patches/add-sqlite3-support.dpatch 2007-02-03 22:51:30 UTC (rev 3109)
+++ freepbx/trunk/debian/patches/add-sqlite3-support.dpatch 2007-02-04 16:35:42 UTC (rev 3110)
@@ -5,9 +5,31 @@
## DP: No description.
@DPATCH@
+diff -urNad upstream~/amp_conf/bin/retrieve_conf upstream/amp_conf/bin/retrieve_conf
+--- upstream~/amp_conf/bin/retrieve_conf 2007-01-04 02:48:29.000000000 +0200
++++ upstream/amp_conf/bin/retrieve_conf 2007-02-04 17:47:02.000000000 +0200
+@@ -223,6 +223,18 @@
+ $db->connect( $DSN );
+ break;
+
++ case "sqlite3":
++ if (!isset($amp_conf["AMPDBFILE"]))
++ die("You must setup properly AMPDBFILE in /etc/amportal.conf");
++
++ if (isset($amp_conf["AMPDBFILE"]) == "")
++ die("AMPDBFILE in /etc/amportal.conf cannot be blank");
++
++ require_once('DB/sqlite3.php');
++ $datasource = "sqlite3:///" . $amp_conf["AMPDBFILE"] . "?mode=0666";
++ $db = DB::connect($datasource);
++ break;
++
+ default:
+ die( "Unknown SQL engine: [$db_engine]");
+ }
diff -urNad upstream~/amp_conf/htdocs/admin/common/db_connect.php upstream/amp_conf/htdocs/admin/common/db_connect.php
--- upstream~/amp_conf/htdocs/admin/common/db_connect.php 2006-06-25 13:37:15.000000000 +0300
-+++ upstream/amp_conf/htdocs/admin/common/db_connect.php 2007-01-28 16:12:07.000000000 +0200
++++ upstream/amp_conf/htdocs/admin/common/db_connect.php 2007-02-04 17:47:02.000000000 +0200
@@ -49,6 +49,18 @@
$db->connect( $DSN );
break;
@@ -29,7 +51,7 @@
}
diff -urNad upstream~/amp_conf/htdocs/admin/modules/core/functions.inc.php upstream/amp_conf/htdocs/admin/modules/core/functions.inc.php
--- upstream~/amp_conf/htdocs/admin/modules/core/functions.inc.php 2007-01-03 03:33:31.000000000 +0200
-+++ upstream/amp_conf/htdocs/admin/modules/core/functions.inc.php 2007-01-28 16:12:59.000000000 +0200
++++ upstream/amp_conf/htdocs/admin/modules/core/functions.inc.php 2007-02-04 17:47:02.000000000 +0200
@@ -1411,7 +1411,7 @@
global $db;
global $amp_conf;
@@ -48,3 +70,35 @@
{
// TODO: sqlite work arround - diego
$results = sql("SELECT DISTINCT context FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context ","getAll");
+diff -urNad upstream~/install_amp upstream/install_amp
+--- upstream~/install_amp 2007-02-04 17:47:02.000000000 +0200
++++ upstream/install_amp 2007-02-04 17:47:02.000000000 +0200
+@@ -424,7 +424,8 @@
+ if ( (strtolower(substr($file,-4)) == ".sqlite") && ($db_engine == "sqlite") ) {
+ install_sqlupdate( $version, $file );
+ }
+- elseif ((strtolower(substr($file,-4)) == ".sql") && ( ($db_engine == "mysql") || ($db_engine == "pgsql")) ) {
++ elseif ((strtolower(substr($file,-4)) == ".sql") &&
++ ( ($db_engine == "mysql") || ($db_engine == "pgsql") || ($db_engine == "sqlite3") ) ) {
+ install_sqlupdate( $version, $file );
+ }
+ }
+@@ -982,6 +983,18 @@
+ $db->connect( $DSN );
+ break;
+
++ case "sqlite3":
++ if (!isset($amp_conf["AMPDBFILE"]))
++ die("You must setup properly AMPDBFILE in /etc/amportal.conf");
++
++ if (isset($amp_conf["AMPDBFILE"]) == "")
++ die("AMPDBFILE in /etc/amportal.conf cannot be blank");
++
++ require_once('DB/sqlite3.php');
++ $datasource = "sqlite3:///" . $amp_conf["AMPDBFILE"] . "?mode=0666";
++ $db = DB::connect($datasource);
++ break;
++
+ default:
+ die( "Unknown SQL engine: [$db_engine]");
+ }
Added: freepbx/trunk/debian/patches/fix-warning-sqlite.dpatch
===================================================================
--- freepbx/trunk/debian/patches/fix-warning-sqlite.dpatch 2007-02-03 22:51:30 UTC (rev 3109)
+++ freepbx/trunk/debian/patches/fix-warning-sqlite.dpatch 2007-02-04 16:35:42 UTC (rev 3110)
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-warning-sqlite.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: Do not issue warnings on sqlite when the default password has not been modified
+## DP: Fixes upstream bug 1732
+
+ at DPATCH@
+diff -urNad upstream~/amp_conf/htdocs/admin/config.php upstream/amp_conf/htdocs/admin/config.php
+--- upstream~/amp_conf/htdocs/admin/config.php 2006-12-31 10:24:16.000000000 +0200
++++ upstream/amp_conf/htdocs/admin/config.php 2007-01-31 12:45:41.000000000 +0200
+@@ -316,8 +316,11 @@
+ if ($amp_conf['AMPMGRPASS'] == 'amp111') {
+ printf( "<div class=\"warning\"><p>%s</p></div>", dgettext("welcome text", "Warning: You are running freePBX and ").$amp_conf['AMPENGINE'].dgettext("welcome page", " with the default manager pass. You should consider changing this to something else.")." ".sprintf('(<a href="http://aussievoip.com/wiki/index.php?page=freePBX-ManagerPass" target="_new">%s</a>)', _("Help")) );
+ }
+- if ($amp_conf['AMPDBPASS'] == 'amp109') {
+- printf( "<div class=\"warning\"><p>%s</p></div>", dgettext("welcome text", "Warning: You are running freePBX and ").$amp_conf['AMPDBENGINE'].dgettext("welcome page", " with the default password ")." ".sprintf('(<a href="http://aussievoip.com/wiki/index.php?page=freePBX-MysqlPass" target="_new">%s</a>)', _("Help")) );
++
++ if ( ($amp_conf["AMPDBENGINE"] == "mysql") || ($amp_conf["AMPDBENGINE"] == "pgsql")) {
++ if ($amp_conf['AMPDBPASS'] == 'amp109') {
++ printf( "<div class=\"warning\"><p>%s</p></div>", dgettext("welcome text", "Warning: You are running freePBX and ").$amp_conf['AMPDBENGINE'].dgettext("welcome page", " with the default password ")." ".sprintf('(<a href="http://aussievoip.com/wiki/index.php?page=freePBX-MysqlPass" target="_new">%s</a>)', _("Help")) );
++ }
+ }
+
+
Property changes on: freepbx/trunk/debian/patches/fix-warning-sqlite.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: freepbx/trunk/debian/rules
===================================================================
--- freepbx/trunk/debian/rules 2007-02-03 22:51:30 UTC (rev 3109)
+++ freepbx/trunk/debian/rules 2007-02-04 16:35:42 UTC (rev 3110)
@@ -103,12 +103,13 @@
# chmod -x debian/freepbx-admin/usr/share/freepbx-common/upgrades/2.1beta1/tables.php
# chmod -x debian/freepbx-admin/usr/share/freepbx-common/upgrades/2.1beta3/tables.php
- chmod +x debian/freepbx-admin/usr/share/freepbx-common/apply_conf.sh
- chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-install-mysql.sh
- chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-install-sqlite.sh
- chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-post-reload
- chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-remove-mysql.sh
- chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-remove-sqlite.sh
+ chmod +x debian/freepbx-admin/usr/share/freepbx-common/apply_conf.sh
+ chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-install-mysql.sh
+ chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-install-sqlite.sh
+ chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-post-reload
+ chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-remove-mysql.sh
+ chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-remove-sqlite.sh
+ chmod +x debian/freepbx-admin/usr/share/freepbx-common/freepbx-enable-all-modules
# lintian does not handle this php4-cgi | php5-cgi now
mkdir -p debian/freepbx-admin/usr/share/lintian/overrides/
More information about the Pkg-voip-commits
mailing list