Bug 187411 - [PATCH] security/logcheck: Take maintainership, support staging, etc.
[PATCH] security/logcheck: Take maintainership, support staging, etc.
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Philippe Audeoud
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-10 05:50 UTC by Yasuhiro KIMURA
Modified: 2014-03-11 16:10 UTC (History)
0 users

See Also:


Attachments
patch-logcheck (7.55 KB, text/plain)
2014-03-10 05:50 UTC, Yasuhiro KIMURA
no flags Details
patch-logcheck (8.37 KB, text/plain; charset=Shift_JIS)
2014-03-11 05:56 UTC, Yasuhiro KIMURA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro KIMURA 2014-03-10 05:50:00 UTC
	
	- Take maintainership.
	- Support staging.
	- Add LICENSE.
	- Use USERS/GROUPS to create group and account.
	- Use shebangfix to fix bash path of logcheck command.
	- Bump PORTREVISION.
Comment 1 Yasuhiro KIMURA 2014-03-11 05:56:48 UTC
- I noticed upstream released new version 1.3.16. So update to it.
- Remove improper PORTSCOUT setting.

So please commit attached patch instead of original one.

Regards.
Comment 2 Philippe Audeoud freebsd_committer 2014-03-11 15:56:31 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jadawin

I'll take it.
Comment 3 dfilter freebsd_committer 2014-03-11 16:06:39 UTC
Author: jadawin
Date: Tue Mar 11 16:06:30 2014
New Revision: 347889
URL: http://svnweb.freebsd.org/changeset/ports/347889
QAT: https://qat.redports.org/buildarchive/r347889/

Log:
  - Update to 1.3.16
  - Submitter is now maintainer
  - Add LICENSE, USERS and GROUPS
  - Support Staging
  
  PR:		ports/187411
  Submitted by:	Yasuhiro KIMURA <yasu@utahime.org>

Modified:
  head/security/logcheck/Makefile
  head/security/logcheck/distinfo
  head/security/logcheck/files/extra-patch-src__logcheck.in
  head/security/logcheck/files/pkg-deinstall.in
  head/security/logcheck/files/pkg-install.in
  head/security/logcheck/pkg-plist

Modified: head/security/logcheck/Makefile
==============================================================================
--- head/security/logcheck/Makefile	Tue Mar 11 16:01:35 2014	(r347888)
+++ head/security/logcheck/Makefile	Tue Mar 11 16:06:30 2014	(r347889)
@@ -2,25 +2,24 @@
 # $FreeBSD$
 
 PORTNAME=	logcheck
-PORTVERSION=	1.3.15
-PORTREVISION=	2
+PORTVERSION=	1.3.16
 CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	yasu@utahime.org
 COMMENT=	Auditing tool for system logs on Unix boxes
 
+LICENSE=	GPLv2
+
 RUN_DEPENDS=	mime-construct:${PORTSDIR}/mail/mime-construct \
 		lockfile:${PORTSDIR}/mail/procmail \
 		bash:${PORTSDIR}/shells/bash
 
-PORTSCOUT=	limit:^1\.2\.
-
 LOGCHECK_USER=	logcheck
-LOGCHECK_UID=	915
 LOGCHECK_GROUP=	${LOGCHECK_USER}
-LOGCHECK_GID=	${LOGCHECK_UID}
+USERS=		${LOGCHECK_USER}
+GROUPS=		${LOGCHECK_GROUP}
 
 BASEDIR?=	# None. portlint compliance
 DBDIR=		${BASEDIR}/var/db/${PORTNAME}
@@ -34,23 +33,24 @@ OPTIONS_DEFAULT=CRON
 
 # Enable Perl dependency for logtail script
 USES=		perl5 shebangfix
+USE_XZ=		yes
 
 WRKSRC=		${WRKDIR}/${DISTNAME:S!_!-!}
 BINMODE=	755
 SHAREMODE=	640
 SUB_LIST+=	LOGCHECK_USER=${LOGCHECK_USER} \
-		LOGCHECK_UID=${LOGCHECK_UID} \
 		LOGCHECK_GROUP=${LOGCHECK_GROUP} \
-		LOGCHECK_GID=${LOGCHECK_GID} \
-		PW=${PW} CRON=${PORT_OPTIONS:MCRON}
+		CRON=${PORT_OPTIONS:MCRON}
 SUB_FILES=	pkg-install pkg-deinstall pkg-message
-PLIST_SUB+=	DBDIR=${DBDIR} RUNDIR=${RUNDIR}
-SHEBANG_FILES=	src/logtail src/logtail2
+PLIST_SUB+=	LOGCHECK_USER=${LOGCHECK_USER} \
+		LOGCHECK_GROUP=${LOGCHECK_GROUP} \
+		DBDIR=${DBDIR} RUNDIR=${RUNDIR}
+SHEBANG_FILES=	src/logcheck src/logtail src/logtail2
 CONFIG_DIRS=	cracking.d ignore.d.paranoid ignore.d.server \
 		ignore.d.workstation violations.d violations.ignore.d
 DOCS=		AUTHORS CHANGES CREDITS LICENSE TODO docs/README*
 PORTDOCS=	${DOCS:T}
-MAN8=		logcheck.8 logtail.8 logtail2.8
+MAN_FILES=	logcheck.8 logtail.8 logtail2.8
 
 PATCH_LIST=	extra-patch-debian__logcheck.cron.d \
 		extra-patch-docs__logcheck.8 \
@@ -59,7 +59,6 @@ PATCH_LIST=	extra-patch-debian__logcheck
 		extra-patch-src__logtail2
 EXTRA_PATCHES=	${PATCH_LIST:C|^|${WRKDIR}/|g}
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 pre-patch:
@@ -75,43 +74,34 @@ do-build:
 		${WRKSRC}/etc/logcheck.logfiles
 
 do-install:
-	${INSTALL_SCRIPT} ${WRKSRC}/src/logcheck ${PREFIX}/sbin
-	${INSTALL_SCRIPT} ${WRKSRC}/src/logtail ${PREFIX}/sbin
-	${INSTALL_SCRIPT} ${WRKSRC}/src/logtail2 ${PREFIX}/sbin
-	@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-	@${INSTALL} -d -o ${LOGCHECK_USER} -g ${LOGCHECK_GROUP} \
-		${DBDIR} ${RUNDIR}
-	@${ECHO_CMD} '@exec ${CHOWN} -R ${LOGCHECK_USER}:${LOGCHECK_GROUP} \
-		${DBDIR} ${RUNDIR}' >> ${TMPPLIST}
-	@${INSTALL} -d -g ${LOGCHECK_GROUP} ${ETCDIR}
-	@${INSTALL_DATA} -g ${LOGCHECK_GROUP} ${WRKSRC}/etc/logcheck.conf \
-		${ETCDIR}/logcheck.conf.sample
-	@${INSTALL_DATA} -g ${LOGCHECK_GROUP} ${WRKSRC}/etc/logcheck.logfiles \
-		${ETCDIR}/logcheck.logfiles.sample
+	${INSTALL_SCRIPT} ${WRKSRC}/src/logcheck ${STAGEDIR}${PREFIX}/sbin
+	${INSTALL_SCRIPT} ${WRKSRC}/src/logtail ${STAGEDIR}${PREFIX}/sbin
+	${INSTALL_SCRIPT} ${WRKSRC}/src/logtail2 ${STAGEDIR}${PREFIX}/sbin
+	@${INSTALL} -d ${STAGEDIR}${DBDIR} ${STAGEDIR}${RUNDIR}
+	@${INSTALL} -d ${STAGEDIR}${ETCDIR}
+	@${INSTALL_DATA} ${WRKSRC}/etc/logcheck.conf \
+		${STAGEDIR}${ETCDIR}/logcheck.conf.sample
+	@${INSTALL_DATA} ${WRKSRC}/etc/logcheck.logfiles \
+		${STAGEDIR}${ETCDIR}/logcheck.logfiles.sample
 .for i in ${CONFIG_DIRS}
-	@${INSTALL} -d -g ${LOGCHECK_GROUP} ${ETCDIR}/${i}
-	@${INSTALL_DATA} -g ${LOGCHECK_GROUP} ${WRKSRC}/rulefiles/linux/${i}/* \
-		${ETCDIR}/${i}
+	@${INSTALL} -d ${STAGEDIR}${ETCDIR}/${i}
+	@${INSTALL_DATA} ${WRKSRC}/rulefiles/linux/${i}/* \
+		${STAGEDIR}${ETCDIR}/${i}
 .endfor
-	@${INSTALL} -d -g ${LOGCHECK_GROUP} ${DATADIR}/detectrotate
-	@${INSTALL_DATA} -g ${LOGCHECK_GROUP} ${WRKSRC}/src/detectrotate/*.dtr \
-		${DATADIR}/detectrotate
-.if ${PORT_OPTIONS:MEXAMPLES}
-	@${INSTALL} -d ${EXAMPLESDIR}
+	@${INSTALL} -d ${STAGEDIR}${DATADIR}/detectrotate
+	@${INSTALL_DATA} ${WRKSRC}/src/detectrotate/*.dtr \
+		${STAGEDIR}${DATADIR}/detectrotate
+	@${INSTALL} -d ${STAGEDIR}${EXAMPLESDIR}
 	@${INSTALL_DATA} -m 0644 ${WRKSRC}/debian/logcheck.cron.d \
-		${EXAMPLESDIR}/crontab.in
-.endif
+		${STAGEDIR}${EXAMPLESDIR}/crontab.in
 	@${ECHO_CMD} '@exec ${CHGRP} -R ${LOGCHECK_GROUP} \
 		${ETCDIR:S|^${PREFIX}/|%D/|} \
 		${DATADIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
-	@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-	@${INSTALL_MAN} ${WRKSRC}/docs/*.8 ${MAN8PREFIX}/man/man8
-
-post-install:
-.if ${PORT_OPTIONS:MDOCS}
-	@${INSTALL} -d ${DOCSDIR}
-	@cd ${WRKSRC} && ${INSTALL_DATA} -m 0644 ${DOCS} ${DOCSDIR}
-.endif
-	@${CAT} ${PKGMESSAGE}
+.for i in ${MAN_FILES}
+	@${INSTALL_MAN} ${WRKSRC}/docs/$i ${STAGEDIR}${MAN8PREFIX}/man/man8
+	@${GZIP_CMD} ${STAGEDIR}${MAN8PREFIX}/man/man8/$i
+.endfor
+	@${INSTALL} -d ${STAGEDIR}${DOCSDIR}
+	@cd ${WRKSRC} && ${INSTALL_DATA} -m 0644 ${DOCS} ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.post.mk>

Modified: head/security/logcheck/distinfo
==============================================================================
--- head/security/logcheck/distinfo	Tue Mar 11 16:01:35 2014	(r347888)
+++ head/security/logcheck/distinfo	Tue Mar 11 16:06:30 2014	(r347889)
@@ -1,2 +1,2 @@
-SHA256 (logcheck_1.3.15.tar.gz) = b29b4753940a9130b5f19f60d2d89af23be220674625f4bd2fb1d40945d0b9e5
-SIZE (logcheck_1.3.15.tar.gz) = 162397
+SHA256 (logcheck_1.3.16.tar.xz) = 3eea6f4d25b5cba59d30b8edd35e392389b8e4966d0aceac11c220e98426b8e6
+SIZE (logcheck_1.3.16.tar.xz) = 131832

Modified: head/security/logcheck/files/extra-patch-src__logcheck.in
==============================================================================
--- head/security/logcheck/files/extra-patch-src__logcheck.in	Tue Mar 11 16:01:35 2014	(r347888)
+++ head/security/logcheck/files/extra-patch-src__logcheck.in	Tue Mar 11 16:06:30 2014	(r347889)
@@ -1,11 +1,5 @@
 --- src/logcheck.orig	2010-07-07 15:59:57.000000000 -0400
 +++ src/logcheck	2010-07-07 16:19:33.000000000 -0400
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!%%LOCALBASE%%/bin/bash
- #
- # Copyright (C) 2004-2010 Debian Logcheck Team
- #                         <logcheck-devel@alioth.lists.debian.org>
 @@ -24,17 +24,10 @@
  
  if [ `id -u` = 0 ]; then

Modified: head/security/logcheck/files/pkg-deinstall.in
==============================================================================
--- head/security/logcheck/files/pkg-deinstall.in	Tue Mar 11 16:01:35 2014	(r347888)
+++ head/security/logcheck/files/pkg-deinstall.in	Tue Mar 11 16:06:30 2014	(r347889)
@@ -21,13 +21,5 @@ POST-DEINSTALL)
 		rm -f /var/cron/tabs/${user}
 		echo "---> Removed crontab for \"${user}\"."
 	fi
-
-	if %%PW%% user show ${user} > /dev/null 2>&1; then
-		%%PW%% user del ${user}
-		echo "---> Removed user \"${user}\" and group \"${group}\"."
-	fi
-	if %%PW%% group show ${group} > /dev/null 2>&1; then
-		%%PW%% group del ${group}
-	fi
 ;;
 esac

Modified: head/security/logcheck/files/pkg-install.in
==============================================================================
--- head/security/logcheck/files/pkg-install.in	Tue Mar 11 16:01:35 2014	(r347888)
+++ head/security/logcheck/files/pkg-install.in	Tue Mar 11 16:06:30 2014	(r347889)
@@ -1,29 +1,10 @@
 #!/bin/sh
 
 user="%%LOGCHECK_USER%%"
-uid="%%LOGCHECK_UID%%"
 group="%%LOGCHECK_GROUP%%"
-gid="%%LOGCHECK_GID%%"
-descr="Logcheck system account"
-homedir="/var/db/logcheck"
-shell="%%LOCALBASE%%/bin/bash"
 configfiles="logcheck.conf logcheck.logfiles"
 
 case $2 in
-PRE-INSTALL)
-	if %%PW%% group show ${group} > /dev/null 2>&1; then
-		echo "---> You already have a group \"${group}\", so I will use it."
-	else
-		%%PW%% group add "${group}" -g "${gid}"
-		echo "---> Created group \"${group}\"."
-	fi
-	if %%PW%% user show ${user} > /dev/null 2>&1; then
-		echo "---> You already have a user \"${user}\", so I will use it."
-	else
-		%%PW%% user add -n ${user} -c "${descr}" -d "${homedir}" -s "${shell}" -g ${group} -u "${uid}"
-		echo "---> Created user \"${user}\"."
-	fi
-;;
 POST-INSTALL)
     if [ "%%CRON%%" = "CRON" ]; then
 	if [ -f %%EXAMPLESDIR%%/crontab.in ] ; then

Modified: head/security/logcheck/pkg-plist
==============================================================================
--- head/security/logcheck/pkg-plist	Tue Mar 11 16:01:35 2014	(r347888)
+++ head/security/logcheck/pkg-plist	Tue Mar 11 16:06:30 2014	(r347889)
@@ -102,7 +102,6 @@
 %%ETCDIR%%/ignore.d.server/pptpd
 %%ETCDIR%%/ignore.d.server/procmail
 %%ETCDIR%%/ignore.d.server/proftpd
-%%ETCDIR%%/ignore.d.server/puppetd
 %%ETCDIR%%/ignore.d.server/pure-ftpd
 %%ETCDIR%%/ignore.d.server/pureftp
 %%ETCDIR%%/ignore.d.server/qpopper
@@ -192,6 +191,9 @@
 %%DATADIR%%/detectrotate/10-savelog.dtr
 %%DATADIR%%/detectrotate/20-logrotate.dtr
 %%DATADIR%%/detectrotate/30-logrotate-dateext.dtr
+man/man8/logcheck.8.gz
+man/man8/logtail.8.gz
+man/man8/logtail2.8.gz
 sbin/logcheck
 sbin/logtail
 sbin/logtail2
@@ -208,7 +210,9 @@ sbin/logtail2
 @dirrm %%DATADIR%%
 @cwd /
 @exec mkdir -p %%DBDIR%%
+@exec chown %%LOGCHECK_USER%%:%%LOGCHECK_GROUP%% %%DBDIR%%
 @dirrmtry %%DBDIR%%
 @exec mkdir -p %%RUNDIR%%
+@exec chown %%LOGCHECK_USER%%:%%LOGCHECK_GROUP%% %%RUNDIR%%
 @dirrmtry %%RUNDIR%%
 @cwd
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Philippe Audeoud freebsd_committer 2014-03-11 16:07:00 UTC
State Changed
From-To: open->closed

Committed. Thanks!