- properly guard the systemd macro in %pre server so it wont be

used on sle11
- add Requires(pre) so we have groupadd/useradd available

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=90
This commit is contained in:
2017-10-06 14:39:51 +00:00
committed by Git OBS Bridge
parent 2d1ca233eb
commit b13c8cb1c4
2 changed files with 14 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Oct 6 14:33:54 UTC 2017 - mrueckert@suse.de
- properly guard the systemd macro in %pre server so it wont be
used on sle11
- add Requires(pre) so we have groupadd/useradd available
-------------------------------------------------------------------
Thu Sep 21 07:59:26 UTC 2017 - max@suse.com

View File

@@ -69,6 +69,11 @@ Group: Productivity/Databases/Servers
Provides: postgresql-server-noarch = %version-%release
Requires: postgresql-server-implementation
Recommends: %defaultpackage-server
%if 0%{?suse_version} >= 1315
Requires(pre): shadow
%else
Requires(pre): pwdutils
%endif
Provides: postgresql-init = %version.0-%release
Obsoletes: postgresql-init < %version-%release
%if %{with systemd}
@@ -236,7 +241,9 @@ getent group postgres > /dev/null ||
getent passwd postgres > /dev/null ||
useradd -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
-c "PostgreSQL Server" -u 26 postgres
%if %{with systemd}
%service_add_pre postgresql.service
%endif
%post server
%fillup_only -n postgresql