1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

- Remove BROKEN: change temp dir from /tmp to /var/run/logcheck

(it has to be mode 700) - now complies with hier(7)
- Psionic has been acquired by Cisco in late 2002 and now
  www.psionic.com is an alias to www.cisco.com. Unfortunately,
  the latter does not have any mention of LogSentry or other Abacus tools,
  so remove www.psionic.com from the MASTER_SITES and WWW: tag
- Reword pkg-descr to better reflect reality
- Dont use logcheck's Makefile - build/install completely from port's Makefile
- Make PREFIX-clean
- Install useful documentation
- Assign maintainership to submitter

Removed files:
- files/patch-aa
- pkg-message

PR:		50730
Submitted by:	Sergei Kolobov <sergei@kolobov.com>
This commit is contained in:
Yen-Ming Lee 2003-04-09 05:41:27 +00:00
parent 40654e9afc
commit 51eb8aee7a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=78647
5 changed files with 54 additions and 123 deletions

View File

@ -7,32 +7,50 @@
PORTNAME= logcheck
PORTVERSION= 1.1.1
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ftp://sensimilia.eu.org/pub/software/sys/ \
http://www.ukc.mirror.ac.uk/sites/ftp.freebsd.org/pub/FreeBSD/ports/distfiles/ \
http://www.psionic.com/downloads/ \
http://people.FreeBSD.org/~foxfair/distfiles/
DISTNAME= logsentry-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
MAINTAINER= sergei@kolobov.com
COMMENT= Auditing tool for system logs on Unix boxes
BROKEN= "Changes permissions on /tmp to mode 0700"
USE_REINPLACE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PKGMESSAGE= ${WRKDIR}/MESSAGE
pre-configure:
${REINPLACE_CMD} -e "s@/usr/local/etc/tmp@/tmp@g; \
s@/usr/local@${PREFIX}@" ${WRKSRC}/Makefile \
# Install binaries and config files readable to root only
BINMODE= 700
SHAREMODE= 600
LOGCHECK_TMP?= /var/run/logcheck
PLIST_SUB+= LOGCHECK_TMP=${LOGCHECK_TMP}
CONFIG_FILES= logcheck.hacking logcheck.ignore \
logcheck.violations logcheck.violations.ignore
DOCS= CREDITS INSTALL README README.how.to.interpret README.keywords
do-build:
cd ${WRKSRC}/src && ${CC} ${CFLAGS} -o logtail logtail.c
${REINPLACE_CMD} -e 's!/usr/local/bin/logtail!${PREFIX}/bin/logtail!' \
-e 's!/usr/local/etc/tmp!${LOGCHECK_TMP}!' \
-e 's!/usr/local/etc/logcheck!${PREFIX}/etc/logcheck!' \
${WRKSRC}/systems/freebsd/logcheck.sh
${REINPLACE_CMD} -e "s@/bin/mkdir@${MKDIR}@g" ${WRKSRC}/Makefile
post-build:
@${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${PKGDIR}/pkg-message > ${PKGMESSAGE}
post-install:
@${CAT} ${PKGMESSAGE}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/logtail ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/systems/freebsd/logcheck.sh ${PREFIX}/etc
${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC}/systems/freebsd && \
${INSTALL_DATA} ${CONFIG_FILES} ${EXAMPLESDIR} && \
${INSTALL_DATA} ${CONFIG_FILES} ${PREFIX}/etc
${TEST} -d ${LOGCHECK_TMP} || ${MKDIR} -m 700 ${LOGCHECK_TMP}
${CHOWN} root:wheel ${LOGCHECK_TMP}
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
.include <bsd.port.mk>

View File

@ -1,81 +0,0 @@
--- Makefile.orig Sun Oct 31 07:07:29 1999
+++ Makefile Thu Jan 20 09:14:40 2000
@@ -5,13 +5,15 @@
# Thanks to rbulling@obscure.org for cleaning this Makefile up..
#
+SYSTYPE=freebsd
+
# Generic compiler
- CC = cc
+ CC ?= cc
# GNU..
# CC = gcc
# Normal systems flags
-CFLAGS = -O
+CFLAGS ?= -O
# Braindead HPUX compiler flags
#CFLAGS = -O -Aa
@@ -35,19 +37,7 @@
# Debug mode for logtail
# CFLAGS = -g -DDEBUG
-all:
- @echo "Usage: make <systype>"
- @echo "<systype> is one of: "
- @echo " linux, bsdos, freebsd, sun, generic, hpux, digital"
- @echo ""
- @echo "NOTE: This will make and install the package in these"
- @echo " directories:"
- @echo " logcheck configuration files : $(INSTALLDIR)"
- @echo " logcheck.sh shell script : $(INSTALLDIR_SH)"
- @echo " logtail program : $(INSTALLDIR_BIN)"
- @echo ""
- @echo "Edit the makefile if you wish to change these paths."
- @echo "Any existing files will be overwritten."
+all: build
clean:
/bin/rm ./src/logtail ./src/logtail.o
@@ -60,27 +50,29 @@
/bin/rm $(INSTALLDIR)/logcheck.violations.ignore
/bin/rm $(INSTALLDIR_BIN)/logtail
-install:
+build:
@echo "Making $(SYSTYPE)"
$(CC) $(CFLAGS) -o ./src/logtail ./src/logtail.c
+
+install:
@echo "Creating temp directory $(TMPDIR)"
@if [ ! -d $(TMPDIR) ]; then /bin/mkdir $(TMPDIR); fi
@echo "Setting temp directory permissions"
chmod 700 $(TMPDIR)
@echo "Copying files"
- cp ./systems/$(SYSTYPE)/logcheck.hacking $(INSTALLDIR)
- cp ./systems/$(SYSTYPE)/logcheck.violations $(INSTALLDIR)
- 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.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:

View File

@ -1,14 +1,10 @@
Logcheck helps spot problems and security violations in your logfiles
automatically and will send the results to you in e-mail.
Logcheck is part of the Abacus Project of security tools. It is a program
created to help in the processing of UNIX system logfiles generated by the
various Abacus Project tools, system daemons, Wietse Venema's TCP Wrapper
and Log Daemon packages, and the Firewall Toolkit(c) by Trusted Information
Systems Inc.(TIS). Logcheck also works very well at reporting on other
common operating system security violations and strange events.
WWW: http://www.psionic.com/
It is a program created to help in the processing of UNIX system logfiles
generated by the various system daemons. Logcheck also works very well at
reporting on other common operating system security violations and strange
events.
- Dan Langille
dan@freebsddiary.org

View File

@ -1,14 +0,0 @@
----------------------------------------------------------------------------
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
----------------------------------------------------------------------------

View File

@ -1,8 +1,20 @@
bin/logtail
etc/logcheck.hacking.sample
etc/logcheck.ignore.sample
etc/logcheck.sh
etc/logcheck.violations.ignore.sample
etc/logcheck.violations.sample
@dirrm var/tmp
@dirrm var
etc/logcheck.hacking
etc/logcheck.ignore
etc/logcheck.violations
etc/logcheck.violations.ignore
%%EXAMPLESDIR%%/logcheck.hacking
%%EXAMPLESDIR%%/logcheck.ignore
%%EXAMPLESDIR%%/logcheck.violations.ignore
%%EXAMPLESDIR%%/logcheck.violations
@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%%%DOCSDIR%%/CREDITS
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.how.to.interpret
%%PORTDOCS%%%%DOCSDIR%%/README.keywords
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@cwd /
@exec test -d %%LOGCHECK_TMP%% || mkdir -m 700 %%LOGCHECK_TMP%% && chown root:wheel %%LOGCHECK_TMP%%
@unexec rmdir %%LOGCHECK_TMP%% 2>/dev/null || true