Add patch to remove CMDEND from cron service

This commit is contained in:
Frank Crawford 2021-04-06 21:12:58 +10:00
parent d27cad75f1
commit 0ce995fb69
2 changed files with 21 additions and 1 deletions

14
cron.patch Normal file
View File

@ -0,0 +1,14 @@
diff --git a/scripts/services/cron b/scripts/services/cron
index 869b515..45b857f 100644
--- a/scripts/services/cron
+++ b/scripts/services/cron
@@ -63,6 +63,9 @@ while (defined($ThisLine = <STDIN>)) {
if ($ThisLine =~ s/^CMD \((.+)\)\s*$/$1/) {
$Runs->{$User}->{$ThisLine}++;
$ExecutedCommand{$PID} = {command=>$ThisLine, user=>$User};
+ } elsif ($ThisLine =~ /^CMDEND/) {
+ # Ignore - already counted above
+ next;
} elsif ($ThisLine =~ s/^CMD FINISH \((.+)\)\s*$/$1/) {
$Runs->{$User}->{$ThisLine}++;
} elsif ($ThisLine =~ s/^(END|CMD START) \((.+)\)\s*$/$1/) {

View File

@ -2,11 +2,13 @@
Summary: A log file analysis program
Name: logwatch
Version: 7.5.5
Release: 1%{?dist}
Release: 2%{?dist}
License: MIT
URL: https://sourceforge.net/projects/logwatch
Source0: logwatch-%{version}.tar.gz
#Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# Ignore CMDEND lines in 7.5.5 until next release
Patch0: cron.patch
BuildRequires: perl-generators
Requires: grep mailx
Requires: perl(Date::Manip)
@ -30,6 +32,7 @@ of the package on many systems.
%prep
%setup -q
%patch0 -p1
%build
@ -124,6 +127,9 @@ echo "# Configuration overrides for specific logfiles/services may be placed her
%{_unitdir}/logwatch.timer
%changelog
* Tue Apr 06 2021 Frank Crawford <frank@crawford.emu.id.au> - 7.5.5-2
- Add patch to remove CMDEND from cron service
* Tue Jan 26 2021 Frank Crawford <frank@crawford.emu.id.au> - 7.5.5-1
- Update to 7.5.5