Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 61200 - dspam-3.1.1 missing -U postgres in one call to psql setup
Summary: dspam-3.1.1 missing -U postgres in one call to psql setup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Lim Swee Tat (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-21 14:50 UTC by Jeff Kowalczyk
Modified: 2004-08-22 09:53 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Kowalczyk 2004-08-21 14:50:10 UTC
After emerging dspam-3.1.1, running the ebuild config has the following error:

# ebuild /var/db/pkg/mail-filter/dspam-3.1.1/dspam-3.1.1.ebuild config
postgres
 * When prompted for a password, please enter your PgSQL postgres password
 *
 * Creating DSPAM PostgreSQL user "dspam"
 * Creating DSPAM PostgreSQL database "dspam"
 * Getting DSPAM PostgreSQL userid for "dspam"
 *   UserID: 100
 * Getting DSPAM PostgreSQL databaseid for "dspam"
 *   DBID: 1
 * Changing owner of DSPAM PostgreSQL database "dspam" to "dspam"
 * Creating DSPAM PostgreSQL tables
 * Grant privileges to DSPAM PostgreSQL objects to "dspam"
psql: FATAL:  user "root" does not exist

There is a missing '-U postgres' in the config calls to psql. Applying the following one-line diff will allow the config to complete without error. This should be applied to the original ebuild.

# diff -u /usr/portage/mail-filter/dspam/dspam-3.1.1.ebuild  /var/db/pkg/mail-filter/dspam-3.1.1/dspam-3.1.1.ebuild
--- /usr/portage/mail-filter/dspam/dspam-3.1.1.ebuild   2004-08-21 13:12:21.000000000 -0500
+++ /var/db/pkg/mail-filter/dspam-3.1.1/dspam-3.1.1.ebuild      2004-08-21 17:52:53.655031232 -0500
@@ -369,7 +369,7 @@
                PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${CONFIGDIR}/pgsql_virtual_users.sql 1>/dev/null 2>&1

                einfo "Grant privileges to DSPAM PostgreSQL objects to \"${DSPAM_PgSQL_USER}\""
-               for foo in $(/usr/bin/psql -t -d ${DSPAM_PgSQL_DB} -c "SELECT tablename FROM pg_tables WHERE tablename LIKE 'dspam\%';")
+               for foo in $(/usr/bin/psql -t -d ${DSPAM_PgSQL_DB} -U postgres -c "SELECT tablename FROM pg_tables WHERE tablename LIKE 'dspam\%';")
                do
                        /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U postgres -c "GRANT ALL PRIVILEGES ON TABLE ${foo} TO ${DSPAM_PgSQL_USER};" 1>/dev/null 2>&1
                done


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Lim Swee Tat (RETIRED) gentoo-dev 2004-08-22 09:53:00 UTC
Hi,
  Thanx for the fix.  Committing now.

Ciao
ST Lim