Re: pgsql: make dist uses git archive

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: make dist uses git archive
Date: 2024-03-26 13:09:45
Message-ID: CABUevEyg8jtRusAEJsHPG2sU0fYQyf=0HQjBf=s31p1AD9uddg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Tue, Mar 26, 2024 at 12:09 PM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:

>
>
> On Tue, Mar 26, 2024 at 6:10 AM Andrew Dunstan <andrew(at)dunslane(dot)net>
> wrote:
>
>>
>>
>> On Tue, Mar 26, 2024 at 5:15 AM Magnus Hagander <magnus(at)hagander(dot)net>
>> wrote:
>>
>>>
>>>
>>> On Tue, Mar 26, 2024 at 9:13 AM Andrew Dunstan <andrew(at)dunslane(dot)net>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Mar 26, 2024 at 3:20 AM Peter Eisentraut <peter(at)eisentraut(dot)org>
>>>> wrote:
>>>>
>>>>> On 25.03.24 23:20, Andrew Dunstan wrote:
>>>>> > The problem occurs because except in vpath mode the buildfarm
>>>>> operates
>>>>> > on a copy of the code, and for efficiency reasons we don't copy the
>>>>> ,git
>>>>> > directory.
>>>>> >
>>>>> > The simplest fix is probably to change the machine's config to use a
>>>>> > vpath build.
>>>>> >
>>>>> > In the config file change the undef here to a 1:
>>>>> >
>>>>> > 'use_vpath' => undef,
>>>>> >
>>>>> > That worked for me in a quick test.
>>>>>
>>>>> Note that "make dist" doesn't work with vpath in backbranches. :-/
>>>>>
>>>>
>>>>
>>>> Ugh.
>>>>
>>>> OK, plan B :
>>>>
>>>> In the Module's setup code, right after the "die", put
>>>>
>>>> symlink("$buildroot/$branch/pgsql/.git","$pgsql/.git");
>>>>
>>>>
>>> If I understand you right, you meant:
>>>
>>> die "can't run this module with vpath builds"
>>> if $conf->{vpath};
>>> + symlink("$buildroot/$branch/pgsql/.git","$pgsql/.git");
>>>
>>> my $self = {buildroot => $buildroot, pgbranch=> $branch, bfconf
>>> => $conf, pgsql => $pgsql};
>>> bless ($self, $class);
>>>
>>> If so, I tried that, but it didn't work. That's this run here:
>>> https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=guaibasaurus&dt=2024-03-26%2009%3A02%3A51&stg=make-dist
>>>
>>>
>>>
>> *sigh*
>>
>> OK, instead of speculating I'll experiment and come up with an answer.
>>
>
>
> OK, this should work. Put these lines after the first print statement of
> the module's build() routine - the setup() routine runs too early:
>
> my $src = "$self->{buildroot}/$self->{pgbranch}/pgsql";
> symlink("$src/.git", "$self->{pgsql}/.git");
>
>
>
That seems to have sorted it.

I did a manual force run and that made it recovered. Let's see if it's also
happy after the first regular run, but it definitely look right.

Thanks!

//Magnus

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2024-03-26 14:52:10 Re: pgsql: Allow using syncfs() in frontend utilities.
Previous Message Andrew Dunstan 2024-03-26 11:09:25 Re: pgsql: make dist uses git archive