1
0
forked from pool/roundcubemail

Accepting request 209344 from server:php:applications

OBS-URL: https://build.opensuse.org/request/show/209344
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/roundcubemail?expand=0&rev=17
This commit is contained in:
Stephan Kulow 2013-12-09 06:18:07 +00:00 committed by Git OBS Bridge
commit a63ca8f653
8 changed files with 274 additions and 64 deletions

View File

@ -31,7 +31,7 @@ roundcube user. Here is an example of that procedure:
IDENTIFIED BY 'password'; IDENTIFIED BY 'password';
> quit > quit
# mysql roundcubemail < /srv/www/roundcubemail/SQL/mysql.initial.sql # mysql roundcubemail < /usr/share/doc/packages/roundcubemail/SQL/mysql.initial.sql
Note 1: 'password' is the master password for the roundcube user. It is strongly Note 1: 'password' is the master password for the roundcube user. It is strongly
recommended you replace this with a more secure password. Please keep in recommended you replace this with a more secure password. Please keep in

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:611b2905d8c97580b0139437c05225fc354b3e8e845692bb29afac191abb5bc0
size 3659165

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64f72b49c89dc72ddc6023ccff8f87aad39831995e86c592fa3648a499ccdbf9
size 3410495

View File

@ -10,15 +10,21 @@
<IfModule mod_alias.c> <IfModule mod_alias.c>
Alias /roundcube __ROUNDCUBEPATH__ Alias /roundcube __ROUNDCUBEPATH__
Alias /roundcubemail __ROUNDCUBEPATH__
</IfModule> </IfModule>
# AddDefaultCharset UTF-8 # AddDefaultCharset UTF-8
AddType text/x-component .htc AddType text/x-component .htc
<Directory __ROUNDCUBEPATH__> <Directory __ROUNDCUBEPATH__>
Order allow,deny <IfModule mod_authz_core.c>
#Allow from 127.0.0.1 Require all granted
Allow from all </IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
#Allow from 127.0.0.1
Allow from all
</IfModule>
Options -Indexes FollowSymLinks Options -Indexes FollowSymLinks
@ -76,8 +82,13 @@ AddType text/x-component .htc
# Special directories # Special directories
<Directory __ROUNDCUBEPATH__/bin> <Directory __ROUNDCUBEPATH__/bin>
Order allow,deny <IfModule mod_authz_core.c>
Deny from all Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</Directory> </Directory>
<Directory __ROUNDCUBEPATH__/program> <Directory __ROUNDCUBEPATH__/program>
@ -88,23 +99,49 @@ AddType text/x-component .htc
</Directory> </Directory>
<Directory __ROUNDCUBEPATH__/config> <Directory __ROUNDCUBEPATH__/config>
Order allow,deny Options -FollowSymLinks
Deny from all AllowOverride None
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</Directory> </Directory>
<Directory __ROUNDCUBEPATH__/logs> <Directory __ROUNDCUBEPATH__/logs>
Order allow,deny Options -FollowSymLinks
Deny from all AllowOverride None
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</Directory> </Directory>
<Directory __ROUNDCUBEPATH__/temp> <Directory __ROUNDCUBEPATH__/temp>
Order allow,deny Options -FollowSymLinks
Deny from all AllowOverride None
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</Directory> </Directory>
<Directory __ROUNDCUBEPATH__/plugins/enigma/home> <Directory __ROUNDCUBEPATH__/plugins/enigma/home>
Order allow,deny <IfModule mod_authz_core.c>
Deny from all Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</Directory> </Directory>

View File

@ -1,6 +1 @@
addFilter("devel-file-in-non-devel-package") addFilter("E: devel-file-in-non-devel-package")
addFilter("files-duplicate /etc/roundcubemail/main.inc.php.dist")
addFilter("files-duplicate /etc/roundcubemail/db.inc.php")
addFilter("non-executable-script /srv/www/roundcubemail/plugins/password/drivers/chpass-wrapper.py")
addFilter("wrong-file-end-of-line-encoding /usr/share/doc/packages/roundcubemail/SQL/mssql.initial.sql")
addFilter("wrong-file-end-of-line-encoding /usr/share/doc/packages/roundcubemail/SQL/mssql.upgrade.sql")

View File

@ -1,3 +1,39 @@
-------------------------------------------------------------------
Fri Nov 22 15:46:06 UTC 2013 - aj@ajaissle.de
- Also alias /roundcubemail to roundcube path
-------------------------------------------------------------------
Thu Nov 21 17:11:33 UTC 2013 - aj@ajaissle.de
- Changed source package to *-dep.tar.gz
- Optimized spec file
* Replaced default DES string with some more secure, random string
* Moved SQL files to %doc
* Moved logs/ and temp/ to /var/log/ and /var/lib/
- httpd.conf now 'speaks' Apache 2.4
-------------------------------------------------------------------
Thu Nov 21 15:50:31 UTC 2013 - aj@ajaissle.de
- New upstream release 0.9.5
* Fix failing vCard import when email address field contains spaces (#1489386)
* Fix default spell-check configuration after Google suspended their spell service
* Fix vulnerability in handling _session argument of utils/save-prefs (#1489382)
* Fix iframe onload for upload errors handling (#1489379)
* Fix address matching in Return-Path header on identity selection (#1489374)
* Fix text wrapping issue with long unwrappable lines (#1489371)
* Fixed mispelling: occured -> occurred (#1489366)
* Fixed issues where HTML comments inside style tag would hang Internet Explorer
* Fix setting domain in virtualmin password driver (#1489332)
* Hide Delivery Status Notification option when smtp_server is unset (#1489336)
* Display full attachment name using title attribute when name is too long to display (#1489320)
* Fix attachment icon issue when rare font/language is used (#1489326)
* Fix expanded thread root message styling after refreshing messages list (#1489327)
* Fix issue where From address was removed from Cc and Bcc fields when editing a draft (#1489319)
* Fix error_reporting directive check (#1489323)
* Fix de_DE localization of "About" label in Help plugin (#1489325)
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Sep 8 19:16:28 UTC 2013 - wr@rosenauer.org Sun Sep 8 19:16:28 UTC 2013 - wr@rosenauer.org

7
roundcubemail.logrotate Normal file
View File

@ -0,0 +1,7 @@
/var/log/roundcubemail/console /var/log/roundcubemail/errors /var/log/roundcubemail/imap /var/log/roundcubemail/ldap /var/log/roundcubemail/sendmail /var/log/roundcubemail/sieve /var/log/roundcubemail/smtp /var/log/roundcubemail/sql /var/log/roundcubemail/userlogins {
missingok
compress
notifempty
size 30k
create 0660 wwwrun www
}

View File

@ -17,17 +17,29 @@
Name: roundcubemail Name: roundcubemail
Version: 0.9.5
Release: 0
Summary: A modern browser-based multilingual IMAP client Summary: A modern browser-based multilingual IMAP client
License: GPL-3.0+ and GPL-2.0 and BSD-3-Clause License: GPL-3.0+ and GPL-2.0 and BSD-3-Clause
Group: Productivity/Networking/Email/Clients Group: Productivity/Networking/Email/Clients
Url: http://www.roundcube.net/ Url: http://www.roundcube.net/
Version: 0.9.4 Source0: %{name}-%{version}-dep.tar.gz
Release: 0 Source1: %{name}-rpmlintrc
Source2: %{name}-httpd.conf
Source4: README.openSUSE
Source5: %{name}.logrotate
# PATCH-FIX-OPENSUSE use the general config directory /etc
Patch0: %{name}-config-dir.patch
BuildArch: noarch
BuildRequires: apache2-devel BuildRequires: apache2-devel
%if 0%{suse_version} >= 1100 %if 0%{suse_version} >= 1100
BuildRequires: fdupes BuildRequires: fdupes
%endif %endif
BuildRequires: pcre-devel BuildRequires: pcre-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: http_daemon Requires: http_daemon
Requires: mod_php_any Requires: mod_php_any
Requires: php-exif Requires: php-exif
@ -38,79 +50,187 @@ Requires: php-mcrypt
Requires: php-openssl Requires: php-openssl
Requires: php-session Requires: php-session
Requires: php_any_db 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_Socket
%if 0%{?suse_version}
Recommends: logrotate
%endif
Recommends: php-mysql Recommends: php-mysql
Recommends: php5-intl Recommends: php5-intl
Recommends: php5-fileinfo Recommends: php5-fileinfo
## Requires: for upstream dep package
#Requires: php5-pear-Auth_SASL Provides: roundcube_framework = %{version}
Source0: %{name}-%{version}.tar.gz Conflicts: roundcube-framework
Source2: %{name}-httpd.conf
Source3: %{name}-rpmlintrc
Source4: README.openSUSE
# PATCH-FIX-OPENSUSE use the general config directory /etc
Patch0: %{name}-config-dir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%define apache_serverroot %(/usr/sbin/apxs2 -q DATADIR) %define apache_serverroot %(/usr/sbin/apxs2 -q DATADIR)
%define apache_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR) %define apache_sysconfdir %(/usr/sbin/apxs2 -q SYSCONFDIR)
%define roundcubepath %{apache_serverroot}/%name %define roundcubepath %{apache_serverroot}/%{name}
%define roundcubeconfigpath %_sysconfdir/%name %define roundcubeconfigpath %{_sysconfdir}/%{name}
%description %description
RoundCube Webmail is a browser-based multilingual IMAP client with an Roundcube Webmail is a browser-based multilingual IMAP client with an
application-like user interface. It provides full functionality you application-like user interface. It provides full functionality you
expect from an e-mail client, including MIME support, address book, expect from an e-mail client, including MIME support, address book,
folder manipulation, message searching and spell checking. folder manipulation, message searching and spell checking.
RoundCube Webmail is written in PHP and requires the MySQL database. Roundcube Webmail is written in PHP and requires the MySQL database.
The user interface is fully skinnable using XHTML and CSS 2. The user interface is fully skinnable using XHTML and CSS 2.
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}-dep
%patch0 -p1 %patch0 -p1
cp %{SOURCE4} . cp %{SOURCE4} .
cp %{SOURCE5} .
# remove cruft from source archive # remove cruft from source archive
find . -name ".gitignore" -exec rm {} \; 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
rm INSTALL
%build %build
%install %install
install -d -m 0755 %buildroot%roundcubepath # install roundcubemail.logrotate
cp -a * %buildroot%{roundcubepath}/ %{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate
mkdir -p %buildroot/%_sysconfdir/%name mv %{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate/
cp config/* %buildroot/%{roundcubeconfigpath}/
cp %buildroot/%{roundcubeconfigpath}/main.inc.php.dist %buildroot/%{roundcubeconfigpath}/main.inc.php
cp %buildroot/%{roundcubeconfigpath}/db.inc.php.dist %buildroot/%{roundcubeconfigpath}/db.inc.php
rm -rf %buildroot%{roundcubepath}/config
# install httpd.conf file and adapt the configuration # extract roundcube-framework
install -d -m 0755 %buildroot/%{apache_sysconfdir}/conf.d %{__install} -d -m 0755 %{buildroot}%{_datadir}/php5
sed -e "s#__ROUNDCUBEPATH__#%{roundcubepath}#g" %{SOURCE2} > %buildroot%{apache_sysconfdir}/conf.d/roundcubemail.conf mv program/lib/Roundcube %{buildroot}%{_datadir}/php5/Roundcube
# install docs # install roundcubemail
install -d -m 0755 %buildroot%_defaultdocdir/%name %{__install} -d -m 0755 %{buildroot}%{roundcubepath}
for i in CHANGELOG INSTALL UPGRADING LICENSE README.md README.openSUSE; do cp -a * %{buildroot}%{roundcubepath}/
mv -v %{buildroot}%{roundcubepath}/$i %{buildroot}%{_defaultdocdir}/%name/
# install config
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
cp config/* %{buildroot}%{roundcubeconfigpath}/
cp %{buildroot}%{roundcubeconfigpath}/main.inc.php.dist %{buildroot}%{roundcubeconfigpath}/main.inc.php
cp %{buildroot}%{roundcubeconfigpath}/db.inc.php.dist %{buildroot}%{roundcubeconfigpath}/db.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
mkdir -p %{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 done
# no need to check .htaccess each time, the apache config takes care of the restrictions # install httpd.conf file and adapt the configuration
find %buildroot/%{roundcubepath} -name .htaccess -delete %{__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
# fdupes # fdupes
%if 0%{suse_version} >= 1100 %if 0%{suse_version} >= 1100
%fdupes %{buildroot}/%{roundcubepath} %fdupes %{buildroot}%{roundcubepath}
%endif %endif
%clean %clean
rm -rf %buildroot rm -rf %{buildroot}
%pre
# backup logs, temp and config for migration
if [[ ! -h %{roundcubepath}/logs ]]; then
if [[ -d %{roundcubepath}/logs ]]; then
mkdir -p %{roundcubepath}/migration
mv %{roundcubepath}/logs %{roundcubepath}/migration/.
fi
fi
if [[ ! -h %{roundcubepath}/temp ]]; then
if [[ -d %{roundcubepath}/temp ]]; then
mkdir -p %{roundcubepath}/migration
mv %{roundcubepath}/temp %{roundcubepath}/migration/.
fi
fi
for PLUGIN in acl managesieve password; do
if [[ ! -h %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]]; then
if [[ -f %{roundcubepath}/plugins/$PLUGIN/config.inc.php ]]; then
mv %{roundcubepath}/plugins/$PLUGIN/config.inc.php %{roundcubepath}/migration/$PLUGIN.inc.php
fi
fi
done
%post %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
# enable apache required apache modules # enable apache required apache modules
if [ -x /usr/sbin/a2enmod ]; then if [ -x /usr/sbin/a2enmod ]; then
a2enmod -q alias || a2enmod alias a2enmod -q alias || a2enmod alias
a2enmod -q rewrite || a2enmod rewrite a2enmod -q rewrite || a2enmod rewrite
fi fi
# restore backed up logs, temp and config
if [[ -h %{roundcubepath}/logs ]]; then
if [[ -d %{roundcubepath}/migration/logs ]]; then
mkdir -p %{roundcubepath}/migrated
cp %{roundcubepath}/migration/logs/* %{roundcubepath}/logs/.
mv %{roundcubepath}/migration/logs %{roundcubepath}/migrated/.
fi
fi
if [[ -h %{roundcubepath}/temp ]]; then
if [[ -d %{roundcubepath}/migration/temp ]]; then
mkdir -p %{roundcubepath}/migrated
cp %{roundcubepath}/migration/temp/* %{roundcubepath}/temp/.
mv %{roundcubepath}/migration/temp %{roundcubepath}/migrated/.
fi
fi
for PLUGIN in acl managesieve password; do
if [[ -f %{roundcubepath}/migration/$PLUGIN.inc.php ]]; then
if [[ -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
fi
done
# make config, if none exist
if [ ! -f %{roundcubeconfigpath}/main.inc.php ]; then if [ ! -f %{roundcubeconfigpath}/main.inc.php ]; then
cp %{roundcubeconfigpath}/main.inc.php.dist %{roundcubeconfigpath}/main.inc.php cp %{roundcubeconfigpath}/main.inc.php.dist %{roundcubeconfigpath}/main.inc.php
fi fi
@ -121,25 +241,40 @@ exit 0
%files %files
%defattr(0644, root, root,0755) %defattr(0644, root, root,0755)
%doc %_defaultdocdir/%name/ %doc CHANGELOG
%doc LICENSE
%doc README.md
%doc README.openSUSE
%doc UPGRADING
%doc SQL/
%dir %{roundcubepath} %dir %{roundcubepath}
%dir %{roundcubeconfigpath} %dir %{roundcubeconfigpath}
%ghost %config(noreplace) %{roundcubeconfigpath}/db.inc.php %ghost %config(noreplace) %{roundcubeconfigpath}/db.inc.php
%ghost %config(noreplace) %{roundcubeconfigpath}/main.inc.php %ghost %config(noreplace) %{roundcubeconfigpath}/main.inc.php
%config %{roundcubeconfigpath}/* %config(noreplace) %{roundcubeconfigpath}/acl.inc.php
%config(noreplace) %{roundcubeconfigpath}/managesieve.inc.php
%config(noreplace) %{roundcubeconfigpath}/password.inc.php
%config %{roundcubeconfigpath}/db.inc.php.dist
%config %{roundcubeconfigpath}/main.inc.php.dist
%config %{roundcubeconfigpath}/mimetypes.php %config %{roundcubeconfigpath}/mimetypes.php
%config(noreplace) %{apache_sysconfdir}/conf.d/roundcubemail.conf %config(noreplace) %{apache_sysconfdir}/conf.d/roundcubemail.conf
%dir %{_sysconfdir}/logrotate
%config(noreplace) %{_sysconfdir}/logrotate/%{name}.logrotate
%{roundcubepath}/composer.json-dist %{roundcubepath}/composer.json-dist
%{roundcubepath}/config
%{roundcubepath}/index.php %{roundcubepath}/index.php
%{roundcubepath}/robots.txt %{roundcubepath}/robots.txt
%attr(0755,root,root) %{roundcubepath}/bin/*.sh %attr(0755,root,root) %{roundcubepath}/bin/*.sh
%dir %{roundcubepath}/bin %dir %{roundcubepath}/bin
%{roundcubepath}/installer/ %{roundcubepath}/installer/
%{roundcubepath}/logs
%{roundcubepath}/plugins/ %{roundcubepath}/plugins/
%{roundcubepath}/program/ %{roundcubepath}/program/
%{roundcubepath}/skins/ %{roundcubepath}/skins/
%{roundcubepath}/SQL %{roundcubepath}/temp
%attr(-, wwwrun, root) %{roundcubepath}/logs/ %dir %{_datadir}/php5
%attr(-, wwwrun, root) %{roundcubepath}/temp/ %{_datadir}/php5/Roundcube/
%attr(-, wwwrun, root) %{_localstatedir}/log/%{name}
%attr(-, wwwrun, root) %{_localstatedir}/lib/%{name}
%changelog %changelog