From a8b57f47a9470d7378c8a243058c975ec6436730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Uhliarik?= Date: Sun, 18 Dec 2022 01:05:47 +0100 Subject: [PATCH] Resolves: #2150932 - No logrotating nginx logs from nginx:1.22 --- .nginx.metadata | 2 ++ nginx.logrotate | 3 ++- nginx.spec | 9 +++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .nginx.metadata diff --git a/.nginx.metadata b/.nginx.metadata new file mode 100644 index 0000000..b226b57 --- /dev/null +++ b/.nginx.metadata @@ -0,0 +1,2 @@ +6b4ab4eff3c617e133819f43fdfc14708e593a79 nginx-1.20.1.tar.gz +e2858105f16d5a4b2e68066ed9b77c3d200a435f nginx-1.20.1.tar.gz.asc diff --git a/nginx.logrotate b/nginx.logrotate index 2fef5aa..174c4ee 100644 --- a/nginx.logrotate +++ b/nginx.logrotate @@ -1,4 +1,5 @@ -/var/log/nginx/*log { +/var/log/nginx/*.log { + create 0640 nginx root daily rotate 10 missingok diff --git a/nginx.spec b/nginx.spec index f0cd0e1..ca959ec 100644 --- a/nginx.spec +++ b/nginx.spec @@ -56,7 +56,7 @@ Name: nginx Epoch: 1 Version: 1.22.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A high performance web server and reverse proxy server # BSD License (two clause) @@ -558,7 +558,9 @@ fi %config(noreplace) %{_sysconfdir}/logrotate.d/nginx %attr(770,%{nginx_user},root) %dir %{_localstatedir}/lib/nginx %attr(770,%{nginx_user},root) %dir %{_localstatedir}/lib/nginx/tmp -%dir %{_localstatedir}/log/nginx +%attr(711,root,root) %dir %{_localstatedir}/log/nginx +%ghost %attr(640,%{nginx_user},root) %{_localstatedir}/log/nginx/access.log +%ghost %attr(640,%{nginx_user},root) %{_localstatedir}/log/nginx/error.log %dir %{nginx_moduledir} %dir %{nginx_moduleconfdir} @@ -609,6 +611,9 @@ fi %changelog +* Sun Dec 18 2022 Luboš Uhliarik - 1:1.22.1-3 +- Resolves: #2150932 - No logrotating nginx logs from nginx:1.22 + * Thu Dec 01 2022 Neal Gompa - 1:1.22.1-2 - Require pcre2-devel instead of pcre-devel in -mod-devel subpackage Resolves: rhbz#2149965