Re: Trouble with initdb trying to run regression tests - Mailing list pgsql-hackers

From Isaac Morland
Subject Re: Trouble with initdb trying to run regression tests
Date
Msg-id CAMsGm5fQnJbPsiqny6t+Jy87+dk4-g1BrDqg_Y2DRC=weW3=XA@mail.gmail.com
Whole thread Raw
In response to Re: Trouble with initdb trying to run regression tests  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, 30 Mar 2021 at 18:39, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Isaac Morland <isaac.morland@gmail.com> writes:
> I've built Postgres inside a Ubuntu Vagrant VM. When I try to "make check",
> I get a complaint about the permissions on the data directory:
[....] 
Further up in initdb.log, there was probably some useful information
about whether it found an existing directory there or not.

Sorry for the noise. Turns out that directory creation in /vagrant does not respect umask:

vagrant@ubuntu-focal:/vagrant$ umask
0027
vagrant@ubuntu-focal:/vagrant$ mkdir test-umask
vagrant@ubuntu-focal:/vagrant$ ls -ld test-umask/
drwxr-xr-x 1 vagrant vagrant 64 Mar 31 01:12 test-umask/
vagrant@ubuntu-focal:/vagrant$ 

I knew that file ownership changes are not processed in /vagrant; and because I remembered that I checked whether permission mode changes were accepted, but didn't think to check whether umask worked. When I tried again (git clone, build, make check) in another directory it worked fine.

I was then able to get the tests to run (and pass) in /vagrant by changing the --temp-instance setting in src/Makefile.global (and looks like I should be able to edit src/Makefile.global.in and re-run configure) to a location outside of /vagrant. Is there a way to tell configure to override the setting? I ask mostly because src/Makefile.global.in says users shouldn't need to edit it. Otherwise my fix will most likely be to maintain a one-line update to this file in my checkout.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH v3 1/1] Fix detection of preadv/pwritev support for OSX.
Next
From: "'alvherre@alvh.no-ip.org'"
Date:
Subject: Re: libpq debug log