diff --git a/postgresql18.spec b/postgresql18.spec index f2690c1..82041d0 100644 --- a/postgresql18.spec +++ b/postgresql18.spec @@ -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