1
0
forked from pool/roundcubemail
roundcubemail/roundcubemail.spec

288 lines
10 KiB
RPMSpec
Raw Normal View History

#
# spec file for package roundcubemail
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: roundcubemail
Accepting request 311197 from home:draht:branches:server:php:applications - Update to 1.1.2 Add new plugin hook 'identity_create_after' providing the ID of the inserted identity (#1490358) Add option to place signature at bottom of the quoted text even in top-posting mode [sig_below] Fix handling of %-encoded entities in mailto: URLs (#1490346) Fix zipped messages downloads after selecting all messages in a folder (#1490339) Fix vpopmaild driver of password plugin Fix PHP warning: Non-static method PEAR::setErrorHandling() should not be called statically (#1490343) Fix tables listing routine on mysql and postgres so it skips system or other database tables and views (#1490337) Fix message list header in classic skin on window resize in Internet Explorer (#1490213) Fix so text/calendar parts are listed as attachments even if not marked as such (#1490325) Fix lack of signature separator for plain text signatures in html mode (#1490352) Fix font artifact in Google Chrome on Windows (#1490353) Fix bug where forced extwin page reload could exit from the extwin mode (#1490350) Fix bug where some unrelated attachments in multipart/related message were not listed (#1490355) Fix mouseup event handling when dragging a list record (#1490359) Fix bug where preview_pane setting wasn't always saved into user preferences (#1490362) Fix bug where messages count was not updated after message move/delete with skip_deleted=false (#1490372) Fix security issue in contact photo handling (#1490379) Fix possible memcache/apc cache data consistency issues (#1490390) Fix bug where imap_conn_options were ignored in IMAP connection test (#1490392) Fix bug where some files could have "executable" extension when stored in temp folder (#1490377) Fix attached file path unsetting in database_attachments plugin (#1490393) Fix issues when using moduserprefs.sh without --user argument (#1490399) Fix potential info disclosure issue by protecting directory access (#1490378) Fix blank image in html_signature when saving identity changes (#1490412) Installer: Use openssl_random_pseudo_bytes() (if available) to generate des_key (#1490402) Fix XSS vulnerability in _mbox argument handling (#1490417) OBS-URL: https://build.opensuse.org/request/show/311197 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/roundcubemail?expand=0&rev=93
2015-06-08 23:13:14 +02:00
Version: 1.1.2
Release: 0
Summary: A modern browser-based multilingual IMAP client
License: GPL-3.0+ and GPL-2.0 and BSD-3-Clause
Group: Productivity/Networking/Email/Clients
Url: http://www.roundcube.net/
- Update to 1.1.0 New features: - Allow searching across multiple folders - Improved support for screen readers and assistive technology using WCAG 2.0 andWAI ARIA standards - Update to TinyMCE 4.1 to support images in HTML signatures (copy & paste) - Added namespace filter and folder searching in folder manager - New config option to disable UI elements/actions - Stronger password encryption using OpenSSL - Support for the IMAP SPECIAL-USE extension - Support for Oracle as database backend - Manage 3rd party libs with Composer - Secure URLs [1] (disabled by default) Changelog: Make SMTP error log more verbose - include server response and error code Fix download options menu (added by zipdownload plugin) in classic skin (#1490228) Fix blocked.gif image usage with assets_dir set Fix bug where max_group_members was ignored when adding a new contact (#1490214) Hide MDN and DSN options in compose if disabled by admin (#1490221) Fix checks based on window.ActiveXObject in IE > 10 Fix XSS issue in style attribute handling (#1490227) Fix bug where Drafts list wasn't updated on draft-save action in new window (#1490225) Fix so "set as default" option is hidden if identities_level > 1 (#1490226) Fix bug where search was reset after returning from compose visited for reply Fix javascript error in "IE 8.0/Tablet PC" browser (#1490210) Fix bug where Reply-To address was ignored on reply to messages sent by self (#1490233) Fix bug where empty fieldmap config entries caused empty results of ldap search (#1490229) Fix bug where drafts list wasn't refreshed after draft message was sent from another window (#1490238) Fix keyboard navigation and css in datepicker widget across many Firefox versions Fix false warning when opening attached text/plain files (#1490241) OBS-URL: https://build.opensuse.org/package/show/server:php:applications/roundcubemail?expand=0&rev=91
2015-02-11 19:30:48 +01:00
Source0: %{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
Source2: %{name}-httpd.conf
Source4: README.openSUSE
Source5: %{name}.logrotate
- Update to 1.1.0 New features: - Allow searching across multiple folders - Improved support for screen readers and assistive technology using WCAG 2.0 andWAI ARIA standards - Update to TinyMCE 4.1 to support images in HTML signatures (copy & paste) - Added namespace filter and folder searching in folder manager - New config option to disable UI elements/actions - Stronger password encryption using OpenSSL - Support for the IMAP SPECIAL-USE extension - Support for Oracle as database backend - Manage 3rd party libs with Composer - Secure URLs [1] (disabled by default) Changelog: Make SMTP error log more verbose - include server response and error code Fix download options menu (added by zipdownload plugin) in classic skin (#1490228) Fix blocked.gif image usage with assets_dir set Fix bug where max_group_members was ignored when adding a new contact (#1490214) Hide MDN and DSN options in compose if disabled by admin (#1490221) Fix checks based on window.ActiveXObject in IE > 10 Fix XSS issue in style attribute handling (#1490227) Fix bug where Drafts list wasn't updated on draft-save action in new window (#1490225) Fix so "set as default" option is hidden if identities_level > 1 (#1490226) Fix bug where search was reset after returning from compose visited for reply Fix javascript error in "IE 8.0/Tablet PC" browser (#1490210) Fix bug where Reply-To address was ignored on reply to messages sent by self (#1490233) Fix bug where empty fieldmap config entries caused empty results of ldap search (#1490229) Fix bug where drafts list wasn't refreshed after draft message was sent from another window (#1490238) Fix keyboard navigation and css in datepicker widget across many Firefox versions Fix false warning when opening attached text/plain files (#1490241) OBS-URL: https://build.opensuse.org/package/show/server:php:applications/roundcubemail?expand=0&rev=91
2015-02-11 19:30:48 +01:00
# PATCH-FIX-OPENSUSE roundcubemail-1.1-beta-config_dir.patch -- use the general config directory /etc
Patch0: %{name}-1.1-beta-config_dir.patch
BuildArch: noarch
BuildRequires: apache2-devel
%if 0%{suse_version} >= 1100
BuildRequires: fdupes
%endif
BuildRequires: pcre-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: http_daemon
Requires: mod_php_any >= 5.3
Requires: php-exif
Requires: php-gettext
Requires: php-iconv
Requires: php-mbstring
Requires: php-mcrypt
Requires: php-openssl
Requires: php-session
Requires: php_any_db
## Requires: for upstream dep package
Requires: php-pear-Auth_SASL >= 1.0.6
Requires: php-pear-MDB2_Driver_mysqli
Requires: php-pear-Mail_Mime >= 1.8.1
Requires: php-pear-Mail_mimeDecode >= 1.5.5
Requires: php-pear-Net_IDNA2 >= 0.1.1
Requires: php-pear-Net_LDAP2
Requires: php-pear-Net_SMTP
Requires: php-pear-Net_Sieve
Requires: php-pear-Net_Socket
Recommends: logrotate
Recommends: php-mysql
Recommends: php5-intl
Recommends: php5-fileinfo
Provides: roundcube_framework = %{version}
Conflicts: roundcube-framework
%define apache_serverroot %(/usr/sbin/apxs2 -q DATADIR)
%define apache_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR)
%define roundcubepath %{apache_serverroot}/%{name}
%define roundcubeconfigpath %{_sysconfdir}/%{name}
%description
Roundcube Webmail is a browser-based multilingual IMAP client 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.
The user interface is fully skinnable using XHTML and CSS 2.
%prep
- Update to 1.1.0 New features: - Allow searching across multiple folders - Improved support for screen readers and assistive technology using WCAG 2.0 andWAI ARIA standards - Update to TinyMCE 4.1 to support images in HTML signatures (copy & paste) - Added namespace filter and folder searching in folder manager - New config option to disable UI elements/actions - Stronger password encryption using OpenSSL - Support for the IMAP SPECIAL-USE extension - Support for Oracle as database backend - Manage 3rd party libs with Composer - Secure URLs [1] (disabled by default) Changelog: Make SMTP error log more verbose - include server response and error code Fix download options menu (added by zipdownload plugin) in classic skin (#1490228) Fix blocked.gif image usage with assets_dir set Fix bug where max_group_members was ignored when adding a new contact (#1490214) Hide MDN and DSN options in compose if disabled by admin (#1490221) Fix checks based on window.ActiveXObject in IE > 10 Fix XSS issue in style attribute handling (#1490227) Fix bug where Drafts list wasn't updated on draft-save action in new window (#1490225) Fix so "set as default" option is hidden if identities_level > 1 (#1490226) Fix bug where search was reset after returning from compose visited for reply Fix javascript error in "IE 8.0/Tablet PC" browser (#1490210) Fix bug where Reply-To address was ignored on reply to messages sent by self (#1490233) Fix bug where empty fieldmap config entries caused empty results of ldap search (#1490229) Fix bug where drafts list wasn't refreshed after draft message was sent from another window (#1490238) Fix keyboard navigation and css in datepicker widget across many Firefox versions Fix false warning when opening attached text/plain files (#1490241) OBS-URL: https://build.opensuse.org/package/show/server:php:applications/roundcubemail?expand=0&rev=91
2015-02-11 19:30:48 +01:00
%setup -q
%patch0 -p1
cp %{SOURCE4} .
# remove cruft from source archive
find . -name ".gitignore" -delete
# no need to check .htaccess each time, the apache config takes care of the restrictions
find . -name ".htaccess" -delete
# remove mssql scripts (not needed on openSUSE)
%{__rm} -rf \
SQL/mssql/ \
SQL/mssql.*.sql
# remove shebang from chpass-wrapper
sed -i '1d' plugins/password/helpers/chpass-wrapper.py
# remove INSTALL doc
- Update to 1.1.0 New features: - Allow searching across multiple folders - Improved support for screen readers and assistive technology using WCAG 2.0 andWAI ARIA standards - Update to TinyMCE 4.1 to support images in HTML signatures (copy & paste) - Added namespace filter and folder searching in folder manager - New config option to disable UI elements/actions - Stronger password encryption using OpenSSL - Support for the IMAP SPECIAL-USE extension - Support for Oracle as database backend - Manage 3rd party libs with Composer - Secure URLs [1] (disabled by default) Changelog: Make SMTP error log more verbose - include server response and error code Fix download options menu (added by zipdownload plugin) in classic skin (#1490228) Fix blocked.gif image usage with assets_dir set Fix bug where max_group_members was ignored when adding a new contact (#1490214) Hide MDN and DSN options in compose if disabled by admin (#1490221) Fix checks based on window.ActiveXObject in IE > 10 Fix XSS issue in style attribute handling (#1490227) Fix bug where Drafts list wasn't updated on draft-save action in new window (#1490225) Fix so "set as default" option is hidden if identities_level > 1 (#1490226) Fix bug where search was reset after returning from compose visited for reply Fix javascript error in "IE 8.0/Tablet PC" browser (#1490210) Fix bug where Reply-To address was ignored on reply to messages sent by self (#1490233) Fix bug where empty fieldmap config entries caused empty results of ldap search (#1490229) Fix bug where drafts list wasn't refreshed after draft message was sent from another window (#1490238) Fix keyboard navigation and css in datepicker widget across many Firefox versions Fix false warning when opening attached text/plain files (#1490241) OBS-URL: https://build.opensuse.org/package/show/server:php:applications/roundcubemail?expand=0&rev=91
2015-02-11 19:30:48 +01:00
%{__rm} INSTALL Dockerfile
%build
%install
# install roundcubemail.logrotate
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
%{__install} %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
# extract roundcube-framework
%{__install} -d -m 0755 %{buildroot}%{_datadir}/php5
mv program/lib/Roundcube %{buildroot}%{_datadir}/php5/Roundcube
# install roundcubemail
%{__install} -d -m 0755 %{buildroot}%{roundcubepath}
cp -a * %{buildroot}%{roundcubepath}/
# install config
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
cp config/* %{buildroot}%{roundcubeconfigpath}/
%{__install} %{buildroot}%{roundcubeconfigpath}/config.inc.php.sample %{buildroot}%{roundcubeconfigpath}/config.inc.php
%{__rm} -rf %{buildroot}%{roundcubepath}/config
%{__ln_s} %{roundcubeconfigpath} %{buildroot}%{roundcubepath}/config
# logs + temp go into /var/
%{__rm} -rf %{buildroot}%{roundcubepath}/logs \
%{buildroot}%{roundcubepath}/temp
%{__install} -d %{buildroot}%{_localstatedir}/log/%{name} \
%{buildroot}%{_localstatedir}/lib/%{name}
%{__ln_s} %{_localstatedir}/log/%{name}/ %{buildroot}%{roundcubepath}/logs
%{__ln_s} %{_localstatedir}/lib/%{name}/ %{buildroot}%{roundcubepath}/temp
# move some plugin configs to /etc/roundcubemail
for PLUGIN in acl managesieve password; do
if [[ -f %{buildroot}%{roundcubepath}/plugins/$PLUGIN/config.inc.php.dist ]]; then
mv %{buildroot}%{roundcubepath}/plugins/$PLUGIN/config.inc.php.dist %{buildroot}%{roundcubeconfigpath}/$PLUGIN.inc.php
%{__ln_s} %{roundcubeconfigpath}/$PLUGIN.inc.php %{buildroot}%{roundcubepath}/plugins/$PLUGIN/config.inc.php
fi
done
# install httpd.conf file and adapt the configuration
%{__install} -d -m 0755 %{buildroot}%{apache_sysconfdir}/conf.d
sed -e "s#__ROUNDCUBEPATH__#%{roundcubepath}#g" %{SOURCE2} > %{buildroot}%{apache_sysconfdir}/conf.d/roundcubemail.conf
# install docs
%{__install} -d -m 0755 %{buildroot}%{_defaultdocdir}/%{name}
for i in CHANGELOG UPGRADING LICENSE README.md README.openSUSE SQL; do
mv -v %{buildroot}%{roundcubepath}/$i %{buildroot}%{_defaultdocdir}/%{name}/
done
# create a link for SQL
%{__ln_s} %{_defaultdocdir}/%{name}/SQL %{buildroot}%{roundcubepath}/SQL
# Make ghost files
mkdir %{buildroot}%{roundcubepath}/migrated
mkdir %{buildroot}%{roundcubepath}/migration
# fdupes
%if 0%{suse_version} >= 1100
%fdupes %{buildroot}%{roundcubepath}
%endif
%pre
# backup logs, temp and config for migration
if [ ! -h %{roundcubepath}/logs ] && [ -d %{roundcubepath}/logs ]; then
mkdir -p %{roundcubepath}/migration
mv %{roundcubepath}/logs %{roundcubepath}/migration/.
fi
if [ ! -h %{roundcubepath}/temp ] && [ -d %{roundcubepath}/temp ]; then
mkdir -p %{roundcubepath}/migration
mv %{roundcubepath}/temp %{roundcubepath}/migration/.
fi
if [ ! -h %{roundcubepath}/SQL ] && [ -d %{roundcubepath}/SQL ]; then
mkdir -p %{roundcubepath}/migration
mv %{roundcubepath}/SQL %{roundcubepath}/migration/.
fi
for PLUGIN in acl managesieve password; do
if [ ! -h %{roundcubepath}/plugins/$PLUGIN/config.inc.php ] && [ -f %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]; then
mv %{roundcubepath}/plugins/$PLUGIN/config.inc.php %{roundcubepath}/migration/$PLUGIN.inc.php
fi
done
%post
# replace default des string in config file for better security
makedesstr() {
local chars="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
local max=${#chars}
for i in $(seq 1 24); do
echo "$chars" | dd bs=1 skip=$(($(od -An -d -N2 /dev/urandom) % $max)) count=1 2>/dev/null
done
echo
}
sed -i "s/rcmail-\!24ByteDESkey\*Str/`makedesstr`/" %{roundcubeconfigpath}/defaults.inc.php || : &> /dev/null
# enable apache required apache modules
if [ -x /usr/sbin/a2enmod ]; then
a2enmod -q alias || a2enmod alias
a2enmod -q rewrite || a2enmod rewrite
fi
# restore backed up logs, temp and config
if [ -h %{roundcubepath}/logs ] && [ -d %{roundcubepath}/migration/logs ]; then
mkdir -p %{roundcubepath}/migrated
cp %{roundcubepath}/migration/logs/* %{roundcubepath}/logs/.
mv %{roundcubepath}/migration/logs %{roundcubepath}/migrated/.
fi
if [ -h %{roundcubepath}/temp ] && [ -d %{roundcubepath}/migration/temp ]; then
mkdir -p %{roundcubepath}/migrated
cp %{roundcubepath}/migration/temp/* %{roundcubepath}/temp/.
mv %{roundcubepath}/migration/temp %{roundcubepath}/migrated/.
fi
if [ -h %{roundcubepath}/SQL ] && [ -d %{roundcubepath}/migration/SQL ]; then
rm -r %{roundcubepath}/migration/SQL
fi
for PLUGIN in acl managesieve password; do
if [ -f %{roundcubepath}/migration/$PLUGIN.inc.php ] && [ -h %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]; then
cp %{roundcubepath}/migration/$PLUGIN.inc.php %{roundcubeconfigpath}/.
mv %{roundcubepath}/migration/$PLUGIN.inc.php %{roundcubepath}/migrated/$PLUGIN.inc.php
fi
done
for MIGDIR in migration migrated; do
if [ -d %{roundcubepath}/$MIGDIR ]; then
find %{roundcubepath}/$MIGDIR -empty -delete
fi
if [ -d %{roundcubepath}/$MIGDIR ]; then
echo "Found %{roundcubepath}/$MIGDIR! Make sure you delete this folder after checking the migration!"
fi
done
# update/make new config
if [ ! -f %{roundcubeconfigpath}/config.inc.php ]; then
if [ -f %{roundcubeconfigpath}/main.inc.php ] && [ -f %{roundcubeconfigpath}/db.inc.php ]; then
%{roundcubepath}/bin/update.sh \
--version '?' \
--accept
else
cp %{roundcubeconfigpath}/config.inc.php.sample %{roundcubeconfigpath}/config.inc.php
fi
fi
exit 0
%files
%defattr(0644, root, root,0755)
%doc CHANGELOG
%doc LICENSE
%doc README.md
%doc README.openSUSE
%doc UPGRADING
%doc SQL/
%dir %{roundcubepath}
%dir %{roundcubeconfigpath}
%ghost %config(noreplace) %{roundcubeconfigpath}/config.inc.php
%config(noreplace) %{roundcubeconfigpath}/acl.inc.php
%config(noreplace) %{roundcubeconfigpath}/managesieve.inc.php
%config(noreplace) %{roundcubeconfigpath}/password.inc.php
%config %{roundcubeconfigpath}/config.inc.php.sample
%config %{roundcubeconfigpath}/defaults.inc.php
%config %{roundcubeconfigpath}/mimetypes.php
%config(noreplace) %{apache_sysconfdir}/conf.d/roundcubemail.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%{roundcubepath}/composer.json-dist
%{roundcubepath}/config
%{roundcubepath}/index.php
%{roundcubepath}/robots.txt
%dir %{roundcubepath}/bin
%attr(0755,root,root) %{roundcubepath}/bin/*.sh
%{roundcubepath}/installer/
%{roundcubepath}/logs
%ghost %{roundcubepath}/migrated/
%ghost %{roundcubepath}/migration/
%{roundcubepath}/plugins/
%{roundcubepath}/program/
%{roundcubepath}/skins/
%{roundcubepath}/SQL
%{roundcubepath}/temp
%dir %{_datadir}/php5
%{_datadir}/php5/Roundcube/
%attr(-, wwwrun, root) %{_localstatedir}/log/%{name}
%attr(-, wwwrun, root) %{_localstatedir}/lib/%{name}
%changelog