Hello community, here is the log from the commit of package nginx for openSUSE:Factory checked in at 2020-04-25 20:09:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nginx (Old) and /work/SRC/openSUSE:Factory/.nginx.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nginx" Sat Apr 25 20:09:23 2020 rev:50 rq:795747 version:1.17.10 Changes: -------- --- /work/SRC/openSUSE:Factory/nginx/nginx.changes 2020-04-18 00:28:53.517861171 +0200 +++ /work/SRC/openSUSE:Factory/.nginx.new.2738/nginx.changes 2020-04-25 20:09:32.131697578 +0200 @@ -1,0 +2,6 @@ +Fri Apr 17 12:28:02 UTC 2020 - Thorsten Kukuk <[email protected]> + +- Use sysusers.d to create the nginx user and group +- Remove self-conflict + +------------------------------------------------------------------- New: ---- nginx.sysusers ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nginx.spec ++++++ --- /var/tmp/diff_new_pack.lW4Mtj/_old 2020-04-25 20:09:36.823707253 +0200 +++ /var/tmp/diff_new_pack.lW4Mtj/_new 2020-04-25 20:09:36.827707261 +0200 @@ -91,6 +91,7 @@ Source6: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/%{nginx_upstream_check_module_path}.tar.gz Source7: https://github.com/arut/nginx-rtmp-module/archive/v%{nginx_rtmp_version}/%{nginx_rtmp_module_path}.tar.gz Source8: https://github.com/leev/ngx_http_geoip2_module/archive/%{nginx_geoip2_version}.tar.gz#/%{nginx_geoip2_module_path}.tar.gz +Source9: nginx.sysusers Source100: nginx.rpmlintrc Source101: https://nginx.org/download/%{name}-%{version}.tar.gz.asc Source102: https://nginx.org/keys/mdounin.key#/%{name}.keyring @@ -117,10 +118,8 @@ BuildRequires: zlib-devel BuildRequires: pkgconfig(libmaxminddb) %requires_eq perl -Requires(pre): shadow Recommends: logrotate Recommends: vim-plugin-nginx -Conflicts: nginx Provides: http_daemon Provides: httpd # @@ -135,7 +134,11 @@ %if %{with systemd} BuildRequires: pkgconfig(systemd) %{?systemd_ordering} +BuildRequires: sysuser-shadow +BuildRequires: sysuser-tools +%sysusers_requires %else +Requires(pre): shadow Requires(pre): %fillup_prereq Requires(pre): %insserv_prereq %endif @@ -263,6 +266,9 @@ --with-cc-opt="%{optflags}" %endif %make_build +%if %{with systemd} +%sysusers_generate_pre %{SOURCE9} nginx +%endif %install %make_install @@ -275,6 +281,7 @@ %if %{with systemd} install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/nginx.service ln -s -f %{_sbindir}/service %{buildroot}%{_sbindir}/rcnginx +install -D -m 0644 %{SOURCE9} %{buildroot}%{_sysusersdir}/nginx.conf %else install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name} ln -s -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name} @@ -344,12 +351,13 @@ %insserv_cleanup %endif +%if %{with systemd} +%pre -f nginx.pre +%service_add_pre nginx.service +%else %pre %{_sbindir}/groupadd -r %{ngx_user_group} &>/dev/null ||: %{_sbindir}/useradd -g %{ngx_user_group} -s /bin/false -r -c "user for %{ngx_user_group}" -d %{ngx_home} %{ngx_user_group} &>/dev/null ||: - -%if %{with systemd} -%service_add_pre nginx.service %endif %files @@ -406,6 +414,7 @@ %doc %{ngx_doc_dir} %if %{with systemd} %{_unitdir}/nginx.service +%{_sysusersdir}/nginx.conf %else %{_sysconfdir}/init.d/%{pkg_name} %endif ++++++ nginx.sysusers ++++++ # Type Name ID GECOS [HOME] u nginx - "User for nginx" /var/lib/nginx
