Hello,

In case my nasty changes are right, here comes the patch (including
Makefile.in & Makefile.am ... I'm not really good with automake/autoconf)
I've applied to dovecot 1.2.10 (from Debian backport repository for Lenny,
source package version 1:1.2.10-1~bpo50+1, expecting my changes won't be
different from the vanilla version).

Regards,

-- 
Baptiste MALGUY
PGP fingerprint: 49B0 4F6E 4AA8 B149 B2DF  9267 0F65 6C1C C473 6EC2
diff -ru --exclude=debian dovecot-1.2.10/src/plugins/lazy-expunge/lazy-expunge-plugin.c dovecot-1.2.10-patched/src/plugins/lazy-expunge/lazy-expunge-plugin.c
--- dovecot-1.2.10/src/plugins/lazy-expunge/lazy-expunge-plugin.c	2010-01-25 00:14:17.000000000 +0100
+++ dovecot-1.2.10-patched/src/plugins/lazy-expunge/lazy-expunge-plugin.c	2010-02-19 18:29:27.000000000 +0100
@@ -630,24 +630,11 @@
 	struct lazy_expunge_mailbox_list *llist =
 		LAZY_EXPUNGE_LIST_CONTEXT(storage->list);
 	struct lazy_expunge_mail_storage *lstorage;
-	const char *const *p;
-	unsigned int i;
-
 	if (storage->ns->type != NAMESPACE_PRIVATE) {
 		/* this works only for private namespaces. */
 		return;
 	}
 
-	/* if this is one of our internal storages, mark it as such before
-	   quota plugin sees it */
-	p = t_strsplit_spaces(getenv("LAZY_EXPUNGE"), " ");
-	for (i = 0; i < LAZY_NAMESPACE_COUNT && *p != NULL; i++, p++) {
-		if (strcmp(storage->ns->prefix, *p) == 0) {
-			storage->ns->flags |= NAMESPACE_FLAG_NOQUOTA;
-			break;
-		}
-	}
-
 	llist->storage = storage;
 
 	lstorage = p_new(storage->pool, struct lazy_expunge_mail_storage, 1);
@@ -670,6 +657,18 @@
 static void lazy_expunge_mailbox_list_created(struct mailbox_list *list)
 {
 	struct lazy_expunge_mailbox_list *llist;
+	const char *const *p;
+	unsigned int i;
+
+	/* if this is one of our internal storages, mark it as such before
+	   quota plugin sees it */
+	p = t_strsplit_spaces(getenv("LAZY_EXPUNGE"), " ");
+	for (i = 0; i < LAZY_NAMESPACE_COUNT && *p != NULL; i++, p++) {
+		if (strcmp(list->ns->prefix, *p) == 0) {
+			list->ns->flags |= NAMESPACE_FLAG_NOQUOTA;
+			break;
+		}
+	}
 
 	if (lazy_expunge_next_hook_mailbox_list_created != NULL)
 		lazy_expunge_next_hook_mailbox_list_created(list);
diff -ru --exclude=debian dovecot-1.2.10/src/plugins/lazy-expunge/Makefile.am dovecot-1.2.10-patched/src/plugins/lazy-expunge/Makefile.am
--- dovecot-1.2.10/src/plugins/lazy-expunge/Makefile.am	2008-06-17 03:58:38.000000000 +0200
+++ dovecot-1.2.10-patched/src/plugins/lazy-expunge/Makefile.am	2010-02-19 19:28:15.000000000 +0100
@@ -8,12 +8,12 @@
 	-I$(top_srcdir)/src/lib-imap \
 	-I$(top_srcdir)/src/plugins/quota
 
-lib02_lazy_expunge_plugin_la_LDFLAGS = -module -avoid-version
+lib09_lazy_expunge_plugin_la_LDFLAGS = -module -avoid-version
 
 module_LTLIBRARIES = \
-	lib02_lazy_expunge_plugin.la
+	lib09_lazy_expunge_plugin.la
 
-lib02_lazy_expunge_plugin_la_SOURCES = \
+lib09_lazy_expunge_plugin_la_SOURCES = \
 	lazy-expunge-plugin.c
 
 noinst_HEADERS = \
@@ -22,7 +22,7 @@
 install-exec-local:
 	for d in imap pop3; do \
 	  $(mkdir_p) $(DESTDIR)$(moduledir)/$$d; \
-	  rm -f $(DESTDIR)$(moduledir)/$$d/lib02_lazy_expunge_plugin$(MODULE_SUFFIX); \
-	  $(LN_S) ../lib02_lazy_expunge_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
+	  rm -f $(DESTDIR)$(moduledir)/$$d/lib09_lazy_expunge_plugin$(MODULE_SUFFIX); \
+	  $(LN_S) ../lib09_lazy_expunge_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
 	done
 
diff -ru --exclude=debian dovecot-1.2.10/src/plugins/lazy-expunge/Makefile.in dovecot-1.2.10-patched/src/plugins/lazy-expunge/Makefile.in
--- dovecot-1.2.10/src/plugins/lazy-expunge/Makefile.in	2010-01-25 00:32:10.000000000 +0100
+++ dovecot-1.2.10-patched/src/plugins/lazy-expunge/Makefile.in	2010-02-19 21:00:42.000000000 +0100
@@ -69,13 +69,13 @@
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(moduledir)"
 LTLIBRARIES = $(module_LTLIBRARIES)
-lib02_lazy_expunge_plugin_la_LIBADD =
-am_lib02_lazy_expunge_plugin_la_OBJECTS = lazy-expunge-plugin.lo
-lib02_lazy_expunge_plugin_la_OBJECTS =  \
-	$(am_lib02_lazy_expunge_plugin_la_OBJECTS)
-lib02_lazy_expunge_plugin_la_LINK = $(LIBTOOL) --tag=CC \
+lib09_lazy_expunge_plugin_la_LIBADD =
+am_lib09_lazy_expunge_plugin_la_OBJECTS = lazy-expunge-plugin.lo
+lib09_lazy_expunge_plugin_la_OBJECTS =  \
+	$(am_lib09_lazy_expunge_plugin_la_OBJECTS)
+lib09_lazy_expunge_plugin_la_LINK = $(LIBTOOL) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(AM_CFLAGS) $(CFLAGS) $(lib02_lazy_expunge_plugin_la_LDFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS) $(lib09_lazy_expunge_plugin_la_LDFLAGS) \
 	$(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -90,8 +90,8 @@
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-SOURCES = $(lib02_lazy_expunge_plugin_la_SOURCES)
-DIST_SOURCES = $(lib02_lazy_expunge_plugin_la_SOURCES)
+SOURCES = $(lib09_lazy_expunge_plugin_la_SOURCES)
+DIST_SOURCES = $(lib09_lazy_expunge_plugin_la_SOURCES)
 HEADERS = $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
@@ -259,11 +259,11 @@
 	-I$(top_srcdir)/src/lib-imap \
 	-I$(top_srcdir)/src/plugins/quota
 
-lib02_lazy_expunge_plugin_la_LDFLAGS = -module -avoid-version
+lib09_lazy_expunge_plugin_la_LDFLAGS = -module -avoid-version
 module_LTLIBRARIES = \
-	lib02_lazy_expunge_plugin.la
+	lib09_lazy_expunge_plugin.la
 
-lib02_lazy_expunge_plugin_la_SOURCES = \
+lib09_lazy_expunge_plugin_la_SOURCES = \
 	lazy-expunge-plugin.c
 
 noinst_HEADERS = \
@@ -334,8 +334,8 @@
 	  echo "rm -f \"$${dir}/so_locations\""; \
 	  rm -f "$${dir}/so_locations"; \
 	done
-lib02_lazy_expunge_plugin.la: $(lib02_lazy_expunge_plugin_la_OBJECTS) $(lib02_lazy_expunge_plugin_la_DEPENDENCIES) 
-	$(lib02_lazy_expunge_plugin_la_LINK) -rpath $(moduledir) $(lib02_lazy_expunge_plugin_la_OBJECTS) $(lib02_lazy_expunge_plugin_la_LIBADD) $(LIBS)
+lib09_lazy_expunge_plugin.la: $(lib09_lazy_expunge_plugin_la_OBJECTS) $(lib09_lazy_expunge_plugin_la_DEPENDENCIES) 
+	$(lib09_lazy_expunge_plugin_la_LINK) -rpath $(moduledir) $(lib09_lazy_expunge_plugin_la_OBJECTS) $(lib09_lazy_expunge_plugin_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -577,8 +577,8 @@
 install-exec-local:
 	for d in imap pop3; do \
 	  $(mkdir_p) $(DESTDIR)$(moduledir)/$$d; \
-	  rm -f $(DESTDIR)$(moduledir)/$$d/lib02_lazy_expunge_plugin$(MODULE_SUFFIX); \
-	  $(LN_S) ../lib02_lazy_expunge_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
+	  rm -f $(DESTDIR)$(moduledir)/$$d/lib09_lazy_expunge_plugin$(MODULE_SUFFIX); \
+	  $(LN_S) ../lib09_lazy_expunge_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
 	done
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff -ru --exclude=debian dovecot-1.2.10/src/plugins/quota/Makefile.am dovecot-1.2.10-patched/src/plugins/quota/Makefile.am
--- dovecot-1.2.10/src/plugins/quota/Makefile.am	2009-08-25 15:02:52.000000000 +0200
+++ dovecot-1.2.10-patched/src/plugins/quota/Makefile.am	2010-02-19 18:33:36.000000000 +0100
@@ -8,10 +8,10 @@
 	-I$(top_srcdir)/src/lib-storage/index/maildir \
 	-DPKG_RUNDIR=\""$(rundir)"\"
 
-lib10_quota_plugin_la_LDFLAGS = -module -avoid-version
+lib08_quota_plugin_la_LDFLAGS = -module -avoid-version
 
 module_LTLIBRARIES = \
-	lib10_quota_plugin.la
+	lib08_quota_plugin.la
 
 quota_dist_sources = \
 	quota.c \
@@ -23,7 +23,7 @@
         quota-plugin.c \
 	quota-storage.c
 
-lib10_quota_plugin_la_SOURCES = \
+lib08_quota_plugin_la_SOURCES = \
 	$(quota_dist_sources) \
 	$(RQUOTA_XDR)
 
@@ -59,8 +59,8 @@
 install-exec-local:
 	for d in imap pop3 lda; do \
 	  $(mkdir_p) $(DESTDIR)$(moduledir)/$$d; \
-	  rm -f $(DESTDIR)$(moduledir)/$$d/lib10_quota_plugin$(MODULE_SUFFIX); \
-	  $(LN_S) ../lib10_quota_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
+	  rm -f $(DESTDIR)$(moduledir)/$$d/lib08_quota_plugin$(MODULE_SUFFIX); \
+	  $(LN_S) ../lib08_quota_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
 	done
 
 EXTRA_DIST = rquota.x
diff -ru --exclude=debian dovecot-1.2.10/src/plugins/quota/Makefile.in dovecot-1.2.10-patched/src/plugins/quota/Makefile.in
--- dovecot-1.2.10/src/plugins/quota/Makefile.in	2010-01-25 00:32:11.000000000 +0100
+++ dovecot-1.2.10-patched/src/plugins/quota/Makefile.in	2010-02-19 19:29:25.000000000 +0100
@@ -69,19 +69,19 @@
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(moduledir)"
 LTLIBRARIES = $(module_LTLIBRARIES)
-lib10_quota_plugin_la_LIBADD =
-am__lib10_quota_plugin_la_SOURCES_DIST = quota.c quota-count.c \
+lib08_quota_plugin_la_LIBADD =
+am__lib08_quota_plugin_la_SOURCES_DIST = quota.c quota-count.c \
 	quota-fs.c quota-dict.c quota-dirsize.c quota-maildir.c \
 	quota-plugin.c quota-storage.c rquota_xdr.c
 am__objects_1 = quota.lo quota-count.lo quota-fs.lo quota-dict.lo \
 	quota-dirsize.lo quota-maildir.lo quota-plugin.lo \
 	quota-storage.lo
 @have_rquota_t...@am__objects_2 = rquota_xdr.lo
-am_lib10_quota_plugin_la_OBJECTS = $(am__objects_1) $(am__objects_2)
-lib10_quota_plugin_la_OBJECTS = $(am_lib10_quota_plugin_la_OBJECTS)
-lib10_quota_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+am_lib08_quota_plugin_la_OBJECTS = $(am__objects_1) $(am__objects_2)
+lib08_quota_plugin_la_OBJECTS = $(am_lib08_quota_plugin_la_OBJECTS)
+lib08_quota_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(lib10_quota_plugin_la_LDFLAGS) $(LDFLAGS) -o $@
+	$(lib08_quota_plugin_la_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -95,8 +95,8 @@
 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
-SOURCES = $(lib10_quota_plugin_la_SOURCES)
-DIST_SOURCES = $(am__lib10_quota_plugin_la_SOURCES_DIST)
+SOURCES = $(lib08_quota_plugin_la_SOURCES)
+DIST_SOURCES = $(am__lib08_quota_plugin_la_SOURCES_DIST)
 HEADERS = $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
@@ -263,9 +263,9 @@
 	-I$(top_srcdir)/src/lib-storage/index/maildir \
 	-DPKG_RUNDIR=\""$(rundir)"\"
 
-lib10_quota_plugin_la_LDFLAGS = -module -avoid-version
+lib08_quota_plugin_la_LDFLAGS = -module -avoid-version
 module_LTLIBRARIES = \
-	lib10_quota_plugin.la
+	lib08_quota_plugin.la
 
 quota_dist_sources = \
 	quota.c \
@@ -277,7 +277,7 @@
         quota-plugin.c \
 	quota-storage.c
 
-lib10_quota_plugin_la_SOURCES = \
+lib08_quota_plugin_la_SOURCES = \
 	$(quota_dist_sources) \
 	$(RQUOTA_XDR)
 
@@ -357,8 +357,8 @@
 	  echo "rm -f \"$${dir}/so_locations\""; \
 	  rm -f "$${dir}/so_locations"; \
 	done
-lib10_quota_plugin.la: $(lib10_quota_plugin_la_OBJECTS) $(lib10_quota_plugin_la_DEPENDENCIES) 
-	$(lib10_quota_plugin_la_LINK) -rpath $(moduledir) $(lib10_quota_plugin_la_OBJECTS) $(lib10_quota_plugin_la_LIBADD) $(LIBS)
+lib08_quota_plugin.la: $(lib08_quota_plugin_la_OBJECTS) $(lib08_quota_plugin_la_DEPENDENCIES) 
+	$(lib08_quota_plugin_la_LINK) -rpath $(moduledir) $(lib08_quota_plugin_la_OBJECTS) $(lib08_quota_plugin_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -622,8 +622,8 @@
 install-exec-local:
 	for d in imap pop3 lda; do \
 	  $(mkdir_p) $(DESTDIR)$(moduledir)/$$d; \
-	  rm -f $(DESTDIR)$(moduledir)/$$d/lib10_quota_plugin$(MODULE_SUFFIX); \
-	  $(LN_S) ../lib10_quota_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
+	  rm -f $(DESTDIR)$(moduledir)/$$d/lib08_quota_plugin$(MODULE_SUFFIX); \
+	  $(LN_S) ../lib08_quota_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
 	done
 
 clean-generic:

Reply via email to