Re: Trouble with initdb trying to run regression tests

From: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Trouble with initdb trying to run regression tests
Date: 2021-03-31 01:57:03
Message-ID: CAMsGm5fQnJbPsiqny6t+Jy87+dk4-g1BrDqg_Y2DRC=weW3=XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 30 Mar 2021 at 18:39, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Isaac Morland <isaac(dot)morland(at)gmail(dot)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(at)ubuntu-focal:/vagrant$ umask
0027
vagrant(at)ubuntu-focal:/vagrant$ mkdir test-umask
vagrant(at)ubuntu-focal:/vagrant$ ls -ld test-umask/
drwxr-xr-x 1 vagrant vagrant 64 Mar 31 01:12 test-umask/
vagrant(at)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message 'alvherre@alvh.no-ip.org' 2021-03-31 02:02:41 Re: libpq debug log
Previous Message Tom Lane 2021-03-31 01:51:34 Re: [PATCH v3 1/1] Fix detection of preadv/pwritev support for OSX.