diff --git a/UPDATING b/UPDATING --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,18 @@ world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20231225: + newsyslog(8) will no longer compress rotated files by default. + The J, X, Y, Z flags in newsyslog.conf(5) configuration files now + signify "treat the file as compressible" instead of "compress the + file with the specified method." A new command line option, -c, has + been introduced to allow specification of a new compression type + or to restore historical behavior. + + To reinstate the historical behavior, modify the newsyslog entry + in your /etc/crontab to include "-c legacy". For more details, + consult the newsyslog(8) manual page. + 20231120: If you have an arm64 system that uses ACPI, you will need to update your loader.efi in the ESP when you update past this point. Detection of ACPI diff --git a/usr.sbin/newsyslog/newsyslog.8 b/usr.sbin/newsyslog/newsyslog.8 --- a/usr.sbin/newsyslog/newsyslog.8 +++ b/usr.sbin/newsyslog/newsyslog.8 @@ -14,7 +14,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd December 22, 2023 +.Dd December 25, 2023 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -84,15 +84,15 @@ .Nm to use the specified compression method when a file is flagged for compression. The default method is -.Dq legacy , -which interprets the -.Sy J, X, Y, Z -flags in the configuration file according to their historical meanings. -This default setting can be overridden by specifying -.Fl c Ar none , +.Dq none , which causes .Nm to ignore all compression flags. +This default can be overridden by specifying +.Fl c Ar legacy +which interprets the +.Sy J , X , Y , Z , +flags in the configuration file according to their historical meanings. Alternatively, specifying one of the compression methods: .Sy bzip2 , gzip , xz , or diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -249,7 +249,7 @@ static char *archdirname; /* Directory path to old logfiles archive */ static char *destdir = NULL; /* Directory to treat at root for logs */ static const char *conf; /* Configuration file to use */ -static enum compress_types_enum compress_type_override = COMPRESS_LEGACY; /* Compression type */ +static enum compress_types_enum compress_type_override = COMPRESS_NONE; /* Compression type */ static bool compress_type_set = false; static bool compress_type_seen = false; diff --git a/usr.sbin/newsyslog/newsyslog.conf b/usr.sbin/newsyslog/newsyslog.conf --- a/usr.sbin/newsyslog/newsyslog.conf +++ b/usr.sbin/newsyslog/newsyslog.conf @@ -1,5 +1,7 @@ # configuration file for newsyslog # +# Global compress method for files tagged as compressible. + none # Entries which do not specify the '/pid_file' field will cause the # syslogd process to be signalled when that log file is rotated. This # action is only appropriate for log files which are written to by the diff --git a/usr.sbin/newsyslog/tests/legacy_test.sh b/usr.sbin/newsyslog/tests/legacy_test.sh --- a/usr.sbin/newsyslog/tests/legacy_test.sh +++ b/usr.sbin/newsyslog/tests/legacy_test.sh @@ -206,7 +206,7 @@ run_newsyslog() { - newsyslog -f ../newsyslog.conf -F -r "$@" + newsyslog -f ../newsyslog.conf -F -r -c legacy "$@" } tests_normal_rotate() {