Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796344 - >=dev-db/postgres-9 (various versions) fails in emerge --config when run as root
Summary: >=dev-db/postgres-9 (various versions) fails in emerge --config when run as root
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-06-16 11:51 UTC by Martin Kletzander
Modified: 2021-07-07 00:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge-info.txt,8.21 KB, text/plain)
2021-06-16 11:51 UTC, Martin Kletzander
Details

Note You need to log in before you can comment on or make changes to this bug.
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(-)