From Fedora Project Wiki

Perl: Replace MODULE_COMPAT by macro

Summary

The versioned perl(:MODULE_COMPAT_XXX) (provided by perl-libs) will be required only by multi-arch packages. For those packages, we need to ensure that the packages will use the right libperl.so for the Perl used during the rebuild.

The noarch packages will depend on non-version perl-libs.

The macro %perl_require_compat will evaluate the requires based on %{_target_cpu}. The macro will be defined in the rpm perl-srpm-macros and the definition is:

%perl_require_compat %[ "%{_target_cpu}" == "noarch" ? "perl-libs" : "%{!?perl_version:perl-libs}%{?perl_version:perl(:MODULE_COMPAT_%{perl_version})}" ]

Owner

Current status

  • Targeted release: Fedora Linux 38
  • Last updated: 2022-11-08
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Completed items

Items in progress

  • Add %perl_require_compat macro to perl-srpm-macros in F38
  • Add %perl_require_compat macro to perl-srpm-macros in F37
  • Add %perl_require_compat macro to perl-srpm-macros in F36
  • Add %perl_require_compat macro to perl-srpm-macros in F35
  • Update Fedora Packaging Guidelines for Perl
  • Replace perl(:MODULE_COMPAT_XXX) by %perl_require_compat dependency in all F38 spec files (3335)
    • Have to update all kinds of dependencies: Requires, Recommends, Suggests

Detailed Description

The list of packages that need to be rebuilt with the new major version of Perl is determined according to the dependency on perl(:MODULE_COMPAT_XXX) now.

However, only multi-arch packages need to have a dependency on the particular version of Perl it was built against, or on a newer version of Perl that provides backward compatibility with it.

The noarch packages don't need to be rebuild against each new major version of Perl, they only need to require perl-libs which includes all directories used by all Perl modules.

The macro %perl_requires_compat will be evaluated to the correct value. There is only one exception: the macro will be evaluate to MODULE_COMPAT for noarch package only when it is the sub-package and the main package is multi-arch.

Benefit to Fedora

It will simplify the rebuild and reduce the number of packages which have to be rebuild. It should currently be enough to rebuild only multi-arch packages and those that are part of the Perl itself (dual-life packages). Here we need to ensure that the packages will use the right libperl.so for the Perl used.

Scope

  • Proposal owners:
    • Submit Fedora Packaging Guidelines for Perl update to Fedora Packaging Committee.
    • Update and rebuild perl-srpm-macros source package.
    • Add %perl_require_compat to perl-srpm-macros package in older Fedoras.
    • Replace Requires for perl(:MODULE_COMPAT_XXX) with %perl_require_compat in all spec files.
  • Other developers: Get familiar with new Fedora Packaging Guidelines for Perl.
  • Policies and guidelines: N/A (not needed for this Change)
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

N/A

How To Test

All multi-arch packages which use the macro should run-require perl(:MODULE_COMPAT_%{perl_version}) and the noarch packages should run-requires perl-libs except the case listed in Detailed Description.

User Experience

There should not be any remarkable change in user experience.

Dependencies

This change will affect 3259 source packages and 2500 binary packages. Their spec files will be updated. The rebuild of affected packages will be done by mass rebuild of Fedora 38 . There is no dependency on other Fedora changes


Contingency Plan

  • Contingency mechanism: The change will be reverted.
  • Contingency deadline: Before Mass Rebuild.
  • Blocks release? No.

Documentation

N/A (not a System Wide Change)

Release Notes