Accepting request 766656 from server:database:postgresql

- Fix a mistake in the creation of /var/lib/pgsql/.bash_profile
  with the tmpfiles mechanism (bsc#1159335).

- Sync ownership of /run/postgresql in the file list with tmpfiles.

- bump to 12

OBS-URL: https://build.opensuse.org/request/show/766656
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/postgresql?expand=0&rev=56
This commit is contained in:
Dominique Leuenberger 2020-01-28 09:45:39 +00:00 committed by Git OBS Bridge
commit 0a1f05a885
3 changed files with 28 additions and 5 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,19 @@
-------------------------------------------------------------------
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>
- Sync ownership of /run/postgresql in the file list with tmpfiles.
-------------------------------------------------------------------
Tue Oct 22 13:08:50 UTC 2019 - Marcus Rueckert <mrueckert@suse.de>
- bump to 12
-------------------------------------------------------------------
Mon Oct 7 08:26:39 UTC 2019 - Reinhard Max <max@suse.com>

View File

@ -32,7 +32,7 @@ Name: postgresql
Summary: Basic Clients and Utilities for PostgreSQL
License: PostgreSQL
Group: Productivity/Databases/Tools
Version: 11
Version: 12
Release: 0
Url: https://www.postgresql.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -268,7 +268,6 @@ echo "This is a dummy package to provide a dependency on the default PostgreSQL
%install
mkdir -p %buildroot/var/lib/pgsql/
mkdir -p %buildroot/var/run/postgresql
install -m755 -d %buildroot%{_fillupdir}
install -m644 %{S:1} %buildroot%{_fillupdir}/sysconfig.postgresql
@ -326,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
@ -393,10 +400,10 @@ fi
%_tmpfilesdir/postgresql.conf
%_unitdir/
/usr/share/postgresql/postgresql-script
%ghost %dir %attr(1775,root,root) /run/postgresql
%ghost %dir %attr(1775,postgres,postgres) /run/postgresql
%else
%config /etc/init.d/postgresql
%dir %attr(1775,root,root) /var/run/postgresql
%dir %attr(1775,postgres,postgres) /var/run/postgresql
%endif
%files test