Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and <compress> configuration option).
- Reply: Olivier Certner : "Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and <compress> configuration option)."
- Reply: Xin LI : "Re: git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and <compress> configuration option)."
- In reply to: Xin LI : "git: 2f036705f337 - main - Document the two recent newsyslog(8) change (-c option and <compress> configuration option)."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Dec 2023 15:25:33 UTC
On 29 Dec 2023, at 2:46, Xin LI wrote: > The branch main has been updated by delphij: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2f036705f337f61cee5a3b4f570b023c3da29895 > > commit 2f036705f337f61cee5a3b4f570b023c3da29895 > Author: Xin LI <delphij@FreeBSD.org> > AuthorDate: 2023-12-29 08:45:52 +0000 > Commit: Xin LI <delphij@FreeBSD.org> > CommitDate: 2023-12-29 08:45:52 +0000 > > Document the two recent newsyslog(8) change (-c option and <compress> > configuration option). > --- > RELNOTES | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/RELNOTES b/RELNOTES > index 509cf36c070e..adb9ca67aa0c 100644 > --- a/RELNOTES > +++ b/RELNOTES > @@ -10,6 +10,26 @@ newline. Entries should be separated by a newline. > > Changes to this file should not be MFCed. > > +61174ad88e33: > + newsyslog(8) now supports specifying a global compression method directly > + at the beginning of the newsyslog.conf file, which will make newsyslog(8) > + to behave like the corresponding option was passed to the newly added > + '-c' option. For example: > + > + <compress> none > + > +906748d208d3: > + newsyslog(8) now accepts a new option, '-c' which overrides all historical > + compression flags by treating their meaning as "treat the file as compressible" > + rather than "compress the file with that specific method." > + > + The following choices are available: > + * none: Do not compress, regardless of flag. > + * legacy: Historical behavior (J=bzip2, X=xz, Y=zstd, Z=gzip). > + * bzip2, xz, zstd, gzip: apply the specified compression method. > + > + We plan to change the default to 'none' in FreeBSD 15.0. Sorry not to have noticed this in the review; it was only when I saw this message that it sunk in that we now have *three* ways to specify compression, and I'm not even sure what the precedence is. I would have thought that <compress> would replace -c. It's a mess if the config file has entries that specify J and X flags as well as none, the config file has <compress> zstd, and the -c option is given as well. We now have a knob to override the knob to override a knob. The only reason to keep -c that I can think of is to specify a different compression in a single invocation, but as noted, changing compression requires manual operations that make it unreasonable to change it invocation by invocation. Also, using the -c option or <compress> (except with legacy) loses the ability to specify different compression types for different files. People have objected to the term "legacy" as well. I still think it would be much better to add an option letter to select the default compression as specified by <compress>. This would eliminate the need for "legacy", and it would add the ability to have both a global default and an exception. I think the redefinition of the existing flags to have different meanings if <compress> is given is messy. The entry for -c says that we plan to change the default to "none" in 15.0. Hopefully that would be done via <compress> and not -c. However, there was significant pushback on "none" being the default. Mike