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?


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.

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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