Date: Thu, 26 Mar 2009 16:42:04 GMT From: Daniel Bond <db@danielbond.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/133098: [patch] up-imapproxy hardcoded to use /etc/imapproxyd.conf, even though it uses autoconf Message-ID: <200903261642.n2QGg4Zr064567@www.freebsd.org> Resent-Message-ID: <200903261650.n2QGo4u7026950@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133098 >Category: ports >Synopsis: [patch] up-imapproxy hardcoded to use /etc/imapproxyd.conf, even though it uses autoconf >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: Thu Mar 26 16:50:04 UTC 2009 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903261642.n2QGg4Zr064567>