From Fedora Project Wiki

< Perl

Revision as of 16:07, 31 January 2011 by Psabata (talk | contribs) (A little polish here and there)

Essentials

As a distribution, we don't need to install some modules into priv/arch lib and some into vendor. All Fedora Perl modules can be installed just in one directory. Both directories were merged into one in F-14; however, both macros can still be used in package %build section. The vendor directories can be used for users who package their own RPMs and need installation paths for their modules, or for specific version of modules provided by distribution.

@INC F-{14,15}

Currently we have @INC in Fedora:

F-14

 @INC:
   /usr/local/lib64/perl5	-- for CPAN     (site lib)
   /usr/local/share/perl5	-- for CPAN     (site arch)
   /usr/lib64/perl5		-- 3rd party    (vendor lib)
   /usr/share/perl5		-- 3rd party    (vendor arch)
   /usr/lib64/perl5		-- Fedora       (priv lib)
   /usr/share/perl5		-- Fedora       (arch lib)
   /usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi # compatibility directories
   /usr/local/lib/perl5/site_perl/5.10.0
   /usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
   /usr/lib/perl5/vendor_perl
   /usr/lib/perl5/site_perl
   .

F-15

@INC:
   /usr/local/lib/perl5			-- for CPAN     (site lib)
   /usr/local/share/perl5		-- for CPAN     (site arch)
   /usr/lib/perl5/vendor_perl		-- 3rd party    (vendor lib)
   /usr/share/perl5/vendor_perl		-- 3rd party    (vendor arch)
   /usr/lib/perl5			-- Fedora       (priv lib)
   /usr/share/perl5			-- Fedora       (arch lib)
   .

Proposal

All Perl modules should use priv/arch lib directory for Perl modules installation, therefore specfiles %build sections should be changed with respect to the table below:

Fedora ExtUtils::MakeMaker Module::Build
F-14 %{__perl} Makefile.PL INSTALLDIRS=vendor %{__perl} Build.PL installdirs=vendor
F-15 %{__perl} Makefile.PL INSTALLDIRS=perl %{__perl} Build.PL installdirs=core

All user and third party RPMs should use vendor directories for installation. This policy should be used for EL-6 branches.