[packaging] Branch 'feature-el5-kolab-2.4' - 0001-fix-sync-when-new-message-appears-at-both-ends.patch 0002-Bug-3489-fix-quotalegacy-handing-of-prefixed-foreach.patch 0003-quotalegacy-use-void-for-compar-function.patch cyrus-imapd.spec

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Tue Jul 12 12:58:23 CEST 2011


 0001-fix-sync-when-new-message-appears-at-both-ends.patch       |   41 ++++++++++
 0002-Bug-3489-fix-quotalegacy-handing-of-prefixed-foreach.patch |   33 ++++++++
 0003-quotalegacy-use-void-for-compar-function.patch             |   25 ++++++
 cyrus-imapd.spec                                                |   15 +++
 4 files changed, 113 insertions(+), 1 deletion(-)

New commits:
commit 119665a913ef46f2ac77a07f51be74dd81f1a64e
Author: Jeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen at ergo-project.org>
Date:   Tue Jul 12 12:58:08 2011 +0200

    Apply some -stable branch fixes and bump release

diff --git a/0001-fix-sync-when-new-message-appears-at-both-ends.patch b/0001-fix-sync-when-new-message-appears-at-both-ends.patch
new file mode 100644
index 0000000..dbc7d5b
--- /dev/null
+++ b/0001-fix-sync-when-new-message-appears-at-both-ends.patch
@@ -0,0 +1,41 @@
+From d2ed3a15a12402f8941cffa154397429ce3f2fa3 Mon Sep 17 00:00:00 2001
+From: Greg Banks <gnb at opera.com>
+Date: Mon, 11 Jul 2011 14:51:36 +0200
+Subject: [PATCH 1/3] fix sync when new message appears at both ends
+
+If the sync master and replica discover that they have a pair of
+messages with the same UID but different GUIDs, they go through a
+complex dance to resolve the issue.  The end point of the dance is
+supposed to see the two messages both stored safely at both ends, with
+new UIDs and new MODSEQs.
+
+However, copy_remote() on the master was failing to bump the modseq for
+the message copied back from the replica when appending it to the
+master's index.  So the actual end point of the dance had the following
+problems:
+
+ - master's copy of the new message from the replica has the replica's
+   original modseq instead of a new one.
+
+ - replica was missing the message it originally started with.
+
+ - sync_client fails with a checksum error during full update.
+---
+ imap/sync_support.c |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/imap/sync_support.c b/imap/sync_support.c
+index e4ea5db..06cd37f 100644
+--- a/imap/sync_support.c
++++ b/imap/sync_support.c
+@@ -1573,7 +1573,6 @@ int sync_append_copyfile(struct mailbox *mailbox,
+     }
+ 
+  just_write:
+-    record->silent = 1;
+     return mailbox_append_index_record(mailbox, record);
+ }
+ 
+-- 
+1.7.6
+
diff --git a/0002-Bug-3489-fix-quotalegacy-handing-of-prefixed-foreach.patch b/0002-Bug-3489-fix-quotalegacy-handing-of-prefixed-foreach.patch
new file mode 100644
index 0000000..a8be8a9
--- /dev/null
+++ b/0002-Bug-3489-fix-quotalegacy-handing-of-prefixed-foreach.patch
@@ -0,0 +1,33 @@
+From 335c2bdd961ed304adc4ce11998b2ad866a6b1ec Mon Sep 17 00:00:00 2001
+From: Bron Gondwana <brong at opera.com>
+Date: Mon, 11 Jul 2011 16:08:47 +0200
+Subject: [PATCH 2/3] Bug #3489 - fix quotalegacy handing of prefixed foreach
+
+---
+ lib/cyrusdb_quotalegacy.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/cyrusdb_quotalegacy.c b/lib/cyrusdb_quotalegacy.c
+index 3c695e2..d180073 100644
+--- a/lib/cyrusdb_quotalegacy.c
++++ b/lib/cyrusdb_quotalegacy.c
+@@ -681,14 +681,14 @@ static int foreach(struct db *db,
+ 	key = path_to_qr(pathbuf.path[i], quota_path);
+ 	keylen = strlen(key);
+ 
+-	free(pathbuf.path[i]);
+-
+ 	if (!goodp || goodp(rock, key, keylen, data, datalen)) {
+ 	    /* make callback */
+ 	    r = cb(rock, key, keylen, data, datalen);
+ 	    if (r) break;
+ 	}
+     }
++    for (i = 0; i < pathbuf.count; i++)
++	free(pathbuf.path[i]);
+ 
+     free(pathbuf.path);
+ 
+-- 
+1.7.6
+
diff --git a/0003-quotalegacy-use-void-for-compar-function.patch b/0003-quotalegacy-use-void-for-compar-function.patch
new file mode 100644
index 0000000..8bc2c54
--- /dev/null
+++ b/0003-quotalegacy-use-void-for-compar-function.patch
@@ -0,0 +1,25 @@
+From edb1e078762716e218114bb8a6b51e1a6f9877d4 Mon Sep 17 00:00:00 2001
+From: Bron Gondwana <brong at opera.com>
+Date: Mon, 11 Jul 2011 22:59:49 +0200
+Subject: [PATCH 3/3] quotalegacy: use void for compar function
+
+---
+ lib/cyrusdb_quotalegacy.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/lib/cyrusdb_quotalegacy.c b/lib/cyrusdb_quotalegacy.c
+index d180073..966ef8c 100644
+--- a/lib/cyrusdb_quotalegacy.c
++++ b/lib/cyrusdb_quotalegacy.c
+@@ -118,7 +118,7 @@ struct db {
+     struct txn txn;	/* transaction associated with this db handle */
+ 
+     /* sorting function */
+-    int (*compar) (const char *s1, const char *s2);
++    int (*compar) (const void *s1, const void *s2);
+ };
+ 
+ static int abort_txn(struct db *db __attribute__((unused)), struct txn *tid);
+-- 
+1.7.6
+
diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec
index 1d8dec8..b267809 100644
--- a/cyrus-imapd.spec
+++ b/cyrus-imapd.spec
@@ -16,7 +16,7 @@
 Name:               cyrus-imapd
 Summary:            A high-performance mail server with IMAP, POP3, NNTP and SIEVE support
 Version:            2.4.10
-Release:            1%{?dist}
+Release:            2%{?dist}
 License:            BSD
 Group:              System Environment/Daemons
 URL:                http://www.cyrusimap.org
@@ -64,6 +64,11 @@ Patch002:           %{name}-2.3.16-002-strip-out-krb4.patch
 #Patch101:           %{name}-2.3.16-101-autocreate-0.10.0.patch
 #Patch102:           %{name}-2.3.16-102-autosieve-0.6.0.patch
 
+# Patches cherry-picked from GIT stable branch(es)
+Patch200:           0001-fix-sync-when-new-message-appears-at-both-ends.patch
+Patch201:           0002-Bug-3489-fix-quotalegacy-handing-of-prefixed-foreach.patch
+Patch202:           0003-quotalegacy-use-void-for-compar-function.patch
+
 # Patches of which the status or upstream is unknown
 #Patch901:           %{name}-2.3.16-901-enhance-flock-with-timeout.patch
 #Patch902:           %{name}-2.3.16-902-accept-invalid-from-header.patch
@@ -174,6 +179,10 @@ one running the server.
 %setup -q -n %{_name}-%{real_version}
 %patch002 -p1
 
+%patch200 -p1
+%patch201 -p1
+%patch202 -p1
+
 %patch903 -p1
 
 # add additional sources
@@ -549,6 +558,10 @@ fi
 %{_mandir}/man1/*
 
 %changelog
+* Tue Jul 12 2011 Jeroen van Meeuwen <vanmeeuwen at kolabsys.com> - 2.4.10-2
+- Fix quota legacy bugs (Bron Gondwana)
+- Fix sync when message appears on both sides (Greg Banks)
+
 * Wed Jul  6 2011 Jeroen van Meeuwen <vanmeeuwen at kolabsys.com> - 2.4.10-1
 - New upstream version
 




More information about the packaging-commits mailing list