Policy for Requires in spec files supporting optional features

Michael A. Peters mpeters at mac.com
Mon Jan 9 18:32:40 UTC 2006


On Mon, 2006-01-09 at 18:13 +0000, Tim Jackson wrote:
> Hi,
> 
> I realise it's quite hard to generalise these things, but is there any
> kind of general policy on the use of Requires: when packages have certain
> (runtime) dependencies that they will work without, but which are required
> for full functionality? I believe that some other packaging systems have a
> way of specifying "suggested dependencies", which is what's needed here,
> but RPM doesn't (unless I'm missing something).

No it doesn't.
I wish it did - I've got one package where I wish it did.
It could be done in rpm such that rpm ignores, but front ends (ie yum)
could be configured to add them to the transaction.

perl-Readonly is a case where it would benefit from this.
perl-Readonly gets a performance boost if perl-Readonly-XS is installed,
but it can not explicitly require it because perl-Readonly-XS requires
perl-Readonly to build so that would cause some problems.

It would be nice though to have a suggest tag so that perl-Readonly
could suggest perl-Readonly-XS and yum etc. could be configured to just
grab it.

*snip*

> 
> An example would be swaks (http://jetmore.org/john/code/#swaks). It's a
> reasonably substantial and very useful Perl application. I have a working
> spec file and rpmbuild auto-discovers the following requirements:
> 
> perl(Getopt::Long) perl(IO::Socket) perl(Sys::Hostname) perl(Time::Local)
> perl(strict)
> 
> With these requirements installed, the program runs and can perform some
> tasks. However, for full functionality a number of other modules are
> required:
> 
> perl(Net::DNS) perl(Net::SSLeay) perl(MIME::Base64) perl(Time::HiRes)
> perl(Digest::MD5) perl(Authen::NTLM) perl(Authen::DigestMD5)
> 
> Without these, not all the functionality of the program will work. For
> example, if you try to connect to an SMTP server that requires NTLM
> authentication (swaks is an SMTP tester), it will bomb out if Authen::NTLM
> is not installed.

Personally - I would manually add them to the Requires

> 
> Clearly I *could* omit the "non required" deps, but at the same time most
> users (myself included) would probably want/expect/prefer the program to
> "just work" in its fully-functional form, in which case it would be a pain
> for them to have to go manually hunting for and installing the deps they
> need to give it full functionality. So there is obviously a tradeoff
> between "dependency bloat" and "making more things work out-of-the-box"
> 
> I *could* create some fake subpackages (e.g. swaks-ntlm) with the extended
> requirements, but this seems rather like overkill for a small project and
> isn't very elegant.
> 
> Any comments/suggestions appreciated. TIA.

Suggests would solve the issue - I'm guessing though in your case, just
adding them as explicit requires would be best.




More information about the fedora-extras-list mailing list