public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pierre-Alain TORET <[email protected]>
To: [email protected] <[email protected]>
Subject: patch postgres user .bash_profile
Date: Fri, 08 Dec 2017 06:17:12 -0500
Message-ID: <fLXGhRZhBFT18F4i-ds5OEhseUBpoqdf5zqvaszpQyR-4Ce2-g46xZhH_5C3xcFCyAZT-R0VAiJBNBekE9bfuVgJGs7wkbapefzjgGIEE3A=@protonmail.com> (raw)

​Hello,

First, thanks a lot for the packaging job you're doing with PostgreSQL :)

I'm sending you a little patch to improve a the usability of the user postgres by adding the binaries to the PATH variable in its .bash_profile.

Don't hesitate to comment or criticize but I think it will make the life of user easier, especially those installing the package for the first time.

I modified the file called postgresql-10-bashprofile, but from what I've seen it's not used yet in the spec file.

Regards,


Attachments:

  [text/x-patch] 0001-Add-the-path-to-binaries-to-postgres-user-.bash_prof.patch (11.7K, 2-0001-Add-the-path-to-binaries-to-postgres-user-.bash_prof.patch)
  download | inline diff:
From b34f6f24d9dad1c383e2ad975d202d09ede180a4 Mon Sep 17 00:00:00 2001
From: Pierre-Alain TORET <[email protected]>
Date: Fri, 8 Dec 2017 11:37:36 +0100
Subject: [PATCH] Add the path to binaries to postgres user .bash_profile

Signed-off-by: Pierre-Alain TORET <[email protected]>
---
 rpm/redhat/10/postgresql/master/postgresql-10-bashprofile | 2 ++
 rpm/redhat/9.2/postgresql/EL-5/postgresql-9.2.spec        | 2 ++
 rpm/redhat/9.2/postgresql/EL-6/postgresql-9.2.spec        | 2 ++
 rpm/redhat/9.2/postgresql/EL-7/postgresql-9.2.spec        | 2 ++
 rpm/redhat/9.3/postgresql/EL-5/postgresql-9.3.spec        | 2 ++
 rpm/redhat/9.3/postgresql/EL-6/postgresql-9.3.spec        | 2 ++
 rpm/redhat/9.3/postgresql/EL-7/postgresql-9.3.spec        | 2 ++
 rpm/redhat/9.4/postgresql/EL-5/postgresql-9.4.spec        | 2 ++
 rpm/redhat/9.4/postgresql/EL-6/postgresql-9.4.spec        | 2 ++
 rpm/redhat/9.4/postgresql/EL-7/postgresql-9.4.spec        | 2 ++
 rpm/redhat/9.4/postgresql/F-24/postgresql-9.4.spec        | 2 ++
 rpm/redhat/9.4/postgresql/F-25/postgresql-9.4.spec        | 2 ++
 rpm/redhat/9.4/postgresql/F-26/postgresql-9.4.spec        | 2 ++
 rpm/redhat/9.4/postgresql/F-27/postgresql-9.4.spec        | 2 ++
 rpm/redhat/9.5/postgresql/master/postgresql-9.5.spec      | 2 ++
 rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec      | 2 ++
 16 files changed, 32 insertions(+)

diff --git a/rpm/redhat/10/postgresql/master/postgresql-10-bashprofile b/rpm/redhat/10/postgresql/master/postgresql-10-bashprofile
index 138d2d211..fc68ecf41 100644
--- a/rpm/redhat/10/postgresql/master/postgresql-10-bashprofile
+++ b/rpm/redhat/10/postgresql/master/postgresql-10-bashprofile
@@ -1,5 +1,7 @@
 [ -f /etc/profile ] && source /etc/profile
 
+PATH=/usr/pgsql-10/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/10/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.2/postgresql/EL-5/postgresql-9.2.spec b/rpm/redhat/9.2/postgresql/EL-5/postgresql-9.2.spec
index 03965a0fe..384e13a5d 100644
--- a/rpm/redhat/9.2/postgresql/EL-5/postgresql-9.2.spec
+++ b/rpm/redhat/9.2/postgresql/EL-5/postgresql-9.2.spec
@@ -527,6 +527,8 @@ chkconfig --add postgresql-9.2
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.2/postgresql/EL-6/postgresql-9.2.spec b/rpm/redhat/9.2/postgresql/EL-6/postgresql-9.2.spec
index 38d9c21e1..6dd663fa6 100644
--- a/rpm/redhat/9.2/postgresql/EL-6/postgresql-9.2.spec
+++ b/rpm/redhat/9.2/postgresql/EL-6/postgresql-9.2.spec
@@ -532,6 +532,8 @@ chkconfig --add postgresql-%{majorversion}
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.2/postgresql/EL-7/postgresql-9.2.spec b/rpm/redhat/9.2/postgresql/EL-7/postgresql-9.2.spec
index 508d18b74..0e6896510 100644
--- a/rpm/redhat/9.2/postgresql/EL-7/postgresql-9.2.spec
+++ b/rpm/redhat/9.2/postgresql/EL-7/postgresql-9.2.spec
@@ -589,6 +589,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.3/postgresql/EL-5/postgresql-9.3.spec b/rpm/redhat/9.3/postgresql/EL-5/postgresql-9.3.spec
index 4dfb406d8..e08dee225 100644
--- a/rpm/redhat/9.3/postgresql/EL-5/postgresql-9.3.spec
+++ b/rpm/redhat/9.3/postgresql/EL-5/postgresql-9.3.spec
@@ -529,6 +529,8 @@ chkconfig --add postgresql-9.3
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.3/postgresql/EL-6/postgresql-9.3.spec b/rpm/redhat/9.3/postgresql/EL-6/postgresql-9.3.spec
index b2f3479a5..832ee230b 100644
--- a/rpm/redhat/9.3/postgresql/EL-6/postgresql-9.3.spec
+++ b/rpm/redhat/9.3/postgresql/EL-6/postgresql-9.3.spec
@@ -534,6 +534,8 @@ chkconfig --add postgresql-9.3
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.3/postgresql/EL-7/postgresql-9.3.spec b/rpm/redhat/9.3/postgresql/EL-7/postgresql-9.3.spec
index 4f34cdfbd..361adbf22 100644
--- a/rpm/redhat/9.3/postgresql/EL-7/postgresql-9.3.spec
+++ b/rpm/redhat/9.3/postgresql/EL-7/postgresql-9.3.spec
@@ -592,6 +592,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.4/postgresql/EL-5/postgresql-9.4.spec b/rpm/redhat/9.4/postgresql/EL-5/postgresql-9.4.spec
index def253969..c2a946560 100644
--- a/rpm/redhat/9.4/postgresql/EL-5/postgresql-9.4.spec
+++ b/rpm/redhat/9.4/postgresql/EL-5/postgresql-9.4.spec
@@ -530,6 +530,8 @@ chkconfig --add postgresql-%{majorversion}
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.4/postgresql/EL-6/postgresql-9.4.spec b/rpm/redhat/9.4/postgresql/EL-6/postgresql-9.4.spec
index 4790f8e60..4e8a21c99 100644
--- a/rpm/redhat/9.4/postgresql/EL-6/postgresql-9.4.spec
+++ b/rpm/redhat/9.4/postgresql/EL-6/postgresql-9.4.spec
@@ -535,6 +535,8 @@ chkconfig --add postgresql-%{majorversion}
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.4/postgresql/EL-7/postgresql-9.4.spec b/rpm/redhat/9.4/postgresql/EL-7/postgresql-9.4.spec
index 2c587e61f..b34eec0d6 100644
--- a/rpm/redhat/9.4/postgresql/EL-7/postgresql-9.4.spec
+++ b/rpm/redhat/9.4/postgresql/EL-7/postgresql-9.4.spec
@@ -600,6 +600,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.4/postgresql/F-24/postgresql-9.4.spec b/rpm/redhat/9.4/postgresql/F-24/postgresql-9.4.spec
index 2e1f174b1..64f50ce28 100644
--- a/rpm/redhat/9.4/postgresql/F-24/postgresql-9.4.spec
+++ b/rpm/redhat/9.4/postgresql/F-24/postgresql-9.4.spec
@@ -600,6 +600,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.4/postgresql/F-25/postgresql-9.4.spec b/rpm/redhat/9.4/postgresql/F-25/postgresql-9.4.spec
index fe8976927..6c6312cd4 100644
--- a/rpm/redhat/9.4/postgresql/F-25/postgresql-9.4.spec
+++ b/rpm/redhat/9.4/postgresql/F-25/postgresql-9.4.spec
@@ -599,6 +599,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.4/postgresql/F-26/postgresql-9.4.spec b/rpm/redhat/9.4/postgresql/F-26/postgresql-9.4.spec
index 2e1f174b1..64f50ce28 100644
--- a/rpm/redhat/9.4/postgresql/F-26/postgresql-9.4.spec
+++ b/rpm/redhat/9.4/postgresql/F-26/postgresql-9.4.spec
@@ -600,6 +600,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.4/postgresql/F-27/postgresql-9.4.spec b/rpm/redhat/9.4/postgresql/F-27/postgresql-9.4.spec
index 2e1f174b1..64f50ce28 100644
--- a/rpm/redhat/9.4/postgresql/F-27/postgresql-9.4.spec
+++ b/rpm/redhat/9.4/postgresql/F-27/postgresql-9.4.spec
@@ -600,6 +600,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.5/postgresql/master/postgresql-9.5.spec b/rpm/redhat/9.5/postgresql/master/postgresql-9.5.spec
index b6136d4fb..20e28d9a3 100644
--- a/rpm/redhat/9.5/postgresql/master/postgresql-9.5.spec
+++ b/rpm/redhat/9.5/postgresql/master/postgresql-9.5.spec
@@ -939,6 +939,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{majorversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{majorversion}/data
 export PGDATA
 # If you want to customize your settings,
diff --git a/rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec b/rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec
index 10d6fdb19..a396fb3c8 100644
--- a/rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec
+++ b/rpm/redhat/9.6/postgresql/master/postgresql-9.6.spec
@@ -925,6 +925,8 @@ fi
 # 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
+PATH=/usr/pgsql-%{pgpackageversion}/bin/:$PATH
+export PATH
 PGDATA=/var/lib/pgsql/%{pgpackageversion}/data
 export PGDATA
 # If you want to customize your settings,
-- 
2.14.3



view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: patch postgres user .bash_profile
  In-Reply-To: <fLXGhRZhBFT18F4i-ds5OEhseUBpoqdf5zqvaszpQyR-4Ce2-g46xZhH_5C3xcFCyAZT-R0VAiJBNBekE9bfuVgJGs7wkbapefzjgGIEE3A=@protonmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox