djbdns/djbdns.spec

241 lines
10 KiB
RPMSpec

# $Id: djbdns.spec,v 1.4 2021/04/13 01:01:10 jpp Exp $
#
# RPM spec file for Dan Bernstein's djbdns package
#
# $Id: djbdns.spec,v 1.4 2021/04/13 01:01:10 jpp Exp $
#
Summary: collection of Domain Name System tools
%define name djbdns
Name: %{name}
%define version 1.05
%define release 11
Version: %{version}
Release: %{release}%{?dist}
License: Public Domain
Group: Networking/Daemons
Source: http://cr.yp.to/%{name}/%{name}-%{version}.tar.gz
URL: http://cr.yp.to/%{name}.html
Patch0: %{name}-%{version}.patch.2001022000
Patch1: dns_transmit-bug.patch
#Patch2: http://homepages.tesco.net./~J.deBoynePollard/Softwares/djbdns/dnscache-cname-handling.patch
#Patch3: http://homepages.tesco.net./~J.deBoynePollard/Softwares/djbdns/dnscache-strict-forwardonly.patch
#Patch4: http://homepages.tesco.net./~J.deBoynePollard/Softwares/djbdns/tinydns-alias-chain-truncation.patch
# openwrt patches
Patch20: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/020-dnsroots-update.patch
Patch30: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/030-srv-records-and-axfrget.patch
Patch50: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/050-tinydns-mmap-leak.patch
Patch60: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/060-dnscache-big-udp-packets.patch
Patch70: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/070-dnscache-dpos-tcp-servfail.patch
Patch90: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/090-tinydns-one-second.patch
Patch80: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/080-dnscache-cache-negatives.patch
Patch120: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/120-compiler-temporary-filename.patch
Patch200: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/200-dnscache-cname-handling.patch
Patch210: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/210-dnscache-strict-forwardonly.patch
Patch230: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/230-tinydns-data-semantic-error.patch
Patch240: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/240-tinydns-alias-chain-truncation.patch
Patch270: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/270-dnscache-sigpipe-fix.patch
Patch300: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/300-bugfix-dnscache-dempsky-poison.patch
Patch310: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/310-bugfix-dnscache-merge-outgoing-requests.patch
Patch320: https://dev.openwrt.org/export/HEAD/packages/net/djbdns/patches/320-bugfix-dnscache-cache-soa-records.patch
Patch330: https://dev.openwrt.org/raw-attachment/ticket/5881/330-fix-dnscache-cname-handling.patch
#after openwrt applied patches
Patch450: 450-dnscache-ghost-domain-CVE-2012-1191.patch
Patch500: 500-cutom-dnscache-maxloop.patch
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
Provides: djbdns
AutoReqProv: no
%description
djbdns is a collection of Domain Name System tools. It includes several
components:
- The dnscache program is a local DNS cache. It accepts recursive
DNS queries from local clients such as web browsers. It collects
responses from remote DNS servers.
- The tinydns program is a fast, UDP-only DNS server. It makes
local DNS information available to the Internet. It supports load
balancing and client differentiation.
- The walldns program is a reverse DNS wall. It provides matching
reverse and forward records while hiding local host information.
- The rbldns program is an IP-address-listing DNS server. It uses
DNS to publish a list of IP addresses, such as RBL or DUL.
- The dns library handles outgoing and incoming DNS packets. It can
be used by clients such as web browsers to look up host addresses,
host names, MX records, etc. It supports asynchronous resolution.
- The dnsfilter program is a parallel IP-address-to-host-name
converter.
- The dnsip, dnsipq, dnsname, dnstxt, and dnsmx programs are simple
command-line interfaces to DNS.
- The dnsq and dnstrace programs are DNS debugging tools.
djbdns was written by Daniel J Bernstein, and was placed into the public
domain on Dec 28, 2007.
%changelog
* Fri Jul 14 2023 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Mon Apr 12 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.05-11.sme
- import modification from SME9 [SME: 11548]
- improve short ttl cname resolution and glueless answer from akadns [SME: 8362]
- 500-cutom-dnscache-maxloop.patch: set QUERY_MAXLEVEL 5 QUERY_MAXLOOP 500 QUERY_MAXNS 16 [SME: 10300]
* Wed Jul 12 2017 Jean-Philippe Pialasse <tests@pialasse.com> 1.05-10.sme
- improve short ttl cname resolution and glueless answer from akadns [SME: 8362]
- 500-cutom-dnscache-maxloop.patch: increase QUERY_MAXLEVEL 5->10 , set QUERY_MAXLOOP 160
* Tue Jul 11 2017 Jean-Philippe Pialasse <tests@pialasse.com> 1.05-9.sme
--import patches from openwrt and rename already applied patches
--fix security issues [SME: 10374]
- 020-dnsroots-update.patch: update list of root DNS servers
- 070-dnscache-dpos-tcp-servfail.patch: SERVFAIL rename previous patch dns_transmit-bug.patch
- 080-dnscache-cache-negatives.patch: rfc2308 ?
- 210-dnscache-strict-forwardonly.patch: rename previous patch dnscache-strict-forwardonly.patch
- 240-tinydns-alias-chain-truncation.patch: rename previous patch tinydns-alias-chain-truncation.patch
- 270-dnscache-sigpipe-fix.patch: SIGPIPE
- 300-bugfix-dnscache-dempsky-poison.patch: CVE-2009-0858
- 310-bugfix-dnscache-merge-outgoing-requests.patch: CVE-2008-4392
- 320-bugfix-dnscache-cache-soa-records.patch: CVE-2008-4392
- 450-dnscache-ghost-domain-CVE-2012-1191.patch: CVE-2012-1191 http://marc.info/?l=djbdns&m=134190748729079&w=2
--bug fixes [SME: 10374]
- 060-dnscache-big-udp-packets.patch: accept and handle longer than 512 bytes UDP packets
- 230-tinydns-data-semantic-error.patch: handle semantic error to avoid publishing false dns records
--fix issue with short ttl cname like akamaid [SME: 8362]
- 200-dnscache-cname-handling.patch: rename previous patch dnscache-cname-handling.patch
- 330-fix-dnscache-cname-handling.patch: fix dnscache cname for short ttl
- 500-cutom-dnscache-maxloop.patch: set max loop to 200
--needed for previous patches to apply cleanly
- 030-srv-records-and-axfrget.patch: add SRV record type and axfr-get decompose SRC and PTR records (for 230-*.patch)
- 050-tinydns-mmap-leak.patch: report cdb leak
- 080-dnscache-cache-negatives.patch: rfc2308 ?
- 090-tinydns-one-second.patch: improve tinydns with 8 or more concurent connections (for 240-*.patch)
- 120-compiler-temporary-filename.patch: change tmp filename to avoid conflicts (for 230-*.patch)
* Mon Mar 24 2008 Shad L. Lords <slords@mail.com> 1.05-8
- Comment out contentious patches for now [SME: 3826] [SME: 3824]
* Mon Jan 28 2008 Charlie Brady <charlie_brady@mitel.com> 1.05-7
- Patch tinydns to publish complete client-side alias chains. [SME: 3826]
* Mon Jan 28 2008 Charlie Brady <charlie_brady@mitel.com> 1.05-6
- Patch to fix problems with delegation loops. [SME: 3825]
* Mon Jan 28 2008 Charlie Brady <charlie_brady@mitel.com> 1.05-5
- Patch to fix various problems in dnscache CNAME record handling. [SME: 3824]
* Thu Jan 10 2008 Charlie Brady <charlieb@e-smith.com> 1.05-4
- Patch around TCP bug: http://alkemio.org/dns_transmit-bug.html
- Change license to "Public Domain' - http://cr.yp.to/distributors.html
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
- Clean up spec so package can be built by koji/plague
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
- Update to new release naming. No functional changes.
- Make Packager generic
* Thu Nov 11 2004 Charlie Brady <charlieb@e-smith.com> 1.05-02
- Use "conf-cc" value which works around errno problem.
* Tue Feb 20 2001 Peter Samuel <peters@e-smith.com>
- [1.05-01]
- Updated for djbdns-1.05.
* Tue Feb 6 2001 Peter Samuel <peters@e-smith.com>
- [1.04-01]
- Now installs in its own root area prior to creating binary RPM.
%prep
%setup
# This patch allows files to be installed in a relative directory prior
# to creating the binary RPM. It does not change the installed files or
# their final installed locations.
%patch0 -p1
# Create the relative installation directories.
mkdir -p ./root/usr
mkdir -p ./root/etc
%patch20 -p1
%patch30 -p1
%patch50 -p1
%patch60 -p1
%patch70 -p1
%patch80 -p1
%patch90 -p1
%patch120 -p1
%patch200 -p1
%patch210 -p1
%patch230 -p1
%patch240 -p1
%patch270 -p1
%patch300 -p1
%patch310 -p1
%patch320 -p1
%patch330 -p1
%patch450 -p1
%patch500 -p1
%build
echo "gcc -O2 -Wall --include /usr/include/errno.h" > conf-cc
echo "gcc -s -Os -pipe" > conf-ld
make
%install
make setup
make check
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
%clean
rm -rf $RPM_BUILD_ROOT
%files
%attr(644,root,root) /etc/dnsroots.global
%attr(755,root,root) /usr/local/bin/axfrdns
%attr(755,root,root) /usr/local/bin/axfrdns-conf
%attr(755,root,root) /usr/local/bin/axfr-get
%attr(755,root,root) /usr/local/bin/dnscache
%attr(755,root,root) /usr/local/bin/dnscache-conf
%attr(755,root,root) /usr/local/bin/dnsfilter
%attr(755,root,root) /usr/local/bin/dnsip
%attr(755,root,root) /usr/local/bin/dnsipq
%attr(755,root,root) /usr/local/bin/dnsmx
%attr(755,root,root) /usr/local/bin/dnsname
%attr(755,root,root) /usr/local/bin/dnsq
%attr(755,root,root) /usr/local/bin/dnsqr
%attr(755,root,root) /usr/local/bin/dnstrace
%attr(755,root,root) /usr/local/bin/dnstracesort
%attr(755,root,root) /usr/local/bin/dnstxt
%attr(755,root,root) /usr/local/bin/pickdns
%attr(755,root,root) /usr/local/bin/pickdns-conf
%attr(755,root,root) /usr/local/bin/pickdns-data
%attr(755,root,root) /usr/local/bin/random-ip
%attr(755,root,root) /usr/local/bin/rbldns
%attr(755,root,root) /usr/local/bin/rbldns-conf
%attr(755,root,root) /usr/local/bin/rbldns-data
%attr(755,root,root) /usr/local/bin/tinydns
%attr(755,root,root) /usr/local/bin/tinydns-conf
%attr(755,root,root) /usr/local/bin/tinydns-data
%attr(755,root,root) /usr/local/bin/tinydns-edit
%attr(755,root,root) /usr/local/bin/tinydns-get
%attr(755,root,root) /usr/local/bin/walldns
%attr(755,root,root) /usr/local/bin/walldns-conf