Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to a build a custom package of PostgreSQL with some configuration tweaks suitable for our application. Part of that configuration involves a pg_hba.conf using "trust" instead of the defaults.

I can see when I install a setup script is triggered and the PostgreSQL 'initdb' command is run. This copies the sample config files and applies some transformations to it (keyword replacement) and copies into /etc. However even if I remove the keywords from the pg_hba.conf.sample file and hard code the values I want they automagically get reverted to the defaults.

I've tried to follow the post install scripts but all I can see is a call to configure_version which isn't anywhere in the PostgreSQL source code.

So what is the call-chain from post installation scripts to the initdb program being called? And how can I tweak the parameters of the initdb call for my preferred form of authentication?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

In postgresql-8.4.postinst, the line immediately above the call to configure_version is:

. /usr/share/postgresql-common/maintscripts-functions

That will load all the functions from that file, which includes configure_version. That file is found in the postgresql-common package.

share|improve this answer
    
So why can't I find maintscripts-functions or a file (other than the postinst script) containing configure_versions in the package source tree? –  stsquad Nov 8 '10 at 19:20
    
ahh, I was under the impression everything was built from the one package. As you say postgresql-common is a separate package. –  stsquad Nov 8 '10 at 19:28
    
Right, the Depends: for the installed package may use tools from those packages (in this case, postgresql-common). –  Kees Cook Nov 9 '10 at 5:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.