Index: /misc/deb/trunk/debian/patches/disable-online-updates.dpatch =================================================================== --- /misc/deb/trunk/debian/patches/disable-online-updates.dpatch (revision 3550) +++ /misc/deb/trunk/debian/patches/disable-online-updates.dpatch (revision 3556) @@ -2,6 +2,5 @@ ## disable-online-updates.dpatch by Diego Iastrubni ## -## DP: Disable online updates, unless user specifies a special hidden -## DP: configuration in amportal.conf +## RT: Disable package management @DPATCH@ @@ -9,220 +8,17 @@ --- freepbx-2.1.3.dfsg~/amp_conf/htdocs/admin/page.modules.php 2006-09-21 06:04:12.000000000 +0300 +++ freepbx-2.1.3.dfsg/amp_conf/htdocs/admin/page.modules.php 2006-09-28 17:34:48.000000000 +0300 -@@ -5,6 +5,15 @@ - - $installed = find_allmodules(); - -+if (isset($amp_conf["AMP_ONLINE_UPDATE"])) { -+ $packager_mode = (strtolower($amp_conf["AMP_ONLINE_UPDATE"]) == "true" ); -+} -+else{ -+ $packager_mode = true; -+} -+ -+ -+ - function pageReload(){ - return ""; - //return ""; -@@ -18,12 +27,11 @@ - installModule($module,$_POST[$module.'_version']); - else - echo "
"._("Module install script failed to run")."
"; -- break; -- case "uninstall": -- if (runModuleSQL($module,'uninstall')) -- uninstallModule($module); -- else -- echo "
"._("Module uninstall script failed to run")."
"; -+ break; -+ if (runModuleSQL($module,'uninstall')) -+ uninstallModule($module); -+ else -+ echo "
"._("Module uninstall script failed to run")."
"; - break; - case "enable": - enableModule($module); -@@ -34,12 +42,22 @@ - echo pageReload(); - break; - case "delete": -+ if ($packager_mode){ -+ echo "
" . _("Deleting modules is not supported on packager mode.") . _("Use your distribution packaging system for manipulating modules.") . "
"; -+ break; -+ } -+ - deleteModule($module); - rmModule($module); -- break; -+ break; - case "download": -+ if ($packager_mode){ -+ echo "
" . _("Downloading modules is not supported on packager mode."); -+ echo _("Use your distribution packaging system for manipulating modules.") . "
"; -+ break; -+ } - fetchModule($module); -- break; -+ break; - case "upgrade": - upgradeModule($module); - break; -@@ -62,6 +80,12 @@ - } - break; - case "downloadinstall": // download, install and enable -+ if ($packager_mode){ -+ echo "
" . _("Downloading not supported on packager mode.") . -+ _("Use your distribution packaging system for manipulating modules.") . "
"; -+ break; -+ } -+ - fetchModule($module); - if (runModuleSQL($module,'install')) - installModule($module,$_POST[$module.'_version']); -@@ -70,6 +94,11 @@ - enableModule($module); - break; - case "downloadupdate": //download and update -+ if ($packager_mode){ -+ echo "
" . _("Downloading not supported on packager mode.") . -+ _("Use your distribution packaging system for manipulating modules.") . "
"; -+ break; -+ } - fetchModule($module); - upgradeModule($module); - break; -@@ -98,6 +127,15 @@ - "; -+ echo _("Module Administration (online)"); -+ echo ""; -+ echo _("This feature has been disabled in this version of FreePBX."); -+ echo _("Use your distribution packaging system for manipulating modules."); -+ } -+ - echo "

"; - echo _("Module Administration (online)"); - echo "

"; -@@ -123,7 +161,8 @@ - echo "

"; - echo _("Module Administration"); - echo "

"; -- echo ""._("Connect to Online Module Repository")."\n"; -+ if (!$packager_mode) -+ echo ""._("Connect to Online Module Repository")."\n"; - $installed = find_allmodules(); - $dispMods = new displayModules($installed); - echo $dispMods->drawModules(); -@@ -144,6 +183,7 @@ - var $html; - //constructor - function displayModules($installed,$online=false) { -+ global $packager_mode; - // So, we have an array with several: - /* - [phpinfo] => Array -@@ -294,14 +334,26 @@ - $color = "white"; - $rows .= $this->tableHtml($mod,$color); - } -- $this->options = " -- -- -- "; -+ -+ if ($packager_mode){ -+ $this->options = " -+ -+ -+ "; -+ } -+ else { -+ $this->options = " -+ -+ -+ "; -+ } - // build the table - $this->html .= $this->formStart(_("Enabled Modules")); - $this->html .= $rows; -@@ -317,14 +369,24 @@ - $color = "white"; - $rows .= $this->tableHtml($mod,$color); - } -- $this->options = " -- -- -- "; -+ -+ if ($packager_mode) -+ $this->options = " -+ -+ -+ "; -+ else -+ $this->options = " -+ -+ -+ "; - // build the table - $this->html .= $this->formStart(_("Disabled Modules")); - $this->html .= $rows; -@@ -340,13 +402,24 @@ - $color = "white"; - $rows .= $this->tableHtml($mod,$color); - } -- $this->options = " -- -- -- "; -+ -+ if ($packager_mode){ -+ $this->options = " -+ -+ -+ "; -+ } -+ else { -+ $this->options = " -+ -+ -+ "; -+ } - // build the table - $this->html .= $this->formStart(_("Not Installed Local Modules")); - $this->html .= $rows; +@@ -6,12 +6,8 @@ + * Optionally, the other way is to remove the below lines, and instead just define + * EXTERNAL_PACKAGE_MANAGEMENT as 1. This prevents changing the setting from amportal.conf. + */ +-if (!isset($amp_conf['AMPEXTERNPACKAGES']) || ($amp_conf['AMPEXTERNPACKAGES'] != 'true')) { +- define('EXTERNAL_PACKAGE_MANAGEMENT', 0); +-} else { +- define('EXTERNAL_PACKAGE_MANAGEMENT', 1); +-} + ++define('EXTERNAL_PACKAGE_MANAGEMENT', 0); + + $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:''; + // can't go online if external management is on + Index: /misc/deb/trunk/debian/patches/00list =================================================================== --- /misc/deb/trunk/debian/patches/00list (revision 3550) +++ /misc/deb/trunk/debian/patches/00list (revision 3556) @@ -4,8 +4,4 @@ disable-online-updates fix-retrieve-op-panel-cfg -fix-fop-config.dpatch -fix-version-2.1.3 -fix-open-or-die -fix-recordings fix-toplinks fix-index-php Index: /sc/deb/trunk/debian/patches/fix-recordings.dpatch =================================================================== --- /misc/deb/trunk/debian/patches/fix-recordings.dpatch (revision 3550) +++ (revision ) @@ -1,24 +1,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## fix-recordings.dpatch by Diego Iastrubni -## -## DP: temporary calls should not be saved in /tmp, but in the sounds dir. This way -## DP: we can rename them to the correct names in an atomic command - -@DPATCH@ -diff -urNad freepbx-2.1.3.dfsg/amp_conf/astetc/extensions.conf /tmp/dpep.c51xrf/freepbx-2.1.3.dfsg/amp_conf/astetc/extensions.conf ---- freepbx-2.1.3.dfsg/amp_conf/astetc/extensions.conf 2006-11-26 15:15:22.000000000 +0200 -+++ /tmp/dpep.c51xrf/freepbx-2.1.3.dfsg/amp_conf/astetc/extensions.conf 2006-11-26 15:17:11.000000000 +0200 -@@ -543,11 +543,11 @@ - [macro-systemrecording] - exten => s,1,Goto(${ARG1},1) - --exten => dorecord,1,Record(/tmp/${CALLERID(number)}-ivrrecording:wav) -+exten => dorecord,1,Record(custom/ivr-tmp-${CALLERID(number)}-ivrrecording:wav) - exten => dorecord,n,Wait(1) - exten => dorecord,n,Goto(confmenu,1) - --exten => docheck,1,Playback(/tmp/${CALLERID(number)}-ivrrecording) -+exten => docheck,1,Playback(custom/ivr-tmp-${CALLERID(number)}-ivrrecording) - exten => docheck,n,Wait(1) - exten => docheck,n,Goto(confmenu,1) - Index: /sc/deb/trunk/debian/patches/fix-open-or-die.dpatch =================================================================== --- /misc/deb/trunk/debian/patches/fix-open-or-die.dpatch (revision 3550) +++ (revision ) @@ -1,132 +1,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## fix-open-or-die.dpatch by Diego Iastrubni -## -## DP: Fix some perl syntax issues. - -@DPATCH@ -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/ampbackup.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/ampbackup.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/ampbackup.pl 2005-06-10 21:33:43.000000000 +0300 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/ampbackup.pl 2006-11-26 12:03:32.000000000 +0200 -@@ -52,7 +52,7 @@ - # the name of the database our tables are kept - $database = "asterisk"; - --open(FILE, "/etc/amportal.conf") || die "Failed to open amportal.conf\n"; -+open(FILE, "/etc/amportal.conf") || die "Failed to open amportal.conf (!$)\n"; - while () { - chomp; # no newline - s/#.*//; # no comments -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/fax-process.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/fax-process.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/fax-process.pl 2006-06-09 01:23:09.000000000 +0300 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/fax-process.pl 2006-11-26 12:03:57.000000000 +0200 -@@ -74,7 +74,7 @@ - # Lets make sure that we know about a file... - die $usage unless $file; - # and that the file exists... --open FILE, $file or die "Error opening $file: $!"; -+open (FILE, $file) or die "Error opening $file: $!"; - # Oh, did we possibly not specify an attachment name? - $attachment = $file unless ($attachment); - -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_backup_cron_from_mysql.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_backup_cron_from_mysql.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_backup_cron_from_mysql.pl 2006-09-11 05:56:34.000000000 +0300 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_backup_cron_from_mysql.pl 2006-11-26 12:01:52.000000000 +0200 -@@ -40,7 +40,7 @@ - $hostname = $ampconf->{"AMPDBHOST"}; - - ################### END OF CONFIGURATION ####################### --open(FILE, "/etc/amportal.conf") || die "Failed to open amportal.conf\n"; -+open(FILE, "/etc/amportal.conf") or die "Failed to open amportal.conf (!$)\n"; - while () { - chomp; # no newline - s/#.*//; # no comments -@@ -58,7 +58,7 @@ - $password = $User_Preferences{"AMPDBPASS"}; - - --open EXTEN, ">$Backup_cron" or die "Cannot create\/overwrite cron file: $Backup_cron\n"; -+open EXTEN, ">$Backup_cron" or die "Cannot create\/overwrite cron file: $Backup_cron (!$)\n"; - - $dbh = DBI->connect("dbi:mysql:dbname=$database;host=$hostname", "$username", "$password"); - -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_iax_conf_from_mysql.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_iax_conf_from_mysql.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_iax_conf_from_mysql.pl 2006-04-25 23:40:47.000000000 +0300 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_iax_conf_from_mysql.pl 2006-11-26 12:04:34.000000000 +0200 -@@ -67,7 +67,7 @@ - exit; - } - --open EXTEN, ">$iax_conf" or die "Cannot create/overwrite extensions file: $iax_conf\n"; -+open (EXTEN, ">$iax_conf") or die "Cannot create/overwrite extensions file: $iax_conf (!$)\n"; - $additional = ""; - my @resultSet = @{$result}; - if ( $#resultSet > -1 ) { -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_op_conf_from_mysql.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_op_conf_from_mysql.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_op_conf_from_mysql.pl 2006-11-26 12:00:17.000000000 +0200 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_op_conf_from_mysql.pl 2006-11-26 12:02:21.000000000 +0200 -@@ -53,7 +53,7 @@ - - $zaplabel="Zap \%c"; - $lastlabelnum=0; -- open ZAPATA, "<$conffile" || die "Cannot open config file: $zapataconf\n"; -+ open( ZAPATA, "<$conffile" ) or die "Cannot open config file: $zapataconf (!$)\n"; - while( $line = ) { - next if $line =~ /^(\s)*$/; - chomp($line); -@@ -143,7 +143,7 @@ - $dbh = DBI->connect("dbi:SQLite2:dbname=$db_file","",""); - } - --open EXTEN, ">$op_conf" || die "Cannot create/overwrite config file: $op_conf\n"; -+open( EXTEN, ">$op_conf" ) or die "Cannot create/overwrite config file: $op_conf (!$)\n"; - - #First, populate extensions - -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_parse_amportal_conf.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_parse_amportal_conf.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_parse_amportal_conf.pl 2006-02-17 00:40:17.000000000 +0200 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_parse_amportal_conf.pl 2006-11-26 12:00:17.000000000 +0200 -@@ -11,7 +11,7 @@ - my $filename = $_[0]; - my %ampconf; - -- open(AMPCONF, $filename) || die "Cannot open $filename"; -+ open(AMPCONF, $filename) or die "Cannot open $filename (!$)"; - - while () - { -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_queues_conf_from_mysql.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_queues_conf_from_mysql.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_queues_conf_from_mysql.pl 2006-03-06 17:07:41.000000000 +0200 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_queues_conf_from_mysql.pl 2006-11-26 12:02:43.000000000 +0200 -@@ -62,7 +62,7 @@ - exit; - } - --open EXTEN, ">$queues_conf" or die "Cannot create/overwrite extensions file: $queues_conf\n"; -+open EXTEN, ">$queues_conf" or die "Cannot create/overwrite extensions file: $queues_conf (!$)\n"; - $additional = ""; - my @resultSet = @{$result}; - if ( $#resultSet > -1 ) { -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_sip_conf_from_mysql.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_sip_conf_from_mysql.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_sip_conf_from_mysql.pl 2006-04-25 23:40:47.000000000 +0300 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_sip_conf_from_mysql.pl 2006-11-26 12:02:54.000000000 +0200 -@@ -66,7 +66,7 @@ - exit; - } - --open EXTEN, ">$sip_conf" or die "Cannot create/overwrite extensions file: $sip_conf\n"; -+open EXTEN, ">$sip_conf" or die "Cannot create/overwrite extensions file: $sip_conf (!$)\n"; - $additional = ""; - my @resultSet = @{$result}; - if ( $#resultSet > -1 ) { -diff -urNad freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_zap_conf_from_mysql.pl /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_zap_conf_from_mysql.pl ---- freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_zap_conf_from_mysql.pl 2006-04-25 23:40:47.000000000 +0300 -+++ /tmp/dpep.hkL9wn/freepbx-2.1.3.dfsg/amp_conf/bin/retrieve_zap_conf_from_mysql.pl 2006-11-26 12:03:13.000000000 +0200 -@@ -66,7 +66,7 @@ - exit; - } - --open EXTEN, ">$zap_conf" or die "Cannot create/overwrite extensions file: $zap_conf\n"; -+open EXTEN, ">$zap_conf" or die "Cannot create/overwrite extensions file: $zap_conf ($!)\n"; - $additional = ""; - my @resultSet = @{$result}; - if ( $#resultSet > -1 ) { Index: /sc/deb/trunk/debian/patches/fix-version-2.1.3.dpatch =================================================================== --- /misc/deb/trunk/debian/patches/fix-version-2.1.3.dpatch (revision 3550) +++ (revision ) @@ -1,49 +1,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## fix-version-2.1.3.dpatch by Diego Iastrubni -## -## DP: Fix tarball contains a bug which identifies this verison as 2.1.2 and not -## DP: 2.1.3. This fixes it, and also makes an update for installed versions. - -@DPATCH@ -diff -urNad freepbx-2.1.3.dfsg/install_amp /tmp/dpep.2WVQnT/freepbx-2.1.3.dfsg/install_amp ---- freepbx-2.1.3.dfsg/install_amp 2006-11-26 12:30:45.000000000 +0200 -+++ /tmp/dpep.2WVQnT/freepbx-2.1.3.dfsg/install_amp 2006-11-26 12:30:58.000000000 +0200 -@@ -30,7 +30,8 @@ - '2.1beta3', - '2.1.0', - '2.1.1', -- '2.1.2' -+ '2.1.2', -+ '2.1.3' - ); - - define("AMP_CONF", "/etc/amportal.conf"); -diff -urNad freepbx-2.1.3.dfsg/SQL/newinstall.sql /tmp/dpep.2WVQnT/freepbx-2.1.3.dfsg/SQL/newinstall.sql ---- freepbx-2.1.3.dfsg/SQL/newinstall.sql 2006-09-26 01:43:11.000000000 +0300 -+++ /tmp/dpep.2WVQnT/freepbx-2.1.3.dfsg/SQL/newinstall.sql 2006-11-26 12:30:45.000000000 +0200 -@@ -64,7 +64,7 @@ - - /*!40000 ALTER TABLE `admin` DISABLE KEYS */; - LOCK TABLES `admin` WRITE; --INSERT INTO `admin` VALUES ('need_reload','true'),('version','2.1.2'); -+INSERT INTO `admin` VALUES ('need_reload','true'),('version','2.1.3'); - UNLOCK TABLES; - /*!40000 ALTER TABLE `admin` ENABLE KEYS */; - -diff -urNad freepbx-2.1.3.dfsg/SQL/newinstall.sqlite.sql /tmp/dpep.2WVQnT/freepbx-2.1.3.dfsg/SQL/newinstall.sqlite.sql ---- freepbx-2.1.3.dfsg/SQL/newinstall.sqlite.sql 2006-04-26 23:52:54.000000000 +0300 -+++ /tmp/dpep.2WVQnT/freepbx-2.1.3.dfsg/SQL/newinstall.sqlite.sql 2006-11-26 12:30:45.000000000 +0200 -@@ -27,7 +27,7 @@ - -- - - INSERT INTO admin VALUES ('need_reload', 'false'); --INSERT INTO admin VALUES ('version','2.0.0'); -+INSERT INTO admin VALUES ('version','2.1.3'); - -- -------------------------------------------------------- - - -- -diff -urNad freepbx-2.1.3.dfsg/upgrades/2.1.3/fix-version.sql /tmp/dpep.2WVQnT/freepbx-2.1.3.dfsg/upgrades/2.1.3/fix-version.sql ---- freepbx-2.1.3.dfsg/upgrades/2.1.3/fix-version.sql 1970-01-01 02:00:00.000000000 +0200 -+++ /tmp/dpep.2WVQnT/freepbx-2.1.3.dfsg/upgrades/2.1.3/fix-version.sql 2006-11-26 12:30:45.000000000 +0200 -@@ -0,0 +1 @@ -+UPDATE admin SET value = '2.1.3' WHERE variable = 'version' Index: /sc/deb/trunk/debian/patches/fix-fop-config.dpatch =================================================================== --- /misc/deb/trunk/debian/patches/fix-fop-config.dpatch (revision 3550) +++ (revision ) @@ -1,55 +1,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## fix-fop-config.dpatch by Diego Iastrubni -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: The default configuration of op-panel is just useless. Lets fix it -## DP: before it gets into the package: -## DP: - if no web_hostname is set, it will be automatically detected -## DP: - flash_dir should be the place on the HD. it looks for variables.txt in that dir -## DP: TODO: should be modified to "/var/lib/op-panel/" -## DP: - use a sane default password for the UI -## DP: - use a default passwords for the manager - - -@DPATCH@ -diff -urNad freepbx-2.1.1/amp_conf/htdocs_panel/op_server.cfg /tmp/dpep.U4TyWY/freepbx-2.1.1/amp_conf/htdocs_panel/op_server.cfg ---- freepbx-2.1.1/amp_conf/htdocs_panel/op_server.cfg 2006-05-13 09:01:22.000000000 +0300 -+++ /tmp/dpep.U4TyWY/freepbx-2.1.1/amp_conf/htdocs_panel/op_server.cfg 2006-08-16 17:12:42.000000000 +0300 -@@ -3,8 +3,8 @@ - manager_host=127.0.0.1 - - ; user and secret for connecting to * manager --manager_user=user --manager_secret=secret -+manager_user=op-panel -+manager_secret=op_panel_password - - ; The optional event_mask for filtering manager events. - ; Asterisk will send only the events you request -@@ -31,14 +31,14 @@ - ; the flash movie resides (just the hostname, without directories) - ; This value might be omited. In that case the flash movie will - ; try to connect to the same host as the web page. --web_hostname=www.myexample.com -+web_hostname= - - ; location of the .swf file in your disk (must reside somewhere - ; inside your web root) --flash_dir=/var/www/html/panel -+flash_dir=/usr/share/op-panel/flash/ - - ; secret code for performing hangups and transfers --security_code=dkd4393kld -+security_code=password - - ; Frequency in second to poll for sip and iax status - poll_interval=120 -@@ -170,7 +170,7 @@ - ; extension@context, it will originate a call to - ; voicemailmain when double clicking on the MWI icon - ; for any button. --voicemail_extension = 3000@features -+;# voicemail_extension = 3000@features - - ; You can have panel contexts with their own - ; button layout and configuration. The following entry