On Tue, 30 Sep 2025, 08:29 Paul Muster, <[email protected]> wrote: > > I receive an additional e-mail from cron where grep complains about RegEx > starting with "?". > > Subject: > Cron <logcheck@dom3> if [ ! -d /run/systemd/system ] && [ -x > /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi > > Body of the e-mail: > grep: warning: ? at start of expression > grep: warning: ? at start of expression > grep: warning: ? at start of expression > grep: warning: ? at start of expression > grep: warning: ? at start of expression > grep: warning: ? at start of expression > grep: warning: ? at start of expression > grep: warning: ? at start of expression > > This happens with the logcheck package from Trixie (Debian 13), too. > > The behaviour is apparently related to the fact that grep now (i.e. since > Bookworm) reacts more sensitively to the situation described (“? ” at the > beginning of the RegEx), as stated in the release notes and announced by > apt-listchanges. > > But why does this happen with logcheck?
because logcheck uses grep. grep in bookworm (which is now several years old) rejects more invalid syntax - older versions did unpredictable things. so this is showing a genuine problem that was on your system already --- i am pretty sure this is not an issue in Debian's rules but in something you have added locally. I can't find any RegEx that starts with a question mark: > > # grep -r ^? /etc/logcheck/ > # > > Any ideas? i dont know, but i could believe "start of expression" (which is from grep) may include start of a group or character classes rather thsn only the start of a line. if you run logcheck on its own with the -d option (from commandline -- you will need to use su/sudo: if you run "logcheck -d" it will), you will get lots of info about what it is doing, that should help you find the files being processed and that should help you narrow it down.

