2014-02-04 16:04:04 +00:00
|
|
|
%global _hardened_build 1
|
|
|
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
|
|
|
|
Summary: An authoritative DNS daemon
|
|
|
|
Name: knot
|
2014-02-18 14:31:42 +00:00
|
|
|
Version: 1.4.3
|
2014-02-04 16:04:04 +00:00
|
|
|
Release: 1%{?dist}
|
|
|
|
License: GPLv3
|
|
|
|
Group: System Environment/Daemons
|
|
|
|
URL: http://www.knot-dns.cz
|
|
|
|
Source0: http://public.nic.cz/files/knot-dns/%{name}-%{version}.tar.gz
|
|
|
|
Source1: %{name}.conf
|
|
|
|
Source2: %{name}.init
|
|
|
|
|
|
|
|
BuildRequires: flex bison openssl-devel userspace-rcu-devel libcap-ng-devel libidn-devel
|
|
|
|
BuildRequires: texinfo
|
|
|
|
|
|
|
|
Requires(post): info
|
|
|
|
Requires(preun): info
|
|
|
|
|
|
|
|
Requires(post): chkconfig
|
|
|
|
Requires(preun): chkconfig
|
|
|
|
Requires(preun): initscripts
|
|
|
|
|
|
|
|
%description
|
|
|
|
Knot DNS is a high-performance authoritative DNS server implementation.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
# disable debug code (causes unused warnings)
|
|
|
|
CFLAGS="%{optflags} -DNDEBUG -Wno-unused"
|
|
|
|
%configure
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
|
|
|
|
# info database is updated at install time
|
|
|
|
rm %{buildroot}%{_datadir}/info/dir
|
|
|
|
|
|
|
|
# install customized configuration file
|
|
|
|
rm %{buildroot}%{_sysconfdir}/%{name}/*
|
|
|
|
install -p -m 0644 -D %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
|
|
|
|
|
|
|
# install service file and create rundir
|
|
|
|
install -p -m 0755 -D %{SOURCE2} %{buildroot}%{_initddir}/%{name}
|
|
|
|
install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}
|
|
|
|
|
|
|
|
# create storage dir and key dir
|
|
|
|
mkdir -p %{buildroot}%{_sharedstatedir}
|
|
|
|
install -d -m 0775 %{buildroot}%{_sharedstatedir}/%{name}
|
|
|
|
install -d -m 0750 %{buildroot}%{_sharedstatedir}/%{name}/keys
|
|
|
|
|
|
|
|
# install config samples into docdir
|
|
|
|
install -d -m 0755 %{buildroot}%{_pkgdocdir}/samples
|
|
|
|
for sample_file in knot.full.conf knot.keys.conf example.com.zone; do
|
|
|
|
install -p -m 0644 samples/${sample_file} %{buildroot}%{_pkgdocdir}/samples
|
|
|
|
done
|
|
|
|
|
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
|
|
|
%pre
|
|
|
|
getent group knot >/dev/null || groupadd -r knot
|
|
|
|
getent passwd knot >/dev/null || \
|
|
|
|
useradd -r -g knot -d %{_sysconfdir}/knot -s /sbin/nologin \
|
|
|
|
-c "Knot DNS server" knot
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|
|
|
/sbin/chkconfig --add %{name}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|
|
|
/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
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc COPYING AUTHORS NEWS README THANKS
|
|
|
|
%{_initddir}/%{name}
|
|
|
|
%dir %attr(750,root,knot) %{_sysconfdir}/%{name}
|
|
|
|
%config(noreplace) %attr(640,root,knot) %{_sysconfdir}/%{name}/%{name}.conf
|
|
|
|
%dir %attr(775,root,knot) %{_sharedstatedir}/%{name}
|
|
|
|
%dir %attr(750,root,knot) %{_sharedstatedir}/%{name}/keys
|
|
|
|
%dir %attr(-,knot,knot) %{_localstatedir}/run/%{name}
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_sbindir}/*
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_mandir}/man5/*
|
|
|
|
%{_mandir}/man8/*
|
|
|
|
%doc %{_infodir}/%{name}.info.gz
|
|
|
|
|
|
|
|
%changelog
|
2014-02-18 14:31:42 +00:00
|
|
|
* Tue Feb 18 2014 Jan Vcelak <jvcelak@fedoraproject.org> 1.4.3-1
|
|
|
|
- update to 1.4.3
|
|
|
|
+ DNSSEC: fixes in authenticated denial proofs
|
|
|
|
+ zone parser: case insensitive comparison of $ORIGIN
|
|
|
|
+ journal: fix corruption if zone loading fails
|
|
|
|
+ config: add support for includes of directories
|
|
|
|
|
2014-02-04 16:04:04 +00:00
|
|
|
* Tue Feb 04 2014 Jan Vcelak <jvcelak@fedoraproject.org> 1.4.2-1
|
|
|
|
- initial package for RHEL
|
|
|
|
|