a1701cd
%global _hardened_build 1
a1701cd
7498f5c
Name:       ndjbdns
b83cd8b
Version:    1.06
826651e
Release:    7%{?dist}
7498f5c
Summary:    New djbdns: usable djbdns
7498f5c
7498f5c
License:    GPLv2+
7498f5c
URL:        http://pjp.dgplug.org/djbdns/
7498f5c
Source0:    http://pjp.dgplug.org/djbdns/%{name}-%{version}.tar.gz
7498f5c
7498f5c
%if 0%{?fedora} || 0%{?rhel} >= 7
9176b47
Requires:       pkgconfig
7498f5c
BuildRequires:  systemd-units
7498f5c
%endif
7498f5c
826651e
%if 0%{?fedora} || 0%{?rhel} >= 7
7498f5c
Requires(post):     systemd-sysv
7498f5c
Requires(post):     systemd
7498f5c
Requires(preun):    systemd
7498f5c
Requires(postun):   systemd
7498f5c
%endif
7498f5c
826651e
%if 0%{?rhel} == 6
7498f5c
Requires(post):     /sbin/chkconfig
7498f5c
Requires(preun):    /sbin/chkconfig
7498f5c
Requires(preun):    /sbin/service
7498f5c
Requires(postun):   /sbin/service
7498f5c
%endif
a31888b
a31888b
%description
a31888b
New djbdns: is a usable fork of djbdns. `djbdns' is a Domain Name System
a31888b
originally written by the eminent author of Qmail, Dr D. J. Bernstein.
a31888b
This *new* version of djbdns is a complete makeover to the original
a31888b
source(djbdns-1.05) and is meant to make life a lot more pleasant. The
a31888b
notable changes so far are in the set-up & configuration steps and
a31888b
integration with the systemd(1) framework. This new release is free from
a31888b
the clutches of `daemon-tools'. The original source is in public-domain
a31888b
since late Dec 2007(see: http://cr.yp.to/distributors.html);
a31888b
a31888b
a31888b
%prep
a31888b
%setup -q %{name}
a31888b
a31888b
a31888b
%build
a31888b
%configure
a31888b
make %{?_smp_mflags}
a31888b
a31888b
a31888b
%install
a31888b
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
a31888b
826651e
%if 0%{?rhel} == 6
a31888b
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/
a31888b
mv ndjbdns.logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/ndjbdns
7498f5c
%endif
7498f5c
ea9a5af
ea9a5af
%clean
826651e
%if 0%{?fedora} || 0%{?rhel} >= 7
7498f5c
7498f5c
%post
7498f5c
%systemd_post axfrdns.service
7498f5c
%systemd_post dnscache.service
a1f088d
%systemd_post rbldns.service
7498f5c
%systemd_post tinydns.service
9176b47
%systemd_post walldns.service
a31888b
7498f5c
%preun
7498f5c
%systemd_preun axfrdns.service
7498f5c
%systemd_preun dnscache.service
a1f088d
%systemd_preun rbldns.service
7498f5c
%systemd_preun tinydns.service
9176b47
%systemd_preun walldns.service
7498f5c
7498f5c
%postun
7498f5c
%systemd_postun_with_restart axfrdns.service
7498f5c
%systemd_postun_with_restart dnscache.service
a1f088d
%systemd_postun_with_restart rbldns.service
7498f5c
%systemd_postun_with_restart tinydns.service
9176b47
%systemd_postun_with_restart walldns.service
7498f5c
7498f5c
%endif
7498f5c
826651e
%if 0%{?rhel} == 6
7498f5c
7498f5c
%post
a1f088d
/sbin/chkconfig --add axfrdns
a1f088d
/sbin/chkconfig --add dnscache
a1f088d
/sbin/chkconfig --add rbldns
a1f088d
/sbin/chkconfig --add tinydns
9176b47
/sbin/chkconfig --add walldns
7498f5c
7498f5c
%preun
7498f5c
if [ "$1" = 0 ]; then
a1f088d
    /sbin/service axfrdns stop > /dev/null 2>&1 || :
a1f088d
    /sbin/chkconfig --del axfrdns
a1f088d
a1f088d
    /sbin/service dnscache stop > /dev/null 2>&1 || :
a1f088d
    /sbin/chkconfig --del dnscache
7498f5c
a1f088d
    /sbin/service rbldns stop > /dev/null 2>&1 || :
a1f088d
    /sbin/chkconfig --del rbldns
7498f5c
a1f088d
    /sbin/service tinydns stop > /dev/null 2>&1 || :
a1f088d
    /sbin/chkconfig --del tinydns
9176b47
9176b47
    /sbin/service walldns stop > /dev/null 2>&1 || :
9176b47
    /sbin/chkconfig --del walldns
7498f5c
fi
7498f5c
7498f5c
%postun
7498f5c
if [ "$1" -ge "1" ]; then
a1f088d
    /sbin/service axfrdns restart > /dev/null 2>&1 || :
a1f088d
    /sbin/service dnscache restart > /dev/null 2>&1 || :
a1f088d
    /sbin/service rbldns restart > /dev/null 2>&1 || :
a1f088d
    /sbin/service tinydns restart > /dev/null 2>&1 || :
9176b47
    /sbin/service walldns restart > /dev/null 2>&1 || :
7498f5c
fi
7498f5c
7498f5c
%endif
a31888b
a31888b
%files
826651e
%license COPYING
826651e
%doc README ChangeLog
a31888b
9176b47
%{_sbindir}/axfrdns
9176b47
%{_sbindir}/dnscache
9176b47
%{_sbindir}/rbldns
9176b47
%{_sbindir}/tinydns
9176b47
%{_sbindir}/walldns
9176b47
a31888b
%{_bindir}/axfr-get
a31888b
%{_bindir}/dnsfilter
a31888b
%{_bindir}/dnsip
a31888b
%{_bindir}/dnsipq
a31888b
%{_bindir}/dnsname
a31888b
%{_bindir}/dnsq
a31888b
%{_bindir}/dnsqr
a31888b
%{_bindir}/dnstrace
a31888b
%{_bindir}/dnstracesort
a31888b
%{_bindir}/dnstxt
a31888b
%{_bindir}/randomip
a1f088d
%{_bindir}/rbldns-data
a31888b
%{_bindir}/tcprules
a31888b
%{_bindir}/tinydns-data
a31888b
%{_bindir}/tinydns-edit
a31888b
%{_bindir}/tinydns-get
a31888b
7498f5c
%if 0%{?fedora} || 0%{?rhel} >= 7
bd47727
%{_unitdir}/axfrdns.socket
bd47727
%{_unitdir}/axfrdns@.service
a31888b
%{_unitdir}/dnscache.service
a1f088d
%{_unitdir}/rbldns.service
a31888b
%{_unitdir}/tinydns.service
9176b47
%{_unitdir}/walldns.service
7498f5c
%else
a1f088d
%{_initrddir}/dnscache
a1f088d
%{_initrddir}/rbldns
a1f088d
%{_initrddir}/tinydns
9176b47
%{_initrddir}/walldns
bd47727
%config(noreplace) %{_sysconfdir}/xinetd.d/axfrdns
7498f5c
%config(noreplace) %{_sysconfdir}/logrotate.d/ndjbdns
7498f5c
%endif
a31888b
a31888b
%config(noreplace) %{_sysconfdir}/%{name}/ip/127.0.0.1
a31888b
%config(noreplace) %{_sysconfdir}/%{name}/servers/roots
a1f088d
a1f088d
%config(noreplace) %{_sysconfdir}/%{name}/axfrdns.conf
a31888b
%config(noreplace) %{_sysconfdir}/%{name}/dnscache.conf
a1f088d
%config(noreplace) %{_sysconfdir}/%{name}/rbldns.conf
a1f088d
%config(noreplace) %{_sysconfdir}/%{name}/tinydns.conf
9176b47
%config(noreplace) %{_sysconfdir}/%{name}/walldns.conf
a31888b
a31888b
%{_mandir}/man1/axfr-get.1.gz
a31888b
%{_mandir}/man1/djbdns.1.gz
a31888b
%{_mandir}/man1/dnsfilter.1.gz
a31888b
%{_mandir}/man1/dnsip.1.gz
a31888b
%{_mandir}/man1/dnsipq.1.gz
a31888b
%{_mandir}/man1/dnsname.1.gz
a31888b
%{_mandir}/man1/dnsq.1.gz
a31888b
%{_mandir}/man1/dnsqr.1.gz
a31888b
%{_mandir}/man1/dnstrace.1.gz
a31888b
%{_mandir}/man1/dnstxt.1.gz
a1f088d
%{_mandir}/man1/rbldns-data.1.gz
a31888b
%{_mandir}/man1/randomip.1.gz
a31888b
%{_mandir}/man1/tcprules.1.gz
a31888b
%{_mandir}/man1/tinydns-data.1.gz
a31888b
%{_mandir}/man1/tinydns-edit.1.gz
a31888b
%{_mandir}/man1/tinydns-get.1.gz
a31888b
9176b47
%{_mandir}/man8/axfrdns.8.gz
9176b47
%{_mandir}/man8/dnscache.8.gz
9176b47
%{_mandir}/man8/rbldns.8.gz
9176b47
%{_mandir}/man8/tinydns.8.gz
9176b47
%{_mandir}/man8/walldns.8.gz
9176b47
a31888b
a31888b
%changelog
826651e
* Wed Apr 05 2017 Simone Caronni <negativo17@gmail.com> - 1.06-7
826651e
- Remove RHEL/CentOS 5 and old Fedora releases remnants.
826651e
- Add license macro.
826651e
51f89a0
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.06-6
51f89a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
51f89a0
279b1c7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.06-5
279b1c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
279b1c7
13ca32a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.06-4
13ca32a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
13ca32a
3c45f61
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.06-3
3c45f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
3c45f61
7c43192
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.06-2
7c43192
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7c43192
b83cd8b
* Tue Apr 15 2014 pjp <pj.pandit@yahoo.co.in> - 1.06-1
b83cd8b
- Merged the one-second.patch.
b83cd8b
- Merged the dnscache-siphash.patch.
b83cd8b
- Fixed a segmentation fault in tcprules.
b83cd8b
- Fixed a time zone glitch to account for Daylight saving time.
b83cd8b
b83cd8b
* Sat Dec 14 2013 pjp <pj.pandit@yahoo.co.in> - 1.05.9-1
bd47727
- Introduced support for DNS block list in dnscache(8).
bd47727
- Improved root server's log structure, added timestamps etc.
bd47727
- Changed tinydns(8) server to read data ones at the beginning
bd47727
  and later when signaled via SIGUSR1.
bd47727
- Added xinetd(8) & Systemd(1) configurations for axfrdns(8).
bd47727
a1701cd
* Tue Aug 27 2013 pjp <pj.pandit@yahoo.co.in> - 1.05.8-1
a1701cd
- Updated resolver logs to add timestamps and structure.
a1701cd
- Added new IP to the root server list, and removed one.
a1701cd
- Updated resolver to make ANY queries over TCP.
a1701cd
- Added 'After=network.target' to the Systemd unit files.
a1701cd
592d8e5
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05.7-2
592d8e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
592d8e5
9176b47
* Sun Feb 24 2013 pjp <pj.pandit@yahoo.co.in> - 1.05.7-1
9176b47
- Build & install walldns server.
9176b47
- Removed install commands for systemd unit files.
9176b47
- Merge patch to bind servers to multiple IP addresses.
9176b47
- Patch to respond to original destination address BZ#917580.
9176b47
- Update to correctly read servers/mydomain.dom files BZ#913651.
9176b47
1324bf7
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05.6-2
1324bf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1324bf7
b83cd8b
* Mon Jan 14 2013 pjp <pj.pandit@yahoo.co.in> - 1.05.6-1
a1f088d
- Updated SysV scripts according to the packaging guidelines.
a1f088d
- Disabled system services by default, registerd all.
a1f088d
  patch from: Simone Caronni <negativo17@gmail.com>
a1f088d
- Built rbldns & rbldns-data tools.
a1f088d
- Added systemd unit and Sys-v init files for rbldns server.
a1f088d
- Few minor changes to fix regressions, define uint32 type etc.
a1f088d
b83cd8b
* Sun Dec 23 2012 pjp <pj.pandit@yahoo.co.in> - 1.05.5-1
7498f5c
- Applied patch to make SOA responses cache-able.
7498f5c
- Applied patch to merge identical outgoing requests.
7498f5c
- Applied patch to install Sys-V init scripts for RHEL and systemd
7498f5c
  unit files for latest fedora and RHEL-7 distributions.
7498f5c
  patch from: Simone Caronni <negativo17@gmail.com>
7498f5c
f5ab5b1
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.05.4-10
f5ab5b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f5ab5b1
a31888b
* Tue Mar 13 2012 pjp <pj.pandit@yahoo.co.in> - 1.05.4-9
a31888b
- added logrotate configuration file /etc/logrotate.d/ndjbdns and a
a31888b
  systemd service unit file: axfrdns.service.
a31888b
a31888b
* Mon Mar 12 2012 pjp <pj.pandit@yahoo.co.in> - 1.05.4-8
a31888b
- listed individual files under _bindir and _mandir. Removed wild card: *.
a31888b
a31888b
* Sun Mar 11 2012 pjp <pj.pandit@yahoo.co.in> - 1.05.4-7
a31888b
- added user manual for commands. Removed couple of commands.
a31888b
a31888b
* Fri Mar  2 2012 pjp <pj.pandit@yahoo.co.in> - 1.05.4-6
a31888b
- renamed /etc/djbdns to /etc/ndjbdns; removed the clean section above.
a31888b
a31888b
* Tue Feb 28 2012 pjp <pj.pandit@yahoo.co.in> - 1.05.4-5
a31888b
- removed SysV init scripts, replaced ./configure with the configure macro.
a31888b
a31888b
* Fri Feb 24 2012 pjp <pj.pandit@yahoo.co.in> - 1.05.4-4
a31888b
- added systemd service unit files. Patch from Jose - jmalv04.
a31888b
a31888b
* Tue Jul 26 2011 pjp <pj.pandit@yahoo.co.in> - 1.05.4-3
a31888b
- name changed to ndjbdns: New djbdns.
a31888b
a31888b
* Thu Apr  7 2011 pjp <pj.pandit@yahoo.co.in> - 1.05.4-2
a31888b
- renamed default root server list from servers/@ to servers/roots.
a31888b
a31888b
* Thu Jan  6 2011 pjp <pj.pandit@yahoo.co.in> - 1.05.4-1
a31888b
- init service script djbdns renamed to dnscached. and added a new service
a31888b
  tinydnsd for DNS server.
a31888b
a31888b
* Wed Aug 19 2009 pjp <pj.pandit@yahoo.co.in> - 1.05.3-2
a31888b
- Changes made to the build, install & files sections above, as indicated in
a31888b
  the package review: https://bugzilla.redhat.com/show_bug.cgi?id=480724
a31888b
a31888b
* Sun Aug 16 2009 pjp <pj.pandit@yahoo.co.in> - 1.05.3-1
a31888b
- A new release djbdns-1.05.3 of djbdns, includes tinydns and few more tools.
a31888b
a31888b
* Tue Mar 17 2009 pjp <pj.pandit@yahoo.co.in> - 1.05.2-1
a31888b
- It's release 1 of new version 1.05.2 of djbdns.
a31888b
a31888b
* Fri Mar  6 2009 pjp <pj.pandit@yahoo.co.in> - 1.05.1-2
a31888b
- changed README and the spec file to include reference to DJBs public-domain
a31888b
  announcement at: http://cr.yp.to/distributors.html
a31888b
a31888b
* Thu Mar  5 2009 pjp <pj.pandit@yahoo.co.in> - 1.05.1-1
a31888b
- Initial RPM release of djbdns-1.05.1