Accepting request 496805 from home:dimstar:Factory

This fixes the build failure seen in openSUSE:Factory

- Don't hide errors while creating users, and do not mask failures:
  if there is a problem creating the user there is no reason to
  believe the application would work afterwards.
- Add group(nogroup) to Requires(pre): the user to be created joins
  that group.

OBS-URL: https://build.opensuse.org/request/show/496805
OBS-URL: https://build.opensuse.org/package/show/server:proxy/cntlm?expand=0&rev=35
This commit is contained in:
Martin Pluskal 2017-05-22 08:12:26 +00:00 committed by Git OBS Bridge
parent cde7ed7bf8
commit cda073c806
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri May 19 16:01:08 UTC 2017 - dimstar@opensuse.org
- Don't hide errors while creating users, and do not mask failures:
if there is a problem creating the user there is no reason to
believe the application would work afterwards.
- Add group(nogroup) to Requires(pre): the user to be created joins
that group.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 24 08:58:57 UTC 2016 - mpluskal@suse.com Thu Mar 24 08:58:57 UTC 2016 - mpluskal@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package cntlm # spec file for package cntlm
# #
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2007 Scorpio IT, Deidesheim, Germany # Copyright (c) 2007 Scorpio IT, Deidesheim, Germany
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -36,6 +36,7 @@ Patch0: cntlm-override-CFLAGS-CXXFLAGS-makefile.patch
Patch1: cntlm-0.92.3-HTTP-1.1-persistent-connections-with-HTTP-1.0-clients.patch Patch1: cntlm-0.92.3-HTTP-1.1-persistent-connections-with-HTTP-1.0-clients.patch
Requires(pre): grep Requires(pre): grep
Requires(pre): pwdutils Requires(pre): pwdutils
Requires(pre): group(nogroup)
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} < 1230 %if 0%{?suse_version} < 1230
Requires(pre): %fillup_prereq Requires(pre): %fillup_prereq
@ -82,7 +83,7 @@ install -D -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/
# user cntlm # user cntlm
if [ -z "`%{_bindir}/getent passwd "%{name}"`" ]; then if [ -z "`%{_bindir}/getent passwd "%{name}"`" ]; then
%{_sbindir}/useradd -c "CNTLM Proxy Auth" -d %{_localstatedir}/run/%{name} -g nogroup \ %{_sbindir}/useradd -c "CNTLM Proxy Auth" -d %{_localstatedir}/run/%{name} -g nogroup \
-r -s /bin/false %{name} 2>/dev/null; -r -s /bin/false %{name};
fi fi
%if 0%{?suse_version} >= 1230 %if 0%{?suse_version} >= 1230
%service_add_pre %{name}.service %service_add_pre %{name}.service
@ -96,7 +97,7 @@ fi
%service_del_preun %{name}.service %service_del_preun %{name}.service
%endif %endif
#if [ "$1" -eq 0 ]; then #if [ "$1" -eq 0 ]; then
# %{_sbindir}/userdel %{name} 2>/dev/null # %{_sbindir}/userdel %{name}
#fi #fi
%post %post
@ -108,7 +109,7 @@ fi
%fillup_only %fillup_only
%service_add_post %{name}.service %service_add_post %{name}.service
%if 0%{?suse_version} <= 1320 %if 0%{?suse_version} <= 1320
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || : systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf || :
%else %else
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf %tmpfiles_create %{_tmpfilesdir}/%{name}.conf
%endif %endif