[Pkg-voip-commits] r2516 - in freepbx/trunk/debian: . patches rapid
Diego Iastrubni
elcuco-guest at costa.debian.org
Sun Oct 8 17:43:16 UTC 2006
Author: elcuco-guest
Date: 2006-10-08 17:43:16 +0000 (Sun, 08 Oct 2006)
New Revision: 2516
Added:
freepbx/trunk/debian/lintian
freepbx/trunk/debian/patches/alternative-css.dpatch
freepbx/trunk/debian/rapid/mainstyle-alternative.css
Modified:
freepbx/trunk/debian/changelog
freepbx/trunk/debian/freepbx-admin.install
freepbx/trunk/debian/freepbx-admin.postinst
freepbx/trunk/debian/freepbx-panel.postinst
freepbx/trunk/debian/patches/00list
freepbx/trunk/debian/rapid/amportal.conf
freepbx/trunk/debian/rapid/freepbx-install-mysql.sh
freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh
freepbx/trunk/debian/rules
Log:
This week massive commit. Package is now tested on several machines.
Still not on production machines, but I will get there soon.
- new feature: support for alternative-css. when you add the keyword
ALTERNATIVE_CSS=1 to amportal.conf, the WEB GUI will be red. soon to
be commited upstream for freepbx-2.2.x
- freepbx-remove-sqlite, freepbx-install-mysql use sh instead of bash
- add branding (of xorcom meanwhile) to the default amportal.conf,
this will need to change to debian branding soon.
- freepbx-admin.postinst: it's ok to the webservers to fail the reload.
This should not affect the functionality of the package: the PBX will
still work. You cannot modify the configuration... but it works...
this means that the webservers are not essential to the functionality
of freePBX, just _VERY_ recommended.
- freepbx-panel.postinst: fix syntax error
- lintian fixes, now the building should be more smooth. not perfect
but much cleaner.
TODO:
The package is verified to work on Sarge and Etch, yay me...
However, it does not work on Ubuntu 6.06. The reason is that the
install-mysql script fails. It does not work, because the maintainer user
of mysql does not have GRANT permission (it can delete and add tables to
DB but not change permissions....? how lame...?).
The solution will be to add debconf and ask for the mysql root
password on Ubuntu. I still aim for this to be done in a single package
and for it to work without any questions on Etch. Not sure how I will do
it.
My next goal, is that alien will be able to generate a valid RPM for
Centos,SuSE and Mandriva... why not, how about creating a new RPM
based distro... and add it to the supported distros...? nah.... :)
Modified: freepbx/trunk/debian/changelog
===================================================================
--- freepbx/trunk/debian/changelog 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/changelog 2006-10-08 17:43:16 UTC (rev 2516)
@@ -4,8 +4,9 @@
[Diego Iastrubni]
* New upstream release
- * freepbx-modules-status script bug fixes (status is working, enabling a module will also
- try to upgrade it if needed.
+ * freepbx-common: many bug fixes in freepbx-modules-status (status is working,
+ enabling a module will also try to upgrade it if needed.
+ * freepbx-common: added a new patch for alternative configuraiton support
* Removed patch fix-konqueror-blinks, as it was merged upstream
* Removed patch fix-reload-on-no-asterisk, as it was merged upstream
* Many lintian fixes (works on sarge, but not etch... fun fun fun...)
@@ -23,14 +24,16 @@
* Build-dep on dpatch
* Clean ups of obsolete patches
* all mp3 are converted to 16 bit 8khz wav files, also in source
- * freepbx admin is installed into /usr/share/freepbx (was /usr/share/freepbx/admin)
-
- * asterisk-config-freepbx: added both manager.d and extensions.d directories (on the same patch)
+ * freepbx admin is installed into /usr/share/freepbx
+ (was /usr/share/freepbx/admin)
+ * asterisk-config-freepbx: added both manager.d and extensions.d directories
+ (on the same patch)
* freepbx-admin: patched featured codes, to support sqlite
* freepbx-admin: applied a patch to remove blinking on Konqueror
- * freepbx-admin: major cleanups to install_amp (does not install files by default now)
- * freepbx-admin: fixed a bug caused by tring to reload while the manager does not respond
- backport from the branch, patch fix-reload-on-no-asterisk.dpath
+ * freepbx-admin: major cleanups to install_amp (does not install files by
+ default now)
+ * freepbx-admin: fixed a bug caused by tring to reload while the manager does
+ not respond backport from the branch, patch fix-reload-on-no-asterisk.dpath
* freepbx-admin: depends on adduser
* freepbx-panel: add another alternative configuration for op-panel
Modified: freepbx/trunk/debian/freepbx-admin.install
===================================================================
--- freepbx/trunk/debian/freepbx-admin.install 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/freepbx-admin.install 2006-10-08 17:43:16 UTC (rev 2516)
@@ -4,6 +4,7 @@
amp_conf/htdocs/admin/*.php usr/share/freepbx/
amp_conf/htdocs/admin/i18n/* usr/share/freepbx/i18n/
amp_conf/htdocs/admin/common/*.css usr/share/freepbx/common/
+debian/rapid/mainstyle-alternative.css usr/share/freepbx/common/
amp_conf/htdocs/admin/common/*.php usr/share/freepbx/common/
amp_conf/htdocs/admin/common/script.js.php usr/share/freepbx/common/
amp_conf/htdocs/admin/modules/core usr/share/freepbx/modules/
@@ -12,11 +13,12 @@
debian/rapid/xorcom-rapid.png usr/share/freepbx/images/
debian/rapid/xorcom.png usr/share/freepbx/images/
-debian/rapid/freepbx-install-*.sh usr/share/freepbx-common/
-debian/rapid/freepbx-remove-*.sh usr/share/freepbx-common/
+
install_amp usr/share/freepbx-common/
debian/rapid/amportal.conf usr/share/freepbx-common/
debian/rapid/apply_conf.sh usr/share/freepbx-common/
+debian/rapid/freepbx-install-*.sh usr/share/freepbx-common/
+debian/rapid/freepbx-remove-*.sh usr/share/freepbx-common/
debian/rapid/freepbx-post-reload usr/share/freepbx-common/
debian/rapid/freepbx-module-status usr/share/freepbx-common/
debian/rapid/post-reload/* usr/share/freepbx-common/post-reload/
Modified: freepbx/trunk/debian/freepbx-admin.postinst
===================================================================
--- freepbx/trunk/debian/freepbx-admin.postinst 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/freepbx-admin.postinst 2006-10-08 17:43:16 UTC (rev 2516)
@@ -77,6 +77,8 @@
else
echo "No suitable SQL server found on this machine."
echo "Please edit manually /etc/amportal.conf"
+
+ exit 1
fi
fi
fi
@@ -99,7 +101,8 @@
# on fresh installs, we need to modify the www-data user
# this might be already done by other packages, or a previous version
- # of this package
+ # of this package.
+ # this is ok for the process to fail
if groups www-data | grep -q -w -v asterisk ; then
echo -n "Changing permissions of the web server"
adduser www-data asterisk
@@ -107,13 +110,13 @@
# TODO - there must be a generic way of doying this stuff
echo "Restarting the httpd server to take usage of the new ownership"
- if test -x /etc/init.d/apache ; then /etc/init.d/apache restart; fi
- if test -x /etc/init.d/apache2; then /etc/init.d/apache2 restart; fi
- if test -x /etc/init.d/mathopd; then /etc/init.d/mathopd restart; fi
+ if test -x /etc/init.d/apache ; then /etc/init.d/apache restart || true; fi
+ if test -x /etc/init.d/apache2; then /etc/init.d/apache2 restart || true; fi
+ if test -x /etc/init.d/mathopd; then /etc/init.d/mathopd restart || true; fi
else
- # on upgrages, reloading apache(s) is enough.
- if test -x /etc/init.d/apache ; then /etc/init.d/apache reload; fi
- if test -x /etc/init.d/apache2; then /etc/init.d/apache2 reload; fi
+ # on upgrages, reloading apache(s) is enough
+ if test -x /etc/init.d/apache ; then /etc/init.d/apache reload || true; fi
+ if test -x /etc/init.d/apache2; then /etc/init.d/apache2 reload || true; fi
fi
;;
Modified: freepbx/trunk/debian/freepbx-panel.postinst
===================================================================
--- freepbx/trunk/debian/freepbx-panel.postinst 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/freepbx-panel.postinst 2006-10-08 17:43:16 UTC (rev 2516)
@@ -33,7 +33,7 @@
# make the op-panel aware of the new configuration
- invoke-rc.d restart
+ invoke-rc.d op-panel restart
;;
abort-upgrade|abort-remove|abort-deconfigure)
Added: freepbx/trunk/debian/lintian
===================================================================
--- freepbx/trunk/debian/lintian (rev 0)
+++ freepbx/trunk/debian/lintian 2006-10-08 17:43:16 UTC (rev 2516)
@@ -0,0 +1,6 @@
+# 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 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/patches/00list 2006-10-08 17:43:16 UTC (rev 2516)
@@ -7,6 +7,7 @@
# backports from the trunk, nice features, fixes... why not having them as well...?
check-ast-runnning
+alternative-css
# obsolete pachtes
#fix-konqueror-blinks
Added: freepbx/trunk/debian/patches/alternative-css.dpatch
===================================================================
--- freepbx/trunk/debian/patches/alternative-css.dpatch (rev 0)
+++ freepbx/trunk/debian/patches/alternative-css.dpatch 2006-10-08 17:43:16 UTC (rev 2516)
@@ -0,0 +1,47 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## alternative-css.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: Add support for an alternative stylesheet by modifying amportal.conf
+## DP: This patch also adds support for key names to contain _ in the key names.
+
+ at DPATCH@
+diff -urNad freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/functions.inc.php /tmp/dpep.mMP7Vx/freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/functions.inc.php
+--- freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/functions.inc.php 2006-09-18 17:38:42.000000000 +0300
++++ /tmp/dpep.mMP7Vx/freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/functions.inc.php 2006-10-05 12:21:32.000000000 +0200
+@@ -22,7 +22,7 @@
+
+ if (is_array($file)) {
+ foreach ($file as $line) {
+- if (preg_match("/^\s*([a-zA-Z0-9]+)=([a-zA-Z0-9 .&-@=_<>\"\']+)\s*$/",$line,$matches)) {
++ if (preg_match("/^\s*([a-zA-Z0-9_]+)=([a-zA-Z0-9 .&-@=_<>\"\']+)\s*$/",$line,$matches)) {
+ $conf[ $matches[1] ] = $matches[2];
+ }
+ }
+diff -urNad freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/header.php /tmp/dpep.mMP7Vx/freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/header.php
+--- freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/header.php 2006-05-05 20:41:30.000000000 +0300
++++ /tmp/dpep.mMP7Vx/freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/header.php 2006-10-05 12:21:18.000000000 +0200
+@@ -31,8 +31,23 @@
+ <head>
+ <title><?php echo _($title) ?></title>
+ <meta http-equiv="Content-Type" content="text/html">
+- <link href="common/mainstyle.css" rel="stylesheet" type="text/css">
+ <?php
++ // nice hack:
++ // check if in the amp configuration the user has set that
++ // he wants to use an alternative style-sheet.
++ // on Xorcom's TS1, it's used when the system is in rescue mode.
++
++ $style_sheet = "common/mainstyle.css";
++ if (isset($amp_conf["ALTERNATIVE_CSS"]))
++ {
++ if (($amp_conf["ALTERNATIVE_CSS"] == "1") ||
++ ($amp_conf["ALTERNATIVE_CSS"] == "yes") ||
++ ($amp_conf["ALTERNATIVE_CSS"] == "true"))
++ $style_sheet = "common/mainstyle-alternative.css";
++ }
++
++ echo "<link href=\"$style_sheet\" rel=\"stylesheet\" type=\"text/css\">";
++
+ if (isset($display) && is_file("modules/{$display}/{$display}.css")) {
+ echo " <link href=\"modules/{$display}/{$display}.css\" rel=\"stylesheet\" type=\"text/css\">\n";
+ }
Property changes on: freepbx/trunk/debian/patches/alternative-css.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: freepbx/trunk/debian/rapid/amportal.conf
===================================================================
--- freepbx/trunk/debian/rapid/amportal.conf 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/rapid/amportal.conf 2006-10-08 17:43:16 UTC (rev 2516)
@@ -95,11 +95,11 @@
# This enables you to customize the look of the administration screen.
# NOTE: images need to be saved in the ..../admin/images directory of your FreePBX install
# This image should be 40px in height
-AMPFOOTERLOGO=blank.gif
+AMPFOOTERLOGO=xorcom.png
# AMPADMINHREF: Defines the where a user is taken if they click on the footer logo
# This enables you to customize the look of the administration screen.
-AMPADMINHREF=amp.coalescentsystems.ca
+AMPADMINHREF=www.xorcom.com
# AMPEXTENSIONS: the type of view for extensions admin
# If set to 'deviceanduser' Devices and Users will be administered seperately, and Users will be able to "login" to devices.
Modified: freepbx/trunk/debian/rapid/freepbx-install-mysql.sh
===================================================================
--- freepbx/trunk/debian/rapid/freepbx-install-mysql.sh 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/rapid/freepbx-install-mysql.sh 2006-10-08 17:43:16 UTC (rev 2516)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>,
# Diego Iastrubni <diego.iastrubni at xorcom.com>
Modified: freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh
===================================================================
--- freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/rapid/freepbx-remove-sqlite.sh 2006-10-08 17:43:16 UTC (rev 2516)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>,
# Diego Iastrubni <diego.iastrubni at xorcom.com>
Added: freepbx/trunk/debian/rapid/mainstyle-alternative.css
===================================================================
--- freepbx/trunk/debian/rapid/mainstyle-alternative.css (rev 0)
+++ freepbx/trunk/debian/rapid/mainstyle-alternative.css 2006-10-08 17:43:16 UTC (rev 2516)
@@ -0,0 +1,266 @@
+body {
+ margin-top: 0px;
+ text-align:center;
+ margin-left: auto;
+ margin-right: auto;
+ width: 100%;
+ /*font-family: Geneva, Arial, Helvetica, sans-serif;*/
+ font-family: Verdana, Arial, Helvetica, Geneva, Swiss, SunSans-Regular;
+ font-size: 13px;
+}
+td {
+ font-size: 13px;
+}
+b {
+ color:#2f79a7;
+ font-weight:normal;
+}
+a {
+ color: red;
+ text-decoration : underline;
+}
+a:hover {
+ color: #ee9a47;
+}
+div#page {
+ margin-left: auto;
+ margin-right: auto;
+ width: 85%;
+ text-align:left;
+ padding-left: 20px;
+ padding-right: 20px;
+ /* border-left: 1px solid #B97054;
+ border-right: 1px solid #B97054;
+ border-bottom: 1px solid #B97054;*/
+}
+div.header {
+ height: 80px; /* img height (98px) + img margin */
+ text-align:right;
+ color: #ee9a47;
+}
+div.header a {
+ color: #858383;
+ text-decoration : none;
+ font-size:16px;
+ font-weight:bolder;
+}
+div.header a:hover {
+ color: #ee9a47;
+}
+a#current {
+ color: red;
+ font-weight:bold;
+}
+div.header img {
+ margin-top:10px;
+ margin-right:9px;
+ float:left;
+ border-style:none;
+ border-width:0;
+}
+div.header li {
+ line-height: 60px;
+ list-style-type: none;
+ list-style-position: outside;
+ text-align: left;
+ display: inline;
+ border-left: 1px solid red;
+ padding-top: 20px;
+ padding-left: 2px;
+ margin-left: -4px;
+ margin-right: 0px;
+ color: #2E78A7;
+ font-size:16px;
+ font-weight:bold;
+}
+div.message {
+ text-align:right;
+ border-bottom: 1px solid red;
+/* color:#A96046; */
+ color:red;
+ margin-top:-15px;
+ padding-bottom:5px;
+ padding-right: 5px;
+}
+
+div.nav {
+ float:left;
+ width:150px;
+ display: block;
+}
+div.nav a {
+ color: #ff6c61;
+ text-decoration : none;
+ display: block;
+ padding:5px;
+ border:1px solid #fff7f7;
+ background: #fff7f7;
+}
+div.nav a:hover {
+ color: black;
+ background: #ffa178;
+ border:1px solid #F2AF1D;
+}
+div.nav li{
+ list-style-type: none;
+ list-style-position: outside;
+ border-right: 1px solid red;
+ border-left: 1px solid red;
+ border-bottom: 1px solid red;
+}
+
+div.rnav {
+ display: block;
+ float:right;
+ width:175px;
+ margin-left:20px;
+}
+div.rnav a {
+ color: #ff6c61;
+ text-decoration : none;
+ display: block;
+ padding: 5px;
+ border:1px solid white;
+}
+div.rnav a:hover {
+ color: black;
+ background: #ffa178;
+ border:1px solid #F2AF1D;
+}
+div.rnav li{
+ list-style-type: none;
+ list-style-position: outside;
+ border-right: 1px solid red;
+ border-left: 1px solid red;
+ border-bottom: 1px solid red;
+}
+
+a.info{
+ position:relative; /*this is the key*/
+ z-index:24;
+ color:#000;
+ text-decoration:none;
+ border-bottom: 1px dotted red;
+ }
+
+a.info:hover{
+ z-index:25;
+ background-color:#ffa178;
+ }
+
+a.info span{
+ display: none;
+ }
+
+a.info:hover span{
+ display:block;
+ position:absolute;
+ top:2em;
+ left:-10em;
+ width:25em;
+ border:1px solid red;
+ background-color:#ffa178;
+ color:#000;
+ text-align:justify;
+ font-size:10px;
+ font-weight:normal;
+ padding:3px;
+ line-height:15px;
+ }
+a.info:hover b{
+ white-space:nowrap;
+ display:inline;
+ font-size:small;
+ }
+a.info:hover img{
+ float:none;
+ margin:5px;
+ vertical-align:middle;
+ border-style:none;
+ border-width:0;
+ }
+
+div.content {
+ margin-left:170px;
+ text-align:justify;
+}
+div.content img {
+ float:right;
+ margin-left: 20px;
+ margin-bottom: 5px;
+ border-style:none;
+ border-width:0;
+}
+div.content h2 {
+ white-space:nowrap;
+ color:#4f3e73;
+}
+div.content h3 {
+ color:#4f3e73;
+}
+div.content h4 {
+ color:#4f3e73;
+ font-size:16px;
+}
+div.content h5 {
+ color:#4f3e73;
+ font-size:12px;
+}
+div.content h6 {
+ text-align:right;
+ border-top:1px solid red;
+ margin-top:4px;
+ padding:6px;
+}
+div.content p {
+ color:#000000;
+ line-height:19px;
+}
+div.content input {
+ margin-left:10px;
+}
+
+span.footer {
+ margin-top: 10px;
+ border-top: 1px dotted red;
+ padding-top:5px;
+ display:block;
+ text-align:left;
+ font-size:xx-small;
+}
+
+span.footer img{
+ float:right;
+ vertical-align:bottom;
+ }
+
+div.home {
+ margin-left:20px;
+ text-align:left;
+}
+div.home img{
+ float:right;
+}
+div.home h4 {
+ font-weight:normal;
+}
+span.grey {
+ color:#959298;
+}
+span.tm {
+ font-size:small;
+ vertical-align:top;
+}
+div.inyourface a{
+ position:fixed;
+ display:block;
+ top:0px;
+ left:0px;
+ width:100%;
+ color:white;
+ background-color:red;
+ font-weight:bold;
+ text-align:center;
+ text-decoration:none;
+ border: 1px solid black;
+}
Modified: freepbx/trunk/debian/rules
===================================================================
--- freepbx/trunk/debian/rules 2006-10-08 17:30:55 UTC (rev 2515)
+++ freepbx/trunk/debian/rules 2006-10-08 17:43:16 UTC (rev 2516)
@@ -107,6 +107,12 @@
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
+
+# lintian does not handle this php4-cgi | php5-cgi now
+ mkdir -p debian/freepbx-admin/usr/share/lintian/overrides/
+ cp debian/lintian debian/freepbx-admin/usr/share/lintian/overrides/freepbx-admin
+ mkdir -p debian/freepbx-agi/usr/share/lintian/overrides/
+ cp debian/lintian debian/freepbx-agi/usr/share/lintian/overrides/freepbx-agi
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
More information about the Pkg-voip-commits
mailing list