Re: make dist using git archive

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "Peter Eisentraut" <peter(at)eisentraut(dot)org>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: make dist using git archive
Date: 2024-01-24 16:18:31
Message-ID: CYN2MF9LPZFX.3P1LF1G55RXM4@neon.tech
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue Jan 23, 2024 at 3:30 AM CST, Peter Eisentraut wrote:
> On 22.01.24 21:04, Tristan Partin wrote:
> > I am not really following why we can't use the builtin Meson dist
> > command. The only difference from my testing is it doesn't use a
> > --prefix argument.
>
> Here are some problems I have identified:
>
> 1. meson dist internally runs gzip without the -n option. That makes
> the tar.gz archive include a timestamp, which in turn makes it not
> reproducible.
>
> 2. Because gzip includes a platform indicator in the archive, the
> produced tar.gz archive is not reproducible across platforms. (I don't
> know if gzip has an option to avoid that. git archive uses an internal
> gzip implementation that handles this.)
>
> 3. Meson does not support tar.bz2 archives.
>
> 4. Meson uses git archive internally, but then unpacks and repacks the
> archive, which loses the ability to use git get-tar-commit-id.
>
> 5. I have found that the tar archives created by meson and git archive
> include the files in different orders. I suspect that the Python
> tarfile module introduces some either randomness or platform dependency.
>
> 6. meson dist is also slower because of the additional work.
>
> 7. meson dist produces .sha256sum files but we have called them .sha256.
> (This is obviously trivial, but it is something that would need to be
> dealt with somehow nonetheless.)
>
> Most or all of these issues are fixable, either upstream in Meson or by
> adjusting our own requirements. But for now this route would have some
> significant disadvantages.

Thanks Peter. I will bring these up with upstream!

--
Tristan Partin
Neon (https://neon.tech)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2024-01-24 16:23:45 Re: SSL tests fail on OpenSSL v3.2.0
Previous Message Tom Lane 2024-01-24 16:13:13 Re: Support TZ format code in to_timestamp()