- Fix a mistake in the creation of /var/lib/pgsql/.bash_profile

with the tmpfiles mechanism (bsc#1159335).

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=120
This commit is contained in:
2019-12-17 10:48:51 +00:00
committed by Git OBS Bridge
parent e646e1cba3
commit b7322d4c9b
3 changed files with 15 additions and 1 deletions

View File

@@ -1,3 +1,3 @@
# For the PostgreSQL server's unix domain socket
d /run/postgresql 1775 postgres postgres - -
f /var/lib/pgsql/.bash_profile 0640 postgres postgres - /usr/share/postgresql/bash_profile
C /var/lib/pgsql/.bash_profile 0640 postgres postgres - /usr/share/postgresql/bash_profile

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Dec 17 10:27:02 UTC 2019 - Reinhard Max <max@suse.com>
- Fix a mistake in the creation of /var/lib/pgsql/.bash_profile
with the tmpfiles mechanism (bsc#1159335).
-------------------------------------------------------------------
Thu Nov 14 12:36:59 UTC 2019 - Reinhard Max <max@suse.com>

View File

@@ -325,6 +325,14 @@ fi
%post server
%fillup_only -n postgresql
%if %{with systemd}
PROFILE="/var/lib/pgsql/.bash_profile"
if test -r "$PROFILE" && test "`cat $PROFILE`" = "/usr/share/postgresql/bash_profile"
then
# Correct a mistake in /usr/lib/tmpfiles.d/postgresql.conf
# that created /var/lib/pgsql/.bash_profile with invalid
# content (bsc#1159335).
rm "$PROFILE"
fi
%tmpfiles_create %_tmpfilesdir/postgresql.conf
%service_add_post postgresql.service
%endif