Policy for Requires in spec files supporting optional features

Tim Jackson lists at timj.co.uk
Mon Jan 9 18:13:50 UTC 2006


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).

Clearly in some cases (e.g. php) some of the functionality can be split
off into sub-packages that have their own Requires, and users install the
subpackages of their choosing. However, for many runtime libraries and
programs (e.g. Perl, PHP, CPAN, PEAR) there are deps that can't be split
off.

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.

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.

Tim




More information about the fedora-extras-list mailing list