Discussion:
Bug#1036658: release-notes: 5.1.8. rsyslog creates fewer log files - mail.log is not dropped
(too old to reply)
Christoph Anton Mitterer
2023-05-24 00:10:01 UTC
Permalink
Package: release-notes
Severity: normal
X-Debbugs-Cc: ***@debian.org

Hey.

As of now, the section says that the following files are no longer
created:
- /var/log/mail.{info,warn,err,log}*
- /var/log/lpr.log*
- /var/log/{messages,debug,daemon}*


I've looked through rsyslog's changelog.Debian.gz (for version 8.2210.0-3)
as well as the commits on salsa:
https://salsa.debian.org/debian/rsyslog/-/commit/95e5e45b6e136196a7ac9ad85882391c44b641a4
AFAIU, only /var/log/mail.{info,warn,err}* are gone. mail.log is kept.


So:
/var/log/mail.{info,warn,err,log}*
should be changed to:
/var/log/mail.{info,warn,err}*

Thanks,
Chris.


PS: CCing Michael, so he can tell when I'm wrong.
Christoph Anton Mitterer
2023-05-24 00:40:01 UTC
Permalink
Oh and there's more which IMO can be improved.

If people take the currently named pattern:
- /var/log/mail.{info,warn,err,log}*
- /var/log/lpr.log*
- /var/log/{messages,debug,daemon}*

the may accidentally delete quite some other files. e.g. anything that
starts with debug.

Also, daemon is actually daemon.log .


The following would be at least a bit more restrictive:
/var/log/mail.{info,warn,err} /var/log/lpr.log /var/log/{messages,debug,daemon.log}
/var/log/mail.{info,warn,err}.* /var/log/lpr.log.* /var/log/{messages,debug,daemon.log}.*

not perfect though, cause it could still select unrelated files like
/var/log/debug.myproject.log



Cheers,
Chris.
Michael Biebl
2023-05-24 08:00:02 UTC
Permalink
See https://salsa.debian.org/ddp-team/release-notes/-/merge_requests/177
Oh and there's more which IMO can be improved.
- /var/log/mail.{info,warn,err,log}*
- /var/log/lpr.log*
- /var/log/{messages,debug,daemon}*
the may accidentally delete quite some other files. e.g. anything that
starts with debug.
Also, daemon is actually daemon.log .
/var/log/mail.{info,warn,err} /var/log/lpr.log /var/log/{messages,debug,daemon.log}
/var/log/mail.{info,warn,err}.* /var/log/lpr.log.* /var/log/{messages,debug,daemon.log}.*
not perfect though, cause it could still select unrelated files
It only matches compressed files though

Maybe just drop the “*” and leave it up to the user
Christoph Anton Mitterer
2023-05-24 13:00:01 UTC
Permalink
Post by Michael Biebl
See 
https://salsa.debian.org/ddp-team/release-notes/-/merge_requests/177
Ah... sorry I hadn't looked there.
Post by Michael Biebl
  /var/log/mail.{info,warn,err} /var/log/lpr.log
/var/log/{messages,debug,daemon.log}
  /var/log/mail.{info,warn,err}.* /var/log/lpr.log.*
/var/log/{messages,debug,daemon.log}.*
not perfect though, cause it could still select unrelated files 
It only matches compressed files though 
Mine? That I don't understand... I have the ones with just the name of
the logfile itself... and then .*, which should match the non-
compressed .0, .1, etc. as any .0.xz, .1.xz, etc.?
Post by Michael Biebl
Maybe just drop the “*” and leave it up to the user 
I personally would even tend to that... and add a note like:

"Beware, that these don't match any rotated files which may have
extensions like .0, .1, .0.xz, .1.xz, et cetera."

Especially as there not even a guarantee that the extension for
compressed files will be the well-known ones (given logrotate has
`compressext` option).


Cheers,
Chris.
Michael Biebl
2023-05-24 13:30:02 UTC
Permalink
Post by Christoph Anton Mitterer
Post by Michael Biebl
  /var/log/mail.{info,warn,err} /var/log/lpr.log
/var/log/{messages,debug,daemon.log}
  /var/log/mail.{info,warn,err}.* /var/log/lpr.log.*
/var/log/{messages,debug,daemon.log}.*
not perfect though, cause it could still select unrelated files
It only matches compressed files though
Mine? That I don't understand... I have the ones with just the name of
the logfile itself... and then .*, which should match the non-
compressed .0, .1, etc. as any .0.xz, .1.xz, etc.?
Sorry, I meant: It (the expresssion like /var/log/lpr.log.*) only
matches rotated files, but not the actual log file itself.
Christoph Anton Mitterer
2023-05-24 13:30:01 UTC
Permalink
Post by Christoph Anton Mitterer
Post by Michael Biebl
   /var/log/mail.{info,warn,err} /var/log/lpr.log
/var/log/{messages,debug,daemon.log}
   /var/log/mail.{info,warn,err}.* /var/log/lpr.log.*
/var/log/{messages,debug,daemon.log}.*
not perfect though, cause it could still select unrelated files
It only matches compressed files though
Mine? That I don't understand... I have the ones with just the name of
the logfile itself... and then .*, which should match the non-
compressed .0, .1, etc. as any .0.xz, .1.xz, etc.?
Sorry, I meant: It (the expresssion like /var/log/lpr.log.*) only
matches rotated files, but not the actual log file itself.
But for that I would have had both:
/var/log/mail.{info,warn,err} /var/log/lpr.log /var/log/{messages,debug,daemon.log}
/var/log/mail.{info,warn,err}.* /var/log/lpr.log.* /var/log/{messages,debug,daemon.log}.*


Anyway... if everyone agrees that we should leave out the rotated files
and leave that up to the user (which a note bout that being the case in
the release notes)... it would IMO be safer.

I could make a PR if desired so.


Cheers,
Chris.
Michael Biebl
2023-05-24 14:40:01 UTC
Permalink
Post by Christoph Anton Mitterer
Sorry, I meant: It (the expresssion like /var/log/lpr.log.*) only
matches rotated files, but not the actual log file itself.
/var/log/mail.{info,warn,err} /var/log/lpr.log /var/log/{messages,debug,daemon.log}
/var/log/mail.{info,warn,err}.* /var/log/lpr.log.* /var/log/{messages,debug,daemon.log}.*
Indeed, I overlooked that part.
Post by Christoph Anton Mitterer
Anyway... if everyone agrees that we should leave out the rotated files
and leave that up to the user (which a note bout that being the case in
the release notes)... it would IMO be safer.
I could make a PR if desired so.
In the interest of keeping the list of file names short, I wouldn't
duplicate them (one with .* and one without). But that's just a personal
preference.
Paul Gevers
2023-05-28 16:10:01 UTC
Permalink
Hi,
Post by Michael Biebl
Post by Christoph Anton Mitterer
Anyway... if everyone agrees that we should leave out the rotated files
and leave that up to the user (which a note bout that being the case in
the release notes)... it would IMO be safer.
I could make a PR if desired so.
In the interest of keeping the list of file names short, I wouldn't
duplicate them (one with .* and one without). But that's just a personal
preference.
My proposal is here:
https://salsa.debian.org/ddp-team/release-notes/-/merge_requests/180 (I
don't like the repetition, but I feel it's best like that)

Paul
Debian Bug Tracking System
2023-06-08 10:10:02 UTC
Permalink
Your message dated Thu, 8 Jun 2023 12:06:35 +0200
with message-id <39e4666e-46a0-aee1-470c-***@debian.org>
and subject line Re: release-notes: 5.1.8. rsyslog creates fewer log files - mail.log is not dropped
has caused the Debian Bug report #1036658,
regarding release-notes: 5.1.8. rsyslog creates fewer log files - mail.log is not dropped
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
1036658: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036658
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...