Compare commits
15 Commits
Author | SHA1 | Date |
---|---|---|
Morten Stevens | d93ad50e3f | |
Morten Stevens | 0205fd9154 | |
Morten Stevens | 5822c2620d | |
Ruben | ecaffc7bb8 | |
Ruben | badca557c6 | |
Ruben | 8b6746438d | |
Fedora Release Engineering | 2c6388bc3f | |
Bill Nottingham | ae3ccf6b6d | |
Ruben Kerkhof | fb61ca7b7b | |
Ruben Kerkhof | 8b51553aae | |
Ruben Kerkhof | 8dfb26597b | |
Ruben Kerkhof | 7336745f42 | |
Dennis Gilmore | 3cbc0702ec | |
Ruben Kerkhof | cfb79f8ec4 | |
Ruben Kerkhof | b88b65e978 |
|
@ -1 +0,0 @@
|
|||
pdns-2.9.20.tar.gz
|
|
@ -0,0 +1,2 @@
|
|||
pdns-2.9.22.tar.gz
|
||||
/pdns-2.9.22.6.tar.gz
|
21
Makefile
21
Makefile
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: pdns
|
||||
# $Id$
|
||||
NAME := pdns
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
|
@ -1,55 +0,0 @@
|
|||
--- 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:
|
|
@ -0,0 +1,9 @@
|
|||
--- pdns-2.9.22/pdns/pdns.conf-dist.orig 2008-02-23 11:41:41.000000000 +0100
|
||||
+++ pdns-2.9.22/pdns/pdns.conf-dist 2012-10-21 00:31:38.806051953 +0200
|
||||
@@ -1,3 +1,6 @@
|
||||
+setuid=pdns
|
||||
+setgid=pdns
|
||||
+launch=bind
|
||||
# Autogenerated configuration file template
|
||||
#################################
|
||||
# allow-axfr-ips Allow zonetransfers only to these subnets
|
|
@ -1,6 +1,6 @@
|
|||
--- 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 @@
|
||||
--- pdns-2.9.22/pdns/pdns.in.orig 2008-02-03 13:14:00.000000000 +0100
|
||||
+++ pdns-2.9.22/pdns/pdns.in 2012-11-01 14:31:23.251058524 +0100
|
||||
@@ -47,6 +47,7 @@ case "$1" in
|
||||
if test "$NOTRUNNING" = "0"
|
||||
then
|
||||
doPC quit
|
||||
|
@ -8,7 +8,7 @@
|
|||
echo $ret
|
||||
else
|
||||
echo "not running"
|
||||
@@ -57,6 +58,7 @@
|
||||
@@ -57,6 +58,7 @@ case "$1" in
|
||||
force-stop)
|
||||
echo -n "Stopping PowerDNS authoritative nameserver: "
|
||||
killall -v -9 pdns_server
|
||||
|
@ -16,7 +16,7 @@
|
|||
echo "killed"
|
||||
;;
|
||||
|
||||
@@ -69,6 +71,7 @@
|
||||
@@ -69,10 +71,21 @@ case "$1" in
|
||||
$pdns_server --daemon --guardian=yes
|
||||
if test "$?" = "0"
|
||||
then
|
||||
|
@ -24,3 +24,27 @@
|
|||
echo "started"
|
||||
fi
|
||||
fi
|
||||
- ;;
|
||||
+ ;;
|
||||
+
|
||||
+ condrestart)
|
||||
+ if [ -f /var/lock/subsys/pdns ];
|
||||
+ then
|
||||
+ echo "running, restarting"
|
||||
+ $0 restart
|
||||
+ else
|
||||
+ echo "not running"
|
||||
+ fi
|
||||
+ ;;
|
||||
|
||||
force-reload | restart)
|
||||
echo -n "Restarting PowerDNS authoritative nameserver: "
|
||||
@@ -170,7 +183,7 @@ case "$1" in
|
||||
|
||||
|
||||
*)
|
||||
- echo pdns [start\|stop\|force-reload\|restart\|status\|dump\|show\|mrtg\|cricket\|monitor]
|
||||
+ echo pdns [start\|stop\|condrestart\|force-reload\|restart\|status\|dump\|show\|mrtg\|cricket\|monitor]
|
||||
|
||||
;;
|
||||
esac
|
||||
|
|
115
pdns.spec
115
pdns.spec
|
@ -1,18 +1,23 @@
|
|||
Summary: A modern, advanced and high performance authoritative-only nameserver
|
||||
Name: pdns
|
||||
Version: 2.9.20
|
||||
Release: 8%{?dist}
|
||||
Name: pdns
|
||||
Version: 2.9.22.6
|
||||
Release: 1%{?dist}
|
||||
Summary: A modern, advanced and high performance authoritative-only nameserver
|
||||
Group: System Environment/Daemons
|
||||
License: GPLv2
|
||||
URL: http://powerdns.com
|
||||
Source0: http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
|
||||
Patch0: pdns-default-config.patch
|
||||
Patch1: pdns-fixinit.patch
|
||||
|
||||
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
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(preun): /sbin/service, /sbin/chkconfig
|
||||
Requires(postun): /sbin/service
|
||||
|
||||
BuildRequires: boost-devel, chrpath
|
||||
Provides: powerdns = %{version}-%{release}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: boost141-devel
|
||||
BuildRequires: chrpath
|
||||
Provides: powerdns = %{version}-%{release}
|
||||
|
||||
%description
|
||||
The PowerDNS Nameserver is a modern, advanced and high performance
|
||||
|
@ -48,6 +53,12 @@ Group: System Environment/Daemons
|
|||
Requires: %{name} = %{version}-%{release}
|
||||
BuildRequires: openldap-devel
|
||||
|
||||
%package backend-sqlite
|
||||
Summary: SQLite backend for %{name}
|
||||
Group: System Environment/Daemons
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildRequires: sqlite-devel
|
||||
|
||||
%description backend-mysql
|
||||
This package contains the gmysql backend for %{name}
|
||||
|
||||
|
@ -65,13 +76,16 @@ IP address ranges or based on the geographic location
|
|||
%description backend-ldap
|
||||
This package contains the ldap backend for %{name}
|
||||
|
||||
%description backend-sqlite
|
||||
This package contains the SQLite backend for %{name}
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .fixinit
|
||||
%patch1 -p1 -b .avoid-version
|
||||
%patch0 -p1 -b .default-config-patch
|
||||
%patch1 -p1 -b .fixinit
|
||||
|
||||
%build
|
||||
CXXFLAGS="-I/usr/include/boost141"
|
||||
export CPPFLAGS="-DLDAP_DEPRECATED %{optflags}"
|
||||
|
||||
%configure \
|
||||
|
@ -79,11 +93,10 @@ export CPPFLAGS="-DLDAP_DEPRECATED %{optflags}"
|
|||
--libdir=%{_libdir}/%{name} \
|
||||
--disable-static \
|
||||
--with-modules='' \
|
||||
--with-dynmodules='pipe gmysql gpgsql geo ldap' \
|
||||
--with-mysql-includes=%{_includedir}/mysql \
|
||||
--with-dynmodules='pipe gmysql gpgsql geo ldap gsqlite3' \
|
||||
--with-mysql-lib=%{_libdir}/mysql \
|
||||
--with-pgsql-includes=%{_includedir} \
|
||||
--with-pgsql-lib=%{_libdir}
|
||||
--with-pgsql-lib=%{_libdir} \
|
||||
--with-sqlite3-lib=%{_libdir}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
@ -95,9 +108,7 @@ make install DESTDIR=%{buildroot}
|
|||
%{__install} -p -D -m 0755 pdns/pdns %{buildroot}%{_initrddir}/pdns
|
||||
%{__mv} %{buildroot}%{_sysconfdir}/%{name}/pdns.conf{-dist,}
|
||||
|
||||
# add the pdns user to the config file
|
||||
sed -i '1i\setuid=pdns' %{buildroot}%{_sysconfdir}/%{name}/pdns.conf
|
||||
sed -i '2i\setgid=pdns' %{buildroot}%{_sysconfdir}/%{name}/pdns.conf
|
||||
chmod 600 %{buildroot}%{_sysconfdir}/%{name}/pdns.conf
|
||||
|
||||
# strip the static rpath from the binaries
|
||||
chrpath --delete %{buildroot}%{_bindir}/pdns_control
|
||||
|
@ -106,20 +117,27 @@ chrpath --delete %{buildroot}%{_bindir}/zone2sql
|
|||
chrpath --delete %{buildroot}%{_sbindir}/pdns_server
|
||||
chrpath --delete %{buildroot}%{_libdir}/%{name}/*.so
|
||||
|
||||
%pre
|
||||
getent group pdns >/dev/null || groupadd -r pdns
|
||||
getent passwd pdns >/dev/null || \
|
||||
useradd -r -g pdns -d / -s /sbin/nologin \
|
||||
-c "PowerDNS user" pdns
|
||||
exit 0
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ]; then
|
||||
/sbin/chkconfig --add pdns
|
||||
userid=`id -u pdns 2>/dev/null`
|
||||
if [ x"$userid" = x ]; then
|
||||
%{_sbindir}/useradd -c "PowerDNS user" -s /sbin/nologin -r -d / pdns > /dev/null || :
|
||||
fi
|
||||
fi
|
||||
/sbin/chkconfig --add pdns
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service pdns stop >/dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del pdns
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/service pdns condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
|
@ -155,7 +173,7 @@ fi
|
|||
|
||||
%files backend-geo
|
||||
%defattr(-,root,root,-)
|
||||
%doc pdns/COPYING
|
||||
%doc pdns/COPYING modules/geobackend/README
|
||||
%{_libdir}/%{name}/libgeobackend.so
|
||||
|
||||
%files backend-ldap
|
||||
|
@ -163,8 +181,44 @@ fi
|
|||
%doc pdns/COPYING
|
||||
%{_libdir}/%{name}/libldapbackend.so
|
||||
|
||||
%files backend-sqlite
|
||||
%defattr(-,root,root,-)
|
||||
%doc pdns/COPYING
|
||||
%{_libdir}/%{name}/libgsqlite3backend.so
|
||||
|
||||
%changelog
|
||||
* Sun Feb 10 2013 Morten Stevens <mstevens@imt-systems.com> - 2.9.22.6-1
|
||||
- Update to 2.9.22.6
|
||||
- Rebuild for Boost 1.41
|
||||
|
||||
* Thu Nov 01 2012 Morten Stevens <mstevens@imt-systems.com> - 2.9.22-6
|
||||
- Added condrestart option
|
||||
- Spec improvements
|
||||
|
||||
* Sat Oct 20 2012 Morten Stevens <mstevens@imt-systems.com> - 2.9.22-5
|
||||
- Fixed permissions of pdns.conf file (rhbz#646510)
|
||||
- Set bind as default backend
|
||||
|
||||
* Mon Jan 09 2012 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-4
|
||||
- CVE-2012-0206
|
||||
|
||||
* Mon Jan 26 2009 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.22-3
|
||||
- Upstream released new version
|
||||
|
||||
* Mon Nov 17 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.2-1
|
||||
- Upstream released new version
|
||||
|
||||
* Fri Sep 12 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.1-2
|
||||
- Fix AAAA record handling (bz #461768)
|
||||
|
||||
* Wed Aug 06 2008 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21.1-1
|
||||
- CVE-2008-3337
|
||||
|
||||
* Thu May 1 2007 Ruben Kerkhof <ruben@rubenkerkhof.com> 2.9.21-1
|
||||
- Upstream released 2.9.21
|
||||
- Enabled new SQLite backend
|
||||
* Thu Apr 10 2007 <ruben@rubenkerkhof.com> 2.9.20-9
|
||||
- Add Requires for chkconfig, service and useradd (#235582)
|
||||
* Mon Jan 1 2007 <ruben@rubenkerkhof.com> 2.9.20-8
|
||||
- Add the pdns user and group to the config file
|
||||
- Don't restart pdns on an upgrade
|
||||
|
@ -186,4 +240,3 @@ fi
|
|||
- Subpackages now require %%{version}-%%{release}
|
||||
* Sat Dec 16 2006 <ruben@rubenkerkhof.com> 2.9.20-1
|
||||
- Initial import
|
||||
|
||||
|
|
Loading…
Reference in New Issue