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

Bug 832183

Summary: dev-db/postgresql-12.9 fails to start when su is not installed
Product: Gentoo Linux Reporter: Jaak Ristioja <jaak>
Component: Current packagesAssignee: PgSQL Bugs <pgsql-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: sam, wgh
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=416783
https://github.com/gentoo/gentoo/pull/29550
https://github.com/gentoo/gentoo/pull/29648
https://github.com/gentoo/gentoo/pull/30761
Whiteboard:
Package list:
Runtime testing required: ---

Description Jaak Ristioja 2022-01-28 08:43:49 UTC
# /etc/init.d/postgresql-12 start
 * /run/postgresql: correcting mode
 * Starting PostgreSQL 12 ...
/etc/init.d/postgresql-12: line 89: su: command not found
 * Check the log for a possible explanation of the above error.
 * The log may be located at:
 *     /var/lib/postgresql/12/data/postmaster.log
 * Or wherever you configured PostgreSQL 12 to log.                       [ !! ]
 * ERROR: postgresql-12 failed to start

However, on this system there is no "su" installed due to sys-apps/util-linux[-su] and sys-apps/shadow[-su].
Comment 1 WGH 2022-03-27 23:57:15 UTC
This also affects the pkg_config in .ebuild (aka emerge --config)

 * Creating the data directory ...
 * Initializing the database ...
/var/tmp/portage/dev-db/postgresql-13.5/temp/environment: line 3012: su: command not found
mv: cannot stat '/var/lib/postgresql/13/data/pg_hba.conf': No such file or directory
mv: cannot stat '/var/lib/postgresql/13/data/pg_ident.conf': No such file or directory
mv: cannot stat '/var/lib/postgresql/13/data/postgresql.conf': No such file or directory
sed: can't read /etc/postgresql-13/postgresql.conf: No such file or directory
Comment 2 Gordon Pettey 2022-08-21 23:11:14 UTC
This is still a problem with the 13 and 14 versions. The package needs to depend on some provider of su if its init script use it, or the init scripts need to be rewritten to not use su.
Comment 3 Gordon Pettey 2022-08-31 13:29:21 UTC
Related, #416783 says at some point in the past the init scripts had been changed from ’su’ to ’start-stop-daemon’. That was apparently reverted at some point.
Comment 4 Gordon Pettey 2023-02-19 00:43:30 UTC
Submitted PR 29648 on GitHub to fix the pkg_config bit.