Pkgbase and buildworld

Hi
I recently made a clean install of FreeBSD 15.0-BETA1, I selected the option with Pkgbase.
My concern now : Is it necessary to go through the whole procedure of buildworld ... buildkernel ... etc...
This is not clear to me
Regards
 
Greetings.

You don't need to worry about building FreeBSD from source when using PKGBASE. All system components and kernel are maintained by a package management tool (ports-mgmt/pkg), using pre-built packages, fetched from official FreeBSD remote package repositories.

What pkgbase is and how to maintain it is explained in the freebsd-base(7) manual.

The FreeBSD PkgBase wiki has additional information on the subject.
 
There are three ways to update your FreeBSD installation, the first, and original way, is to build(7) from source. The second way (added around version 6.2) is freebsd-update(8). The third, and latest addition, is pkgbase. You use one of the three methods.
 
want to have a customized kernel
Why would you need a customized kernel in the first place? There's rarely a reason for it nowadays. If you need some highly customized install (for an embedded system for example), you can create your own pkgbase packages. But that's an entirely different approach and probably not relevant for the OP.
 
what if I want to use a hybrid approach:

(1) use pkgbase for most of the system for its convenience
(2) want to have a customized kernel
PkgBase offers besides individual packages, so called "package sets" (meta-packages, see freebsd-base(7) manual for details on PACKAGE SETS). One of them is FreeBSD-set-base. With that base meta package, you can install/maintain the base system with packages only, and build the kernel from source. .

If the installed system is not 15* (i.e. 14.3-RELEASE), you can still inspect what packages from pkgbase 15 are available:

/usr/local/etc/pkg/repos/FreeBSD-base15.conf
Code:
FreeBSD-base15: {
  url: "pkg+https://pkg.FreeBSD.org/FreeBSD:15:amd64/base_latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

Code:
# env ABI=FreeBSD:15:amd64  OSVERSION=1500000 pkg update -r FreeBSD-base15

Note the FreeBSD-set-base at the top of the list:
Rich (BB code):
# pkg search -r FreeBSD-base15 -g '*'  | grep metapackage
FreeBSD-set-base-15.snap20251011015136 Base system (metapackage)
FreeBSD-set-base-dbg-15.snap20251011015136 Base system debug symbols (metapackage)
FreeBSD-set-base-jail-15.snap20251011015136 Base system for jails (metapackage)
FreeBSD-set-base-jail-dbg-15.snap20251011015136 Base jail system debug symbols (metapackage)
FreeBSD-set-devel-15.snap20251015130244 Development tools (metapackage)
FreeBSD-set-devel-dbg-15.snap20251011015136 Development tools debugging symbols (metapackage)
FreeBSD-set-kernels-15.snap20251011015136 Base system kernels (metapackage)
FreeBSD-set-kernels-dbg-15.snap20251011015136 Base system kernels debugging symbols (metapackage)
FreeBSD-set-lib32-15.snap20251015130244 32-bit compatibility libraries (metapackage)
FreeBSD-set-lib32-dbg-15.snap20251015130244 32-bit compatibility library debugging symbols (metapackage)
FreeBSD-set-minimal-15.snap20251015130244 Basic multi-user system (metapackage)
FreeBSD-set-minimal-dbg-15.snap20251011015136 Basic multi-user system debugging symbols (metapackage)
FreeBSD-set-minimal-jail-15.snap20251015130244 Basic multi-user jail system (metapackage)
FreeBSD-set-minimal-jail-dbg-15.snap20251011015136 Basic multi-user jail debugging symbols (metapackage)
FreeBSD-set-optional-15.snap20251015130244 Optional base system software (metapackage)
FreeBSD-set-optional-dbg-15.snap20251015130244 Optional software debug symbols (metapackage)
FreeBSD-set-optional-jail-15.snap20251015130244 Optional base system software for jails (metapackage)
FreeBSD-set-optional-jail-dbg-15.snap20251015130244 Optional software debug symbols for jails (metapackage)


The same ( binary update base only, build kernel from source) can be done with freebsd-update(8) through freebsd-update.conf(8):

/etc/freebsd-update.conf
Code:
# Components of the base system which should be kept updated.
Components src world kernel
Remove "kernel" to exclude binary kernel updates.
 
Edit: in addition to T-Daemon's previous post, overlooked that one!

In 15.0-BETA2 etc. you can also take advantage of package sets to select and modify the number of base packages, likely easier than creating a selection on the source level before building.

Currently on my 15.0 BETA2, I have:
Code:
%  pkg query -x '[%R] %n %#d' '^FreeBSD-set-' | sed '1 {x;s/^/Repository Set Packages/;G;n;}' | column -t | nl -bp'^\['
        Repository      Set                            Packages
     1  [FreeBSD-base]  FreeBSD-set-base               3
     2  [FreeBSD-base]  FreeBSD-set-base-dbg           2
     3  [FreeBSD-base]  FreeBSD-set-base-jail          3
     4  [FreeBSD-base]  FreeBSD-set-base-jail-dbg      2
     5  [FreeBSD-base]  FreeBSD-set-devel              67
     6  [FreeBSD-base]  FreeBSD-set-devel-dbg          8
     7  [FreeBSD-base]  FreeBSD-set-kernels            3
     8  [FreeBSD-base]  FreeBSD-set-kernels-dbg        3
     9  [FreeBSD-base]  FreeBSD-set-lib32              98
    10  [FreeBSD-base]  FreeBSD-set-lib32-dbg          48
    11  [FreeBSD-base]  FreeBSD-set-minimal            42
    12  [FreeBSD-base]  FreeBSD-set-minimal-dbg        26
    13  [FreeBSD-base]  FreeBSD-set-minimal-jail       23
    14  [FreeBSD-base]  FreeBSD-set-minimal-jail-dbg   16
    15  [FreeBSD-base]  FreeBSD-set-optional           92
    16  [FreeBSD-base]  FreeBSD-set-optional-dbg       81
    17  [FreeBSD-base]  FreeBSD-set-optional-jail      72
    18  [FreeBSD-base]  FreeBSD-set-optional-jail-dbg  64
    19  [FreeBSD-base]  FreeBSD-set-src                2
    20  [FreeBSD-base]  FreeBSD-set-tests              2
As BETAx and its successor(s) RCy (Release Candidates) are on the 15 pre-release cylce; package sets and their constituents may undergo changes in the run up to the official 15.0-RELEASE version.

Note: as it stands, package sets will not be backported to 14-STABLE, 14.3-RELEASE etc.; see this forum message.
 
Back
Top