[pkg-kolab] r605 - in kolab-cyrus-imapd/trunk/debian: . patches
petere at alioth.debian.org
petere at alioth.debian.org
Sun Jun 17 21:31:51 UTC 2007
Author: petere
Date: 2007-06-17 21:31:51 +0000 (Sun, 17 Jun 2007)
New Revision: 605
Added:
kolab-cyrus-imapd/trunk/debian/patches/160-kolab-imapd.folderchar.dpatch
Modified:
kolab-cyrus-imapd/trunk/debian/changelog
kolab-cyrus-imapd/trunk/debian/patches/00list
Log:
* Upgrade to Kolab 2.1
- Added imapd.folderchar.patch
Modified: kolab-cyrus-imapd/trunk/debian/changelog
===================================================================
--- kolab-cyrus-imapd/trunk/debian/changelog 2007-06-07 15:02:17 UTC (rev 604)
+++ kolab-cyrus-imapd/trunk/debian/changelog 2007-06-17 21:31:51 UTC (rev 605)
@@ -1,9 +1,14 @@
-kolab-cyrus-imapd (2.2.13-4) unstable; urgency=low
+kolab-cyrus-imapd (2.2.13-4) UNRELEASED; urgency=low
+ [ Benoit Mortier ]
* Changed the order of the admins in cyrus.conf
- -- Benoit Mortier <benoit.mortier at opensides.be> Wed, 06 Jun 2007 12:52:00 +0100
+ [ Peter Eisentraut ]
+ * Upgrade to Kolab 2.1
+ - Added imapd.folderchar.patch
+ -- Peter Eisentraut <petere at debian.org> Sun, 17 Jun 2007 23:21:04 +0200
+
kolab-cyrus-imapd (2.2.13-3) unstable; urgency=low
* Synced against cyrus-imapd package (closes: #410347, #416914)
Modified: kolab-cyrus-imapd/trunk/debian/patches/00list
===================================================================
--- kolab-cyrus-imapd/trunk/debian/patches/00list 2007-06-07 15:02:17 UTC (rev 604)
+++ kolab-cyrus-imapd/trunk/debian/patches/00list 2007-06-17 21:31:51 UTC (rev 605)
@@ -66,3 +66,4 @@
130-kolab-imapd-goodchars.dpatch
140-kolab-ldap.dpatch
150-kolab-auth_unix
+160-kolab-imapd.folderchar.dpatch
Added: kolab-cyrus-imapd/trunk/debian/patches/160-kolab-imapd.folderchar.dpatch
===================================================================
--- kolab-cyrus-imapd/trunk/debian/patches/160-kolab-imapd.folderchar.dpatch (rev 0)
+++ kolab-cyrus-imapd/trunk/debian/patches/160-kolab-imapd.folderchar.dpatch 2007-06-17 21:31:51 UTC (rev 605)
@@ -0,0 +1,146 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 160-imapd.folderchar.dpatch by Peter Eisentraut <petere at debian.org>
+##
+## DP: Kolab upstream's imapd.folderchar.patch
+
+ at DPATCH@
+diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/bsearch.c ./lib/bsearch.c
+--- ../cyrus-imapd-2.2.12.orig/lib/bsearch.c 2003-02-13 21:15:39.000000000 +0100
++++ ./lib/bsearch.c 2006-07-15 22:49:05.000000000 +0200
+@@ -213,3 +213,22 @@ int bsearch_compare(const char *s1, cons
+ s2++;
+ }
+ }
++
++int bsearch_ncompare(const char *s1, int l1, const char *s2, int l2)
++{
++ int min = l1 < l2 ? l1 : l2;
++ int cmp = 0;
++
++ while (min-- > 0 && (cmp = TOCOMPARE(*s1) - TOCOMPARE(*s2)) == 0) {
++ s1++;
++ s2++;
++ }
++ if (min >= 0) {
++ return cmp;
++ } else {
++ if (l2 > l1) return -1;
++ else if (l1 > l2) return 1;
++ else return 0;
++ }
++}
++
+diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/bsearch.h ./lib/bsearch.h
+--- ../cyrus-imapd-2.2.12.orig/lib/bsearch.h 2003-02-13 21:15:39.000000000 +0100
++++ ./lib/bsearch.h 2006-07-14 15:06:24.000000000 +0200
+@@ -51,4 +51,6 @@ extern int bsearch_mem(const char *word,
+
+ extern int bsearch_compare(const char *s1, const char *s2);
+
++extern int bsearch_ncompare(const char *s1, int l1, const char *s2, int l2);
++
+ #endif /* INCLUDED_BSEARCH_H */
+diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/cyrusdb_skiplist.c ./lib/cyrusdb_skiplist.c
+--- ../cyrus-imapd-2.2.12.orig/lib/cyrusdb_skiplist.c 2004-06-08 21:55:17.000000000 +0200
++++ ./lib/cyrusdb_skiplist.c 2006-07-15 22:51:08.000000000 +0200
+@@ -68,6 +68,7 @@
+ #include "retry.h"
+ #include "util.h"
+ #include "xmalloc.h"
++#include "bsearch.h"
+
+ #define PROB (0.5)
+
+@@ -787,24 +788,6 @@ int myclose(struct db *db)
+ return dispose_db(db);
+ }
+
+-static int compare(const char *s1, int l1, const char *s2, int l2)
+-{
+- int min = l1 < l2 ? l1 : l2;
+- int cmp = 0;
+-
+- while (min-- > 0 && (cmp = *s1 - *s2) == 0) {
+- s1++;
+- s2++;
+- }
+- if (min >= 0) {
+- return cmp;
+- } else {
+- if (l1 > l2) return 1;
+- else if (l2 > l1) return -1;
+- else return 0;
+- }
+-}
+-
+ /* returns the offset to the node asked for, or the node after it
+ if it doesn't exist.
+ if previous is set, finds the last node < key */
+@@ -824,7 +807,7 @@ static const char *find_node(struct db *
+
+ for (i = db->curlevel - 1; i >= 0; i--) {
+ while ((offset = FORWARD(ptr, i)) &&
+- compare(KEY(db->map_base + offset), KEYLEN(db->map_base + offset),
++ bsearch_ncompare(KEY(db->map_base + offset), KEYLEN(db->map_base + offset),
+ key, keylen) < 0) {
+ /* move forward at level 'i' */
+ ptr = db->map_base + offset;
+@@ -875,7 +858,7 @@ int myfetch(struct db *db,
+
+ ptr = find_node(db, key, keylen, 0);
+
+- if (ptr == db->map_base || compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
++ if (ptr == db->map_base || bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
+ /* failed to find key/keylen */
+ r = CYRUSDB_NOTFOUND;
+ } else {
+@@ -963,7 +946,7 @@ int myforeach(struct db *db,
+ while (ptr != db->map_base) {
+ /* does it match prefix? */
+ if (KEYLEN(ptr) < (bit32) prefixlen) break;
+- if (prefixlen && compare(KEY(ptr), prefixlen, prefix, prefixlen)) break;
++ if (prefixlen && bsearch_ncompare(KEY(ptr), prefixlen, prefix, prefixlen)) break;
+
+ if (!goodp ||
+ goodp(rock, KEY(ptr), KEYLEN(ptr), DATA(ptr), DATALEN(ptr))) {
+@@ -1116,7 +1099,7 @@ int mystore(struct db *db,
+ newoffset = tp->logend;
+ ptr = find_node(db, key, keylen, updateoffsets);
+ if (ptr != db->map_base &&
+- !compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
++ !bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
+
+ if (!overwrite) {
+ myabort(db, tp); /* releases lock */
+@@ -1282,7 +1265,7 @@ int mydelete(struct db *db,
+
+ ptr = find_node(db, key, keylen, updateoffsets);
+ if (ptr == db->map_base ||
+- !compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
++ !bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
+ /* gotcha */
+ offset = ptr - db->map_base;
+
+@@ -1825,11 +1808,11 @@ static int myconsistent(struct db *db, s
+ const char *q = db->map_base + offset;
+ int cmp;
+
+- cmp = compare(KEY(ptr), KEYLEN(ptr), KEY(q), KEYLEN(q));
++ cmp = bsearch_ncompare(KEY(ptr), KEYLEN(ptr), KEY(q), KEYLEN(q));
+ if (cmp >= 0) {
+ fprintf(stdout,
+ "skiplist inconsistent: %04X: ptr %d is %04X; "
+- "compare() = %d\n",
++ "bsearch_ncompare() = %d\n",
+ ptr - db->map_base,
+ i,
+ offset, cmp);
+@@ -2058,7 +2041,7 @@ static int recovery(struct db *db, int f
+ if (TYPE(ptr) == ADD) {
+ keyptr = find_node(db, KEY(ptr), KEYLEN(ptr), updateoffsets);
+ if (keyptr == db->map_base ||
+- compare(KEY(ptr), KEYLEN(ptr), KEY(keyptr), KEYLEN(keyptr))) {
++ bsearch_ncompare(KEY(ptr), KEYLEN(ptr), KEY(keyptr), KEYLEN(keyptr))) {
+ /* didn't find exactly this node */
+ keyptr = NULL;
+ }
More information about the pkg-kolab-devel
mailing list