Bug 225360 - dns/unbound: service start fails with flags
Summary: dns/unbound: service start fails with flags
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-21 17:53 UTC by Bernard Spil
Modified: 2018-01-26 10:47 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jaap)


Attachments
patch to mitigate the problem (982 bytes, patch)
2018-01-23 22:40 UTC, Jaap Akkerhuis
jaap: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Spil freebsd_committer 2018-01-21 17:53:03 UTC
If a different conf-file is passed to unbound with 

> unbound_flags=" -c /var/unbound/unbound.conf"

unbound will fail to start with error

> unbound-checkconf[81255:0] fatal error: config file /usr/local/etc/unbound/unbound.conf is not inside chroot /var/unbound

This can be fixed by adding /var/unbound/unbound.conf to the rc-script in the unbound-checkconf line in pre-cmd

Probably the rc script needs to be amended to allow passing a config file and pass that to unbound-checkconf and (incl. -c) to unbound.
Comment 1 Jaap Akkerhuis 2018-01-23 22:40:39 UTC
Created attachment 190012 [details]
patch to mitigate the problem

This patch will have the desired effect when you add

unbound_conf="/var/unbound/unbound.conf"

to /etc/rc.conf

Note that you have to tailor that config file to your needs
Comment 2 Bernard Spil freebsd_committer 2018-01-24 11:04:26 UTC
Updated my port and this is working fine. That was roughly what I was expecting, thanks!

Works fine here, want me to commit it? (PORTREVISION bump?)
Comment 3 Jaap Akkerhuis 2018-01-25 22:24:33 UTC
I talked with the developers and there will be a release in a couple of weeks so I wanted to wait for that.

A revision bump is likely an overkill since I don't expect that a lot of people will change the default.
Comment 4 commit-hook freebsd_committer 2018-01-26 10:16:25 UTC
A commit references this bug:

Author: brnrd
Date: Fri Jan 26 10:16:17 UTC 2018
New revision: 459983
URL: https://svnweb.freebsd.org/changeset/ports/459983

Log:
  dns/unbound: Fix rc-script with config in flags

   - Adds new option unbound_config

  PR:		225360
  Submitted by:	jaap@NLnetLabs.nl
  Approved by:	jaap@NLnetLabs.nl (maintainer)

Changes:
  head/dns/unbound/files/unbound.in