Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49864 - dev-db/postgresql - pkg_config should allow passing options to initdb
Summary: dev-db/postgresql - pkg_config should allow passing options to initdb
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
: 114988 154638 (view as bug list)
Depends on:
Blocks: 183764
  Show dependency tree
 
Reported: 2004-05-03 10:23 UTC by Matthias Foerste
Modified: 2010-02-09 23:02 UTC (History)
7 users (show)

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


Attachments
suggested patch against postgresql-7.4.2-r1.ebuild (postgresql-7.4.2-r1.ebuild.initdb-opts.diff,603 bytes, patch)
2004-05-03 10:25 UTC, Matthias Foerste
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Foerste 2004-05-03 10:23:12 UTC
I think of an option to do something like

# PG_INITDB_OPTS='-W' ebuild /var/db/pgk/postgresql-x.y.z/postgresql-x.y.z.ebuild config

so that one can set a password or pass any other options to initdb when initializing the db environment via the ebuilds config function

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Matthias Foerste 2004-05-03 10:25:22 UTC
Created attachment 30621 [details, diff]
suggested patch against postgresql-7.4.2-r1.ebuild
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-12-10 07:08:16 UTC
This is still not possible with current ebuilds, someone please have a look.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-11-10 00:05:29 UTC
*** Bug 154638 has been marked as a duplicate of this bug. ***
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-03-03 19:51:02 UTC
*** Bug 114988 has been marked as a duplicate of this bug. ***
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-03-23 22:06:17 UTC
*** Bug 214438 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2008-03-23 23:53:02 UTC
*** Bug 214438 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2008-03-24 08:05:42 UTC
*** Bug 214438 has been marked as a duplicate of this bug. ***
Comment 8 Tiziano Müller (RETIRED) gentoo-dev 2008-06-07 20:27:54 UTC
Done in dev-db/postgresql-server.
Cheers
Comment 9 Charlie 2008-07-31 06:08:58 UTC
Please reopen this bug

Passing the PGDATA or/and PG_INITDB_OPTS to emerge --config doesn't work as expected.
If you intsall the package and then set any or both variables and try to emerge --config postgres, the script will always tell you that PG_INITDB_OPTS is "" and PGDATA is /var/lib/.... (the default)

We have tried to set the variables via export, env.d, direct on the command line, etc ...

After taking a look into the package environment file we noticed that the variables are not there, whatever we do.
Apparently both environment variables MUST be set BEFORE EMERGING the package (???), then the variables also appear in the package environment file.
Don't know if this is an issue only with this package (8.3.3 ebuild) or with portage itself.

Reproducible : Always.
Steps to reproduce :
1. Make sure your environment DOESN'T have PGDATA or PG_INITDB_OPTS
2. EMERGE postgresql-server 8.3.3 (we only tested that one, but i think the other ebuilds will show the same behavior)
3. Set PGDATA and/or PG_INITDB_OPTS to the value you need (eg. -E UTF8 for opts)
4. try emerge --config 
5. watch the results
6. set the environment for ALL & ANY user in the system
7. check the environment to make sure the variables are set
8. repeat 4 - 8 until you have no more ideas how to set the environment
(9. optional .... jump out the window)
Comment 10 Denis Misiurca 2009-04-16 21:09:55 UTC
Still applicable to dev-db/postgresql-server-8.3.7

(In reply to comment #9)
> If you intsall the package and then set any or both variables and try to emerge
> --config postgres, the script will always tell you that PG_INITDB_OPTS is ""
> and PGDATA is /var/lib/.... (the default)
Comment 11 Blu3 2009-11-03 01:59:36 UTC
This bug is not fixed.  Still present in 8.4.1-r1.  Please re-open as all these other bugs which are duplicates of it will erroneously indicate resolved.