aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorGreg Larkin <glarkin@FreeBSD.org>2009-12-18 01:31:19 +0000
committerGreg Larkin <glarkin@FreeBSD.org>2009-12-18 01:31:19 +0000
commita2336cced0561f7dd036ee13e9441c4cf8788f70 (patch)
tree60d3e0cf3e3f2de83448ba6b4c5ae367bfe32503 /security
parenta1513a0b78d604bce980ecc93285d5cbb2363ff7 (diff)
downloadports-a2336cced0561f7dd036ee13e9441c4cf8788f70.tar.gz
ports-a2336cced0561f7dd036ee13e9441c4cf8788f70.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/logcheck/Makefile18
-rw-r--r--security/logcheck/files/extra-patch-debian__logcheck.cron.d.in (renamed from security/logcheck/files/patch-debian__logcheck.cron.d)4
-rw-r--r--security/logcheck/files/extra-patch-docs__logcheck.8.in (renamed from security/logcheck/files/patch-docs__logcheck.8)6
-rw-r--r--security/logcheck/files/extra-patch-etc__logcheck.conf.in (renamed from security/logcheck/files/patch-etc__logcheck.conf)2
-rw-r--r--security/logcheck/files/extra-patch-src__logcheck.in (renamed from security/logcheck/files/patch-src__logcheck)45
-rw-r--r--security/logcheck/files/pkg-message.in4
6 files changed, 60 insertions, 19 deletions
diff --git a/security/logcheck/Makefile b/security/logcheck/Makefile
index 9919d37f2762..ec045d679687 100644
--- a/security/logcheck/Makefile
+++ b/security/logcheck/Makefile
@@ -7,7 +7,7 @@
PORTNAME= logcheck
PORTVERSION= 1.2.54
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL}
DISTNAME= ${PORTNAME}_${PORTVERSION}
@@ -40,12 +40,22 @@ DOCS= AUTHORS CHANGES CREDITS LICENSE TODO docs/README*
PORTDOCS= ${DOCS:T}
MAN8= logcheck.8 logtail.8
+PATCH_LIST= extra-patch-debian__logcheck.cron.d \
+ extra-patch-docs__logcheck.8 \
+ extra-patch-etc__logcheck.conf \
+ extra-patch-src__logcheck
+EXTRA_PATCHES= ${PATCH_LIST:C|^|${WRKDIR}/|g}
+
+pre-patch:
+.for patch in ${PATCH_LIST}
+ @${SED} ${_SUB_LIST_TEMP} ${FILESDIR}/${patch}.in > ${WRKDIR}/${patch}
+.endfor
+
do-build:
@${REINPLACE_CMD} -e 's!/var/log/syslog!/var/log/messages!' \
${WRKSRC}/etc/logcheck.logfiles
- @${REINPLACE_CMD} -e 's!/etc/logcheck!${ETCDIR}!' \
- -e 's!/usr/share/doc/logcheck-database/README.logcheck-database.gz!${DOCSDIR}/README.logcheck-database!' \
- ${WRKSRC}/docs/logcheck.sgml
+ @${REINPLACE_CMD} -e "s|#!/usr/bin/perl|#!${PERL}|" \
+ ${WRKSRC}/src/logtail
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/src/logcheck ${PREFIX}/sbin
diff --git a/security/logcheck/files/patch-debian__logcheck.cron.d b/security/logcheck/files/extra-patch-debian__logcheck.cron.d.in
index 7ab3d2b422d7..cbe5eaa7129b 100644
--- a/security/logcheck/files/patch-debian__logcheck.cron.d
+++ b/security/logcheck/files/extra-patch-debian__logcheck.cron.d.in
@@ -12,5 +12,5 @@
-2 * * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
-
-# EOF
-+@reboot if [ -x /usr/local/sbin/logcheck ]; then nice -n10 /usr/local/sbin/logcheck -R; fi
-+2 * * * * if [ -x /usr/local/sbin/logcheck ]; then nice -n10 /usr/local/sbin/logcheck; fi
++@reboot if [ -x %%PREFIX%%/sbin/logcheck ]; then nice -n10 %%PREFIX%%/sbin/logcheck -R; fi
++2 * * * * if [ -x %%PREFIX%%/sbin/logcheck ]; then nice -n10 %%PREFIX%%/sbin/logcheck; fi
diff --git a/security/logcheck/files/patch-docs__logcheck.8 b/security/logcheck/files/extra-patch-docs__logcheck.8.in
index 6cc7344095d9..e190ae0b4e7c 100644
--- a/security/logcheck/files/patch-docs__logcheck.8
+++ b/security/logcheck/files/extra-patch-docs__logcheck.8.in
@@ -99,11 +99,11 @@
+Set the report level to "workstation".
+.SH "FILES"
+.PP
-+/usr/local/etc/logcheck/logcheck.conf is the main configuration file.
++%%ETCDIR%%/logcheck.conf is the main configuration file.
+.PP
-+/usr/local/etc/logcheck/logcheck.logfiles is the list of files to monitor.
++%%ETCDIR%%/logcheck.logfiles is the list of files to monitor.
+.PP
-+/usr/local/share/doc/logcheck/README.logcheck-database for hints on how to write, test and maintain rules.
++%%DOCSDIR%%/README.logcheck-database for hints on how to write, test and maintain rules.
+.SH "EXIT STATUS"
+.PP
+0 upon success; 1 upon failure
diff --git a/security/logcheck/files/patch-etc__logcheck.conf b/security/logcheck/files/extra-patch-etc__logcheck.conf.in
index 2c294410c95f..4223428582f8 100644
--- a/security/logcheck/files/patch-etc__logcheck.conf
+++ b/security/logcheck/files/extra-patch-etc__logcheck.conf.in
@@ -10,7 +10,7 @@
-# Alternatively, set to "1" to enable extra summary.
-
-#SYSLOGSUMMARY=0
-+#RULEDIR="/usr/local/etc/logcheck"
++#RULEDIR="%%ETCDIR%%"
# Controls Subject: lines on logcheck reports:
diff --git a/security/logcheck/files/patch-src__logcheck b/security/logcheck/files/extra-patch-src__logcheck.in
index 8e06c99a8a6f..f06d96a78bb2 100644
--- a/security/logcheck/files/patch-src__logcheck
+++ b/security/logcheck/files/extra-patch-src__logcheck.in
@@ -1,5 +1,5 @@
---- ./src/logcheck.orig 2007-01-16 01:13:27.000000000 -0500
-+++ ./src/logcheck 2008-09-09 18:10:02.000000000 -0400
+--- src/logcheck.orig 2007-01-16 01:13:27.000000000 -0500
++++ src/logcheck 2009-12-17 19:33:34.000000000 -0500
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
@@ -11,7 +11,7 @@
if [ $UID == 0 ]; then
echo "logcheck should not be run as root. Use su to invoke logcheck:"
- echo "su -s /bin/bash -c \"/usr/sbin/logcheck${@:+ $@}\" logcheck"
-+ echo "su -m logcheck -c \"/usr/local/bin/bash /usr/local/sbin/logcheck${@:+ $@}\""
++ echo "su -m logcheck -c \"/usr/local/bin/bash %%PREFIX%%/sbin/logcheck${@:+ $@}\""
echo "Or use sudo: sudo -u logcheck logcheck${@:+ $@}."
# you may want to uncomment that hack to let logcheck invoke itself.
- # su -s /bin/bash -c "$0 $*" logcheck
@@ -36,12 +36,12 @@
-LOGFILES_LIST="/etc/logcheck/logcheck.logfiles"
-LOGFILE_FALLBACK="/var/log/syslog"
-LOGTAIL="/usr/sbin/logtail"
-+RULEDIR="/usr/local/etc/logcheck"
-+CONFFILE="/usr/local/etc/logcheck/logcheck.conf"
++RULEDIR="%%ETCDIR%%"
++CONFFILE="%%ETCDIR%%/logcheck.conf"
+STATEDIR="/var/db/logcheck"
-+LOGFILES_LIST="/usr/local/etc/logcheck/logcheck.logfiles"
++LOGFILES_LIST="%%ETCDIR%%/logcheck.logfiles"
+LOGFILE_FALLBACK="/var/log/messages"
-+LOGTAIL="/usr/local/sbin/logtail"
++LOGTAIL="%%PREFIX%%/sbin/logtail"
CAT="/bin/cat"
SYSLOG_SUMMARY="/usr/bin/syslog-summary"
@@ -95,6 +95,37 @@
fi
fi
+@@ -168,7 +151,7 @@
+ ${TMPDIR:+Check temporary directory: $TMPDIR
+ }
+ Also verify that the logcheck user can read all files referenced in
+-/etc/logcheck/logcheck.logfiles!
++%%ETCDIR%%/logcheck.logfiles!
+
+ $(export)
+ EOF
+@@ -185,8 +168,8 @@
+
+ # Add an identification line at the beginning of the sent mail
+ setintro() {
+- if [ -f /etc/logcheck/header.txt -a -r /etc/logcheck/header.txt ] ; then
+- $CAT /etc/logcheck/header.txt >> $TMPDIR/report \
++ if [ -f %%ETCDIR%%/header.txt -a -r %%ETCDIR%%/header.txt ] ; then
++ $CAT %%ETCDIR%%/header.txt >> $TMPDIR/report \
+ || error "Could not append header to $TMPDIR/report."
+ fi
+ }
+@@ -194,8 +177,8 @@
+
+ # Add a footer to the report.
+ setfooter() {
+- if [ -f /etc/logcheck/footer.txt -a -r /etc/logcheck/footer.txt ] ; then
+- $CAT /etc/logcheck/footer.txt >> $TMPDIR/report \
++ if [ -f %%ETCDIR%%/footer.txt -a -r %%ETCDIR%%/footer.txt ] ; then
++ $CAT %%ETCDIR%%/footer.txt >> $TMPDIR/report \
+ || error "Could not append footer to $TMPDIR/report."
+ fi
+ }
@@ -212,8 +195,7 @@
mkdir $cleaned \
|| error "Could not make dir $cleaned for cleaned rulefiles."
diff --git a/security/logcheck/files/pkg-message.in b/security/logcheck/files/pkg-message.in
index 91b969820534..87b28c7a0f45 100644
--- a/security/logcheck/files/pkg-message.in
+++ b/security/logcheck/files/pkg-message.in
@@ -1,13 +1,13 @@
----------------------------------------------------------------------------
Please make sure that all files listed in
- %%PREFIX%%/etc/logcheck/logcheck.logfiles
+ %%ETCDIR%%/logcheck.logfiles
are readable to the '%%LOGCHECK_GROUP%%' group (see also /etc/newsyslog.conf),
or remove them from the aforementioned logcheck configuration file.
For information on how to write local rulesets see
- %%PREFIX%%/share/doc/logcheck/README.logcheck-database
+ %%DOCSDIR%%/README.logcheck-database
----------------------------------------------------------------------------