Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rShV1-00FMgW-52 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jan 2024 17:57:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rShV0-0078lY-1j for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jan 2024 17:57:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rShUz-0078lQ-Nu for pgsql-hackers@lists.postgresql.org; Wed, 24 Jan 2024 17:57:17 +0000 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rShUv-003VkU-0B for pgsql-hackers@postgresql.org; Wed, 24 Jan 2024 17:57:16 +0000 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-5993047a708so2957519eaf.3 for ; Wed, 24 Jan 2024 09:57:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neon.tech; s=google; t=1706119030; x=1706723830; darn=postgresql.org; h=in-reply-to:references:cc:from:to:subject:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bdHI8FplBJbKLdyqGcLeno6GFql6sDWsXVDmIA6BLyw=; b=JIIvsQO7Qk+IxGyZq9uGKaRwyshi0ZIWXs9dz0rcrqYzmus4gRVAYqvvlH99sJNOAi b0Oa6om2nZQW7i7ImISWghQWcDL8VTqBJBgl+La5E156p9BfMUqCMcwxlUzfwbzld7er ikuUJKy0BuAwpc1PxIDxlg4EBqZalQgHB1J88= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706119030; x=1706723830; h=in-reply-to:references:cc:from:to:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=bdHI8FplBJbKLdyqGcLeno6GFql6sDWsXVDmIA6BLyw=; b=LdFGWcPMJlgdn2EQHUQ7b01CtRzbYJ3o4r6h7z5hExJGrqyQHMreVoN1BYqDU6gOi2 fCfh4AayEIE3jiq+uwEI8sF4ISJYuyzwep5Y/rnEDm//VnmOycTZI7XF+x70zORUq2G0 LV1+RapAdnX0sBohGnwSbBumLK0KAKX8tG1tyjEr/K4i5mS+i6uCGpd3erlRzA5oAS4R 9O51TMjEQ3MZn4l9x4uh4loVBO0kc+RMZI+Zw8yqdN8gbiMwUZAX9f7L+VaMO5F758hy Zd4bpB9y4Y3iehmKM+89+Tk2/QM+j9Nh9yRQOTwOgnFjoJR3mXWWDpard4CvyxZyxsLN Y1HA== X-Gm-Message-State: AOJu0YzszORO1gt78qseuxBQiqDZ9nJM/NFRhTKXtmwcFHG9IbH1N5iT nqNS6U+R5a61+//yXCVk6duAvzpu3lGSg/lMM/HZWwnyWPtCwd40iQmwpu7lD18= X-Google-Smtp-Source: AGHT+IFeNKnoHKFiJB+9KaqZqRP7/gi4Th78UwwHDT2atO8I30AwwMTk7/kdmqQ0+FLTdx8pI02UOQ== X-Received: by 2002:a05:6820:1503:b0:599:b8e9:ea99 with SMTP id ay3-20020a056820150300b00599b8e9ea99mr1769695oob.7.1706119029918; Wed, 24 Jan 2024 09:57:09 -0800 (PST) Received: from localhost ([2607:fb90:e683:8cf6:3996:e070:71ee:42fb]) by smtp.gmail.com with ESMTPSA id m25-20020a4ae3d9000000b005954383558esm52505oov.48.2024.01.24.09.57.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jan 2024 09:57:09 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed Date: Wed, 24 Jan 2024 11:57:08 -0600 Message-Id: Subject: Re: make dist using git archive To: "Peter Eisentraut" From: "Tristan Partin" Cc: "pgsql-hackers" X-Mailer: aerc 0.16.0-149-g2d8b81f619fc References: <40e80f77-a294-4f29-a16f-e21bc7bc75fc@eisentraut.org> <02714192-6eba-4145-ac1c-0a245801014f@eisentraut.org> In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed Jan 24, 2024 at 10:18 AM CST, Tristan Partin wrote: > 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=20 > > > command. The only difference from my testing is it doesn't use a=20 > > > --prefix argument. > > > > Here are some problems I have identified: > > > > 1. meson dist internally runs gzip without the -n option. That makes= =20 > > the tar.gz archive include a timestamp, which in turn makes it not=20 > > reproducible. It doesn't look like Python provides the facilities to affect this. > > 2. Because gzip includes a platform indicator in the archive, the=20 > > produced tar.gz archive is not reproducible across platforms. (I don't= =20 > > know if gzip has an option to avoid that. git archive uses an internal= =20 > > gzip implementation that handles this.) Same reason as above. > > 3. Meson does not support tar.bz2 archives. Submitted https://github.com/mesonbuild/meson/pull/12770. > > 4. Meson uses git archive internally, but then unpacks and repacks the= =20 > > archive, which loses the ability to use git get-tar-commit-id. Because Meson allows projects to distribute arbitrary files via=20 meson.add_dist_script(), and can include subprojects via `meson dist=20 --include-subprojects`, this doesn't seem like an easily solvable=20 problem. > > 5. I have found that the tar archives created by meson and git archive= =20 > > include the files in different orders. I suspect that the Python=20 > > tarfile module introduces some either randomness or platform dependency= . Seems likely. > > 6. meson dist is also slower because of the additional work. Not easily solvable due to 4. > > 7. meson dist produces .sha256sum files but we have called them .sha256= .=20 > > (This is obviously trivial, but it is something that would need to be= =20 > > dealt with somehow nonetheless.) > > > > Most or all of these issues are fixable, either upstream in Meson or by= =20 > > adjusting our own requirements. But for now this route would have some= =20 > > significant disadvantages. > > Thanks Peter. I will bring these up with upstream! I think the solution to point 4 is to not unpack/repack if there are no=20 dist scripts and/or subprojects to distribute. I can take a look at=20 this later. I think this would also solve points 1, 2, 5, and 6 because=20 at that point meson is just calling git-archive. --=20 Tristan Partin Neon (https://neon.tech)