05f86a0
Summary: Validating, recursive, and caching DNS(SEC) resolver
05f86a0
Name: unbound
7403530
Version: 1.1.1
482e5e4
Release: 7%{?dist}
05f86a0
License: BSD
05f86a0
Url: http://www.nlnetlabs.nl/unbound/
05f86a0
Source: http://www.unbound.net/downloads/%{name}-%{version}.tar.gz
05f86a0
Source1: unbound.init
05f86a0
Source2: unbound.conf
d2fe1dc
Source3: unbound.munin
fbc16b5
Patch0: unbound-1.1-scandir.patch
482e5e4
Patch1: unbound-1.1-checkconf.patch
05f86a0
Group: System Environment/Daemons
05f86a0
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
c41f9f1
BuildRequires: flex, openssl-devel, ldns-devel >= 1.4.0, libevent-devel
05f86a0
Requires(post): chkconfig
05f86a0
Requires(preun): chkconfig
05f86a0
Requires(preun): initscripts
05f86a0
Requires(postun): initscripts
c41f9f1
Requires: ldns >= 1.4.0
05f86a0
Requires(pre): shadow-utils
1e7e03b
Requires: selinux-policy >= 3.5.13-33
05f86a0
# Is this obsolete?
05f86a0
#Provides: caching-nameserver
05f86a0
05f86a0
%description
05f86a0
Unbound is a validating, recursive, and caching DNS(SEC) resolver.
05f86a0
05f86a0
The C implementation of Unbound is developed and maintained by NLnet
05f86a0
Labs. It is based on ideas and algorithms taken from a java prototype
05f86a0
developed by Verisign labs, Nominet, Kirei and ep.net.
05f86a0
05f86a0
Unbound is designed as a set of modular components, so that also
05f86a0
DNSSEC (secure DNS) validation and stub-resolvers (that do not run
05f86a0
as a server, but are linked into an application) are easily possible.
05f86a0
d2fe1dc
%package munin
d2fe1dc
Summary: Plugin for the munin / munin-node monitoring package
d2fe1dc
Group:     System Environment/Daemons
d2fe1dc
Requires: munin-node
d2fe1dc
Requires: %{name} = %{version}-%{release}
d2fe1dc
d2fe1dc
%description munin
d2fe1dc
Plugin for the munin / munin-node monitoring package
d2fe1dc
05f86a0
%package devel
05f86a0
Summary: Development package that includes the unbound header files
05f86a0
Group: Development/Libraries
05f86a0
Requires: %{name}-libs = %{version}-%{release}, openssl-devel, ldns-devel
05f86a0
Requires: libevent-devel
05f86a0
05f86a0
%description devel
05f86a0
The devel package contains the unbound library and the include files
05f86a0
05f86a0
%package libs
05f86a0
Summary: Libraries used by the unbound server and client applications
05f86a0
Group: Applications/System
05f86a0
Requires(post): /sbin/ldconfig
05f86a0
Requires(postun): /sbin/ldconfig
05f86a0
05f86a0
%description libs
05f86a0
Contains libraries used by the unbound server and client applications
05f86a0
05f86a0
%prep
05f86a0
%setup -q 
291d242
%patch0 -p0
482e5e4
%patch1 -p0
05f86a0
05f86a0
%build
05f86a0
%configure  --with-ldns= --with-libevent --with-pthreads --with-ssl \
05f86a0
            --disable-rpath --enable-debug --disable-static \
12d3cd5
            --with-conf-file=%{_sysconfdir}/%{name}/unbound.conf \
05f86a0
            --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid
05f86a0
%{__make} CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" QUIET=no %{?_smp_mflags}
05f86a0
05f86a0
%install
05f86a0
rm -rf %{buildroot}
05f86a0
%{__make} DESTDIR=%{buildroot} install
05f86a0
install -d 0755 %{buildroot}%{_initrddir}
05f86a0
install -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/unbound
12d3cd5
install -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/unbound
12d3cd5
# Install munin plugin and its softlinks
d2fe1dc
install -d 0755 %{buildroot}%{_sysconfdir}/munin/plugin-conf.d
d2fe1dc
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/munin/plugin-conf.d/unbound
d2fe1dc
install -d 0755 %{buildroot}%{_datadir}/munin/plugins/
d2fe1dc
install -m 0755 contrib/unbound_munin_ %{buildroot}%{_datadir}/munin/plugins/unbound
12d3cd5
for plugin in unbound_munin_hits unbound_munin_queue unbound_munin_memory unbound_munin_by_type unbound_munin_by_class unbound_munin_by_opcode unbound_munin_by_rcode unbound_munin_by_flags unbound_munin_histogram; do
12d3cd5
    ln -s unbound %{buildroot}%{_datadir}/munin/plugins/$plugin
12d3cd5
done 
05f86a0
05f86a0
# remove static library from install (fedora packaging guidelines)
05f86a0
rm -rf %{buildroot}%{_libdir}/*.la
05f86a0
05f86a0
mkdir -p %{buildroot}%{_localstatedir}/run/unbound
05f86a0
05f86a0
%clean
05f86a0
rm -rf ${RPM_BUILD_ROOT}
05f86a0
05f86a0
%files 
05f86a0
%defattr(-,root,root,-)
05f86a0
%doc doc/README doc/CREDITS doc/LICENSE doc/FEATURES
05f86a0
%attr(0755,root,root) %{_initrddir}/%{name}
09de94e
%attr(0755,root,root) %dir %{_sysconfdir}/%{name}
05f86a0
%attr(0755,unbound,unbound) %dir %{_localstatedir}/run/%{name}
12d3cd5
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf
05f86a0
%{_sbindir}/*
05f86a0
%{_mandir}/*/*
05f86a0
d2fe1dc
%files munin
d2fe1dc
%defattr(-,root,root,-)
e4c51b0
%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/unbound
12d3cd5
%{_datadir}/munin/plugins/unbound*
d2fe1dc
05f86a0
%files devel
05f86a0
%defattr(-,root,root,-)
05f86a0
%{_libdir}/libunbound.so
05f86a0
%{_includedir}/unbound.h
05f86a0
%doc README
05f86a0
05f86a0
%files libs
05f86a0
%defattr(-,root,root,-)
05f86a0
%{_libdir}/libunbound.so.*
05f86a0
%doc doc/README doc/LICENSE
05f86a0
05f86a0
%pre
05f86a0
getent group unbound >/dev/null || groupadd -r unbound
05f86a0
getent passwd unbound >/dev/null || \
Adam Tkac cd8c012
useradd -r -g unbound -d %{_sysconfdir}/unbound -s /sbin/nologin \
05f86a0
-c "Unbound DNS resolver" unbound
05f86a0
exit 0
05f86a0
05f86a0
%post 
05f86a0
/sbin/chkconfig --add %{name}
05f86a0
05f86a0
%post libs -p /sbin/ldconfig
05f86a0
05f86a0
05f86a0
%preun
Adam Tkac 39b47db
if [ "$1" -eq 0 ]; then
05f86a0
        /sbin/service %{name} stop >/dev/null 2>&1
05f86a0
        /sbin/chkconfig --del %{name} 
05f86a0
fi
05f86a0
05f86a0
%postun 
05f86a0
if [ "$1" -ge "1" ]; then
05f86a0
  /sbin/service %{name} condrestart >/dev/null 2>&1 || :
05f86a0
fi
05f86a0
05f86a0
%postun libs -p /sbin/ldconfig
05f86a0
05f86a0
%changelog
482e5e4
* Mon Jan  5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-7
482e5e4
- Modified scandir patch to silently fail when wildcard matches nothing
482e5e4
- Patch to allow unbound-checkconf to find empty wildcard matches
482e5e4
1555a15
* Mon Jan  5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-6
fbc16b5
- Added scandir patch for trusted-keys-file: option, which
fbc16b5
  is used to load multiple dnssec keys in bind file format
fbc16b5
1e7e03b
* Mon Dec  8 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-4
1e7e03b
- Added Requires: for selinux-policy >= 3.5.13-33 for proper SElinux rules.
1e7e03b
09de94e
* Mon Dec  1 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-3
09de94e
- We did not own the /etc/unbound directory (#474020)
09de94e
- Fixed cvs anomalies
09de94e
Adam Tkac cd8c012
* Fri Nov 28 2008 Adam Tkac <atkac redhat com> - 1.1.1-2
Adam Tkac cd8c012
- removed all obsolete chroot related stuff
Adam Tkac cd8c012
- label control certs after generation correctly
Adam Tkac cd8c012
7403530
* Thu Nov 20 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-1
7403530
- Updated to unbound 1.1.1 which fixes a crasher and
7403530
  addresses nlnetlabs bug #219
7403530
12d3cd5
* Wed Nov 19 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-3
12d3cd5
- Remove the chroot, obsoleted by SElinux
12d3cd5
- Add additional munin plugin links supported by unbound plugin
12d3cd5
- Move configuration directory from /var/lib/unbound to /etc/unbound
12d3cd5
- Modified unbound.init and unbound.conf to account for chroot changes
12d3cd5
- Updated unbound.conf with new available options
12d3cd5
- Enabled dns-0x20 protection per default
12d3cd5
Adam Tkac 39b47db
* Wed Nov 19 2008 Adam Tkac <atkac redhat com> - 1.1.0-2
Adam Tkac 39b47db
- unbound-1.1.0-log_open.patch
Adam Tkac 39b47db
  - make sure log is opened before chroot call
Adam Tkac 39b47db
  - tracked as http://www.nlnetlabs.nl/bugs/show_bug.cgi?id=219
Adam Tkac 39b47db
- removed /dev/log and /var/run/unbound and /etc/resolv.conf from
Adam Tkac 39b47db
  chroot, not needed
Adam Tkac 39b47db
- don't mount files in chroot, it causes problems during updates
Adam Tkac 39b47db
- fixed typo in default config file
Adam Tkac 39b47db
c41f9f1
* Fri Nov 14 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-1
c41f9f1
- Updated to version 1.1.0
d2fe1dc
- Updated unbound.conf's statistics options and remote-control
d2fe1dc
  to work properly for munin
d2fe1dc
- Added unbound-munin package
d2fe1dc
- Generate unbound remote-control  key/certs on first startup
c41f9f1
- Required ldns is now 1.4.0
c41f9f1
05f86a0
* Wed Oct 22 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-5
05f86a0
- Only call ldconfig in -libs package
05f86a0
- Move configure into build section
05f86a0
- devel subpackage should only depend on libs subpackage
05f86a0
05f86a0
* Tue Oct 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-4
05f86a0
- Fix CFLAGS getting lost in build
05f86a0
- Don't enable interface-automatic:yes because that
05f86a0
  causes unbound to listen on 0.0.0.0 instead of 127.0.0.1
05f86a0
05f86a0
* Sun Oct 19 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-3
05f86a0
- Split off unbound-libs, make build verbose 
05f86a0
05f86a0
* Thu Oct  9 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-2
05f86a0
- FSB compliance, chroot fixes, initscript fixes
05f86a0
05f86a0
* Thu Sep 11 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-1
05f86a0
- Upgraded to 1.0.2
05f86a0
05f86a0
* Wed Jul 16 2008 Paul Wouters <paul@xelerance.com> - 1.0.1-1
05f86a0
- upgraded to new release
05f86a0
05f86a0
* Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-2
05f86a0
- Build against ldns-1.3.0
05f86a0
05f86a0
* Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-1
05f86a0
- Split of -devel package, fixed dependancies, make rpmlint happy
05f86a0
05f86a0
* Thu Apr 25 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.12
05f86a0
- Using parts from ports collection entry by Jaap Akkerhuis.
05f86a0
- Using Fedoraproject wiki guidelines.
05f86a0
05f86a0
* Wed Apr 23 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.11
05f86a0
- Initial version.