Subject: pkg/23696: PATCH - upgrade dovecot to latest release.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <charlie@rubberduck.com>
List: netbsd-bugs
Date: 12/09/2003 11:01:19
>Number:         23696
>Category:       pkg
>Synopsis:       upgrade dovecot
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 09 00:01:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Charlie Allom
>Release:        NetBSD 1.6ZF
>Organization:
 charlie@rubberduck.com - Melbourne, Australia
 http://rubberduck.com/~yeled/
 PGP: 0x14AA7941 || finger yeled@lazy.spodder.com
>Environment:
	
	
System: NetBSD lazy 1.6ZF NetBSD 1.6ZF (GENERIC.MP) #0: Sun Nov 23 01:07:23 EST 2003 root@backspace:/usr/obj/sys/arch/i386/compile.i386/GENERIC.MP i386
Architecture: i386
Machine: i386
>Description:
	
	please upgrade dovecot to latest release. it has some changes, including our patches/ directory stuff.

This also includes Joshua Goodall's patch (now in the CVS tree) for CRAM-MD5 for the -release tag.
>How-To-Repeat:
	
>Fix:
	

diff -aurN ../mail/dovecot/Makefile dovecot/Makefile
--- ../mail/dovecot/Makefile	2003-11-12 14:39:40.000000000 +1100
+++ dovecot/Makefile	2003-12-09 10:34:42.000000000 +1100
@@ -1,13 +1,12 @@
-# $NetBSD: Makefile,v 1.10 2003/11/12 03:39:40 jschauma Exp $
+# $NetBSD: Makefile,v 1.9 2003/11/02 17:24:07 salo Exp $
 #
 
-DISTNAME=		dovecot-0.99.10
-PKGREVISION=		4
+DISTNAME=		dovecot-0.99.10.4
 CATEGORIES=		mail
 MASTER_SITES=		http://dovecot.procontrol.fi/
 
-PATCH_SITES=		${MASTER_SITES}
-PATCHFILES=		auth-home.patch bodystructure.patch
+PATCH_SITES=	http://www.roughtrade.net/dovecot/
+PATCHFILES=		dovecot-crammd5-0.99.10.2.diff
 PATCH_DIST_STRIP=	-p1
 
 MAINTAINER=		tom@replic8.net
diff -aurN ../mail/dovecot/distinfo dovecot/distinfo
--- ../mail/dovecot/distinfo	2003-11-03 04:24:07.000000000 +1100
+++ dovecot/distinfo	2003-12-09 10:49:43.000000000 +1100
@@ -1,12 +1,8 @@
-$NetBSD: distinfo,v 1.6 2003/11/02 17:24:07 salo Exp $
+$NetBSD: distinfo,v 1.5 2003/09/23 13:54:25 salo Exp $
 
-SHA1 (dovecot-0.99.10.tar.gz) = 0a1d83cbd27c3aa3e0732416a0871afc23ee5e19
-Size (dovecot-0.99.10.tar.gz) = 735615 bytes
-SHA1 (auth-home.patch) = 5af6aa64c81d4bf8b0bc0f7684a1c500198b981a
-Size (auth-home.patch) = 612 bytes
-SHA1 (bodystructure.patch) = f9a94981a4b8527001203725d22ac74f21968d57
-Size (bodystructure.patch) = 3010 bytes
+SHA1 (dovecot-0.99.10.4.tar.gz) = e4eabc78894e2c204d788521812497e021f45c08
+Size (dovecot-0.99.10.4.tar.gz) = 859856 bytes
+SHA1 (dovecot-crammd5-0.99.10.2.diff) = bd879993f2275bcafd9f6ae1e673114b0fbd82a2
+Size (dovecot-crammd5-0.99.10.2.diff) = 16476 bytes
 SHA1 (patch-aa) = 6ed31ba47883903e5a7b2fcb715432e0c3e8947c
-SHA1 (patch-ab) = 0aca5084186f7faa812351e83d1c9535248da2b0
-SHA1 (patch-ac) = 6593c335779aacd0bf285a4faf6411150d4acdcf
-SHA1 (patch-ad) = b96fe0aa1d6d0f846624802b37b72f7213568a87
+SHA1 (patch-ab) = adc2f51a06fc992af97cb4c5b2f8aa384675bae5
diff -aurN ../mail/dovecot/patches/patch-ab dovecot/patches/patch-ab
--- ../mail/dovecot/patches/patch-ab	2003-07-05 00:39:38.000000000 +1000
+++ dovecot/patches/patch-ab	2003-12-09 10:48:47.000000000 +1100
@@ -1,21 +1,16 @@
-$NetBSD: patch-ab,v 1.2 2003/07/04 14:39:38 salo Exp $
-
---- dovecot-example.conf.orig	Thu Jun 26 18:11:06 2003
-+++ dovecot-example.conf	Fri Jul  4 12:37:14 2003
-@@ -1,10 +1,8 @@
- ## Dovecot 1.0 configuration file
- 
+--- dovecot-example.conf.orig	2003-12-09 10:38:14.000000000 +1100
++++ dovecot-example.conf	2003-12-09 10:48:22.000000000 +1100
+@@ -3,15 +3,15 @@
  # Default values are shown after each value, it's not required to uncomment
--# any of the lines. Exception to this are paths, they're just examples
--# with real defaults being based on configure options. The paths listed here
+ # any of the lines. Exception to this are paths, they're just examples
+ # with real defaults being based on configure options. The paths listed here
 -# are for configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
 -# --with-ssldir=/etc/ssl
-+# any of the lines. Exception to this are paths, they're just examples with
-+# real defaults being based on configure options.
++# are for configure --prefix=@PREFIX@ --sysconfdir=@PREFIX@/etc --localstatedir=/var
++# --with-ssldir=/etc/openssl
  
  # Base directory where to store runtime data.
  #base_dir = /var/run/dovecot/
-@@ -11,7 +9,7 @@
  
  # Protocols we want to be serving:
  #  imap imaps pop3 pop3s
@@ -24,7 +19,7 @@
  
  # IP or host address where to listen in for connections. It's not currently
  # possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
-@@ -27,7 +25,7 @@
+@@ -27,14 +27,14 @@
  #pop3s_listen = 
  
  # Disable SSL/TLS support.
@@ -33,7 +28,16 @@
  
  # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
  # dropping root privileges, so keep the key file unreadable by anyone but
-@@ -81,7 +79,7 @@
+ # root. Included doc/mkcert.sh can be used to easily generate self-signed
+ # certificate, just make sure to update the domains in dovecot-openssl.cnf
+-#ssl_cert_file = /etc/ssl/certs/dovecot.pem
+-#ssl_key_file = /etc/ssl/private/dovecot.pem
++#ssl_cert_file = /etc/openssl/certs/dovecot.pem
++#ssl_key_file = /etc/openssl/private/dovecot.pem
+ 
+ # SSL parameter file. Master process generates this file for login processes.
+ # It contains Diffie Hellman and RSA parameters.
+@@ -81,7 +81,7 @@
  login = imap
  
  # Executable location.
@@ -42,7 +46,7 @@
  
  # User to use for the login process. Create a completely new user for this,
  # and don't use it anywhere else. The user must also belong to a group where
-@@ -126,7 +124,7 @@
+@@ -126,7 +126,7 @@
  login = pop3
  
  # Exception to above rule being the executable location.
@@ -51,7 +55,7 @@
  
  ##
  ## Mail processes
-@@ -314,7 +312,7 @@
+@@ -318,7 +318,7 @@
  ##
  
  # Executable location
@@ -60,7 +64,7 @@
  
  # Set max. process size in megabytes. Most of the memory goes to mmap()ing
  # files, so it shouldn't harm much even if this limit is set pretty high.
-@@ -322,7 +320,7 @@
+@@ -326,14 +326,14 @@
  
  # Support for dynamically loadable modules.
  #imap_use_modules = no
@@ -69,7 +73,6 @@
  
  ##
  ## POP3 process
-@@ -329,7 +327,7 @@
  ##
  
  # Executable location
@@ -78,7 +81,7 @@
  
  # Set max. process size in megabytes. Most of the memory goes to mmap()ing
  # files, so it shouldn't harm much even if this limit is set pretty high.
-@@ -337,7 +335,7 @@
+@@ -341,7 +341,7 @@
  
  # Support for dynamically loadable modules.
  #pop3_use_modules = no
@@ -87,14 +90,23 @@
  
  ##
  ## Authentication processes
-@@ -386,10 +384,10 @@
+@@ -380,8 +380,7 @@
+ #   vpopmail: vpopmail library
+ #   ldap <config path>: LDAP, see doc/dovecot-ldap.conf
+ #   pgsql <config path>: a PostgreSQL database, see doc/dovecot-pgsql.conf
+-#auth_userdb = passwd
+-auth_userdb = pgsql /usr/local/etc/dovecot-pgsql.conf
++auth_userdb = passwd
+ 
+ # Where password database is kept:
+ #   passwd: /etc/passwd or similiar, using getpwnam()
+@@ -391,9 +390,9 @@
  #   vpopmail: vpopmail authentication
  #   ldap <config path>: LDAP, see doc/dovecot-ldap.conf
  #   pgsql <config path>: a PostgreSQL database, see doc/dovecot-pgsql.conf
--auth_passdb = pam
+-auth_passdb = pgsql /usr/local/etc/dovecot-pgsql.conf
 +auth_passdb = passwd
  
- # Executable location
 -#auth_executable = /usr/libexec/dovecot/dovecot-auth
 +#auth_executable = @PREFIX@/libexec/dovecot/dovecot-auth
  
diff -aurN ../mail/dovecot/patches/patch-ac dovecot/patches/patch-ac
--- ../mail/dovecot/patches/patch-ac	2003-09-23 23:54:25.000000000 +1000
+++ dovecot/patches/patch-ac	1970-01-01 10:00:00.000000000 +1000
@@ -1,32 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2003/09/23 13:54:25 salo Exp $
-
---- src/lib-mail/message-address.c.orig	2003-03-20 16:46:34.000000000 +0100
-+++ src/lib-mail/message-address.c	2003-09-23 15:42:11.000000000 +0200
-@@ -252,14 +252,14 @@
- 		} else if ((addr->name == NULL || *addr->name == '\0') &&
- 			   addr->route == NULL) {
- 			i_assert(addr->mailbox != NULL);
--			i_assert(addr->domain != NULL);
- 
- 			str_append(str, addr->mailbox);
-+			if (addr->domain != NULL) {
- 			str_append_c(str, '@');
- 			str_append(str, addr->domain);
-+			}
- 		} else {
- 			i_assert(addr->mailbox != NULL);
--			i_assert(addr->domain != NULL);
- 
- 			if (addr->name != NULL) {
- 				str_append(str, addr->name);
-@@ -272,8 +272,10 @@
- 				str_append_c(str, ':');
- 			}
- 			str_append(str, addr->mailbox);
-+			if (addr->domain != NULL) {
- 			str_append_c(str, '@');
- 			str_append(str, addr->domain);
-+			}
- 			str_append_c(str, '>');
- 		}
- 
diff -aurN ../mail/dovecot/patches/patch-ad dovecot/patches/patch-ad
--- ../mail/dovecot/patches/patch-ad	2003-11-03 04:24:07.000000000 +1100
+++ dovecot/patches/patch-ad	1970-01-01 10:00:00.000000000 +1000
@@ -1,106 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2003/11/02 17:24:07 salo Exp $
-
---- src/imap/imap-fetch-body-section.c	21 Sep 2003 16:21:36 -0000	1.18
-+++ src/imap/imap-fetch-body-section.c	3 Oct 2003 14:36:03 -0000
-@@ -73,6 +73,18 @@
- 	return cr_skipped;
- }
- 
-+static uoff_t get_send_size(const struct imap_fetch_body_data *body,
-+			    uoff_t max_size)
-+{
-+	uoff_t size;
-+
-+	if (body->skip >= max_size)
-+		return 0;
-+
-+	size = max_size - body->skip;
-+	return size <= body->max_size ? size : body->max_size;
-+}
-+
- /* fetch BODY[] or BODY[TEXT] */
- static int fetch_body(struct imap_fetch_context *ctx,
- 		      const struct imap_fetch_body_data *body,
-@@ -82,7 +94,7 @@
- 	struct istream *stream;
- 	const char *str;
- 	int skip_cr, last_cr;
--	uoff_t size;
-+	uoff_t send_size;
- 	off_t ret;
- 
- 	stream = mail->get_stream(mail, &hdr_size, &body_size);
-@@ -92,13 +104,8 @@
- 	if (fetch_header)
- 		message_size_add(&body_size, &hdr_size);
- 
--	if (body->skip >= body_size.virtual_size)
--		size = 0;
--	else {
--		size = body_size.virtual_size - body->skip;
--		if (size > body->max_size) size = body->max_size;
--	}
--	str = t_strdup_printf("%s {%"PRIuUOFF_T"}\r\n", ctx->prefix, size);
-+	send_size = get_send_size(body, body_size.virtual_size);
-+	str = t_strdup_printf("%s {%"PRIuUOFF_T"}\r\n", ctx->prefix, send_size);
- 	if (o_stream_send_str(ctx->output, str) < 0)
- 		return FALSE;
- 
-@@ -108,7 +115,7 @@
- 			       body->skip);
- 
- 	ret = message_send(ctx->output, stream, &body_size,
--			   skip_cr, body->max_size, &last_cr,
-+			   skip_cr, send_size, &last_cr,
- 			   !mail->has_no_nuls);
- 	if (ret > 0) {
- 		partial.cr_skipped = last_cr != 0;
-@@ -297,15 +304,16 @@
- 	const char *str;
- 	const void *data;
- 	size_t data_size;
--	uoff_t start_offset;
-+	uoff_t start_offset, send_size;
- 	int failed;
- 
- 	/* HEADER, MIME, HEADER.FIELDS (list), HEADER.FIELDS.NOT (list) */
- 
- 	if (strcmp(header_section, "HEADER") == 0) {
- 		/* all headers */
-+		send_size = get_send_size(body, size->virtual_size);
- 		str = t_strdup_printf("%s {%"PRIuUOFF_T"}\r\n",
--				      ctx->prefix, size->virtual_size);
-+				      ctx->prefix, send_size);
- 		if (o_stream_send_str(ctx->output, str) < 0)
- 			return FALSE;
- 		return message_send(ctx->output, input, size,
-@@ -453,16 +461,11 @@
- {
- 	const char *str;
- 	int skip_cr, last_cr;
--	uoff_t size;
-+	uoff_t send_size;
- 	off_t ret;
- 
--	if (body->skip >= part->body_size.virtual_size)
--		size = 0;
--	else {
--		size = part->body_size.virtual_size - body->skip;
--		if (size > body->max_size) size = body->max_size;
--	}
--	str = t_strdup_printf("%s {%"PRIuUOFF_T"}\r\n", ctx->prefix, size);
-+	send_size = get_send_size(body, part->body_size.virtual_size);
-+	str = t_strdup_printf("%s {%"PRIuUOFF_T"}\r\n", ctx->prefix, send_size);
- 	if (o_stream_send_str(ctx->output, str) < 0)
- 		return FALSE;
- 
-@@ -470,8 +473,7 @@
- 			       &partial, stream, part->physical_pos +
- 			       part->header_size.physical_size, body->skip);
- 	ret = message_send(ctx->output, stream, &part->body_size,
--			   skip_cr, body->max_size, &last_cr,
--			   !mail->has_no_nuls);
-+			   skip_cr, send_size, &last_cr, !mail->has_no_nuls);
- 	if (ret > 0) {
- 		partial.cr_skipped = last_cr != 0;
- 		partial.pos.physical_size =
>Release-Note:
>Audit-Trail:
>Unformatted: