svn commit: r323256 - in head: . security/logcheck security/logcheck/files
Greg Larkin
glarkin at FreeBSD.org
Thu Jul 18 20:55:34 UTC 2013
Author: glarkin
Date: Thu Jul 18 20:55:32 2013
New Revision: 323256
URL: http://svnweb.freebsd.org/changeset/ports/323256
Log:
- Added an option to control installation of the crontab file. The
option defaults to yes during interactive installation, and the crontab
file is not installed during non-interactive installation.
Requested by: espen at tagestad.no (via email)
Modified:
head/UPDATING
head/security/logcheck/Makefile
head/security/logcheck/files/pkg-install.in
Modified: head/UPDATING
==============================================================================
--- head/UPDATING Thu Jul 18 19:57:51 2013 (r323255)
+++ head/UPDATING Thu Jul 18 20:55:32 2013 (r323256)
@@ -6,6 +6,19 @@ You should get into the habit of checkin
you update your ports collection, before attempting any port upgrades.
20130718:
+ AFFECTS: users of security/logcheck
+ AUTHOR: glarkin at FreeBSD.org
+
+ The logcheck port now provides a configuration option controlling
+ installation of the crontab file. When installing the port interactively,
+ the port option is enabled by default to mimic previous behavior.
+
+ When the port is installed non-interactively (BATCH=yes or
+ PACKAGE_BUILDING=yes), the crontab file *will not* be installed
+ automatically. If the EXAMPLES port option is enabled, the crontab file
+ can be installed manually at a later time from EXAMPLESDIR/crontab.in.
+
+20130718:
AFFECTS: users of www/zend-framework
AUTHOR: wg at FreeBSD.org
Modified: head/security/logcheck/Makefile
==============================================================================
--- head/security/logcheck/Makefile Thu Jul 18 19:57:51 2013 (r323255)
+++ head/security/logcheck/Makefile Thu Jul 18 20:55:32 2013 (r323256)
@@ -1,12 +1,9 @@
-# Ports collection makefile for: logcheck
-# Date created: 9 December 1999
-# Whom: Dan Langille <dan at freebsddiary.org>
-#
+# Created by: Dan Langille <dan at freebsddiary.org>
# $FreeBSD$
-#
PORTNAME= logcheck
PORTVERSION= 1.3.15
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL}
DISTNAME= ${PORTNAME}_${PORTVERSION}
@@ -29,6 +26,12 @@ BASEDIR?= # None. portlint compliance
DBDIR= ${BASEDIR}/var/db/${PORTNAME}
RUNDIR= ${BASEDIR}/var/run/${PORTNAME}
+OPTIONS_DEFINE= CRON
+CRON_DESC= Install cron script automatically
+.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
+OPTIONS_DEFAULT=CRON
+.endif
+
# Enable Perl dependency for logtail script
USE_PERL5= yes
@@ -39,7 +42,7 @@ SUB_LIST+= LOGCHECK_USER=${LOGCHECK_USER
LOGCHECK_UID=${LOGCHECK_UID} \
LOGCHECK_GROUP=${LOGCHECK_GROUP} \
LOGCHECK_GID=${LOGCHECK_GID} \
- PW=${PW}
+ PW=${PW} CRON=${PORT_OPTIONS:MCRON}
SUB_FILES= pkg-install pkg-deinstall pkg-message
PLIST_SUB+= DBDIR=${DBDIR} RUNDIR=${RUNDIR}
CONFIG_DIRS= cracking.d ignore.d.paranoid ignore.d.server \
Modified: head/security/logcheck/files/pkg-install.in
==============================================================================
--- head/security/logcheck/files/pkg-install.in Thu Jul 18 19:57:51 2013 (r323255)
+++ head/security/logcheck/files/pkg-install.in Thu Jul 18 20:55:32 2013 (r323256)
@@ -25,6 +25,7 @@ PRE-INSTALL)
fi
;;
POST-INSTALL)
+ if [ "%%CRON%%" = "CRON" ]; then
if [ -f %%EXAMPLESDIR%%/crontab.in ] ; then
if /usr/bin/crontab -u "${user}" -l >/tmp/logchecktab$$ 2>&1 ; then
if test -s /tmp/logchecktab$$; then
@@ -48,6 +49,13 @@ POST-INSTALL)
fi
rm -f /tmp/logchecktab$$
fi
+ else
+ echo "---> Crontab file was not installed for user \"${user}\""
+ if [ -f %%EXAMPLESDIR%%/crontab.in ]; then
+ echo "---> A sample crontab file can be found in %%EXAMPLESDIR%%/crontab.in"
+ echo "---> for manual installation."
+ fi
+ fi
for f in ${configfiles}; do
if [ ! -e %%PREFIX%%/etc/logcheck/${f} ]; then
More information about the svn-ports-head
mailing list