Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 796344

Summary: >=dev-db/postgres-9 (various versions) fails in emerge --config when run as root
Product: Gentoo Linux Reporter: Martin Kletzander <mkletzan>
Component: Current packagesAssignee: PgSQL Bugs <pgsql-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mscardovi
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://github.com/gentoo/gentoo/pull/18332
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info output

Description Martin Kletzander 2021-06-16 11:51:17 UTC
Created attachment 716451 [details]
emerge --info output

Running emerge --config =dev-db/postgresql-13.3 as suggested by dev-db/postgresql's pkg_postinst() completes, but in the middle of the output there is this error message:

 * Creating the data directory ...
 * Initializing the database ...
could not change directory to "/var/tmp/portage/dev-db/postgresql-13.3/empty": Permission denied
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

It looks like the error message is harmless, but it suggests there's a bug in the ebuild.
Comment 1 Larry the Git Cow gentoo-dev 2021-07-07 00:41:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b642f661af8b1c7f35d6f6b36a28af173fc7c51f

commit b642f661af8b1c7f35d6f6b36a28af173fc7c51f
Author:     Aaron W. Swenson <titanofold@gentoo.org>
AuthorDate: 2021-07-07 00:38:38 +0000
Commit:     Aaron W. Swenson <titanofold@gentoo.org>
CommitDate: 2021-07-07 00:38:38 +0000

    dev-db/postgresql: Fix environment reset in pkg_config
    
    Without resetting the environment the config phase results in the following
    non-fatal error message being produced:
    
      could not change directory to "/var/tmp/portage/dev-db/postgresql-13.1/homedir": Permission denied
    
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Signed-off-by: Martin Kletzander <nert.pinx@gmail.com>
    Closes: https://bugs.gentoo.org/796344
    Closes: https://github.com/gentoo/gentoo/pull/18332
    Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org>

 dev-db/postgresql/postgresql-10.17.ebuild    | 2 +-
 dev-db/postgresql/postgresql-11.12.ebuild    | 2 +-
 dev-db/postgresql/postgresql-12.7.ebuild     | 2 +-
 dev-db/postgresql/postgresql-13.3.ebuild     | 2 +-
 dev-db/postgresql/postgresql-14_beta2.ebuild | 2 +-
 dev-db/postgresql/postgresql-9.6.22.ebuild   | 2 +-
 dev-db/postgresql/postgresql-9999.ebuild     | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)