public inbox for [email protected]
help / color / mirror / Atom feedpatch postgres user .bash_profile
3+ messages / 2 participants
[nested] [flat]
* patch postgres user .bash_profile
@ 2017-12-08 11:17 Pierre-Alain TORET <[email protected]>
2017-12-10 19:21 ` Re: patch postgres user .bash_profile Devrim Gündüz <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Alain TORET @ 2017-12-08 11:17 UTC (permalink / raw)
To: pgsql-pkg-yum
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: patch postgres user .bash_profile
2017-12-08 11:17 patch postgres user .bash_profile Pierre-Alain TORET <[email protected]>
@ 2017-12-10 19:21 ` Devrim Gündüz <[email protected]>
2017-12-11 10:00 ` Re: patch postgres user .bash_profile Pierre-Alain TORET <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: Devrim Gündüz @ 2017-12-10 19:21 UTC (permalink / raw)
To: Pierre-Alain TORET <[email protected]>; pgsql-pkg-yum
Hi,
On Fri, 2017-12-08 at 06:17 -0500, Pierre-Alain TORET wrote:
> 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.
Thanks for the patch.
The policy is adding the binaries which are cross-version compatible under
$PATH (/usr/bin in this case), and keep others in their own directories. Your
patch will probably break the latter, because we want users to specify full
path of the "other" binaries, so that things won't be broken.
So, unfortunately I will reject this.
Regards,
--
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: patch postgres user .bash_profile
2017-12-08 11:17 patch postgres user .bash_profile Pierre-Alain TORET <[email protected]>
2017-12-10 19:21 ` Re: patch postgres user .bash_profile Devrim Gündüz <[email protected]>
@ 2017-12-11 10:00 ` Pierre-Alain TORET <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Pierre-Alain TORET @ 2017-12-11 10:00 UTC (permalink / raw)
To: Devrim Gündüz <[email protected]>; +Cc: pgsql-pkg-yum
Devrim,
>-------- Original Message --------
>Subject: Re: patch postgres user .bash_profile
>Local Time: 10 December 2017 8:21 PM
>UTC Time: 10 December 2017 19:21
>From: [email protected]
>To: Pierre-Alain TORET <[email protected]>, [email protected] <[email protected]>
>
>
> On Fri, 2017-12-08 at 06:17 -0500, Pierre-Alain TORET wrote:
>>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.
>>
>> Thanks for the patch.
>>
>> The policy is adding the binaries which are cross-version compatible under
>> $PATH (/usr/bin in this case), and keep others in their own directories. Your
>> patch will probably break the latter, because we want users to specify full
>> path of the "other" binaries, so that things won't be broken.
>>
>> So, unfortunately I will reject this.
>>
Thanks for your explanations, this makes perfect sense in rejecting this patch.
Sorry for the noise.
Regards,
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-12-11 10:00 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08 11:17 patch postgres user .bash_profile Pierre-Alain TORET <[email protected]>
2017-12-10 19:21 ` Devrim Gündüz <[email protected]>
2017-12-11 10:00 ` Pierre-Alain TORET <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox