rpms/dbmail/devel 0001-backport-fix-to-prevent-showing-mailboxes-more-than.patch, NONE, 1.1 dbmail-pop3d, 1.3, 1.4 dbmail.cron, 1.1, 1.2 dbmail.spec, 1.26, 1.27
Bernard Johnson
bjohnson at fedoraproject.org
Mon Jul 6 04:56:36 UTC 2009
- Previous message (by thread): rpms/glib2/devel .cvsignore, 1.111, 1.112 glib2.spec, 1.209, 1.210 sources, 1.113, 1.114
- Next message (by thread): rpms/dbmail/EL-5 0001-backport-fix-to-prevent-showing-mailboxes-more-than.patch, NONE, 1.1 dbmail-pop3d, 1.3, 1.4 dbmail.cron, 1.1, 1.2 dbmail.spec, 1.19, 1.20
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: bjohnson
Update of /cvs/pkgs/rpms/dbmail/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10607/devel
Modified Files:
dbmail-pop3d dbmail.cron dbmail.spec
Added Files:
0001-backport-fix-to-prevent-showing-mailboxes-more-than.patch
Log Message:
- patch to remove duplicate email boxes from being listed
- consider cron file a config file
- add -b option to cron job to rebuild body/header/envelope cache tables
- change order of redirection in cron job
- fix typo in dbmail-pop3d that causes LSB info to not be recognized
- add provides for dbmail-sqlite
- conditional to compile with gmime22 when needed
0001-backport-fix-to-prevent-showing-mailboxes-more-than.patch:
--- NEW FILE 0001-backport-fix-to-prevent-showing-mailboxes-more-than.patch ---
>From c8bf103cfd18f3f4a228b299c257ffecac3e0012 Mon Sep 17 00:00:00 2001
From: Paul J Stevens <paul at nfg.nl>
Date: Wed, 1 Jul 2009 18:48:21 +0200
Subject: [PATCH] backport fix to prevent showing mailboxes more than once during LIST/LSUB
---
imapcommands.c | 51 ++++++++++++++++++++++++++++++++-------------------
1 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/imapcommands.c b/imapcommands.c
index 202098b..cd51262 100644
--- a/imapcommands.c
+++ b/imapcommands.c
@@ -678,10 +678,16 @@ int _ic_unsubscribe(struct ImapSession *self)
*
* executes a list command
*/
+static int dm_strcmpdata(gconstpointer a, gconstpointer b, gpointer data UNUSED)
+{
+ return strcmp((const char *)a, (const char *)b);
+}
+
int _ic_list(struct ImapSession *self)
{
imap_userdata_t *ud = (imap_userdata_t *) self->ci->userData;
u64_t *children = NULL;
+ GTree *shown = NULL;
int result;
size_t slen;
unsigned i;
@@ -738,6 +744,8 @@ int _ic_list(struct ImapSession *self)
mb = g_new0(mailbox_t,1);
+ shown = g_tree_new_full((GCompareDataFunc)dm_strcmpdata,NULL,(GDestroyNotify)g_free,NULL);
+
for (i = 0; i < nchildren; i++) {
gboolean show = FALSE;
if ((db_getmailbox_list_result(children[i], ud->userid, mb) != 0))
@@ -778,31 +786,36 @@ int _ic_list(struct ImapSession *self)
show = TRUE;
}
- if (! show) continue;
-
- plist = NULL;
- if (mb->no_select)
- plist = g_list_append(plist, g_strdup("\\noselect"));
- if (mb->no_inferiors)
- plist = g_list_append(plist, g_strdup("\\noinferiors"));
- if (mb->no_children)
- plist = g_list_append(plist, g_strdup("\\hasnochildren"));
- else
- plist = g_list_append(plist, g_strdup("\\haschildren"));
-
- /* show */
- pstring = dbmail_imap_plist_as_string(plist);
- dbmail_imap_session_printf(self, "* %s %s \"%s\" \"%s\"\r\n", thisname,
- pstring, MAILBOX_SEPARATOR, mb->name);
-
- g_list_destroy(plist);
- g_free(pstring);
+ if (show && (! g_tree_lookup(shown, mb->name))) {
+ char *s = g_strdup(mb->name);
+ g_tree_insert(shown, s, s);
+ plist = NULL;
+ if (mb->no_select)
+ plist = g_list_append(plist, g_strdup("\\noselect"));
+ if (mb->no_inferiors)
+ plist = g_list_append(plist, g_strdup("\\noinferiors"));
+ if (mb->no_children)
+ plist = g_list_append(plist, g_strdup("\\hasnochildren"));
+ else
+ plist = g_list_append(plist, g_strdup("\\haschildren"));
+
+ /* show */
+ pstring = dbmail_imap_plist_as_string(plist);
+ dbmail_imap_session_printf(self, "* %s %s \"%s\" \"%s\"\r\n", thisname,
+ pstring, MAILBOX_SEPARATOR, mb->name);
+
+ g_list_destroy(plist);
+ g_free(pstring);
+ }
}
if (children)
g_free(children);
+ if (shown)
+ g_tree_destroy(shown);
+
g_free(pattern);
g_free(mb);
dbmail_imap_session_printf(self, "%s OK %s completed\r\n", self->tag, thisname);
--
1.6.0.4
Index: dbmail-pop3d
===================================================================
RCS file: /cvs/pkgs/rpms/dbmail/devel/dbmail-pop3d,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- dbmail-pop3d 3 Feb 2009 22:40:06 -0000 1.3
+++ dbmail-pop3d 6 Jul 2009 04:56:36 -0000 1.4
@@ -7,7 +7,7 @@
# processname: dbmail-pop3d
# pidfile: /var/run/dbmail-pop3d.pid
# config: /etc/dbmail.conf
-## BEGIN INIT INFO
+### BEGIN INIT INFO
# Provides: dbmail-pop3d
# Required-Start: $local_fs $network $syslog
# Should-Start:
Index: dbmail.cron
===================================================================
RCS file: /cvs/pkgs/rpms/dbmail/devel/dbmail.cron,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- dbmail.cron 21 Feb 2007 06:24:45 -0000 1.1
+++ dbmail.cron 6 Jul 2009 04:56:36 -0000 1.2
@@ -6,4 +6,4 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH
echo "" >> $LOGFILE
date >> $LOGFILE
-dbmail-util -c -t -u -p -d -y 2>&1 >> $LOGFILE
+dbmail-util -c -t -u -b -p -d -y >> $LOGFILE 2>&1
Index: dbmail.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dbmail/devel/dbmail.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- dbmail.spec 20 Mar 2009 03:23:54 -0000 1.26
+++ dbmail.spec 6 Jul 2009 04:56:36 -0000 1.27
@@ -1,3 +1,7 @@
+%if 0%{?fedora} && 0%{?fedora} > 10
+%define with_gmime22 1
+%endif
+
# Package User Registry: http://fedoraproject.org/wiki/PackageUserRegistry
%define registry_uid 38
%define registry_name dbmail
@@ -6,7 +10,7 @@
Name: dbmail
Version: 2.2.11
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: A database backed mail storage system
Group: System Environment/Daemons
@@ -22,10 +26,18 @@ Source5: dbmail.cron
Source6: dbmail.logrotate
Source7: README.fedora
+Patch0: 0001-backport-fix-to-prevent-showing-mailboxes-more-than.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+%if %{with_gmime22}
+BuildRequires: gmime22-devel >= 2.1.19
+%else
+BuildRequires: gmime-devel >= 2.1.19
+%endif
+
BuildRequires: fileutils, openssl-devel >= 0.9.7a
-BuildRequires: glib2-devel >= 2.8, gmime22-devel >= 2.1.19
+BuildRequires: glib2-devel >= 2.8
BuildRequires: libsieve-devel >= 2.1.13
BuildRequires: mysql-devel >= 4.1.3, postgresql-devel
BuildRequires: openldap-devel
@@ -38,6 +50,7 @@ Requires(pre): fedora-usermgmt
Requires(postun):fedora-usermgmt
Requires: sqlite >= 3
Obsoletes: dbmail-sqlite < 2.2.5
+Provides: dbmail-sqlite = %{version}
%description
@@ -55,6 +68,8 @@ installation and configuration in Fedora
%prep
%setup -q
+%patch0 -p 1 -b .duplicate-email-boxes
+
# we don't need README.solaris and we don't want it caught up in the %%doc
# README* wildcard - but we do want our shiny new README.fedora file to be
# installed
@@ -168,7 +183,7 @@ fi
%{_libdir}/dbmail/libsort_sieve*
%config(noreplace) %{_sysconfdir}/dbmail.conf
%{_initrddir}/dbmail-*
-%{_sysconfdir}/cron.daily/dbmail
+%config(noreplace) %{_sysconfdir}/cron.daily/dbmail
%config(noreplace) %{_sysconfdir}/logrotate.d/dbmail
%doc sql/sqlite/*
%{_libdir}/dbmail/libsqlite*
@@ -214,6 +229,15 @@ This is the postgresql libraries for dbm
%{_libdir}/dbmail/libpgsql*
%changelog
+* Sun Jul 05 2009 Bernard Johnson <bjohnson at symetrix.com> - 2.2.11-5
+- patch to remove duplicate email boxes from being listed
+- consider cron file a config file
+- add -b option to cron job to rebuild body/header/envelope cache tables
+- change order of redirection in cron job
+- fix typo in dbmail-pop3d that causes LSB info to not be recognized
+- add provides for dbmail-sqlite
+- conditional to compile with gmime22 when needed
+
* Thu Mar 19 2009 Bernard Johnson <bjohnson at symetrix.com> - 2.2.11-4
- build agaist old gmime22 (bz #490316)
- Previous message (by thread): rpms/glib2/devel .cvsignore, 1.111, 1.112 glib2.spec, 1.209, 1.210 sources, 1.113, 1.114
- Next message (by thread): rpms/dbmail/EL-5 0001-backport-fix-to-prevent-showing-mailboxes-more-than.patch, NONE, 1.1 dbmail-pop3d, 1.3, 1.4 dbmail.cron, 1.1, 1.2 dbmail.spec, 1.19, 1.20
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list