diff --git a/nginx.changes b/nginx.changes index 69b1088..600b4e4 100644 --- a/nginx.changes +++ b/nginx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 15 18:28:09 UTC 2024 - Илья Индиго <13ilya@gmail.com> + +- Added file nginx.tmpfiles.d for creation run-time directory. + ------------------------------------------------------------------- Sun Mar 3 10:24:27 UTC 2024 - Adam Mizerski diff --git a/nginx.spec b/nginx.spec index 5d62ae2..88c3f9a 100644 --- a/nginx.spec +++ b/nginx.spec @@ -36,6 +36,7 @@ Source3: %{name}.rpmlintrc Source4: %{name}.logrotate Source5: %{name}.service Source6: %{name}.sysusers +Source7: %{name}.tmpfiles.d # PATCH-FIX-UPSTREAM nginx-1.11.2-no_Werror.patch Patch0: %{name}-1.11.2-no_Werror.patch # PATCH-FIX-OPENSUSE nginx-1.11.2-html.patch @@ -129,6 +130,7 @@ install -dpm0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi} install -Dpm0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -Dpm0644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}.service install -Dpm0644 %{SOURCE6} %{buildroot}%{_sysusersdir}/%{name}.conf +install -Dpm0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} rm %{buildroot}/srv/www/htdocs/index.html @@ -165,6 +167,7 @@ copydocs() { %post %service_add_post %{name}.service +%tmpfiles_create %{_tmpfilesdir}/%{name}.conf %postun %service_del_postun %{name}.service @@ -213,6 +216,8 @@ copydocs() { %{_unitdir}/%{name}.service %{_sysusersdir}/%{name}.conf %{_datadir}/%{name}/ +%{_tmpfilesdir}/%{name}.conf +%ghost %dir /run/%{name} %files source %{src_install_dir} diff --git a/nginx.tmpfiles.d b/nginx.tmpfiles.d new file mode 100644 index 0000000..81aa918 --- /dev/null +++ b/nginx.tmpfiles.d @@ -0,0 +1 @@ +d /run/nginx 0755 nginx nginx -