- Patch postgrey to use PGY_GROUPNAME by default

- Don't show OPTIONS dialog for just DOCS option
- Tidy up port Makefile
- Rework rc script
- Add UPDATING message and pkg-message to inform users about the
  rc script changes

PR:		ports/178644
Submitted by:	Darren Pilgrim <ports.maintainer@evilphi.com> (maintainer)
This commit is contained in:
Guido Falsi 2013-05-25 14:55:19 +00:00
parent 5650ccf23e
commit bbc8d61610
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=319058
5 changed files with 46 additions and 40 deletions

View file

@ -5,6 +5,17 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades. you update your ports collection, before attempting any port upgrades.
20130525:
AFFECTS: users of mail/postgrey
AUTHOR: Darren Pilgrim <ports.maintainer@evilphi.com>
The RC script for postgrey has been modified. If you use the
default value for postgrey_flags this does not affect you.
If you have postgrey listening on a unix socket or set any optional
values, please read the comments in the RC scripts and check your
settings in rc.conf prior to restarting postgrey.
20130525: 20130525:
AFFECTS: users of x11/xorg and all xorg ports AFFECTS: users of x11/xorg and all xorg ports
AUTHOR zeising@FreeBSD.org AUTHOR zeising@FreeBSD.org

View file

@ -3,7 +3,7 @@
PORTNAME= postgrey PORTNAME= postgrey
PORTVERSION= 1.34 PORTVERSION= 1.34
PORTREVISION= 4 PORTREVISION= 5
CATEGORIES= mail CATEGORIES= mail
MASTER_SITES= http://postgrey.schweikert.ch/pub/ \ MASTER_SITES= http://postgrey.schweikert.ch/pub/ \
http://postgrey.schweikert.ch/pub/old/ http://postgrey.schweikert.ch/pub/old/
@ -23,14 +23,13 @@ NO_BUILD= yes
POD2MAN?= pod2man POD2MAN?= pod2man
PORTDOCS= README Changes README.exim PORTDOCS= README Changes README.exim
SUB_FILES= pkg-install SUB_FILES= pkg-install
SUB_LIST= USER=${PGY_USERNAME} UID=${PGY_USERID} GROUP=${PGY_GROUPNAME} \ SUB_LIST= USER=${PGY_USERNAME} \
GID=${PGY_GROUPID} ETCFILES="${ETCFILES}" \ GROUP=${PGY_GROUPNAME} \
ETCFILES="${ETCFILES}" \
POSTGREYDIR=${PGY_DIR} POSTGREYDIR=${PGY_DIR}
ETCFILES= whitelist_clients whitelist_recipients ETCFILES= whitelist_clients whitelist_recipients
PGY_USERNAME?= postgrey PGY_USERNAME?= postgrey
PGY_USERID?= 225 PGY_GROUPNAME?= postgrey
PGY_GROUPNAME?= ${PGY_USERNAME}
PGY_GROUPID?= ${PGY_USERID}
PGY_DIR?= /var/db/postgrey PGY_DIR?= /var/db/postgrey
USERS= ${PGY_USERNAME} USERS= ${PGY_USERNAME}
@ -40,12 +39,10 @@ MAN1= ${PORTNAME}.1 policy-test.1 postgreyreport.1
USES= shebangfix USES= shebangfix
SHEBANG_FILES= ${WRKSRC}/postgrey SHEBANG_FILES= ${WRKSRC}/postgrey
OPTIONS_DEFINE= DOCS
OPTIONS_DEFAULT=DOCS
.include <bsd.port.options.mk> .include <bsd.port.options.mk>
post-patch: post-patch:
@${REINPLACE_CMD} -e 's#nogroup#${PGY_GROUPNAME}#' ${WRKSRC}/postgrey
@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey @${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_* @${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
@${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PGY_DIR}#' ${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport @${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PGY_DIR}#' ${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport

View file

@ -1,21 +1,16 @@
#! /bin/sh #! /bin/sh
# #
# $FreeBSD: /tmp/pcvs/ports/mail/postgrey/files/pkg-install.in,v 1.6 2012-04-18 07:54:30 crees Exp $ # $FreeBSD$
PATH=/bin:/usr/bin:/usr/sbin PATH=/bin:/usr/bin:/usr/sbin
case $2 in case $2 in
PRE-INSTALL) PRE-INSTALL)
echo "---> Starting install script:" if [ -z "%%POSTGREYDIR%%" -o -z "%%USER%%" -o -z "%%GROUP%%" ]; then
if [ -z "%%POSTGREYDIR%%" -o \
-z "%%USER%%" -o -z "%%GROUP%%" -o \
-z "%%UID%%" -o -z "%%GID%%" ]; then
echo "ERROR: A required pragma was empty" echo "ERROR: A required pragma was empty"
exit 1 exit 1
fi fi
;; ;;
POST-INSTALL) POST-INSTALL)

View file

@ -7,41 +7,37 @@
# BEFORE: mail # BEFORE: mail
# KEYWORD: shutdown # KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable postgrey: # Add the following lines to /etc/rc.conf to enable postgrey:
# #
# postgrey_enable="YES" # postgrey_enable (bool) Set to 'YES' to enable
# Default: NO
# postgrey_dbdir (path) Location of postgrey database files.
# Default: /var/db/postgrey
# postgrey_flags (extra args) Additional command-line parameters.
# Default: --inet=10023
# #
# See perldoc postgrey for flags # Note:
# #
# postgrey_flags must include a --inet or --unix option or postgrey will
# not run. Change the --dbdir option with postgrey_dbdir. Please see
# the postgrey(1) man page or perldoc postgrey for more information.
. /etc/rc.subr . /etc/rc.subr
name=postgrey name=postgrey
rcvar=postgrey_enable
command=%%PREFIX%%/sbin/postgrey
required_dirs=/var/db/postgrey
extra_commands=reload
stop_postcmd=stop_postcmd
stop_postcmd()
{
rm -f $pidfile
}
# set defaults
load_rc_config $name load_rc_config $name
postgrey_enable=${postgrey_enable:-"NO"} : ${postgrey_enable:=NO}
postgrey_greylist_header=${postgrey_greylist_header:-"X-Greylist: delayed %t seconds by postgrey-%v at %h\; %d"} : ${postgrey_dbdir:=/var/db/postgrey}
postgrey_pidfile=${postgrey_pidfile:-"/var/run/postgrey.pid"} : ${postgrey_flags:=--inet=10023}
postgrey_flags=${postgrey_flags:-"--pidfile=${postgrey_pidfile} \
--inet=10023 -d --user=%%USER%% --group=%%GROUP%% --dbdir=/var/db/postgrey \
--x-greylist-header=${postgrey_greylist_header}"}
pidfile="${postgrey_pidfile}" command=%%PREFIX%%/sbin/postgrey
pidfile=/var/run/postgrey.pid
required_dirs=${postgrey_dbdir}
command_args="-d --pidfile=${pidfile} --dbdir=${postgrey_dbdir}"
stop_postcmd="rm -f ${pidfile}"
run_rc_command "$1" run_rc_command "$1"

View file

@ -0,0 +1,7 @@
ATTENTION
The startup script for postgrey will make it listen on TCP port
10023 by default. If you want to use a different setting, please
read the comments in the RC script and set the appropriate settings
via rc.conf before starting postgrey.