From hsn@filez.com  Thu Mar 29 11:26:04 2012
Return-Path: <hsn@filez.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 20CC810656B0;
	Thu, 29 Mar 2012 11:26:04 +0000 (UTC)
	(envelope-from hsn@filez.com)
Received: from ponto.amerinoc.com (ponto.amerinoc.com [64.6.108.239])
	by mx1.freebsd.org (Postfix) with ESMTP id F36078FC15;
	Thu, 29 Mar 2012 11:26:03 +0000 (UTC)
Received: from ponto.amerinoc.com (localhost [127.0.0.1])
	by ponto.amerinoc.com (8.14.5/8.14.5) with ESMTP id q2TB6YCV033053;
	Thu, 29 Mar 2012 13:06:34 +0200 (CEST)
	(envelope-from hsn@ponto.amerinoc.com)
Received: (from hsn@localhost)
	by ponto.amerinoc.com (8.14.5/8.14.5/Submit) id q2TB6YPB033052;
	Thu, 29 Mar 2012 13:06:34 +0200 (CEST)
	(envelope-from hsn)
Message-Id: <201203291106.q2TB6YPB033052@ponto.amerinoc.com>
Date: Thu, 29 Mar 2012 13:06:34 +0200 (CEST)
From: Radim Kolar <hsn@filez.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: apache@freebsd.org, hsn@filez.com
Subject: [PATCH] www/mod_auth_imap2: add dovecot patch
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         166488
>Category:       ports
>Synopsis:       [PATCH] www/mod_auth_imap2: add dovecot patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ohauer
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 29 11:30:07 UTC 2012
>Closed-Date:    Wed Aug 29 11:58:59 UTC 2012
>Last-Modified:  Wed Aug 29 12:00:14 UTC 2012
>Originator:     Radim Kolar
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD ponto.amerinoc.com 8.2-STABLE FreeBSD 8.2-STABLE #0: Mon Sep  5 02:49:21 PDT
>Description:
Make this module to work with Dovecot
Tested against dovecot 2.0 branch

Added file(s):
- files/dovecot.patch

Port maintainer (apache@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_4 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:

--- ap22-mod_auth_imap-2.2.0_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/mod_auth_imap2/Makefile ./Makefile
--- /usr/ports/www/mod_auth_imap2/Makefile	2011-08-20 19:27:39.000000000 +0200
+++ ./Makefile	2012-03-29 13:05:09.564911966 +0200
@@ -7,7 +7,7 @@
 
 PORTNAME=	mod_auth_imap
 PORTVERSION=	2.2.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www
 MASTER_SITES=	http://ben.brillat.net/files/projects/mod_auth_imap2/
 DISTNAME=	mod_auth_imap2-${PORTVERSION}
@@ -16,7 +16,9 @@
 MAINTAINER=	apache@FreeBSD.org
 COMMENT=	An Apache 2 module to provide authentication via an IMAP mail server
 
-MAKE_JOBS_SAFE=  yes
+LICENSE=	GPLv2
+
+MAKE_JOBS_SAFE=	yes
 
 WRKSRC=		${WRKDIR}/${PORTNAME}2-${PORTVERSION}
 USE_APACHE=	20+
@@ -24,6 +26,14 @@
 AP_FAST_BUILD=	YES
 AP_GENPLIST=	YES
 
+OPTIONS	=	DOVECOT "Patch for dovecot" Off
+.include <bsd.port.options.mk>
+
+.ifdef (WITH_DOVECOT)
+post-patch:
+	cd ${WRKSRC} && ${PATCH} ${PATCH_ARGS} <${PATCHDIR}/dovecot.patch
+.endif
+
 PORTDOCS=	htaccess-example httpd.conf-append-example
 
 .if !defined(NOPORTDOCS)
diff -ruN --exclude=CVS /usr/ports/www/mod_auth_imap2/files/dovecot.patch ./files/dovecot.patch
--- /usr/ports/www/mod_auth_imap2/files/dovecot.patch	1970-01-01 01:00:00.000000000 +0100
+++ ./files/dovecot.patch	2012-03-29 12:40:09.000000000 +0200
@@ -0,0 +1,23 @@
+--- mod_auth_imap.c.orig	2006-05-08 01:22:43.000000000 +0200
++++ mod_auth_imap.c	2012-03-29 12:38:30.911364281 +0200
+@@ -170,7 +170,7 @@
+     tcp_gets(Sock,result,500);
+ 
+     //skip lines that start with "*"
+-    if (strncmp(result,"* ",2 == 0)) {
++    if (strncmp(result,"* ",2) == 0) {
+ 	tcp_gets(Sock,result,500);
+     }
+ 
+@@ -188,6 +188,11 @@
+     tcp_puts(Sock,buf);
+     tcp_gets(Sock,result,500);
+ 
++    //skip lines that start with "*"
++    if (strncmp(result,"* ",2) == 0) {
++       tcp_gets(Sock,result,500);
++    }
++
+     if (strncmp(result,"A002 OK",7) == 0) {
+         if (logflag) {
+             ap_log_rerror(APLOG_MARK,APLOG_WARNING|APLOG_NOERRNO,0,r,"mod_auth_imap: Verified login for user %s.", username);
--- ap22-mod_auth_imap-2.2.0_2.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->apache 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Mar 29 11:30:19 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166488 
State-Changed-From-To: open->feedback 
State-Changed-By: crees 
State-Changed-When: Sat Jul 14 14:58:53 UTC 2012 
State-Changed-Why:  
While you're waiting for apache@ to look at it, I suggest you write the 
OPTIONS as per the Handbook (OPTIONSng).  Also, use EXTRA_PATCHES 
instead of manually writing the post-patch target.  Also, could you 
improve the OPTION description? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166488 

From: Radim Kolar <hsn@filez.com>
To: bug-followup@FreeBSD.org, hsn@filez.com
Cc:  
Subject: Re: ports/166488: [PATCH] www/mod_auth_imap2: add dovecot patch
Date: Sat, 14 Jul 2012 18:30:00 +0200

 Here is reworked patch.
 Difference between this and old version is that we apply dovecot patch 
 anyway because it follows IMAP4 protocol and
 will not break non dovecot system.
 
 ===> Viewing diff with more
 diff -ruN --exclude=CVS /usr/ports/www/mod_auth_imap2/Makefile ./Makefile
 --- /usr/ports/www/mod_auth_imap2/Makefile      2011-08-20 
 19:27:39.000000000 +0200
 +++ ./Makefile  2012-07-14 18:14:19.337700139 +0200
 @@ -7,7 +7,7 @@
 
   PORTNAME=      mod_auth_imap
   PORTVERSION=   2.2.0
 -PORTREVISION=  1
 +PORTREVISION=  2
   CATEGORIES=    www
   MASTER_SITES= http://ben.brillat.net/files/projects/mod_auth_imap2/
   DISTNAME=      mod_auth_imap2-${PORTVERSION}
 @@ -16,7 +16,9 @@
   MAINTAINER=    apache@FreeBSD.org
   COMMENT=       An Apache 2 module to provide authentication via an 
 IMAP mail server
 
 -MAKE_JOBS_SAFE=  yes
 +LICENSE=       GPLv2
 +
 +MAKE_JOBS_SAFE=        yes
 
   WRKSRC=                ${WRKDIR}/${PORTNAME}2-${PORTVERSION}
   USE_APACHE=    20+
 diff -ruN --exclude=CVS 
 /usr/ports/www/mod_auth_imap2/files/patch-dovecot ./files/patch-dovecot
 --- /usr/ports/www/mod_auth_imap2/files/patch-dovecot   1970-01-01 
 01:00:00.000000000 +0100
 +++ ./files/patch-dovecot       2012-03-29 12:40:09.000000000 +0200
 @@ -0,0 +1,23 @@
 +--- mod_auth_imap.c.orig       2006-05-08 01:22:43.000000000 +0200
 ++++ mod_auth_imap.c    2012-03-29 12:38:30.911364281 +0200
 +@@ -170,7 +170,7 @@
 +     tcp_gets(Sock,result,500);
 +
 +     //skip lines that start with "*"
 +-    if (strncmp(result,"* ",2 == 0)) {
 ++    if (strncmp(result,"* ",2) == 0) {
 +       tcp_gets(Sock,result,500);
 +     }
 +
 +@@ -188,6 +188,11 @@
 +     tcp_puts(Sock,buf);
 +     tcp_gets(Sock,result,500);
 +
 ++    //skip lines that start with "*"
 ++    if (strncmp(result,"* ",2) == 0) {
 ++       tcp_gets(Sock,result,500);
 ++    }
 ++
 +     if (strncmp(result,"A002 OK",7) == 0) {
 +         if (logflag) {
 + 
 ap_log_rerror(APLOG_MARK,APLOG_WARNING|APLOG_NOERRNO,0,r,"mod_auth_imap: 
 Verified login for user %s.", username);
 ===> Done
 
State-Changed-From-To: feedback->open 
State-Changed-By: ohauer 
State-Changed-When: Sat Aug 25 17:35:28 UTC 2012 
State-Changed-Why:  
I'll take it. 

I've send the patch upstreamso a new source can be rolled, 
waiting for upstream feedback. 

Btw. we prefer such platform independent patches are sent 
to upstream, so they can roll a new source file 




Responsible-Changed-From-To: apache->ohauer 
Responsible-Changed-By: ohauer 
Responsible-Changed-When: Sat Aug 25 17:35:28 UTC 2012 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=166488 
State-Changed-From-To: open->closed 
State-Changed-By: ohauer 
State-Changed-When: Wed Aug 29 11:58:39 UTC 2012 
State-Changed-Why:  
Committed, 
Thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166488 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/166488: commit references a PR
Date: Wed, 29 Aug 2012 11:57:39 +0000 (UTC)

 Author: ohauer
 Date: Wed Aug 29 11:57:30 2012
 New Revision: 303335
 URL: http://svn.freebsd.org/changeset/ports/303335
 
 Log:
   - add missing patch
   
   PR:             ports/166488
   Submitted by:   Radim Kolar <hsn@filez.com>
 
 Added:
   head/www/mod_auth_imap2/files/
   head/www/mod_auth_imap2/files/patch-mod_auth_imap.c   (contents, props changed)
 
 Added: head/www/mod_auth_imap2/files/patch-mod_auth_imap.c
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/www/mod_auth_imap2/files/patch-mod_auth_imap.c	Wed Aug 29 11:57:30 2012	(r303335)
 @@ -0,0 +1,23 @@
 +--- ./mod_auth_imap.c.orig	2006-05-08 01:22:43.000000000 +0200
 ++++ ./mod_auth_imap.c	2012-08-25 19:06:59.000000000 +0200
 +@@ -170,7 +170,7 @@
 +     tcp_gets(Sock,result,500);
 + 
 +     //skip lines that start with "*"
 +-    if (strncmp(result,"* ",2 == 0)) {
 ++    if (strncmp(result,"* ",2) == 0) {
 + 	tcp_gets(Sock,result,500);
 +     }
 + 
 +@@ -188,6 +188,11 @@
 +     tcp_puts(Sock,buf);
 +     tcp_gets(Sock,result,500);
 + 
 ++    //skip lines that start with "*"
 ++    if (strncmp(result,"* ",2) == 0) {
 ++       tcp_gets(Sock,result,500);
 ++    }
 ++
 +     if (strncmp(result,"A002 OK",7) == 0) {
 +         if (logflag) {
 +             ap_log_rerror(APLOG_MARK,APLOG_WARNING|APLOG_NOERRNO,0,r,"mod_auth_imap: Verified login for user %s.", username);
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
