diff options
| author | Remi Collet <fedora@famillecollet.com> | 2014-05-08 09:25:50 +0200 | 
|---|---|---|
| committer | Remi Collet <fedora@famillecollet.com> | 2014-05-08 09:25:50 +0200 | 
| commit | 696a7e36a619d8e5dde7bed754105e2a2ea6f5e2 (patch) | |
| tree | ab129f3c6b70343b3f967e5d1d2e81d388bf989f | |
| parent | fb17e51374cd649a5b0f1541da99e19d95f3c170 (diff) | |
roundcubemail: 1.0.0
| -rw-r--r-- | roundcubemail-0.9.0-confpath.patch | 23 | ||||
| -rw-r--r-- | roundcubemail-1.0.0-confpath.patch | 61 | ||||
| -rw-r--r-- | roundcubemail-README.fedora | 40 | ||||
| -rw-r--r-- | roundcubemail-README.rpm | 32 | ||||
| -rw-r--r-- | roundcubemail.conf | 30 | ||||
| -rw-r--r-- | roundcubemail.spec | 102 | 
6 files changed, 171 insertions, 117 deletions
diff --git a/roundcubemail-0.9.0-confpath.patch b/roundcubemail-0.9.0-confpath.patch deleted file mode 100644 index d86a26d..0000000 --- a/roundcubemail-0.9.0-confpath.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- roundcubemail-0.9.0-dep/program/include/iniset.php	2013-04-15 13:43:00.000000000 -0700 -+++ roundcubemail-0.9.0-dep/program/include/iniset.php.new	2013-05-01 16:59:49.434415736 -0700 -@@ -44,7 +44,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'); - } -  - if (!defined('RCUBE_LOCALIZATION_DIR')) { ---- roundcubemail-0.9.0-dep/program/lib/Roundcube/bootstrap.php	2013-04-15 13:43:01.000000000 -0700 -+++ roundcubemail-0.9.0-dep/program/lib/Roundcube/bootstrap.php.new	2013-05-01 17:13:34.657216045 -0700 -@@ -64,7 +64,7 @@ - } -  - if (!defined('RCUBE_CONFIG_DIR')) { --    define('RCUBE_CONFIG_DIR', RCUBE_INSTALL_PATH . 'config/'); -+    define('RCUBE_CONFIG_DIR', '/etc/roundcubemail'); - } -  - if (!defined('RCUBE_PLUGINS_DIR')) { diff --git a/roundcubemail-1.0.0-confpath.patch b/roundcubemail-1.0.0-confpath.patch new file mode 100644 index 0000000..a801c7c --- /dev/null +++ b/roundcubemail-1.0.0-confpath.patch @@ -0,0 +1,61 @@ +diff -up roundcubemail-1.0.0-dep/config/defaults.inc.php.rpm roundcubemail-1.0.0-dep/config/defaults.inc.php +--- roundcubemail-1.0.0-dep/config/defaults.inc.php.rpm	2014-05-08 08:36:47.000000000 +0200 ++++ roundcubemail-1.0.0-dep/config/defaults.inc.php	2014-05-08 08:38:00.000000000 +0200 +@@ -293,10 +293,10 @@ $config['user_aliases'] = false; +  + // use this folder to store log files (must be writeable for apache user) + // This is used by the 'file' log driver. +-$config['log_dir'] = RCUBE_INSTALL_PATH . 'logs/'; ++$config['log_dir'] = '/var/log/roundcubemail/'; +  + // use this folder to store temp files (must be writeable for apache user) +-$config['temp_dir'] = RCUBE_INSTALL_PATH . 'temp/'; ++$config['temp_dir'] = '/var/lib/roundcubemail/'; +  + // expire files in temp_dir after 48 hours + // possible units: s, m, h, d, w +diff -up roundcubemail-1.0.0-dep/installer/index.php.rpm roundcubemail-1.0.0-dep/installer/index.php +--- roundcubemail-1.0.0-dep/installer/index.php.rpm	2014-05-08 08:30:02.000000000 +0200 ++++ roundcubemail-1.0.0-dep/installer/index.php	2014-05-08 08:30:46.000000000 +0200 +@@ -41,7 +41,7 @@ ini_set('display_errors', 1); +  + define('INSTALL_PATH', realpath(dirname(__FILE__) . '/../').'/'); + define('RCUBE_INSTALL_PATH', INSTALL_PATH); +-define('RCUBE_CONFIG_DIR', INSTALL_PATH . 'config/'); ++define('RCUBE_CONFIG_DIR', '/etc/roundcubemail/'); +  + $include_path  = INSTALL_PATH . 'program/lib' . PATH_SEPARATOR; + $include_path .= INSTALL_PATH . 'program/include' . PATH_SEPARATOR; +diff -up roundcubemail-1.0.0-dep/program/include/iniset.php.rpm roundcubemail-1.0.0-dep/program/include/iniset.php +--- roundcubemail-1.0.0-dep/program/include/iniset.php.rpm	2014-05-08 08:32:16.000000000 +0200 ++++ roundcubemail-1.0.0-dep/program/include/iniset.php	2014-05-08 08:34:39.000000000 +0200 +@@ -29,7 +29,7 @@ if (!defined('INSTALL_PATH')) { + } +  + if (!defined('RCMAIL_CONFIG_DIR')) { +-    define('RCMAIL_CONFIG_DIR', INSTALL_PATH . 'config'); ++    define('RCMAIL_CONFIG_DIR', '/etc/roundcubemail'); + } +  + if (!defined('RCUBE_LOCALIZATION_DIR')) { +@@ -37,7 +37,7 @@ if (!defined('RCUBE_LOCALIZATION_DIR')) + } +  + define('RCUBE_INSTALL_PATH', INSTALL_PATH); +-define('RCUBE_CONFIG_DIR',  RCMAIL_CONFIG_DIR.'/'); ++define('RCUBE_CONFIG_DIR', '/etc/roundcubemail/'); +  +  + // RC include folders MUST be included FIRST to avoid other +diff -up roundcubemail-1.0.0-dep/program/lib/Roundcube/bootstrap.php.rpm roundcubemail-1.0.0-dep/program/lib/Roundcube/bootstrap.php +--- roundcubemail-1.0.0-dep/program/lib/Roundcube/bootstrap.php.rpm	2014-05-08 08:31:15.000000000 +0200 ++++ roundcubemail-1.0.0-dep/program/lib/Roundcube/bootstrap.php	2014-05-08 08:31:58.000000000 +0200 +@@ -66,7 +66,7 @@ if (!defined('RCUBE_INSTALL_PATH')) { + } +  + if (!defined('RCUBE_CONFIG_DIR')) { +-    define('RCUBE_CONFIG_DIR', RCUBE_INSTALL_PATH . 'config/'); ++    define('RCUBE_CONFIG_DIR', '/etc/roundcubemail/'); + } +  + if (!defined('RCUBE_PLUGINS_DIR')) { diff --git a/roundcubemail-README.fedora b/roundcubemail-README.fedora deleted file mode 100644 index 667d495..0000000 --- a/roundcubemail-README.fedora +++ /dev/null @@ -1,40 +0,0 @@ -Regarding database availability: - -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, Adam Williamson -2013-05-01 - -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 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. - -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-README.rpm b/roundcubemail-README.rpm new file mode 100644 index 0000000..b57cc83 --- /dev/null +++ b/roundcubemail-README.rpm @@ -0,0 +1,32 @@ +Additional installation and update information: + +Upstream documentation: http://trac.roundcube.net/wiki + +Notice +- temporary files are stored in /var/lib/roundcubemail +- logs files are stored in /var/log/roundcubemail +- configuration files are stored in /etc/roundcubemail + +As those directories are not served by the web server, +there is no need to protect them. + + + +The installer is available at http://localhost/roundcubemail/installer + +Access is only authorized from the server, locally. +You can enlarge access for installation, but remember to secure it +again once configured (upstream recommend to drop the directory). + +The Wemail is available at http://localhost/roundcubemail + +You can enlarde permission once configured. + +Set /etc/httpd/conf.d/roundcubemail.conf + + +WARNING: when upgrading from < 1.0 the old configuration files named main.inc.php +and db.inc.php are now deprecated and should be replaced with one single config.inc.php file. +Run the ./bin/update.sh script to get this conversion done or manually merge the files. + +NOTE: the new config.inc.php should only contain options that differ from the ones listed in defaults.inc.php. diff --git a/roundcubemail.conf b/roundcubemail.conf index 5911949..5b67c20 100644 --- a/roundcubemail.conf +++ b/roundcubemail.conf @@ -4,6 +4,9 @@  Alias /roundcubemail /usr/share/roundcubemail +# Define who can access the Webmail +# You can enlarge permissions once configured +  <Directory /usr/share/roundcubemail/>      <IfModule mod_authz_core.c>          # Apache 2.4 @@ -17,3 +20,30 @@ Alias /roundcubemail /usr/share/roundcubemail          Allow from ::1      </IfModule>  </Directory> + +# Define who can access the installer +# keep this secured once configured + +<Directory /usr/share/roundcubemail/installer/> +    <IfModule mod_authz_core.c> +        # Apache 2.4 +        Require local +    </IfModule> +    <IfModule !mod_authz_core.c> +        # Apache 2.2 +        Order Deny,Allow +        Deny from all +        Allow from 127.0.0.1 +        Allow from ::1 +    </IfModule> +</Directory> + +# Those directories should not be viewed by Web clients. +<Directory /usr/share/roundcubemail/bin/> +    Order Allow,Deny +    Deny from all +</Directory> +<Directory /usr/share/roundcubemail/plugins/enigma/home/> +    Order Allow,Deny +    Deny from all +</Directory> diff --git a/roundcubemail.spec b/roundcubemail.spec index 4ff94a4..a408af1 100644 --- a/roundcubemail.spec +++ b/roundcubemail.spec @@ -1,11 +1,11 @@  %define roundcubedir %{_datadir}/roundcubemail  %global _logdir /var/log    Name: roundcubemail -Version:  0.9.5 +Version:  1.0.0  Release:  1%{?dist}  Summary: Round Cube Webmail is a browser-based multilingual IMAP client -Group: Applications/System          +Group: Applications/System  # Since 0.8 beta, the main code has been GPLv3+ with exceptions and  # skins CC-BY-SA.  # Plugins are a mix of GPLv3+ and GPLv2. The Enigma plugin contains a @@ -22,13 +22,13 @@ URL: http://www.roundcube.net  Source0: http://downloads.sourceforge.net/roundcubemail/roundcubemail-%{version}-dep.tar.gz  Source1: roundcubemail.conf  Source2: roundcubemail.logrotate -Source4: roundcubemail-README.fedora +Source4: roundcubemail-README.rpm  # Elegantly handle removal of moxieplayer Flash binary in tinymce  # media plugin (see "Drop precompiled flash" in %pre)  Patch0: roundcubemail-0.9.3-no_swf.patch  # Non-upstreamable: Adjusts config path to Fedora policy -Patch6: roundcubemail-0.9.0-confpath.patch +Patch1: roundcubemail-1.0.0-confpath.patch  BuildArch: noarch  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n) @@ -56,12 +56,14 @@ Requires: php-simplexml  Requires: php-sockets  Requires: php-spl  Requires: php-xml -Requires: php-pear(Auth_SASL) -Requires: php-pear(Mail_Mime) +Requires: php-pear(Auth_SASL)       >= 1.0.6 +Requires: php-pear(Mail_Mime)       >= 1.8.1  Requires: php-pear(Net_SMTP) -Requires: php-pear(Net_Socket) -Requires: php-pear(Mail_mimeDecode) -Requires: php-pear(Net_IDNA2) +Requires: php-pear(Net_Sieve)       >= 1.3.2 +Requires: php-pear(Mail_mimeDecode) >= 1.5.5 +Requires: php-pear(Net_IDNA2)       >= 0.1.1 +# not available php-pear(Crypt_GPG) >1.2.0 +  %description  RoundCube Webmail is a browser-based multilingual IMAP client @@ -73,45 +75,37 @@ 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  %patch0 -p1 -%patch6 -p1 +%patch1 -p1  # fix permissions and remove any .htaccess files  find . -type f -print | xargs chmod a-x  find . -name \.htaccess -print | xargs rm -f -# fixup paths to use the right paths -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 +# Fix shebang +chmod +x bin/*sh +sed -e '/^#!/s:/usr/bin/env php:/usr/bin/php:' \ +    -i bin/*sh  # ??? - Jon, this could do with a comment; fixing carriage returns? (adamw)  sed -i 's/\r//' SQL/mssql.initial.sql -#Drop precompiled flash +# Drop precompiled flash  find . -type f -name '*.swf' | xargs rm -f +  %build +# Nothing -%install +%install  rm -rf %{buildroot}  install -d %{buildroot}%{roundcubedir}  cp -pr * %{buildroot}%{roundcubedir} -#ln -s ../../../pear/PEAR.php %{buildroot}%{roundcubedir}/program/lib/PEAR.php -#ln -s ../../../pear/Auth %{buildroot}%{roundcubedir}/program/lib/Auth -#ln -s ../../../pear/DB %{buildroot}%{roundcubedir}/program/lib/DB -#ln -s ../../../pear/DB.php %{buildroot}%{roundcubedir}/program/lib/DB.php -#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 @@ -119,56 +113,56 @@ mkdir -p %{buildroot}%{_sysconfdir}/roundcubemail  mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d  cp -pr %SOURCE2 %{buildroot}%{_sysconfdir}/logrotate.d/roundcubemail +# Log files  mkdir -p %{buildroot}/var/log/roundcubemail +# Temp files +mkdir -p %{buildroot}/var/lib/roundcubemail + +cp -pr %SOURCE4 README.rpm -cp -pr %SOURCE4 . +# create empty files for ghost to not remove OLD config (0.9.x) +touch %{buildroot}%{_sysconfdir}/roundcubemail/db.inc.php +touch %{buildroot}%{_sysconfdir}/roundcubemail/main.inc.php +# create empty files for ghost for the NEW config +touch %{buildroot}%{_sysconfdir}/roundcubemail/config.inc.php -# use dist files as config files -mv %{buildroot}%{roundcubedir}/config/db.inc.php.dist %{buildroot}%{_sysconfdir}/roundcubemail/db.inc.php -mv %{buildroot}%{roundcubedir}/config/main.inc.php.dist %{buildroot}%{_sysconfdir}/roundcubemail/main.inc.php  # keep any other config files too  mv %{buildroot}%{roundcubedir}/config/* %{buildroot}%{_sysconfdir}/roundcubemail/  # clean up the buildroot  rm -rf %{buildroot}%{roundcubedir}/{config,logs,temp} -rm -rf %{buildroot}%{roundcubedir}/{CHANGELOG,INSTALL,LICENSE,README,UPGRADING,SQL} +rm -rf %{buildroot}%{roundcubedir}/{CHANGELOG,INSTALL,LICENSE,README,UPGRADING} +  %clean  rm -rf %{buildroot} -%post -# replace default des string in config file for better security -function makedesstr -( -chars=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A -B C D E F G H I J K L M N O P Q R S T U V W X Y Z) - -max=${#chars[*]} - -for i in `seq 1 24`; do -    let rand=${RANDOM}%%${max} -    str="${str}${chars[$rand]}" -done -echo $str -) - -sed -i "s/rcmail-\!24ByteDESkey\*Str/`makedesstr`/" /etc/roundcubemail/main.inc.php || : &> /dev/null -exit 0 -  %files  %defattr(-,root,root,-) -%doc CHANGELOG INSTALL LICENSE README.md UPGRADING SQL roundcubemail-README.fedora +%doc CHANGELOG INSTALL LICENSE README.md UPGRADING README.rpm  %{roundcubedir}  %dir %{_sysconfdir}/%{name} -%attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/db.inc.php -%attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/main.inc.php +# OLD config files from previous version +%ghost %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/db.inc.php +%ghost %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/main.inc.php +# NEW config file +%ghost %attr(0640,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.inc.php +# Default value, overwritten on update  %attr(0640,root,apache) %{_sysconfdir}/%{name}/mimetypes.php +%attr(0640,root,apache) %{_sysconfdir}/%{name}/defaults.inc.php +%attr(0640,root,apache) %{_sysconfdir}/%{name}/config.inc.php.sample  %config(noreplace) %{_sysconfdir}/httpd/conf.d/roundcubemail.conf  %attr(0775,root,apache) %dir /var/log/roundcubemail +%attr(0775,root,apache) %dir /var/lib/roundcubemail  %config(noreplace) %{_sysconfdir}/logrotate.d/roundcubemail +  %changelog +* Thu May  8 2014 Remi Collet <remi@fedoraproject.org> - 1.0.0-1 +- Update to 1.0.0 +- provide the installer +  * Tue Oct 22 2013 Remi Collet <remi@fedoraproject.org> - 0.9.5-1  - backport 0.9.5 for remi repo  | 
