Request for approval: perl-Mail-SPF-Query and perl-Net-CIDR-Lite

Paul Howarth paul at city-fan.org
Mon Jul 18 15:26:04 UTC 2005


Steven Pritchard wrote:
> amavisd-new (which I'm working on right now) and spamassassin both
> want this:
> 
>   http://ftp.kspei.com/pub/steve/rpms/perl-Mail-SPF-Query-1.997-1.src.rpm

Good:
- package name obviously correct
- spec file name correct
- license correct
- tarball md5sum matches upstream
- package builds fine on FC4
- no buildrequires needed
- no locale data to worry about
- no shared libraries to worry about
- no relocations
- all directories owned properly
- no duplicate files
- no bogus permissions
- clean section present and correct
- no optimization macros needed for noarch perl package
- package contains code, not content
- no large documentation files
- docs don't affect running of code
- no header files, libraries or pkgconfig files to worry about
- no scriptlets or subpackages to worry about

Bad:
- missing BuildRequires (from Makefile.PL):
   perl(Net::DNS) >= 0.46,
   perl(Net::CIDR::Lite) >= 0.15,
   perl(Sys::Hostname::Long) >= 1.0
   the latter is not yet included in Extras or up for review
- rpmlint output not empty, due to permissions issues on and in the 
samples directory. I'd fix the 2755 permission on the samples directory 
itself but wouldn't worry about the non-executable scripts in there 
(which are %%doc files)
- license text not included in %%doc

For discussion:
- the test phase is skipped because it does a lot of external DNS 
lookups - is this the right thing to do?
- there is a bug in the handling of non-SPF TXT records with "fallback" 
in Mail::SPF::Query; the attached patch is what I use in my own package 
of this module to fix it.

I'd like to see spfd and spfquery brought into the alternatives system. 
This is because there are other implementations of these (e.g. in libspf 
and libspf2, both of which I hope to include in extras when they're 
ready), and it would be useful to be able to install them in parallel 
with this package.

Here's what I do:

Requires(post):         %{_sbindir}/alternatives
Requires(preun):        %{_sbindir}/alternatives
Requires(postun):       %{_sbindir}/alternatives

In %install:
mv $RPM_BUILD_ROOT%{_bindir}/spfquery 
$RPM_BUILD_ROOT%{_bindir}/spfquery.Mail::SPF::Query
mv $RPM_BUILD_ROOT%{_bindir}/spfd 
$RPM_BUILD_ROOT%{_bindir}/spfd.Mail::SPF::Query

Add scriptlets:
%post
%{_sbindir}/alternatives --install %{_bindir}/spfquery spf 
%{_bindir}/spfquery.Mail::SPF::Query 50 \
         --slave %{_bindir}/spfd spf-daemon %{_bindir}/spfd.Mail::SPF::Query
exit 0

%preun
if [ $1 = 0 ]; then
         %{_sbindir}/alternatives --remove spf 
%{_bindir}/spfquery.Mail::SPF::Query
fi
exit 0

%postun
if [ "$1" -ge "1" ]; then
         spf=`%{_bindir}/readlink /etc/alternatives/spf`
         if [ "$spf" == "%{_bindir}/spfquery.Mail::SPF::Query" ]; then
                 %{_sbindir}/alternatives --set spf 
%{_bindir}/spfquery.Mail::SPF::Query
         fi
fi
exit 0

Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MSQ-fallback.patch
Type: text/x-patch
Size: 728 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20050718/2821dabb/attachment.bin>


More information about the fedora-extras-list mailing list