Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37534190
en ru br
Репозитории ALT
S:3.20.1-alt2
5.1: 3.7.9-alt0.M51.1
4.1: 3.6.2-alt4
4.0: 3.6.2-alt4
3.0: 3.6.2-alt3
www.altlinux.org/Changes

Группа :: Работа с файлами
Пакет: logrotate

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0002-ALT-Change-logrotate-defaults.patch
Скачать


From 50d13732f7e16352f5f05bfff3214ac800c52868 Mon Sep 17 00:00:00 2001
From: Alexey Gladkov <legion@altlinux.org>
Date: Sat, 25 Apr 2020 17:56:45 +0300
Subject: ALT: Change logrotate defaults
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
---
 configure.ac            | 10 +++++-----
 examples/logrotate.conf | 14 ++++++++++----
 logrotate.8.in          | 18 +++++++++---------
 3 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0208c61..fbe730a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,10 +59,10 @@ AS_IF([test "$ac_cv_lib_acl_acl_get_file" = yes],
   echo "1" > ./test/test.ACL; WITH_ACL="yes";, echo "0" > ./test/test.ACL;)
 
 DEFAULT_MAIL_COMMAND="/bin/mail"
-COMPRESS_COMMAND="/bin/gzip"
-UNCOMPRESS_COMMAND="/bin/gunzip"
-COMPRESS_EXT=".gz"
-STATE_FILE_PATH="/var/lib/logrotate.status"
+COMPRESS_COMMAND="/usr/bin/xz"
+UNCOMPRESS_COMMAND="/usr/bin/unxz"
+COMPRESS_EXT=".xz"
+STATE_FILE_PATH="/var/lib/status"
 
 case "$host" in
   *-hpux*)
@@ -86,7 +86,7 @@ esac
 
 AC_ARG_WITH([state-file-path],
   AS_HELP_STRING([--with-state-file-path=PATH],
-                 [path to state file (/var/lib/logrotate.status by default)]),
+                 [path to state file (/var/lib/status by default)]),
   [
     case "$withval" in
       yes|no)
diff --git a/examples/logrotate.conf b/examples/logrotate.conf
index fbd0f50..d7b20c3 100644
--- a/examples/logrotate.conf
+++ b/examples/logrotate.conf
@@ -11,11 +11,17 @@ rotate 4
 # create new (empty) log files after rotating old ones
 create
 
-# use date as a suffix of the rotated file
-dateext
+# comment this out if you want your log files remain uncompressed
+compress
 
-# uncomment this if you want your log files compressed
-#compress
+# do not rotate empty log files
+notifempty
+
+# uncomment this if you want to use date as a suffix for rotated files
+#dateext
+
+# logs are moved into this directory for rotation
+#olddir old
 
 # packages drop log rotation information into this directory
 include /etc/logrotate.d
diff --git a/logrotate.8.in b/logrotate.8.in
index 9a28fe2..5c4d147 100644
--- a/logrotate.8.in
+++ b/logrotate.8.in
@@ -487,7 +487,7 @@ Do not rotate files with multiple hard links.  See also \fBallowhardlink\fR.
 
 .TP
 \fBcompress\fR
-Old versions of log files are compressed with \fBgzip\fR(1) by default.
+Old versions of log files are compressed with \fBxz\fR(1) by default.
 See also \fBnocompress\fR.
 
 .TP
@@ -497,12 +497,12 @@ Old versions of log files are not compressed.  See also \fBcompress\fR.
 .TP
 \fBcompresscmd\fR
 Specifies which command to use to compress log files.  The default is
-\fBgzip\fR(1).  See also \fBcompress\fR.
+\fBxz\fR(1).  See also \fBcompress\fR.
 
 .TP
 \fBuncompresscmd\fR
 Specifies which command to use to uncompress log files.  The default is
-\fBgunzip\fR(1).
+\fBunxz\fR(1).
 
 .TP
 \fBcompressext\fR
@@ -513,7 +513,7 @@ command.
 .TP
 \fBcompressoptions\fR
 Command line options may be passed to the compression program, if one is
-in use.  The default, for \fBgzip\fR(1), is "\-6" (biased towards high
+in use.  The default, for \fBxz\fR(1), is "\-6" (biased towards high
 compression at the expense of speed).
 If you use a different compression command, you may need to change the
 \fBcompressoptions\fR to match.
@@ -535,9 +535,9 @@ Do not postpone compression of the previous log file to the next rotation cycle
 .TP
 \fBextension \fIext\fR
 Log files with \fIext\fR extension can keep it after the rotation.
-If compression is used, the compression extension (normally \fI.gz\fR)
+If compression is used, the compression extension (normally \fI.xz\fR)
 appears after \fIext\fR.  For example you have a logfile named mylog.foo
-and want to rotate it to mylog.1.foo.gz instead of mylog.foo.1.gz.
+and want to rotate it to mylog.1.foo.xz instead of mylog.foo.1.xz.
 
 .TP
 \fBaddextension \fIext\fR
@@ -545,7 +545,7 @@ Log files are given the final extension \fIext\fR after rotation.  If
 the original file already ends with \fIext\fR, the extension is not
 duplicated, but merely moved to the end, that is both \fBfilename\fR and
 \fBfilename\fIext\fR would get rotated to filename.1\fIext\fR.  If
-compression is used, the compression extension (normally \fB.gz\fR)
+compression is used, the compression extension (normally \fB.xz\fR)
 appears after \fIext\fR.
 
 .TP
@@ -759,8 +759,8 @@ l l l.
 .SH "SEE ALSO"
 
 .BR chmod (2),
-.BR gunzip (1),
-.BR gzip (1),
+.BR unxz (1),
+.BR xz (1),
 .BR mail (1),
 .BR shred (1),
 .BR strftime (3),
-- 
2.25.4
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin