[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/1.2.03.1/maradns-1.2.03.1-1.src.rpm - , 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 
   install)
 + 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
Version: 1.2.03.1
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

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

%prep
%setup 

%build
%{__make} %{?_smp_mflags}

%install
%{__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

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%doc CHANGELOG COPYING CREDITS FAQ doc/*
%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/
%{_bindir}/askmara
%{_bindir}/duende
%{_bindir}/fetchzone
%{_bindir}/getzone
%{_sbindir}/maradns
%{_sbindir}/zoneserver

%post
/sbin/chkconfig --add maradns

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

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


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


More information about the users mailing list