Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 May 2006 20:55:51 -0700 (PDT)
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/97876: mail/fetchmail -- rc.subr script doesn't work on 4.x
Message-ID:  <20060525035551.CAC5F5D41@mx1.parodius.com>
Resent-Message-ID: <200605250400.k4P40ahI010478@freefall.freebsd.org>

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

>Number:         97876
>Category:       ports
>Synopsis:       mail/fetchmail -- rc.subr script doesn't work on 4.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 25 04:00:36 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
Parodius Networking
>Environment:
System: FreeBSD pentarou.parodius.com 4.11-STABLE FreeBSD 4.11-STABLE #0: Thu Jan 12 01:50:11 PST 2006 root@pentarou.parodius.com:/usr/obj/usr/src/sys/PENTAROU i386
>Description:
	fetchmail daemon startup script (for rc.subr) is not 4.x compatible.

	The problem is that the fetchmail.sh script tries to blindly call
	/etc/rc.subr, which is only available on 5.x and 6.x.  This is
	incorrect; it needs to use %%RC_SUBR%% which will be expanded
	properly at patch or install-time.

	See line 49 of files/fetchmail.in for what I mean.  :-)

	I've also cleaned up a typo in the Makefile.
>How-To-Repeat:
	Try to start /usr/local/etc/rc.d/fetchmail.sh on a 4.x box.
>Fix:
	Apply the below patches.

--- files/fetchmail.in.orig	Wed May 17 01:06:12 2006
+++ files/fetchmail.in	Wed May 24 20:49:22 2006
@@ -46,7 +46,7 @@
 #  * `awaken': Sends a signal to the daemon(s) to check for new mail
 #     immediately
 
-. /etc/rc.subr
+. %%RC_SUBR%%
 
 name=fetchmail
 rcvar=`set_rcvar`


--- Makefile.orig	Wed May 17 01:06:12 2006
+++ Makefile	Wed May 24 20:53:19 2006
@@ -24,7 +24,7 @@
 RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root.crt:${PORTSDIR}/security/ca-roots
 
 USE_RC_SUBR=	fetchmail
-FETCHMAILRC=	${PREFIX}/etc//fetchmailrc
+FETCHMAILRC=	${PREFIX}/etc/fetchmailrc
 
 USE_BZIP2=	yes
 USE_GMAKE=	yes
>Release-Note:
>Audit-Trail:
>Unformatted:



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