<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.rosa.ru/index.php?action=history&amp;feed=atom&amp;title=Perl_policy</id>
	<title>Perl policy - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.rosa.ru/index.php?action=history&amp;feed=atom&amp;title=Perl_policy"/>
	<link rel="alternate" type="text/html" href="http://wiki.rosa.ru/index.php?title=Perl_policy&amp;action=history"/>
	<updated>2026-05-08T12:53:01Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.rosa.ru/index.php?title=Perl_policy&amp;diff=94&amp;oldid=prev</id>
		<title>PastorDi: Новая страница: «==Rules==  ===Dependencies=== No explicit dependency should be needed. rpm automatically adds a versioned dependency on perl-base, and scans files for additional perl module dependencies (both required and provided).  If this research fails to find some dependencies, you have to provide it explicitly:   Requires: perl(Foo)  Provides: perl(Bar)  If this research produces wrong dependencies, you have to filter them:   %define __noautoprov &#039;perl\\(Foo\\)&#039;  %def...»</title>
		<link rel="alternate" type="text/html" href="http://wiki.rosa.ru/index.php?title=Perl_policy&amp;diff=94&amp;oldid=prev"/>
		<updated>2025-03-13T19:41:37Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «==Rules==  ===Dependencies=== No explicit dependency should be needed. rpm automatically adds a versioned dependency on perl-base, and scans files for additional perl module dependencies (both required and provided).  If this research fails to find some dependencies, you have to provide it explicitly:   Requires: perl(Foo)  Provides: perl(Bar)  If this research produces wrong dependencies, you have to filter them:   %define __noautoprov &amp;#039;perl\\(Foo\\)&amp;#039;  %def...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Rules==&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
No explicit dependency should be needed. rpm automatically adds a versioned dependency on perl-base, and scans files for additional perl module dependencies (both required and provided).&lt;br /&gt;
&lt;br /&gt;
If this research fails to find some dependencies, you have to provide it explicitly:&lt;br /&gt;
&lt;br /&gt;
 Requires: perl(Foo)&lt;br /&gt;
 Provides: perl(Bar)&lt;br /&gt;
&lt;br /&gt;
If this research produces wrong dependencies, you have to filter them:&lt;br /&gt;
&lt;br /&gt;
 %define __noautoprov &amp;#039;perl\\(Foo\\)&amp;#039;&lt;br /&gt;
 %define __noautoreq &amp;#039;perl\\(Bar\\)&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Considering the relatively large number of bugs, a correct dependency computing algorithm is still to be integrated. The perl module Module::ScanDeps is known to make a good job of this.&lt;br /&gt;
&lt;br /&gt;
===Build Dependencies===&lt;br /&gt;
&lt;br /&gt;
The minimum build dependencies are:&lt;br /&gt;
&lt;br /&gt;
* perl(Module::Build) if using Module::Build&lt;br /&gt;
* perl-devel unconditionally for native packages, and only before Mandrake 10.0 for pure perl packages if using ExtUtils::MakeMaker&lt;br /&gt;
&lt;br /&gt;
In order to be independent of exact module location (either in its own package or part of a standard perl library), build dependencies on additional perl modules should be expressed on perl modules, with automatic dependency syntax:&lt;br /&gt;
&lt;br /&gt;
 BuildRequires: perl(Foo::Bar)&lt;br /&gt;
&lt;br /&gt;
And not on the perl package itself:&lt;br /&gt;
&lt;br /&gt;
 BuildRequires: perl-Foo-Bar&lt;br /&gt;
&lt;br /&gt;
===Naming===&lt;br /&gt;
All modules should be called perl-Foo-Bar, with Foo-Bar standing for the name of the CPAN distribution used. (These names are often, but not always, related to the main Perl module of the distribution, e.g. Foo::Bar.)&lt;br /&gt;
&lt;br /&gt;
===Versioning===&lt;br /&gt;
&lt;br /&gt;
Perl modules use numerical version numbers, whereas rpm uses alphanumerical version numbers, causing repeated ordering troubles. For instance DateTime 0.2901 is supposed to be an earlier release than 0.31...&lt;br /&gt;
&lt;br /&gt;
In ROSA Linux, we normalize all perl modules version through %perl_convert_version macro:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
%define upstream_name       Config-Model&lt;br /&gt;
%define upstream_version    0.636&lt;br /&gt;
&lt;br /&gt;
Name:       perl-%{upstream_name}&lt;br /&gt;
Version:    %perl_convert_version %{upstream_version}&lt;br /&gt;
Release:    1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sources URL===&lt;br /&gt;
Maintainer-based sources URL, such as http://search.cpan.org/CPAN/authors/id/F/FO/FOO/%{module}-%{version}.tar.bz2, are not stable enough, as distribution maintainer may change without notice. Better use distribution-based URL: http://www.cpan.org/modules/by-module/FOO/%{module}-%{version}.tar.bz2.&lt;br /&gt;
&lt;br /&gt;
Also, FTP download behind a firewall is a pain, hence the preference for HTTP URLs.&lt;br /&gt;
&lt;br /&gt;
===URL===&lt;br /&gt;
&lt;br /&gt;
All modules coming from CPAN should have the proper unversioned URL tag defined to http://search.cpan.org/dist/%{module} (except a few special cases where they have their own project site, see for example perl-DBI).&lt;br /&gt;
&lt;br /&gt;
===Man pages===&lt;br /&gt;
Man pages should be generated from POD. Some modules define INSTALLMAN3DIR =&amp;gt; &amp;#039;none&amp;#039; in Makefile.PL, just delete this entry to revert to default behaviour.&lt;br /&gt;
&lt;br /&gt;
===Installation directory===&lt;br /&gt;
Perl modules should be installed under vendor_perl hierarchy, not under default site_perl hierarchy. Just add the option INSTALLDIRSvendor= when generating the Makefile:&lt;br /&gt;
&lt;br /&gt;
 %{__perl} Makefile.PL INSTALLDIRS=vendor&lt;br /&gt;
&lt;br /&gt;
or, if the module uses the Module::Build framework instead of ExtUtils::MakeMaker,&lt;br /&gt;
&lt;br /&gt;
 %{__perl} Build.PL installdirs=vendor&lt;br /&gt;
&lt;br /&gt;
===Directory ownership===&lt;br /&gt;
Perl packages should own all directories containing files that are located under the vendor_perl hierarchy top-directory. This is required by the fact that perl namespace organization is not related to inheritance, meaning there is no warranty that package perl-Foo-Bar will depend on package perl-Foo. As a consequence, perl-Foo-Bar needs to own the Foo directory, otherwise it&amp;#039;s installation and deinstallation is likely to leave an unowned directory Foo on the system.&lt;br /&gt;
&lt;br /&gt;
The usual way to achieve this in %file section is:&lt;br /&gt;
&lt;br /&gt;
 %{perl_vendorlib}/Foo&lt;br /&gt;
&lt;br /&gt;
or, for native packages:&lt;br /&gt;
&lt;br /&gt;
 %{perl_vendorarch}/Foo&lt;br /&gt;
 %{perl_vendorarch}/auto/Foo&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
The official tool to generate a rpm directly from CPAN modules is cpan2dist, with the Mandriva backend CPANPLUS-Dist-Mdv.&lt;br /&gt;
&lt;br /&gt;
   # urpmi perl-CPANPLUS-Dist-Mdv &lt;br /&gt;
   [... later on ...]&lt;br /&gt;
   $ cpan2dist --format CPANPLUS::Dist::Mdv Module::To::Transform::In::Rpm&lt;br /&gt;
&lt;br /&gt;
Note: cpan2dist should be run with root privileges and all necessary rpmbuild subfolders should exists:&lt;br /&gt;
&lt;br /&gt;
 mkdir -p ~/rpmbuild/RPMS &lt;br /&gt;
 mkdir -p ~/rpmbuild/SOURCES&lt;br /&gt;
 mkdir -p ~/rpmbuild/SPECS&lt;br /&gt;
 mkdir -p ~/rpmbuild/SRPMS&lt;br /&gt;
 mkdir -p ~/rpmbuild/tmp&lt;br /&gt;
&lt;br /&gt;
In order not have to specify the format parameter each time, you can update the dist_type line in ~/.cpanplus/lib/CPANPLUS/Config/User.pm to read:&lt;br /&gt;
&lt;br /&gt;
 $conf-&amp;gt;set_conf( dist_type =&amp;gt; &amp;#039;CPANPLUS::Dist::Mdv&amp;#039; );&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
&lt;br /&gt;
[https://docs.fedoraproject.org/en-US/packaging-guidelines/Perl/ Fedora policy]&lt;br /&gt;
&lt;br /&gt;
[[Категория:Политики сборки пакетов]]&lt;/div&gt;</summary>
		<author><name>PastorDi</name></author>
	</entry>
</feed>