]> git.donarmstrong.com Git - roundcube.git/commitdiff
Imported Debian patch 0.1~rc1~dfsg-1
authorVincent Bernat <bernat@luffy.cx>
Sun, 20 May 2007 11:59:44 +0000 (13:59 +0200)
committerJérémy Bobbio <lunar@debian.org>
Sat, 18 Jun 2011 16:25:24 +0000 (18:25 +0200)
13 files changed:
debian/README.Debian [new file with mode: 0644]
debian/changelog
debian/control
debian/control.in
debian/dirs
debian/patches/correct_install_path.patch
debian/patches/dbconfig-common_support.patch
debian/patches/rfc2822_date.patch [deleted file]
debian/patches/series
debian/patches/use_php_timestamp_implementation_for_sqlite.patch [new file with mode: 0644]
debian/postinst
debian/rules
debian/watch

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..160a9c6
--- /dev/null
@@ -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 <bernat@luffy.cx>, Tue, 22 May 2007 21:17:27 +0200
index e7230af51d16d8169ff908df06ff4a0f6ff0b36e..b5a9a6eba07e800eb272de3678de16b0a93737eb 100644 (file)
@@ -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 <bernat@luffy.cx>  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.
index 1611b69921fb6824c7f003e5c4a78a71b9eb248a..f7b1505078818ae503e55908bd7a18465ef1a3b6 100644 (file)
@@ -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
index 12602041707594ed446fe7e425adf93627ea23f7..0974d7dbc9c1c67ad53cfbe57e48d30f5500d92b 100644 (file)
@@ -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
index c337f5d358760ac813d0528322960bbabe81ba15..2bcbe8c8985b7fb7a921130fcced91ead94c3a44 100644 (file)
@@ -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
index 1b134027dd4bd89bd2ccfa1636c2b22a2eda7314..35d8eafcfdd15950cbd9247caec9f9d720053678 100644 (file)
@@ -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');
index 0394533ce8322d18367cc918bc640597db83c9f7..8e1f71d3ba2e7a330ab80ffd3806a4bd90c2d00b 100644 (file)
@@ -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 (file)
index a5b63a0..0000000
+++ /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));
index a03f782d5a872b066711cf8cc967a15d14083996..442222483c4f9783fce67573339f15203ed320dc 100644 (file)
@@ -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 (file)
index 0000000..4e135ad
--- /dev/null
@@ -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)";
+       }
index b7996ffe1a728d09e08f6e806649b7b718b7ddb3..80b0827a4ef5e0641a2f7f43a09e5a09d9991b10 100644 (file)
@@ -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 <<EOF
+BEGIN TRANSACTION;
+DROP TABLE identities;
+CREATE TABLE identities (
+  identity_id integer NOT NULL PRIMARY KEY,
+  user_id integer NOT NULL default '0',
+  del tinyint NOT NULL default '0',
+  standard tinyint NOT NULL default '0',
+  name varchar(128) NOT NULL default '',
+  organization varchar(128) default '',
+  email varchar(128) NOT NULL default '',
+  "reply-to" varchar(128) NOT NULL default '',
+  bcc varchar(128) NOT NULL default '',
+  signature text NOT NULL default '',
+  html_signature tinyint NOT NULL default '0'
+);
+
+CREATE INDEX ix_identities_user_id ON identities(user_id);
+
+EOF
+                           # We dump and keep only inserts
+                           sqlite "$db" '.dump identities' | \
+                               awk '/^INSERT INTO/ {start = 1} {if (start == 1) print}' | \
+                               head -n -2 | \
+                               sed 's/^\(INSERT INTO identities \)/\1(identity_id, user_id, del, standard, name, organization, email, "reply-to", bcc, signature) /'
+                           echo 'COMMIT;' ) > $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
index 61bb9ec6a4375236fa291dde9a5c8fbd434e9ca9..96e7b8de8647abadf2972819fa2293c00044b031 100755 (executable)
@@ -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
index a48b921d1d9977ed0f57fefea1900fd2b3c52029..a68e873776700682ac9dc066593db1348924dc6e 100644 (file)
@@ -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