Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2168930

Summary: rpmbuild fails to automatically detect provides or requires from perl module
Product: Red Hat Enterprise Linux 9 Reporter: Evan Rempel <erempel>
Component: perlAssignee: perl-maint-list
Status: CLOSED MIGRATED QA Contact: RHEL CS Apps Subsystem QE <rhel-cs-apps-subsystem-qe>
Severity: high Docs Contact:
Priority: unspecified    
Version: 9.1CC: jplesnik
Target Milestone: rcKeywords: MigratedToJIRA
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-20 15:50:05 UTC 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:
Attachments:
Description Flags
Logger.pm module none

Description Evan Rempel 2023-02-10 15:48:41 UTC
Created attachment 1943372 [details]
Logger.pm module

Description of problem:

rpmbuild fails to detect requires or provides from perl module.

The root cause seems to be the /usr/lib/rpm/rpmdeps
On RHEL8 this tool shows

$ /usr/lib/rpm/rpmdeps --define="_use_internal_dependency_generator 1" --requires Logger.pm
perl(Sys::Syslog)
perl(strict)
perl(warnings)
$ /usr/lib/rpm/rpmdeps --define="_use_internal_dependency_generator 1" --provides Logger.pm
perl(UVic::Logger)

While on RHEL9

$ /usr/lib/rpm/rpmdeps --define="_use_internal_dependency_generator 1" --requires Logger.pm
$ /usr/lib/rpm/rpmdeps --define="_use_internal_dependency_generator 1" --provides Logger.pm



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

$ rpm -qf /usr/lib/rpm/rpmdeps
rpm-build-4.16.1.3-19.el9_1.x86_64


How reproducible:

Take any perl module and run the rpmdeps commands on it.
I have attached the Logger.pm module I used in the description of my problem.

Steps to Reproduce:
1. Save he Logger.pm
2. Run the rpmdeps commands
   /usr/lib/rpm/rpmdeps --define="_use_internal_dependency_generator 1" --requires Logger.pm
   /usr/lib/rpm/rpmdeps --define="_use_internal_dependency_generator 1" --provides Logger.pm


Actual results:

null list


Expected results:

the requires list of:

perl(Sys::Syslog)
perl(strict)
perl(warnings)

and the provides list of:

perl(UVic::Logger)


Additional info:

Comment 1 Evan Rempel 2023-02-10 17:06:27 UTC
This is now working correctly. I just have to find out what changed before I report on the fix.

Comment 2 Evan Rempel 2023-02-10 17:09:13 UTC
I did not have the perl-generators package installed at the time when this was not working.

After installing perl-generators the rpmdeps started reporting dependencies correctly.

Comment 3 Panu Matilainen 2023-02-13 08:39:15 UTC
Yes, the perl dependency generators have been split to their own package, and not required by rpmbuild/redhat-rpm-config to avoid dragging perl to every single unrelated build, but... I would've expected something like perl-devel to pull in perl-generators, but there doesn't seem to be such a dependency. Reassigning to Perl for comments.

Comment 4 Jitka Plesnikova 2023-02-21 14:49:35 UTC
perl-devel provides Perl header files which are needed, if building architecture-specific code which links to libperl.so library (e.g. an XS Perl module). It means that only part of Perl packages must require it. That's the reason why the package perl-generators is required explicitly for build of all Perl packages. 

Adding perl-generators to perl-devel will not help us. It may rather cause problems in that a customer complains that we are installing something that is not part of the upstream Perl. This has already happened.

Comment 5 Evan Rempel 2023-02-21 15:43:53 UTC
it would be a lot less problematic to include the 6 files with perl-generates when installing perl-devel than it is pulling in the entire gcc/gcc-c++ and kernel headers when installing perl (it is the inclusion of perl-CPAN in the meta package perl that does that).

I'm at the stage of "it's now working for me as long as I remember to include perl-generators" so you can discuss among yourselves and close if you want.

Comment 6 Jitka Plesnikova 2023-04-12 10:53:59 UTC
The perl-generators does not install only 6 files. It also installs perl-Fedora-VSP, perl-libs, perl-File-Basename and their dependencies.

We don't what to install perl-generators and perl-Fedora-VSP on each system where is perl-devel.

Comment 7 Evan Rempel 2023-04-12 13:23:23 UTC
perl-libs and the perl interpreter are already installed as dependencies of perl-devel.

perl-Fedora-VSP has no dependencies that are not already included with perl-devel.

perl-File-Basename has a couple of very small dependencies: perl(Carp), perl(Exporter).


So it would appear that including perl-generators as a dependency of perl-devel would only add: perl-File-Basename, perl(Carp), and perl(Exporter).


Perhaps a different approach would be even better. Creating a meta package for each language that pulls in the necessary packages for building RPMs of that language. rpm-perl, rpm-python, rpm-c etc. The rpm-perl package could have dependencies of perl-interpreter, perl-devel, perl-generators and any other packages that are required for creating rpms out of perl code.

Comment 8 RHEL Program Management 2023-09-20 15:45:00 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 9 RHEL Program Management 2023-09-20 15:50:05 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.