1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

security/logcheck: Miscellaneous changes and cleanups

* Replace deprecated @exec keyword with @postexec in plist.
* Make owner/group/permission of files/directories under ${DATADIR}
  and ${ETCDIR} same as upstream as much as possible.
* Pet portclippy.
* Reformat Makefile with portfmt.

PR:		257718
MFH:		2021Q3
This commit is contained in:
Yasuhiro Kimura 2021-08-10 02:26:58 +09:00 committed by Li-Wen Hsu
parent a5bd3edbfb
commit f026865e51
No known key found for this signature in database
GPG Key ID: 82B261B14D3BC7AF
2 changed files with 36 additions and 33 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= logcheck
PORTVERSION= 1.3.23
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= DEBIAN_POOL
DISTNAME= ${PORTNAME}_${PORTVERSION}
@ -13,46 +14,50 @@ LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= docbook-to-man>0:textproc/docbook-to-man
RUN_DEPENDS= mime-construct:mail/mime-construct \
RUN_DEPENDS= bash:shells/bash \
lockfile-create:sysutils/lockfile-progs \
bash:shells/bash
mime-construct:mail/mime-construct
# Enable Perl dependency for logtail script
USES= perl5 shebangfix tar:xz
LOGCHECK_USER= logcheck
LOGCHECK_GROUP= ${LOGCHECK_USER}
SHEBANG_FILES= src/detectrotate/*.dtr src/logcheck src/logtail src/logtail2
BINMODE= 755
SUB_FILES= pkg-deinstall pkg-install pkg-message
SUB_LIST+= CRON=${PORT_OPTIONS:MCRON} \
DBDIR=${DBDIR} \
LOGCHECK_GROUP=${LOGCHECK_GROUP} \
LOGCHECK_USER=${LOGCHECK_USER}
WRKSRC= ${WRKDIR}/${PORTNAME}
USERS= ${LOGCHECK_USER}
GROUPS= ${LOGCHECK_GROUP}
BASEDIR?= # None. portlint compliance
DBDIR= ${BASEDIR}/var/db/${PORTNAME}
RUNDIR= ${BASEDIR}/var/run/${PORTNAME}
OPTIONS_DEFINE= CRON DOCS EXAMPLES
CRON_DESC= Install cron script automatically
OPTIONS_DEFAULT=CRON
WRKSRC= ${WRKDIR}/${PORTNAME}
BINMODE= 755
SUB_LIST+= LOGCHECK_USER=${LOGCHECK_USER} \
PLIST_SUB+= CHGRP=${CHGRP} \
CHMOD=${CHMOD} \
DBDIR=${DBDIR} \
FIND=${FIND} \
LOGCHECK_GROUP=${LOGCHECK_GROUP} \
DBDIR=${DBDIR} CRON=${PORT_OPTIONS:MCRON}
SUB_FILES= pkg-install pkg-deinstall pkg-message
PLIST_SUB+= LOGCHECK_USER=${LOGCHECK_USER} \
LOGCHECK_GROUP=${LOGCHECK_GROUP} \
DBDIR=${DBDIR} RUNDIR=${RUNDIR}
SHEBANG_FILES= src/logcheck src/logtail src/logtail2 src/detectrotate/*.dtr
CONFIG_DIRS= cracking.d ignore.d.paranoid ignore.d.server \
ignore.d.workstation violations.d violations.ignore.d
DOCS= AUTHORS CHANGES CREDITS TODO docs/README*
LOGCHECK_USER=${LOGCHECK_USER} \
RUNDIR=${RUNDIR}
PORTDOCS= ${DOCS:T}
MAN1_FILES= logcheck-test.1
MAN8_FILES= logcheck.8 logtail.8 logtail2.8
OPTIONS_DEFINE= CRON DOCS EXAMPLES
OPTIONS_DEFAULT= CRON
CRON_DESC= Install cron script automatically
# None. portlint compliance
BASEDIR?=
CONFIG_DIRS= cracking.d ignore.d.paranoid ignore.d.server \
ignore.d.workstation violations.d violations.ignore.d
DBDIR= ${BASEDIR}/var/db/${PORTNAME}
DOCS= AUTHORS CHANGES CREDITS TODO docs/README*
LOGCHECK_GROUP= ${LOGCHECK_USER}
LOGCHECK_USER= logcheck
MAN1_FILES= logcheck-test.1
MAN8_FILES= logcheck.8 logtail.8 logtail2.8
REINPLACE_FILES= debian/logcheck.cron.d docs/logcheck.sgml \
docs/logtail2.8 docs/README.logcheck \
docs/README.logcheck-database docs/README.logtail \
etc/logcheck.conf src/logcheck src/logtail2
RUNDIR= ${BASEDIR}/var/run/${PORTNAME}
.include <bsd.port.pre.mk>
@ -87,9 +92,6 @@ do-install:
${STAGEDIR}${DATADIR}/detectrotate
${INSTALL_DATA} ${WRKSRC}/debian/logcheck.cron.d \
${STAGEDIR}${EXAMPLESDIR}/crontab.in
@${ECHO_CMD} '@exec ${CHGRP} -R ${LOGCHECK_GROUP} \
${ETCDIR:S|^${PREFIX}/|%D/|} \
${DATADIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
.for i in ${MAN1_FILES}
${INSTALL_MAN} ${WRKSRC}/docs/$i ${STAGEDIR}${MAN1PREFIX}/man/man1
.endfor

View File

@ -1,7 +1,7 @@
@mode 640
%%DATADIR%%/detectrotate/10-savelog.dtr
%%DATADIR%%/detectrotate/20-logrotate.dtr
%%DATADIR%%/detectrotate/30-logrotate-dateext.dtr
@group %%LOGCHECK_GROUP%%
%%ETCDIR%%/cracking.d/kernel
%%ETCDIR%%/cracking.d/rlogind
%%ETCDIR%%/cracking.d/rsh
@ -194,7 +194,7 @@
%%ETCDIR%%/violations.ignore.d/logcheck-sudo
@sample %%ETCDIR%%/logcheck.conf.sample
@sample %%ETCDIR%%/logcheck.logfiles.sample
@mode
@group
bin/logcheck-test
man/man1/logcheck-test.1.gz
man/man8/logcheck.8.gz
@ -206,3 +206,4 @@ sbin/logtail2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/crontab.in
@dir(%%LOGCHECK_USER%%,%%LOGCHECK_GROUP%%,) %%DBDIR%%
@dir(%%LOGCHECK_USER%%,%%LOGCHECK_GROUP%%,) %%RUNDIR%%
@postexec %%FIND%% %%PREFIX%%/%%ETCDIR%%/* -type d -exec %%CHMOD%% 750 {} +