From nobody@FreeBSD.org  Mon Sep 23 06:24:29 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 49E1CDEE
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Sep 2013 06:24:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 1D5F321CA
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Sep 2013 06:24:29 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r8N6OSaD026519
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 23 Sep 2013 06:24:28 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r8N6OSBu026494;
	Mon, 23 Sep 2013 06:24:28 GMT
	(envelope-from nobody)
Message-Id: <201309230624.r8N6OSBu026494@oldred.freebsd.org>
Date: Mon, 23 Sep 2013 06:24:28 GMT
From: Jan Beich <jbeich@tormail.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] unbound-checkconf: fatal error: config file /etc/unbound/unbound.conf is not inside chroot /var/unbound
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         182310
>Category:       bin
>Synopsis:       [patch] unbound-checkconf: fatal error: config file /etc/unbound/unbound.conf is not inside chroot /var/unbound
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 23 06:30:00 UTC 2013
>Closed-Date:    Mon Sep 30 15:54:29 UTC 2013
>Last-Modified:  Mon Sep 30 15:54:29 UTC 2013
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
rc.d script from dns/unbound

>Description:
unbound in base is configured to use chroot dir but its config file
lives outside, under /etc.

>How-To-Repeat:

>Fix:
--- chroot_conf.diff begins here ---
Index: contrib/unbound/config.h
===================================================================
--- contrib/unbound/config.h	(revision 255808)
+++ contrib/unbound/config.h	(working copy)
@@ -5,10 +5,10 @@
 #define CHROOT_DIR "/var/unbound"
 
 /* Pathname to the Unbound configuration file */
-#define CONFIGFILE "/etc/unbound/unbound.conf"
+#define CONFIGFILE "/var/unbound/unbound.conf"
 
 /* configure flags */
-#define CONFIGURE_BUILD_WITH " '--prefix=' '--exec-prefix=/usr' '--with-conf-file=/etc/unbound/unbound.conf' '--with-run-dir=/var/unbound' '--with-username=unbound'"
+#define CONFIGURE_BUILD_WITH " '--prefix=' '--exec-prefix=/usr' '--with-conf-file=/var/unbound/unbound.conf' '--with-run-dir=/var/unbound' '--with-username=unbound'"
 
 /* configure date */
 #define CONFIGURE_DATE "Sun Sep 15 15:38:41 CEST 2013"
Index: contrib/unbound/freebsd-configure.sh
===================================================================
--- contrib/unbound/freebsd-configure.sh	(revision 255808)
+++ contrib/unbound/freebsd-configure.sh	(working copy)
@@ -26,7 +26,7 @@ export LDFLAGS="-L$ldnsobj"
 
 ./configure \
 	--prefix= --exec-prefix=/usr \
-	--with-conf-file=/etc/unbound/unbound.conf \
+	--with-conf-file=/var/unbound/unbound.conf \
 	--with-run-dir=/var/unbound \
 	--with-username=unbound
 
Index: etc/Makefile
===================================================================
--- etc/Makefile	(revision 255808)
+++ etc/Makefile	(working copy)
@@ -247,6 +247,11 @@ distribution:
 		ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \
 	fi
 .endif
+.if ${MK_UNBOUND} != "no"
+	if [ ! -e ${DESTDIR}/etc/unbound ]; then \
+		ln -s ../var/unbound ${DESTDIR}/etc/unbound; \
+	fi
+.endif
 .if ${MK_BIND_ETC} != "no"
 	${_+_}cd ${.CURDIR}/namedb; ${MAKE} install
 .endif
Index: etc/mtree/BSD.root.dist
===================================================================
--- etc/mtree/BSD.root.dist	(revision 255808)
+++ etc/mtree/BSD.root.dist	(working copy)
@@ -66,8 +66,6 @@
         ..
         ssl
         ..
-        unbound
-        ..
         zfs
         ..
     ..
--- chroot_conf.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Sep 29 21:48:51 UTC 2013 
Responsible-Changed-Why:  
des, is this one fixed already? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182310 
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Mon Sep 30 15:54:25 UTC 2013 
State-Changed-Why:  
fixed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182310 
>Unformatted:
