Re: missing perl test modules in postgresqlXX-devel ? - Mailing list pgsql-pkg-yum
From | Craig Ringer |
---|---|
Subject | Re: missing perl test modules in postgresqlXX-devel ? |
Date | |
Msg-id | CAGRY4nxwwyxMCcWaSZMRm+opbd5sVVtzhXaPNqvvTpzEYZE6RQ@mail.gmail.com Whole thread Raw |
In response to | Re: missing perl test modules in postgresqlXX-devel ? (Jehan-Guillaume de Rorthais <jgdr@dalibo.com>) |
Responses |
Re: missing perl test modules in postgresqlXX-devel ?
|
List | pgsql-pkg-yum |
On Tue, Nov 10, 2020 at 9:56 PM Jehan-Guillaume de Rorthais <jgdr@dalibo.com> wrote:
On Tue, 10 Nov 2020 13:57:22 +0800
Craig Ringer <craig.ringer@enterprisedb.com> wrote:
> [...]
>
> so apparently the TAP tests aren't built/enabled for any RHEL/CentOS
> versions in -13. The same is true for 10 and up, at least.
>
> That's ... surprising. There's no comment to indicate why.
>
> Git logs suggest the cause is commit 511834297 "Disable tap tests on RHEL
> 7" . I think the package in question is perl-Test-Simple a.k.a
> 'perl(Test::Simple)'.
That's surprising. Grep'ing postgresql source doesn't catch anything about
Test::Simple. TAP tests in PostgreSQL sources rely on Test::More which is part
of the official Perl core modules at least since 5.8.0... Do I miss something?
Yep.
Perl test frameworks are an insane messy tangle of WTFery, so it's not surprising.
Test::More became part of Test::Simple at some point. When you "cpanm Test::More" you get "Test::Simple" installed:
$ cpanm --test-only Test::More
--> Working on Test::More
Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302183.tar.gz ... OK
Configuring Test-Simple-1.302183 ... OK
Building and testing Test-Simple-1.302183 ...
--> Working on Test::More
Fetching http://www.cpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302183.tar.gz ... OK
Configuring Test-Simple-1.302183 ... OK
Building and testing Test-Simple-1.302183 ...
Then there's this horrid tangle of Test2:: packages, TAP:: packages, and more all jumbled up into it. And now we're apparently supposed to transition to Test2::Suite instead, at some point, somehow...
Anyway, we should probably be declaring
Requires 'perl(Test::More)'
instead of
Requires perl-Test-Simple
because that tells the package manager we're asking for a specific Perl module, rather than a specific package containing a Perl module.
$ sudo dnf -y install 'perl(Test::More)'
Package perl-Test-Simple-3:1.302174-1.fc32.noarch is already installed.
Dependencies resolved.
Nothing to do.
Package perl-Test-Simple-3:1.302174-1.fc32.noarch is already installed.
Dependencies resolved.
Nothing to do.
This is true on centos7 too:
$ docker run -t centos:7 yum -y install 'perl(Test::More)'
...
---> Package perl-Test-Simple.noarch 0:0.98-243.el7 will be installed
...
Installed:
perl-Test-Simple.noarch 0:0.98-243.el7
perl-Test-Simple.noarch 0:0.98-243.el7
but I'm not sure about RHEL7 official.
> It looks like the test should be updated to enable them for RHEL 8 at least.
>
> I don't really feel like wrestling builds for an obsolete OS version to get
> these packaged for EL-7 though.
EL7 is still very popular. A lot of new upgrade/packages are still going to
EL7, at least for maintenance.
Yep.
I know, I maintain some. But I don't have nearly enough clones to do everything I want to do, so some things have to slip.
Would you mind firing up a RHEL7 AWS EC2 instance and checking if
yum -y install 'perl(Test::More)'
runs?
If so, we can probably restore the dependency, and then restore --enable-tap-tests support.
Alternatively we might be able to build with --enable-tap-tests and make 'perl(Test::More)' a build-time-only dependency when built on EL7. This means that TAP test running would have an undeclared dependency that won't actually work on EL7 without a separate package install step, which kind of sucks. But so long as it doesn't break other functionality in Makefile.global it's probably actually OK.
If EL7's yum and rpm aren't too stupid to cope, we can possibly use a Recommends: dependency for 'perl(Test::More)' there.
I'd need you to run some tests on a real RHEL 7 VM or host if you want to pursue this. I can help but can't take this on right now. I'll be able to send you a toy specfile to use rpmbuilds commands with to check things.
pgsql-pkg-yum by date: