From 62277bdebb9eb6039ccc85fe2bec3e316e9a7abd Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 5 Apr 2008 16:16:56 +0000 Subject: [PATCH] New upstream --- debian/changelog | 8 ++++-- debian/patches/dbconfig-common_support.patch | 2 +- debian/patches/mysql-update-fix.patch | 11 ++++++++ debian/patches/series | 1 + debian/rules | 13 +++++++--- debian/sql/mysql/0.1~rc1~dfsg-1 | 21 +++++++++++++++ debian/sql/pgsql/0.1~rc1~dfsg-1 | 12 +++++++++ debian/sql/sqlite/0.1~rc1~dfsg-1 | 27 ++++++++++++++++++++ 8 files changed, 89 insertions(+), 6 deletions(-) create mode 100644 debian/patches/mysql-update-fix.patch create mode 100644 debian/sql/mysql/0.1~rc1~dfsg-1 create mode 100644 debian/sql/pgsql/0.1~rc1~dfsg-1 create mode 100644 debian/sql/sqlite/0.1~rc1~dfsg-1 diff --git a/debian/changelog b/debian/changelog index 4f731e5..8c00831 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,14 @@ -roundcube (0.1-5) unstable; urgency=low +roundcube (0.1.1-1) unstable; urgency=low + * New upstream release + - Copy old SQL upgrade scripts into debian/sql to allow upgrade from + versions older than 0.1 + - Patch new MySQL upgrade script to fix a typo * Debconf translation updates: - Spanish. Closes: #473788 * Depends on php-mail-mime (>= 1.5.0) and drop compatibility patch. - -- Vincent Bernat Sat, 05 Apr 2008 10:22:51 +0200 + -- Vincent Bernat Sat, 05 Apr 2008 18:16:33 +0200 roundcube (0.1-4) unstable; urgency=low diff --git a/debian/patches/dbconfig-common_support.patch b/debian/patches/dbconfig-common_support.patch index 4063b3c..a4be31d 100644 --- a/debian/patches/dbconfig-common_support.patch +++ b/debian/patches/dbconfig-common_support.patch @@ -5,7 +5,7 @@ $rcmail_config = array(); -// PEAR database DSN for read/write operations --// format is db_provider://user:password@host/databse +-// format is db_provider://user:password@host/database -// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql - -$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail'; diff --git a/debian/patches/mysql-update-fix.patch b/debian/patches/mysql-update-fix.patch new file mode 100644 index 0000000..1610b59 --- /dev/null +++ b/debian/patches/mysql-update-fix.patch @@ -0,0 +1,11 @@ +--- roundcubemail-0.1.1-dep/SQL/mysql.update.sql~ 2008-04-05 14:49:21.000000000 +0200 ++++ roundcubemail-0.1.1-dep/SQL/mysql.update.sql 2008-04-05 18:09:10.000000000 +0200 +@@ -5,7 +5,7 @@ + + ALTER TABLE `messages` + DROP INDEX `idx`, +- DROP INDEX `uid` ++ DROP INDEX `uid`; + + ALTER TABLE `cache` + DROP INDEX `cache_key`, diff --git a/debian/patches/series b/debian/patches/series index c1aeafd..2bb76e7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ use_packaged_tinymce.patch use-db-backend.patch correct-magic-path.patch disable-tinymce-spellchecker.patch +mysql-update-fix.patch diff --git a/debian/rules b/debian/rules index 54ba07c..7df32d1 100755 --- a/debian/rules +++ b/debian/rules @@ -19,13 +19,20 @@ binary-install/roundcube-core:: # Install config/db.inc.php.dist 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 + + # Database related files # Install empty tables and updates for each db type 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 + # Database upgrade from latest versions + install -m 0644 $(CURDIR)/SQL/postgres.update.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/pgsql/0.1.1-1 + install -m 0644 $(CURDIR)/SQL/mysql.update.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/mysql/0.1.1-1 + install -m 0644 $(CURDIR)/SQL/sqlite.update.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/sqlite/0.1.1-1 + + # Old database upgrades + cp -r $(CURDIR)/debian/sql/* $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/. + # Some files are executable while not being scripts or binary... find $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/localization -type f -print0 | xargs -0 chmod -x # Remove useless file diff --git a/debian/sql/mysql/0.1~rc1~dfsg-1 b/debian/sql/mysql/0.1~rc1~dfsg-1 new file mode 100644 index 0000000..e904be2 --- /dev/null +++ b/debian/sql/mysql/0.1~rc1~dfsg-1 @@ -0,0 +1,21 @@ +-- RoundCube Webmail update script for MySQL databases +-- Updates from version 0.1-beta and 0.1-beta2 + +TRUNCATE TABLE `messages`; + +ALTER TABLE `messages` + DROP `body`, + DROP INDEX `cache_key`, + ADD `structure` TEXT, + ADD UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`); + +ALTER TABLE `identities` + ADD `html_signature` tinyint(1) default 0 NOT NULL; + +ALTER TABLE `session` CHANGE `ip` `ip` VARCHAR(40) + +-- Uncomment these lines if you're using MySQL 4.1 or higher +-- ALTER TABLE `users` +-- DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci, +-- CHANGE `username` `username` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, +-- CHANGE `alias` `alias` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; diff --git a/debian/sql/pgsql/0.1~rc1~dfsg-1 b/debian/sql/pgsql/0.1~rc1~dfsg-1 new file mode 100644 index 0000000..0d63cf9 --- /dev/null +++ b/debian/sql/pgsql/0.1~rc1~dfsg-1 @@ -0,0 +1,12 @@ +-- RoundCube Webmail update script for Postres databases +-- Updates from version 0.1-beta and older + +ALTER TABLE "messages" DROP body; +ALTER TABLE "messages" ADD structure TEXT; +ALTER TABLE "messages" ADD UNIQUE (user_id, cache_key, uid); + +ALTER TABLE "identities" ADD html_signature INTEGER; +ALTER TABLE "identities" ALTER html_signature SET DEFAULT 0; +UPDATE identities SET html_signature = 0; +ALTER TABLE "identities" ALTER html_signature SET NOT NULL; + diff --git a/debian/sql/sqlite/0.1~rc1~dfsg-1 b/debian/sql/sqlite/0.1~rc1~dfsg-1 new file mode 100644 index 0000000..e725729 --- /dev/null +++ b/debian/sql/sqlite/0.1~rc1~dfsg-1 @@ -0,0 +1,27 @@ +-- RoundCube Webmail update script for SQLite databases +-- Updates from version 0.1-beta2 and older + +DROP TABLE messages; + +CREATE TABLE messages ( + message_id integer NOT NULL PRIMARY KEY, + user_id integer NOT NULL default '0', + del tinyint NOT NULL default '0', + cache_key varchar(128) NOT NULL default '', + created datetime NOT NULL default '0000-00-00 00:00:00', + idx integer NOT NULL default '0', + uid integer NOT NULL default '0', + subject varchar(255) NOT NULL default '', + "from" varchar(255) NOT NULL default '', + "to" varchar(255) NOT NULL default '', + cc varchar(255) NOT NULL default '', + date datetime NOT NULL default '0000-00-00 00:00:00', + size integer NOT NULL default '0', + headers text NOT NULL, + structure text +); + +CREATE INDEX ix_messages_user_id ON messages(user_id); +CREATE INDEX ix_messages_cache_key ON messages(cache_key); +CREATE INDEX ix_messages_idx ON messages(idx); +CREATE INDEX ix_messages_uid ON messages(uid); -- 2.39.2