forked from pool/haproxy
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:
parent
7e6d8d08ea
commit
7a9be1bc6a
@ -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
|
Fri Mar 2 16:37:25 UTC 2018 - kgronlund@suse.com
|
||||||
|
|
||||||
|
15
haproxy.spec
15
haproxy.spec
@ -114,7 +114,7 @@ the most work done from every CPU cycle.
|
|||||||
%patch3
|
%patch3
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__make} \
|
make \
|
||||||
TARGET=linux2628 \
|
TARGET=linux2628 \
|
||||||
CPU="%{_target_cpu}" \
|
CPU="%{_target_cpu}" \
|
||||||
USE_PCRE=1 \
|
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}
|
ln -sf /sbin/service %{buildroot}%{_sbindir}/rc%{pkg_name}
|
||||||
%else
|
%else
|
||||||
install -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name}
|
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
|
%endif
|
||||||
|
|
||||||
install -d -m 0750 %{buildroot}%{pkg_home}
|
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
|
rm examples/haproxy.spec examples/*init* examples/haproxy.vim
|
||||||
|
|
||||||
%if 0%{?suse_version} < 1230
|
|
||||||
%clean
|
|
||||||
%{?buildroot:%{__rm} -rf %{buildroot}}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
/usr/sbin/groupadd -r %{pkg_name} >/dev/null 2>&1 ||:
|
getent group %{pkg_name} >/dev/null || /usr/sbin/groupadd -r %{pkg_name}
|
||||||
/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 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}
|
%if %{with systemd}
|
||||||
%service_add_pre %{pkg_name}.service
|
%service_add_pre %{pkg_name}.service
|
||||||
|
Loading…
Reference in New Issue
Block a user