From Fedora Project Wiki

< Perl

Revision as of 12:38, 18 March 2011 by Mmaslano (talk | contribs) (→‎Proposal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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 in different Fedoras

Currently we have @INC in Fedora:


   /usr/local/%{_lib}/perl5	-- for CPAN     (site arch)
   /usr/local/share/perl5	-- for CPAN     (site lib)
   %{_libdir}/perl5		-- Fedora       (vendor arch)
   /usr/share/perl5		-- Fedora       (vendor lib)
   %{_libdir}/perl5		-- Fedora       (priv arch)
   /usr/share/perl5		-- Fedora       (arch lib)
   /usr/local/%{_lib}/perl5/site_perl/5.10.0/x86_64-linux-thread-multi # compatibility directories


   /usr/local/%{_lib}/perl5		-- for CPAN     (site arch)
   /usr/local/share/perl5		-- for CPAN     (site lib)
   %{_libdir}/perl5/vendor_perl		-- 3rd party    (vendor arch)
   /usr/share/perl5/vendor_perl		-- 3rd party    (vendor lib)
   %{_libdir}/perl5			-- Fedora       (priv arch)
   /usr/share/perl5			-- Fedora       (priv lib)

Usage of macro

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.