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?