summaryrefslogtreecommitdiff
path: root/security/logcheck
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-05-01 20:43:41 +0000
committerjmmv <jmmv@pkgsrc.org>2003-05-01 20:43:41 +0000
commitafe3a13cdd7ab16ec023e61b040818c13b5d1552 (patch)
tree0e78fc090e35be8b2ba373012da72e8be94532a0 /security/logcheck
parentae1ccbea6dc05901c3fe6c17e4a8f4200da309e7 (diff)
downloadpkgsrc-afe3a13cdd7ab16ec023e61b040818c13b5d1552.tar.gz
Honour PKG_SYSCONFDIR.
Use OWN_DIRS to handle directories under /var. Move the logcheck.sh script to where it belongs, the bin directory. Use buildlink2. Bump PKGREVISION to 1.
Diffstat (limited to 'security/logcheck')
-rwxr-xr-xsecurity/logcheck/DEINSTALL8
-rw-r--r--security/logcheck/MESSAGE15
-rw-r--r--security/logcheck/Makefile22
-rw-r--r--security/logcheck/PLIST13
-rw-r--r--security/logcheck/distinfo6
-rw-r--r--security/logcheck/patches/patch-aa45
-rw-r--r--security/logcheck/patches/patch-ab45
7 files changed, 93 insertions, 61 deletions
diff --git a/security/logcheck/DEINSTALL b/security/logcheck/DEINSTALL
deleted file mode 100755
index 490e203bf0b..00000000000
--- a/security/logcheck/DEINSTALL
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.1 2001/11/01 01:16:54 zuntum Exp $
-#
-
-[ -d /var/adm/tmp ] && rmdir /var/adm/tmp
-[ -d /var/adm ] && rmdir /var/adm
-exit 0
diff --git a/security/logcheck/MESSAGE b/security/logcheck/MESSAGE
deleted file mode 100644
index 0c088964d29..00000000000
--- a/security/logcheck/MESSAGE
+++ /dev/null
@@ -1,15 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.1 2001/11/01 01:16:55 zuntum Exp $
-
- Remember to copy the sample files to the real file names.
- Here is an example what you need to do:
-
- cd ${PREFIX}/etc/
- cp logcheck.ignore.sample logcheck.ignore
- cp logcheck.violations.ignore.sample logcheck.violations.ignore
- cp logcheck.violations.sample logcheck.violations
- cp logcheck.hacking.sample logcheck.hacking
-
- Note that logcheck is started with ${PREFIX}/etc/logcheck.sh
-
-===========================================================================
diff --git a/security/logcheck/Makefile b/security/logcheck/Makefile
index d80ac131bea..9c28ef45df8 100644
--- a/security/logcheck/Makefile
+++ b/security/logcheck/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2001/07/17 15:50:31 nra Exp $
+# $NetBSD: Makefile,v 1.4 2003/05/01 20:43:41 jmmv Exp $
DISTNAME= logcheck-1.1.1
+PKGREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.psionic.com/tools/
@@ -8,14 +9,31 @@ MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.psionic.com/
COMMENT= Auditing tool for system logs on Unix boxes
-post-patch:
+USE_BUILDLINK2= YES
+USE_PKGINSTALL= YES
+
+OWN_DIRS= /var/adm/tmp /var/adm
+
+PKG_SYSCONFSUBDIR= logcheck
+EGDIR= ${PREFIX}/share/examples/logcheck
+CONF_FILES=
+.for f in hacking ignore violations violations.ignore
+CONF_FILES+= ${EGDIR}/logcheck.$f ${PKG_SYSCONFDIR}/logcheck.$f
+.endfor
+.undef f
+
+pre-configure:
@${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.old
@${SED} -e "s+/usr/local+${PREFIX}+g" \
< ${WRKSRC}/Makefile.old > ${WRKSRC}/Makefile
@${MV} ${WRKSRC}/systems/freebsd/logcheck.sh \
${WRKSRC}/systems/freebsd/logcheck.sh.old
@${SED} -e "s+/usr/local+${PREFIX}+g" \
+ -e "s+@PKG_SYSCONFDIR@+${PKG_SYSCONFDIR}+g" \
${WRKSRC}/systems/freebsd/logcheck.sh.old > \
${WRKSRC}/systems/freebsd/logcheck.sh
+pre-install:
+ ${INSTALL_DATA_DIR} ${EGDIR}
+
.include "../../mk/bsd.pkg.mk"
diff --git a/security/logcheck/PLIST b/security/logcheck/PLIST
index 878cbdde19e..8bd5ac1bc21 100644
--- a/security/logcheck/PLIST
+++ b/security/logcheck/PLIST
@@ -1,7 +1,8 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:16:55 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2003/05/01 20:43:41 jmmv Exp $
+bin/logcheck.sh
bin/logtail
-etc/logcheck.hacking.sample
-etc/logcheck.ignore.sample
-etc/logcheck.sh
-etc/logcheck.violations.ignore.sample
-etc/logcheck.violations.sample
+share/examples/logcheck/logcheck.hacking
+share/examples/logcheck/logcheck.ignore
+share/examples/logcheck/logcheck.violations
+share/examples/logcheck/logcheck.violations.ignore
+@dirrm share/examples/logcheck
diff --git a/security/logcheck/distinfo b/security/logcheck/distinfo
index 8ca1b23bbb9..3723ef5383b 100644
--- a/security/logcheck/distinfo
+++ b/security/logcheck/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2001/07/17 15:50:31 nra Exp $
+$NetBSD: distinfo,v 1.3 2003/05/01 20:43:41 jmmv Exp $
SHA1 (logcheck-1.1.1.tar.gz) = 18f89f0dacfe9ff31076c006d58e1bcfedaa7f22
Size (logcheck-1.1.1.tar.gz) = 30267 bytes
-SHA1 (patch-aa) = a0d57a4554d670add82c8df7df7ec84515497b3d
-SHA1 (patch-ab) = 8a53665ebb13bb451cffcc520b1917bda772fd35
+SHA1 (patch-aa) = 692e07b102925cad20e4e3e1ccea498d1aac72d5
+SHA1 (patch-ab) = 8392ffb3aea380869ed8ba33e58af3301708da41
diff --git a/security/logcheck/patches/patch-aa b/security/logcheck/patches/patch-aa
index 7be2ec21ef4..62e17622eb7 100644
--- a/security/logcheck/patches/patch-aa
+++ b/security/logcheck/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.1.1.1 2001/07/17 15:00:48 nra Exp $
+$NetBSD: patch-aa,v 1.2 2003/05/01 20:43:41 jmmv Exp $
---- Makefile.orig Sun Oct 31 16:07:29 1999
-+++ Makefile Thu Jun 21 09:19:45 2001
+--- Makefile.orig 1999-10-31 16:07:29.000000000 +0100
++++ Makefile
@@ -5,13 +5,15 @@
# Thanks to rbulling@obscure.org for cleaning this Makefile up..
#
@@ -20,8 +20,21 @@ $NetBSD: patch-aa,v 1.1.1.1 2001/07/17 15:00:48 nra Exp $
# Braindead HPUX compiler flags
#CFLAGS = -O -Aa
-@@ -30,24 +32,12 @@
- INSTALLDIR_SH = /usr/local/etc
+@@ -19,35 +21,22 @@ CFLAGS = -O
+ # the new paths!!
+
+ # This is where keyword files go.
+-INSTALLDIR = /usr/local/etc
++INSTALLDIR = /usr/local/share/examples/logcheck
+
+ # This is where logtail will go
+ INSTALLDIR_BIN = /usr/local/bin
+
+ # Some people want the logcheck.sh in /usr/local/bin. Uncomment this
+ # if you want this. /usr/local/etc was kept for compatibility reasons.
+-#INSTALLDIR_SH = /usr/local/bin
+-INSTALLDIR_SH = /usr/local/etc
++INSTALLDIR_SH = /usr/local/bin
# The scratch directory for logcheck files.
-TMPDIR = /usr/local/etc/tmp
@@ -47,7 +60,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2001/07/17 15:00:48 nra Exp $
clean:
/bin/rm ./src/logtail ./src/logtail.o
-@@ -60,27 +50,29 @@
+@@ -60,19 +49,21 @@ uninstall:
/bin/rm $(INSTALLDIR)/logcheck.violations.ignore
/bin/rm $(INSTALLDIR_BIN)/logtail
@@ -68,23 +81,11 @@ $NetBSD: patch-aa,v 1.1.1.1 2001/07/17 15:00:48 nra Exp $
- cp ./systems/$(SYSTYPE)/logcheck.violations.ignore $(INSTALLDIR)
- cp ./systems/$(SYSTYPE)/logcheck.ignore $(INSTALLDIR)
- cp ./systems/$(SYSTYPE)/logcheck.sh $(INSTALLDIR_SH)
-+ cp ./systems/$(SYSTYPE)/logcheck.hacking $(INSTALLDIR)/logcheck.hacking.sample
-+ cp ./systems/$(SYSTYPE)/logcheck.violations $(INSTALLDIR)/logcheck.violations.sample
-+ cp ./systems/$(SYSTYPE)/logcheck.violations.ignore $(INSTALLDIR)/logcheck.violations.ignore.sample
-+ cp ./systems/$(SYSTYPE)/logcheck.ignore $(INSTALLDIR)/logcheck.ignore.sample
++ cp ./systems/$(SYSTYPE)/logcheck.hacking $(INSTALLDIR)/logcheck.hacking
++ cp ./systems/$(SYSTYPE)/logcheck.violations $(INSTALLDIR)/logcheck.violations
++ cp ./systems/$(SYSTYPE)/logcheck.violations.ignore $(INSTALLDIR)/logcheck.violations.ignore
++ cp ./systems/$(SYSTYPE)/logcheck.ignore $(INSTALLDIR)/logcheck.ignore
+ cp ./systems/$(SYSTYPE)/logcheck.sh $(INSTALLDIR_SH)/logcheck.sh
cp ./src/logtail $(INSTALLDIR_BIN)
@echo "Setting permissions"
chmod 700 $(INSTALLDIR_SH)/logcheck.sh
- chmod 700 $(INSTALLDIR_BIN)/logtail
-- chmod 600 $(INSTALLDIR)/logcheck.violations.ignore
-- chmod 600 $(INSTALLDIR)/logcheck.violations
-- chmod 600 $(INSTALLDIR)/logcheck.hacking
-- chmod 600 $(INSTALLDIR)/logcheck.ignore
-+ chmod 600 $(INSTALLDIR)/logcheck.violations.ignore.sample
-+ chmod 600 $(INSTALLDIR)/logcheck.violations.sample
-+ chmod 600 $(INSTALLDIR)/logcheck.hacking.sample
-+ chmod 600 $(INSTALLDIR)/logcheck.ignore.sample
- @echo "Done. Don't forget to set your crontab."
-
- generic:
diff --git a/security/logcheck/patches/patch-ab b/security/logcheck/patches/patch-ab
index c0048540a05..5e0b806bf5a 100644
--- a/security/logcheck/patches/patch-ab
+++ b/security/logcheck/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 2001/07/17 15:50:32 nra Exp $
+$NetBSD: patch-ab,v 1.3 2003/05/01 20:43:42 jmmv Exp $
---- systems/freebsd/logcheck.sh.orig Tue Jul 17 10:35:58 2001
-+++ systems/freebsd/logcheck.sh Tue Jul 17 10:35:35 2001
-@@ -52,7 +52,7 @@
+--- systems/freebsd/logcheck.sh.orig 1999-10-31 16:07:29.000000000 +0100
++++ systems/freebsd/logcheck.sh
+@@ -52,7 +52,7 @@ LOGTAIL=/usr/local/bin/logtail
# You would also be well advised to make sure all your system/cron scripts
# use this directory for their "scratch" area.
@@ -11,7 +11,42 @@ $NetBSD: patch-ab,v 1.2 2001/07/17 15:50:32 nra Exp $
# The 'grep' command. This command MUST support the
# '-i' '-v' and '-f' flags!! The GNU grep does this by default (that's
-@@ -170,9 +170,10 @@
+@@ -89,7 +89,7 @@ MAIL=mail
+ # look for generic ISS probes (who the hell else looks for
+ # "WIZ" besides ISS?), and obvious sendmail attacks/probes.
+
+-HACKING_FILE=/usr/local/etc/logcheck.hacking
++HACKING_FILE=@PKG_SYSCONFDIR@/logcheck.hacking
+
+ # File of security violation patterns to specifically look for.
+ # This file should contain keywords of information administrators should
+@@ -98,7 +98,7 @@ HACKING_FILE=/usr/local/etc/logcheck.hac
+ # some items, but these will be caught by the next check. Move suspicious
+ # items into this file to have them reported regularly.
+
+-VIOLATIONS_FILE=/usr/local/etc/logcheck.violations
++VIOLATIONS_FILE=@PKG_SYSCONFDIR@/logcheck.violations
+
+ # File that contains more complete sentences that have keywords from
+ # the violations file. These keywords are normal and are not cause for
+@@ -115,14 +115,14 @@ VIOLATIONS_FILE=/usr/local/etc/logcheck.
+ #
+ # Again, be careful what you put in here and DO NOT LEAVE IT EMPTY!
+
+-VIOLATIONS_IGNORE_FILE=/usr/local/etc/logcheck.violations.ignore
++VIOLATIONS_IGNORE_FILE=@PKG_SYSCONFDIR@/logcheck.violations.ignore
+
+ # This is the name of a file that contains patterns that we should
+ # ignore if found in a log file. If you have repeated false alarms
+ # or want specific errors ignored, you should put them in here.
+ # Once again, be as specific as possible, and go easy on the wildcards
+
+-IGNORE_FILE=/usr/local/etc/logcheck.ignore
++IGNORE_FILE=@PKG_SYSCONFDIR@/logcheck.ignore
+
+ # The files are reported in the order of hacking, security
+ # violations, and unusual system events. Notice that this
+@@ -170,9 +170,10 @@ fi
#$LOGTAIL /var/log/secure >> $TMPDIR/check.$$
#$LOGTAIL /var/log/maillog >> $TMPDIR/check.$$