diff --git a/.cvsignore b/.cvsignore index e69de29..4ee962b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +pdns-2.9.20.tar.gz diff --git a/pdns-avoid-version.patch b/pdns-avoid-version.patch new file mode 100644 index 0000000..30ffd7e --- /dev/null +++ b/pdns-avoid-version.patch @@ -0,0 +1,55 @@ +--- pdns-2.9.20/modules/ldapbackend/Makefile.in.avoid-version 2006-12-18 00:11:42.000000000 +0100 ++++ pdns-2.9.20/modules/ldapbackend/Makefile.in 2006-12-18 00:13:17.000000000 +0100 +@@ -205,7 +205,7 @@ + EXTRA_DIST = OBJECTFILES OBJECTLIBS + libldapbackend_la_SOURCES = ldapbackend.cc ldapbackend.hh \ + powerldap.hh powerldap.cc utils.hh +- ++libldapbackend_la_LDFLAGS = -avoid-version + libldapbackend_la_LIBADD = -lldap + all: all-am + +--- pdns-2.9.20/modules/pipebackend/Makefile.in.avoid-version 2006-12-18 00:07:21.000000000 +0100 ++++ pdns-2.9.20/modules/pipebackend/Makefile.in 2006-12-18 00:07:36.000000000 +0100 +@@ -209,7 +209,7 @@ + EXTRA_DIST = OBJECTFILES OBJECTLIBS backend.pl + lib_LTLIBRARIES = libpipebackend.la + libpipebackend_la_SOURCES = pipebackend.cc pipebackend.hh coprocess.cc coprocess.hh +-libpipebackend_la_LDFLAGS = -module ++libpipebackend_la_LDFLAGS = -module -avoid-version + all: all-am + + .SUFFIXES: +--- pdns-2.9.20/modules/gpgsqlbackend/Makefile.in.avoid-version 2006-12-18 00:08:23.000000000 +0100 ++++ pdns-2.9.20/modules/gpgsqlbackend/Makefile.in 2006-12-18 00:13:51.000000000 +0100 +@@ -208,7 +208,7 @@ + spgsql.hh spgsql.cc + + libgpgsqlbackend_la_LDFLAGS = @PGSQL_lib@ -Wl,-Bstatic -lpq \ +- -Wl,-Bdynamic ++ -Wl,-Bdynamic -avoid-version + + libgpgsqlbackend_la_LIBADD = -lssl -lcrypt -lcrypto + all: all-am +--- pdns-2.9.20/modules/gmysqlbackend/Makefile.in.avoid-version 2006-12-18 00:07:52.000000000 +0100 ++++ pdns-2.9.20/modules/gmysqlbackend/Makefile.in 2006-12-18 00:08:15.000000000 +0100 +@@ -207,7 +207,7 @@ + libgmysqlbackend_la_SOURCES = gmysqlbackend.cc gmysqlbackend.hh \ + smysql.hh smysql.cc + +-libgmysqlbackend_la_LDFLAGS = -module -lmysqlclient ++libgmysqlbackend_la_LDFLAGS = -module -lmysqlclient -avoid-version + all: all-am + + .SUFFIXES: +--- pdns-2.9.20/modules/geobackend/Makefile.in.avoid-version 2006-03-15 19:33:21.000000000 +0100 ++++ pdns-2.9.20/modules/geobackend/Makefile.in 2006-12-17 23:58:33.000000000 +0100 +@@ -204,7 +204,7 @@ + EXTRA_DIST = OBJECTFILES OBJECTLIBS + lib_LTLIBRARIES = libgeobackend.la + libgeobackend_la_SOURCES = geobackend.cc geobackend.hh ippreftree.cc ippreftree.hh +-libgeobackend_la_LDFLAGS = -module ++libgeobackend_la_LDFLAGS = -module -avoid-version + all: all-am + + .SUFFIXES: diff --git a/pdns-fixinit.patch b/pdns-fixinit.patch new file mode 100644 index 0000000..e4c563a --- /dev/null +++ b/pdns-fixinit.patch @@ -0,0 +1,26 @@ +--- pdns-2.9.20/pdns/pdns.in.fixinit 2006-12-17 18:14:14.000000000 +0100 ++++ pdns-2.9.20/pdns/pdns.in 2006-12-17 18:15:42.000000000 +0100 +@@ -47,6 +47,7 @@ + if test "$NOTRUNNING" = "0" + then + doPC quit ++ rm -f /var/lock/subsys/pdns + echo $ret + else + echo "not running" +@@ -57,6 +58,7 @@ + force-stop) + echo -n "Stopping PowerDNS authoritative nameserver: " + killall -v -9 pdns_server ++ rm -f /var/lock/subsys/pdns + echo "killed" + ;; + +@@ -69,6 +71,7 @@ + $pdns_server --daemon --guardian=yes + if test "$?" = "0" + then ++ touch /var/lock/subsys/pdns + echo "started" + fi + fi diff --git a/pdns.spec b/pdns.spec new file mode 100644 index 0000000..c1a3d68 --- /dev/null +++ b/pdns.spec @@ -0,0 +1,179 @@ +Summary: A modern, advanced and high performance authoritative-only nameserver +Name: pdns +Version: 2.9.20 +Release: 5%{?dist} + +Group: System Environment/Daemons +License: GPL +URL: http://powerdns.com +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz +Patch0: %{name}-fixinit.patch +Patch1: %{name}-avoid-version.patch + +BuildRequires: boost-devel, chrpath +Provides: powerdns = %{version}-%{release} + +%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. + +%package backend-mysql +Summary: MySQL backend for %{name} +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} +BuildRequires: mysql-devel + +%package backend-postgresql +Summary: PostgreSQL backend for %{name} +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} +BuildRequires: postgresql-devel + +%package backend-pipe +Summary: Pipe backend for %{name} +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} + +%package backend-geo +Summary: Geo backend for %{name} +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} + +%package backend-ldap +Summary: LDAP backend for %{name} +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} +BuildRequires: openldap-devel + +%description backend-mysql +This package contains the gmysql backend for %{name} + +%description backend-postgresql +This package contains the gpgsql backend for %{name} + +%description backend-pipe +This package contains the pipe backend for %{name} + +%description backend-geo +This package contains the geo backend for %{name} +It allows different answers to DNS queries coming from different +IP address ranges or based on the geographic location + +%description backend-ldap +This package contains the ldap backend for %{name} + + +%prep +%setup -q +%patch0 -p1 -b .fixinit +%patch1 -p1 -b .avoid-version + +%build +export CPPFLAGS="-DLDAP_DEPRECATED %{optflags}" + +%configure \ + --sysconfdir=%{_sysconfdir}/%{name} \ + --libdir=%{_libdir}/%{name} \ + --disable-static \ + --with-modules='' \ + --with-dynmodules='pipe gmysql gpgsql geo ldap' \ + --with-mysql-includes=%{_includedir}/mysql \ + --with-mysql-lib=%{_libdir}/mysql \ + --with-pgsql-includes=%{_includedir} \ + --with-pgsql-lib=%{_libdir} + +make %{?_smp_mflags} + +%install +%{__rm} -rf %{buildroot} +make install DESTDIR=%{buildroot} + +%{__rm} -f %{buildroot}%{_libdir}/%{name}/*.la +%{__install} -p -D -m 0755 pdns/pdns %{buildroot}%{_initrddir}/pdns +%{__mv} %{buildroot}%{_sysconfdir}/%{name}/pdns.conf{-dist,} + +# strip the static rpath from the binaries +chrpath --delete %{buildroot}%{_bindir}/pdns_control +chrpath --delete %{buildroot}%{_bindir}/zone2ldap +chrpath --delete %{buildroot}%{_bindir}/zone2sql +chrpath --delete %{buildroot}%{_sbindir}/pdns_server +chrpath --delete %{buildroot}%{_libdir}/%{name}/*.so + +%post +if [ $1 = 1 ]; then + /sbin/chkconfig --add pdns + %{_sbindir}/useradd -c "PowerDNS user" -s /sbin/nologin -r -d / pdns +fi +%preun +if [ "$1" = 0 ]; then + /sbin/service pdns stop >/dev/null 2>&1 + /sbin/chkconfig --del pdns +fi + +%postun +if [ "$1" -ge "1" ]; then + /sbin/service pdns reload >/dev/null 2>&1 +fi + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc ChangeLog TODO pdns/COPYING +%{_bindir}/pdns_control +%{_bindir}/zone2ldap +%{_bindir}/zone2sql +%{_sbindir}/pdns_server +%{_mandir}/man8/pdns_control.8.gz +%{_mandir}/man8/pdns_server.8.gz +%{_mandir}/man8/zone2sql.8.gz +%{_initrddir}/pdns +%dir %{_libdir}/%{name}/ +%dir %{_sysconfdir}/%{name}/ +%config(noreplace) %{_sysconfdir}/%{name}/pdns.conf + +%files backend-mysql +%defattr(-,root,root,-) +%doc pdns/COPYING +%{_libdir}/%{name}/libgmysqlbackend.so + +%files backend-postgresql +%defattr(-,root,root,-) +%doc pdns/COPYING +%{_libdir}/%{name}/libgpgsqlbackend.so + +%files backend-pipe +%defattr(-,root,root,-) +%doc pdns/COPYING +%{_libdir}/%{name}/libpipebackend.so + +%files backend-geo +%defattr(-,root,root,-) +%doc pdns/COPYING +%{_libdir}/%{name}/libgeobackend.so + +%files backend-ldap +%defattr(-,root,root,-) +%doc pdns/COPYING +%{_libdir}/%{name}/libldapbackend.so + + +%changelog +* Sat Dec 30 2006 2.9.20-5 +- Strip rpath from the backends as well +* Fri Dec 29 2006 2.9.20-4 +- Disable rpath +* Thu Dec 28 2006 2.9.20-3 +- More fixes as per review #219973 +* Wed Dec 27 2006 2.9.20-2 +- A few changes for FE review (bz #219973): +- Renamed package to pdns, since that's how upstream calls it +- Removed calls to ldconfig +- Subpackages now require %%{version}-%%{release} +* Sat Dec 16 2006 2.9.20-1 +- Initial import + diff --git a/sources b/sources index e69de29..0cea3c0 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +33b20ef1b767f93297101f2aa09e99ed pdns-2.9.20.tar.gz