Solved Default FreeBSD.conf

What should the default /etc/pkg/FreeBSD.conf be? What should the default /usr/local/etc/pkg/repos/FreeBSD.conf be? I recently updated to 15.0 and have converted to pkgbase.

I see in cgit that there are three types of FreeBSD.conf: latest, quarterly, and quarterly-release. One of those must be the default file that is used on a clean install.

After many, many years of using FreeBSD, and with a brain that still thinks in terms of cvsup and make buildworld, my FreeBSD.conf files have accumulated cruft. Somewhere along the way I stopped compiling and have been using pkgs. I ought to make a break with my own historical nonsense. Now that the base system is updated using pkgbase, I'd like to get on board with the state of the art and use pkgs only with minimal compiling if any.

Help me get squared away.
 
I am on FreeBSD 14.3-RELEASE and in /usr/local/etc/pkg/repos/FreeBSD.conf I have:
Code:
FreeBSD: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest_${VERSION_MINOR}",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
 
  • Thanks
Reactions: jcw
What should the default /usr/local/etc/pkg/repos/FreeBSD.conf be?
It doesn't exist by default. You are meant to create it and use it to change the URL in order to switch between 'latest' or 'quarterly' package repositories for example.

I see in cgit that there are three types of FreeBSD.conf: latest, quarterly, and quarterly-release. One of those must be the default file that is used on a clean install.
-RELEASE versions always default to quarterly package repositories, -STABLE and -CURRENT both default to the latest repositories.

For pkgbase, there's no difference, it always refers to a repository with its specific version. There's no 'latest' or 'quarterly' release cycle with regards to the base OS version.
 
  • Thanks
Reactions: jcw
Normally, if you "pkgbasified" your system at some point, inside /usr/local/etc/pkg/repos/FreeBSD.conf, you will just have:
Code:
FreeBSD-base: { enabled: yes }

By default, for a RELEASE version, starting to 15.0, you will have this in /etc/pkg/FreeBSD.conf:
Code:
FreeBSD-ports: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-ports-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_quarterly_${VERSION_MINOR}",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-base: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",
  enabled: no
}

As you can see, FreeBSD-base is disabled here, but enabled in the end (by pkgbasify) with /usr/local/etc/pkg/repos/FreeBSD.conf.

You are on quarterly repos concerning FreeBSD-ports and FreeBSD-ports-kmods. If you want to use the latest repos, just add a .conf file in /usr/local/etc/pkg/repos/ like whatever.conf:
Code:
FreeBSD-ports: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
FreeBSD-ports-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_latest_${VERSION_MINOR}"
}

You can check what you get with pkg repos.

The simple idea (and good practice) is to never modify a setting file that belongs to the base system, I mean in /etc/.
 
Back
Top