Bug 2219504

Summary: Module requires perl-5.26 while it should just require perl5
Product: Red Hat Enterprise Linux 8 Reporter: Renaud Métrich <rmetrich>
Component: perl-Date-ManipAssignee: Jitka Plesnikova <jplesnik>
Status: VERIFIED --- QA Contact: Martin Kyral <mkyral>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.8CC: jplesnik, mkyral
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: perl-Date-Manip-6.60-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Renaud Métrich 2023-07-04 05:03:49 UTC
Description of problem:

We have a customer requiring perl-Date-Manip while having perl-5.32 stream.
Due to how the package is built, it's not possible to install the package, because it has a hard dependency on the following:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
perl(:MODULE_COMPAT_5.26.2)
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

I believe this is not required at all, forcibly installing the package shows it works fine with perl-5.32 stream:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# rpm -q perl
perl-5.32.1-472.module+el8.8.0+17873+3d1ce0e6.x86_64
# rpm -ivh --nodeps ./perl-Date-Manip-6.60-2.el8.noarch.rpm

# cat > test_perl_manip.pl << EOF
#!/usr/bin/perl

use strict;
use warnings;

use Date::Manip::Date;
use Date::Manip::Delta;
use Date::Manip::Recur;
use Date::Manip::TZ;
use Date::Manip::Base;
EOF

# perl ./test_perl_manip.pl
--> OK

# grep -w require /usr/share/perl5/vendor_perl/Date/Manip/*.pm
--> nothing specific to 5.26 there
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Additionally the package is pure Perl code, not linked against any system library.

Version-Release number of selected component (if applicable):

perl-Date-Manip-6.60-2.el8.noarch

How reproducible:

Always

Steps to Reproduce:
1. Enable perl-5.32 stream and install perl

  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  # dnf -y module enable perl:5.32
  # dnf -y install perl
  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

2. Try installing perl-Date-Manip

  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  # dnf -y install perl-Date-Manip
  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Actual results: conflicts

-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
 Problem: package perl-Date-Manip-6.60-2.el8.noarch requires perl(:MODULE_COMPAT_5.26.2), but none of the providers can be installed
  - conflicting requests
  - package perl-libs-4:5.26.3-416.el8.x86_64 is filtered out by modular filtering
  [...]
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Expected results:

Can install fine

Additional info:

Same issue applies to perl-Parse-Yapp

Comment 1 Jitka Plesnikova 2023-07-18 09:41:04 UTC
Thank you for the report.

perl(:MODULE_COMPAT_XXX) was used to ensure that Perl packages have a
dependency on the particular version of Perl it was built against.

You are right that it is not necessary for all Perl packages. Only packages
with compiled code need to have a dependency on the particular version of
Perl it was built against.

perl-Date-Manip and perl-Parse-Yapp are not these packages.
I can try to replace perl(:MODULE_COMPAT_XXX) by non-versioned perl-libs 
(which provide it).

Note: For future RHEL, it will be solved by replacing versioned MODULE_COMPAT
requires by correct dependency provided by Perl dependency generator.

Comment 2 Jitka Plesnikova 2023-07-18 10:29:10 UTC
The issue appeared because only some packages, which are using Perl, are built with module perl:5.32.
However, the most of the packages which are using Perl requires versioned MODULE_COMPAT.

Comment 3 Jitka Plesnikova 2023-07-19 12:41:20 UTC
> perl-Date-Manip and perl-Parse-Yapp are not these packages.
> I can try to replace perl(:MODULE_COMPAT_XXX) by non-versioned perl-libs 
> (which provide it).
This change works. Is it acceptable for customer?

Comment 4 Renaud Métrich 2023-07-19 12:46:12 UTC
Sure great.
Will you deal with perl-Parse-Yapp as well or should we clone the BZ for this component?

Comment 5 Jitka Plesnikova 2023-07-19 12:58:29 UTC
I will update both packages. A separate BZ is not required.