Resolves: RHEL-114935 - Image mode: The dir /var/lib and /var/log

is not created when updating system in image mode
This commit is contained in:
Luboš Uhliarik 2025-11-19 18:59:56 +01:00
parent 72c0c46290
commit 0c4f4b3473
2 changed files with 15 additions and 1 deletions

View File

@ -41,7 +41,7 @@
Name: nginx
Epoch: 2
Version: 1.20.1
Release: 24%{?dist}
Release: 25%{?dist}
Summary: A high performance web server and reverse proxy server
# BSD License (two clause)
@ -63,6 +63,7 @@ Source14: nginx-upgrade.8
Source15: macros.nginxmods.in
Source16: nginxmods.attr
Source17: nginx.sysusers
Source18: nginx.tmpfiles
Source102: nginx-logo.png
Source103: 404.html
Source104: 50x.html
@ -483,6 +484,10 @@ install -Dpm0644 -t %{buildroot}%{_fileattrsdir} %{SOURCE16}
# install sysusers file
install -p -D -m 0644 %{SOURCE17} %{buildroot}%{_sysusersdir}/nginx.conf
# tmpfiles.d configuration
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 644 -p %{SOURCE18} %{buildroot}%{_tmpfilesdir}/nginx.conf
%pre filesystem
%sysusers_create_compat %{SOURCE17}
@ -570,6 +575,7 @@ fi
%attr(770,%{nginx_user},root) %dir %{_localstatedir}/lib/nginx
%attr(770,%{nginx_user},root) %dir %{_localstatedir}/lib/nginx/tmp
%attr(711,root,root) %dir %{_localstatedir}/log/nginx
%{_tmpfilesdir}/nginx.conf
%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}
@ -623,6 +629,10 @@ fi
%changelog
* Wed Nov 19 2025 Luboš Uhliarik <luhliari@redhat.com> - 2:1.20.1-25
- Resolves: RHEL-114935 - Image mode: The dir /var/lib and /var/log
is not created when updating system in image mode
* Wed May 14 2025 Luboš Uhliarik <luhliari@redhat.com> - 2:1.20.1-24
- Resolves: RHEL-84477 - nginx: specially crafted MP4 file may cause
denial of service (CVE-2024-7347)

4
nginx.tmpfiles Normal file
View File

@ -0,0 +1,4 @@
d /var/lib/nginx 770 nginx root -
d /var/lib/nginx/tmp 770 nginx root -
d /var/log/nginx 711 root root -