Summary: | postgrey startup script bug | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | jonny <jonny> | ||||
Component: | Individual Port(s) | Assignee: | Volker Stolz <vs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
jonny
2005-02-05 20:20:14 UTC
Dear maintainer, is this the same issue as in ports/76253? Volker State Changed From-To: open->feedback Forwarded PR to maintainer Responsible Changed From-To: freebsd-ports-bugs->vs Handle Volker Stolz wrote:
> Dear maintainer, is this the same issue as in ports/76253?
Note: "One problem is that the pidfile /var/run/postgrey.pid isn't
created."
I don´t think so, because the pidfile is created on my setup.
$ ps -aux | grep perl
postgrey 18732 0.0 0.8 9968 8616 ?? Is Sat09PM 0:03.88 [perl5.8.6]
jonny 18238 0.0 0.1 1488 568 ph R+ 1:49PM 0:00.00 grep perl
$ ls -l /var/run/postgrey.pid
-rw-r--r-- 1 postgrey postgrey 6 Feb 5 21:30 /var/run/postgrey.pid
$ cat /var/run/postgrey.pid
18732
$
Other than that, it is very similar.
Also: "This seems to only be a problem if you can't access
/dev/kmem" is wrong, because other perl files work perfectly, and I am
not using jail nor chroot in this setup.
I think the problem is with the Net::Daemon perl library removing
the ARGV components, which is incompatible with rc.subr procedures.
Maybe the maintainer cannot do anything other than the same workaround
as I did, which is not Good(TM).
Cheers,
Jonny
The root problem here was that because of Postgrey's very long argument list, FreeBSD 5.x was displaying, '[perl]' in ps instead of the full application and args. The max length is dictated by kern.ps_arg_cache_limit and set to 256 by default. The attached patch changes the defaults in the postgrey application from /etc/ to ${PREFIX}/etc/, and trims down the argument list in the startup script to use defaults for the whitelist locations. - H Stupid mailer. Here's that patch again, and a URL in case is fails again: http://taurus.internal.org/~haroldp/postgrey-fix.patch Patch: diff -ruN postgrey.bak/Makefile postgrey/Makefile --- postgrey.bak/Makefile Sun Mar 27 21:19:01 2005 +++ postgrey/Makefile Thu Apr 7 15:53:48 2005 @@ -7,6 +7,7 @@ PORTNAME= postgrey PORTVERSION= 1.18 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://isg.ee.ethz.ch/tools/postgrey/pub/ @@ -19,6 +20,7 @@ USE_PERL5= yes USE_RC_SUBR= yes +USE_REINPLACE= yes NO_BUILD= yes ETCFILES= whitelist_clients whitelist_recipients @@ -51,6 +53,9 @@ .if ${PERL_LEVEL} < 500600 IGNORE= Needs perl 5.6.1 or higher, install lang/perl5.8 and try again .endif + +post-patch: + ${REINPLACE_CMD} -e "s#/etc/#${PREFIX}/etc/#" ${WRKSRC}/postgrey pre-install: ${SED} -e 's#%%PREFIX%%#${PREFIX}#g' -e 's#%%RC_SUBR%%#${RC_SUBR}#g' \ diff -ruN postgrey.bak/files/postgrey.sh postgrey/files/postgrey.sh --- postgrey.bak/files/postgrey.sh Wed Jan 26 16:03:28 2005 +++ postgrey/files/postgrey.sh Thu Apr 7 13:31:12 2005 @@ -36,10 +36,7 @@ postgrey_enable=${postgrey_enable:-"NO"} postgrey_pidfile=${postgrey_pidfile:-"/var/run/postgrey.pid"} postgrey_flags=${postgrey_flags:-"--pidfile=${postgrey_pidfile} \ - --inet=10023 -d --user=postgrey --group=postgrey --dbdir=/var/db/postgrey \ - --whitelist-clients=%%PREFIX%%/etc/postfix/postgrey_whitelist_clients \ - --whitelist-clients=%%PREFIX%%/etc/postfix/postgrey_whitelist_clients.local \ - --whitelist-recipients=%%PREFIX%%/etc/postfix/postgrey_whitelist_recipients"} + --inet=10023 -d --user=postgrey --group=postgrey --dbdir=/var/db/postgrey"} pidfile="${postgrey_pidfile}" State Changed From-To: feedback->closed Fixed in the upgrade to 1.21 |