RPM Help Needed

Gyepi SAM gyepi at praxis-sw.com
Wed Dec 31 01:42:57 CET 2003


On Tue, Dec 30, 2003 at 07:01:07PM -0500, David Relson wrote:
> Greetings,
> 
> I need some help with bogofilter's rpms.
> 
> Having recently upgraded my workstation from Mandrake 9.1 to 9.2, the
> rpms I build have a couple of Mandrake specific dependencies,
> i.e. perl(MIME::Parser), perl(POSIX), and perl(strict).  An rpm built
> with these dependencies won't load on older versions of Mandrake, for
> example 9.1.  I presume there will have comparable difficulty with
> other distributions.
> 
> I have tried using "%define _requires_exceptions ..." statements, but
> can't make all 3 dependencies go away.  At best I can make 1 of the
> dependencies go away.

You can frequently define vendor (or other macro) specific components of an rpm file:

Here's a snippet from a gaim.spec file:

    %if "%{_vendor}" != "MandrakeSoft"
    Requires:   gtk2 >= 2.0.0, mozilla-nss, gtkspell, audiofile, libao
    BuildRequires: libao-devel, gtk2-devel, gtkspell-devel, libtool,...
    %else
    Requires:   gtk+2.0 >= 2.0.0, libnss3
    BuildRequires: libao-devel, libgtk+2.0_0-devel, gtkspell-devel,....
    %endif

do 'rpm --showrc' for all the gory possibilities.

But that gets tiresome very quickly. With respect to the dependencies you
list, all relatively recent versions of perl provide perl(POSIX) and perl(strict) so there's
no need to include them specifically. If you really want, add a Requires tag
for perl. The requires on perl(MIME::Parser) is being generated by contrib/mime.get.rfc822.
Since this is an optional, contrib file, we should ignore its dependencies. A
note in the documentation should suffice.

I recommend that we not not generate dependencies automatically. Matthias sent
an email to the effect that we should re-enable it, but there are other
solutions, which I'll address in another email.

-Gyepi




More information about the Bogofilter mailing list