ports/69628: [PATCH] security/amavisd-new does not run out of the box
Dan Langille
dan at langille.unixathome.org
Mon Jul 26 19:10:35 UTC 2004
>Number: 69628
>Category: ports
>Synopsis: [PATCH] security/amavisd-new does not run out of the box
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jul 26 19:10:24 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Dan Langille
>Release: FreeBSD 4.9-STABLE i386
>Organization:
The FreeBSD Diary
>Environment:
System: FreeBSD xeon.unixathome.org 4.9-STABLE FreeBSD 4.9-STABLE #2: Wed Mar 3 08:16:24 EST 2004 dan at polo.unixathome.org:/usr/obj/usr/src/sys/XEON i386
>Description:
As installed, amavisd-new will not run.
>How-To-Repeat:
cd /usr/ports/security/amavisd-new
make install
# /usr/local/etc/rc.d/amavisd.sh start
Starting amavisd.
Config file %%PREFIX%%/etc/amavisd.conf does not exist at /usr/local/sbin/amavisd line 899.
Yet, /usr/local/etc/amavisd.conf does exit.
The problem is line 899, which contains %%PREFIX%% instead of /usr/local.
>Fix:
with help from spike724: instead of patching the file, use the REPLACE_CMD
diff -ruN /usr/ports/security/amavisd-new/Makefile amavisd-new/Makefile
--- /usr/ports/security/amavisd-new/Makefile Sun Jul 18 06:05:50 2004
+++ amavisd-new/Makefile Mon Jul 26 15:02:56 2004
@@ -39,6 +39,7 @@
USE_PERL5_RUN= yes
USE_RC_SUBR= yes
+USE_REINPLACE= yes
PKGINSTALL= ${WRKDIR}/INSTALL
PKGDEINSTALL= ${WRKDIR}/DEINSTALL
@@ -128,6 +129,11 @@
.for FILE in AAAREADME.first INSTALL LDAP.schema LICENSE RELEASE_NOTES README_FILES/*
${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
.endfor
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|/etc/amavisd.conf|${PREFIX}/etc/amavisd.conf|' \
+ ${WRKSRC}/amavisd
post-install:
@${CAT} ${PKGMESSAGE}
diff -ruN /usr/ports/security/amavisd-new/files/patch-amavisd amavisd-new/files/patch-amavisd
--- /usr/ports/security/amavisd-new/files/patch-amavisd Sun Jul 18 06:05:50 2004
+++ amavisd-new/files/patch-amavisd Wed Dec 31 19:00:00 1969
@@ -1,11 +0,0 @@
---- amavisd.orig Sun Jul 4 03:19:35 2004
-+++ amavisd Sun Jul 4 11:28:36 2004
-@@ -7367,7 +7367,7 @@
- $Amavis::Conf::log_recip_templ = $1
- if $Amavis::Conf::log_recip_templ=~/^(.*?)[\r\n]+\z/s;
-
--my($config_file) = '/etc/amavisd.conf'; # default location of config file
-+my($config_file) = '%%PREFIX%%/etc/amavisd.conf'; # default location of config file
-
- # Consider droping privileges early, before reading config file.
- # This is only possible if running under chroot will not be needed.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list