Package: logcheck
Version: 1.4.3
Severity: minor
Tags: patch upstream
X-Debbugs-Cc: [email protected]
Dear Maintainer,
When logcheck is invoked with -t flag it should not update the offset of the
log files. This works for regular log files but the flag is ineffective (the
offset is updated anyway) when logcheck reads the log from systemd journal.
The attached patch fixes this problem.
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.10.9-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages logcheck depends on:
ii adduser 3.137
ii cron [cron-daemon] 3.0pl1-189
ii exim4-daemon-light [mail-transport-agent] 4.98-1
ii lockfile-progs 0.1.19+nmu1
ii logtail 1.4.3
ii mime-construct 1.12+really1.11-1
Versions of packages logcheck recommends:
ii logcheck-database 1.4.3
Versions of packages logcheck suggests:
pn rsyslog | system-log-daemon <none>
-- Configuration Files:
/etc/logcheck/logcheck.logfiles.d/syslog.logfiles changed:
-- no debconf information
--- logcheck.orig 2023-07-18 12:54:10.000000000 +0200
+++ logcheck 2024-09-16 09:59:25.208019356 +0200
@@ -511,7 +511,9 @@
"$JOURNALCTL"
"${JOURNALCTL_OPTS[@]}" --quiet "$offsettime" \
>> "$TMPDIR/logoutput/$file" 2>&1 \
|| error "Could
not run journalctl or save output"
- touch "$offsetfile"
+ if [ "$LOGTAIL_OPTS" != '-t' ];
then
+ touch "$offsetfile"
+ fi
else
echo "E: File could not be
read: $file" >> "$TMPDIR/errors" \
|| error "Could
not output to $TMPDIR/errors"