%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} %global with_munin 1 %{?!enable_gost: %global enable_gost 1} # not ready yet %{?!with_python: %global with_python 0} %if %{with_python} %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif %define _sharedstatedir /var/lib Summary: Validating, recursive, and caching DNS(SEC) resolver Name: unbound Version: 1.9.3 Release: 1%{?_dist_release} License: BSD Url: http://www.unbound.net/ Source: https://nlnetlabs.nl/downloads/unbound/%{name}-%{version}.tar.gz Source1: unbound.init Source2: unbound.conf 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 Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: flex BuildRequires: libevent-devel BuildRequires: expat-devel %if %{with_python} BuildRequires: python-devel swig %endif %if %{enable_gost} BuildRequires: openssl-devel >= 1.0.0 %else BuildRequires: openssl-devel %endif # Required for SVN versions #BuildRequires: bison Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): initscripts Requires(postun): initscripts Requires(pre): shadow-utils Distribution: Vine Linux Vendor: Project Vine Packager: iwaim, daisuke %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: System Environment/Daemons 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: Development/Libraries 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: Applications/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: Applications/System 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: Applications/System 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 %prep %setup -q %build %configure --with-libevent --with-pthreads --with-ssl \ --disable-rpath --enable-debug --disable-static \ --with-conf-file=%{_sysconfdir}/%{name}/unbound.conf \ --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid \ %if %{with_python} --with-pythonmodule --with-pyunbound \ %endif %if !%{enable_gost} --disable-gost \ %endif --enable-sha2 \ --disable-sha1 \ --with-rootkey-file=%{_sharedstatedir}/unbound/root.key %{__make} %{?_smp_mflags} %install rm -rf %{buildroot} %{__make} DESTDIR=%{buildroot} install install -d 0755 %{buildroot}%{_initrddir} install -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/unbound install -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/unbound install -m 0755 %{SOURCE7} %{buildroot}%{_sysconfdir}/unbound install -d 0755 %{buildroot}%{_sysconfdir}/cron.d install -p -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.d/unbound-anchor %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 %attr(0755,root,root) %{_initrddir}/%{name} %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 %{python_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 %attr(0644,root,root) %{_sysconfdir}/cron.d/unbound-anchor %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 %{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 /sbin/chkconfig --add %{name} # 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 %post libs /sbin/ldconfig /sbin/runuser --command="%{_sbindir}/unbound-anchor -a %{_sharedstatedir}/unbound/root.key -c %{_sysconfdir}/unbound/icannbundle.pem" --shell /bin/sh unbound ||: %preun if [ "$1" -eq 0 ]; then /sbin/service %{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} fi %postun if [ "$1" -ge "1" ]; then /sbin/service %{name} condrestart >/dev/null 2>&1 || : fi %postun libs /sbin/ldconfig %post -n compat32-%{name}-libs /sbin/ldconfig %postun -n compat32-%{name}-libs /sbin/ldconfig %changelog * Tue Aug 27 2019 Tomohiro "Tomo-p" KATO 1.9.3-1 - updated to 1.9.3. * Sat Aug 24 2019 Tomohiro "Tomo-p" KATO 1.9.2-1 - updated to 1.9.2. * Fri Nov 09 2018 Tomohiro "Tomo-p" KATO 1.8.1-2 - added a subpackage 'compat32-unbound-libs'. * Sun Nov 04 2018 Tomohiro "Tomo-p" KATO 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 1.8.0-1 - update to 1.8.0 - drop mesh patch (Patch0): upstream fixed * Thu May 24 2018 IWAI, Masaharu 1.7.1-3 - Fix mesh state assertion failure due to callback removal. (Patch0) * Sun May 6 2018 IWAI, Masaharu 1.7.1-2 - enable ECDSA support - enable GOST support * Sat May 5 2018 IWAI, Masaharu 1.7.1-1 - update to 1.7.1 - add pkgconfig file in devel sub package * Thu Jan 04 2018 Tomohiro "Tomo-p" KATO 1.6.7-1 - updated to 1.6.7. * Mon Jul 31 2017 Daisuke SUZUKI 1.6.4-1 - update to 1.6.4 * Sat Jun 24 2017 IWAI, Masaharu 1.6.3-1 - update to 1.6.3 * Mon Jun 05 2017 IWAI, Masaharu 1.6.2-1 - update to 1.6.2 - disables SHA1 support * Sat Feb 25 2017 IWAI, Masaharu 1.6.1-1 - update to 1.6.1 * Mon Jan 30 2017 IWAI, Masaharu 1.6.0-2 - fix Requires and BuildRequres - drop ldns * Thu Dec 29 2016 IWAI, Masaharu 1.6.0-1 - update to 1.6.0 * Thu Jun 16 2016 Tomohiro "Tomo-p" KATO 1.5.9-1 - new upstream release. * Mon Mar 14 2016 Tomohiro "Tomo-p" KATO 1.5.8-1 - new upstream release. * Thu Dec 10 2015 Tomohiro "Tomo-p" KATO 1.5.7-1 - new upstream release. * Tue Nov 3 2015 Tomohiro "Tomo-p" KATO 1.5.6-1 - new upstream release. * Sun Mar 22 2015 IWAI, Masaharu 1.5.3-1 - update to 1.5.3 * Tue Dec 09 2014 Daisuke SUZUKI 1.5.1-1 - update to 1.5.1 * Tue Jun 17 2014 IWAI, Masaharu 1.4.22-3 - move create user script to libs subpackage * Wed Jun 11 2014 IWAI, Masaharu 1.4.22-2 - add {B,C}.ROOT-SERVERS.NET. IPv6 address * Wed Apr 16 2014 Daisuke SUZUKI 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 1.4.21-1 - new upstream release * Tue Mar 26 2013 Daisuke SUZUKI 1.4.20-1 - new upstream release * Thu Dec 13 2012 IWAI, Masaharu 1.4.19-1 - new upstream release - drop glob patch (Patch1): upstream merged * Wed Dec 5 2012 IWAI, Masaharu 1.4.18-1 - new upstream release * Sun May 27 2012 Daisuke SUZUKI 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 1.4.14-2 - rebuild with python-2.7.2 * Wed Dec 21 2011 IWAI, Masaharu 1.4.14-1 - new upstream release * Sat Sep 3 2011 IWAI, Masaharu 1.4.12-1 - new upstream release * Tue May 31 2011 IWAI, Masaharu 1.4.10-1 - new upstream releas * Wed Mar 30 2011 IWAI, Masaharu 1.4.9-1 - new upstream release * Wed Feb 23 2011 IWAI, Masaharu 1.4.8-1 - new upstream release * Thu Feb 10 2011 Toshiharu Kudoh 1.4.7-2 - rebuilt with libevent-2.0.10 * Sun Nov 14 2010 IWAI, Masaharu 1.4.7-1 - new upstream release - add enable_gost flag: default disable - add BuildRequires: expat-devel * Thu Sep 2 2010 IWAI, Masaharu 1.4.6-1 - new upstream release * Fri Jul 23 2010 IWAI, Masaharu 1.4.5-1 - new upstream release * Wed May 5 2010 IWAI, Masaharu 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 - 1.4.3-1 - Update to 1.4.3 that fixes 64bit crasher * Tue Mar 09 2010 Paul Wouters - 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 - 1.4.1-5 - Overriding -D_GNU_SOURCE is no longer needed. This fixes DSO issues with pthreads * Wed Feb 24 2010 Paul Wouters - 1.4.1-3 - Change make/configure lines to attempt to fix -lphtread linking issue * Thu Feb 18 2010 Paul Wouters - 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 - 1.4.1-1 - Updated to 1.4.1 - Changed %%define to %%global * Thu Oct 08 2009 Paul Wouters - 1.3.4-2 - Bump version * Thu Oct 08 2009 Paul Wouters - 1.3.4-1 - Upgraded to 1.3.4. Security fix with validating NSEC3 records * Fri Aug 21 2009 Tomas Mraz - 1.3.3-2 - rebuilt with new openssl * Mon Aug 17 2009 Paul Wouters - 1.3.3-1 - Updated to 1.3.3 * Sun Jul 26 2009 Fedora Release Engineering - 1.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sat Jun 20 2009 Paul Wouters - 1.3.0-2 - Added missing glob patch to cvs - Place python macros within the %%with_python check * Sat Jun 20 2009 Paul Wouters - 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 - 1.2.1-7 - unbound-iterator.patch was not commited * Wed May 20 2009 Paul Wouters - 1.2.1-6 - Fix for https://bugzilla.redhat.com/show_bug.cgi?id=499793 * Tue Mar 17 2009 Paul Wouters - 1.2.1-5 - Use --nocheck to avoid giving an error on missing unbound-remote certs/keys * Tue Mar 10 2009 Adam Tkac - 1.2.1-4 - enable DNSSEC only if it is enabled in sysconfig/dnssec * Mon Mar 09 2009 Adam Tkac - 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 - 1.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Tue Feb 10 2009 Paul Wouters - 1.2.0-2 - rebuild with new openssl * Wed Jan 14 2009 Paul Wouters - 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 - 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 - 1.1.1-4 - Added Requires: for selinux-policy >= 3.5.13-33 for proper SElinux rules. * Mon Dec 1 2008 Paul Wouters - 1.1.1-3 - We did not own the /etc/unbound directory (#474020) - Fixed cvs anomalies * Fri Nov 28 2008 Adam Tkac - 1.1.1-2 - removed all obsolete chroot related stuff - label control certs after generation correctly * Thu Nov 20 2008 Paul Wouters - 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 - 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 - 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 - 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 - 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 - 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 - 1.0.2-3 - Split off unbound-libs, make build verbose * Thu Oct 9 2008 Paul Wouters - 1.0.2-2 - FSB compliance, chroot fixes, initscript fixes * Thu Sep 11 2008 Paul Wouters - 1.0.2-1 - Upgraded to 1.0.2 * Wed Jul 16 2008 Paul Wouters - 1.0.1-1 - upgraded to new release * Wed May 21 2008 Paul Wouters - 1.0.0-2 - Build against ldns-1.3.0 * Wed May 21 2008 Paul Wouters - 1.0.0-1 - Split of -devel package, fixed dependancies, make rpmlint happy * Fri Apr 25 2008 Wouter Wijngaards - 0.12 - Using parts from ports collection entry by Jaap Akkerhuis. - Using Fedoraproject wiki guidelines. * Wed Apr 23 2008 Wouter Wijngaards - 0.11 - Initial version.