diff --git a/postgresql-bashprofile b/postgresql-bashprofile new file mode 100644 index 0000000..289318f --- /dev/null +++ b/postgresql-bashprofile @@ -0,0 +1,6 @@ + +# Get PGDATA from /etc/sysconfig/postgresql +if test -f /etc/sysconfig/postgresql; then + eval eval $(sed -n '/^POSTGRES_DATADIR=/s//PGDATA=/p' /etc/sysconfig/postgresql) + export PGDATA +fi diff --git a/postgresql.spec b/postgresql.spec index 4b2fc49..1fd1142 100644 --- a/postgresql.spec +++ b/postgresql.spec @@ -157,6 +157,7 @@ and triggers. echo "This is a dummy package to provide a dependency on the default PostgreSQL version." > README %install +mkdir -p %buildroot/var/lib/pgsql/ sed 's,@LIBDIR@,%_libdir,g' %{SOURCE} > \ %buildroot/var/lib/pgsql/.bash_profile @@ -165,8 +166,8 @@ sed 's,@LIBDIR@,%_libdir,g' %{SOURCE} > \ %doc README %files server -%defattr(-,root,root,-) -%doc README +%attr(-,root,root,-) README +%attr(750, postgres, postgres) %dir /var/lib/pgsql %attr(640,postgres,postgres) %config(noreplace) /var/lib/pgsql/.bash_profile %files docs