From: Devrim Gunduz Date: Tue, 23 Sep 2025 18:30:25 +0000 (+0300) Subject: Revert "PostgreSQL 19: Remove .bash_profile. Per https://redmine.postgresql.org/issue... X-Git-Url: http://git.postgresql.org/gitweb/edit?a=commitdiff_plain;h=3c68129173c3af284f473b8bcb2f9fa2669f4916;p=pgrpms.git Revert "PostgreSQL 19: Remove .bash_profile. Per https://redmine.postgresql.org/issues/7854" This reverts commit af10bc71a9d7f66db273fa28d290f1114e321b2b. --- diff --git a/rpm/redhat/main/non-common/postgresql-19/main/postgresql-19.spec b/rpm/redhat/main/non-common/postgresql-19/main/postgresql-19.spec index 4da34be1e..5a582481e 100644 --- a/rpm/redhat/main/non-common/postgresql-19/main/postgresql-19.spec +++ b/rpm/redhat/main/non-common/postgresql-19/main/postgresql-19.spec @@ -46,9 +46,9 @@ Version: 19 %if 0%{?suse_version} >= 1500 # SuSE upstream packages have release numbers like 150200.5.19.1 # which overrides our packages. Increase our release number on SuSE. -Release: alpha_%{pgdg_build_timestamp}_PGDG%{?dist}.1 +Release: alpha_%{pgdg_build_timestamp}_PGDG%{?dist} %else -Release: alpha_%{pgdg_build_timestamp}_PGDG%{?dist}.1 +Release: alpha_%{pgdg_build_timestamp}_PGDG%{?dist} %endif License: PostgreSQL Url: https://www.postgresql.org/ @@ -834,6 +834,19 @@ if [ $1 -eq 1 ] ; then %endif fi +# postgres' .bash_profile. +# We now don't install .bash_profile as we used to in pre 9.0. Instead, use cat, +# so that package manager will be happy during upgrade to new major version. +echo "[ -f /etc/profile ] && source /etc/profile +PGDATA=/var/lib/pgsql/%{pgmajorversion}/data +export PGDATA +# If you want to customize your settings, +# Use the file below. This is not overridden +# by the RPMS. +[ -f /var/lib/pgsql/.pgsql_profile ] && source /var/lib/pgsql/.pgsql_profile" > /var/lib/pgsql/.bash_profile +chown postgres: /var/lib/pgsql/.bash_profile +chmod 700 /var/lib/pgsql/.bash_profile + %preun server if [ $1 -eq 0 ] ; then # Package removal, not upgrade