perl and multilib considerations?

Radu Greab rgreab at fx.ro
Tue Jan 20 00:02:58 UTC 2004


Sorry for the previous post.

At Sun, 18 Jan 2004 23:12:03 -1000,
Warren Togami wrote:
> 
> Requires: perl >= 2:5.8.2
> spamassassin.spec contains this, which is problematic because it must
> change every time perl is upgraded.  The resulting SRPM needs to be
> modified if you rebuild it on older distributions too.  Not a totally
> serious problem, but annoying and consumes developer time on a
> reoccuring basis.
> 
> Requires: %(perl -le 'use Config; print $Config{archlibexp}')
> Currently xchat.spec has this line in an attempt to avoid this problem.
> x86 and x86_64 FC1 outputs this result from that command:
> /usr/lib/perl5/5.8.1/i386-linux-thread-multi
> /usr/lib64/perl5/5.8.1/x86_64-linux-thread-multi
> 
> I am thinking if this xchat.spec method of requiring the right version
> of perl that was in the buildsystem during rpmbuild time can safely be
> used universally.  Are there any cases where we will need to ship both
> 32bit and 64bit perl in a distribution in order to satisfy the
> dependency of existing 32bit programs that may link to perllib?

To summarize,

Requires: perl >= 2:5.8.2
tries to accomplish two different goals at the same time:
- to specify the minimum perl version required by the package
- to make sure that the system perl will find the package in its @INC

Unfortunately it fails, while your proposal would fix the dependency
problems. If the modules install on the vendor libs, in my opinion your
proposal can be further refined in:

- for pure Perl modules (like spamassassin) the dependency should be on
the pure Perl vendor lib directory:
Requires: %(perl -le 'use Config; print $Config{vendorlibexp}')

- for binary modules (like HTML::Parser) the dependency should be on the
pure and binary Perl vendor libs:
Requires: %(perl -le 'use Config; print $Config{vendorlibexp}')
Requires: %(perl -le 'use Config; print $Config{vendorarchexp}')

And maybe a
BuildRequires: perl >= e:v
could be used to specify the minimum perl version required by the module
to build and pass "make test".





More information about the devel mailing list