c1598f5
%global _hardened_build 1
df9568a
%global backends %{nil}
df9568a
968639f
Name: pdns
b1e4ba7
Version: 3.3
51c71b4
Release: 5%{?dist}
5a1e495
Summary: A modern, advanced and high performance authoritative-only nameserver
968639f
Group: System Environment/Daemons
5a1e495
License: GPLv2
968639f
URL: http://powerdns.com
19f1e8a
Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
968639f
Source1: pdns.service
3936a37
Patch0: pdns-default-config.patch
51c71b4
Patch1: pdns-fix-backend-remote.patch
968639f
968639f
Requires(pre): shadow-utils
3936a37
Requires(post): systemd-sysv
3936a37
Requires(post): systemd-units
968639f
Requires(preun): systemd-units
968639f
Requires(postun): systemd-units
968639f
3936a37
BuildRequires: systemd-units
3936a37
BuildRequires: boost-devel
3936a37
BuildRequires: lua-devel
3936a37
BuildRequires: cryptopp-devel
0afb7c2
BuildRequires: autoconf
0afb7c2
BuildRequires: automake
0afb7c2
BuildRequires: libtool
b1e4ba7
BuildRequires: bison
968639f
Provides: powerdns = %{version}-%{release}
473c30f
473c30f
%description
473c30f
The PowerDNS Nameserver is a modern, advanced and high performance
473c30f
authoritative-only nameserver. It is written from scratch and conforms
473c30f
to all relevant DNS standards documents.
473c30f
Furthermore, PowerDNS interfaces with almost any database.
473c30f
502ca65
%package tools
502ca65
Summary: Extra tools for %{name}
502ca65
Group: System Environment/Daemons
473c30f
502ca65
%description tools
502ca65
This package contains the extra tools for %{name}
473c30f
502ca65
%package backend-mysql
502ca65
Summary: MySQL backend for %{name}
502ca65
Group: System Environment/Daemons
502ca65
Requires: %{name}%{?_isa} = %{version}-%{release}
502ca65
BuildRequires: mysql-devel
502ca65
%global backends %{backends} gmysql
e54484b
502ca65
%description backend-mysql
473c30f
This package contains the gmysql backend for %{name}
473c30f
502ca65
%package backend-postgresql
502ca65
Summary: PostgreSQL backend for %{name}
502ca65
Group: System Environment/Daemons
502ca65
Requires: %{name}%{?_isa} = %{version}-%{release}
502ca65
BuildRequires: postgresql-devel
502ca65
%global backends %{backends} gpgsql
502ca65
502ca65
%description backend-postgresql
473c30f
This package contains the gpgsql backend for %{name}
473c30f
502ca65
%package backend-pipe
502ca65
Summary: Pipe backend for %{name}
502ca65
Group: System Environment/Daemons
502ca65
Requires: %{name}%{?_isa} = %{version}-%{release}
502ca65
%global backends %{backends} pipe
502ca65
502ca65
%description backend-pipe
473c30f
This package contains the pipe backend for %{name}
473c30f
cb040db
%package backend-remote
cb040db
Summary: Remote backend for %{name}
cb040db
Group: System Environment/Daemons
cb040db
Requires: %{name}%{?_isa} = %{version}-%{release}
cb040db
%global backends %{backends} remote
cb040db
cb040db
%description backend-remote
cb040db
This package contains the remote backend for %{name}
cb040db
502ca65
%package backend-geo
502ca65
Summary: Geo backend for %{name}
502ca65
Group: System Environment/Daemons
502ca65
Requires: %{name}%{?_isa} = %{version}-%{release}
502ca65
%global backends %{backends} geo
502ca65
502ca65
%description backend-geo
473c30f
This package contains the geo backend for %{name}
473c30f
It allows different answers to DNS queries coming from different
473c30f
IP address ranges or based on the geographic location
473c30f
502ca65
%package backend-ldap
502ca65
Summary: LDAP backend for %{name}
502ca65
Group: System Environment/Daemons
502ca65
Requires: %{name}%{?_isa} = %{version}-%{release}
502ca65
BuildRequires: openldap-devel
502ca65
%global backends %{backends} ldap
502ca65
502ca65
%description backend-ldap
473c30f
This package contains the ldap backend for %{name}
473c30f
502ca65
%package backend-sqlite
502ca65
Summary: SQLite backend for %{name}
502ca65
Group: System Environment/Daemons
502ca65
Requires: %{name}%{?_isa} = %{version}-%{release}
502ca65
BuildRequires: sqlite-devel
502ca65
%global backends %{backends} gsqlite3
502ca65
502ca65
%description backend-sqlite
e54484b
This package contains the SQLite backend for %{name}
e54484b
473c30f
%prep
19f1e8a
%setup -q
3936a37
%patch0 -p1 -b .default-config-patch
51c71b4
%patch1 -p1 -b .fix-backend-remote
473c30f
473c30f
%build
0afb7c2
autoreconf -v -f -i
c1598f5
export CPPFLAGS="-DLDAP_DEPRECATED"
473c30f
473c30f
%configure \
473c30f
	--sysconfdir=%{_sysconfdir}/%{name} \
473c30f
	--libdir=%{_libdir}/%{name} \
473c30f
	--disable-static \
473c30f
	--with-modules='' \
1e981e8
	--with-lua \
df9568a
	--with-dynmodules='%{backends}' \
502ca65
	--enable-cryptopp \
502ca65
	--enable-tools
1e981e8
1e981e8
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
1e981e8
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
473c30f
473c30f
make %{?_smp_mflags}
473c30f
473c30f
%install
473c30f
make install DESTDIR=%{buildroot}
473c30f
473c30f
%{__rm} -f %{buildroot}%{_libdir}/%{name}/*.la
473c30f
%{__mv} %{buildroot}%{_sysconfdir}/%{name}/pdns.conf{-dist,}
473c30f
3936a37
chmod 600 %{buildroot}%{_sysconfdir}/%{name}/pdns.conf
68ad749
1e981e8
# Copy systemd service file
1e981e8
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/pdns.service
1e981e8
1e981e8
%pre
1e981e8
getent group pdns >/dev/null || groupadd -r pdns
1e981e8
getent passwd pdns >/dev/null || \
1e981e8
	useradd -r -g pdns -d / -s /sbin/nologin \
1e981e8
	-c "PowerDNS user" pdns
1e981e8
exit 0
1e981e8
473c30f
%post
a05e0ba
%systemd_post pdns.service
1e981e8
473c30f
%preun
a05e0ba
%systemd_preun pdns.service
1e981e8
1e981e8
%postun
a05e0ba
%systemd_postun_with_restart pdns.service
1e981e8
1e981e8
%triggerun -- pdns < 3.0-rc3
1e981e8
# Save the current service runlevel info
1e981e8
# User must manually run systemd-sysv-convert --apply pdns
1e981e8
# to migrate them to systemd targets
1e981e8
%{_bindir}/systemd-sysv-convert --save pdns &>/dev/null ||:
1e981e8
1e981e8
# Run these because the SysV package being removed won't do them
1e981e8
/sbin/chkconfig --del pdns &>/dev/null || :
1e981e8
/bin/systemctl try-restart pdns.service &>/dev/null || :
1e981e8
473c30f
%files
1e981e8
%doc COPYING README
473c30f
%{_bindir}/pdns_control
6b89186
%{_bindir}/pdnssec
473c30f
%{_bindir}/zone2ldap
473c30f
%{_bindir}/zone2sql
5a1e495
%{_bindir}/zone2json
473c30f
%{_sbindir}/pdns_server
473c30f
%{_mandir}/man8/pdns_control.8.gz
473c30f
%{_mandir}/man8/pdns_server.8.gz
473c30f
%{_mandir}/man8/zone2sql.8.gz
b1e4ba7
%{_mandir}/man8/zone2ldap.8.gz
b1e4ba7
%{_mandir}/man8/pdnssec.8.gz
1e981e8
%{_unitdir}/pdns.service
473c30f
%dir %{_libdir}/%{name}/
473c30f
%dir %{_sysconfdir}/%{name}/
473c30f
%config(noreplace) %{_sysconfdir}/%{name}/pdns.conf
473c30f
502ca65
%files tools
502ca65
%{_bindir}/dnsbulktest
502ca65
%{_bindir}/dnsreplay
502ca65
%{_bindir}/dnsscan
502ca65
%{_bindir}/dnsscope
502ca65
%{_bindir}/dnstcpbench
502ca65
%{_bindir}/dnswasher
502ca65
%{_bindir}/nproxy
502ca65
%{_bindir}/nsec3dig
502ca65
%{_mandir}/man8/dnsreplay.8.gz
502ca65
%{_mandir}/man8/dnsscope.8.gz
502ca65
%{_mandir}/man8/dnswasher.8.gz
502ca65
%{_mandir}/man1/dnstcpbench.1.gz
502ca65
473c30f
%files backend-mysql
d3ad709
%doc pdns/dnssec.schema.mysql.sql
d3ad709
%doc pdns/no-dnssec.schema.mysql.sql
473c30f
%{_libdir}/%{name}/libgmysqlbackend.so
473c30f
473c30f
%files backend-postgresql
d3ad709
%doc pdns/dnssec.schema.pgsql.sql
d3ad709
%doc pdns/no-dnssec.schema.pgsql.sql
502ca65
%{_libdir}/%{name}/libgpgsqlbackend.so
473c30f
473c30f
%files backend-pipe
473c30f
%{_libdir}/%{name}/libpipebackend.so
473c30f
cb040db
%files backend-remote
cb040db
%{_libdir}/%{name}/libremotebackend.so
cb040db
473c30f
%files backend-geo
1e981e8
%doc modules/geobackend/README
473c30f
%{_libdir}/%{name}/libgeobackend.so
473c30f
473c30f
%files backend-ldap
473c30f
%{_libdir}/%{name}/libldapbackend.so
473c30f
e54484b
%files backend-sqlite
d3ad709
%doc pdns/dnssec.schema.sqlite3.sql
d3ad709
%doc pdns/no-dnssec.schema.sqlite3.sql
d3ad709
%doc pdns/bind-dnssec.schema.sqlite3.sql
502ca65
%{_libdir}/%{name}/libgsqlite3backend.so
e54484b
473c30f
%changelog
51c71b4
* Sat Aug 31 2013 Morten Stevens <mstevens@imt-systems.com> - 3.3-5
51c71b4
- Add patch to fix Remote backend
51c71b4
cb040db
* Wed Aug 21 2013 Morten Stevens <mstevens@imt-systems.com> - 3.3-4
cb040db
- Add Remote backend
cb040db
adef4ee
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-3
adef4ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
adef4ee
Petr Machata 74d389a
* Sat Jul 27 2013 pmachata@redhat.com - 3.3-2
Petr Machata 74d389a
- Rebuild for boost 1.54.0
Petr Machata 74d389a
19f1e8a
* Fri Jul 05 2013 Morten Stevens <mstevens@imt-systems.com> - 3.3-1
19f1e8a
- Update to 3.3
19f1e8a
502ca65
* Fri Jun 28 2013 Morten Stevens <mstevens@imt-systems.com> - 3.3-0.3.rc2
502ca65
- Update to 3.3-rc2
502ca65
- Add extra tools package for pdns
502ca65
ac9761b
* Tue Jun 04 2013 Morten Stevens <mstevens@imt-systems.com> - 3.3-0.2.rc1
ac9761b
- Update systemd unit file
ac9761b
- Spec cleanup
ac9761b
b1e4ba7
* Tue May 28 2013 Morten Stevens <mstevens@imt-systems.com> - 3.3-0.1.rc1
ac9761b
- Update to 3.3-rc1
b1e4ba7
146df30
* Mon Apr 22 2013 Morten Stevens <mstevens@imt-systems.com> - 3.2-7
146df30
- Disarm dead code that causes gcc crashes on ARM (rhbz#954191)
146df30
0afb7c2
* Tue Apr 09 2013 Morten Stevens <mstevens@imt-systems.com> - 3.2-6
0afb7c2
- Add support for aarch64 (rhbz#926316)
0afb7c2
c1598f5
* Tue Mar 05 2013 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.2-5
c1598f5
- Enable hardened build as per http://fedoraproject.org/wiki/Packaging:Guidelines#PIE
c1598f5
9e5280f
* Mon Feb 11 2013 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.2-4
9e5280f
- Enable PrivateTmp as per http://fedoraproject.org/wiki/Features/ServicesPrivateTmp
9e5280f
- Fix bogus date in changelog
9e5280f
e6f8b4d
* Sun Feb 10 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 3.2-3
e6f8b4d
- Rebuild for Boost-1.53.0
e6f8b4d
ed7202b
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 3.2-2
ed7202b
- Rebuild for Boost-1.53.0
ed7202b
5a1e495
* Thu Jan 17 2013 Morten Stevens <mstevens@imt-systems.com> - 3.2-1
5a1e495
- Update to 3.2
5a1e495
5d439e7
* Mon Jan 07 2013 Morten Stevens <mstevens@imt-systems.com> - 3.1-7
5d439e7
- Disable pdns guardian by default (rhbz#883852)
5d439e7
- Drop backend MongoDB as it does not work (upstream commit 3017)
5d439e7
d3ad709
* Thu Nov 22 2012 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.1-6
d3ad709
- Add example schemas to documentation
d3ad709
3936a37
* Fri Oct 19 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-5
3936a37
- Fixed permissions of pdns.conf file (rhbz#646510)
3936a37
- Set bind as default backend
3936a37
a05e0ba
* Mon Sep 24 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-4
a05e0ba
- use new systemd rpm macros (rhbz#850266)
a05e0ba
968639f
* Mon Sep 24 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-3
968639f
- Fix pdns daemon exit code (rhbz#859898)
968639f
- Update systemd unit file
968639f
e8e0112
* Tue Sep 18 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-2
e8e0112
- Fix MongoDB backend
e8e0112
713d70c
* Mon Sep 17 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-1
5c2d139
- Update to 3.1
5c2d139
- Remove MongoDB backend due build problems
0a998eb
150315d
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1-3
150315d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
150315d
150315d
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1-2
150315d
- Rebuilt for c++ ABI breakage
150315d
5c2d139
* Mon Jan 09 2012 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0.1-1
d926ad4
- CVE-2012-0206
d926ad4
df9568a
* Sun Aug 07 2011 Dan Horák <dan@danny.cz> - 3.0-7
df9568a
- mongodb supports only x86
df9568a
a8bc0af
* Mon Jul 25 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-6
a8bc0af
- Upstream released new version
a8bc0af
1e981e8
* Wed Jul 20 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-5.rc3
1e981e8
- New release candidate
1e981e8
- Add MongoDB backend
1e981e8
- Enable LUA support
1e981e8
- Convert to systemd
1e981e8
1e981e8
* Sat Apr 09 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-4.pre.20110327.2103.fc16
4b8fb29
- Rebuilt for new boost
4b8fb29
6b89186
* Mon Mar 28 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-3.pre.20110327.2103
6b89186
- License file moved a directory up
6b89186
- Add pdnssec and dnsreplay commands
6b89186
9af8632
* Mon Mar 28 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-2.pre.20110327.2103
9af8632
- Add lua BuildRequires
9af8632
736f3d5
* Mon Mar 28 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-1.pre.20110327.2103
736f3d5
- Upstream released new pre-release version
736f3d5
- Now with DNSSEC support
736f3d5
- Drop merged patches
736f3d5
f572a95
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 2.9.22-13
f572a95
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
f572a95
09e915c
* Wed Mar 23 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-12
09e915c
- Rebuilt for new mysqlclient
09e915c
70fe3c5
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.22-11
70fe3c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
70fe3c5
a09b593
* Tue Dec 14 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-10
a09b593
- Fix crash on SIGSTOP and SIGCONT, thanks to Anders Kaseorg (#652841)
a09b593
fdee565
* Thu Jan 14 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-9
fdee565
- Fix changelog entry
fdee565
fdee565
* Thu Jan 14 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-8
5e17938
- Fix postgres lib detection (#555462)
5e17938
da6781e
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.9.22-7
da6781e
- rebuilt with new openssl
da6781e
84a7419
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.22-6
84a7419
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
84a7419
2fd8544
* Thu Feb 26 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> - 2.9.22-5
2fd8544
- Fix build with gcc4.4
2fd8544
979f8bd
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.22-4
979f8bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
979f8bd
77f1870
* Mon Jan 26 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-3
77f1870
- Upstream released new version
77f1870
b162494
* Fri Jan 23 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-2.rc3
b162494
- Rebuild for new libmysqlclient
b162494
32592d1
* Mon Jan 19 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-1.rc3
32592d1
- New release candidate
32592d1
853569f
* Wed Dec 03 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-1.rc2
32592d1
- Upstream released new release candidate
853569f
- Drop patches which are upstreamed
853569f
17abdeb
* Mon Nov 17 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.2-1
17abdeb
- Upstream released new version
17abdeb
caffe82
* Fri Sep 12 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.1-2
caffe82
- Fix handling of AAAA records (bz #461768)
caffe82
0aaaaec
* Wed Aug 06 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.1-1
0aaaaec
- CVE-2008-3337
0aaaaec
bb7118c
* Sat Feb 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-4
bb7118c
- GCC 4.3 fixes
bb7118c
95a29d0
* Wed Dec 05 2007 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-3
cb1513e
- Rebuild to pick up new openldap
cb1513e
b97d90b
* Tue Sep 11 2007 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-2
b97d90b
- Fix license tag
b97d90b
- Add README for geo backend to docs
ac9761b
e54484b
* Tue Apr 24 2007 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-1
e54484b
- Upstream released 2.9.21
e54484b
- Enabled new SQLite backend
ac9761b
9e5280f
* Tue Apr 10 2007 <ruben@rubenkerkhof.com> 2.9.20-9
f7a8198
- Add Requires for chkconfig, service and useradd (#235582)
ac9761b
68ad749
* Mon Jan 1 2007 <ruben@rubenkerkhof.com> 2.9.20-8
68ad749
- Add the pdns user and group to the config file
68ad749
- Don't restart pdns on an upgrade
68ad749
- Minor cleanups in scriptlets
ac9761b
f19e2a7
* Mon Jan 1 2007 <ruben@rubenkerkhof.com> 2.9.20-7
f19e2a7
- Fixed typo in scriptlet
ac9761b
03bc80f
* Mon Jan 1 2007 <ruben@rubenkerkhof.com> 2.9.20-6
03bc80f
- Check if user pdns exists before adding it
ac9761b
473c30f
* Sat Dec 30 2006 <ruben@rubenkerkhof.com> 2.9.20-5
473c30f
- Strip rpath from the backends as well
ac9761b
473c30f
* Fri Dec 29 2006 <ruben@rubenkerkhof.com> 2.9.20-4
473c30f
- Disable rpath
ac9761b
473c30f
* Thu Dec 28 2006 <ruben@rubenkerkhof.com> 2.9.20-3
473c30f
- More fixes as per review #219973
ac9761b
473c30f
* Wed Dec 27 2006 <ruben@rubenkerkhof.com> 2.9.20-2
473c30f
- A few changes for FE review (bz #219973):
473c30f
- Renamed package to pdns, since that's how upstream calls it
473c30f
- Removed calls to ldconfig
473c30f
- Subpackages now require %%{version}-%%{release}
ac9761b
473c30f
* Sat Dec 16 2006 <ruben@rubenkerkhof.com> 2.9.20-1
473c30f
- Initial import