[Mimedefang] Overcoming RPM stupidity

Michael Lang michi+mimedefang at relay3.jackal-net.at
Wed Dec 20 01:19:50 EST 2006


On Tue, Dec 19, 2006 at 09:21:44PM -0500, Jeff Rife wrote:
> On 19 Dec 2006 at 22:09, Michael Lang wrote:
> 
> > On Tue, Dec 19, 2006 at 12:57:03PM -0600, Richard Laager wrote:
> > > On Sun, 2006-12-17 at 20:46 -0500, Jeff Rife wrote:
> > > > In the Fedora 6 RPM for MIMEDefang, mimedefang.pl was created using no 
> 
> Well, the bug has been reported and the solution they came up with to 
> add perl-Unix-Syslog to the requirements for mimedefang...which will 
> mean that anybody who for some reason wants to use Sys::Syslog can't.  
> It's the exact opposite of my problem, but I don't suppose anybody else 
> will notice.
> 
> I probably wouldn't have cared if my edits to mimedefang.pl hadn't been 
> silently overwritten.

that will happen again aslong as you dont follow the guides of RPM :) 
the config files in the Spec of Davids RPM are the correct ones to add
your own modification without getting them overwritten next update, BUT 
you also need to take care for your own if function layout changes, or new
functions get introduced ...

%config(noreplace) /etc/mail/mimedefang-filter
%config(noreplace) /etc/mail/sa-mimedefang.cf
%config(noreplace) /etc/mail/sa-mimedefang.cf.example
%config(noreplace) /etc/sysconfig/%{name}

for my side i only modifyed less as possible in the original files and added a
require('myfilter.pl') the mimedefang-filter file. I overwrite there the functions
i need or add additional ones ...

> 
> >                             Doing mystic things in %post and so isnt a good
> > idea cause, you may shoot some dependencies used by other packages (conflicts
> > with Unix::Syslog) or there's maybe no Network connectivity to CPAN mirrors, ...
> 
> Well, you could just build the package with and without Unix::Syslog 
> available and diff all the files.  Then, when you find the one file 
> that is changed is mimedefang.pl, you can have %post do a patch *if* a 
> perl script finds that Unix::Syslog is installed on the system. 
> 
> Of course, if RPM had a more flexible "requirements" syntax, you could 
> have things like optional requirements or "pick one of" (as this is).

hmm thats not what i meant ... currently you have two packages for mimedefang from 
the default spec. If David or someone seperates the logfunctions into an additional
Script and uses a require to add this function it would be possible to handle it the
same way as i do with the filter itself. The Spec whould then build
 mimedefang 		(Core)
 mimedefang-contrib 	(contrib)
 mimedefang-modules 	(Sys::Syslog)

you could then build a 
 mimedefang-modules-unix-syslog

adding your Syslog functionality and simple replace the provided with your own.
Greetz mIke

> 
> 
> --
> Jeff Rife | "This?  This is ice.  This is what happens to 
>           |  water when it gets too cold.  This?  This is 
>           |  Kent.  This is what happens to people when 
>           |  they get too sexually frustrated." 
>           |         -- Chris Knight, "Real Genius" 
> 
> 
> _______________________________________________
> NOTE: If there is a disclaimer or other legal boilerplate in the above
> message, it is NULL AND VOID.  You may ignore it.
> 
> Visit http://www.mimedefang.org and http://www.roaringpenguin.com
> MIMEDefang mailing list MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20061220/f7699940/attachment.sig>


More information about the MIMEDefang mailing list