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 1s0RBB-0048id-0s for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Apr 2024 19:24:16 +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 1s0RB8-00EudI-Bp for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Apr 2024 19:24:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s0RB8-00EudA-2I for pgsql-hackers@lists.postgresql.org; Fri, 26 Apr 2024 19:24:14 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s0RB6-000BnR-Ll for pgsql-hackers@lists.postgresql.org; Fri, 26 Apr 2024 19:24:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 43QJO8Q8015182; Fri, 26 Apr 2024 15:24:08 -0400 From: Tom Lane To: Peter Eisentraut cc: Greg Sabino Mullane , pgsql-hackers@lists.postgresql.org, Magnus Hagander Subject: Re: Tarball builds in the new world order In-reply-to: <3709288.1713972073@sss.pgh.pa.us> References: <3552543.1713909947@sss.pgh.pa.us> <3709288.1713972073@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 24 Apr 2024 11:21:13 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <15066.1714159384.0@sss.pgh.pa.us> Date: Fri, 26 Apr 2024 15:24:08 -0400 Message-ID: <15181.1714159448@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15066.1714159384.1@sss.pgh.pa.us> 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. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="0001-make-packaged-commit-selectable.patch"; charset="us-ascii" Content-ID: <15066.1714159384.2@sss.pgh.pa.us> Content-Description: 0001-make-packaged-commit-selectable.patch Content-Transfer-Encoding: quoted-printable diff --git a/GNUmakefile.in b/GNUmakefile.in index 30553b2a95..27357e5e3b 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -102,10 +102,18 @@ distdir-location: # on, Unix machines. = $(distdir).tar.gz: - $(GIT) -C $(srcdir) -c core.autocrlf=3Dfalse archive --format tar.gz -9 = --prefix $(distdir)/ HEAD -o $(abs_top_builddir)/$@ +ifneq ($(PG_COMMIT_REFSPEC),) + $(GIT) -C $(srcdir) -c core.autocrlf=3Dfalse archive --format tar.gz -9 = --prefix $(distdir)/ $(PG_COMMIT_REFSPEC) -o $(abs_top_builddir)/$@ +else + @echo "Please specify PG_COMMIT_REFSPEC." && exit 1 +endif = $(distdir).tar.bz2: - $(GIT) -C $(srcdir) -c core.autocrlf=3Dfalse -c tar.tar.bz2.command=3D'$= (BZIP2) -c' archive --format tar.bz2 --prefix $(distdir)/ HEAD -o $(abs_to= p_builddir)/$@ +ifneq ($(PG_COMMIT_REFSPEC),) + $(GIT) -C $(srcdir) -c core.autocrlf=3Dfalse -c tar.tar.bz2.command=3D'$= (BZIP2) -c' archive --format tar.bz2 --prefix $(distdir)/ $(PG_COMMIT_REFS= PEC) -o $(abs_top_builddir)/$@ +else + @echo "Please specify PG_COMMIT_REFSPEC." && exit 1 +endif = distcheck: dist rm -rf $(dummy) ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="0002-fix-tarball-build-script.patch"; charset="us-ascii" Content-ID: <15066.1714159384.3@sss.pgh.pa.us> Content-Description: 0002-fix-tarball-build-script.patch --- mk-one-release.orig 2024-04-23 17:30:08.983226671 -0400 +++ mk-one-release 2024-04-26 15:17:29.713669677 -0400 @@ -39,13 +39,17 @@ mkdir pgsql git archive ${gitref} | tar xf - -C pgsql # Include the git ref in the output tarballs +# (This has no effect with v17 and up; instead we rely on "git archive" +# to include the commit hash in the tar header) echo ${gitref} >pgsql/.gitrevision cd pgsql ./configure # Produce .tar.gz and .tar.bz2 files -make dist +# (With v17 and up, this will repeat the "git archive" call; the contents +# of the working directory don't matter directly to the results.) +make dist PG_COMMIT_REFSPEC=${gitref} # Generate md5 and sha256 sums, and copy files to output for x in *.tar.*; do ------- =_aaaaaaaaaa0--