public inbox for [email protected]  
help / color / mirror / Atom feed
From: Craig Ringer <[email protected]>
To: Devrim Gündüz <[email protected]>
Cc: Jehan-Guillaume de Rorthais <[email protected]>
Cc: [email protected]
Subject: Re: missing perl test modules in postgresqlXX-devel ?
Date: Mon, 16 Nov 2020 15:42:54 +0800
Message-ID: <CAGRY4nzd9gwdHDbXtqfLAhdwyFumWOk6AJ-HDN2r54MAPjcu_A@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <20201105190206.4358b61d@firost>
	<CAGRY4nygZarpXPaqVC1sfSWP7Ba=uw_XqCS+6pn+NusEoSNvVw@mail.gmail.com>
	<20201109114034.2cc8aab5@firost>
	<CAGRY4nz+xcczzYXVuNva8=r+ucgp5pYMt0_eM-nBv4iPNCmyKw@mail.gmail.com>
	<20201110145627.07954db0@firost>
	<CAGRY4nxwwyxMCcWaSZMRm+opbd5sVVtzhXaPNqvvTpzEYZE6RQ@mail.gmail.com>
	<20201112113632.627b8749@firost>
	<CAGRY4nwhfqJm=fqwhkhqK8u=2FxS+m4h2HNLNtp8bKS=MQ-hyA@mail.gmail.com>
	<[email protected]>

On Fri, Nov 13, 2020 at 11:51 PM Devrim Gündüz <[email protected]> wrote:

>
> Hi,
>
> On Fri, 2020-11-13 at 13:38 +0800, Craig Ringer wrote:
> > Based on this, I think it's appropriate to modify the EL-7 spec file
> > fo all Pg versions (example patch is for -10) something like the
> > following.
>
> We have unified spec file, so can you please send a patch that will
> work on all platforms?
>

I should've said "the unified spec file for pg 10" - the patch targets all
platforms.

I've attached one that's pre-applied to all version specs, with a better
commit message, so you can just "git am" and check it.

For future reference

  PATCHFILE=/path/to/the.patch
  for f in $( find . -type f -path
'./rpm/redhat/master/non-common/postgresql-1[0-9]/*/postgresql-*.spec' )
  do
    patch --no-backup-if-mismatch -p1 -i $PATCHFILE $f
  done

is very handy.

If you're concerned about this, the 'perl(Test::More)' dependency could be
made a weak dependency.

I didn't see a convenient docker-based build script in the pgrpms repo that
I could use to sanity check changes against a clean temporary
locally-generated buildserver image, so I haven't tested these. The
dockerfiles in docker/ look like they're intended as end-user containers.
I'll see if I can make a simple docker-rpm-builder wrapper (see
https://github.com/docker-rpm-builder/docker-rpm-builder#other-distributions-and-osx---installing-st...
).


Attachments:

  [text/x-patch] v1-0001-Enable-TAP-tests-and-package-TAP-postgres-modules.patch (7.4K, 3-v1-0001-Enable-TAP-tests-and-package-TAP-postgres-modules.patch)
  download | inline diff:
From 4d03e46b035c10605b50909bf31f53ea3343eeec Mon Sep 17 00:00:00 2001
From: Craig Ringer <[email protected]>
Date: Mon, 16 Nov 2020 12:04:42 +0800
Subject: [PATCH v1] Enable TAP tests and package TAP postgres modules for EL-7
 and EL-8

All RHEL had TAP tests disabled since commit 511834297 "Disable tap tests on
RHEL 7". This claimed that "Red Hat does not ship with the necessary deps",
they were only present on CentOS. The same commit added a dependency for
perl-Test-Simple, suggesting the issue may have related to Test::More, which is
part of Test::Simple, but it's not too clear.

Investigation of the current state by Jehan-Guillaume de Rorthais shows that
RHEL 7 (at least 7.8) does have Test::More at least if requested via the
preferred Perl module Provides syntax 'perl(Test::More)' per [1].

Accordingly, re-enable building with --enable-tap-tests on RHEL7. In the
process switch to the Perl module Provides syntax for modules 'perl(IPC::Run)'
and 'perl(Test::More)' instead of naming the rpm packages they are part of,
'perl-IPC-Run' and 'perl-Test-Simple' respectively. And merge the requirements
for Fedora and RHEL 7/8, since there's no apparent reason they should be
separate.

[1] https://www.postgresql.org/message-id/20201112113632.627b8749@firost
---
 .../postgresql-10/master/postgresql-10.spec        | 14 +++++---------
 .../postgresql-11/master/postgresql-11.spec        | 14 +++++---------
 .../postgresql-12/master/postgresql-12.spec        | 14 +++++---------
 .../postgresql-13/master/postgresql-13.spec        | 14 +++++---------
 .../postgresql-14/main/postgresql-14.spec          | 14 +++++---------
 5 files changed, 25 insertions(+), 45 deletions(-)

diff --git a/rpm/redhat/master/non-common/postgresql-10/master/postgresql-10.spec b/rpm/redhat/master/non-common/postgresql-10/master/postgresql-10.spec
index a5b6a015a..501e3884f 100644
--- a/rpm/redhat/master/non-common/postgresql-10/master/postgresql-10.spec
+++ b/rpm/redhat/master/non-common/postgresql-10/master/postgresql-10.spec
@@ -12,7 +12,7 @@
 %{!?kerbdir:%global kerbdir "/usr"}
 %{!?disablepgfts:%global disablepgfts 0}
 
-%if 0%{?rhel} || 0%{?suse_version} >= 1315
+%if (0%{?rhel} && 0%{?rhel} <= 6) || 0%{?suse_version} >= 1315
 %{!?enabletaptests:%global enabletaptests 0}
 %else
 %{!?enabletaptests:%global enabletaptests 1}
@@ -367,17 +367,13 @@ Requires:	libicu-devel
 %endif
 
 %if %enabletaptests
-%if 0%{?suse_version} && 0%{?suse_version} >= 1315
+%if 0%{?suse_version}
 Requires:	perl-IPC-Run
 BuildRequires:	perl-IPC-Run
 %endif
-%if 0%{?rhel} && 0%{?rhel} <= 7
-Requires:	perl-Test-Simple
-BuildRequires:	perl-Test-Simple
-%endif
-%if 0%{?fedora}
-Requires:	perl-IPC-Run
-BuildRequires:	perl-IPC-Run
+%if 0%{?rhel} || 0%{?fedora}
+Requires:	perl(Test::More) perl(IPC::Run)
+BuildRequires:	perl(Test::More) perl(IPC::Run)
 %endif
 %endif
 
diff --git a/rpm/redhat/master/non-common/postgresql-11/master/postgresql-11.spec b/rpm/redhat/master/non-common/postgresql-11/master/postgresql-11.spec
index 4246532c7..63d59e3ed 100644
--- a/rpm/redhat/master/non-common/postgresql-11/master/postgresql-11.spec
+++ b/rpm/redhat/master/non-common/postgresql-11/master/postgresql-11.spec
@@ -11,7 +11,7 @@
 %{!?kerbdir:%global kerbdir "/usr"}
 %{!?disablepgfts:%global disablepgfts 0}
 
-%if 0%{?rhel} || 0%{?suse_version} >= 1315
+%if (0%{?rhel} && 0%{?rhel} <= 6) || 0%{?suse_version} >= 1315
 %{!?enabletaptests:%global enabletaptests 0}
 %else
 %{!?enabletaptests:%global enabletaptests 1}
@@ -416,17 +416,13 @@ Requires:	libicu-devel
 %endif
 
 %if %enabletaptests
-%if 0%{?suse_version} && 0%{?suse_version} >= 1315
+%if 0%{?suse_version}
 Requires:	perl-IPC-Run
 BuildRequires:	perl-IPC-Run
 %endif
-%if 0%{?rhel} && 0%{?rhel} <= 7
-Requires:	perl-Test-Simple
-BuildRequires:	perl-Test-Simple
-%endif
-%if 0%{?fedora}
-Requires:	perl-IPC-Run
-BuildRequires:	perl-IPC-Run
+%if 0%{?rhel} || 0%{?fedora}
+Requires:	perl(Test::More) perl(IPC::Run)
+BuildRequires:	perl(Test::More) perl(IPC::Run)
 %endif
 %endif
 
diff --git a/rpm/redhat/master/non-common/postgresql-12/master/postgresql-12.spec b/rpm/redhat/master/non-common/postgresql-12/master/postgresql-12.spec
index be62e1f9e..0617cef71 100644
--- a/rpm/redhat/master/non-common/postgresql-12/master/postgresql-12.spec
+++ b/rpm/redhat/master/non-common/postgresql-12/master/postgresql-12.spec
@@ -12,7 +12,7 @@
 %{!?kerbdir:%global kerbdir "/usr"}
 %{!?disablepgfts:%global disablepgfts 0}
 
-%if 0%{?rhel} || 0%{?suse_version} >= 1315
+%if (0%{?rhel} && 0%{?rhel} <= 6) || 0%{?suse_version} >= 1315
 %{!?enabletaptests:%global enabletaptests 0}
 %else
 %{!?enabletaptests:%global enabletaptests 1}
@@ -417,17 +417,13 @@ Requires:	libicu-devel
 %endif
 
 %if %enabletaptests
-%if 0%{?suse_version} && 0%{?suse_version} >= 1315
+%if 0%{?suse_version}
 Requires:	perl-IPC-Run
 BuildRequires:	perl-IPC-Run
 %endif
-%if 0%{?rhel} && 0%{?rhel} <= 7
-Requires:	perl-Test-Simple
-BuildRequires:	perl-Test-Simple
-%endif
-%if 0%{?fedora}
-Requires:	perl-IPC-Run
-BuildRequires:	perl-IPC-Run
+%if 0%{?rhel} || 0%{?fedora}
+Requires:	perl(Test::More) perl(IPC::Run)
+BuildRequires:	perl(Test::More) perl(IPC::Run)
 %endif
 %endif
 
diff --git a/rpm/redhat/master/non-common/postgresql-13/master/postgresql-13.spec b/rpm/redhat/master/non-common/postgresql-13/master/postgresql-13.spec
index 7f284a5f2..49afff9fa 100644
--- a/rpm/redhat/master/non-common/postgresql-13/master/postgresql-13.spec
+++ b/rpm/redhat/master/non-common/postgresql-13/master/postgresql-13.spec
@@ -12,7 +12,7 @@
 %{!?kerbdir:%global kerbdir "/usr"}
 %{!?disablepgfts:%global disablepgfts 0}
 
-%if 0%{?rhel} || 0%{?suse_version} >= 1315
+%if (0%{?rhel} && 0%{?rhel} <= 6) || 0%{?suse_version} >= 1315
 %{!?enabletaptests:%global enabletaptests 0}
 %else
 %{!?enabletaptests:%global enabletaptests 1}
@@ -386,17 +386,13 @@ Requires:	libicu-devel
 %endif
 
 %if %enabletaptests
-%if 0%{?suse_version} && 0%{?suse_version} >= 1315
+%if 0%{?suse_version}
 Requires:	perl-IPC-Run
 BuildRequires:	perl-IPC-Run
 %endif
-%if 0%{?rhel} && 0%{?rhel} <= 7
-Requires:	perl-Test-Simple
-BuildRequires:	perl-Test-Simple
-%endif
-%if 0%{?fedora}
-Requires:	perl-IPC-Run
-BuildRequires:	perl-IPC-Run
+%if 0%{?rhel} || 0%{?fedora}
+Requires:	perl(Test::More) perl(IPC::Run)
+BuildRequires:	perl(Test::More) perl(IPC::Run)
 %endif
 %endif
 
diff --git a/rpm/redhat/master/non-common/postgresql-14/main/postgresql-14.spec b/rpm/redhat/master/non-common/postgresql-14/main/postgresql-14.spec
index 644df2ebe..fbab2e44a 100644
--- a/rpm/redhat/master/non-common/postgresql-14/main/postgresql-14.spec
+++ b/rpm/redhat/master/non-common/postgresql-14/main/postgresql-14.spec
@@ -14,7 +14,7 @@
 %{!?kerbdir:%global kerbdir "/usr"}
 %{!?disablepgfts:%global disablepgfts 0}
 
-%if 0%{?rhel} || 0%{?suse_version} >= 1315
+%if (0%{?rhel} && 0%{?rhel} <= 6) || 0%{?suse_version} >= 1315
 %{!?enabletaptests:%global enabletaptests 0}
 %else
 %{!?enabletaptests:%global enabletaptests 1}
@@ -388,17 +388,13 @@ Requires:	libicu-devel
 %endif
 
 %if %enabletaptests
-%if 0%{?suse_version} && 0%{?suse_version} >= 1315
+%if 0%{?suse_version}
 Requires:	perl-IPC-Run
 BuildRequires:	perl-IPC-Run
 %endif
-%if 0%{?rhel} && 0%{?rhel} <= 7
-Requires:	perl-Test-Simple
-BuildRequires:	perl-Test-Simple
-%endif
-%if 0%{?fedora}
-Requires:	perl-IPC-Run
-BuildRequires:	perl-IPC-Run
+%if 0%{?rhel} || 0%{?fedora}
+Requires:	perl(Test::More) perl(IPC::Run)
+BuildRequires:	perl(Test::More) perl(IPC::Run)
 %endif
 %endif
 
-- 
2.26.2



view thread (16+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: missing perl test modules in postgresqlXX-devel ?
  In-Reply-To: <CAGRY4nzd9gwdHDbXtqfLAhdwyFumWOk6AJ-HDN2r54MAPjcu_A@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox