Re: Proposal: Disable compression of newsyslog by default

From: Mike Karels <mike_at_karels.net>
Date: Sat, 23 Dec 2023 22:17:31 UTC
On 23 Dec 2023, at 15:23, Craig Leres wrote:

> On 12/23/23 06:52, Konstantin Belousov wrote:
>> This is strange change at best.  I have no opinion about the disabling
>> of compression of the rotated logs by default, but we already have knobs
>> to do that.  Adding a knob that disables (or enables) other knobs to work
>> is weird.
>
> I totally agree. This moves the compression knob from the config file to the command line. And what if the user wants some but not all files to be compressed? Or wants to use different compression with different log files?

Another possibility would be to introduce some simple form of variables in
newsyslog.conf, replacing J by a variable reference, with the variable
being set near the beginning.  E.g.

	V=zstd (or just V= for none?)
	... $V
	... $V

Then there would be one global change, and much easier changing of the
default.

It would also be possible to add <include> /etc/newsyslog.local.conf at the
beginning, and set variables there, making changes to the default file less
painful in the future.

>> If you want to change the compression, update the default configuration file.
>
> I also think this is the best approach.
>
> Given the current freebsd-update workflow, users will get to deal with changes to the default newsyslog.conf via mergemaster.
>
> And having converted a number of systems from newsyslog compression to zfs compression, just changing the config file is not the only change needed, users will still need to compress/uncompress existing log files.

Good point.  Although newsyslog could be smart enough to recognize alternate
suffixes (or none), and rotate the files anyway.  Short of that, this suggests
that a new default config file should specify bzip2, but it would be easy to
localize.

		Mike