File pdns.spec of Package pdns
#
# spec file for package pdns (Version 2.9.21.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: pdns
Version: 2.9.21.2
Release: 1
#
Group: Productivity/Networking/DNS/Servers
License: GPL v2 or later
#
%define pkg_name pdns
%define home %{_var}/lib/pdns
%define _localstatedir %{_var}/run/pdns
%define with_recursor 0
#
%define with_opendbx 0
%define with_xdb 0
%define with_sqlite2 1
%if 0%{?sles_version} != 9
%define with_sqlite3 1
%endif
#
BuildRequires: boost-devel docbook-toys docbook-utils docbook-xsl-stylesheets gcc-c++ gdbm-devel mysql-devel openldap2-devel postgresql-devel pwdutils
# we add opendbx-backend-sqlite2 as we pull in sqlite2 anyway and we need one installed backend
%if 0%{?with_sqlite3}
BuildRequires: sqlite-devel >= 3
%endif
#
%if 0%{?with_sqlite2}
%if 0%{?sles_version} == 9
BuildRequires: sqlite-devel
%else
BuildRequires: sqlite2-devel
%endif
%endif
#
%if 0%{?with_opendbx}
BuildRequires: opendbx-backend-sqlite2 opendbx-devel
%endif
%if 0%{?with_xdb}
BuildRequires: tdb-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq %fillup_prereq pwdutils
#
Url: http://www.powerdns.com/
Source: %{name}-%{version}.tar.bz2
Source1: rcpdns
Source2: README.opendbx
Patch1: pdns-2.9.21.1_unversioned_modules.patch
Patch2: pdns-2.9.21.1_gcc43.patch
Patch3: pdns-2.9.21.1-wrong-pgsql.patch
Patch4: pdns-2.9.21.1_new_boost_exceptions.patch
Patch5: pdns-2.9.21.2_fix_default_config.patch
#
Summary: Modern, advanced and high performance authoritative-only nameserver
%description
The PowerDNS Nameserver is a modern, advanced and high performance
authoritative-only nameserver. It is written from scratch and conforms
to all relevant DNS standards documents. Furthermore, PowerDNS
interfaces with almost any database.
Authors:
--------
http://www.powerdns.com
%package backend-mysql
License: GPL v2 or later
Group: Productivity/Networking/DNS/Servers
Requires: %{name} = %{version}
Summary: MySQL backend for pdns
%description backend-mysql
The PowerDNS Nameserver is a modern, advanced and high performance
authoritative-only nameserver. It is written from scratch and conforms
to all relevant DNS standards documents. Furthermore, PowerDNS
interfaces with almost any database.
This package holds the MySQL backend for pdns.
Authors:
--------
http://www.powerdns.com
%package backend-postgresql
License: GPL v2 or later
Group: Productivity/Networking/DNS/Servers
Requires: %{name} = %{version}
Summary: PostgreSQL backend for pdns
%description backend-postgresql
The PowerDNS Nameserver is a modern, advanced and high performance
authoritative-only nameserver. It is written from scratch and conforms
to all relevant DNS standards documents. Furthermore, PowerDNS
interfaces with almost any database.
This package holds the PostgreSQL backend for pdns.
Authors:
--------
http://www.powerdns.com
%if 0%{?with_sqlite2}
%package backend-sqlite2
License: GPL v2 or later
Group: Productivity/Networking/DNS/Servers
Requires: %{name} = %{version}
Summary: SQLite 2 backend for pdns
%description backend-sqlite2
The PowerDNS Nameserver is a modern, advanced and high performance
authoritative-only nameserver. It is written from scratch and conforms
to all relevant DNS standards documents. Furthermore, PowerDNS
interfaces with almost any database.
This package holds the SQLite 2 backend for pdns.
Authors:
--------
http://www.powerdns.com
%endif
%if 0%{?with_sqlite3}
%package backend-sqlite3
License: GPL v2 or later
Group: Productivity/Networking/DNS/Servers
Requires: %{name} = %{version}
Summary: SQLite 3 backend for pdns
%description backend-sqlite3
The PowerDNS Nameserver is a modern, advanced and high performance
authoritative-only nameserver. It is written from scratch and conforms
to all relevant DNS standards documents. Furthermore, PowerDNS
interfaces with almost any database.
This package holds the SQLite 3 backend for pdns.
Authors:
--------
http://www.powerdns.com
%endif
%package backend-ldap
License: GPL v2 or later
Group: Productivity/Networking/DNS/Servers
Requires: %{name} = %{version}
Summary: LDAP backend for pdns
%description backend-ldap
The PowerDNS Nameserver is a modern, advanced and high performance
authoritative-only nameserver. It is written from scratch and conforms
to all relevant DNS standards documents. Furthermore, PowerDNS
interfaces with almost any database.
This package holds the LDAP backend for pdns.
Authors:
--------
http://www.powerdns.com
%if 0%{?with_opendbx}
%package backend-opendbx
License: GPL v2 or later
Group: Productivity/Networking/DNS/Servers
Requires: %{name} = %{version}
Summary: OpenDBX backend for pdns
%description backend-opendbx
The PowerDNS Nameserver is a modern, advanced and high performance
authoritative-only nameserver. It is written from scratch and conforms
to all relevant DNS standards documents. Furthermore, PowerDNS
interfaces with almost any database.
This package holds the OpenDBX backend for pdns.
Authors:
--------
http://www.powerdns.com
%endif
%if 0%{?with_xdb}
%package backend-xdb
License: GPL v2 or later
Group: Productivity/Networking/DNS/Servers
Requires: %{name} = %{version}
Summary: Samba TDB backend for pdns
%description backend-xdb
The PowerDNS Nameserver is a modern, advanced and high performance
authoritative-only nameserver. It is written from scratch and conforms
to all relevant DNS standards documents. Furthermore, PowerDNS
interfaces with almost any database.
This package holds the Samba TDB backend for pdns.
Authors:
--------
http://www.powerdns.com
%endif
%if %with_recursor
%package -n pdns-recursor
License: GPL v2 or later
Group: Productivity/Networking/DNS/Servers
Requires: %{name} = %{version}
Summary: Modern, advanced and high performance recursing/non authoritative nameserver
%description -n pdns-recursor
PowerDNS Recursor is a non authoritative/recursing DNS server. Use this
package if you need a dns cache for your network.
Authors:
--------
http://www.powerdns.com
%endif
%prep
%setup
%patch1
%patch2
%patch3
%patch4
%patch5
%if 0%{?with_opendbx}
%{__cp} %{S:2} README.opendbx
%endif
%{__cp} modules/geobackend/README README.geobackend
# module-dir=/usr/local/lib
perl -p -i.back -e 's|module-dir=.*|module-dir=%{_libdir}/%{pkg_name}|g' pdns/pdns.conf-dist
diff -urN pdns/pdns.conf-dist{.back,} ||:
rm -v pdns/pdns.conf-dist.back
%build
touch NEWS AUTHORS COPYING
autoreconf -fiv
export CFLAGS="%{optflags} -DLDAP_DEPRECATED -g "
export CXXFLAGS="$CFLAGS"
# "mysql" backend is legacy crap. dont build it!
%configure \
--disable-static \
--with-pic \
--sysconfdir=%{_sysconfdir}/%{pkg_name} \
--libdir=%{_libdir}/%{pkg_name} \
--with-sqlite-lib=%{_libdir} \
--with-sqlite3-lib=%{_libdir} \
--with-pgsql-lib=%{_libdir} \
--with-mysql-lib=%{_libdir} \
--with-modules="" \
--with-dynmodules="\
pdns \
pipe \
geo \
gmysql \
gpgsql \
ldap \
%if 0%{?with_sqlite3}
gsqlite3 \
%endif
%if 0%{?with_sqlite2}
gsqlite \
%endif
%if 0%{?with_opendbx}
opendbx \
%endif
%if 0%{?with_xdb}
xdb \
%endif
%if 0%{?with_db2}
db2 \
%endif
%if 0%{?with_odbc}
odbc \
%endif
%if 0%{?with_oracle}
goracle \
oracle \
%endif
"\
%if %with_recursor
--enable-recursor
%else
--disable-recursor # we have an external package for that.
%endif
%{__make}
pushd pdns/docs
db2html -o html pdns.sgml
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
%{__ln_s} book1.html html/index.html
popd
%install
%makeinstall
%{__install} -Dd -m 0755 %{buildroot}{%{home},%{_localstatedir}}
%{__mv} %{buildroot}%{_sysconfdir}/%{pkg_name}/pdns.conf{-dist,}
%{__install} -D -m 0755 %{S:1} %{buildroot}/etc/init.d/%{pkg_name}
%{__ln_s} -f ../../etc/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name}
%{__rm} -rfv %{buildroot}%{_libdir}/pdns/*.la
%clean
%{__rm} -rf %{buildroot}
%pre
/usr/sbin/groupadd -r pdns &>/dev/null || :
/usr/sbin/useradd -o -g pdns -s /bin/false -r -c "pdns" -d %{home} pdns &>/dev/null || :
%post
%{fillup_and_insserv pdns}
%preun
%stop_on_removal pdns
%postun
%restart_on_update pdns
%insserv_cleanup
%files
%defattr (-,root,root,-)
%doc ChangeLog HACKING INSTALL README* TODO
%doc pdns/docs/html
%config(noreplace) /etc/init.d/%{pkg_name}
%dir %attr(750,root,pdns) %{_sysconfdir}/%{pkg_name}
%config(noreplace) %attr(640,root,pdns) %{_sysconfdir}/%{pkg_name}/%{pkg_name}.conf
%{_bindir}/pdns_control
%{_bindir}/zone2ldap
%{_bindir}/zone2sql
%{_sbindir}/rcpdns
%{_sbindir}/pdns_server
%{_mandir}/man8/pdns_control.8.gz
%{_mandir}/man8/pdns_server.8.gz
%{_mandir}/man8/zone2sql.8.gz
%dir %{_libdir}/%{pkg_name}
%{_libdir}/%{pkg_name}/libpdnsbackend.so*
%{_libdir}/%{pkg_name}/libpipebackend.so*
%{_libdir}/%{pkg_name}/libgeobackend.so*
%dir %{home}
%dir %{_localstatedir}
%if %with_recursor
%files -n pdns-recursor
%defattr (-,root,root,-)
%{_sbindir}/pdns_recursor
%endif
%files backend-mysql
%defattr (-,root,root,-)
%{_libdir}/%{pkg_name}/libgmysqlbackend.so*
%files backend-postgresql
%defattr (-,root,root,-)
%{_libdir}/%{pkg_name}/libgpgsqlbackend.so*
%if 0%{?with_sqlite2}
%files backend-sqlite2
%defattr (-,root,root,-)
%{_libdir}/%{pkg_name}/libgsqlitebackend.so*
%endif
%if 0%{?with_sqlite3}
%files backend-sqlite3
%defattr (-,root,root,-)
%{_libdir}/%{pkg_name}/libgsqlite3backend.so*
%endif
%files backend-ldap
%defattr (-,root,root,-)
%{_libdir}/%{pkg_name}/libldapbackend.so*
%if 0%{?with_opendbx}
%files backend-opendbx
%defattr (-,root,root,-)
%{_libdir}/%{pkg_name}/libopendbxbackend.so*
%endif
%if 0%{?with_xdb}
%files backend-xdb
%defattr (-,root,root,-)
%{_bindir}/xdb-fill
%{_libdir}/%{pkg_name}/libxdbbackend.so*
%endif
%changelog
* Tue Nov 18 2008 mrueckert@suse.de
- update to version 2.9.21.2: (bnc#445568)
do not crash with HINFO CHAOS requests when configured with
'distributor-threads=1'
- make default config more sane
- remove guardian commandline parameter. it was hiding the startup
errors. If you want to use the guardian reenable it in the
configuration file.
- mark init script as config
* Thu Nov 06 2008 mrueckert@suse.de
- added pdns-2.9.21.1_new_boost_exceptions.patch:
clearify the referenced exception class
* Fri Oct 17 2008 ro@suse.de
- last change does not work yet, disable forcefully
* Thu Aug 21 2008 mrueckert@suse.de
- replaced conditional on #{opensuse_bs} with:
[#]if #(echo "%%distribution" | grep -Ec '^server:dns')
* Mon Aug 11 2008 anosek@suse.cz
- updated to version 2.9.21.1
- fixes security issue CVE-2008-3337 (bnc#415369)
* Wed Apr 23 2008 crrodriguez@suse.de
- fix build, wrong pq library detection.
* Sun Oct 28 2007 mrueckert@suse.de
- added pdns-2.9.21_gcc43.patch:
fix nearly all warnings (patch is upstream)
- removed pdns-2.9.20-warnings.patch:
better version included in pdns-2.9.21_gcc43.patch
- added README.opendbx:
include documentation for the opendbx backend (buildservice only)
* Tue Sep 25 2007 mrueckert@suse.de
- added pdns-2.9.21_unversioned_modules.patch:
the plugins dont need versioning
* Tue Sep 25 2007 mrueckert@suse.de
- reorder %%package list to work around a bug in prepare_spec
which breaks debuginfo packages
* Wed Apr 25 2007 mrueckert@suse.de
- disable the patch again. i think it breaks for me on 64bit.
* Tue Apr 24 2007 mrueckert@suse.de
- readd pdns-2.9.20-warnings.patch [#232489]
* Tue Apr 24 2007 mrueckert@suse.de
- more tight permissions for the config dir as the config file can
contain passwords
* Sat Apr 21 2007 mrueckert@suse.de
- fix build on 64bit hosts
- sync with pdns-snapshot (pkg_name)
* Sat Apr 21 2007 mrueckert@suse.de
- update to 2.9.21:
- Bugs:
- Multi-part TXT records weren't supported. This has been
fixed, and regression tests have been added. Code in commits
1016, 996, 994.
- Email addresses with embedded dots in SOA records were not
parsed correctly, nor were other embedded dots. Noted by
'Bastiaan', fixed in commit 1026.
- BIND backend treated the 'm' TTL modifier as 'months' and not
'minutes'. Closes Debian bug 406462. Addressed in commit
1026.
- Our snapshots were built against a static version of
PosgreSQL that was incompatible with many Linux
distributions, leading to instant crashes on startup. Fixed
in 1022 and 1023.
- CNAME referrals to child zones gave improper responses. Noted
by Augie Schwer in ticket 123, fixed in commit 992.
- When passing a port number with the recursor setting, this
would sometimes generate errors during additional processing.
Switched off overly helpful additional processing for
recursive queries to remove this problem. Implemented in
commit 1031, spotted by Ralf van der Enden.
- NS to a nameserver with the name of the zone itself generated
problems. Spotted by Augie Schwer, fixed in commit 947.
- Multi-line records in the BIND backend were not always parsed
correctly. Fixed in commit 1014.
- The LOC-record had problems operating outside of the eastern
hemisphere of the northern part of the world! Fixed in commit
1011.
- Backends were compiled without multithreading preprocessor
flags. As far as we can determine, this would only cause
problems for the BIND backend, but we cannot rule out this
caused instability in other backends. Fixed in commit 1001.
- The BIND backend was highly unstable under reloads, and
leaked memory and file descriptors. Thanks to Mark Bergsma
and Massimo Bandinelli for respectively pointing this out to
us and testing large amounts of patches to fix the problem.
The fixes have resulted in better performance, less code, and
a remarkable simplification of this backend. Commits 1039,
1034, 1035, 1006, 999, 905 and previous.
- BIND backend gave convincing NXDOMAINS on unloaded zones in
some cases. Spotted and fixed by Daniel Bilik in commit 984.
- SOA records in zone transfers sometimes contained the wrong
SOA TTL. Spotted by Christian Kuehn, fixed in commit 902.
- PowerDNS could get confused by very high SOA serial numbers.
Spotted and fixed by Dan Billik, fixed in commit 626.
- Some versions of FreeBSD perform very strict checks on socket
address sizes passed to 'connect', which could lead to
problems retrieving zones over AXFR. Fixed in commit 891.
- Some versions of FreeBSD perform very strict checks on IPv6
socket addresses, leading to problems. Discovered by Sten
Spans, fixed in commit 885 and commit 886.
- IXFR requests were not logged properly. Noted by Ralf van der
Enden, fixed in commit 990.
- Some NAPTR records needed an additional space character to
encode correctly. Spotted by Heinrich Ruthensteiner, fixed in
commit 1029.
- Many bugs in the TCP nameserver, leading to a PowerDNS
process that did not respond to TCP queries over time. Many
fixes provided by Dan Bilik, other problems were fixed by
rewriting our TCP handling code. Commits 982 and 980, 950,
924, 889, 874, 869, 685, 684.
- Fix crashes on the ARM processor due to alignment errors.
Thanks to Sjoerd Simons. Closes Debian bug 397031.
- Missing data in generic SQL backends would sometimes lead to
faked SOA serial data. Spotted by Leander Lakkas from True.
Fix in commit 866.
- When receiving two quick notifications in succession, the
packet cache would sometimes "process" the second one,
leading PowerDNS to ignore it. Spotted by Dan Bilik, fixed in
commit 686.
- Geobackend (by Mark Bergsma) did not properly override the
getSOA method, breaking non-overlay operation of this fine
backend. The geobackend now also skips '.hidden'
configuration files, and now properly disregards empty
configuration files. Additionally, the overlapping abilities
were improved. Details available in commit 876, by Mark.
- Features:
- Thanks to EasyDNS, PowerDNS now supports multiple masters per
domain. For configuration details, see Section 13.2.
Implemented in commit 1018, commit 1017.
- Thanks to EasyDNS, PowerDNS now supports the KEY record type,
as well the SPF record. In commit 976.
- Added support for CERT, SSHFP, DNSKEY, DS, NSEC, RRSIG record
types, as part of the move to the new DNS parsing/generating
code.
- Support for the AFSDB record type, as requested by 'Bastian'.
Implemented in commit 978, closing ticket 129.
- Support for the MR record type. Implemented in commit 941 and
commit 1019.
- Gsqlite3 backend was added by Antony Lesuisse in commit 942;
- Added the ability to send out light-weight root-referrals
that save bandwidth yet still placate mediocre resolver
implementations. Implemented in commit 912, enable with
'root-referral=lean'.
- Improvements:
- Miscellaneous OpenDBX and LDAP backend improvements by
Norbert Sendetzky. Applied in commit 977 and commit 1040.
- SGML source of the documentation was cleaned up by Ruben
Kerkhof in commit 936.
- Speedups in core DNS label processing code. Implemented in
commit 928, commit 654, commit 1020.
- When communicating with master servers and encountering
errors, more useful details are logged. Reported by Stefan
Arentz in ticket 137, closed by commit 1015.
- Database errors are now logged with more details. Addressed
in commit 1004.
- pdns_control problems are now logged more verbosely. Change
in commit 910.
- Erroneous address configuration was logged unclearly. Spotted
by River Tarnell, fixed in commit 888.
- Example configuration shipped with PowerDNS was very old.
Noted by Leen Besselink, fixed in commit 946.
- PowerDNS neglected to chdir to the root when chrooted. This
closes ticket 110, fixed in commit 944.
- Microsoft resolver had problems with responses we generated
for CNAMEs pointing out of our bailiwick. Fixed in commit 983
and expedited by Locaweb.com.br.
- Built-in webserver logs errors more verbosely. Closes ticket
82, gixed in commit 991.
- Queries containing '@' no longer flood the logs. Addressed in
commit 1014.
- The build process now looks for PostgreSQL in more places.
Implemented in commit 998, closes ticket 90.
- Speedups in the BIND backend now mean large installations
enjoy startup times up to 30 times faster than with the
original BIND nameserver. Many thanks to Massimo Bandinelli.
- BIND backend now offers full support for query logging,
implemented in commit 1026, commit 1029.
- BIND backend named.conf parsing is now fully case-insensitive
for domain names. This closes Debian bug 406461, fixed in
commit 1027.
- IPv6 and IPv4 address parsing routines have been replaced,
which should result in prettier output in some cases. commit
962, commit 1012 and others.
- 5 new regression tests have been added to insure old bugs do
not return.
- Fix small issues with very modern compilers and BOOST
snapshots. Noted by Marcus Rueckert, addressed in commit 954,
commit 964 commit 965, commit 1003.
- removed patches as they are included upstream:
opendbxbackend_2.9.20-5.diff
pdns-2.9.17_cve-2006-4251.patch
pdns-2.9.19-CVE-2006-2069.patch
pdns-2.9.20_2006-02.patch
- added sqlite3 backend
- the spec file should now build on sles9 aswell.
* Thu Mar 29 2007 mrueckert@suse.de
- update opendbxbackend_2.9.20-3.diff to
opendbxbackend_2.9.20-5.diff
- added pwdutil and gdbm-devel
* Tue Jan 09 2007 anosek@suse.cz
- fixed compiler warning: integer operation result is out of range
[#232489] (warnings.patch)
* Mon Nov 13 2006 mrueckert@suse.de
- added pdns-2.9.20_2006-02.patch:
fix an endless recursion in CNAME handling [#219355]
* Sat Nov 11 2006 mrueckert@suse.de
- added pdns-2.9.17_cve-2006-4251.patch:
fix a stack corruption with malformed packages [#219355]
* Thu Oct 19 2006 mrueckert@suse.de
- this is a sync to the buildservice package in server:dns:
- remove .la files
* Fri Oct 13 2006 mrueckert@suse.de
- added opendbxbackend_2.9.20-3.diff:
updates the opendbx backend to the latest version
* Fri May 19 2006 mrueckert@suse.de
- disable the recursor as we use the newer external package.
* Thu May 04 2006 nadvornik@suse.cz
- fixed crash on malformed packets CVE-2006-2069 [#170542]
* Sun Mar 26 2006 mrueckert@suse.de
- fixed Requires for the subpackages
* Sat Mar 25 2006 mrueckert@suse.de
- update to 2.9.20:
Besides adding OpenDBX, this release is mostly about fixing
problems and speeding up the recursor.
- disabled static support
- removed rm for the .a files
- splitted of the backends that pull in new dependencies
- removed patch. applied upstream.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Nov 01 2005 nadvornik@suse.cz
- updated to 2.9.19
* Tue Jun 07 2005 nadvornik@suse.cz
- fixed init scripts
- used patches from http://www.linuxnetworks.de/pdnsldap/index.html
* Wed Apr 20 2005 nadvornik@suse.cz
- fixed to compile on x86_64 with gcc4
* Fri Mar 11 2005 nadvornik@suse.cz
- installed html documentation [#71738]
* Wed Feb 16 2005 nadvornik@suse.cz
- new package