Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZIGm-0005Mn-Hp for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Oct 2021 19:44:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mZIGk-0005Nb-Kl for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Oct 2021 19:44:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZIGk-0005NT-Co for pgsql-hackers@lists.postgresql.org; Sat, 09 Oct 2021 19:44:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mZIGb-0000NP-GT for pgsql-hackers@lists.postgresql.org; Sat, 09 Oct 2021 19:44:29 +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 199JiHlN245163; Sat, 9 Oct 2021 15:44:17 -0400 From: Tom Lane To: Noah Misch cc: Daniel Gustafsson , Postgres hackers , Craig Ringer Subject: Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3. In-reply-to: <20211009192333.GA450252@rfd.leadboat.com> References: <150C7533-8A64-4829-ABEA-50F0D49FC598@yesql.se> <161525.1633632402@sss.pgh.pa.us> <162421.1633633360@sss.pgh.pa.us> <12C3DA75-ACE1-486B-A432-9E23C68E7D34@yesql.se> <173186.1633635888@sss.pgh.pa.us> <20211008025659.GA398563@rfd.leadboat.com> <197091.1633664351@sss.pgh.pa.us> <20211008042454.GB398563@rfd.leadboat.com> <03177128-BE87-4520-90D1-D5FA16B79EB6@yesql.se> <234637.1633709021@sss.pgh.pa.us> <20211009192333.GA450252@rfd.leadboat.com> Comments: In-reply-to Noah Misch message dated "Sat, 09 Oct 2021 12:23:33 -0700" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <245054.1633808529.0@sss.pgh.pa.us> Date: Sat, 09 Oct 2021 15:44:17 -0400 Message-ID: <245162.1633808657@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: <245054.1633808529.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Noah Misch writes: > On Fri, Oct 08, 2021 at 12:03:41PM -0400, Tom Lane wrote: >> You're not going to get far with "improving the recipe", because it's >> just not possible. To check this, I installed perlbrew on a Fedora 34 > Your test result is evidence that "cpanm install Test::More@0.87" is the= wrong > shell command, but it's quite a leap to "just not possible". Surely the= re > exist other shell commands that install > http://backpan.perl.org/modules/by-authors/id/M/MS/MSCHWERN/Test-Simple-= 0.87_03.tar.gz. > (Perhaps none of us will care enough to identify them, but they exist.) Oh, I never heard of backpan before. Now I'm tempted to see how far I can downgrade prairiedog before it breaks ;-). However, I agree that most people won't care about that, and probably shouldn't need to. > By the way, I suspect 93fb39e introduced a regression in the recipe. (I > haven't tested, though.) Before commit 93fb39e, "cpanm install IPC::Run= " > would update Test::More. As of 5.8.3, the core version of Test::More is= new > enough for IPC::Run but not new enough for PostgreSQL. I recommend addi= ng > "cpanm install Test::More" to restore the pre-93fb39e functionality. Good point. So how about like the attached? regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="improve-test-perl-README-2.patch"; charset="us-ascii" Content-ID: <245054.1633808529.2@sss.pgh.pa.us> Content-Description: improve-test-perl-README-2.patch diff --git a/src/test/perl/README b/src/test/perl/README index bfc7cdcfa3..ab986f14bc 100644 --- a/src/test/perl/README +++ b/src/test/perl/README @@ -70,20 +70,33 @@ perldoc for the test modules, e.g.: perldoc src/test/perl/PostgresNode.pm -Required Perl -------------- +Portability +----------- + +Avoid using any bleeding-edge Perl features. We have buildfarm animals +running Perl versions as old as 5.8.3, so your tests will be expected +to pass on that. -Tests must run on perl 5.8.3 and newer. perlbrew is a good way to obtain such -a Perl; see http://perlbrew.pl . +Also, do not use any non-core Perl modules except IPC::Run. Or, if you +must do so for a particular test, arrange to skip the test when the needed +module isn't present. If unsure, you can consult Module::CoreList to find +out whether a given module is part of the Perl core, and which module +versions shipped with which Perl releases. -Just install and +One way to test for compatibility with old Perl versions is to use +perlbrew; see http://perlbrew.pl . After installing that, do perlbrew --force install 5.8.3 perlbrew use 5.8.3 perlbrew install-cpanm + cpanm install Test::More cpanm install IPC::Run -then re-run configure to ensure the correct Perl is used when running -tests. To verify that the right Perl was found: +Then re-run Postgres' configure to ensure the correct Perl is used when +running tests. To verify that the right Perl was found: grep ^PERL= config.log + +(Note: this recipe does not create a perfect reproduction of a +back-in-the-day Perl installation, because it will update Test::More +and IPC::Run to current versions. In most cases that won't matter.) ------- =_aaaaaaaaaa0--