From: Vincent Bernat Date: Sun, 20 May 2007 11:59:44 +0000 (+0200) Subject: Imported Debian patch 0.1~rc1~dfsg-1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a81bad40bfad52e3fde5512f2017d256c495a4b3;p=roundcube.git Imported Debian patch 0.1~rc1~dfsg-1 --- diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..160a9c6 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,11 @@ +Debian does not allow complex dependencies. Upon install, you need to +check that you have the correct packages installed. + +If you want to use MySQL, you need mysql-client and php5-mysql. +For PostgreSQL, you need postgresql-client and php5-pgsql. +For SQLite, you need sqlite and php5-sqlite. + +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. + + -- Vincent Bernat , Tue, 22 May 2007 21:17:27 +0200 diff --git a/debian/changelog b/debian/changelog index e7230af..b5a9a6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +roundcube (0.1~rc1~dfsg-1) unstable; urgency=low + + [ Vincent Bernat ] + * New upstream release + * Update script for sqlite in postinst + [ Romain Beauxis ] + * Fixed dh_link calls + Closes: #423824 + * Added custom patch to use php unix timestamp support + with sqlite since UNIX_TIMESTAMP is not supported by sqlite. + * Dropped php4 dependencies + + -- Vincent Bernat Sun, 20 May 2007 13:59:44 +0200 + roundcube (0.1~beta2.2~dfsg-2) unstable; urgency=low * Fix a security issue by disallowing access to logs. diff --git a/debian/control b/debian/control index 1611b69..f7b1505 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Standards-Version: 3.7.2 Package: roundcube Architecture: all -Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5 | php4, php5-mysql | php4-mysql | php5-pgsql | php4-pgsql | php5-sqlite | php4-sqlite, php5-mcrypt | php4-mcrypt, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, mysql-client | virtual-mysql-client | postgresql-client-8.1 | postgresql-client | sqlite, ${misc:Depends} +Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5, php5-mysql | php5-pgsql | php5-sqlite, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, mysql-client | virtual-mysql-client | postgresql-client-8.1 | postgresql-client | sqlite, ${misc:Depends} Suggests: mysql-server | posgresql-server Description: modern, skinnable, AJAX based webmail solution for IMAP servers RoundCube Webmail is a browser-based multilingual IMAP client with an diff --git a/debian/control.in b/debian/control.in index 1260204..0974d7d 100644 --- a/debian/control.in +++ b/debian/control.in @@ -9,7 +9,7 @@ Standards-Version: 3.7.2 Package: roundcube Architecture: all -Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5 | php4, php5-mysql | php4-mysql | php5-pgsql | php4-pgsql | php5-sqlite | php4-sqlite, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, mysql-client | virtual-mysql-client | postgresql-client-8.1 | postgresql-client | sqlite, ${misc:Depends} +Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5, php5-mysql | php5-pgsql | php5-sqlite, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, mysql-client | virtual-mysql-client | postgresql-client-8.1 | postgresql-client | sqlite, ${misc:Depends} Suggests: mysql-server | posgresql-server Description: modern, skinnable, AJAX based webmail solution for IMAP servers RoundCube Webmail is a browser-based multilingual IMAP client with an diff --git a/debian/dirs b/debian/dirs index c337f5d..2bcbe8c 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,5 +1,8 @@ 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 diff --git a/debian/patches/correct_install_path.patch b/debian/patches/correct_install_path.patch index 1b13402..35d8eaf 100644 --- a/debian/patches/correct_install_path.patch +++ b/debian/patches/correct_install_path.patch @@ -1,9 +1,9 @@ ---- roundcube-0.1~beta2.2/index.php 2006-12-22 23:26:24.000000000 +0100 -+++ roundcube-0.1~beta2.2/index.php 2007-03-13 15:36:21.000000000 +0100 -@@ -46,7 +46,7 @@ - $CHARSET = 'UTF-8'; +--- roundcubemail-0.1~rc1~dfsg.orig/index.php~ 2007-05-18 15:11:22.000000000 +0200 ++++ roundcubemail-0.1~rc1~dfsg.orig/index.php 2007-05-20 14:12:35.000000000 +0200 +@@ -47,7 +47,7 @@ + + // define global vars $OUTPUT_TYPE = 'html'; - $JS_OBJECT_NAME = 'rcmail'; -$INSTALL_PATH = dirname(__FILE__); +$INSTALL_PATH = '/var/lib/roundcube'; $MAIN_TASKS = array('mail','settings','addressbook','logout'); diff --git a/debian/patches/dbconfig-common_support.patch b/debian/patches/dbconfig-common_support.patch index 0394533..8e1f71d 100644 --- a/debian/patches/dbconfig-common_support.patch +++ b/debian/patches/dbconfig-common_support.patch @@ -6,7 +6,7 @@ -// PEAR database DSN for read/write operations -// format is db_provider://user:password@host/databse --// currentyl suported db_providers: mysql, sqlite +-// currentyl suported db_providers: mysql, pgsql, sqlite - -$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail'; -// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail'; diff --git a/debian/patches/rfc2822_date.patch b/debian/patches/rfc2822_date.patch deleted file mode 100644 index a5b63a0..0000000 --- a/debian/patches/rfc2822_date.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- roundcubemail-0.1beta2/program/steps/mail/sendmail.inc~ 2006-08-01 00:51:23.000000000 +0200 -+++ roundcubemail-0.1beta2/program/steps/mail/sendmail.inc 2007-04-08 14:58:54.000000000 +0200 -@@ -107,7 +107,7 @@ - $identity_arr['string'] = $from; - - // compose headers array --$headers = array('Date' => date('D, j M Y G:i:s O'), -+$headers = array('Date' => date('D, j M Y H:i:s O'), - 'From' => $identity_arr['string'], - 'To' => rcube_charset_convert($mailto, $input_charset, $message_charset)); - diff --git a/debian/patches/series b/debian/patches/series index a03f782..4422224 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,4 @@ dbconfig-common_support.patch correct_install_path.patch use_mcrypt.patch -rfc2822_date.patch +use_php_timestamp_implementation_for_sqlite.patch diff --git a/debian/patches/use_php_timestamp_implementation_for_sqlite.patch b/debian/patches/use_php_timestamp_implementation_for_sqlite.patch new file mode 100644 index 0000000..4e135ad --- /dev/null +++ b/debian/patches/use_php_timestamp_implementation_for_sqlite.patch @@ -0,0 +1,37 @@ +diff -urN roundcube-0.1~rc1~dfsg.old/program/include/rcube_db.inc roundcube-0.1~rc1~dfsg/program/include/rcube_db.inc +--- roundcube-0.1~rc1~dfsg.old/program/include/rcube_db.inc 2007-05-24 21:27:53.000000000 +0200 ++++ roundcube-0.1~rc1~dfsg/program/include/rcube_db.inc 2007-05-24 21:29:36.000000000 +0200 +@@ -27,6 +27,13 @@ + */ + require_once('DB.php'); + ++/* User function for getting timestamps under sqlite */ ++function custom_date_to_timestamp($data) { ++ $date = strptime($data,'%Y-%m-%d %H:%M:%S'); ++ return mktime($date['tm_hour'],$date['tm_min'],$date['tm_sec'],$date['tm_mon']+1,$date['tm_mday'],1900 + $date['tm_year']); ++} ++ ++ + + /** + * Database independent query interface +@@ -152,6 +159,9 @@ + $dsn = $this->db_dsnw; + + $this->db_handle = $this->dsn_connect($dsn); ++ if ($this->db_provider == "sqlite") { ++ sqlite_create_function($this->db_handle->connection,'custom_date_to_timestamp','custom_date_to_timestamp',1); ++ } + $this->db_connected = $this->db_handle ? TRUE : FALSE; + } + +@@ -462,6 +472,9 @@ + case 'mssql': + return "datediff(s, '1970-01-01 00:00:00', $field)"; + ++ case 'sqlite': ++ return "custom_date_to_timestamp($field)"; ++ + default: + return "UNIX_TIMESTAMP($field)"; + } diff --git a/debian/postinst b/debian/postinst index b7996ff..80b0827 100644 --- a/debian/postinst +++ b/debian/postinst @@ -20,6 +20,58 @@ 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 diff --git a/debian/rules b/debian/rules index 61bb9ec..96e7b8d 100755 --- a/debian/rules +++ b/debian/rules @@ -18,15 +18,20 @@ binary-install/roundcube:: # Symlink all that is in /usr/share/roundcube to /var/lib/roundcube find debian/roundcube/usr/share/roundcube -maxdepth 1 -mindepth 1 | \ while read i; do \ - dh_link "`echo "$$i" | sed -e s#debian/roundcube/##`" \ - "`echo "$$i" | sed -e s#debian/roundcube/usr/share/roundcube/#var/lib/roundcube/#`"; \ + 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/#`"; \ + 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 empty tables for each db type + # 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/sqlite.initial.sql $(CURDIR)/debian/roundcube/usr/share/dbconfig-common/data/roundcube/install/sqlite + 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 # Some files are executable while not being scripts or binary... chmod -x $(CURDIR)/debian/roundcube/usr/share/roundcube/program/include/rcube_mdb2.inc chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/images/icons/plus.gif @@ -37,6 +42,7 @@ binary-install/roundcube:: chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/images/buttons/down_arrow.png chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/googiespell.css chmod -x $(CURDIR)/debian/roundcube/usr/share/roundcube/program/js/googiespell.js + find $(CURDIR)/debian/roundcube/usr/share/roundcube/program/localization -type f -print0 | xargs -0 chmod -x clean:: debconf-updatepo diff --git a/debian/watch b/debian/watch index a48b921..a68e873 100644 --- a/debian/watch +++ b/debian/watch @@ -2,4 +2,4 @@ version=3 # Uncomment to find new files on sourceforge, for debscripts >= 2.9 -http://sf.net/roundcube/roundcube-(.*)\.tar\.gz +http://sf.net/roundcubemail/roundcubemail-([\d\.]+.*)\.tar\.gz