git: 4d161fff0334 - main - security/logcheck: Add patch to change crontab entry

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Sun, 11 Feb 2024 04:08:38 UTC
The branch main has been updated by yasu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4d161fff033445025c42bd05f0eba6aebed15563

commit 4d161fff033445025c42bd05f0eba6aebed15563
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2024-02-11 02:19:54 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2024-02-11 04:06:24 +0000

    security/logcheck: Add patch to change crontab entry
    
    When the host is heavily loaded, the log files can grow incredibly and
    one logcheck invocation may not complete before it is invoked next
    time.
    
    This commit add patch to change crontab entries so it uses lockf(1) to
    avoid multiple invocation of logcheck under such situation as above.
    
    PR:             276023
---
 security/logcheck/Makefile                           | 2 +-
 security/logcheck/files/patch-debian_logcheck.cron.d | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/security/logcheck/Makefile b/security/logcheck/Makefile
index 1e161066e21b..8d29dd5b2cf6 100644
--- a/security/logcheck/Makefile
+++ b/security/logcheck/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	logcheck
 DISTVERSION=	1.4.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	DEBIAN_POOL
 DISTNAME=	${PORTNAME}_${PORTVERSION}
diff --git a/security/logcheck/files/patch-debian_logcheck.cron.d b/security/logcheck/files/patch-debian_logcheck.cron.d
index e72f3f982fee..0f33b88cb62a 100644
--- a/security/logcheck/files/patch-debian_logcheck.cron.d
+++ b/security/logcheck/files/patch-debian_logcheck.cron.d
@@ -1,4 +1,4 @@
---- debian/logcheck.cron.d.orig	2017-01-25 21:08:04 UTC
+--- debian/logcheck.cron.d.orig	2023-07-18 10:54:00 UTC
 +++ debian/logcheck.cron.d
 @@ -1,9 +1,5 @@
 -# /etc/cron.d/logcheck: crontab entries for the logcheck package
@@ -12,5 +12,5 @@
 -2 * * * *       logcheck    if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
 -
 -# EOF
-+@reboot    if [ -x %%PREFIX%%/sbin/logcheck ]; then nice -n10 %%PREFIX%%/sbin/logcheck -R; fi
-+2 * * * *  if [ -x %%PREFIX%%/sbin/logcheck ]; then nice -n10 %%PREFIX%%/sbin/logcheck; fi
++@reboot    if [ -x %%PREFIX%%/sbin/logcheck ]; then /usr/bin/lockf -t 0 /tmp/.logcheck nice -n10 %%PREFIX%%/sbin/logcheck -R; fi
++2 * * * *  if [ -x %%PREFIX%%/sbin/logcheck ]; then /usr/bin/lockf -t 0 /tmp/.logcheck nice -n10 %%PREFIX%%/sbin/logcheck; fi