From: Romain Beauxis Date: Mon, 26 Nov 2007 10:54:21 +0000 (+0100) Subject: Imported Debian patch 0.1~rc2-2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=41bb5e5480326673d34e7019e6561b06ddc5802d;p=roundcube.git Imported Debian patch 0.1~rc2-2 --- diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index 32c5d82..0000000 --- a/debian/README.Debian +++ /dev/null @@ -1,10 +0,0 @@ -For better compatibility, the schema used for MySQL is the one -targeted at MySQL 4.0, not the one for MySQL 4.1 or MySQL 5.x. - -To use tinymce editor: - - install tinymce package - - uncomment the first block in /etc/apache*/conf.d/roundcube - - set $rcmail_config['enable_htmleditor'] to TRUE in - /etc/roundcube/main.inc.php - - -- Vincent Bernat , Mon, 29 Oct 2007 21:39:09 +0100 diff --git a/debian/changelog b/debian/changelog index 2b5fb6e..6a8a42e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +roundcube (0.1~rc2-2) experimental; urgency=low + + [ Vincent Bernat ] + * Fix a conflict between ob_gzhandler and zlib output compression, + thanks to kaouete (Closes: #450482). + + [ Romain Beauxis ] + * Fix tinymce patch and inclusion + Closes: #452016 + * Splitted virtual packages to avoid circular dependencies. + Uploading to experimental, as this is an important change and we may + expect issues.. + + -- Romain Beauxis Mon, 26 Nov 2007 11:54:21 +0100 + roundcube (0.1~rc2-1) unstable; urgency=low * New upstream, thanks to Nicolas Stransky (Closes: #447503). This diff --git a/debian/conf/apache.conf b/debian/conf/apache.conf index 9431b56..a5e0562 100644 --- a/debian/conf/apache.conf +++ b/debian/conf/apache.conf @@ -1,13 +1,13 @@ # Uncomment this to use tinymce (you need tinymce package) # See README.Debian for more details -# Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/ -# -# Options Indexes MultiViews FollowSymLinks -# AllowOverride None -# Order allow,deny -# allow from all -# +Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/ + + Options Indexes MultiViews FollowSymLinks + AllowOverride None + Order allow,deny + allow from all + # This alias does not work properly with several hosts on your apache server # Uncomment it to use it diff --git a/debian/config b/debian/config deleted file mode 100644 index c5ef209..0000000 --- a/debian/config +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -db_input medium roundcube/hosts || true -db_go || true - -# Retrieve all available languages -instd_langs=$(echo /usr/share/roundcube/program/localization/*/messages.inc | \ - sed 's+[^ ]*/\([^ ]*\)/messages.inc+\1,+g' | sed 's+,$++') -# Retrieve the old list -db_metaget roundcube/language languages && oldchoices="$RET" -if [ ! "$oldchoices" ] || [ "$instd_langs" != "$oldchoices" ]; then - db_subst roundcube/language languages $instd_langs - db_fset roundcube/language seen false - # Try to guess the locale - locale=$(echo $LANG | sed 's/[@\.].*//') - if [ -d /usr/share/roundcube/program/localization/$locale ]; then - db_set roundcube/language $locale - else - locale=$(echo $locale | sed 's/_.*//') - if [ -d /usr/share/roundcube/program/localization/$locale ]; then - db_set roundcube/language $locale - else - db_set roundcube/language en_US - fi - fi -fi -# Ask the question -db_input medium roundcube/language || true -db_go || true - -if [ -f /usr/share/dbconfig-common/dpkg/config ]; then - dbc_dbtypes="mysql, pgsql, sqlite" - dbc_authmethod_user="password" - . /usr/share/dbconfig-common/dpkg/config - dbc_go roundcube $@ -fi - -db_input medium roundcube/reconfigure-webserver || true -db_go || true -db_input medium roundcube/restart-webserver || true -db_go || true diff --git a/debian/control b/debian/control index 492c766..3bc6874 100644 --- a/debian/control +++ b/debian/control @@ -5,13 +5,26 @@ Maintainer: Debian Roundcube Maintainers , Romain Beauxis Build-Depends: debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27-1) Build-Depends-Indep: po-debconf +Homepage: http://www.roundcube.net/ Standards-Version: 3.7.2 +Package: roundcube-core +Architecture: all +Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5, php5-mcrypt, roundcube-db, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, tinymce, ${misc:Depends} +Description: skinnable AJAX based webmail solution for IMAP servers + RoundCube Webmail is a browser-based multilingual IMAP client with an + application-like user interface. It provides full functionality + expected from an e-mail client, including MIME support, address book, + folder manipulation and message filters. + . + The user interface is fully skinnable using XHTML and CSS 2. + . + This package provides the core code for roundcube. You should install + it along with one of the roundcube database virtual packages. + Package: roundcube Architecture: all -Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5, php5-mcrypt, roundcube-db, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, ${misc:Depends} -Suggests: tinymce -Homepage: http://www.roundcube.net/ +Depends: roundcube-sqlite | roundcube-db, roundcube-core Description: skinnable AJAX based webmail solution for IMAP servers RoundCube Webmail is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality @@ -19,13 +32,14 @@ Description: skinnable AJAX based webmail solution for IMAP servers folder manipulation and message filters. . The user interface is fully skinnable using XHTML and CSS 2. + . + This package will install a full roundcube application. Package: roundcube-mysql Architecture: all Depends: roundcube, php5-mysql, mysql-client | virtual-mysql-client Suggests: mysql-server Provides: roundcube-db -Homepage: http://www.roundcube.net/ Description: virtual package providing MySQL dependencies for RoundCube This package provides MySQL dependencies for RoundCube Webmail, a skinnable AJAX based webmail solution for IMAP servers. Install this @@ -36,7 +50,6 @@ Architecture: all Depends: roundcube, php5-pgsql, postgresql-client-8.1 | postgresql-client Suggests: postgresql-server Provides: roundcube-db -Homepage: http://www.roundcube.net/ Description: virtual package providing PostgreSQL dependencies for RoundCube This package provides PostgreSQL dependencies for RoundCube Webmail, a skinnable AJAX based webmail solution for IMAP servers. Install @@ -46,7 +59,6 @@ Package: roundcube-sqlite Architecture: all Depends: roundcube, php5-sqlite, sqlite Provides: roundcube-db -Homepage: http://www.roundcube.net/ Description: virtual package providing sqlite dependencies for RoundCube This package provides sqlite dependencies for RoundCube Webmail, a skinnable AJAX based webmail solution for IMAP servers. Install this diff --git a/debian/control.in b/debian/control.in index ecad667..164dff9 100644 --- a/debian/control.in +++ b/debian/control.in @@ -5,13 +5,26 @@ Maintainer: Debian Roundcube Maintainers , Romain Beauxis Build-Depends: @cdbs@ Build-Depends-Indep: po-debconf +Homepage: http://www.roundcube.net/ Standards-Version: 3.7.2 +Package: roundcube-core +Architecture: all +Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5, php5-mcrypt, roundcube-db, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, tinymce, ${misc:Depends} +Description: skinnable AJAX based webmail solution for IMAP servers + RoundCube Webmail is a browser-based multilingual IMAP client with an + application-like user interface. It provides full functionality + expected from an e-mail client, including MIME support, address book, + folder manipulation and message filters. + . + The user interface is fully skinnable using XHTML and CSS 2. + . + This package provides the core code for roundcube. You should install + it along with one of the roundcube database virtual packages. + Package: roundcube Architecture: all -Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5, php5-mcrypt, roundcube-db, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, ${misc:Depends} -Suggests: tinymce -Homepage: http://www.roundcube.net/ +Depends: roundcube-sqlite | roundcube-db, roundcube-core Description: skinnable AJAX based webmail solution for IMAP servers RoundCube Webmail is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality @@ -19,13 +32,14 @@ Description: skinnable AJAX based webmail solution for IMAP servers folder manipulation and message filters. . The user interface is fully skinnable using XHTML and CSS 2. + . + This package will install a full roundcube application. Package: roundcube-mysql Architecture: all Depends: roundcube, php5-mysql, mysql-client | virtual-mysql-client Suggests: mysql-server Provides: roundcube-db -Homepage: http://www.roundcube.net/ Description: virtual package providing MySQL dependencies for RoundCube This package provides MySQL dependencies for RoundCube Webmail, a skinnable AJAX based webmail solution for IMAP servers. Install this @@ -36,7 +50,6 @@ Architecture: all Depends: roundcube, php5-pgsql, postgresql-client-8.1 | postgresql-client Suggests: postgresql-server Provides: roundcube-db -Homepage: http://www.roundcube.net/ Description: virtual package providing PostgreSQL dependencies for RoundCube This package provides PostgreSQL dependencies for RoundCube Webmail, a skinnable AJAX based webmail solution for IMAP servers. Install @@ -46,7 +59,6 @@ Package: roundcube-sqlite Architecture: all Depends: roundcube, php5-sqlite, sqlite Provides: roundcube-db -Homepage: http://www.roundcube.net/ Description: virtual package providing sqlite dependencies for RoundCube This package provides sqlite dependencies for RoundCube Webmail, a skinnable AJAX based webmail solution for IMAP servers. Install this diff --git a/debian/cron.daily b/debian/cron.daily deleted file mode 100644 index 4b071ca..0000000 --- a/debian/cron.daily +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -MAX_TMPFILE_LIFETIME=5 -# MAX_TMPFILE_LIFETIME can be overridden in this file -if [ -r /etc/default/roundcube ]; then - . /etc/default/roundcube -fi - -find /var/lib/roundcube/temp -type f -mtime +$MAX_TMPFILE_LIFETIME -print0 | xargs -0 -r rm diff --git a/debian/default b/debian/default deleted file mode 100644 index 67e646d..0000000 --- a/debian/default +++ /dev/null @@ -1,3 +0,0 @@ -# Uncomment the following line to alter the default delay to clean -# temporary directory /var/lib/roundcube/temp -# MAX_TMPFILE_LIFETIME=5 diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 2bcbe8c..0000000 --- a/debian/dirs +++ /dev/null @@ -1,9 +0,0 @@ -usr/share/roundcube -usr/share/dbconfig-common/data/roundcube/install -usr/share/dbconfig-common/data/roundcube/upgrade/mysql -usr/share/dbconfig-common/data/roundcube/upgrade/pgsql -usr/share/dbconfig-common/data/roundcube/upgrade/sqlite -etc/roundcube -var/log/roundcube -var/lib/roundcube/config -etc/default diff --git a/debian/docs b/debian/docs deleted file mode 100644 index c42dfaf..0000000 --- a/debian/docs +++ /dev/null @@ -1,2 +0,0 @@ -README -UPGRADING diff --git a/debian/install b/debian/install deleted file mode 100644 index e025be8..0000000 --- a/debian/install +++ /dev/null @@ -1,3 +0,0 @@ -index.php program/ usr/share/roundcube -skins temp var/lib/roundcube -debian/conf/* etc/roundcube diff --git a/debian/links b/debian/links deleted file mode 100644 index 812c7a4..0000000 --- a/debian/links +++ /dev/null @@ -1,8 +0,0 @@ -etc/roundcube/main.inc.php var/lib/roundcube/config/main.inc.php -etc/roundcube/db.inc.php var/lib/roundcube/config/db.inc.php -var/lib/roundcube/temp usr/share/roundcube/temp -var/lib/roundcube/skins usr/share/roundcube/skins -var/lib/roundcube/config usr/share/roundcube/config -var/log/roundcube var/lib/roundcube/logs -var/lib/roundcube/logs usr/share/roundcube/logs -usr/share/roundcube/main.inc.php.dist usr/share/doc/roundcube/main.inc.php.dist diff --git a/debian/logrotate b/debian/logrotate deleted file mode 100644 index 9b6c0a9..0000000 --- a/debian/logrotate +++ /dev/null @@ -1,6 +0,0 @@ -/var/log/roundcube/sendmail /var/log/roundcube/errors { - weekly - rotate 4 - compress - missingok -} diff --git a/debian/patches/ob_gzhandler.patch b/debian/patches/ob_gzhandler.patch new file mode 100644 index 0000000..4b2827c --- /dev/null +++ b/debian/patches/ob_gzhandler.patch @@ -0,0 +1,11 @@ +--- roundcube/index.php 2007-10-29 21:56:00.000000000 +0100 ++++ roundcube/index.php 2007-11-17 09:10:54.000000000 +0100 +@@ -103,7 +103,7 @@ + if ($_action != 'get' && $_action != 'viewsource') + { + // use gzip compression if supported +- if (function_exists('ob_gzhandler') && ini_get('zlib.output_compression')) ++ if (function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) + ob_start('ob_gzhandler'); + else + ob_start(); diff --git a/debian/patches/series b/debian/patches/series index bde2b5d..af70f21 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ dbconfig-common_support.patch correct_install_path.patch use_packaged_tinymce.patch +ob_gzhandler.patch diff --git a/debian/patches/use_packaged_tinymce.patch b/debian/patches/use_packaged_tinymce.patch index db835fa..2d48572 100644 --- a/debian/patches/use_packaged_tinymce.patch +++ b/debian/patches/use_packaged_tinymce.patch @@ -1,31 +1,7 @@ ---- roundcube_0.1-rc2/program/js/editor.js 2007-06-09 01:47:57.000000000 +0200 -+++ roundcube_0.1-rc2/program/js/editor.js 2007-10-29 21:47:07.000000000 +0100 -@@ -27,10 +27,7 @@ - theme_advanced_buttons3 : '', - theme_advanced_toolbar_location : 'top', - theme_advanced_toolbar_align : 'left', -- extended_valid_elements : 'font[face|size|color|style],span[id|class|align|style]', -- content_css : skin_path + '/editor_content.css', -- popups_css : skin_path + '/editor_popup.css', -- editor_css : skin_path + '/editor_ui.css' -+ extended_valid_elements : 'font[face|size|color|style],span[id|class|align|style]' - }); - } - ---- roundcube_0.1-rc2/program/steps/settings/edit_identity.inc 2007-04-28 20:07:12.000000000 +0200 -+++ roundcube_0.1-rc2/program/steps/settings/edit_identity.inc 2007-10-29 21:46:33.000000000 +0100 -@@ -49,9 +49,6 @@ - $OUTPUT->include_script('tiny_mce/tiny_mce_src.js'); - $OUTPUT->add_script("tinyMCE.init({ mode : 'specific_textareas'," . - "apply_source_formatting : true," . -- "content_css : '\$__skin_path' + '/editor_content.css'," . -- "popups_css : '\$__skin_path' + '/editor_popups.css'," . -- "editor_css : '\$__skin_path' + '/editor_ui.css'," . - "theme : 'advanced'," . - "theme_advanced_toolbar_location : 'top'," . - "theme_advanced_toolbar_align : 'left'," . ---- roundcube_0.1-rc2/program/steps/mail/sendmail.inc 2007-09-26 10:13:21.000000000 +0200 -+++ roundcube_0.1-rc2/program/steps/mail/sendmail.inc 2007-10-29 22:04:20.000000000 +0100 +Index: roundcube-0.1~rc2/program/steps/mail/sendmail.inc +=================================================================== +--- roundcube-0.1~rc2.orig/program/steps/mail/sendmail.inc 2007-11-26 11:42:36.000000000 +0100 ++++ roundcube-0.1~rc2/program/steps/mail/sendmail.inc 2007-11-26 11:44:04.000000000 +0100 @@ -108,7 +108,7 @@ if (! in_array($image_name, $included_images)) { diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index 33d6912..0000000 --- a/debian/postinst +++ /dev/null @@ -1,164 +0,0 @@ -#!/bin/sh -# postinst script for roundcube -# -# see: dh_installdeb(1) - -set -e - -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/postinst -dbc_generate_include=php:/etc/roundcube/debian-db.php -dbc_generate_include_owner="www-data:www-data" -dbc_generate_include_perms="660" -dbc_dbfile_owner="www-data:www-data" -dbc_dbfile_perms="0660" -dbc_dbuser=roundcube -dbc_dbname=roundcube - -dbc_go roundcube $@ - -case "$1" in - configure) - - # From 0.1-beta2.2 to 0.1-rc1, a column was added to table - # `identities'. For MySQL and PostgreSQL, this is handled by - # dbconfig-common but for sqlite, there is no way to add a - # column to a table. Therefore, we dump here the table and add - # the column. - [ "$dbc_upgrade" = "true" ] && { - case "$dbc_dbtype" in - sqlite) - db="${dbc_basepath}/${dbc_dbname}" - # OK, we need to check if the table contains html_signature - if ! sqlite "$db" '.schema identities' | grep -q html_signature; then - # We need to add it - echo -n "Need to upgrade 'identities' table in $db... " - upgrade_tmp=$(mktemp -t roundcube.sqlite.XXXXXXXXXX) - ( - cat < $upgrade_tmp - sqlite "$db" < $upgrade_tmp - rm $upgrade_tmp - echo "OK" - fi - ;; - *) - # Do nothing - ;; - esac - } - - CONFFILE=/etc/roundcube/main.inc.php - touch $CONFFILE.ucftmp - chmod 640 $CONFFILE.ucftmp - - db_get roundcube/hosts || true - hosts="$RET" - if [ "$hosts" != "" ]; then - hosts="array(\"$(echo $hosts | sed 's/ /\",\"/g')\")" - else - hosts="''" - fi - - db_get roundcube/language || true - language="$RET" - - # Get current 3DES key from /etc/roundcube/main.inc.php - [ -f /etc/roundcube/main.inc.php ] && { - deskey=$(sed -n "s+^\$rcmail_config\['des_key'\] = '\(.*\)';\$+\1+p" \ - /etc/roundcube/main.inc.php) - } - # If this is the default key, forget it ! - [ "$deskey" = "rcmail-!24ByteDESkey*Str" ] && unset deskey - # Generate a new one - while [ -z "$deskey" ]; do - deskey=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | \ - tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') - done - - # Put hosts, language and key in main.inc.php - cat /usr/share/roundcube/main.inc.php.dist | \ - sed -e "s+^\(\$rcmail_config\['default_host'\] = \)''\(;\)\$+\1${hosts}\2+" \ - -e "s+^\(\$rcmail_config\['des_key'\] = '\).*\(';\)\$+\1$deskey\2+" \ - -e "s+^\(\$rcmail_config\['locale_string'\] = '\).*\(';\)\$+\1${language}\2+" >> $CONFFILE.ucftmp - - ucf --debconf-ok $CONFFILE.ucftmp $CONFFILE - chown root:www-data $CONFFILE - rm -f $CONFFILE.ucftmp - - # Handle webserver reconfiguration/restart ; stolen from zabbix package - db_get roundcube/reconfigure-webserver || true - webservers="$RET" - restart="" - - for webserver in $webservers; do - webserver=${webserver%,} - test -x /usr/sbin/$webserver || continue - - if [ ! -f /etc/$webserver/conf.d/roundcube ] && [ ! -h /etc/$webserver/conf.d/roundcube ]; then - ln -s /etc/roundcube/apache.conf /etc/$webserver/conf.d/roundcube - fi - restart="$restart $webserver" - done - - db_get roundcube/restart-webserver || true - res="$RET" - db_stop || true - if [ "$res" = "true" ]; then - for webserver in $restart; do - webserver=${webserver%,} - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d $webserver restart - else - /etc/init.d/$webserver restart - fi - done - fi - - chown -R www-data:adm /var/log/roundcube - chmod -R 750 /var/log/roundcube - chown -R www-data:www-data /var/lib/roundcube/temp - chmod -R 750 /var/lib/roundcube/temp - chown www-data:adm /var/lib/roundcube/skins - - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - - -#DEBHELPER# - -exit 0 - - diff --git a/debian/postrm b/debian/postrm deleted file mode 100644 index 9159d97..0000000 --- a/debian/postrm +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh -# postrm script for roundcube -# -# see: dh_installdeb(1) - -set -e - -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi -if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then - . /usr/share/dbconfig-common/dpkg/postrm - dbc_go roundcube $@ -fi - -case "$1" in - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - ;; - - remove) - - # Handling web server reconfiguration - db_get roundcube/reconfigure-webserver - webservers="$RET" - restart="" - - for webserver in $webservers; do - webserver=${webserver%,} - - case "$webserver" in - apache|apache-perl|apache-ssl|apache2) - rm -f /etc/$webserver/conf.d/roundcube - test -x /usr/sbin/$webserver || continue - restart="$restart $webserver" - ;; - *) - ;; - esac - done - - db_get roundcube/restart-webserver - res="$RET" - db_stop || true - if [ "$res" = "true" ]; then - for webserver in $restart; do - webserver=${webserver%,} - if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d $webserver restart - else - /etc/init.d/$webserver restart - fi - done - fi - ;; - - purge) - rm -f /etc/roundcube/debian-db.php - if which ucf >/dev/null 2>&1; then - ucf --purge /etc/roundcube/debian-db.php - ucf --purge /etc/roundcube/main.inc.php - fi - rm -f /etc/roundcube/main.inc.php - rm -rf /var/log/roundcube - rm -rf /var/lib/roundcube - ;; - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 - - diff --git a/debian/prerm b/debian/prerm deleted file mode 100644 index 5004518..0000000 --- a/debian/prerm +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# prerm script for roundcube -# -# see: dh_installdeb(1) - -set -e - -. /usr/share/debconf/confmodule -. /usr/share/dbconfig-common/dpkg/prerm -dbc_go roundcube $@ - -case "$1" in - remove|upgrade|deconfigure) - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 - - diff --git a/debian/roundcube-core.README.Debian b/debian/roundcube-core.README.Debian new file mode 100644 index 0000000..ec5294b --- /dev/null +++ b/debian/roundcube-core.README.Debian @@ -0,0 +1,8 @@ +For better compatibility, the schema used for MySQL is the one +targeted at MySQL 4.0, not the one for MySQL 4.1 or MySQL 5.x. + +To use tinymce editor: + - set $rcmail_config['enable_htmleditor'] to TRUE in + /etc/roundcube/main.inc.php + + -- Vincent Bernat , Mon, 29 Oct 2007 21:39:09 +0100 diff --git a/debian/roundcube-core.config b/debian/roundcube-core.config new file mode 100644 index 0000000..c5ef209 --- /dev/null +++ b/debian/roundcube-core.config @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_input medium roundcube/hosts || true +db_go || true + +# Retrieve all available languages +instd_langs=$(echo /usr/share/roundcube/program/localization/*/messages.inc | \ + sed 's+[^ ]*/\([^ ]*\)/messages.inc+\1,+g' | sed 's+,$++') +# Retrieve the old list +db_metaget roundcube/language languages && oldchoices="$RET" +if [ ! "$oldchoices" ] || [ "$instd_langs" != "$oldchoices" ]; then + db_subst roundcube/language languages $instd_langs + db_fset roundcube/language seen false + # Try to guess the locale + locale=$(echo $LANG | sed 's/[@\.].*//') + if [ -d /usr/share/roundcube/program/localization/$locale ]; then + db_set roundcube/language $locale + else + locale=$(echo $locale | sed 's/_.*//') + if [ -d /usr/share/roundcube/program/localization/$locale ]; then + db_set roundcube/language $locale + else + db_set roundcube/language en_US + fi + fi +fi +# Ask the question +db_input medium roundcube/language || true +db_go || true + +if [ -f /usr/share/dbconfig-common/dpkg/config ]; then + dbc_dbtypes="mysql, pgsql, sqlite" + dbc_authmethod_user="password" + . /usr/share/dbconfig-common/dpkg/config + dbc_go roundcube $@ +fi + +db_input medium roundcube/reconfigure-webserver || true +db_go || true +db_input medium roundcube/restart-webserver || true +db_go || true diff --git a/debian/roundcube-core.cron.daily b/debian/roundcube-core.cron.daily new file mode 100644 index 0000000..4b071ca --- /dev/null +++ b/debian/roundcube-core.cron.daily @@ -0,0 +1,9 @@ +#!/bin/sh + +MAX_TMPFILE_LIFETIME=5 +# MAX_TMPFILE_LIFETIME can be overridden in this file +if [ -r /etc/default/roundcube ]; then + . /etc/default/roundcube +fi + +find /var/lib/roundcube/temp -type f -mtime +$MAX_TMPFILE_LIFETIME -print0 | xargs -0 -r rm diff --git a/debian/roundcube-core.default b/debian/roundcube-core.default new file mode 100644 index 0000000..67e646d --- /dev/null +++ b/debian/roundcube-core.default @@ -0,0 +1,3 @@ +# Uncomment the following line to alter the default delay to clean +# temporary directory /var/lib/roundcube/temp +# MAX_TMPFILE_LIFETIME=5 diff --git a/debian/roundcube-core.dirs b/debian/roundcube-core.dirs new file mode 100644 index 0000000..2bcbe8c --- /dev/null +++ b/debian/roundcube-core.dirs @@ -0,0 +1,9 @@ +usr/share/roundcube +usr/share/dbconfig-common/data/roundcube/install +usr/share/dbconfig-common/data/roundcube/upgrade/mysql +usr/share/dbconfig-common/data/roundcube/upgrade/pgsql +usr/share/dbconfig-common/data/roundcube/upgrade/sqlite +etc/roundcube +var/log/roundcube +var/lib/roundcube/config +etc/default diff --git a/debian/roundcube-core.docs b/debian/roundcube-core.docs new file mode 100644 index 0000000..c42dfaf --- /dev/null +++ b/debian/roundcube-core.docs @@ -0,0 +1,2 @@ +README +UPGRADING diff --git a/debian/roundcube-core.install b/debian/roundcube-core.install new file mode 100644 index 0000000..e025be8 --- /dev/null +++ b/debian/roundcube-core.install @@ -0,0 +1,3 @@ +index.php program/ usr/share/roundcube +skins temp var/lib/roundcube +debian/conf/* etc/roundcube diff --git a/debian/roundcube-core.links b/debian/roundcube-core.links new file mode 100644 index 0000000..812c7a4 --- /dev/null +++ b/debian/roundcube-core.links @@ -0,0 +1,8 @@ +etc/roundcube/main.inc.php var/lib/roundcube/config/main.inc.php +etc/roundcube/db.inc.php var/lib/roundcube/config/db.inc.php +var/lib/roundcube/temp usr/share/roundcube/temp +var/lib/roundcube/skins usr/share/roundcube/skins +var/lib/roundcube/config usr/share/roundcube/config +var/log/roundcube var/lib/roundcube/logs +var/lib/roundcube/logs usr/share/roundcube/logs +usr/share/roundcube/main.inc.php.dist usr/share/doc/roundcube/main.inc.php.dist diff --git a/debian/roundcube-core.logrotate b/debian/roundcube-core.logrotate new file mode 100644 index 0000000..9b6c0a9 --- /dev/null +++ b/debian/roundcube-core.logrotate @@ -0,0 +1,6 @@ +/var/log/roundcube/sendmail /var/log/roundcube/errors { + weekly + rotate 4 + compress + missingok +} diff --git a/debian/roundcube-core.postinst b/debian/roundcube-core.postinst new file mode 100644 index 0000000..33d6912 --- /dev/null +++ b/debian/roundcube-core.postinst @@ -0,0 +1,164 @@ +#!/bin/sh +# postinst script for roundcube +# +# see: dh_installdeb(1) + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/postinst +dbc_generate_include=php:/etc/roundcube/debian-db.php +dbc_generate_include_owner="www-data:www-data" +dbc_generate_include_perms="660" +dbc_dbfile_owner="www-data:www-data" +dbc_dbfile_perms="0660" +dbc_dbuser=roundcube +dbc_dbname=roundcube + +dbc_go roundcube $@ + +case "$1" in + configure) + + # From 0.1-beta2.2 to 0.1-rc1, a column was added to table + # `identities'. For MySQL and PostgreSQL, this is handled by + # dbconfig-common but for sqlite, there is no way to add a + # column to a table. Therefore, we dump here the table and add + # the column. + [ "$dbc_upgrade" = "true" ] && { + case "$dbc_dbtype" in + sqlite) + db="${dbc_basepath}/${dbc_dbname}" + # OK, we need to check if the table contains html_signature + if ! sqlite "$db" '.schema identities' | grep -q html_signature; then + # We need to add it + echo -n "Need to upgrade 'identities' table in $db... " + upgrade_tmp=$(mktemp -t roundcube.sqlite.XXXXXXXXXX) + ( + cat < $upgrade_tmp + sqlite "$db" < $upgrade_tmp + rm $upgrade_tmp + echo "OK" + fi + ;; + *) + # Do nothing + ;; + esac + } + + CONFFILE=/etc/roundcube/main.inc.php + touch $CONFFILE.ucftmp + chmod 640 $CONFFILE.ucftmp + + db_get roundcube/hosts || true + hosts="$RET" + if [ "$hosts" != "" ]; then + hosts="array(\"$(echo $hosts | sed 's/ /\",\"/g')\")" + else + hosts="''" + fi + + db_get roundcube/language || true + language="$RET" + + # Get current 3DES key from /etc/roundcube/main.inc.php + [ -f /etc/roundcube/main.inc.php ] && { + deskey=$(sed -n "s+^\$rcmail_config\['des_key'\] = '\(.*\)';\$+\1+p" \ + /etc/roundcube/main.inc.php) + } + # If this is the default key, forget it ! + [ "$deskey" = "rcmail-!24ByteDESkey*Str" ] && unset deskey + # Generate a new one + while [ -z "$deskey" ]; do + deskey=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | \ + tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') + done + + # Put hosts, language and key in main.inc.php + cat /usr/share/roundcube/main.inc.php.dist | \ + sed -e "s+^\(\$rcmail_config\['default_host'\] = \)''\(;\)\$+\1${hosts}\2+" \ + -e "s+^\(\$rcmail_config\['des_key'\] = '\).*\(';\)\$+\1$deskey\2+" \ + -e "s+^\(\$rcmail_config\['locale_string'\] = '\).*\(';\)\$+\1${language}\2+" >> $CONFFILE.ucftmp + + ucf --debconf-ok $CONFFILE.ucftmp $CONFFILE + chown root:www-data $CONFFILE + rm -f $CONFFILE.ucftmp + + # Handle webserver reconfiguration/restart ; stolen from zabbix package + db_get roundcube/reconfigure-webserver || true + webservers="$RET" + restart="" + + for webserver in $webservers; do + webserver=${webserver%,} + test -x /usr/sbin/$webserver || continue + + if [ ! -f /etc/$webserver/conf.d/roundcube ] && [ ! -h /etc/$webserver/conf.d/roundcube ]; then + ln -s /etc/roundcube/apache.conf /etc/$webserver/conf.d/roundcube + fi + restart="$restart $webserver" + done + + db_get roundcube/restart-webserver || true + res="$RET" + db_stop || true + if [ "$res" = "true" ]; then + for webserver in $restart; do + webserver=${webserver%,} + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver restart + else + /etc/init.d/$webserver restart + fi + done + fi + + chown -R www-data:adm /var/log/roundcube + chmod -R 750 /var/log/roundcube + chown -R www-data:www-data /var/lib/roundcube/temp + chmod -R 750 /var/lib/roundcube/temp + chown www-data:adm /var/lib/roundcube/skins + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0 + + diff --git a/debian/roundcube-core.postrm b/debian/roundcube-core.postrm new file mode 100644 index 0000000..9159d97 --- /dev/null +++ b/debian/roundcube-core.postrm @@ -0,0 +1,76 @@ +#!/bin/sh +# postrm script for roundcube +# +# see: dh_installdeb(1) + +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi +if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then + . /usr/share/dbconfig-common/dpkg/postrm + dbc_go roundcube $@ +fi + +case "$1" in + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + remove) + + # Handling web server reconfiguration + db_get roundcube/reconfigure-webserver + webservers="$RET" + restart="" + + for webserver in $webservers; do + webserver=${webserver%,} + + case "$webserver" in + apache|apache-perl|apache-ssl|apache2) + rm -f /etc/$webserver/conf.d/roundcube + test -x /usr/sbin/$webserver || continue + restart="$restart $webserver" + ;; + *) + ;; + esac + done + + db_get roundcube/restart-webserver + res="$RET" + db_stop || true + if [ "$res" = "true" ]; then + for webserver in $restart; do + webserver=${webserver%,} + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d $webserver restart + else + /etc/init.d/$webserver restart + fi + done + fi + ;; + + purge) + rm -f /etc/roundcube/debian-db.php + if which ucf >/dev/null 2>&1; then + ucf --purge /etc/roundcube/debian-db.php + ucf --purge /etc/roundcube/main.inc.php + fi + rm -f /etc/roundcube/main.inc.php + rm -rf /var/log/roundcube + rm -rf /var/lib/roundcube + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + diff --git a/debian/roundcube-core.prerm b/debian/roundcube-core.prerm new file mode 100644 index 0000000..5004518 --- /dev/null +++ b/debian/roundcube-core.prerm @@ -0,0 +1,29 @@ +#!/bin/sh +# prerm script for roundcube +# +# see: dh_installdeb(1) + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/prerm +dbc_go roundcube $@ + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rules b/debian/rules index 4d4aaea..4c71ac6 100755 --- a/debian/rules +++ b/debian/rules @@ -7,32 +7,30 @@ include /usr/share/cdbs/1/rules/patchsys-quilt.mk # DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean # Then check manually if everything's ok -binary-install/roundcube:: +binary-install/roundcube-core:: # Symlink all that is in /usr/share/roundcube to /var/lib/roundcube - find debian/roundcube/usr/share/roundcube -maxdepth 1 -mindepth 1 | \ + find debian/roundcube-core/usr/share/roundcube -maxdepth 1 -mindepth 1 | \ while read i; do \ if [ ! -L "$$i" ]; then \ - dh_link "`echo "$$i" | sed -e s#debian/roundcube/##`" \ - "`echo "$$i" | sed -e s#debian/roundcube/usr/share/roundcube/#var/lib/roundcube/#`"; \ + dh_link -proundcube-core "`echo "$$i" | sed -e s#debian/roundcube-core/##`" \ + "`echo "$$i" | sed -e s#debian/roundcube-core/usr/share/roundcube/#var/lib/roundcube/#`"; \ fi \ done # Install config/db.inc.php.dist - install -m 0640 $(CURDIR)/config/db.inc.php.dist $(CURDIR)/debian/roundcube/etc/roundcube/db.inc.php - install -m 0640 $(CURDIR)/config/main.inc.php.dist $(CURDIR)/debian/roundcube/usr/share/roundcube + install -m 0640 $(CURDIR)/config/db.inc.php.dist $(CURDIR)/debian/roundcube-core/etc/roundcube/db.inc.php + install -m 0640 $(CURDIR)/config/main.inc.php.dist $(CURDIR)/debian/roundcube-core/usr/share/roundcube # Install empty tables and updates for each db type - install -m 0644 $(CURDIR)/SQL/mysql.initial.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/install/mysql - install -m 0644 $(CURDIR)/SQL/mysql.update.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/upgrade/mysql/0.1~rc1~dfsg-1 - install -m 0644 $(CURDIR)/SQL/postgres.initial.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/install/pgsql - install -m 0644 $(CURDIR)/SQL/postgres.update.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/upgrade/pgsql/0.1~rc1~dfsg-1 - install -m 0644 $(CURDIR)/SQL/sqlite.initial.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/install/sqlite - install -m 0644 $(CURDIR)/SQL/sqlite.update.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/upgrade/sqlite/0.1~rc1~dfsg-1 + install -m 0644 $(CURDIR)/SQL/mysql.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/mysql + install -m 0644 $(CURDIR)/SQL/mysql.update.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/mysql/0.1~rc1~dfsg-1 + install -m 0644 $(CURDIR)/SQL/postgres.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/pgsql + install -m 0644 $(CURDIR)/SQL/postgres.update.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/pgsql/0.1~rc1~dfsg-1 + install -m 0644 $(CURDIR)/SQL/sqlite.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/sqlite + install -m 0644 $(CURDIR)/SQL/sqlite.update.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/sqlite/0.1~rc1~dfsg-1 # Some files are executable while not being scripts or binary... - find $(CURDIR)/debian/roundcube/usr/share/roundcube/program/localization -type f -print0 | xargs -0 chmod -x + find $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/localization -type f -print0 | xargs -0 chmod -x # Remove files shipped in tinymce package - rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/js/tiny_mce - for f in colorpicker.css editor_content.css editor_popup.css editor_ui.css; do \ - rm $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/$$f; \ - done + rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/tiny_mce + dh_link -proundcube-core usr/share/tinymce/www usr/share/roundcube/program/js/tiny_mce clean:: debconf-updatepo