ports/73862: pdns_recursor related issues fixed
Ralf van der Enden
tremere at cainites.net
Fri Nov 12 11:00:52 UTC 2004
>Number: 73862
>Category: ports
>Synopsis: pdns_recursor related issues fixed
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 12 11:00:51 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Ralf van der Enden
>Release: FreeBSD 5.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD lan.cainites.net 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Sun Nov 7 17:28:36 CET 2004 root at lan.cainites.net:/usr/obj/usr/src/sys/HELLKERNEL i386
>Description:
There seems to be a problem running the pdns_recursor on FreeBSD 5.3 systems.
In order to workaround the coredump I've added a fix which adds a few lines to
/etc/libmap.conf
Second, I've added some checks when compiling the recursor since it only seems
to run on FBSD 5.0+
>How-To-Repeat:
>Fix:
--- pdns-2.9.16_5.diff begins here ---
diff -ruN powerdns.orig/Makefile powerdns/Makefile
--- powerdns.orig/Makefile Mon Nov 8 00:29:43 2004
+++ powerdns/Makefile Fri Nov 12 10:25:09 2004
@@ -7,7 +7,7 @@
PORTNAME= powerdns
PORTVERSION= 2.9.16
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= dns ipv6
MASTER_SITES= http://downloads.powerdns.com/releases/
DISTNAME= pdns-${PORTVERSION}
@@ -29,6 +29,7 @@
POWERDNS_OPTIONS="${POWERDNS_OPTIONS}"
MAN8= pdns_control.8 pdns_server.8 zone2sql.8
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/pdns.sh.sample
+LIBMAP_CONF= /etc/libmap.conf
# use user config if possible
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
@@ -63,7 +64,6 @@
USE_OPENLDAP?= YES
USE_LIBTOOL_VER= 13
INSTALLS_SHLIB= YES
-USE_GCC=3.2
CONFIGURE_MODULES+= "ldap"
PLIST_SUB+= WITHLDAP=""
.else
@@ -80,7 +80,6 @@
.endif
.if defined(POWERDNS_WITH_RECURSOR)
-USE_GCC=3.2
CONFIGURE_ARGS+= --enable-recursor
PLIST_SUB+= RECURSOR=""
.else
@@ -90,13 +89,19 @@
.include <bsd.port.pre.mk>
.if defined(POWERDNS_WITH_RECURSOR)
-.if exists(/usr/include/ucontext.h)
+.if exists(/usr/include/ucontext.h) && ${OSVERSION} >= 500000
UCONTEXT!= ${AWK} '/setcontext/ { print "YES" }' \
/usr/include/ucontext.h
.if ${UCONTEXT} == ""
-BROKEN= setcontext for recursor not found
+BROKEN= setcontext for recursor not found or FreeBSD version lower than 5.0
+.endif
.endif
.endif
+
+.if defined(POWERDNS_WITH_RECURSOR) || defined(WITH_LDAP)
+.if ${OSVERSION} < 500039
+USE_GCC=3.2
+.endif
.endif
.if defined(NO_DESCRIBE)
@@ -134,11 +139,23 @@
.endfor
.endif
.if !exists(${STARTUP_SCRIPT})
- ${ECHO_MSG} "Installing ${STARTUP_SCRIPT} startup file."
+ @${ECHO_MSG} "Installing ${STARTUP_SCRIPT} startup file."
${SED} -e "s=%%PREFIX%%=${PREFIX}=" \
${FILESDIR}/pdns.sh.sample \
> ${WRKSRC}/pdns.sh.sample
${INSTALL_SCRIPT} ${WRKSRC}/pdns.sh.sample ${STARTUP_SCRIPT}
+.endif
+.if defined(POWERDNS_WITH_RECURSOR)
+.if !exists(${LIBMAP_CONF})
+ @${ECHO_MSG} "# Start of fix (pdns_recursor)" > ${LIBMAP_CONF}
+.else
+ @${ECHO_MSG} "# Start of fix (pdns_recursor)" >> ${LIBMAP_CONF}
+.endif
+ @${ECHO_MSG} "Installing fix in /etc/libmap.conf for pdns_recursor."
+ @${ECHO_MSG} "[pdns_recursor]" >> ${LIBMAP_CONF}
+ @${ECHO_MSG} "libpthread.so.1 libc_r.so.5" >> ${LIBMAP_CONF}
+ @${ECHO_MSG} "libpthread.so libc_r.so" >> ${LIBMAP_CONF}
+ @${ECHO_MSG} "# End of fix (pdns_recursor)" >> ${LIBMAP_CONF}
.endif
.include <bsd.port.post.mk>
diff -ruN powerdns.orig/pkg-plist powerdns/pkg-plist
--- powerdns.orig/pkg-plist Mon Nov 8 00:28:53 2004
+++ powerdns/pkg-plist Fri Nov 12 10:25:01 2004
@@ -17,3 +17,5 @@
%%PORTDOCS%%share/examples/powerdns/pdns_postgresql.sql
%%PORTDOCS%%share/examples/powerdns/pdns_sqlite.sql
%%PORTDOCS%%@dirrm share/examples/powerdns
+%%RECURSOR%%@unexec sed -e "/^# Start of fix (pdns_recursor)$/,/^# End of fix (pdns_recursor)$/d" < /etc/libmap.conf > /etc/libmap.conf.tmp
+%%RECURSOR%%@unexec mv /etc/libmap.conf.tmp /etc/libmap.conf
--- pdns-2.9.16_5.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list