1238106SdesSummary: Validating, recursive, and caching DNS resolver 2238106SdesName: unbound 3249136SdesVersion: 1.4.18 4238106SdesRelease: 1%{?dist} 5238106SdesLicense: BSD 6238106SdesUrl: http://www.nlnetlabs.nl/unbound/ 7238106SdesSource: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz 8238106Sdes#Source1: unbound.init 9238106SdesGroup: System Environment/Daemons 10238106SdesRequires: ldns 11238106SdesBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 12238106SdesBuildRequires: flex, openssl-devel, expat-devel, ldns-devel 13238106Sdes 14238106Sdes%description 15238106SdesUnbound is a validating, recursive, and caching DNS resolver. 16238106Sdes 17238106SdesThe C implementation of Unbound is developed and maintained by NLnet 18238106SdesLabs. It is based on ideas and algorithms taken from a java prototype 19238106Sdesdeveloped by Verisign labs, Nominet, Kirei and ep.net. 20238106Sdes 21238106SdesUnbound is designed as a set of modular components, so that also 22238106SdesDNSSEC (secure DNS) validation and stub-resolvers (that do not run 23238106Sdesas a server, but are linked into an application) are easily possible. 24238106Sdes 25238106SdesThe source code is under a BSD License. 26238106Sdes 27238106Sdes%prep 28238106Sdes%setup -q 29238106Sdes 30238106Sdes# configure with /var/unbound/unbound.conf so that all default chroot, 31238106Sdes# pidfile and config file are in /var/unbound, ready for chroot jail set up. 32238106Sdes%configure --with-conf-file=%{_localstatedir}/%{name}/unbound.conf --disable-rpath 33238106Sdes 34238106Sdes%build 35238106Sdes#%{__make} %{?_smp_mflags} 36238106Sdesmake 37238106Sdes 38238106Sdes%install 39238106Sdesrm -rf %{buildroot} 40238106Sdes%{__make} DESTDIR=%{buildroot} install 41238106Sdesinstall -d 0700 %{buildroot}%{_localstatedir}/%{name} 42238106Sdesinstall -d 0755 %{buildroot}%{_initrddir} 43238106Sdesinstall -m 0755 contrib/unbound.init %{buildroot}%{_initrddir}/unbound 44238106Sdes# add symbolic link from /etc/unbound.conf -> /var/unbound/unbound.conf 45238106Sdesln -s %{_localstatedir}/unbound/unbound.conf %{buildroot}%{_sysconfdir}/unbound.conf 46238106Sdes# remove static library from install (fedora packaging guidelines) 47238106Sdesrm -f %{buildroot}%{_libdir}/libunbound.a %{buildroot}%{_libdir}/libunbound.la 48238106Sdes 49238106Sdes%clean 50238106Sdesrm -rf ${RPM_BUILD_ROOT} 51238106Sdes 52238106Sdes%files 53238106Sdes%defattr(-,root,root,-) 54238106Sdes%doc doc/README doc/CREDITS doc/LICENSE doc/FEATURES 55238106Sdes%attr(0755,root,root) %{_initrddir}/%{name} 56238106Sdes%attr(0700,%{name},%{name}) %dir %{_localstatedir}/%{name} 57238106Sdes%attr(0644,%{name},%{name}) %config(noreplace) %{_localstatedir}/%{name}/unbound.conf 58238106Sdes%attr(0644,%{name},%{name}) %config(noreplace) %{_sysconfdir}/unbound.conf 59238106Sdes%{_sbindir}/* 60238106Sdes%{_mandir}/*/* 61238106Sdes%{_includedir}/* 62238106Sdes%{_libdir}/libunbound* 63238106Sdes 64238106Sdes%pre 65238106Sdesgetent group unbound >/dev/null || groupadd -r unbound 66238106Sdesgetent passwd unbound >/dev/null || \ 67238106Sdesuseradd -r -g unbound -d /var/unbound -s /sbin/nologin \ 68238106Sdes -c "unbound name daemon" unbound 69238106Sdesexit 0 70238106Sdes 71238106Sdes%post 72238106Sdes# This adds the proper /etc/rc*.d links for the script 73238106Sdes/sbin/chkconfig --add %{name} 74238106Sdes 75238106Sdes%preun 76238106Sdesif [ $1 -eq 0 ]; then 77238106Sdes /sbin/service %{name} stop >/dev/null 2>&1 78238106Sdes /sbin/chkconfig --del %{name} 79238106Sdes # remove root jail 80238106Sdes rm -f /var/unbound/dev/log /var/unbound/dev/random /var/unbound/etc/localtime /var/unbound/etc/resolv.conf >/dev/null 2>&1 81238106Sdes rmdir /var/unbound/dev >/dev/null 2>&1 || : 82238106Sdes rmdir /var/unbound/etc >/dev/null 2>&1 || : 83238106Sdes rmdir /var/unbound >/dev/null 2>&1 || : 84238106Sdesfi 85238106Sdes 86238106Sdes%postun 87238106Sdesif [ "$1" -ge "1" ]; then 88238106Sdes /sbin/service %{name} condrestart >/dev/null 2>&1 || : 89238106Sdesfi 90238106Sdes 91238106Sdes%changelog 92238106Sdes* Thu Jul 13 2011 Wouter Wijngaards <wouter@nlnetlabs.nl> - 1.4.8 93238106Sdes- ldns required and ldns-devel required for build, no more ldns-builtin. 94238106Sdes 95238106Sdes* Thu Mar 17 2011 Wouter Wijngaards <wouter@nlnetlabs.nl> - 1.4.8 96238106Sdes- removed --disable-gost, assume recent openssl on the destination platform. 97238106Sdes 98238106Sdes* Wed Mar 16 2011 Harold Jones <hajones@verisign.com> - 1.4.8 99238106Sdes- Bump version number to latest 100238106Sdes- Add expat-devel to BuildRequires 101238106Sdes- Added --disable-gost for building on CentOS 5.x 102238106Sdes- Added --with-ldns-builtin for CentOS 5.x 103238106Sdes 104238106Sdes* Thu May 22 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 1.0.0 105238106Sdes- contrib changes from Patrick Vande Walle. 106238106Sdes 107238106Sdes* Thu Apr 25 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.12 108238106Sdes- Using parts from ports collection entry by Jaap Akkerhuis. 109238106Sdes- Using Fedoraproject wiki guidelines. 110238106Sdes 111238106Sdes* Wed Apr 23 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.11 112238106Sdes- Initial version. 113