Re: /etc/pkg/FreeBSD.conf and /usr/local/etc/pkg/FreeBSD.conf (not repo names)

From: Graham Perrin <grahamperrin_at_gmail.com>
Date: Sat, 23 Aug 2025 10:40:27 UTC
On 23/08/2025 10:28, Tomoaki AOKI wrote:
> … /etc/pkg is described as "default configuration for the package
> manager, pkg(8)".


Indeed, and pkg(8) is _not_ base, so what's described is not consistent 
with /etc/ for base system software configuration files.

<https://man.freebsd.org/cgi/man.cgi?query=intro&sektion=5&manpath=freebsd-current#FILES>

A single repo e.g. FreeBSD-ports in /etc/pkg/FreeBSD.conf is used by pkg 
(7, not 8) for bootstrap.

Then:

- /etc/pkg.conf does not exist

- /usr/local/etc/pkg.conf is explicitly the system-wide configuration 
file for pkg(8).

So, I might expect /usr/local/etc/pkg/repos/FreeBSD.conf to be the 
system-wide FreeBSD repository configuration file for pkg(8).

<https://man.freebsd.org/cgi/man.cgi?query=pkg.conf&sektion=5&manpath=freebsd-ports#OPTIONS> 
REPOS_DIR does have the default list of two directories to search.

When I first saw pkgbasify write a FreeBSD-base configuration to 
/usr/local/etc/pkg/repos/ I thought that the path was, somehow, unexpected.

After looking at intro(5) and hier(7), /usr/local/etc/pkg/repos/ seems 
proper (a change of mind).

<https://reviews.freebsd.org/D51594> for pkgbasify in base – without 
pkg(8) in base – will probably change my mind, again.