From nobody@FreeBSD.org  Thu Mar 26 16:42:05 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 36411106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 Mar 2009 16:42:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 0946B8FC1F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 Mar 2009 16:42:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2QGg47L064568
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 26 Mar 2009 16:42:04 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2QGg4Zr064567;
	Thu, 26 Mar 2009 16:42:04 GMT
	(envelope-from nobody)
Message-Id: <200903261642.n2QGg4Zr064567@www.freebsd.org>
Date: Thu, 26 Mar 2009 16:42:04 GMT
From: Daniel Bond <db@danielbond.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] up-imapproxy hardcoded to use /etc/imapproxyd.conf, even though it uses autoconf
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         133098
>Category:       ports
>Synopsis:       [patch] mail/up-imapproxy hardcoded to use /etc/imapproxyd.conf, even though it uses autoconf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mbr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 26 16:50:04 UTC 2009
>Closed-Date:    Sat Jan 02 22:32:05 UTC 2010
>Last-Modified:  Sat Jan  2 22:40:01 UTC 2010
>Originator:     Daniel Bond
>Release:        FreeBSD 7.1-RELEASE-p4 amd64
>Organization:
Network Solutions Norway ASA
>Environment:
FreeBSD foo.bar.org 7.1-RELEASE-p4 FreeBSD 7.1-RELEASE-p4 #0: Sun Mar 22 09:43:46 UTC 2009 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

standard default/GENERIC installation
>Description:
After upgrading up-imapproxyd, the binaries it provides no longer works (in.imapproxy and pimpstat), without manually specifying path to config-file (with -f option). The reason is that the package uses a "define" to hardcode the location of it's configfile, unless it is allready set. The autoconfig ./configure script fails to set it up, resulting in following static location

#ifndef DEFAULT_CONFIG_FILE
#define DEFAULT_CONFIG_FILE     "/etc/imapproxy.conf"
#endif
 
I have tried to notify the software creator, but not sure if my message has been noticed (or active, the website died about a week ago).


>How-To-Repeat:
Install or upgrade the ports/mail/up-imapproxyd, and use any part of it.
"/usr/local/etc/rc.d/imapproxyd start" will fail to use correct config file
"/usr/local/sbin/pimpstat" will fail to use correct config file


>Fix:
The provided patch adds a definition of DEFAULT_CONFIG_FILE in config.h (based on --sysconfdir=..), overriding the static one. The port Makefile has been modified to run "autoheader" and "autoconf", to generate a updated ./configure -script.



Patch attached with submission follows:

--- files/nonexisting	1970-01-01 01:00:00.000000000 +0100
+++ files/patch-configure.in	2009-03-26 15:24:36.000000000 +0100
@@ -0,0 +1,12 @@
+--- configure.in.orig	2009-03-26 15:13:59.000000000 +0100
++++ configure.in	2009-03-26 15:14:54.000000000 +0100
+@@ -129,7 +129,8 @@
+ LIBS="$save_LIBS"
+ AC_SUBST(LIB_CURSES)
+ 
+-
++eval expanded_sysconfdir="\"$sysconfdir\""
++AC_DEFINE_UNQUOTED(DEFAULT_CONFIG_FILE, "$expanded_sysconfdir/imapproxyd.conf", [default location of config file])
+ AC_CONFIG_HEADER(config.h)
+ 
+ 
--- Makefile.orig	2009-03-26 15:18:39.000000000 +0100
+++ Makefile	2009-03-26 15:36:02.000000000 +0100
@@ -16,7 +16,8 @@
 MAINTAINER=	mbr@FreeBSD.org
 COMMENT=	A caching IMAP proxy server
 
-GNU_CONFIGURE=	YES
+USE_AUTOTOOLS=	autoheader:262
+
 USE_RC_SUBR=	imapproxyd.sh
 DOCS=		COPYING ChangeLog README README.debian \
 		README.known_issues README.ssl
@@ -26,10 +27,6 @@
 
 CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
 
-post-patch:
-	${REINPLACE_CMD} -e "s|-lc_r|${PTHREAD_LIBS}|g" \
-		-e "s|-lpthread|${PTHREAD_LIBS}|g" ${WRKSRC}/configure
-
 do-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mbr 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Mar 26 19:06:47 UTC 2009 
Responsible-Changed-Why:  
Fix synopsis and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133098 
State-Changed-From-To: open->closed 
State-Changed-By: mbr 
State-Changed-When: Sat Jan 2 22:31:40 UTC 2010 
State-Changed-Why:  
Committed, thanks. Sorry that it took so long. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/133098: commit references a PR
Date: Sat,  2 Jan 2010 22:31:01 +0000 (UTC)

 mbr         2010-01-02 22:30:52 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/up-imapproxy    Makefile 
   Added files:
     mail/up-imapproxy/files patch-configure.in 
   Log:
   Fix hardcoded use of /etc/imapproxyd.conf with autoconf
   Remove unneeded postpatch section
   
   Other PRs just set the default location of the
   default config file:  ports/142247 ports/125655 ports/122422
   
   PR:             ports/133098
   Submitted by:   Daniel Bond <db@danielbond.org>
   
   Revision  Changes    Path
   1.17      +3 -6      ports/mail/up-imapproxy/Makefile
   1.3       +12 -0     ports/mail/up-imapproxy/files/patch-configure.in (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
