- use ports framework to create USER and GROUP [1]

- add bugfix for https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6488
  noted by Yury <yuri _at_ rawbw.com>
- bump PORTREVISION

PR:		ports/157664 [1]
Submitted by:	Chris Rees <utisoft _at_ gmail.com>
Approved by:	maintainer ( Michael Scheidell <scheidell _at_ secnap.net> )
This commit is contained in:
Olli Hauer 2011-06-07 23:23:51 +00:00
parent 2cd450c3d2
commit f12ff0d66f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275204
4 changed files with 26 additions and 28 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= Mail-SpamAssassin
PORTVERSION= 3.3.1
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= mail perl5
MASTER_SITES= ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
MASTER_SITE_SUBDIR= spamassassin/source/:apache Mail/:cpan
@ -23,7 +23,6 @@ RUN_DEPENDS= p5-NetAddr-IP>=4.00.7:${PORTSDIR}/net-mgmt/p5-NetAddr-IP \
${SITE_PERL}/Bundle/LWP.pm:${PORTSDIR}/www/p5-libwww \
${SITE_PERL}/${PERL_ARCH}/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect \
${SITE_PERL}/Mail/Internet.pm:${PORTSDIR}/mail/p5-Mail-Tools
BUILD_DEPENDS= ${RUN_DEPENDS}
CONFLICTS= ja-p5-Mail-SpamAssassin-[0-9]*
@ -35,6 +34,9 @@ CONFIGURE_ARGS= SYSCONFDIR="${PREFIX}/etc" \
CONTACT_ADDRESS="${CONTACT_ADDRESS}" \
LOCALSTATEDIR="/var/db/spamassassin"
USERS= spamd
GROUPS= spamd
# You can override it if you like
CONTACT_ADDRESS?= The administrator of that system

View File

@ -1,3 +1,2 @@
MD5 (Mail-SpamAssassin-3.3.1.tar.gz) = 5a93f81fda315411560ff5da099382d2
SHA256 (Mail-SpamAssassin-3.3.1.tar.gz) = a11ca187150d5a8fc2904c4a50f29d3ff739294fa714aaab127ba692d65410ad
SIZE (Mail-SpamAssassin-3.3.1.tar.gz) = 1196842

View File

@ -0,0 +1,18 @@
BUG 6488 - Lint errors with Perl 5.12.1 in AntiVirus.pm
Index: lib/Mail/SpamAssassin/Plugin/AntiVirus.pm
=========================================================================
--- lib/Mail/SpamAssassin/Plugin/AntiVirus.pm (revision 574664)
+++ lib/Mail/SpamAssassin/Plugin/AntiVirus.pm (revision 1028149)
@@ -98,9 +98,9 @@
my ($ctype, $boundary, $charset, $name) =
Mail::SpamAssassin::Util::parse_content_type($p->get_header('content-type'));
- $name = lc $name || '';
+ $name = lc($name || '');
- my $cte = lc $p->get_header('content-transfer-encoding') || '';
+ my $cte = lc($p->get_header('content-transfer-encoding') || '');
$ctype = lc $ctype;
if ($name && $name =~ /\.(?:ade|adp|asx|bas|bat|chm|cmd|com|cpl|crt|dll|exe|hlp|hta|inf|ins|isp|js|jse|lnk|mda|mdb|mde|mdt|mdw|mdz|msc|msi|msp|mst|nws|ops|pcd|pif|prf|reg|scf|scr\??|sct|shb|shs|shm|swf|url|vb|vbe|vbs|vbx|vxd|wsc|wsf|wsh)$/)

View File

@ -32,32 +32,11 @@ yesno() {
echo "Please answer yes or no."
done
}
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-s "/sbin/nologin" -d "${HOME}" \
-c "SpamAssassin user"; \
then
echo "Added user \"${USER}\"."
mkdir ${HOME} && chown ${USER}:${GROUP} ${HOME}
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
# Create pid directory
mkdir /var/run/spamd 2> /dev/null && chown ${USER}:${GROUP} /var/run/spamd
install -d -g ${USER} -g ${GROUP} /var/run/spamd
/usr/bin/su root -c "${PKG_PREFIX}/bin/spamassassin -x -L --lint"
if [ ${?} -eq 255 ];then
echo "***********************************************"
echo "*__ ___ ____ _ _ ___ _ _ ____ *"
@ -82,7 +61,7 @@ yesno() {
fi
fi
fi
exit 0
fi # post-install