[Mimedefang] Overcoming RPM stupidity

Jeff Rife mimedefang at nabs.net
Sun Dec 17 20:46:19 EST 2006


In the Fedora 6 RPM for MIMEDefang, mimedefang.pl was created using no 
"Features" at all.  For most of them, this isn't a big deal, as I can 
put "$Features{'whatever'} = 1" in mimedefang-filter and it works.

But, this isn't true for Unix::Syslog (or at least I haven't found a 
way to overcome it).

If Unix::Syslog exists during ./configure, then the following line ends 
up in mimedefang.pl:

use Unix::Syslog qw(:macros :subs); $Features{"Unix::Syslog"} = 1;

Otherwise, we have:

use Sys::Syslog qw(:DEFAULT setlogsock); $Features{"Unix::Syslog"} = 0;

The trouble is that if this second line exists, then there is nothing I 
have found that I can put in mimedefang-filter that makes Unix::Syslog 
be used.  Just "$Features{'Unix::Syslog'} = 1;" won't do it, because 
the function "openlog" that is seen is defined in Sys/Syslog.pm, 
because Unix::Syslog hasn't been use'd.

Adding "use Unix::Syslog qw(:macros :subs);" to mimedefang-filter with 
the "use Sys::Syslog" line in mimedefang.pl results in errors like the 
following:

Prototype mismatch: sub main::syslog: none vs ($$@) at /etc/mail/mimedefang-filter line 26
        main::BEGIN() called at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Unix/Syslog.pm line 26
        eval {...} called at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Unix/Syslog.pm line 26
        require /etc/mail/mimedefang-filter called at ./mimedefang.pl line 4888
        main::main called at ./mimedefang.pl line 7226

My solution was just to edit mimedefang.pl to have the correct line so 
that Unix::Syslog would be used, but the next time the RPM is updated, 
that'll be silently overwritten.

Any ideas?


--
Jeff Rife | "One minute we were spanking each other with 
          |  meat, and the next minute it got weird." 
          |  
          |         -- Joe Hackett, "Wings" 





More information about the MIMEDefang mailing list