Accepting request 582333 from home:jengelh:branches:server:http

- Avoid %__-type macro indirections. Remove redundant %clean
  section. Do not ignore errors from useradd.

OBS-URL: https://build.opensuse.org/request/show/582333
OBS-URL: https://build.opensuse.org/package/show/server:http/haproxy?expand=0&rev=161
This commit is contained in:
Marguerite Su 2018-03-07 05:58:33 +00:00 committed by Git OBS Bridge
parent 7e6d8d08ea
commit 7a9be1bc6a
2 changed files with 12 additions and 9 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Mar 4 08:36:21 UTC 2018 - jengelh@inai.de
- Avoid %__-type macro indirections. Remove redundant %clean
section. Do not ignore errors from useradd.
-------------------------------------------------------------------
Fri Mar 2 16:37:25 UTC 2018 - kgronlund@suse.com

View File

@ -114,7 +114,7 @@ the most work done from every CPU cycle.
%patch3
%build
%{__make} \
make \
TARGET=linux2628 \
CPU="%{_target_cpu}" \
USE_PCRE=1 \
@ -160,7 +160,7 @@ install -D -m 0644 contrib/systemd/%{pkg_name}.service %{buildroot}%{_unitdir}/
ln -sf /sbin/service %{buildroot}%{_sbindir}/rc%{pkg_name}
%else
install -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
%{__ln_s} -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
ln -fs %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
%endif
install -d -m 0750 %{buildroot}%{pkg_home}
@ -173,14 +173,11 @@ install -D -m 0644 %{S:3} %{buildroot}/etc/apparmor.d/local/us
rm examples/haproxy.spec examples/*init* examples/haproxy.vim
%if 0%{?suse_version} < 1230
%clean
%{?buildroot:%{__rm} -rf %{buildroot}}
%endif
%pre
/usr/sbin/groupadd -r %{pkg_name} >/dev/null 2>&1 ||:
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r -c "user for %{pkg_name}" -d %{pkg_home} %{pkg_name} >/dev/null 2>&1 || :
getent group %{pkg_name} >/dev/null || /usr/sbin/groupadd -r %{pkg_name}
getent passwd %{pkg_name} >/dev/null || \
/usr/sbin/useradd -g %{pkg_name} -s /bin/false -r \
-c "user for %{pkg_name}" -d %{pkg_home} %{pkg_name}
%if %{with systemd}
%service_add_pre %{pkg_name}.service