From nobody Wed Jan 18 17:07:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NxsdM28Ctz2sStt; Wed, 18 Jan 2023 17:07:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NxsdM175Fz3jHd; Wed, 18 Jan 2023 17:07:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id IBdKpHOull2xSIBuQpRlke; Wed, 18 Jan 2023 17:07:34 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id IBuOpr6TZcyvuIBuPpyaHm; Wed, 18 Jan 2023 17:07:34 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=63c82756 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=RvmDmJFTN0MA:10 a=iKhvJSA4AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=JZogqisxDOvIRNnNG9cA:9 a=CjuIK1q_8ugA:10 a=_fOGpDza7iMA:10 a=PaZFhfb9_QoA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 88A7D132C; Wed, 18 Jan 2023 09:07:32 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 6E5A714E; Wed, 18 Jan 2023 09:07:32 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Cy Schubert , Juraj Lutter , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1d577bedbae8 - main - unbound: Fix config file path In-reply-to: <202301181702.30IH2toO010890@gndrsh.dnsmgr.net> References: <202301181702.30IH2toO010890@gndrsh.dnsmgr.net> Comments: In-reply-to "Rodney W. Grimes" message dated "Wed, 18 Jan 2023 09:02:55 -0800." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 18 Jan 2023 09:07:32 -0800 Message-Id: <20230118170732.6E5A714E@slippy.cwsent.com> X-CMAE-Envelope: MS4xfBSkrZ+5aWdf00amlArqmersBzrLYfho2HDwACrBBFyZ01gHJ8l90bLmnEbEXGjJvZouXGnZVZSGgIOIeqWy4dFLu+H8bD4avFc40tBuqzbYiz/Wujaz cROCLAigExQ5nLStAovpDDYPwTPdUCTE6HT01PL3Ga5zTyOuYJbu+sUX3zEuX8Lf4QZrIAIOkrftrhaQ5MPO5dXXyZThFCvmoqe4xf0nPZJ3wuqM4nHcfoef Epww8mufAWhS2eDz01adDxrLn0hqKcmt7CiDrGldR+L8iXsRGLBQYY5CgPscl2DwrPzHq2jx3ZECJc5YTm1GxXKdMbydeb6f/+mXOQJyDf5WA2PcIsT703LZ Pe5iKPVo X-Rspamd-Queue-Id: 4NxsdM175Fz3jHd X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202301181702.30IH2toO010890@gndrsh.dnsmgr.net>, "Rodney W. Grimes" writes: > > In message <202301181645.30IGj4Ra010783@gndrsh.dnsmgr.net>, "Rodney W. > > Grimes" > > writes: > > > > > In message <202301181551.30IFpbRu010474@gndrsh.dnsmgr.net>, "Rodney W > . > > > > > Grimes" > > > > > writes: > > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > > > > > > > > > > > > > > > > > On 18 Jan 2023, at 16:34, Rodney W. Grimes gr.n > > > et> wr > > > > > > ote: > > > > > > > > > > > > > > > > No, otis fixed it thus: > > > > > > > > -#define CONFIGFILE "/usr/local/etc/unbound/unbound.conf" > > > > > > > > +#define CONFIGFILE "/var/unbound/unbound.conf" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I am suggesting that it should be > > > > > > > > #define CONFIGFILE "/etc/unbound/unbound.conf" > > > > > > > > > > > > > > > > ALL base system configuration files *should* be relative to /et > c, n > > > ot /va > > > > > > r. > > > > > > > > > > > > > > > > > > > > > > Would this need any mtree changes or similar? > > > > > > > > > > > > No, /etc/unbound is a symbolic link already installed by the build > syst > > > em, > > > > > > and /var/unbound is already a directory, again, installed by the bu > ild > > > system > > > > > > . > > > > > > > > > > > > This is a one line change that actually makes the /etc/unbound link > wor > > > k > > > > > > correctly, without this change the binary has a hard coded path tha > t ig > > > nores > > > > > > the > > > > > > /etc/unbound symbolic link and requires a recompile if I want to mo > ve > > > > > > things around, or maintanance of 2 symbolic links. > > > > > > > > > > > > Personally I dont see *why* unbound has a /var/unbound directory, c > an > > > > > > someone tell me why that was done? Is this some attempt and mainta > inin > > > g > > > > > > read only root? Does unbound scribble in the config directory, or > > > > > > is this simply mirroring some of the stuff that bind did? > > > > > > > > > > I see why it does this. Looking at usr.sbin/unbound/setup/local-unbou > nd-s > > > etu > > > > > p.sh, it installs its config files in $workdir. Looking at git log > > > > > 49cede74eecf4 (SVN r255809), the last paragraph in the commit log ent > ry > > > > > says: > > > > > > > > > > Note that these scripts place the unbound configuration files in > > > > > /var/unbound rather than /etc/unbound. This is necessary so that > > > > > unbound can reload its configuration while chrooted. We should > > > > > probably provide symlinks in /etc. > > > > > > Hang on a second... where is unbound chrooted to? If it is chrooted > > > to /var/unbound would it not then look for /var/unbound/var/unbound/unbou > nd.c > > > onf? > > > > > > I got a feeling something is not well thought out here... > > > > Probably and it needs someone to investigate and possibly fix. I can put > > this on my todo list. > > I've read a few of the linux how to's on running unbound chrooted and > it leads me to belive that /etc/unbound/unbound.conf is the correct > value of the path to the config file. > > I'll also spend some ENOTIME idle cycles looking closer at what has > happened here. My gut says that if unbound is running chroot to > /var/unbound then the config file should live in > /var/unbound/etc/unbound/unbound.conf If you have more ENOTIME than I do, the help would be appreciated. Otherwise I'll just add it to my multitasking list. > > This would mimic what I am seeing done with /var/lib/unbound on > linux systems. This also mimics how one would run named chrooted. > > Then the symlink at /etc would need to be updated to point to > /etc/unbound -> ../var/unbound/etc/unbound -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0