Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
13407db945
!31 upgrade version to 3.21.0
From: @han_hui_hui 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-02-04 09:37:22 +00:00
han_hui_hui
39805ae0d7 upgrade version to 3.21.0 2024-02-04 08:14:22 +00:00
openeuler-ci-bot
6c45d40b0d
!28 do not pack directories belonging to other packages
From: @han_hui_hui 
Reviewed-by: @yanan-rock 
Signed-off-by: @yanan-rock
2024-01-12 07:13:17 +00:00
han_hui_hui
18baf56cad do not pack directories belonging to other packages 2024-01-11 08:17:53 +00:00
openeuler-ci-bot
ed04f66af1
!20 do not rotate logs on prerotate failure
From: @han_hui_hui 
Reviewed-by: @yanan-rock 
Signed-off-by: @yanan-rock
2023-06-07 04:00:22 +00:00
han_hui_hui
32fd2ff5f5 do not rotate logs on prerotate failure 2023-06-05 13:07:45 +00:00
openeuler-ci-bot
4ae79e42bd
!17 fix CVE-2022-1348 and upgrade to 3.20.1
From: @duyiwei7w 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-06-21 07:02:09 +00:00
duyiwei
f0163ae192 fix CVE-2022-1348
update to 3.20.1
2022-06-10 14:02:17 +08:00
openeuler-ci-bot
db0a3fbc21 !11 删除3.17.0.tar.xz
From: @xiechengliang
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2021-11-22 03:03:42 +00:00
xiechengliang
ca313ed487 删除文件 logrotate-3.17.0.tar.xz 2021-11-22 02:49:05 +00:00
openeuler-ci-bot
e37ee5f927 !10 update logrotate to 3.18.1
From: @xiechengliang
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2021-11-22 02:45:44 +00:00
5 changed files with 61 additions and 2 deletions

View File

@ -0,0 +1,45 @@
From 5f24239f282b8c6291cf35ea5f871ed0ca6b2672 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Tue, 4 Apr 2023 17:49:06 +0200
Subject: [PATCH] do not rotate old logs on prerotate failure
Ensures old logs are preserved and not rotated out for logs with a
failing prerotate script.
Alternative to #502
---
logrotate.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/logrotate.c b/logrotate.c
index f44b3851..d3ccb447 100644
--- a/logrotate.c
+++ b/logrotate.c
@@ -2476,10 +2476,6 @@ static int rotateLogSet(const struct logInfo *log, int force)
return 1;
}
memset(rotNames[i], 0, sizeof(struct logNames));
-
- logHasErrors[i] |=
- prerotateSingleLog(log, i, state[i], rotNames[i]);
- hasErrors |= logHasErrors[i];
}
if (log->pre
@@ -2509,6 +2505,16 @@ static int rotateLogSet(const struct logInfo *log, int force)
}
}
+ for (i = j;
+ ((log->flags & LOG_FLAG_SHAREDSCRIPTS) && i < log->numFiles)
+ || (!(log->flags & LOG_FLAG_SHAREDSCRIPTS) && i == j); i++) {
+ if (! ( (logHasErrors[i] && !(log->flags & LOG_FLAG_SHAREDSCRIPTS))
+ || (hasErrors && (log->flags & LOG_FLAG_SHAREDSCRIPTS)) ) ) {
+ logHasErrors[i] |= prerotateSingleLog(log, i, state[i], rotNames[i]);
+ hasErrors |= logHasErrors[i];
+ }
+ }
+
for (i = j;
((log->flags & LOG_FLAG_SHAREDSCRIPTS) && i < log->numFiles)
|| (!(log->flags & LOG_FLAG_SHAREDSCRIPTS) && i == j); i++) {

Binary file not shown.

Binary file not shown.

BIN
logrotate-3.21.0.tar.xz Normal file

Binary file not shown.

View File

@ -1,12 +1,15 @@
%global _configure ../configure
Name: logrotate
Version: 3.18.1
Version: 3.21.0
Release: 1
Summary: simplify the administration of log files
License: GPLv2+
Url: https://github.com/logrotate/logrotate
Source0: https://github.com/logrotate/logrotate/releases/download/%{version}/logrotate-%{version}.tar.xz
Patch6001: backport-do-not-rotate-old-logs-on-prerotate-failure.patch
BuildRequires: acl gcc automake libacl-devel libselinux-devel popt-devel
Requires: coreutils
@ -57,7 +60,6 @@ fi
%files
%defattr(-,root,root)
%license COPYING
%dir %{_sysconfdir}/cron.daily
%config(noreplace) %{_sysconfdir}/cron.daily/logrotate
%config(noreplace) %{_sysconfdir}/logrotate.conf
%dir %{_sysconfdir}/logrotate.d
@ -73,6 +75,18 @@ fi
%{_mandir}/man5/logrotate.conf.5*
%changelog
* Sun Feb 4 2024 hanhuihui <hanhuihui5@huawei.com> - 3.21.0-1
- upgrade version to 3.21.0
* Thu Jan 11 2024 hanhuihui <hanhuihui5@huawei.com> - 3.20.1-3
- do not pack directories belonging to other packages
* Mon Jun 5 2023 hanhuihui <hanhuihui5@huawei.com> - 3.20.1-2
- do not rotate old logs on prerotate failure
* Fri Jun 10 2022 duyiwei <duyiwei@kylinos.cn> - 3.20.1-1
- upgrade version to 3.20.1 and fix CVE-2022-1348
* Sat Nov 20 2021 xiechengliang <xiechengliang1@huawei.com> - 3.18.1-1
- update upstream to 3.18.1