1 |
commit: b642f661af8b1c7f35d6f6b36a28af173fc7c51f |
2 |
Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 7 00:38:38 2021 +0000 |
4 |
Commit: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 7 00:38:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b642f661 |
7 |
|
8 |
dev-db/postgresql: Fix environment reset in pkg_config |
9 |
|
10 |
Without resetting the environment the config phase results in the following |
11 |
non-fatal error message being produced: |
12 |
|
13 |
could not change directory to "/var/tmp/portage/dev-db/postgresql-13.1/homedir": Permission denied |
14 |
|
15 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
16 |
Signed-off-by: Martin Kletzander <nert.pinx <AT> gmail.com> |
17 |
Closes: https://bugs.gentoo.org/796344 |
18 |
Closes: https://github.com/gentoo/gentoo/pull/18332 |
19 |
Signed-off-by: Aaron W. Swenson <titanofold <AT> gentoo.org> |
20 |
|
21 |
dev-db/postgresql/postgresql-10.17.ebuild | 2 +- |
22 |
dev-db/postgresql/postgresql-11.12.ebuild | 2 +- |
23 |
dev-db/postgresql/postgresql-12.7.ebuild | 2 +- |
24 |
dev-db/postgresql/postgresql-13.3.ebuild | 2 +- |
25 |
dev-db/postgresql/postgresql-14_beta2.ebuild | 2 +- |
26 |
dev-db/postgresql/postgresql-9.6.22.ebuild | 2 +- |
27 |
dev-db/postgresql/postgresql-9999.ebuild | 2 +- |
28 |
7 files changed, 7 insertions(+), 7 deletions(-) |
29 |
|
30 |
diff --git a/dev-db/postgresql/postgresql-10.17.ebuild b/dev-db/postgresql/postgresql-10.17.ebuild |
31 |
index 866e2d6f698..7723abe2353 100644 |
32 |
--- a/dev-db/postgresql/postgresql-10.17.ebuild |
33 |
+++ b/dev-db/postgresql/postgresql-10.17.ebuild |
34 |
@@ -391,7 +391,7 @@ pkg_config() { |
35 |
einfo "Initializing the database ..." |
36 |
|
37 |
if [[ ${EUID} == 0 ]] ; then |
38 |
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
39 |
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
40 |
else |
41 |
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} |
42 |
fi |
43 |
|
44 |
diff --git a/dev-db/postgresql/postgresql-11.12.ebuild b/dev-db/postgresql/postgresql-11.12.ebuild |
45 |
index 5a20556a0fe..07aed06687c 100644 |
46 |
--- a/dev-db/postgresql/postgresql-11.12.ebuild |
47 |
+++ b/dev-db/postgresql/postgresql-11.12.ebuild |
48 |
@@ -388,7 +388,7 @@ pkg_config() { |
49 |
einfo "Initializing the database ..." |
50 |
|
51 |
if [[ ${EUID} == 0 ]] ; then |
52 |
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
53 |
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
54 |
else |
55 |
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} |
56 |
fi |
57 |
|
58 |
diff --git a/dev-db/postgresql/postgresql-12.7.ebuild b/dev-db/postgresql/postgresql-12.7.ebuild |
59 |
index c6cea755c81..82e066d4d05 100644 |
60 |
--- a/dev-db/postgresql/postgresql-12.7.ebuild |
61 |
+++ b/dev-db/postgresql/postgresql-12.7.ebuild |
62 |
@@ -388,7 +388,7 @@ pkg_config() { |
63 |
einfo "Initializing the database ..." |
64 |
|
65 |
if [[ ${EUID} == 0 ]] ; then |
66 |
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
67 |
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
68 |
else |
69 |
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} |
70 |
fi |
71 |
|
72 |
diff --git a/dev-db/postgresql/postgresql-13.3.ebuild b/dev-db/postgresql/postgresql-13.3.ebuild |
73 |
index 9b8485c9bc0..d71750a1cb7 100644 |
74 |
--- a/dev-db/postgresql/postgresql-13.3.ebuild |
75 |
+++ b/dev-db/postgresql/postgresql-13.3.ebuild |
76 |
@@ -388,7 +388,7 @@ pkg_config() { |
77 |
einfo "Initializing the database ..." |
78 |
|
79 |
if [[ ${EUID} == 0 ]] ; then |
80 |
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
81 |
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
82 |
else |
83 |
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} |
84 |
fi |
85 |
|
86 |
diff --git a/dev-db/postgresql/postgresql-14_beta2.ebuild b/dev-db/postgresql/postgresql-14_beta2.ebuild |
87 |
index 0ef0e4f1672..a9630c760e8 100644 |
88 |
--- a/dev-db/postgresql/postgresql-14_beta2.ebuild |
89 |
+++ b/dev-db/postgresql/postgresql-14_beta2.ebuild |
90 |
@@ -390,7 +390,7 @@ pkg_config() { |
91 |
einfo "Initializing the database ..." |
92 |
|
93 |
if [[ ${EUID} == 0 ]] ; then |
94 |
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
95 |
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
96 |
else |
97 |
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} |
98 |
fi |
99 |
|
100 |
diff --git a/dev-db/postgresql/postgresql-9.6.22.ebuild b/dev-db/postgresql/postgresql-9.6.22.ebuild |
101 |
index 81db6bcb359..6ef13fcda3a 100644 |
102 |
--- a/dev-db/postgresql/postgresql-9.6.22.ebuild |
103 |
+++ b/dev-db/postgresql/postgresql-9.6.22.ebuild |
104 |
@@ -411,7 +411,7 @@ pkg_config() { |
105 |
einfo "Initializing the database ..." |
106 |
|
107 |
if [[ ${EUID} == 0 ]] ; then |
108 |
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
109 |
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
110 |
else |
111 |
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} |
112 |
fi |
113 |
|
114 |
diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild |
115 |
index e83be695c51..106cb9fb88f 100644 |
116 |
--- a/dev-db/postgresql/postgresql-9999.ebuild |
117 |
+++ b/dev-db/postgresql/postgresql-9999.ebuild |
118 |
@@ -402,7 +402,7 @@ pkg_config() { |
119 |
einfo "Initializing the database ..." |
120 |
|
121 |
if [[ ${EUID} == 0 ]] ; then |
122 |
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
123 |
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
124 |
else |
125 |
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} |
126 |
fi |