[suggest] Re: New package: Maradns

Dag Wieers dag at wieers.com
Fri Jan 27 22:36:38 CET 2006

On Fri, 27 Jan 2006, Greg Swallow - SkyNet wrote:

> Hi Dag et al, the authour of Maradns looks like he could use your expertise.
> I'm not sure if you're familiar with Maradns - see http://www.maradns.org/
> and http://sourceforge.net/projects/maradns
> He has a source rpm -
> http://maradns.org/download/1.2/ - , but
> it only builds on Redhat 6.2 according to his website.  
> It wouldn't build for me and I made the attached changes to the spec file to
> let it build on Centos4.  But my changes could definitely be improved by one
> of you that knows how to write a good specfile ;-) 

Ok, I looked at the source RPM and created my own SPEC file. But I noticed 
too many inconsistencies (and non-standard decisions) that I don´t think I 
should fix. I´ve attached my SPEC file, ideally it should look like that.

Things that I found wrong:

 + sysv script should be installed with chkconfig, not by make install
 + mandir should point to %{datadir}/man (where %{datadir} equals 
   %{prefix}/share), not %{prefix}/man
 + make install usually has a variable DESTDIR that points to a custoñ 
   buildroot. Checking for RPM_BUILD_ROOT is nice, but having a standard 
   DESTDIR is better.
 + make install should create the directories (or use install -D -mMASK to 
 + make us of macros where possible

> Thanks for all your hard work guys.  Much appreciated!

If he could fix these (and look at eg. dnsmasq as an example daemon RPM 
package) I´ll take another look at packaging maradns.

Kind regards,
--   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]
-------------- next part --------------
# $Id$
# Authority: dag

# Tag: test

Summary: Authoritative and recursive DNS server made with security in mind
Name: maradns
Release: 1
License: BSD
Group: Applications/Internet
URL: http://www.maradns.org/

Source: http://www.maradns.org/download/1.2/%{version}/maradns-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

MaraDNS is an authoritative and recursive DNS server made with
security and embedded systems in mind.


%{__make} %{?_smp_mflags}

%{__rm} -rf %{buildroot}
%{__install} -d -m0755 %{buildroot}%{_bindir}
%{__install} -d -m0755 %{buildroot}%{_sbindir}
%{__install} -d -m0755 %{buildroot}%{_mandir}/man{1,5,8}/
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/maradns/
%{__install} -d -m0755 %{buildroot}%{_initrddir}
%{__make} install PREFIX="%{buildroot}%{_prefix}"
%{__install} -D -m0644 build/rpm.mararc %{buildroot}%{_sysconfdir}/mararc

%{__rm} -rf %{buildroot}

%defattr(-, root, root, 0755)
%doc %{_mandir}/man1/askmara.1*
%doc %{_mandir}/man1/getzone.1*
%doc %{_mandir}/man1/fetchzone.1*
%doc %{_mandir}/man5/csv1.5*
%doc %{_mandir}/man5/csv2.5*
%doc %{_mandir}/man5/csv2_txt.5*
%doc %{_mandir}/man5/mararc.5*
%doc %{_mandir}/man8/maradns.8*
%doc %{_mandir}/man8/zoneserver.8*
%doc %{_mandir}/man8/duende.8*
%config(noreplace) %{_sysconfdir}/mararc
%config %{_sysconfdir}/maradns/db.example.net
%config %{_initrddir}/maradns
%dir %{_sysconfdir}/maradns/

/sbin/chkconfig --add maradns

if [ $1 -eq 0 ]; then
        /sbin/service maradns stop &>/dev/null || :
        /sbin/chkconfig --del maradns

/sbin/service maradns condrestart &>/dev/null || :

* Fri Jan 27 2006 Dag Wieers <dag at wieers.com> -
- Updated to release

More information about the users mailing list