From f7fe97de94545fc457e3a1e7216bdb87599c476f Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Jan 12 2023 08:43:56 +0000 Subject: Perl: Replace versioned MODULE_COMPAT_ requires by RPM dependency generator Rationale: https://fedoraproject.org/wiki/Changes/Perl_replace_MODULE_COMPAT_by_generator Implemented here: https://src.fedoraproject.org/rpms/perl-generators/pull-request/2 https://github.com/jplesnik/generators/commit/9bc8d5b783f3a1597b2342ce4c15f65f0c607508 --- diff --git a/guidelines/modules/ROOT/pages/Perl.adoc b/guidelines/modules/ROOT/pages/Perl.adoc index c576ccf..785fc4d 100644 --- a/guidelines/modules/ROOT/pages/Perl.adoc +++ b/guidelines/modules/ROOT/pages/Perl.adoc @@ -46,25 +46,11 @@ Perl packages use the virtual `+perl(Foo)+` naming to indicate a given Perl modu It is recommended to include explicit dependencies for core modules, because they can move between sub-packages or disappear from core Perl. -=== Versioned MODULE_COMPAT_ Requires +=== Versioned MODULE_COMPAT_ Requires or `+perl-libs+` -All Perl modules must include the versioned MODULE_COMPAT Requires: +Packages with Perl modules installed in %{perl_vendorarch}, %{perl_vendorlib}, %{perl_privlib} or %{perl_archlib} will automatically gain dependency on `+perl-libs+` for pure Perl modules or a dependency on `+perl(:MODULE_COMPAT_)+` for libraries with compiled code. The dependency is handled by `+perl-generators+`. -.... -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -.... - -This is to ensure that Perl packages 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. - -For example, `+perl-5.8.8+` provided not only `+perl(:MODULE_COMPAT_5.8.8)+`, but also `+perl(:MODULE_COMPAT_5.8.7)+`, etc., because backward compatibility was guaranteed for Fedora Perl 5.8.x. - -On the other hand, `+perl-5.10.1+` implements some incompatible changes to module tree layout and `+libperl.so+` build options. Once the compatibility aids are removed, `+perl-5.10.1+` and above will no longer provide `+perl(:MODULE_COMPAT_5.10.0)+`. - -In the future, it is possible that `+perl-5.12.2+` will provide not only `+perl(:MODULE_COMPAT_5.12.[012])+`, but also `+perl(:MODULE_COMPAT_5.10.[123])+`, if the backward compatibility with all versions >= 5.10.1 is maintained. - -==== Packages that link to `+libperl+` - -Some packages link to `+libperl.so+`, usually to provide embedded Perl functionality. All of these packages must also use the versioned `+MODULE_COMPAT+` dependency, because the automatically generated dependency on `+libperl.so+` does not include any interface version number. +Packages that require the Perl interpreter or `+libperl.so+` but do not install modules to the aforementioned directories or explicitly link to `+libperl.so.+` need to handle the dependency manually. === Filtering Requires and Provides