]> git.donarmstrong.com Git - roundcube.git/commitdiff
Moved modifications on db.inc.php to a patch, added patch support to build files
authorRomain Beauxis <toots@rastageeks.org>
Tue, 13 Mar 2007 14:08:37 +0000 (14:08 +0000)
committerRomain Beauxis <toots@rastageeks.org>
Tue, 13 Mar 2007 14:08:37 +0000 (14:08 +0000)
debian/conf/apache.conf
debian/conf/db.inc.php [deleted file]
debian/control
debian/patches/dbconfig-common_support.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/rules

index 9154a86d0b63d292c956cc8121a00d9cf35fbd49..1f5cffa74945d9cd16fde5c69c89d534c4ddd000 100644 (file)
         AllowOverride None
 </Directory>
 
+<Directory /var/lib/roundcube/temp>
+        Options -FollowSymLinks
+        AllowOverride None
+       Order allow,deny
+       Deny from all
+</Directory>
+
+
diff --git a/debian/conf/db.inc.php b/debian/conf/db.inc.php
deleted file mode 100644 (file)
index 81b1083..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | Configuration file for database access                                |
- |                                                                       |
- | This file is part of the RoundCube Webmail client                     |
- | Copyright (C) 2005, RoundCube Dev. - Switzerland                      |
- | Licensed under the GNU GPL                                            |
- |                                                                       |
- +-----------------------------------------------------------------------+
-
-*/
-
-$rcmail_config = array();
-
-/* Do not set db_dsnw here, use dpkg-reconfigure roundcube to configure database ! */
-
-include_once("/etc/roundcube/debian-db.php");
-
-switch ($dbtype) {
- case "sqlite":
-   $rcmail_config['db_dsnw'] = "sqlite:///$basepath/$dbname?mode=0640";
-   break;
- default:
-   if ($dbport != '') $dbport=":$dbport";
-   if ($dbserver == '') $dbserver="localhost";
-   $rcmail_config['db_dsnw'] = "$dbtype://$dbuser:$dbpass@$dbserver$dbport/$dbname";
-   break;
- }
-
-// PEAR database DSN for read only operations (if empty write database will be used)
-// useful for database replication
-$rcmail_config['db_dsnr'] = '';
-
-// database backend to use (only db or mdb2 are supported)
-$rcmail_config['db_backend'] = 'db';
-
-// maximum length of a query in bytes
-$rcmail_config['db_max_length'] = 512000;  // 500K
-
-// use persistent db-connections
-$rcmail_config['db_persistent'] = TRUE;
-
-
-// you can define specific table names used to store webmail data
-$rcmail_config['db_table_users'] = 'users';
-
-$rcmail_config['db_table_identities'] = 'identities';
-
-$rcmail_config['db_table_contacts'] = 'contacts';
-
-$rcmail_config['db_table_session'] = 'session';
-
-$rcmail_config['db_table_cache'] = 'cache';
-
-$rcmail_config['db_table_messages'] = 'messages';
-
-
-// you can define specific sequence names used in PostgreSQL
-$rcmail_config['db_sequence_users'] = 'user_ids';
-
-$rcmail_config['db_sequence_identities'] = 'identity_ids';
-
-$rcmail_config['db_sequence_contacts'] = 'contact_ids';
-
-$rcmail_config['db_sequence_cache'] = 'cache_ids';
-
-$rcmail_config['db_sequence_messages'] = 'message_ids';
-
-
-// end db config file
-?>
index c210237aec34fbca46c558b1147e886c01eac0ec..4fb546dbf5a699a506d7f6ae004201d78deb89b2 100644 (file)
@@ -3,7 +3,7 @@ Section: web
 Priority: extra
 Maintainer: Debian Roundcube Maintainers <pkg-roundcube-maintainers@lists.alioth.debian.org>
 Uploaders: Vincent Bernat <bernat@luffy.cx>, Romain Beauxis <toots@rastageeks.org>
-Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5)
+Build-Depends: debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27-1)
 Build-Depends-Indep: po-debconf
 Standards-Version: 3.7.2
 
diff --git a/debian/patches/dbconfig-common_support.patch b/debian/patches/dbconfig-common_support.patch
new file mode 100644 (file)
index 0000000..0394533
--- /dev/null
@@ -0,0 +1,31 @@
+--- roundcube_0.1~beta2.2/config/db.inc.php.dist        2006-03-20 23:08:51.000000000 +0100
++++ roundcube_0.1~beta2.2/config/db.inc.php.dist  2007-03-13 14:33:38.000000000 +0100
+@@ -14,13 +14,20 @@
+
+ $rcmail_config = array();
+
+-// PEAR database DSN for read/write operations
+-// format is db_provider://user:password@host/databse
+-// currentyl suported db_providers: mysql, sqlite
+-
+-$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
+-// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
+-// sqlite example: 'sqlite://./sqlite.db?mode=0646';
++/* Do not set db_dsnw here, use dpkg-reconfigure roundcube to configure database ! */
++
++include_once("/etc/roundcube/debian-db.php");
++
++switch ($dbtype) {
++ case "sqlite":
++   $rcmail_config['db_dsnw'] = "sqlite:///$basepath/$dbname?mode=0640";
++   break;
++ default:
++   if ($dbport != '') $dbport=":$dbport";
++   if ($dbserver == '') $dbserver="localhost";
++   $rcmail_config['db_dsnw'] = "$dbtype://$dbuser:$dbpass@$dbserver$dbport/$dbname";
++   break;
++ }
+
+ // PEAR database DSN for read only operations (if empty write database will be used)
+ // useful for database replication
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..f86a938
--- /dev/null
@@ -0,0 +1 @@
+dbconfig-common_support.patch
index 02058c104b53e6a59d7400d247a31b8eb61376ef..875d56ccada239e44b3c2bbc430682eee7cb93d1 100755 (executable)
@@ -1,18 +1,29 @@
 #!/usr/bin/make -f
 
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 
 # In order to regenerate 'debian/control' :
 #    DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean
 # Then check manually if everything's ok
 
 binary-install/roundcube::
-       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/{Auth,DB,DB.php,Mail,Net,PEAR.php}
+       # Removing PEAR classes that are provided via strd packages
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/Auth
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/DB
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/DB.php
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/Mail
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/Net
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/PEAR.php
+       # 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/#`"; \
        done
+       # Install config/db.inc.php.dist
+       install -m 0640 $(CURDIR)/config/db.inc.php.dist $(CURDIR)/debian/roundcube/etc/roundcube/db.inc.php
+       # 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
        chmod -x $(CURDIR)/debian/roundcube/var/lib/roundcube/skins/default/common.css