Add sysusers configuration for PostgreSQL 16
- Add postgresql16.sysusers.conf with postgres user definition - Install sysusers configuration file Resolves: RHEL-126140
This commit is contained in:
parent
d05d82a306
commit
e21caced6c
@ -48,7 +48,7 @@
|
|||||||
Summary: PostgreSQL client programs
|
Summary: PostgreSQL client programs
|
||||||
Name: %{majorname}%{majorversion}
|
Name: %{majorname}%{majorversion}
|
||||||
Version: %{majorversion}.10
|
Version: %{majorversion}.10
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
|
|
||||||
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
|
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
|
||||||
# recognizes it as an independent license, so we do as well.
|
# recognizes it as an independent license, so we do as well.
|
||||||
@ -542,6 +542,10 @@ find . -type f -name Makefile -exec sed -i -e "s/SO_MAJOR_VERSION=\s\?\([0-9]\+\
|
|||||||
# remove .gitignore files to ensure none get into the RPMs (bug #642210)
|
# remove .gitignore files to ensure none get into the RPMs (bug #642210)
|
||||||
find . -type f -name .gitignore | xargs rm
|
find . -type f -name .gitignore | xargs rm
|
||||||
|
|
||||||
|
cat >postgresql16.sysusers.conf <<EOF
|
||||||
|
u postgres 26 'PostgreSQL Server' /var/lib/pgsql /bin/bash
|
||||||
|
EOF
|
||||||
|
|
||||||
cat > postgresql16.tmpfiles.conf <<EOF
|
cat > postgresql16.tmpfiles.conf <<EOF
|
||||||
d /var/lib/pgsql 0700 postgres postgres -
|
d /var/lib/pgsql 0700 postgres postgres -
|
||||||
EOF
|
EOF
|
||||||
@ -954,6 +958,8 @@ find_lang_bins pltcl.lst pltcl
|
|||||||
|
|
||||||
install -m0644 -D postgresql16.tmpfiles.conf %{buildroot}%{_tmpfilesdir}/postgresql16.conf
|
install -m0644 -D postgresql16.tmpfiles.conf %{buildroot}%{_tmpfilesdir}/postgresql16.conf
|
||||||
|
|
||||||
|
install -m0644 -D postgresql16.sysusers.conf %{buildroot}%{_sysusersdir}/postgresql16.conf
|
||||||
|
|
||||||
%pre -n %{pkgname}-server
|
%pre -n %{pkgname}-server
|
||||||
/usr/sbin/groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
|
/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 \
|
/usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
|
||||||
@ -1244,6 +1250,7 @@ make -C postgresql-setup-%{setup_version} check
|
|||||||
%config(noreplace) /etc/pam.d/postgresql
|
%config(noreplace) /etc/pam.d/postgresql
|
||||||
%endif
|
%endif
|
||||||
%{_tmpfilesdir}/postgresql16.conf
|
%{_tmpfilesdir}/postgresql16.conf
|
||||||
|
%{_sysusersdir}/postgresql16.conf
|
||||||
|
|
||||||
|
|
||||||
%files -n %{pkgname}-server-devel -f devel.lst
|
%files -n %{pkgname}-server-devel -f devel.lst
|
||||||
@ -1341,6 +1348,10 @@ make -C postgresql-setup-%{setup_version} check
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 10 2025 Filip Janus <fjanus@redhat.com> - 16.10-3
|
||||||
|
- Add tmpfiles.d configuration for PostgreSQL 16
|
||||||
|
- Ensures proper directory permissions for /var/lib/pgsql
|
||||||
|
|
||||||
* Wed Oct 1 2025 Filip Janus <fjanus@redhat.com> - 16.10-2
|
* Wed Oct 1 2025 Filip Janus <fjanus@redhat.com> - 16.10-2
|
||||||
- Add OpenSSL support to upgrade_configure function
|
- Add OpenSSL support to upgrade_configure function
|
||||||
- This ensures upgrade server is compiled with OpenSSL support
|
- This ensures upgrade server is compiled with OpenSSL support
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user