Trying to do 'ebuild postgresql.ebuild config' complains about root not being in the sudoers file. Why would root have to be in the sudoers file? Reproducible: Always Steps to Reproduce: 1. emerge postgresql 2. ebuild /var/db/pkg/dev-db/postgresql-7.4.2-r1/postgresql-7.4.2-r1.ebuild config Actual Results: morpheus root # ebuild /var/db/pkg/dev-db/postgresql-7.4.2-r1/postgresql-7.4.2-r1.ebuild config * Creating the data directory ... * Initializing the database ... root is not in the sudoers file. This incident will be reported. Expected Results: It shouldn't complain about root not being in the sudoers file. Perhaps the problem is occuring as a consequence of running ebuild as root. morpheus root # grep sudo /var/db/pkg/dev-db/postgresql-7.4.2-r1/postgresql-7.4.2-r1.ebuild app-admin/sudo sudo -u postgres /usr/bin/initdb --pgdata ${PG_DIR}/data This seems faulty, as it (afaik) requires a speciel setup of the sudoers file.
By default root should be in /etc/sudoers, what version of sudo are you using and was it installed as a dependency of postgres or was it already installed on your box?
I believe sudo was installed on it self. I might have made changes to the sudoers file that removed root from it. The relevant line from my sudoers file is: #root ALL=(ALL) ALL I guess I've just fubar'ed my sudoers file. Perhaps it would be an idea to use 'su -c' instead of sudo?
I think we should use su instead of sudo. I'm one of the current postgresql maintainers in gentoo but I'm not sure why the ebuild uses sudo since it was made by the previous dev. If no one objects about this, I'll change it.
I've fixed this problem in postgresql-7.3.6-r2/postgresql-7.4.3-r1.