Re: Tarball builds in the new world order

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: Tarball builds in the new world order
Date: 2024-04-29 16:14:10
Message-ID: 1245434.1714407250@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> On 26.04.24 21:24, Tom Lane wrote:
>> Concretely, I'm proposing the attached. Peter didn't like
>> PG_COMMIT_HASH, so I have PG_COMMIT_REFSPEC below, but I'm not
>> wedded to that if a better name is proposed.

> This seems ok to me, but note that we do have an equivalent
> implementation in meson. If we don't want to update that in a similar
> way, maybe we should disable it.

OK. After poking at that for awhile, it seemed like "default to
HEAD" fits into meson a lot better than "throw an error if the
variable isn't set", so I switched to doing it like that.
One reason is that AFAICT you can only set the variable during
"meson setup" not during "ninja". This won't matter to the
tarball build script, which does a one-off configuration run
anyway. But for manual use, a movable target like HEAD might be
more convenient given that behavior.

I tested this by building tarballs using the makefiles on a RHEL8
box, and using meson on my MacBook (with recent MacPorts tools).
I got bit-for-bit identical files, which I found rather impressive
given the gap between the platforms. Maybe this "reproducible builds"
wheeze will actually work.

I also changed the variable name to PG_GIT_REVISION per your
other suggestion.

regards, tom lane

Attachment Content-Type Size
v2-0001-make-packaged-commit-selectable.patch text/x-diff 2.6 KB
v2-0002-fix-tarball-build-script.patch text/x-diff 733 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Cleveland 2024-04-29 16:17:15 Possible to get LIMIT in an index access method?
Previous Message Nazir Bilal Yavuz 2024-04-29 15:41:09 Re: Use streaming read API in ANALYZE