2019-08-22 15:11:45 +00:00
|
|
|
%{?!with_python2: %global with_python2 0}
|
2015-04-16 14:18:59 +00:00
|
|
|
%{?!with_python3: %global with_python3 1}
|
|
|
|
%{?!with_munin: %global with_munin 1}
|
2020-10-13 16:25:53 +00:00
|
|
|
%bcond_without dnstap
|
2020-03-20 11:33:00 +00:00
|
|
|
%bcond_with systemd
|
2020-10-13 16:24:11 +00:00
|
|
|
%bcond_without doh
|
2023-01-14 00:17:50 +00:00
|
|
|
%bcond_with redis
|
2015-04-16 14:18:59 +00:00
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
%global _hardened_build 1
|
|
|
|
|
2023-11-02 18:39:30 +00:00
|
|
|
#global extra_version rc1
|
2018-04-09 07:58:43 +00:00
|
|
|
|
|
|
|
%if 0%{with_python2}
|
|
|
|
%global python_primary %{__python2}
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2018-04-09 07:58:43 +00:00
|
|
|
|
|
|
|
%if 0%{with_python3}
|
|
|
|
%global python_primary %{__python3}
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2018-04-09 07:58:43 +00:00
|
|
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
%global with_munin 0
|
|
|
|
|
|
|
|
%if 0%{?rhel} <= 7
|
|
|
|
%global with_python3 0
|
|
|
|
%else
|
|
|
|
%global with_python2 0
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
2014-11-28 17:35:08 +00:00
|
|
|
|
2008-10-31 22:29:15 +00:00
|
|
|
Summary: Validating, recursive, and caching DNS(SEC) resolver
|
|
|
|
Name: unbound
|
2023-11-02 18:39:30 +00:00
|
|
|
Version: 1.19.0
|
|
|
|
Release: 1%{?extra_version:.%{extra_version}}%{?dist}
|
2022-09-30 11:02:49 +00:00
|
|
|
License: BSD-3-Clause
|
2019-04-01 15:45:54 +00:00
|
|
|
Url: https://nlnetlabs.nl/projects/unbound/
|
|
|
|
Source: https://nlnetlabs.nl/downloads/%{name}/%{name}-%{version}%{?extra_version}.tar.gz
|
2011-09-14 20:20:56 +00:00
|
|
|
Source1: unbound.service
|
2008-10-31 22:29:15 +00:00
|
|
|
Source2: unbound.conf
|
2008-11-15 06:45:37 +00:00
|
|
|
Source3: unbound.munin
|
2011-01-26 01:56:16 +00:00
|
|
|
Source4: unbound_munin_
|
|
|
|
Source5: root.key
|
2011-09-14 20:20:56 +00:00
|
|
|
Source7: unbound-keygen.service
|
|
|
|
Source8: tmpfiles-unbound.conf
|
2012-09-26 16:38:51 +00:00
|
|
|
Source9: example.com.key
|
|
|
|
Source10: example.com.conf
|
|
|
|
Source11: block-example.com.conf
|
2017-10-03 14:10:51 +00:00
|
|
|
Source12: https://data.iana.org/root-anchors/icannbundle.pem
|
2012-11-03 16:59:54 +00:00
|
|
|
Source13: root.anchor
|
|
|
|
Source14: unbound.sysconfig
|
2015-04-27 11:44:47 +00:00
|
|
|
Source15: unbound-anchor.timer
|
2012-11-10 17:03:14 +00:00
|
|
|
Source16: unbound-munin.README
|
2015-04-27 11:44:47 +00:00
|
|
|
Source17: unbound-anchor.service
|
2020-03-19 12:37:42 +00:00
|
|
|
Source18: https://nlnetlabs.nl/downloads/%{name}/%{name}-%{version}%{?extra_version}.tar.gz.asc
|
2021-06-24 11:01:52 +00:00
|
|
|
# source: https://nlnetlabs.nl/people/
|
|
|
|
Source19: https://keys.openpgp.org/pks/lookup?op=get&search=0x9F6F1C2D7E045F8D#/wouter.nlnetlabs.nl.key
|
2022-12-01 16:30:31 +00:00
|
|
|
Source20: unbound.sysusers
|
2013-03-21 20:07:08 +00:00
|
|
|
|
2023-11-02 18:39:30 +00:00
|
|
|
# Patch1:
|
2020-04-16 14:49:04 +00:00
|
|
|
|
2018-03-26 09:45:42 +00:00
|
|
|
BuildRequires: gcc, make
|
2014-03-14 01:44:08 +00:00
|
|
|
BuildRequires: flex, openssl-devel
|
2011-01-26 01:56:16 +00:00
|
|
|
BuildRequires: libevent-devel expat-devel
|
2016-09-27 23:26:26 +00:00
|
|
|
BuildRequires: pkgconfig
|
2020-10-13 16:41:29 +00:00
|
|
|
%if 0%{?fedora}
|
2020-03-19 13:01:23 +00:00
|
|
|
BuildRequires: gnupg2
|
2020-10-13 16:41:29 +00:00
|
|
|
%endif
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{with_python2}
|
2015-04-16 14:18:59 +00:00
|
|
|
BuildRequires: python2-devel swig
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
%if 0%{with_python3}
|
2018-04-09 07:58:43 +00:00
|
|
|
BuildRequires: python3-devel swig
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2020-03-20 11:33:00 +00:00
|
|
|
%if %{with dnstap}
|
|
|
|
BuildRequires: fstrm-devel protobuf-c-devel
|
|
|
|
%endif
|
|
|
|
%if %{with systemd}
|
|
|
|
BuildRequires: systemd-devel
|
|
|
|
%endif
|
2020-10-13 16:18:50 +00:00
|
|
|
%if %{with doh}
|
|
|
|
BuildRequires: libnghttp2-devel
|
|
|
|
%endif
|
2023-01-14 00:17:50 +00:00
|
|
|
%if %{with redis}
|
2023-04-07 02:48:56 +00:00
|
|
|
BuildRequires: hiredis-devel
|
2023-01-14 00:17:50 +00:00
|
|
|
%endif
|
2022-12-08 00:49:28 +00:00
|
|
|
%if 0%{?fedora} >= 30 || 0%{?rhel} >= 9
|
2019-06-26 08:16:46 +00:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2019-09-26 21:45:30 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: systemd
|
|
|
|
%endif
|
2012-08-23 18:40:49 +00:00
|
|
|
# Required for SVN versions
|
|
|
|
# BuildRequires: bison
|
2015-07-14 02:45:42 +00:00
|
|
|
# BuildRequires: automake autoconf libtool
|
2010-03-01 16:22:27 +00:00
|
|
|
|
2012-02-28 02:19:58 +00:00
|
|
|
# Needed because /usr/sbin/unbound links unbound libs staticly
|
2012-11-03 21:33:45 +00:00
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
2022-06-27 10:00:02 +00:00
|
|
|
Requires: %{name}-anchor%{?_isa} = %{version}-%{release}
|
2022-06-27 11:53:54 +00:00
|
|
|
Recommends: %{name}-utils%{?_isa} = %{version}-%{release}
|
2022-08-09 10:11:15 +00:00
|
|
|
# unbound-keygen.service requires it, bug #2116790
|
|
|
|
Requires: openssl
|
2008-10-31 22:29:15 +00:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2013-04-11 16:02:00 +00:00
|
|
|
%if %{with_munin}
|
2008-11-15 06:45:37 +00:00
|
|
|
%package munin
|
|
|
|
Summary: Plugin for the munin / munin-node monitoring package
|
|
|
|
Requires: munin-node
|
2009-01-14 14:57:11 +00:00
|
|
|
Requires: %{name} = %{version}-%{release}, bc
|
2012-11-03 21:33:45 +00:00
|
|
|
BuildArch: noarch
|
2008-11-15 06:45:37 +00:00
|
|
|
|
|
|
|
%description munin
|
|
|
|
Plugin for the munin / munin-node monitoring package
|
2012-06-15 12:37:47 +00:00
|
|
|
%endif
|
2008-11-15 06:45:37 +00:00
|
|
|
|
2008-10-31 22:29:15 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Development package that includes the unbound header files
|
2014-03-14 01:44:08 +00:00
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}, openssl-devel
|
2016-09-27 23:26:26 +00:00
|
|
|
Requires: pkgconfig
|
2008-10-31 22:29:15 +00:00
|
|
|
|
|
|
|
%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
|
2022-06-27 10:00:02 +00:00
|
|
|
Recommends: %{name}-anchor
|
2023-09-26 18:30:20 +00:00
|
|
|
%{?sysusers_requires_compat}
|
2019-09-26 22:54:35 +00:00
|
|
|
%if ! 0%{with_python2}
|
|
|
|
# Make explicit conflict with no longer provided python package
|
|
|
|
Obsoletes: python2-unbound < 1.9.3
|
|
|
|
%endif
|
2008-10-31 22:29:15 +00:00
|
|
|
|
|
|
|
%description libs
|
2022-06-27 10:00:02 +00:00
|
|
|
Contains libraries used by the unbound server and client applications.
|
|
|
|
|
|
|
|
%package anchor
|
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
|
Summary: DNSSEC trust anchor maintaining tool
|
|
|
|
|
|
|
|
%description anchor
|
|
|
|
Contains tool maintaining trust anchor using RFC 5011 key rollover algorithm.
|
2008-10-31 22:29:15 +00:00
|
|
|
|
2022-06-27 11:53:54 +00:00
|
|
|
%package utils
|
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
|
Summary: Unbound DNS lookup utilities
|
|
|
|
|
|
|
|
%description utils
|
|
|
|
Contains tools for making DNS queries. Can make queries to DNS servers
|
|
|
|
also over TLS connection or validate DNSSEC signatures. Similar to
|
|
|
|
bind-utils.
|
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{with_python2}
|
2017-12-17 17:47:15 +00:00
|
|
|
%package -n python2-unbound
|
|
|
|
%{?python_provide:%python_provide python2-unbound}
|
2015-04-16 14:18:59 +00:00
|
|
|
Summary: Python 2 modules and extensions for unbound
|
2012-11-03 21:33:45 +00:00
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
2015-04-16 14:18:59 +00:00
|
|
|
Provides: unbound-python = %{version}-%{release}
|
|
|
|
Obsoletes: unbound-python < %{version}-%{release}
|
|
|
|
|
2017-12-17 17:47:15 +00:00
|
|
|
%description -n python2-unbound
|
2015-04-16 14:18:59 +00:00
|
|
|
Python 2 modules and extensions for unbound
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
%if 0%{with_python3}
|
|
|
|
%package -n python3-unbound
|
|
|
|
Summary: Python 3 modules and extensions for unbound
|
|
|
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
2019-09-26 21:45:30 +00:00
|
|
|
%if ! 0%{with_python2}
|
|
|
|
# Make explicit conflict with no longer provided python package
|
2019-09-26 22:54:35 +00:00
|
|
|
Conflicts: python2-unbound < 1.9.3
|
2019-09-26 21:45:30 +00:00
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
%description -n python3-unbound
|
|
|
|
Python 3 modules and extensions for unbound
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2009-06-21 04:14:54 +00:00
|
|
|
|
|
|
|
|
2008-10-31 22:29:15 +00:00
|
|
|
%prep
|
2020-10-13 16:41:29 +00:00
|
|
|
%if 0%{?fedora}
|
2023-01-14 00:22:06 +00:00
|
|
|
%{gpgverify} --keyring='%{SOURCE19}' --signature='%{SOURCE18}' --data='%{SOURCE0}'
|
2020-10-13 16:41:29 +00:00
|
|
|
%endif
|
2018-04-09 14:13:03 +00:00
|
|
|
%global pkgname %{name}-%{version}%{?extra_version}
|
|
|
|
|
|
|
|
%if 0%{with_python2} && 0%{with_python3}
|
|
|
|
%global dir_primary %{pkgname}_python3
|
|
|
|
%global python_primary %{__python3}
|
|
|
|
%global dir_secondary %{pkgname}_python2
|
|
|
|
%global python_secondary %{__python2}
|
|
|
|
%else
|
|
|
|
%global dir_primary %{pkgname}
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2018-04-09 14:13:03 +00:00
|
|
|
|
2019-04-01 15:45:54 +00:00
|
|
|
%autosetup -c -N -n %{pkgname}
|
2015-04-16 14:18:59 +00:00
|
|
|
|
2016-11-04 05:02:18 +00:00
|
|
|
pushd %{pkgname}
|
2019-08-27 16:14:51 +00:00
|
|
|
# patches go here
|
2023-10-11 20:55:31 +00:00
|
|
|
%autopatch -p1
|
2018-06-11 20:49:15 +00:00
|
|
|
|
2015-07-14 02:45:42 +00:00
|
|
|
# only for snapshots
|
|
|
|
# autoreconf -iv
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
# copy common doc files - after here, since it may be patched
|
|
|
|
cp -pr doc pythonmod libunbound ../
|
2023-09-06 11:31:59 +00:00
|
|
|
|
|
|
|
%if 0%{?rhel} > 8
|
|
|
|
# SHA-1 breaks some tests. Disable just some tests because of that.
|
|
|
|
# This got broken in ELN
|
|
|
|
ls testdata/*.rpl
|
|
|
|
for TEST in autotrust_init_fail autotrust_init_failsig; do
|
|
|
|
mv testdata/${TEST}.rpl{,-disabled}
|
|
|
|
done
|
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
popd
|
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{with_python2} && 0%{with_python3}
|
|
|
|
mv %{pkgname} %{dir_primary}
|
|
|
|
cp -a %{dir_primary} %{dir_secondary}
|
|
|
|
%endif
|
2008-10-31 22:29:15 +00:00
|
|
|
|
|
|
|
%build
|
2014-09-24 12:41:09 +00:00
|
|
|
# This is needed to rebuild the configure script to support Python 3.x
|
2015-04-16 14:18:59 +00:00
|
|
|
# autoreconf -iv
|
|
|
|
|
|
|
|
# ./configure script common arguments
|
|
|
|
%global configure_args --with-libevent --with-pthreads --with-ssl \\\
|
|
|
|
--disable-rpath --disable-static \\\
|
2018-02-21 18:11:48 +00:00
|
|
|
--enable-relro-now --enable-pie \\\
|
2017-06-22 20:34:47 +00:00
|
|
|
--enable-subnet --enable-ipsecmod \\\
|
2015-04-16 14:18:59 +00:00
|
|
|
--with-conf-file=%{_sysconfdir}/%{name}/unbound.conf \\\
|
2019-08-27 16:14:51 +00:00
|
|
|
--with-pidfile=%{_rundir}/%{name}/%{name}.pid \\\
|
2015-04-16 14:18:59 +00:00
|
|
|
--enable-sha2 --disable-gost --enable-ecdsa \\\
|
2021-04-24 13:27:48 +00:00
|
|
|
--with-rootkey-file=%{_sharedstatedir}/unbound/root.key \\\
|
2023-01-14 00:17:50 +00:00
|
|
|
--enable-linux-ip-local-port-range \\\
|
|
|
|
|
2012-09-26 22:08:08 +00:00
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
pushd %{dir_primary}
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
%configure \
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{?python_primary:1}
|
|
|
|
--with-pythonmodule --with-pyunbound PYTHON=%{python_primary} \
|
2020-03-20 11:33:00 +00:00
|
|
|
%endif
|
|
|
|
%if %{with dnstap}
|
|
|
|
--enable-dnstap \
|
|
|
|
%endif
|
|
|
|
%if %{with systemd}
|
|
|
|
--enable-systemd \
|
2020-10-13 15:26:04 +00:00
|
|
|
%endif
|
|
|
|
%if %{with doh}
|
|
|
|
--with-libnghttp2 \
|
2022-12-08 00:49:28 +00:00
|
|
|
%endif
|
|
|
|
%if 0%{?rhel}
|
|
|
|
--disable-sha1 \
|
2023-01-14 00:17:50 +00:00
|
|
|
%endif
|
|
|
|
%if %{with redis}
|
|
|
|
--with-libhiredis \
|
|
|
|
--enable-cachedb \
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
%{configure_args}
|
|
|
|
|
2020-07-14 14:38:00 +00:00
|
|
|
%make_build
|
|
|
|
%make_build streamtcp
|
2008-10-31 22:29:15 +00:00
|
|
|
|
2015-04-16 14:18:59 +00:00
|
|
|
popd
|
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{?python_secondary:1}
|
|
|
|
pushd %{dir_secondary}
|
2015-04-16 14:18:59 +00:00
|
|
|
%configure \
|
2018-04-09 07:58:43 +00:00
|
|
|
--with-pythonmodule --with-pyunbound PYTHON=%{python_secondary} \
|
2020-03-20 11:33:00 +00:00
|
|
|
%if %{with dnstap}
|
|
|
|
--enable-dnstap \
|
|
|
|
%endif
|
|
|
|
%if %{with systemd}
|
|
|
|
--enable-systemd \
|
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
%{configure_args}
|
|
|
|
|
2020-07-14 14:38:00 +00:00
|
|
|
%make_build
|
2015-04-16 14:18:59 +00:00
|
|
|
popd
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
|
2008-10-31 22:29:15 +00:00
|
|
|
%install
|
2016-11-04 05:02:18 +00:00
|
|
|
install -p -m 0644 %{SOURCE16} .
|
2015-04-16 14:18:59 +00:00
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{?python_secondary:1}
|
2018-04-09 09:26:06 +00:00
|
|
|
# install first secondary build. It will be overwritten by primary
|
2018-04-09 07:58:43 +00:00
|
|
|
pushd %{dir_secondary}
|
2020-07-14 14:38:00 +00:00
|
|
|
%make_install unbound-event-install
|
2018-04-09 09:26:06 +00:00
|
|
|
popd
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2018-04-09 09:26:06 +00:00
|
|
|
|
|
|
|
pushd %{dir_primary}
|
2020-07-14 14:38:00 +00:00
|
|
|
%make_install unbound-event-install
|
2016-04-21 23:53:58 +00:00
|
|
|
install -m 0755 streamtcp %{buildroot}%{_sbindir}/unbound-streamtcp
|
2015-09-03 17:56:57 +00:00
|
|
|
popd
|
|
|
|
|
2015-04-13 10:50:34 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
|
2013-04-12 23:57:45 +00:00
|
|
|
install -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/unbound.service
|
|
|
|
install -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/unbound-keygen.service
|
2015-04-27 11:44:47 +00:00
|
|
|
install -p -m 0644 %{SOURCE15} %{buildroot}%{_unitdir}/unbound-anchor.timer
|
|
|
|
install -p -m 0644 %{SOURCE17} %{buildroot}%{_unitdir}/unbound-anchor.service
|
2013-04-12 23:57:45 +00:00
|
|
|
install -p -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/unbound
|
|
|
|
install -p -m 0644 %{SOURCE12} %{buildroot}%{_sysconfdir}/unbound
|
2015-04-27 11:44:47 +00:00
|
|
|
install -p -m 0644 %{SOURCE14} %{buildroot}%{_sysconfdir}/sysconfig/unbound
|
2022-12-01 16:30:31 +00:00
|
|
|
install -p -D -m 0644 %{SOURCE20} %{buildroot}%{_sysusersdir}/%{name}.sysusers
|
2013-04-11 16:02:00 +00:00
|
|
|
%if %{with_munin}
|
2008-11-19 23:11:51 +00:00
|
|
|
# Install munin plugin and its softlinks
|
2015-04-13 10:50:34 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/munin/plugin-conf.d
|
2012-11-03 16:59:54 +00:00
|
|
|
install -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/munin/plugin-conf.d/unbound
|
2015-04-13 10:50:34 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_datadir}/munin/plugins/
|
2013-04-12 23:57:45 +00:00
|
|
|
install -p -m 0755 %{SOURCE4} %{buildroot}%{_datadir}/munin/plugins/unbound
|
2008-11-19 23:11:51 +00:00
|
|
|
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
|
2012-06-15 12:37:47 +00:00
|
|
|
done
|
|
|
|
%endif
|
2008-10-31 22:29:15 +00:00
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
pushd %{dir_primary}
|
2013-07-22 07:27:32 +00:00
|
|
|
# install streamtcp man page
|
|
|
|
install -m 0644 testcode/streamtcp.1 %{buildroot}/%{_mandir}/man1/unbound-streamtcp.1
|
2016-09-27 23:26:26 +00:00
|
|
|
install -D -m 0644 contrib/libunbound.pc %{buildroot}/%{_libdir}/pkgconfig/libunbound.pc
|
2015-04-16 14:18:59 +00:00
|
|
|
popd
|
|
|
|
|
2011-09-14 20:20:56 +00:00
|
|
|
# Install tmpfiles.d config
|
2014-12-10 04:29:13 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_tmpfilesdir} %{buildroot}%{_sharedstatedir}/unbound
|
|
|
|
install -m 0644 %{SOURCE8} %{buildroot}%{_tmpfilesdir}/unbound.conf
|
2011-09-14 20:20:56 +00:00
|
|
|
|
2017-01-18 17:04:34 +00:00
|
|
|
# install root - we keep a copy of the root key in old location,
|
2013-04-08 15:04:39 +00:00
|
|
|
# in case user has changed the configuration and we wouldn't update it there
|
2017-01-18 17:41:19 +00:00
|
|
|
install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/unbound/
|
2022-12-01 17:09:12 +00:00
|
|
|
install -m 0644 %{SOURCE13} %{buildroot}%{_sysconfdir}/unbound/dnssec-root.key
|
|
|
|
# make initial key static
|
|
|
|
pushd %{buildroot}%{_sharedstatedir}/unbound
|
|
|
|
KEYPATH=$(realpath --relative-to="%{buildroot}%{_sharedstatedir}/unbound" "%{buildroot}%{_sysconfdir}/unbound/dnssec-root.key")
|
|
|
|
ln -s "$KEYPATH" root.key
|
|
|
|
popd
|
2010-02-23 20:32:08 +00:00
|
|
|
|
2008-10-31 22:29:15 +00:00
|
|
|
# remove static library from install (fedora packaging guidelines)
|
2011-01-26 01:56:16 +00:00
|
|
|
rm %{buildroot}%{_libdir}/*.la
|
2015-04-16 14:18:59 +00:00
|
|
|
|
2016-09-27 23:26:26 +00:00
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{with_python2}
|
2015-04-16 14:18:59 +00:00
|
|
|
rm %{buildroot}%{python2_sitearch}/*.la
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
%if 0%{with_python3}
|
|
|
|
rm %{buildroot}%{python3_sitearch}/*.la
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2008-10-31 22:29:15 +00:00
|
|
|
|
2022-04-20 19:06:56 +00:00
|
|
|
mkdir -p %{buildroot}%{_rundir}/unbound
|
2008-10-31 22:29:15 +00:00
|
|
|
|
2012-09-26 16:38:51 +00:00
|
|
|
# Install directories for easier config file drop in
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/unbound/{keys.d,conf.d,local.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/
|
|
|
|
|
2013-04-11 16:02:00 +00:00
|
|
|
# Link unbound-control-setup.8 manpage to unbound-control.8
|
|
|
|
echo ".so man8/unbound-control.8" > %{buildroot}/%{_mandir}/man8/unbound-control-setup.8
|
2013-03-05 15:24:17 +00:00
|
|
|
|
2015-04-16 14:18:59 +00:00
|
|
|
|
2022-12-01 16:05:37 +00:00
|
|
|
%pre libs
|
2022-12-01 16:30:31 +00:00
|
|
|
%sysusers_create_compat %{SOURCE20}
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
%systemd_post unbound.service
|
|
|
|
%systemd_post unbound-keygen.service
|
|
|
|
|
2022-06-27 10:00:02 +00:00
|
|
|
%post anchor
|
2022-10-11 09:34:09 +00:00
|
|
|
%systemd_post unbound-anchor.service unbound-anchor.timer
|
2015-07-16 11:44:16 +00:00
|
|
|
# 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
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun unbound.service
|
|
|
|
%systemd_preun unbound-keygen.service
|
|
|
|
|
2022-06-27 10:00:02 +00:00
|
|
|
%preun anchor
|
2022-10-11 09:34:09 +00:00
|
|
|
%systemd_preun unbound-anchor.service unbound-anchor.timer
|
2015-04-27 11:44:47 +00:00
|
|
|
|
2015-04-16 14:18:59 +00:00
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart unbound.service
|
|
|
|
%systemd_postun unbound-keygen.service
|
|
|
|
|
2022-10-11 09:34:09 +00:00
|
|
|
%postun anchor
|
|
|
|
%systemd_postun_with_restart unbound-anchor.service unbound-anchor.timer
|
2015-04-16 14:18:59 +00:00
|
|
|
|
2013-10-21 09:58:51 +00:00
|
|
|
%check
|
2018-04-09 07:58:43 +00:00
|
|
|
pushd %{dir_primary}
|
2015-04-16 14:18:59 +00:00
|
|
|
#pushd pythonmod
|
|
|
|
#make test
|
|
|
|
#popd
|
|
|
|
|
2013-10-21 09:58:51 +00:00
|
|
|
make check
|
|
|
|
|
2015-04-16 14:18:59 +00:00
|
|
|
popd
|
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{?python_secondary:1}
|
|
|
|
pushd %{dir_secondary}
|
2015-04-16 14:18:59 +00:00
|
|
|
#pushd pythonmod
|
|
|
|
#make test
|
|
|
|
#popd
|
|
|
|
make check
|
|
|
|
popd
|
2019-08-05 20:07:17 +00:00
|
|
|
%endif
|
2015-04-16 14:18:59 +00:00
|
|
|
|
|
|
|
|
2015-10-07 15:04:36 +00:00
|
|
|
%files
|
2015-04-16 14:18:59 +00:00
|
|
|
%doc doc/CREDITS doc/FEATURES
|
2011-09-14 20:20:56 +00:00
|
|
|
%{_unitdir}/%{name}.service
|
|
|
|
%{_unitdir}/%{name}-keygen.service
|
2022-04-20 19:06:56 +00:00
|
|
|
%attr(0755,unbound,unbound) %dir %{_rundir}/%{name}
|
2014-12-09 20:56:24 +00:00
|
|
|
%attr(0644,root,root) %{_tmpfilesdir}/unbound.conf
|
2008-11-19 23:11:51 +00:00
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/unbound.conf
|
2013-04-11 16:02:00 +00:00
|
|
|
%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/keys.d
|
2018-02-21 10:24:27 +00:00
|
|
|
%attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/keys.d/*.key
|
2013-04-11 16:02:00 +00:00
|
|
|
%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/conf.d
|
2018-02-21 10:24:27 +00:00
|
|
|
%attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/conf.d/*.conf
|
2013-04-11 16:02:00 +00:00
|
|
|
%dir %attr(0755,root,unbound) %{_sysconfdir}/%{name}/local.d
|
2018-02-21 10:24:27 +00:00
|
|
|
%attr(0644,root,unbound) %config(noreplace) %{_sysconfdir}/%{name}/local.d/*.conf
|
2018-07-18 09:21:49 +00:00
|
|
|
%ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_control.pem
|
|
|
|
%ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_control.key
|
|
|
|
%ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_server.pem
|
|
|
|
%ghost %attr(0640,root,unbound) %{_sysconfdir}/%{name}/unbound_server.key
|
2012-11-03 22:55:14 +00:00
|
|
|
%{_sbindir}/unbound
|
|
|
|
%{_sbindir}/unbound-checkconf
|
|
|
|
%{_sbindir}/unbound-control
|
|
|
|
%{_sbindir}/unbound-control-setup
|
2012-07-23 17:37:51 +00:00
|
|
|
%{_mandir}/man5/*
|
2015-05-13 11:17:43 +00:00
|
|
|
%exclude %{_mandir}/man8/unbound-anchor*
|
2012-07-23 17:37:51 +00:00
|
|
|
%{_mandir}/man8/*
|
2008-10-31 22:29:15 +00:00
|
|
|
|
2018-04-09 07:58:43 +00:00
|
|
|
%if 0%{with_python2}
|
2017-12-17 17:47:15 +00:00
|
|
|
%files -n python2-unbound
|
2015-04-16 14:18:59 +00:00
|
|
|
%license pythonmod/LICENSE
|
|
|
|
%{python2_sitearch}/*
|
2011-08-08 22:39:54 +00:00
|
|
|
%doc libunbound/python/examples/*
|
|
|
|
%doc pythonmod/examples/*
|
2009-06-21 04:14:54 +00:00
|
|
|
%endif
|
|
|
|
|
2015-04-16 14:18:59 +00:00
|
|
|
%if 0%{with_python3}
|
|
|
|
%files -n python3-unbound
|
|
|
|
%license pythonmod/LICENSE
|
|
|
|
%{python3_sitearch}/*
|
|
|
|
%doc libunbound/python/examples/*
|
|
|
|
%doc pythonmod/examples/*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{with_munin}
|
2008-11-15 06:45:37 +00:00
|
|
|
%files munin
|
2015-04-16 14:18:59 +00:00
|
|
|
%doc unbound-munin.README
|
2008-11-15 06:50:03 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/munin/plugin-conf.d/unbound
|
2008-11-19 23:11:51 +00:00
|
|
|
%{_datadir}/munin/plugins/unbound*
|
2012-06-15 12:37:47 +00:00
|
|
|
%endif
|
2008-11-15 06:45:37 +00:00
|
|
|
|
2008-10-31 22:29:15 +00:00
|
|
|
%files devel
|
|
|
|
%{_libdir}/libunbound.so
|
|
|
|
%{_includedir}/unbound.h
|
2017-03-22 02:19:44 +00:00
|
|
|
%{_includedir}/unbound-event.h
|
2012-07-23 17:37:51 +00:00
|
|
|
%{_mandir}/man3/*
|
2016-09-27 23:26:26 +00:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
2008-10-31 22:29:15 +00:00
|
|
|
|
|
|
|
%files libs
|
2015-04-16 14:18:59 +00:00
|
|
|
%doc doc/README
|
|
|
|
%license doc/LICENSE
|
2013-04-11 16:02:00 +00:00
|
|
|
%attr(0755,root,root) %dir %{_sysconfdir}/%{name}
|
2022-12-01 16:30:31 +00:00
|
|
|
%{_sysusersdir}/%{name}.sysusers
|
|
|
|
%{_libdir}/libunbound.so.8*
|
2022-06-27 10:00:02 +00:00
|
|
|
%dir %attr(0755,unbound,unbound) %{_sharedstatedir}/%{name}
|
2022-12-01 17:09:12 +00:00
|
|
|
%verify(not size mtime filedigest link mode user group) %{_sharedstatedir}/%{name}/root.key
|
2022-06-27 10:00:02 +00:00
|
|
|
# just left for backwards compat with user changed unbound.conf files - format is different!
|
|
|
|
%attr(0644,root,root) %config %{_sysconfdir}/%{name}/root.key
|
2022-12-01 17:09:12 +00:00
|
|
|
%attr(0644,root,root) %config %{_sysconfdir}/%{name}/dnssec-root.key
|
2022-06-27 10:00:02 +00:00
|
|
|
|
|
|
|
%files anchor
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
|
|
|
%{_sbindir}/unbound-anchor
|
2015-05-13 11:17:43 +00:00
|
|
|
%{_mandir}/man8/unbound-anchor*
|
2022-04-20 19:06:56 +00:00
|
|
|
# icannbundle and root.key(s) should be replaced from package
|
|
|
|
# intentionally not using noreplace
|
|
|
|
%config %{_sysconfdir}/%{name}/icannbundle.pem
|
2015-04-27 11:44:47 +00:00
|
|
|
%{_unitdir}/unbound-anchor.timer
|
|
|
|
%{_unitdir}/unbound-anchor.service
|
2011-09-14 20:20:56 +00:00
|
|
|
|
2022-06-27 11:53:54 +00:00
|
|
|
%files utils
|
|
|
|
%{_sbindir}/unbound-host
|
|
|
|
%{_sbindir}/unbound-streamtcp
|
|
|
|
%{_mandir}/man1/unbound-*
|
|
|
|
|
2008-10-31 22:29:15 +00:00
|
|
|
%changelog
|
2023-11-02 18:39:30 +00:00
|
|
|
* Thu Nov 02 2023 Petr Menšík <pemensik@redhat.com> - 1.19.0-1
|
|
|
|
- Update to 1.19.0 (#2248686)
|
|
|
|
|
2023-10-11 20:55:31 +00:00
|
|
|
%autochangelog
|