Patrick M. Hausen <hausen_at_punkt.de> wrote on
Date: Thu, 16 Oct 2025 17:04:37 UTC :

(First I quote some missing context for reference:)

QUOTE
> Am 16.10.2025 um 14:02 schrieb Kurt Jaeger <[email protected]>:
> 
> I did this:
> 
> cd /usr/local/etc/pkg/repos
> vi FreeBSD-base.conf
> -----------
> FreeBSD-base: {
>  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_0";,
>  mirror_type: "srv",
>  signature_type: "fingerprints",
>  fingerprints: "/usr/share/keys/pkg",
>  enabled: yes
> }
> -----------
END QUOTE

> Hi,
> 
> > Am 16.10.2025 um 18:58 schrieb Harry Schmalzbauer <[email protected]>:
> > Overriding base FreeBSD-base repository config with a config file located 
> > in LOCALPREFIX:-/usr/local is comprehensible and the way users are supposed 
> > to do according to the notes in /etc/pkg/FreeBSD.conf.
> 
> Overriding - granted. I have been doing the same for years.
> 
> But on a fresh FreeBSD 15 pkgbase system the repos for
> FreeBSD-ports and FreeBSD-ports-kmods are configured in
> /etc/pkg and the repo for FreeBSD-base itself in /usr/local/etc/pkg/repos.
> 
> Or to put it differently:
> 
> Why does /etc/pkg/FreeBSD.conf *not* contain the repo for packaged base?
> 
> I think that's odd.

To my knowledge, /etc/pkg/ only has files that are expected to
apply to all systems, no matter how installed/updated. Also,
the files in /etc/pkg/ are expected to not be edited. The
overriding text goes in files in /usr/local/etc/pkg/respos/
instead. (Technically such are conventions, not requirements,
but they fit with FreeBSD update processes in a particular way.)

It is only appropriate to have FreeBSD-base defined in an enabled
state if one is using pkgbase instead of freebsd-update or source
based: otherwise pkg might do inappropriate things with the base
packages. pkgbase is not the default (yet) and also is not the
only option (ever).

It could be viewed as odder to have a /etc/pkg/ file with a
definition that was disabled:

FreeBSD-base: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_0";,
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: no
}

and then, for pkgbase systems, a manually created/adjusted file
in /usr/local/etc/pkg/respos/ that has the:

FreeBSD-base: { enabled: yes }

Even when disabled, if defined FreeBSD-base could potentially
be referenced on the pkg command line with -rFreeBSD-base
specifying the repository to use and some commands. For
example "man pkg-install" reports:

     -r reponame, --repository reponame
                Install packages from only the named repository, irrespective
                of the configured “enabled” status from repo.conf.

But, absent a definition, that notation could not find base
packages, avoiding a form of potential foot-shooting.

Note: My memory is that some documented "irrespective" notes
for -r reponame do not all match the actual behavior for the
command that makes the claim.

===
Mark Millard
marklmi at yahoo.com


Reply via email to