Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePzZW-0003Du-J6 for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Dec 2017 23:39:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePzZW-0002J7-6e for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Dec 2017 23:39:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ePzZW-0002Ix-0F for pgsql-hackers@lists.postgresql.org; Fri, 15 Dec 2017 23:39:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ePzZQ-0005zY-K7 for pgsql-hackers@postgresql.org; Fri, 15 Dec 2017 23:39:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vBFNd5C1005526; Fri, 15 Dec 2017 18:39:05 -0500 From: Tom Lane To: Andres Freund cc: Michael Paquier , Christoph Berg , PostgreSQL Hackers Subject: Re: Reproducible builds: genbki.pl vs schemapg.h In-reply-to: <20171215232141.gx7mkxriaduocxm2@alap3.anarazel.de> References: <20171215102223.GB31812@msg.df7cb.de> <9616.1513351766@sss.pgh.pa.us> <20171215181337.GA6149@msg.credativ.de> <20171215232141.gx7mkxriaduocxm2@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Fri, 15 Dec 2017 15:21:41 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5524.1513381145.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Dec 2017 18:39:05 -0500 Message-ID: <5525.1513381145@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2017-12-16 07:52:41 +0900, Michael Paquier wrote: >> On Sat, Dec 16, 2017 at 3:13 AM, Christoph Berg >> wrote: >>> Re: Tom Lane 2017-12-15 <9616.1513351766@sss.pgh.pa.us> >>>> genbki.pl is hardly our only script that prints its $0 ... >>> As per >>> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/pos= tgresql-10.html, >>> that's the only place that makes it into the resulting binary. I'm fairly confused by this claim. Since the string in question is in a comment, it really shouldn't affect built binaries at all. I can believe that it would affect the non-binary contents of the finished package, because we include schemapg.h as one of the installed headers. However, we also include fmgroids.h, which also has an expanded version of $0 in it. So if schemapg.h is affected by build path, why isn't fmgroids.h? In my build, neither one of these files contains any path information; I speculate that you need to use a VPATH build to have an issue, or maybe Debian's build environment does something even weirder. But I feel confident in saying that if indeed fmgroids.h is invariant for you today, that's a phase-of-the-moon behavior that will break someday if we don't make a similar change in Gen_fmgrtab.pl. Or else we should propagate what's preventing it back to genbki.pl. plperl's text2macro.pl is also emitting $0, and there may be other places I missed (I grepped for 'DO NOT EDIT', not for $0 per se). We seem not to install the output file of that one, perlchunks.h, but that's a decision that somebody might change too. > It's not like $0 instead of a hardcoded name in the header actually buys > us anything afaict. Agreed so far as the script name goes. However, two out of three of these scripts also print their input file names, and I'm suspicious that that output is also gonna change in a VPATH build. I'm a little less inclined to buy the claim that we're not losing anything if we suppress that :-( regards, tom lane