%bcond_with systemd
%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

%global with_munin 0
%{?!enable_gost:      %global enable_gost      1}

# not ready yet
%{?!with_python:      %global with_python      0}

%define _sharedstatedir /var/lib

Summary: Validating, recursive, and caching DNS(SEC) resolver
Name: unbound
Version: 1.16.1
Release: 1%{?_dist_release}%{?with_systemd:.systemd}
Group: servers
Distribution: Vine Linux
Vendor: Project Vine
Packager: iwaim, daisuke

License: BSD
Url: http://www.unbound.net/
Source: https://nlnetlabs.nl/downloads/unbound/%{name}-%{version}.tar.gz
Source1: unbound.init
Source3: unbound.munin
Source4: dlv.isc.org.key
Source5: root.key
Source6: root.anchor
Source7: icannbundle.pem
Source8: unbound.cron
Source9: example.com.key
Source10: example.com.conf
Source11: block-example.com.conf

Source100: unbound.service
Source101: unbound-keygen.service
Source102: unbound-anchor.service
Source103: unbound-anchor.timer
Source104: tmpfiles-unbound.conf
Source105: unbound.sysconfig

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: flex
BuildRequires: libevent-devel
BuildRequires: expat-devel
%if %{with_python}
BuildRequires:  python3-devel python3-rpm-macros swig
%endif
%if %{enable_gost}
BuildRequires: openssl-devel >= 1.0.0
%else
BuildRequires: openssl-devel
%endif
BuildRequires: libnghttp2-devel
# Required for SVN versions
#BuildRequires: bison

%if %{with systemd}
%global piddir /run/%{name}
BuildRequires: systemd
%{?systemd_requires}
%else
%global piddir %{_localstatedir}/run/%{name}
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
%endif
Requires(pre): shadow-utils


%description
Unbound is a validating, recursive, and caching DNS(SEC) resolver.

The C implementation of Unbound is developed and maintained by NLnet
Labs. It is based on ideas and algorithms taken from a java prototype
developed by Verisign labs, Nominet, Kirei and ep.net.

Unbound is designed as a set of modular components, so that also
DNSSEC (secure DNS) validation and stub-resolvers (that do not run
as a server, but are linked into an application) are easily possible.


%if %{with_munin}
%package munin
Summary: Plugin for the munin / munin-node monitoring package
Summary(ja): munin/munin-node モニタリングパッケージ用のプラグイン
Group: servers
Requires: munin-node
Requires: %{name} = %{version}-%{release}, bc

%description munin
Plugin for the munin / munin-node monitoring package
%endif


%package devel
Summary: Development package that includes the unbound header files
Group: programming
Requires: %{name}-libs = %{version}-%{release}, openssl-devel

%description devel
The devel package contains the unbound library and the include files


%package libs
Summary: Libraries used by the unbound server and client applications
Group: system
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: openssl >= 0.9.8g-12

%description libs
Contains libraries used by the unbound server and client applications


%if %{with_python}
%package python
Summary: Python modules and extensions for unbound
Group: programming
Requires: %{name}-libs = %{version}-%{release}

%description python
Python modules and extensions for unbound
%endif


%package -n compat32-%{name}-libs
Summary: Libraries used by the unbound server and client applications
Group: system,legacy
Requires: %{name}-libs = %{version}-%{release}
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: openssl >= 0.9.8g-12

%description -n compat32-%{name}-libs
Contains libraries used by the unbound server and client applications


%debug_package


%prep
%setup -q


%build
%configure  --with-libevent --with-pthreads --with-ssl \
            --disable-rpath --enable-debug --disable-static \
            --enable-relro-now --enable-pie \
            --enable-subnet --enable-ipsecmod \
            --with-conf-file=%{_sysconfdir}/%{name}/unbound.conf \
            --with-pidfile=%{piddir}/%{name}.pid \
%if %{with_python}
            --with-pythonmodule --with-pyunbound \
%endif
%if !%{enable_gost}
            --disable-gost \
%endif
            --enable-sha2 \
            --disable-sha1 \
            --with-libnghttp2 \
            --with-rootkey-file=%{_sharedstatedir}/unbound/root.key

%{__make} %{?_smp_mflags}


%install
rm -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install
install -d 0755 %{buildroot}%{_initrddir}

%if %{with systemd}
install -d -m 0755 %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
install -p -m 0644 %{SOURCE100} %{buildroot}%{_unitdir}/unbound.service
install -p -m 0644 %{SOURCE101} %{buildroot}%{_unitdir}/unbound-keygen.service
install -p -m 0644 %{SOURCE103} %{buildroot}%{_unitdir}/unbound-anchor.timer
install -p -m 0644 %{SOURCE102} %{buildroot}%{_unitdir}/unbound-anchor.service
install -p -m 0644 %{SOURCE105} %{buildroot}%{_sysconfdir}/sysconfig/unbound
# Install tmpfiles.d config
install -d -m 0755 %{buildroot}%{_tmpfilesdir} %{buildroot}%{_sharedstatedir}/unbound
install -m 0644 %{SOURCE104} %{buildroot}%{_tmpfilesdir}/unbound.conf
%else
install -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/unbound
install -d 0755 %{buildroot}%{_sysconfdir}/cron.d
install -p -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.d/unbound-anchor
%endif

install -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/unbound

echo "include: %{_sysconfdir}/unbound/conf.d/*.conf" >> %{buildroot}%{_sysconfdir}/unbound/unbound.conf

%if %{with_munin}
# Install munin plugin and its softlinks
install -d 0755 %{buildroot}%{_sysconfdir}/munin/plugin-conf.d
install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/munin/plugin-conf.d/unbound
install -d 0755 %{buildroot}%{_datadir}/munin/plugins/
install -m 0755 contrib/unbound_munin_ %{buildroot}%{_datadir}/munin/plugins/unbound
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
    ln -s unbound %{buildroot}%{_datadir}/munin/plugins/$plugin
done 
%endif

# install root and DLV key
install -m 0644 %{SOURCE4} %{SOURCE5} %{buildroot}%{_sysconfdir}/unbound/
install -d -m 0755 %{buildroot}%{_sharedstatedir}/unbound
install -m 0644 %{SOURCE6} %{buildroot}%{_sharedstatedir}/unbound/root.key

# remove static library from install (fedora packaging guidelines)
rm -rf %{buildroot}%{_libdir}/*.la
%if %{with_python}
rm -rf %{buildroot}%{python_sitelib}/*/*.la
%endif

mkdir -p %{buildroot}%{_localstatedir}/run/unbound

# Install directories for easier config file drop in
install -d -m 0755 %{buildroot}%{_sysconfdir}/unbound/{keys.d,local.d,conf.d}
install -p %{SOURCE9} %{buildroot}%{_sysconfdir}/unbound/keys.d/
install -p %{SOURCE10} %{buildroot}%{_sysconfdir}/unbound/conf.d/
install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/unbound/local.d/


%clean
rm -rf ${RPM_BUILD_ROOT}


%files 
%defattr(-,root,root,-)
%license doc/LICENSE
%doc doc/README doc/CREDITS doc/FEATURES
%if %{with systemd}
%attr(0644,root,root) %{_tmpfilesdir}/unbound.conf
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-keygen.service
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%else
%attr(0755,root,root) %{_initrddir}/%{name}
%endif
%attr(0755,root,root) %dir %{_sysconfdir}/%{name}
%attr(0755,unbound,unbound) %dir %{_localstatedir}/run/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf
%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/keys.d
%attr(0664,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/keys.d/*.key
%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/conf.d
%attr(0664,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/conf.d/*.conf
%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/local.d
%attr(0664,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/local.d/*.conf
%{_sbindir}/*
%exclude %{_sbindir}/unbound-anchor
%{_mandir}/*/*

%if %{with_python}
%files python
%{python3_sitelib}/*
%endif

%if %{with_munin}
%files munin
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/unbound
%{_datadir}/munin/plugins/unbound*
%endif

%files devel
%defattr(-,root,root,-)
%{_libdir}/libunbound.so
%{_includedir}/unbound.h
%{_libdir}/pkgconfig/libunbound.pc
%doc README

%files libs
%defattr(-,root,root,-)
%license doc/LICENSE
%doc doc/README
%{_sbindir}/unbound-anchor
%{_libdir}/libunbound.so.*
%{_sysconfdir}/%{name}/icannbundle.pem
%dir %attr(0755,unbound,unbound) %{_sharedstatedir}/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/dlv.isc.org.key
%attr(0644,unbound,unbound) %config(noreplace) %{_sharedstatedir}/%{name}/root.key
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/root.key
%if %{with systemd}
%{_unitdir}/unbound-anchor.timer
%{_unitdir}/unbound-anchor.service
%else
%attr(0644,root,root) %{_sysconfdir}/cron.d/unbound-anchor
%endif

%if %{build_compat32}
%files -n compat32-%{name}-libs
%defattr(-,root,root,-)
%{_libdir}/libunbound.so.*
%endif


%pre libs
getent group unbound >/dev/null || groupadd -r unbound
getent passwd unbound >/dev/null || \
useradd -r -g unbound -d %{_sysconfdir}/unbound -s /sbin/nologin \
-c "Unbound DNS resolver" unbound
exit 0

%post libs
/sbin/runuser  --command="%{_sbindir}/unbound-anchor -a %{_sharedstatedir}/unbound/root.key -c %{_sysconfdir}/unbound/icannbundle.pem"  --shell /bin/sh unbound ||:
%if %{with systemd}
%systemd_post unbound-anchor.timer
# start the timer only if installing the package to prevent starting it, if it was stopped on purpose
if [ "$1" -eq 1 ]; then
    # the Unit is in presets, but would be started after reboot
    /bin/systemctl start unbound-anchor.timer >/dev/null 2>&1 || :
fi
%endif

%if %{with systemd}
%preun libs
%systemd_preun unbound-anchor.timer
%endif

%postun libs
%if %{with systemd}
%systemd_postun_with_restart unbound-anchor.timer
%endif

%post
%if %{with systemd}
%systemd_post unbound.service
%systemd_post unbound-keygen.service
%else
/sbin/chkconfig --add %{name}
%endif
# dnssec-conf used to contain our DLV key, but now we include it via unbound
# If unbound had previously been configured with dnssec-configure, we need
# to migrate the location of the DLV key file (to keep DLV enabled, and because
# unbound won't start with a bad location for a DLV key file.
sed -i "s:/etc/pki/dnssec-keys[/]*dlv:/etc/unbound:" %{_sysconfdir}/unbound/unbound.conf

%preun
%if %{with systemd}
%systemd_preun unbound.service
%systemd_preun unbound-keygen.service
%else
if [ "$1" -eq 0 -o -x /bin/systemctl ]; then
  /sbin/service %{name} stop >/dev/null 2>&1
  /sbin/chkconfig --del %{name} 
fi
%endif

%postun 
%if %{with systemd}
%systemd_postun_with_restart unbound.service
%systemd_postun unbound-keygen.service
%else
if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then
  /sbin/service %{name} condrestart >/dev/null 2>&1 || :
fi
%endif


%changelog
* Mon Jul 11 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.16.1-1
- updated to 1.16.1.

* Thu Jun 02 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.16.0-1
- updated to 1.16.0.

* Thu Feb 10 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.15.0-1
- updated to 1.15.0.

* Thu Dec 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.14.0-1
- updated to 1.14.0.

* Tue Oct 05 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.13.2-2
- rebuilt with openssl-3.0.0.

* Thu Aug 12 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.13.2-1
- updated to 1.13.2.
- dropped ldconfig scriptlets.

* Wed Feb 10 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.13.1-1
- updated to 1.13.1.

* Thu Dec 03 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.13.0-1
- updated to 1.13.0.

* Thu Oct 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.12.0-1
- updated to 1.12.0.

* Mon Jul 27 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.11.0-1
- updated to 1.11.1.

* Tue May 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.10.1-1
- updated to 1.10.1.

* Tue Apr 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.10.0-2
- rebuilt with libevent-2.1.11.

* Sat Apr 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.10.0-1
- updated to 1.10.0.
- added systemd support (disabled as default).
- disabled munin.

* Mon Dec 16 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.6-1
- updated to 1.9.6.

* Fri Oct 11 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.4-1
- updated to 1.9.4.

* Tue Aug 27 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.3-1
- updated to 1.9.3.

* Sat Aug 24 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.9.2-1
- updated to 1.9.2.

* Fri Nov 09 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.1-2
- added a subpackage 'compat32-unbound-libs'.

* Sun Nov 04 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.8.1-1
- updated to 1.8.1.
- rebuilt with openssl-1.1.1 and libevent-2.1.8.
- updated root.key and root.anchor.

* Thu Oct  4 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.8.0-1
- update to 1.8.0
- drop mesh patch (Patch0): upstream fixed

* Thu May 24 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.7.1-3
- Fix mesh state assertion failure due to callback removal. (Patch0)

* Sun May  6 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.7.1-2
- enable ECDSA support
- enable GOST support

* Sat May  5 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.7.1-1
- update to 1.7.1
- add pkgconfig file in devel sub package

* Thu Jan 04 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.6.7-1
- updated to 1.6.7.

* Mon Jul 31 2017 Daisuke SUZUKI <daisuke@vinelinux.org> 1.6.4-1
- update to 1.6.4

* Sat Jun 24 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.6.3-1
- update to 1.6.3

* Mon Jun 05 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.6.2-1
- update to 1.6.2
- disables SHA1 support

* Sat Feb 25 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.6.1-1
- update to 1.6.1

* Mon Jan 30 2017 IWAI, Masaharu <iwaim.sub@gmail.com> 1.6.0-2
- fix Requires and BuildRequres
 - drop ldns

* Thu Dec 29 2016 IWAI, Masaharu <iwaim.sub@gmail.com> 1.6.0-1
- update to 1.6.0

* Thu Jun 16 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.9-1
- new upstream release.

* Mon Mar 14 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.8-1
- new upstream release.

* Thu Dec 10 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.7-1
- new upstream release.

* Tue Nov  3 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.5.6-1
- new upstream release.

* Sun Mar 22 2015 IWAI, Masaharu <iwaim.sub@gmail.com> 1.5.3-1
- update to 1.5.3

* Tue Dec 09 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 1.5.1-1
- update to 1.5.1

* Tue Jun 17 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.4.22-3
- move create user script to libs subpackage

* Wed Jun 11 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.4.22-2
- add {B,C}.ROOT-SERVERS.NET. IPv6 address

* Wed Apr 16 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.22-1
- update to 1.4.22
- move root.key to /var/lib/unbound
- add icannbundle.pem from http://data.iana.org/root-anchors/icannbundle.pem
- add unbound.cron
- move keys and unbound-anchor to libs subpackage

* Mon Oct 07 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.21-1
- new upstream release

* Tue Mar 26 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.20-1
- new upstream release

* Thu Dec 13 2012 IWAI, Masaharu <iwai@alib.jp> 1.4.19-1
- new upstream release
- drop glob patch (Patch1): upstream merged

* Wed Dec  5 2012 IWAI, Masaharu <iwai@alib.jp> 1.4.18-1
- new upstream release

* Sun May 27 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.17-1
- update to 1.4.17
- add root.key for DNSSEC
- enable munin subpackage by default
- buildrequire ldns-devel >= 1.6.13

* Wed Feb 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.14-2
- rebuild with python-2.7.2

* Wed Dec 21 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.14-1
- new upstream release

* Sat Sep  3 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.12-1
- new upstream release

* Tue May 31 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.10-1
- new upstream releas

* Wed Mar 30 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.9-1
- new upstream release

* Wed Feb 23 2011 IWAI, Masaharu <iwai@alib.jp> 1.4.8-1
- new upstream release

* Thu Feb 10 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.4.7-2
- rebuilt with libevent-2.0.10

* Sun Nov 14 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.7-1
- new upstream release
- add enable_gost flag: default disable
- add BuildRequires: expat-devel

* Thu Sep  2 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.6-1
- new upstream release

* Fri Jul 23 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.5-1
- new upstream release

* Wed May  5 2010 IWAI, Masaharu <iwai@alib.jp> 1.4.4-1
- initial build for Vine Linux: based Fedora 1.4.3-1.fc14
 - update to 1.4.4
 - build without munin

* Thu Mar 11 2010 Paul Wouters <paul@xelerance.com> - 1.4.3-1
- Update to 1.4.3 that fixes 64bit crasher

* Tue Mar 09 2010 Paul Wouters <paul@xelerance.com> - 1.4.2-1
- Updated to 1.4.2 
- Updated unbound.conf with new options
- Enabled pre-fetching DNSKEY records (DNSSEC speedup)
- Enabled re-fetching popular records before they expire
- Enabled logging of DNSSEC validation errors

* Mon Mar 01 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-5
- Overriding -D_GNU_SOURCE is no longer needed. This fixes DSO issues
  with pthreads

* Wed Feb 24 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-3
- Change make/configure lines to attempt to fix -lphtread linking issue

* Thu Feb 18 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-2
- Removed dependancy for dnssec-conf
- Added ISC DLV key (formerly in dnssec-conf)
- Fixup old DLV locations in unbound.conf file via %%post
- Fix parent child disagreement handling and no-ipv6 present [svn r1953]

* Tue Jan 05 2010 Paul Wouters <paul@xelerance.com> - 1.4.1-1
- Updated to 1.4.1
- Changed %%define to %%global

* Thu Oct 08 2009 Paul Wouters <paul@xelerance.com> - 1.3.4-2
- Bump version

* Thu Oct 08 2009 Paul Wouters <paul@xelerance.com> - 1.3.4-1
- Upgraded to 1.3.4. Security fix with validating NSEC3 records

* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.3.3-2
- rebuilt with new openssl

* Mon Aug 17 2009 Paul Wouters <paul@xelerance.com> - 1.3.3-1
- Updated to 1.3.3

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sat Jun 20 2009 Paul Wouters <paul@xelerance.com> - 1.3.0-2
- Added missing glob patch to cvs
- Place python macros within the %%with_python check

* Sat Jun 20 2009 Paul Wouters <paul@xelerance.com> - 1.3.0-1
- Updated to 1.3.0
- Added unbound-python sub package. disabled for now
- Patch from svn to fix DLV lookups
- Patches from svn to detect wrong truncated response from BIND 9.6.1 with
  minimal-responses)
- Added Default-Start and Default-Stop to unbound.init
- Re-enabled --enable-sha2
- Re-enabled glob.patch

* Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-7
- unbound-iterator.patch was not commited

* Wed May 20 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-6
- Fix for https://bugzilla.redhat.com/show_bug.cgi?id=499793

* Tue Mar 17 2009 Paul Wouters <paul@xelerance.com> - 1.2.1-5
- Use --nocheck to avoid giving an error on missing unbound-remote certs/keys

* Tue Mar 10 2009 Adam Tkac <atkac redhat com> - 1.2.1-4
- enable DNSSEC only if it is enabled in sysconfig/dnssec

* Mon Mar 09 2009 Adam Tkac <atkac redhat com> - 1.2.1-3
- add DNSSEC support to initscript and enabled it per default
- add requires dnssec-conf

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Feb 10 2009 Paul Wouters <paul@xelerance.com - 1.2.1-1
- updated to 1.2.1

* Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> - 1.2.0-2
- rebuild with new openssl

* Wed Jan 14 2009 Paul Wouters <paul@xelerance.com - 1.2.0-1
- Updated to 1.2.0
- Added dependancy on minimum SSL for CVE-2008-5077
- Added dependancy on bc for unbound-munin
- Added minimum requirement of libevent 1.4.5. Crashes with older versions
  (note: libevent is stale in EL-4 and not in EL-5, needs fixing there)
- Removed dependancy on selinux-policy (will get used when available)
- Enable options as per draft-wijngaards-dnsext-resolver-side-mitigation-00.txt
- Enable unwanted-reply-threshold to mitigate against a Kaminsky attack
- Enable val-clean-additional to drop addition unsigned data from signed
  response.
- Removed patches (got merged into upstream)

* Mon Jan  5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-7
- Modified scandir patch to silently fail when wildcard matches nothing
- Patch to allow unbound-checkconf to find empty wildcard matches

* Mon Jan  5 2009 Paul Wouters <paul@xelerance.com> - 1.1.1-6
- Added scandir patch for trusted-keys-file: option, which
  is used to load multiple dnssec keys in bind file format

* Mon Dec  8 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-4
- Added Requires: for selinux-policy >= 3.5.13-33 for proper SElinux rules.

* Mon Dec  1 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-3
- We did not own the /etc/unbound directory (#474020)
- Fixed cvs anomalies

* Fri Nov 28 2008 Adam Tkac <atkac redhat com> - 1.1.1-2
- removed all obsolete chroot related stuff
- label control certs after generation correctly

* Thu Nov 20 2008 Paul Wouters <paul@xelerance.com> - 1.1.1-1
- Updated to unbound 1.1.1 which fixes a crasher and
  addresses nlnetlabs bug #219

* Wed Nov 19 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-3
- Remove the chroot, obsoleted by SElinux
- Add additional munin plugin links supported by unbound plugin
- Move configuration directory from /var/lib/unbound to /etc/unbound
- Modified unbound.init and unbound.conf to account for chroot changes
- Updated unbound.conf with new available options
- Enabled dns-0x20 protection per default

* Wed Nov 19 2008 Adam Tkac <atkac redhat com> - 1.1.0-2
- unbound-1.1.0-log_open.patch
  - make sure log is opened before chroot call
  - tracked as http://www.nlnetlabs.nl/bugs/show_bug.cgi?id=219
- removed /dev/log and /var/run/unbound and /etc/resolv.conf from
  chroot, not needed
- don't mount files in chroot, it causes problems during updates
- fixed typo in default config file

* Fri Nov 14 2008 Paul Wouters <paul@xelerance.com> - 1.1.0-1
- Updated to version 1.1.0
- Updated unbound.conf's statistics options and remote-control
  to work properly for munin
- Added unbound-munin package
- Generate unbound remote-control  key/certs on first startup
- Required ldns is now 1.4.0

* Wed Oct 22 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-5
- Only call ldconfig in -libs package
- Move configure into build section
- devel subpackage should only depend on libs subpackage

* Tue Oct 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-4
- Fix CFLAGS getting lost in build
- Don't enable interface-automatic:yes because that
  causes unbound to listen on 0.0.0.0 instead of 127.0.0.1

* Sun Oct 19 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-3
- Split off unbound-libs, make build verbose 

* Thu Oct  9 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-2
- FSB compliance, chroot fixes, initscript fixes

* Thu Sep 11 2008 Paul Wouters <paul@xelerance.com> - 1.0.2-1
- Upgraded to 1.0.2

* Wed Jul 16 2008 Paul Wouters <paul@xelerance.com> - 1.0.1-1
- upgraded to new release

* Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-2
- Build against ldns-1.3.0

* Wed May 21 2008 Paul Wouters <paul@xelerance.com> - 1.0.0-1
- Split of -devel package, fixed dependancies, make rpmlint happy

* Fri Apr 25 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.12
- Using parts from ports collection entry by Jaap Akkerhuis.
- Using Fedoraproject wiki guidelines.

* Wed Apr 23 2008 Wouter Wijngaards <wouter@nlnetlabs.nl> - 0.11
- Initial version.
