From 7a9be1bc6a64f62220d208116e8d1a132418616a8103f713c938ab8e9fa655da Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Wed, 7 Mar 2018 05:58:33 +0000 Subject: [PATCH] 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 --- haproxy.changes | 6 ++++++ haproxy.spec | 15 ++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/haproxy.changes b/haproxy.changes index 7f8d98e..696acc2 100644 --- a/haproxy.changes +++ b/haproxy.changes @@ -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 diff --git a/haproxy.spec b/haproxy.spec index 82a543f..3415474 100644 --- a/haproxy.spec +++ b/haproxy.spec @@ -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