|
NAME
DESCRIPTIONThe FreeBSD base system may be installed as a set of pkg(8) packages, which supersedes the traditional method of installing using tar(1) archives. All base packages have names beginning with the string “FreeBSD-”, and have an origin beginning with “base/”. In the default system configuration, the repository containing these packages is called “FreeBSD-base”, but any name may be used. The repository name can be used with pkg(8) to restrict package operations to the base system packages. Packages for all supported FreeBSD releases as well as active “STABLE” and “CURRENT” branches are hosted on the Internet at https://pkg.freebsd.org. These packages are updated when new errata or security updates are released (for supported release versions), or twice daily for development branches. Alternatively, packages may be built from the system source tree according to the instructions in build(7), allowing the system to be updated from source code using packages. PACKAGE ORGANISATIONTo allow customisation of the installed system, each package is split into several subpackages which contain different components of the package. For the package FreeBSD-foo, the following subpackages may be available:
The exact set of available subpackages differs for each individual package. For example, some packages may not provide any development files, in which case the -dev subpackage is not present. PACKAGE SETSPackage sets are meta-packages which do not contain any files themselves, but depend on a selection of other packages, such that each package set allows the complete set of packages for a supported workload to be installed. Package sets are provided as packages named FreeBSD-set-<name>. The following package sets are available in the base system:
EXAMPLESInstall a single piece of userlandInstall the vi(1) text editor on the running system: pkg install FreeBSD-vi Install userland to a jailInstall a new jail(8) system using the minimal-jail package set: pkg -r /jails/myjail install FreeBSD-set-minimal-jail Install native compilersInstall C/C++ compilers on the running system: pkg install FreeBSD-set-devel Update the currently running systemApply available updates to the running system: pkg upgrade -r FreeBSD-base Install cross compilersInstall the development toolchain for FreeBSD/powerpc64le in an alternate root (for example, to support cross-compiling software for a different target than the host system): pkg -r /ppcdev -oABI=FreeBSD:16:powerpc64le \
install FreeBSD-set-devel
Adding a locally built repository for snapshotsDisable the predefined repository, and add a local repo for locally built base system packages: cat << EOF > /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD-base: { enabled: no }
FreeBSD-local: {
url: "file:///usr/obj/usr/src/repo/${ABI}/latest",
enabled: yes
}
EOF
The packages are created by the build(7) system at ${REPODIR}/${PKG_ABI}/<VERSION>, which defaults to the example directory. Note: The repo must have a different name than the predefined repository. Unregister a currently running systemSystems managed through pkg(8) can be unregistered from the package manager — for example to upgrade in-place via “make installworld”. See build(7). To unregister the base system from the package manager: pkg unregister -fg 'FreeBSD-\*' Then, disable the base system package repository. If a configuration file was created in /usr/local/etc/pkg/repos/ to enable base system packages, remove it: rm /usr/local/etc/pkg/repos/FreeBSD-base.conf Alternatively, if it is desired to keep it, edit the file and
change “ Warning: This is a destructive action which will prevent updating the base system via pkg(8). HISTORYSupport for installing the base system as packages was introduced in FreeBSD 15.0. Earlier releases supported a subset of this functionality. Support for unregistering an existing installation appeared in pkg 2.5. CAVEATSUpgrading from a RELEASE to a STABLE or CURRENT branch requires
“
|