Package: logcheck
Version: 1.4.2
Severity: normal
Tags: patch

Hello,

Since Debian Bookworm I get emails from logcheck because lines from
journalctl are no more ignored.

For example in the logcheck email I have:
juin 25 13:39:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage 
Attribute: 194 Temperature_Celsius changed from 34 to 35

Note the first word of the line: "juin". It is the french word for June.

It looks like journalctl now displays the month using the configured
locale.

Compare:
# journalctl -t smartd -S "Jun 25 10:00:00"
juin 25 11:09:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage Attribu>
juin 25 13:39:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage Attribu>

with:
# LANG=C journalctl -t smartd -S "Jun 25 10:00:00"
Jun 25 11:09:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage Attribut>
Jun 25 13:39:27 zotac smartd[548]: Device: /dev/sda [SAT], SMART Usage Attribut

I have:
# cat /etc/default/locale
#  File generated by update-locale
LANG="fr_FR.UTF-8"

The patch is easy and attached.


-- System Information:
Debian Release: 12.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-9-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
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.134
ii  cron [cron-daemon]                         3.0pl1-162
ii  exim4-daemon-light [mail-transport-agent]  4.96-15
ii  lockfile-progs                             0.1.19
ii  logtail                                    1.4.2
ii  mime-construct                             1.12+really1.11-1

Versions of packages logcheck recommends:
ii  logcheck-database  1.4.2

Versions of packages logcheck suggests:
ii  rsyslog [system-log-daemon]  8.2302.0-1

-- Configuration Files:
/etc/logcheck/header.txt [Errno 13] Permission non accordée: 
'/etc/logcheck/header.txt'
/etc/logcheck/logcheck.conf [Errno 13] Permission non accordée: 
'/etc/logcheck/logcheck.conf'
/etc/logcheck/logcheck.logfiles [Errno 13] Permission non accordée: 
'/etc/logcheck/logcheck.logfiles'
/etc/logcheck/logcheck.logfiles.d/journal.logfiles [Errno 13] Permission non 
accordée: '/etc/logcheck/logcheck.logfiles.d/journal.logfiles'
/etc/logcheck/logcheck.logfiles.d/syslog.logfiles [Errno 13] Permission non 
accordée: '/etc/logcheck/logcheck.logfiles.d/syslog.logfiles'

-- no debconf information
--- /usr/sbin/logcheck.orig     2023-06-25 14:18:48.716846520 +0200
+++ /usr/sbin/logcheck  2023-06-25 14:19:02.501495257 +0200
@@ -508,7 +508,7 @@
                                                                
offsettime="--since=-5h"
                                                fi
                                                debug "Running $JOURNALCTL 
${JOURNALCTL_OPTS[*]} -q $offsettime"
-                                               "$JOURNALCTL" 
"${JOURNALCTL_OPTS[@]}" --quiet "$offsettime" \
+                                               LANG=C "$JOURNALCTL" 
"${JOURNALCTL_OPTS[@]}" --quiet "$offsettime" \
                                                                                
                        >> "$TMPDIR/logoutput/$file" 2>&1 \
                                                                || error "Could 
not run journalctl or save output"
                                                touch "$offsetfile"

Reply via email to