From f615b3b0dff5e6cc2ac6c000f33cfe7911318e0e Mon Sep 17 00:00:00 2001 From: Filip Janus Date: Wed, 28 Jan 2026 09:52:55 +0000 Subject: [PATCH] cs10 does not fully support creating users from sysusers.d, user and group must be created via useradd/groupadd Resolves: RHEL-144775 --- postgresql18.spec | 6 ++++++ 1 file changed, 6 insertions(+) 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