SHA256
1
0
forked from pool/libteam

- Do not suppress errors from useradd

OBS-URL: https://build.opensuse.org/package/show/network/libteam?expand=0&rev=10
This commit is contained in:
Jan Engelhardt 2017-11-22 10:55:02 +00:00 committed by Git OBS Bridge
parent 199c9dfa9b
commit f8064cbc0e
2 changed files with 22 additions and 15 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Nov 22 10:54:50 UTC 2017 - jengelh@inai.de
- Do not suppress errors from useradd
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Nov 22 11:26:44 CET 2017 - ndas@suse.de Wed Nov 22 11:26:44 CET 2017 - ndas@suse.de

View File

@ -134,35 +134,37 @@ programs that will manipulate team network devices.
# Use CFLAGS= to kill -Werror # Use CFLAGS= to kill -Werror
make %{?_smp_mflags} CFLAGS="%optflags" make %{?_smp_mflags} CFLAGS="%optflags"
pushd binding/python/; pushd binding/python/
python ./setup.py build; python ./setup.py build
popd; popd
%install %install
b="%buildroot"; b="%buildroot"
make install DESTDIR="$b"; %make_install
pushd binding/python/; pushd binding/python/
python ./setup.py install --root="$b" --prefix="%_prefix"; python ./setup.py install --root="$b" --prefix="%_prefix"
popd; popd
rm -f "$b/%_libdir"/*.la rm -f "$b/%_libdir"/*.la
%if 0%{?_unitdir:1} %if 0%{?_unitdir:1}
mkdir -p "$b/%_unitdir"; mkdir -p "$b/%_unitdir"
install -pm0644 teamd/redhat/systemd/*.service "$b/%_unitdir/"; install -pm0644 teamd/redhat/systemd/*.service "$b/%_unitdir/"
%endif %endif
%if 0%{?_sysconfdir:1} %if 0%{?_sysconfdir:1}
mkdir -p "$b/%teamd_dbus_policy_directory/"; mkdir -p "$b/%teamd_dbus_policy_directory/"
install -pm0644 teamd/dbus/teamd.conf "$b/%teamd_dbus_policy_directory/%teamd_dbus_policy_name"; install -pm0644 teamd/dbus/teamd.conf "$b/%teamd_dbus_policy_directory/%teamd_dbus_policy_name"
%endif %endif
%check %check
make check make check
%pre tools %pre tools
%{_sbindir}/groupadd -r %teamd_group 2> /dev/null || : getent group daemon >/dev/null || %_sbindir/groupadd -r %teamd_group
%{_sbindir}/useradd -r -g %teamd_group -s /bin/false -c "Teamd daemon user" -d %{_localstatedir}/lib/empty %teamd_user 2> /dev/null || : getent passwd %teamd_user >/dev/null || \
%{_sbindir}/usermod -g %teamd_group %teamd_user 2>/dev/null || : %_sbindir/useradd -r -g %teamd_group -s /bin/false \
-c "Teamd daemon user" -d %{_localstatedir}/lib/empty %teamd_user
%_sbindir/usermod -g %teamd_group %teamd_user 2>/dev/null
test -L %teamd_daemon_directory || rm -rf %teamd_daemon_directory && : test -L %teamd_daemon_directory || rm -rf %teamd_daemon_directory && :
%if 0%{?_unitdir:1} %if 0%{?_unitdir:1}
%service_add_pre teamd@.service %service_add_pre teamd@.service