aboutsummaryrefslogtreecommitdiff
path: root/security/logcheck/Makefile
diff options
context:
space:
mode:
authorGreg Larkin <glarkin@FreeBSD.org>2008-09-11 00:30:09 +0000
committerGreg Larkin <glarkin@FreeBSD.org>2008-09-11 00:30:09 +0000
commit6e60a5693150f9fd17116dbb9c522234577c2c2a (patch)
tree5e57af0c81e4a5c472e37b68f3af2e527df207c0 /security/logcheck/Makefile
parent2f6da9c8fa1100c3589265b896993b9e0535ba70 (diff)
downloadports-6e60a5693150f9fd17116dbb9c522234577c2c2a.tar.gz
ports-6e60a5693150f9fd17116dbb9c522234577c2c2a.zip
- Fixed logcheck script silent failure in previous commit
- Added handling for crontab installation problems - Incorported security fixes from PR opened after previous commit - Added UPDATING entry since configuration options have changed fairly significantly PR: ports/122842 Submitted by: Cezary Morga <cm@therek.net> PR: ports/127255 Submitted by: Yasuhiro KIMURA <yasu at utahime dot org> Reviewed by: glarkin Approved by: beech (mentor, implicit) Approved by: portmgr (marcus) Security: Incorrect addition of logcheck user to wheel group
Notes
Notes: svn path=/head/; revision=220326
Diffstat (limited to 'security/logcheck/Makefile')
-rw-r--r--security/logcheck/Makefile46
1 files changed, 28 insertions, 18 deletions
diff --git a/security/logcheck/Makefile b/security/logcheck/Makefile
index 56d16ea35824..e63fafa95738 100644
--- a/security/logcheck/Makefile
+++ b/security/logcheck/Makefile
@@ -7,10 +7,9 @@
PORTNAME= logcheck
PORTVERSION= 1.2.54
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
-MASTER_SITES= ftp://ftp.debian.org/debian/pool/main/l/logcheck/ \
- http://ftp.de.debian.org/debian/pool/main/l/logcheck/
+MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL}
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= glarkin@FreeBSD.org
@@ -18,12 +17,23 @@ COMMENT= Auditing tool for system logs on Unix boxes
BUILD_DEPENDS= docbook-to-man:${PORTSDIR}/textproc/docbook-to-man
RUN_DEPENDS= lockfile:${PORTSDIR}/mail/procmail \
- bash:${PORTSDIR}/shells/bash \
- perl:${PORTSDIR}/lang/perl5
+ bash:${PORTSDIR}/shells/bash
+
+LOGCHECK_USER= logcheck
+LOGCHECK_UID= 915
+LOGCHECK_GROUP= ${LOGCHECK_USER}
+LOGCHECK_GID= ${LOGCHECK_UID}
+
+# Enable Perl dependency for logtail script
+USE_PERL5= 5.8.0+
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
BINMODE= 755
SHAREMODE= 640
+SUB_LIST+= LOGCHECK_USER=${LOGCHECK_USER} \
+ LOGCHECK_UID=${LOGCHECK_UID} \
+ LOGCHECK_GROUP=${LOGCHECK_GROUP} \
+ LOGCHECK_GID=${LOGCHECK_GID}
SUB_FILES= pkg-install pkg-deinstall pkg-message
CONFIG_DIRS= cracking.d ignore.d.paranoid ignore.d.server \
ignore.d.workstation violations.d violations.ignore.d
@@ -31,39 +41,39 @@ DOCS= AUTHORS CHANGES CREDITS LICENSE TODO docs/README*
PORTDOCS= ${DOCS:T}
MAN8= logcheck.8 logtail.8
-LOGCHECK_USER= logcheck
-LOGCHECK_GROUP= ${LOGCHECK_USER}
-
do-build:
${REINPLACE_CMD} -e 's!/var/log/syslog!/var/log/messages!' \
- ${WRKSRC}/etc/logcheck.logfiles
- ${REINPLACE_CMD} -e 's!/etc/logcheck!/usr/local/etc/logcheck!' \
- -e 's!/usr/share/doc/logcheck-database/README.logcheck-database.gz!${DOCSDIR}/README.logcheck-database!' \
- ${WRKSRC}/docs/logcheck.sgml
+ ${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
docbook-to-man ${WRKSRC}/docs/logcheck.sgml > ${WRKSRC}/docs/logcheck.8
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/src/logcheck ${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/src/logtail ${PREFIX}/sbin
@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
- @${INSTALL} -d /var/lib/logcheck
+ @${INSTALL} -d /var/db/logcheck
@${INSTALL} -d /var/run/logcheck
- ${CHOWN} ${LOGCHECK_USER}:${LOGCHECK_GROUP} /var/lib/logcheck
+ ${CHOWN} ${LOGCHECK_USER}:${LOGCHECK_GROUP} /var/db/logcheck
@${ECHO_CMD} '@exec ${CHOWN} -R ${LOGCHECK_USER}:${LOGCHECK_GROUP} \
- /var/lib/logcheck' >> ${TMPPLIST}
+ /var/db/logcheck' >> ${TMPPLIST}
${CHOWN} ${LOGCHECK_USER}:${LOGCHECK_GROUP} /var/run/logcheck
@${ECHO_CMD} '@exec ${CHOWN} -R ${LOGCHECK_USER}:${LOGCHECK_GROUP} \
/var/run/logcheck' >> ${TMPPLIST}
@${INSTALL} -d ${ETCDIR}
- @${INSTALL_DATA} ${WRKSRC}/etc/logcheck.conf ${ETCDIR}/logcheck.conf.sample
- @${INSTALL_DATA} ${WRKSRC}/etc/logcheck.logfiles ${ETCDIR}/logcheck.logfiles.sample
+ @${INSTALL_DATA} ${WRKSRC}/etc/logcheck.conf \
+ ${ETCDIR}/logcheck.conf.sample
+ @${INSTALL_DATA} ${WRKSRC}/etc/logcheck.logfiles \
+ ${ETCDIR}/logcheck.logfiles.sample
.for i in ${CONFIG_DIRS}
@${INSTALL} -d ${ETCDIR}/${i}
@${INSTALL_DATA} ${WRKSRC}/rulefiles/linux/${i}/* ${ETCDIR}/${i}
.endfor
.if !defined(NOPORTEXAMPLES)
@${INSTALL} -d ${EXAMPLESDIR}
- @${INSTALL_DATA} ${WRKSRC}/debian/logcheck.cron.d ${EXAMPLESDIR}/crontab.in
+ @${INSTALL_DATA} ${WRKSRC}/debian/logcheck.cron.d \
+ ${EXAMPLESDIR}/crontab.in
.endif
${CHOWN} -R root:${LOGCHECK_GROUP} ${ETCDIR}
@${ECHO_CMD} '@exec ${CHOWN} -R root:${LOGCHECK_GROUP} \