FreeBSD Bugzilla – Attachment 140724 Details for
Bug 187411
[PATCH] security/logcheck: Take maintainership, support staging, etc.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
patch-logcheck
patch-logcheck (text/plain), 7.55 KB, created by
Yasuhiro Kimura
on 2014-03-10 05:50:00 UTC
(
hide
)
Description:
patch-logcheck
Filename:
MIME Type:
Creator:
Yasuhiro Kimura
Created:
2014-03-10 05:50:00 UTC
Size:
7.55 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 347711) >+++ Makefile (working copy) >@@ -3,14 +3,16 @@ > > PORTNAME= logcheck > PORTVERSION= 1.3.15 >-PORTREVISION= 2 >+PORTREVISION= 3 > 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 >@@ -18,9 +20,9 @@ > 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} >@@ -39,18 +41,18 @@ > 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 +61,6 @@ > extra-patch-src__logtail2 > EXTRA_PATCHES= ${PATCH_LIST:C|^|${WRKDIR}/|g} > >-NO_STAGE= yes > .include <bsd.port.pre.mk> > > pre-patch: >@@ -75,43 +76,34 @@ > ${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 >+.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} > >-post-install: >-.if ${PORT_OPTIONS:MDOCS} >- @${INSTALL} -d ${DOCSDIR} >- @cd ${WRKSRC} && ${INSTALL_DATA} -m 0644 ${DOCS} ${DOCSDIR} >-.endif >- @${CAT} ${PKGMESSAGE} >- > .include <bsd.port.post.mk> >Index: files/extra-patch-src__logcheck.in >=================================================================== >--- files/extra-patch-src__logcheck.in (revision 347711) >+++ files/extra-patch-src__logcheck.in (working copy) >@@ -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 >Index: files/pkg-deinstall.in >=================================================================== >--- files/pkg-deinstall.in (revision 347711) >+++ files/pkg-deinstall.in (working copy) >@@ -21,13 +21,5 @@ > 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 >Index: files/pkg-install.in >=================================================================== >--- files/pkg-install.in (revision 347711) >+++ files/pkg-install.in (working copy) >@@ -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 >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 347711) >+++ pkg-plist (working copy) >@@ -192,6 +192,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 +211,9 @@ > @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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 187411
: 140724 |
140725