# /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].
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
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.
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.
Submitted PR 29648 on GitHub to fix the pkg_config bit.