cs10 does not fully support creating users from sysusers.d, user and group must be created via useradd/groupadd

Resolves: RHEL-144775
This commit is contained in:
Filip Janus 2026-01-28 09:52:55 +00:00
parent c45b83f47b
commit f615b3b0df

View File

@ -962,6 +962,12 @@ find_lang_bins pltcl.lst pltcl
install -m0644 -D postgresql18.sysusers.conf %{buildroot}%{_sysusersdir}/postgresql18.conf
install -m0644 -D postgresql18.tmpfiles.conf %{buildroot}%{_tmpfilesdir}/postgresql18.conf
%pre -n %{pkgname}-server
/usr/sbin/groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
/usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :
%post -n %{pkgname}-server
%systemd_post %service_name