Accepting request 686235 from home:jengelh:branches:multimedia:apps

- Transform bash-specific sh code to POSIX sh in scriptlets.
- Do not hide errors from useradd.
- Reduce hard scriptlet dependency on systemd;
  %service_* does not need it.

OBS-URL: https://build.opensuse.org/request/show/686235
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/shairport-sync?expand=0&rev=9
This commit is contained in:
Hillwood Yang 2019-03-19 02:48:44 +00:00 committed by Git OBS Bridge
parent d6af963bb9
commit f6a83a620d
2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Mar 18 21:21:48 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Transform bash-specific sh code to POSIX sh in scriptlets.
- Do not hide errors from useradd.
- Reduce hard scriptlet dependency on systemd;
%service_* does not need it.
-------------------------------------------------------------------
Sun Feb 10 10:27:18 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

@ -34,7 +34,7 @@ BuildRequires: firewall-macros
BuildRequires: gcc-c++
BuildRequires: gnome-common
BuildRequires: pkgconfig
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(avahi-client)
BuildRequires: pkgconfig(libconfig)
@ -44,9 +44,10 @@ BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(popt)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(soxr)
BuildRequires: pkgconfig(systemd)
Requires: firewalld
Requires(pre): shadow
%{?systemd_requires}
%{?systemd_ordering}
%description
Shairport Sync is an AirPlay audio player it plays audio streamed from iTunes,
@ -88,10 +89,10 @@ mkdir -p %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%pre
getent group %{name} &>/dev/null || %{_sbindir}/groupadd --system %{name} >/dev/null
getent passwd %{name} &> /dev/null || %{_sbindir}/useradd --system -c "%{name} User" \
getent group %{name} >/dev/null || %{_sbindir}/groupadd --system %{name}
getent passwd %{name} >/dev/null || %{_sbindir}/useradd --system -c "%{name} User" \
-d %{_localstatedir}/%{name} -m -g %{name} -s %{_sbindir}/nologin \
-G audio %{name} >/dev/null
-G audio %{name}
%service_add_pre %{name}.service
%post