df9568
%global backends %{nil}
df9568
968639
Name: pdns
5a1e49
Version: 3.2
5a1e49
Release: 1%{?dist}
5a1e49
Summary: A modern, advanced and high performance authoritative-only nameserver
968639
Group: System Environment/Daemons
5a1e49
License: GPLv2
968639
URL: http://powerdns.com
968639
Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
968639
Source1: pdns.service
3936a3
Patch0: pdns-default-config.patch
968639
968639
Requires(pre): shadow-utils
3936a3
Requires(post): systemd-sysv
3936a3
Requires(post): systemd-units
968639
Requires(preun): systemd-units
968639
Requires(postun): systemd-units
968639
3936a3
BuildRequires: systemd-units
3936a3
BuildRequires: boost-devel
3936a3
BuildRequires: lua-devel
3936a3
BuildRequires: cryptopp-devel
968639
Provides: powerdns = %{version}-%{release}
473c30
473c30
%description
473c30
The PowerDNS Nameserver is a modern, advanced and high performance
473c30
authoritative-only nameserver. It is written from scratch and conforms
473c30
to all relevant DNS standards documents.
473c30
Furthermore, PowerDNS interfaces with almost any database.
473c30
473c30
%package	backend-mysql
473c30
Summary:	MySQL backend for %{name}
473c30
Group:		System Environment/Daemons
1e981e
Requires:	%{name}%{?_isa} = %{version}-%{release}
473c30
BuildRequires:	mysql-devel
df9568
%global backends %{backends} gmysql
473c30
473c30
%package	backend-postgresql
473c30
Summary:	PostgreSQL backend for %{name}
473c30
Group:		System Environment/Daemons
1e981e
Requires:	%{name}%{?_isa} = %{version}-%{release}
473c30
BuildRequires:	postgresql-devel
df9568
%global backends %{backends} gpgsql
473c30
473c30
%package	backend-pipe
473c30
Summary:	Pipe backend for %{name}
473c30
Group:		System Environment/Daemons
1e981e
Requires:	%{name}%{?_isa} = %{version}-%{release}
df9568
%global backends %{backends} pipe
473c30
473c30
%package	backend-geo
473c30
Summary:	Geo backend for %{name}
473c30
Group:		System Environment/Daemons
1e981e
Requires:	%{name}%{?_isa} = %{version}-%{release}
df9568
%global backends %{backends} geo
473c30
473c30
%package	backend-ldap
473c30
Summary:	LDAP backend for %{name}
473c30
Group:		System Environment/Daemons
1e981e
Requires:	%{name}%{?_isa} = %{version}-%{release}
473c30
BuildRequires:	openldap-devel
df9568
%global backends %{backends} ldap
473c30
e54484
%package	backend-sqlite
e54484
Summary:	SQLite backend for %{name}
e54484
Group:		System Environment/Daemons
1e981e
Requires:	%{name}%{?_isa} = %{version}-%{release}
e54484
BuildRequires:	sqlite-devel
df9568
%global backends %{backends} gsqlite3
e54484
473c30
%description	backend-mysql
473c30
This package contains the gmysql backend for %{name}
473c30
473c30
%description	backend-postgresql
473c30
This package contains the gpgsql backend for %{name}
473c30
473c30
%description	backend-pipe
473c30
This package contains the pipe backend for %{name}
473c30
473c30
%description	backend-geo
473c30
This package contains the geo backend for %{name}
473c30
It allows different answers to DNS queries coming from different
473c30
IP address ranges or based on the geographic location
473c30
473c30
%description	backend-ldap
473c30
This package contains the ldap backend for %{name}
473c30
e54484
%description	backend-sqlite
e54484
This package contains the SQLite backend for %{name}
e54484
473c30
%prep
a8bc0a
%setup -q
3936a3
%patch0 -p1 -b .default-config-patch
473c30
473c30
%build
473c30
export CPPFLAGS="-DLDAP_DEPRECATED %{optflags}"
473c30
473c30
%configure \
473c30
	--sysconfdir=%{_sysconfdir}/%{name} \
473c30
	--libdir=%{_libdir}/%{name} \
473c30
	--disable-static \
473c30
	--with-modules='' \
1e981e
	--with-lua \
df9568
	--with-dynmodules='%{backends}' \
1e981e
	--enable-cryptopp
1e981e
1e981e
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
1e981e
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
473c30
473c30
make %{?_smp_mflags}
473c30
473c30
%install
473c30
make install DESTDIR=%{buildroot}
473c30
473c30
%{__rm} -f %{buildroot}%{_libdir}/%{name}/*.la
473c30
%{__mv} %{buildroot}%{_sysconfdir}/%{name}/pdns.conf{-dist,}
473c30
3936a3
chmod 600 %{buildroot}%{_sysconfdir}/%{name}/pdns.conf
68ad74
1e981e
# Copy systemd service file
1e981e
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/pdns.service
1e981e
1e981e
%pre
1e981e
getent group pdns >/dev/null || groupadd -r pdns
1e981e
getent passwd pdns >/dev/null || \
1e981e
	useradd -r -g pdns -d / -s /sbin/nologin \
1e981e
	-c "PowerDNS user" pdns
1e981e
exit 0
1e981e
473c30
%post
a05e0b
%systemd_post pdns.service
1e981e
473c30
%preun
a05e0b
%systemd_preun pdns.service
1e981e
1e981e
%postun
a05e0b
%systemd_postun_with_restart pdns.service
1e981e
1e981e
%triggerun -- pdns < 3.0-rc3
1e981e
# Save the current service runlevel info
1e981e
# User must manually run systemd-sysv-convert --apply pdns
1e981e
# to migrate them to systemd targets
1e981e
%{_bindir}/systemd-sysv-convert --save pdns &>/dev/null ||:
1e981e
1e981e
# Run these because the SysV package being removed won't do them
1e981e
/sbin/chkconfig --del pdns &>/dev/null || :
1e981e
/bin/systemctl try-restart pdns.service &>/dev/null || :
1e981e
473c30
%files
473c30
%defattr(-,root,root,-)
1e981e
%doc COPYING README
6b8918
%{_bindir}/dnsreplay
473c30
%{_bindir}/pdns_control
6b8918
%{_bindir}/pdnssec
473c30
%{_bindir}/zone2ldap
473c30
%{_bindir}/zone2sql
5a1e49
%{_bindir}/zone2json
473c30
%{_sbindir}/pdns_server
473c30
%{_mandir}/man8/pdns_control.8.gz
473c30
%{_mandir}/man8/pdns_server.8.gz
473c30
%{_mandir}/man8/zone2sql.8.gz
1e981e
%{_unitdir}/pdns.service
473c30
%dir %{_libdir}/%{name}/
473c30
%dir %{_sysconfdir}/%{name}/
473c30
%config(noreplace) %{_sysconfdir}/%{name}/pdns.conf
473c30
473c30
%files backend-mysql
473c30
%defattr(-,root,root,-)
d3ad70
%doc pdns/dnssec.schema.mysql.sql
d3ad70
%doc pdns/no-dnssec.schema.mysql.sql
473c30
%{_libdir}/%{name}/libgmysqlbackend.so
473c30
473c30
%files backend-postgresql
473c30
%defattr(-,root,root,-)
473c30
%{_libdir}/%{name}/libgpgsqlbackend.so
d3ad70
%doc pdns/dnssec.schema.pgsql.sql
d3ad70
%doc pdns/no-dnssec.schema.pgsql.sql
473c30
473c30
%files backend-pipe
473c30
%defattr(-,root,root,-)
473c30
%{_libdir}/%{name}/libpipebackend.so
473c30
473c30
%files backend-geo
473c30
%defattr(-,root,root,-)
1e981e
%doc modules/geobackend/README
473c30
%{_libdir}/%{name}/libgeobackend.so
473c30
473c30
%files backend-ldap
473c30
%defattr(-,root,root,-)
473c30
%{_libdir}/%{name}/libldapbackend.so
473c30
e54484
%files backend-sqlite
e54484
%defattr(-,root,root,-)
e54484
%{_libdir}/%{name}/libgsqlite3backend.so
d3ad70
%doc pdns/dnssec.schema.sqlite3.sql
d3ad70
%doc pdns/no-dnssec.schema.sqlite3.sql
d3ad70
%doc pdns/bind-dnssec.schema.sqlite3.sql
e54484
473c30
%changelog
5a1e49
* Thu Jan 17 2013 Morten Stevens <mstevens@imt-systems.com> - 3.2-1
5a1e49
- Update to 3.2
5a1e49
5d439e
* Mon Jan 07 2013 Morten Stevens <mstevens@imt-systems.com> - 3.1-7
5d439e
- Disable pdns guardian by default (rhbz#883852)
5d439e
- Drop backend MongoDB as it does not work (upstream commit 3017)
5d439e
d3ad70
* Thu Nov 22 2012 Ruben Kerkhof <ruben@rubenkerkhof.com> - 3.1-6
d3ad70
- Add example schemas to documentation
d3ad70
3936a3
* Fri Oct 19 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-5
3936a3
- Fixed permissions of pdns.conf file (rhbz#646510)
3936a3
- Set bind as default backend
3936a3
a05e0b
* Mon Sep 24 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-4
a05e0b
- use new systemd rpm macros (rhbz#850266)
a05e0b
968639
* Mon Sep 24 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-3
968639
- Fix pdns daemon exit code (rhbz#859898)
968639
- Update systemd unit file
968639
e8e011
* Tue Sep 18 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-2
e8e011
- Fix MongoDB backend
e8e011
713d70
* Mon Sep 17 2012 Morten Stevens <mstevens@imt-systems.com> - 3.1-1
5c2d13
- Update to 3.1
5c2d13
- Remove MongoDB backend due build problems
0a998e
150315
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1-3
150315
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
150315
150315
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1-2
150315
- Rebuilt for c++ ABI breakage
150315
5c2d13
* Mon Jan 09 2012 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0.1-1
d926ad
- CVE-2012-0206
d926ad
df9568
* Sun Aug 07 2011 Dan Horรกk <dan@danny.cz> - 3.0-7
df9568
- mongodb supports only x86
df9568
a8bc0a
* Mon Jul 25 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-6
a8bc0a
- Upstream released new version
a8bc0a
1e981e
* Wed Jul 20 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-5.rc3
1e981e
- New release candidate
1e981e
- Add MongoDB backend
1e981e
- Enable LUA support
1e981e
- Convert to systemd
1e981e
1e981e
* Sat Apr 09 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-4.pre.20110327.2103.fc16
4b8fb2
- Rebuilt for new boost
4b8fb2
6b8918
* Mon Mar 28 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-3.pre.20110327.2103
6b8918
- License file moved a directory up
6b8918
- Add pdnssec and dnsreplay commands
6b8918
9af863
* Mon Mar 28 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-2.pre.20110327.2103
9af863
- Add lua BuildRequires
9af863
736f3d
* Mon Mar 28 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 3.0-1.pre.20110327.2103
736f3d
- Upstream released new pre-release version
736f3d
- Now with DNSSEC support
736f3d
- Drop merged patches
736f3d
f572a9
* Wed Mar 23 2011 Dan Horรกk <dan@danny.cz> - 2.9.22-13
f572a9
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
f572a9
09e915
* Wed Mar 23 2011 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-12
09e915
- Rebuilt for new mysqlclient
09e915
70fe3c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.22-11
70fe3c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
70fe3c
a09b59
* Tue Dec 14 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-10
a09b59
- Fix crash on SIGSTOP and SIGCONT, thanks to Anders Kaseorg (#652841)
a09b59
fdee56
* Thu Jan 14 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-9
fdee56
- Fix changelog entry
fdee56
fdee56
* Thu Jan 14 2010 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-8
5e1793
- Fix postgres lib detection (#555462)
5e1793
da6781
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.9.22-7
da6781
- rebuilt with new openssl
da6781
84a741
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.22-6
84a741
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
84a741
2fd854
* Thu Feb 26 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> - 2.9.22-5
2fd854
- Fix build with gcc4.4
2fd854
979f8b
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.22-4
979f8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
979f8b
77f187
* Mon Jan 26 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-3
77f187
- Upstream released new version
77f187
b16249
* Fri Jan 23 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-2.rc3
b16249
- Rebuild for new libmysqlclient
b16249
32592d
* Mon Jan 19 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-1.rc3
32592d
- New release candidate
32592d
853569
* Wed Dec 03 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-1.rc2
32592d
- Upstream released new release candidate
853569
- Drop patches which are upstreamed
853569
17abde
* Mon Nov 17 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.2-1
17abde
- Upstream released new version
17abde
caffe8
* Fri Sep 12 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.1-2
caffe8
- Fix handling of AAAA records (bz #461768)
caffe8
0aaaae
* Wed Aug 06 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.1-1
0aaaae
- CVE-2008-3337
0aaaae
bb7118
* Sat Feb 09 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-4
bb7118
- GCC 4.3 fixes
bb7118
95a29d
* Wed Dec 05 2007 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-3
cb1513
- Rebuild to pick up new openldap
cb1513
b97d90
* Tue Sep 11 2007 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-2
b97d90
- Fix license tag
b97d90
- Add README for geo backend to docs
e54484
* Tue Apr 24 2007 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-1
e54484
- Upstream released 2.9.21
e54484
- Enabled new SQLite backend
f7a819
* Thu Apr 10 2007 <ruben@rubenkerkhof.com> 2.9.20-9
f7a819
- Add Requires for chkconfig, service and useradd (#235582)
68ad74
* Mon Jan 1 2007 <ruben@rubenkerkhof.com> 2.9.20-8
68ad74
- Add the pdns user and group to the config file
68ad74
- Don't restart pdns on an upgrade
68ad74
- Minor cleanups in scriptlets
f19e2a
* Mon Jan 1 2007 <ruben@rubenkerkhof.com> 2.9.20-7
f19e2a
- Fixed typo in scriptlet
03bc80
* Mon Jan 1 2007 <ruben@rubenkerkhof.com> 2.9.20-6
03bc80
- Check if user pdns exists before adding it
473c30
* Sat Dec 30 2006 <ruben@rubenkerkhof.com> 2.9.20-5
473c30
- Strip rpath from the backends as well
473c30
* Fri Dec 29 2006 <ruben@rubenkerkhof.com> 2.9.20-4
473c30
- Disable rpath
473c30
* Thu Dec 28 2006 <ruben@rubenkerkhof.com> 2.9.20-3
473c30
- More fixes as per review #219973
473c30
* Wed Dec 27 2006 <ruben@rubenkerkhof.com> 2.9.20-2
473c30
- A few changes for FE review (bz #219973):
473c30
- Renamed package to pdns, since that's how upstream calls it
473c30
- Removed calls to ldconfig
473c30
- Subpackages now require %%{version}-%%{release}
473c30
* Sat Dec 16 2006 <ruben@rubenkerkhof.com> 2.9.20-1
473c30
- Initial import