Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 May 2006 01:55:57 +0800 (CST)
From:      Rong-En Fan <rafan@infor.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        robin@isometry.net
Subject:   ports/97565: [PATCH] mail/dovecot: fix startup problem on 4.x
Message-ID:  <200605211755.k4LHtvqD004025@svm.csie.ntu.edu.tw>
Resent-Message-ID: <200605211800.k4LI0jn5064351@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         97565
>Category:       ports
>Synopsis:       [PATCH] mail/dovecot: fix startup problem on 4.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 21 18:00:44 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Rong-En Fan
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
NTU CSIE
>Environment:
>Description:
On 4.x with GCC < 3.2, dovecot refuses to startup and the error is
"Fatal: Protocol imaps given more than once". This is due to we have a
old compiler GCC 2.95. Using GCC >= 3.2 will be fine. The author has
a patch to fix this (not committed into dovecot's cvs yet). For details,
please read the following mailing thread:

http://www.dovecot.org/list/dovecot/2006-May/013389.html

The patch is obtained from the mailing archive (mailman screwed up the
patch, you can grab from dovecot.org's mbox archive). Since this patch
is not committed into dovecot's cvs, I prefer to enable it only if base
has GCC < 3.2.

I'm running dovecot 1.0 beta8 with this patch on a 4.11 box for one day
without any problems.

Added file(s):
- files/extra-c89-fix

Port maintainer (robin@isometry.net) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- dovecot-1.0.b8_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/mail/dovecot/Makefile /home/rafan/tmp/ports/dovecot/Makefile
--- /usr/ports/mail/dovecot/Makefile	Mon May 15 04:17:43 2006
+++ /home/rafan/tmp/ports/dovecot/Makefile	Mon May 22 01:44:58 2006
@@ -8,6 +8,7 @@
 
 PORTNAME=	dovecot
 DISTVERSION=	1.0.beta8
+PORTREVISION=	1
 CATEGORIES=	mail ipv6
 MASTER_SITES=	http://www.dovecot.org/releases/
 
@@ -44,6 +45,10 @@
 		SQLITE		"SQLite support"	off
 
 .include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500039
+EXTRA_PATCHES+=	${PATCHDIR}/extra-c89-fix
+.endif
 
 ## kqueue(2) support
 #
diff -ruN --exclude=CVS /usr/ports/mail/dovecot/files/extra-c89-fix /home/rafan/tmp/ports/dovecot/files/extra-c89-fix
--- /usr/ports/mail/dovecot/files/extra-c89-fix	Thu Jan  1 08:00:00 1970
+++ /home/rafan/tmp/ports/dovecot/files/extra-c89-fix	Mon May 22 01:44:58 2006
@@ -0,0 +1,41 @@
+Index: src/master/master-settings.c
+===================================================================
+RCS file: /var/lib/cvs/dovecot/src/master/master-settings.c,v
+retrieving revision 1.125
+diff -u -r1.125 master-settings.c
+--- src/master/master-settings.c	24 Apr 2006 13:18:45 -0000	1.125
++++ src/master/master-settings.c	12 May 2006 13:00:00 -0000
+@@ -366,7 +366,6 @@
+ 	MEMBER(pop3_logout_format) "top=%t/%p, retr=%r/%b, del=%d/%m, size=%s",
+ 
+ 	/* .. */
+-	MEMBER(login_uid) 0,
+ 	MEMBER(listen_fd) -1,
+ 	MEMBER(ssl_listen_fd) -1
+ };
+Index: src/master/master-settings.h
+===================================================================
+RCS file: /var/lib/cvs/dovecot/src/master/master-settings.h,v
+retrieving revision 1.83
+diff -u -r1.83 master-settings.h
+--- src/master/master-settings.h	14 Apr 2006 18:20:57 -0000	1.83
++++ src/master/master-settings.h	12 May 2006 13:00:00 -0000
+@@ -116,14 +116,15 @@
+ 	const char *pop3_logout_format;
+ 
+ 	/* .. */
+-	uid_t login_uid;
++	int listen_fd, ssl_listen_fd;
+ 
+-	const char *imap_generated_capability;
++	uid_t login_uid;
+ 
+-	int listen_fd, ssl_listen_fd;
+ 	struct ip_addr listen_ip, ssl_listen_ip;
+ 	unsigned int listen_port, ssl_listen_port;
+ 
++	const char *imap_generated_capability;
++
+ 	array_t ARRAY_DEFINE(plugin_envs, const char *);
+ };
+ 
--- dovecot-1.0.b8_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605211755.k4LHtvqD004025>