From 97516b2a1370d2c4c229be3fd169f266d4f5cdb4 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: May 02 2013 01:08:07 +0000 Subject: new upstream release, adjust deps, patches and docs for upstream changes --- diff --git a/.gitignore b/.gitignore index de8aa70..3359f33 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ roundcubemail-0.3.1-dep.tar.gz /roundcubemail-0.8.4-dep.tar.gz /roundcubemail-0.8.5-dep.tar.gz /roundcubemail-0.8.6-dep.tar.gz +/roundcubemail-0.9.0-dep.tar.gz diff --git a/roundcubemail-0.4.1-confpath.patch b/roundcubemail-0.4.1-confpath.patch deleted file mode 100644 index 7311f96..0000000 --- a/roundcubemail-0.4.1-confpath.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- program/include/iniset.php~ 2010-09-29 05:04:09.000000000 -0500 -+++ program/include/iniset.php 2010-10-04 08:29:02.687967293 -0500 -@@ -46,7 +46,8 @@ - } - - if (!defined('RCMAIL_CONFIG_DIR')) { -- define('RCMAIL_CONFIG_DIR', INSTALL_PATH . 'config'); -+ #define('RCMAIL_CONFIG_DIR', INSTALL_PATH . 'config'); -+ define('RCMAIL_CONFIG_DIR', '/etc/roundcubemail'); - } - - // make sure path_separator is defined diff --git a/roundcubemail-0.7.1-strict.patch b/roundcubemail-0.7.1-strict.patch deleted file mode 100644 index 55eca3c..0000000 --- a/roundcubemail-0.7.1-strict.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- program/include/iniset.php~ 2012-02-16 09:26:48.000000000 -0600 -+++ program/include/iniset.php 2012-02-16 09:29:20.792947143 -0600 -@@ -66,7 +66,7 @@ - die("Fatal error: ini_set/set_include_path does not work."); - } - --ini_set('error_reporting', E_ALL&~E_NOTICE); -+ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT); - - // increase maximum execution time for php scripts - // (does not work in safe mode) diff --git a/roundcubemail-0.7.2-strict.patch b/roundcubemail-0.7.2-strict.patch deleted file mode 100644 index 615a905..0000000 --- a/roundcubemail-0.7.2-strict.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- program/include/iniset.php~ 2012-03-12 14:35:39.000000000 -0500 -+++ program/include/iniset.php 2012-03-12 14:39:50.253176744 -0500 -@@ -66,7 +66,7 @@ - die("Fatal error: ini_set/set_include_path does not work."); - } - --ini_set('error_reporting', E_ALL &~ (E_NOTICE | E_STRICT)); -+ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT); - - // increase maximum execution time for php scripts - // (does not work in safe mode) diff --git a/roundcubemail-0.7.3-xss-sig.patch b/roundcubemail-0.7.3-xss-sig.patch deleted file mode 100644 index dd01a01..0000000 --- a/roundcubemail-0.7.3-xss-sig.patch +++ /dev/null @@ -1,103 +0,0 @@ ---- program/steps/mail/compose.inc.orig 2012-08-15 11:44:45.000000000 -0500 -+++ program/steps/mail/compose.inc 2012-08-20 09:31:27.376369309 -0500 -@@ -520,7 +520,7 @@ - - function rcmail_compose_header_from($attrib) - { -- global $MESSAGE, $OUTPUT; -+ global $MESSAGE, $OUTPUT, $RCMAIL, $compose_mode; - - // pass the following attributes to the form class - $field_attrib = array('name' => '_from'); -@@ -531,6 +531,8 @@ - if (count($MESSAGE->identities)) - { - $a_signatures = array(); -+ $separator = $RCMAIL->config->get('sig_above') -+ && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD) ? '---' : '-- '; - - $field_attrib['onchange'] = JS_OBJECT_NAME.".change_identity(this)"; - $select_from = new html_select($field_attrib); -@@ -544,13 +546,26 @@ - // add signature to array - if (!empty($sql_arr['signature']) && empty($COMPOSE['param']['nosig'])) - { -- $a_signatures[$identity_id]['text'] = $sql_arr['signature']; -- $a_signatures[$identity_id]['is_html'] = ($sql_arr['html_signature'] == 1) ? true : false; -- if ($a_signatures[$identity_id]['is_html']) -- { -- $h2t = new html2text($a_signatures[$identity_id]['text'], false, false); -- $a_signatures[$identity_id]['plain_text'] = trim($h2t->get_text()); -+ $text = $html = $sql_arr['signature']; -+ if ($sql_arr['html_signature']) { -+ $h2t = new html2text($sql_arr['signature'], false, false); -+ $text = trim($h2t->get_text()); - } -+ else { -+ $html = htmlentities($html, ENT_NOQUOTES, RCMAIL_CHARSET); -+ } -+ -+ if (!preg_match('/^--[ -]\r?\n/m', $text)) { -+ $text = $separator . "\n" . $text; -+ $html = $separator . "
" . $html; -+ } -+ -+ if (!$sql_arr['html_signature']) { -+ $html = "
" . $html . "
"; -+ } -+ -+ $a_signatures[$identity_id]['text'] = $text; -+ $a_signatures[$identity_id]['html'] = $html; - } - } - ---- program/js/app.js.src~ 2012-08-15 11:44:45.000000000 -0500 -+++ program/js/app.js.src 2012-08-20 09:41:02.876568088 -0500 -@@ -3192,8 +3192,7 @@ - input_message = $("[name='_message']"), - message = input_message.val(), - is_html = ($("input[name='_is_html']").val() == '1'), -- sig = this.env.identity, -- sig_separator = this.env.sig_above && (this.env.compose_mode == 'reply' || this.env.compose_mode == 'forward') ? '---' : '-- '; -+ sig = this.env.identity; - - // enable manual signature insert - if (this.env.signatures && this.env.signatures[id]) { -@@ -3207,12 +3206,9 @@ - // remove the 'old' signature - if (show_sig && sig && this.env.signatures && this.env.signatures[sig]) { - -- sig = this.env.signatures[sig].is_html ? this.env.signatures[sig].plain_text : this.env.signatures[sig].text; -+ sig = this.env.signatures[sig].text; - sig = sig.replace(/\r\n/g, '\n'); - -- if (!sig.match(/^--[ -]\n/m)) -- sig = sig_separator + '\n' + sig; -- - p = this.env.sig_above ? message.indexOf(sig) : message.lastIndexOf(sig); - if (p >= 0) - message = message.substring(0, p) + message.substring(p+sig.length, message.length); -@@ -3288,21 +3284,8 @@ - } - } - -- if (this.env.signatures[id]) { -- if (this.env.signatures[id].is_html) { -- sig = this.env.signatures[id].text; -- if (!this.env.signatures[id].plain_text.match(/^--[ -]\r?\n/m)) -- sig = sig_separator + '
' + sig; -- } -- else { -- sig = this.env.signatures[id].text; -- if (!sig.match(/^--[ -]\r?\n/m)) -- sig = sig_separator + '\n' + sig; -- sig = '
' + sig + '
'; -- } -- -- sigElem.innerHTML = sig; -- } -+ if (this.env.signatures[id]) -+ sigElem.innerHTML = this.env.signatures[id].html; - } - - this.env.identity = id; diff --git a/roundcubemail-0.8.1-strict.patch b/roundcubemail-0.8.1-strict.patch deleted file mode 100644 index cb9ddd1..0000000 --- a/roundcubemail-0.8.1-strict.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- program/include/iniset.php~ 2012-08-20 10:19:53.000000000 -0500 -+++ program/include/iniset.php 2012-08-20 10:22:57.372357067 -0500 -@@ -24,7 +24,7 @@ - */ - - $config = array( -- 'error_reporting' => E_ALL &~ (E_NOTICE | E_STRICT), -+ 'error_reporting' => E_ALL & ~E_NOTICE & ~E_STRICT, - // Some users are not using Installer, so we'll check some - // critical PHP settings here. Only these, which doesn't provide - // an error/warning in the logs later. See (#1486307). diff --git a/roundcubemail-0.8.2-mdb2.patch b/roundcubemail-0.8.2-mdb2.patch deleted file mode 100644 index 51f823c..0000000 --- a/roundcubemail-0.8.2-mdb2.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 96f8436d77af05cf3c2d4f87970868221ddc6891 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Mon, 29 Oct 2012 09:22:33 +0100 -Subject: [PATCH] fix call to MDB2::isError for MDB2 2.5.0b4 - ---- - program/include/rcube_mdb2.php | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php -index 3d8891d..876ee02 100644 ---- a/program/include/rcube_mdb2.php -+++ b/program/include/rcube_mdb2.php -@@ -288,7 +288,7 @@ private function _query($query, $offset, $numrows, $params) - else { - $params = (array)$params; - $q = $this->db_handle->prepare($query, null, $mode=='w' ? MDB2_PREPARE_MANIP : null); -- if ($this->db_handle->isError($q)) { -+ if (MDB2::isError($q)) { - $this->db_error = true; - $this->db_error_msg = $q->userinfo; - -@@ -369,7 +369,7 @@ function insert_id($table = '') - - $id = $this->db_handle->lastInsertID($table); - -- return $this->db_handle->isError($id) ? null : $id; -+ return MDB2::isError($id) ? null : $id; - } - - --- -1.7.10 - diff --git a/roundcubemail-README.fedora b/roundcubemail-README.fedora index daefc43..667d495 100644 --- a/roundcubemail-README.fedora +++ b/roundcubemail-README.fedora @@ -1,24 +1,40 @@ Regarding database availability: -In addition to MySQL and PostgreSQL, upstream Roundcubemail includes support -for SQLite. This has been disabled in the Fedora version (for the time being) -because Roundcube requires the SQLite2-compatible mainline PHP SQLite extension. -This extension is unavailable in Fedora in favor of the SQLite3-compatible PDO -SQLite extension (php-pdo package). For this reason, we have disabled SQLite -support in Roundcube. If upstream releases a new version that supports the -PDO extension, or if SQLite2 support for PHP becomes available in Fedora, we -will re-enable SQLite support in Roundcubemail. +Prior to version 0.9.0, SQLite support was disabled in the Fedora package +because Roundcube required the SQLite2-compatible mainline PHP SQLite extension. +As of version 0.9.0, upstream Roundcube has switched to the PDO extension for +database support, and so SQLite support has been re-enabled in the Fedora +package. -Jon Ciesla -05/11/2007 +Jon Ciesla, Adam Williamson +2013-05-01 -Additional installation information: +Additional installation and update information: -In your installation process, you'll need to modify db.inc.php and main.inc.php. -In Fedora, these are located in /etc/roundcubemail. These will work in this location, -and should not be moved. They will not be modified at upgrade, so you may want to -check the .rpmnew files at that time so see if you need to migrate your settings to -the new file. +In your installation process, you'll need to modify db.inc.php and +main.inc.php. In Fedora, these are located in /etc/roundcubemail. These will +work in this location, and should not be moved. They will not be modified on +package updates, so you may want to check the .rpmnew files at that time to see +if you need to migrate your settings to the new file. Also, you should apply +changes to the database schema at this time. Each time upstream Roundcube +changes the database schema, they provide the appropriate commands in a .sql +file in /usr/share/doc/roundcubemail-0.9.0/SQL/(database) - there is one +directory each for MySQL, PostgreSQL and SQLite. The filenames reflect the date +on which the changes in that file were made upstream, and a comment in each +file notes which versions it applies to. So when Roundcube is updated, check +the appropriate directory for your database provider, and apply the appropriate +changes to your database. There is a PHP script that attempts to aid you with +this process located at /usr/share/roundcubemail/bin/updatedb.sh which you can +call if you can work out the necessary parameters. -Jon Ciesla -10/20/2009 +The Roundcube installer is not included in the Fedora package, as its method of +operation is not compatible with distribution packaging. As a consequence of +this, the /usr/share/roundcubemail/bin/update.sh script which upstream +documentation advises you to run on updates is not present in the Fedora +package: it depends on the installer framework. All this script does is to +check for configuration file and database schema updates as described above, +and walk you through applying them; so long as you follow the steps outlined +here on updates, you should be fine. + +Jon Ciesla, Adam Williamson +2013-05-01 diff --git a/roundcubemail-generate-tarball.sh b/roundcubemail-generate-tarball.sh deleted file mode 100644 index b09c040..0000000 --- a/roundcubemail-generate-tarball.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -tar -xzvf roundcubemail-0.1beta2.2.tar.gz - -rm -rf roundcubemail-0.1beta2/program/lib/Auth* -rm -rf roundcubemail-0.1beta2/program/lib/DB* -rm -rf roundcubemail-0.1beta2/program/lib/Mail* -rm -rf roundcubemail-0.1beta2/program/lib/Net* -rm -rf roundcubemail-0.1beta2/program/lib/PEAR.php - -tar -czvf roundcubemail-0.1beta2.2.tar.gz roundcubemail-0.1beta2 diff --git a/roundcubemail.spec b/roundcubemail.spec index cd3f93a..66788b9 100644 --- a/roundcubemail.spec +++ b/roundcubemail.spec @@ -1,7 +1,7 @@ %define roundcubedir %{_datadir}/roundcubemail %global _logdir /var/log Name: roundcubemail -Version: 0.8.6 +Version: 0.9.0 Release: 1%{?dist} Summary: Round Cube Webmail is a browser-based multilingual IMAP client @@ -12,29 +12,25 @@ Source0: http://downloads.sourceforge.net/roundcubemail/roundcubemail-%{version} Source1: roundcubemail.conf Source2: roundcubemail.logrotate Source4: roundcubemail-README.fedora -# https://github.com/roundcube/roundcubemail/pull/40 -#Patch1: %{name}-0.8.2-mdb2.patch -# Non-upstremable: Adjusts config path to Fedora policy -Patch6: roundcubemail-0.4.1-confpath.patch -Patch7: roundcubemail-0.8.1-strict.patch -#Patch8: roundcubemail-0.7.3-xss-sig.patch + +# Non-upstreamable: Adjusts config path to Fedora policy +Patch6: roundcubemail-0.9.0-confpath.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n) +Requires: php, httpd +Requires: php-fileinfo +Requires: php-mbstring +Requires: php-mcrypt +Requires: php-mysql +Requires: php-pdo Requires: php-pear-Auth-SASL -Requires: php-pear-DB +Requires: php-pear-Mail-mimeDecode Requires: php-pear-Mail-Mime +Requires: php-pear-Net-IDNA2 Requires: php-pear-Net-SMTP Requires: php-pear-Net-Socket -Requires: php, httpd -Requires: php-pear-Mail-mimeDecode -Requires: php-mcrypt -Requires: php-pear-MDB2 >= 2.5.0 -Requires: php-pear-MDB2-Driver-mysql -Requires: php-fileinfo Requires: php-xml -Requires: php-mbstring -Requires: php-pear-Net-IDNA2 %description RoundCube Webmail is a browser-based multilingual IMAP client @@ -42,16 +38,13 @@ with an application-like user interface. It provides full functionality you expect from an e-mail client, including MIME support, address book, folder manipulation, message searching and spell checking. RoundCube Webmail is written in PHP and -requires the MySQL database or the PostgreSQL database. The user -interface is fully skinnable using XHTML and CSS 2. +requires a database: MySQL, PostgreSQL and SQLite are known to +work. The user interface is fully skinnable using XHTML and +CSS 2. %prep %setup -q -n roundcubemail-%{version}-dep - -#%patch1 -p1 -%patch6 -p0 -%patch7 -p0 -#%patch8 -p0 +%patch6 -p1 # fix permissions and remove any .htaccess files find . -type f -print | xargs chmod a-x @@ -61,12 +54,8 @@ find . -name \.htaccess -print | xargs rm -f sed -i 's|temp/|${_tmppath}|' config/main.inc.php.dist sed -i 's|config/|%{_sysconfdir}/roundcubemail/|' config/main.inc.php.dist sed -i 's|logs/|%{_logdir}/roundcubemail/|' config/main.inc.php.dist -sed -i 's|logs/|%{_logdir}/roundcubemail/|' program/include/main.inc -sed -i 's|config/|%{_sysconfdir}/roundcubemail/|' program/include/main.inc -# remove any reference to sqlite in config file so people don't mistakely -# assume it works -sed -i '/sqlite/d' config/db.inc.php.dist +# ??? - Jon, this could do with a comment; fixing carriage returns? (adamw) sed -i 's/\r//' SQL/mssql.initial.sql %build @@ -84,7 +73,9 @@ cp -pr * %{buildroot}%{roundcubedir} #ln -s ../../../pear/Mail %{buildroot}%{roundcubedir}/program/lib/Mail #ln -s ../../../pear/Net %{buildroot}%{roundcubedir}/program/lib/Net +# drop the installer and the update.sh script which depends on it rm -rf %{buildroot}%{roundcubedir}/installer +rm -f %{buildroot}%{roundcubedir}/bin/update.sh mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d cp -pr %SOURCE1 %{buildroot}%{_sysconfdir}/httpd/conf.d @@ -143,6 +134,17 @@ exit 0 %config(noreplace) %{_sysconfdir}/logrotate.d/roundcubemail %changelog +* Wed May 01 2013 Adam Williamson - 0.9.0-1 +- latest upstream +- drop MDB2 dependencies, add php-pdo dependency (upstream now using + pdo not MDB2) +- drop the update.sh script as it requires the installer framework we + don't ship +- update the Fedora README for changes to sqlite and update process +- drop strict.patch, upstream actually merged it years ago, just in + a slightly different format, and we kept dumbly diffing it +- drop references to obsolete patches (all merged upstream long ago) + * Thu Mar 28 2013 Jon Ciesla - 0.8.6-1 - Latest upstream, fixes local file inclusion via web UI - modification of certain config options. diff --git a/sources b/sources index e4641ec..f160d0a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9cc70724166b8e8af982f8e5591a8971 roundcubemail-0.8.6-dep.tar.gz +88caf2c0bf12c875661c5e223300b405 roundcubemail-0.9.0-dep.tar.gz