# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2026-08-16 15:11-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: Yaml Front Matter Hash Value: description #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1 #, no-wrap msgid "Information about how to keep a FreeBSD system up-to-date with freebsd-update or Git, how to rebuild and reinstall the entire base system, etc" msgstr "" #. type: Yaml Front Matter Hash Value: part #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1 #, no-wrap msgid "Part III. System Administration" msgstr "" #. type: Yaml Front Matter Hash Value: title #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1 #, no-wrap msgid "Chapter 27. Updating and Upgrading FreeBSD" msgstr "" #. type: Title = #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:15 #, no-wrap msgid "Updating and Upgrading FreeBSD" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:52 #, no-wrap msgid "Synopsis" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:59 msgid "" "FreeBSD is under constant development between releases. Some people prefer " "to use the officially released versions, while others prefer to keep in sync " "with the latest developments. However, even official releases are often " "updated with security and other critical fixes. Regardless of the version " "used, FreeBSD provides all the necessary tools to keep the system updated, " "and allows for easy upgrades between versions. This chapter describes how " "to track the development system and the basic tools for keeping a FreeBSD " "system up-to-date." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:61 msgid "Read this chapter to learn:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:63 msgid "How to keep a FreeBSD system up-to-date with freebsd-update or Git." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:64 msgid "" "How to compare the state of an installed system against a known pristine " "copy." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:65 msgid "" "How to keep the installed documentation up-to-date with Git or documentation " "ports." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:66 msgid "" "The difference between the two development branches: FreeBSD-STABLE and " "FreeBSD-CURRENT." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:67 msgid "How to rebuild and reinstall the entire base system." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:69 msgid "Before reading this chapter:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:71 msgid "" "Properly set up the network connection (crossref:advanced-" "networking[advanced-networking,Advanced Networking])." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:72 msgid "" "Know how to install additional third-party software " "(crossref:ports[ports,Installing Applications: Packages and Ports])." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:77 msgid "" "Throughout this chapter, `git` is used to obtain and update FreeBSD " "sources. Optionally, the package:devel/git[] port or package may be used." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:80 #, no-wrap msgid "Introduction" msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:82 #, no-wrap msgid "Major and Minor Versions" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:86 msgid "" "Since FreeBSD 6.0-RELEASE, FreeBSD releases have adhered strictly to a two-" "level numbering scheme. We use the term “major version” to describe the " "first part of the version number, e.g. the “14” in “14.3-RELEASE”, and the " "term “minor version” to describe the second part of the version number, e.g. " "the “3” in “14.3-RELEASE”." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:88 msgid "" "Additionally, FreeBSD release branches have a patch level, which is omitted " "when zero and incremented with every batch of security advisories and errata " "notices, e.g. “14.3-RELEASE-p7” for the seventh batch of patches published " "for FreeBSD 14.3." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:91 msgid "" "As a consequence of the https://www.FreeBSD.org/security/#model[FreeBSD " "support model], FreeBSD version numbers increase monotonically within the " "same major version, but not across different major versions. For instance, " "FreeBSD 14.2-RELEASE, 13.5-RELEASE, 14.3-RELEASE, 15.0-RELEASE, 14.4-" "RELEASE, and 15.1-RELEASE were released in that order." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:92 #, no-wrap msgid "Updating vs. Upgrading" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:95 msgid "" "We use the term “updating” to describe applying security or errata patches " "which may increment the patch level but do not increment the version number, " "and the term “upgrading” to describe replacing the entire base system with " "one with a different version number." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:96 #, no-wrap msgid "Upgrade Paths" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:100 msgid "" "Once installed, FreeBSD may be updated or upgraded using crossref:cutting-" "edge[updating-upgrading-freebsdupdate,binary patches], crossref:cutting-" "edge[pkgbase,packages], or crossref:cutting-edge[makeworld,from source]. In " "all cases FreeBSD only supports updating or upgrading from a chronologically " "older version to a more recent one." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:103 msgid "" "Specifically, FreeBSD supports updating to a more recent patch level of the " "same version, or upgrading from a given version to either a more recent " "minor version of the same major version (e.g. from 14.3 to 14.4) or to a " "more recent version of the next major version (e.g. from 14.3 to 15.0 or " "15.1). Moving to an older release of the same major version (e.g. from 14.4 " "to 14.3), to an older release of the next major version (e.g. from 14.4, " "released in March 2026, to 15.0, released three months earlier in December " "2025), or skipping a major version (e.g. from 13.5 to 15.1) is neither " "recommended nor supported, even if the tools allow it." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:105 #, no-wrap msgid "FreeBSD Update" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:109 msgid "" "Applying security patches in a timely manner and upgrading to a newer " "release of an operating system are important aspects of ongoing system " "administration. FreeBSD includes a utility called `freebsd-update` which " "can be used to perform both these tasks." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:113 msgid "" "This utility supports binary security and errata updates to FreeBSD, without " "the need to manually compile and install the patch or a new kernel. Binary " "updates are available for all architectures and releases currently supported " "by the security team. The list of supported releases and their estimated " "end-of-life dates are listed at https://www.FreeBSD.org/security/[https://" "www.FreeBSD.org/security/]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:117 msgid "" "This utility also supports operating system upgrades to minor point releases " "as well as upgrades to another release branch. Before upgrading to a new " "release, review its release announcement as it contains important " "information pertinent to the release. Release announcements are available " "from https://www.FreeBSD.org/releases/[https://www.FreeBSD.org/releases/]." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:121 msgid "" "If a man:crontab[5] utilizing the features of man:freebsd-update[8] exists, " "it must be disabled before upgrading the operating system." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:124 msgid "" "This section describes the configuration file used by `freebsd-update`, " "demonstrates how to apply a security patch and how to upgrade to a minor or " "major operating system release, and discusses some of the considerations " "when upgrading the operating system." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:126 #, no-wrap msgid "The Configuration File" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:131 msgid "" "The default configuration file for `freebsd-update` works as-is. Some users " "may wish to tweak the default configuration in [.filename]#/etc/freebsd-" "update.conf#, allowing better control of the process. The comments in this " "file explain the available options, but the following may require a bit more " "explanation:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:136 #, no-wrap msgid "" "# Components of the base system which should be kept updated.\n" "Components world kernel\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:143 msgid "" "This parameter controls which parts of FreeBSD will be kept up-to-date. The " "default is to update the entire base system and the kernel. Individual " "components can instead be specified, such as `src/base` or `src/sys`. " "However, the best option is to leave this at the default as changing it to " "include specific items requires every needed item to be listed. Over time, " "this could have disastrous consequences as source code and binaries may " "become out of sync." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:149 #, no-wrap msgid "" "# Paths which start with anything matching an entry in an IgnorePaths\n" "# statement will be ignored.\n" "IgnorePaths /boot/kernel/linker.hints\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:153 msgid "" "To leave specified directories, such as [.filename]#/bin# or [.filename]#/" "sbin#, untouched during the update process, add their paths to this " "statement. This option may be used to prevent `freebsd-update` from " "overwriting local modifications." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:160 #, no-wrap msgid "" "# Paths which start with anything matching an entry in an UpdateIfUnmodified\n" "# statement will only be updated if the contents of the file have not been\n" "# modified by the user (unless changes are merged; see below).\n" "UpdateIfUnmodified /etc/ /var/ /root/ /.cshrc /.profile\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:165 msgid "" "This option will only update unmodified configuration files in the specified " "directories. Any changes made by the user will prevent the automatic " "updating of these files. There is another option, `KeepModifiedMetadata`, " "which will instruct `freebsd-update` to save the changes during the merge." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:171 #, no-wrap msgid "" "# When upgrading to a new FreeBSD release, files which match MergeChanges\n" "# will have any local changes merged into the version from the new release.\n" "MergeChanges /etc/ /var/named/etc/ /boot/device.hints\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:177 msgid "" "List of directories with configuration files that `freebsd-update` should " "attempt to merge. The file merge process is a series of man:diff[1] " "patches. Merges are either accepted, open an editor, or cause `freebsd-" "update` to abort. When in doubt, backup [.filename]#/etc# and just accept " "the merges." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:183 #, no-wrap msgid "" "# Directory in which to store downloaded updates and temporary\n" "# files used by FreeBSD Update.\n" "# WorkDir /var/db/freebsd-update\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:187 msgid "" "This directory is where all patches and temporary files are placed. In " "cases where the user is doing a version upgrade, this location should have " "at least a gigabyte of disk space available." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:195 #, no-wrap msgid "" "# When upgrading between releases, should the list of Components be\n" "# read strictly (StrictComponents yes) or merely as a list of components\n" "# which *might* be installed of which FreeBSD Update should figure out\n" "# which actually are installed and upgrade those (StrictComponents no)?\n" "# StrictComponents no\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:199 msgid "" "When this option is set to `yes`, `freebsd-update` will assume that the " "`Components` list is complete and will not attempt to make changes outside " "of the list. Effectively, `freebsd-update` will attempt to update every " "file which belongs to the `Components` list." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:201 msgid "Refer to man:freebsd-update.conf[5] for more details." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:203 #, no-wrap msgid "Applying Security Patches" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:207 msgid "" "The process of applying FreeBSD security patches has been simplified, " "allowing an administrator to keep a system fully patched using `freebsd-" "update`. More information about FreeBSD security advisories can be found in " "crossref:security[security-advisories,\"FreeBSD Security Advisories\"]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:211 msgid "" "FreeBSD security patches may be downloaded and installed using the following " "commands. The first command will determine if any outstanding patches are " "available, and if so, will list the files that will be modified if the " "patches are applied. The second command will apply the patches." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:216 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:306 #, no-wrap msgid "" "# freebsd-update fetch\n" "# freebsd-update install\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:220 msgid "" "If the update applies any kernel patches, the system will need a reboot in " "order to boot into the patched kernel. If the patch was applied to any " "running binaries, the affected applications should be restarted so that the " "patched version of the binary is used." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:226 msgid "" "Usually, the user needs to be prepared to reboot the system. To know if the " "system requires a reboot due to a kernel update, execute the commands " "`freebsd-version -k` and `uname -r`. Reboot the system if the outputs " "differ." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:229 msgid "" "The system can be configured to automatically check for updates once every " "day by adding this entry to [.filename]#/etc/crontab#:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:233 #, no-wrap msgid "@daily root freebsd-update cron\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:237 msgid "" "If patches exist, they will automatically be downloaded but will not be " "applied. The `root` user will be sent an email so that the patches may be " "reviewed and manually installed with `freebsd-update install`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:239 msgid "" "If anything goes wrong, `freebsd-update` has the ability to roll back the " "last set of changes with the following command:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:244 #, no-wrap msgid "" "# freebsd-update rollback\n" "Uninstalling updates... done.\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:247 msgid "" "Again, the system should be restarted if the kernel or any kernel modules " "were modified and any affected binaries should be restarted." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:252 msgid "" "Only the [.filename]#GENERIC# kernel can be automatically updated by " "`freebsd-update`. If a custom kernel is installed, it will have to be " "rebuilt and reinstalled after `freebsd-update` finishes installing the " "updates. The default kernel name is _GENERIC_. The man:uname[1] command " "may be used to verify its installation." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:258 msgid "" "Always keep a copy of the [.filename]#GENERIC# kernel in [.filename]#/boot/" "GENERIC#. It will be helpful in diagnosing a variety of problems and in " "performing version upgrades. Refer to crossref:cutting-edge[freebsd-update-" "custom-kernel-9x, Custom Kernels with FreeBSD 9.X and Later] for " "instructions on how to get a copy of the [.filename]#GENERIC# kernel." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:263 msgid "" "Unless the default configuration in [.filename]#/etc/freebsd-update.conf# " "has been changed, `freebsd-update` will install the updated kernel sources " "along with the rest of the updates. Rebuilding and reinstalling a new " "custom kernel can then be performed in the usual way." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:270 msgid "" "The updates distributed by `freebsd-update` do not always involve the " "kernel. It is not necessary to rebuild a custom kernel if the kernel " "sources have not been modified by `freebsd-update install`. However, " "`freebsd-update` will always update [.filename]#/usr/src/sys/conf/" "newvers.sh#. The current patch level, as indicated by the `-p` number " "reported by `uname -r`, is obtained from this file. Rebuilding a custom " "kernel, even if nothing else changed, allows `uname` to accurately report " "the current patch level of the system. This is particularly helpful when " "maintaining multiple systems, as it allows for a quick assessment of the " "updates installed in each one." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:272 #, no-wrap msgid "Performing Minor and Major Version Upgrades" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:275 msgid "" "Upgrading to a newer minor or major version can be performed by providing " "`freebsd-update` with a release version target." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:281 msgid "" "After each new `RELEASE`, FreeBSD package build servers will, for a limited " "period, *not* use the newer version of the operating system. This provides " "continuity for the many users who do not upgrade immediately after a release " "announcement. For example:" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:283 msgid "" "packages for users of 13.1 and 13.2 will be built on a server running 13.1, " "until 13.1 reaches end of life" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:285 msgid "and, critically:" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:287 msgid "a kernel module that is built on 13.1 might *not* be suitable for 13.2." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:289 msgid "" "So, with any minor or major OS upgrade, if the package requirements include " "any kernel module:" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:291 msgid "*be prepared to build the module from source*." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:298 msgid "" "If the system is running a custom kernel, make sure that a copy of the " "[.filename]#GENERIC# kernel exists in [.filename]#/boot/GENERIC# before " "starting the upgrade. Refer to crossref:cutting-edge[freebsd-update-custom-" "kernel-9x, Custom Kernels with FreeBSD 9.X and Later] for instructions on " "how to get a copy of the [.filename]#GENERIC# kernel." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:301 msgid "" "Before upgrading to a new version, ensure the existing FreeBSD installation " "is up to date with respect to security and errata patches:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:309 msgid "" "The following command, when run on a FreeBSD 13.1 system, will upgrade it to " "FreeBSD 13.2:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:313 #, no-wrap msgid "# freebsd-update -r 13.2-RELEASE upgrade\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:318 msgid "" "After the command has been received, `freebsd-update` will evaluate the " "configuration file and current system in an attempt to gather the " "information necessary to perform the upgrade. A screen listing will display " "which components have and have not been detected. For example:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:325 #, no-wrap msgid "" "Looking up update.FreeBSD.org mirrors... 1 mirrors found.\n" "Fetching metadata signature for 13.1-RELEASE from update1.FreeBSD.org... done.\n" "Fetching metadata index... done.\n" "Inspecting system... done.\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:331 #, no-wrap msgid "" "The following components of FreeBSD seem to be installed:\n" "kernel/smp src/base src/bin src/contrib src/crypto src/etc src/games\n" "src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue\n" "src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin\n" "world/base world/info world/lib32 world/manpages\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:335 #, no-wrap msgid "" "The following components of FreeBSD do not seem to be installed:\n" "kernel/generic world/catpages world/dict world/doc world/games\n" "world/proflibs\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:337 #, no-wrap msgid "Does this look reasonable (y/n)? y\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:341 msgid "" "At this point, `freebsd-update` will attempt to download all files required " "for the upgrade. In some cases, the user may be prompted with questions " "regarding what to install or how to proceed." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:343 msgid "" "When using a custom kernel, the above step will produce a warning similar to " "the following:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:350 #, no-wrap msgid "" "WARNING: This system is running a \"MYKERNEL\" kernel, which is not a\n" "kernel configuration distributed as part of FreeBSD 13.1-RELEASE.\n" "This kernel will not be updated: you MUST update the kernel manually\n" "before running \"/usr/sbin/freebsd-update install\"\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:354 msgid "" "This warning may be safely ignored at this point. The updated " "[.filename]#GENERIC# kernel will be used as an intermediate step in the " "upgrade process." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:363 msgid "" "Once all the patches have been downloaded to the local system, they will be " "applied. This process may take a while, depending on the speed and workload " "of the machine. Configuration files will then be merged. The merging " "process requires some user intervention as a file may be merged or an editor " "may appear on screen for a manual merge. The results of every successful " "merge will be shown to the user as the process continues. A failed or " "ignored merge will cause the process to abort. Users may wish to make a " "backup of [.filename]#/etc# and manually merge important files, such as " "[.filename]#master.passwd# or [.filename]#group# at a later time." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:370 msgid "" "The system is not being altered yet as all patching and merging is happening " "in another directory. Once all patches have been applied successfully, all " "configuration files have been merged and it seems the process will go " "smoothly, the changes can be committed to disk by the user using the " "following command:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:374 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:410 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:487 #, no-wrap msgid "# freebsd-update install\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:381 msgid "" "The kernel and kernel modules will be patched first. If the system is " "running with a custom kernel, use man:nextboot[8] to set the kernel for the " "next boot to the updated [.filename]#/boot/GENERIC#:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:385 #, no-wrap msgid "# nextboot -k GENERIC\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:394 msgid "" "Before rebooting with the [.filename]#GENERIC# kernel, make sure it contains " "all the drivers required for the system to boot properly and connect to the " "network, if the machine being updated is accessed remotely. In particular, " "if the running custom kernel contains built-in functionality usually " "provided by kernel modules, make sure to temporarily load these modules into " "the [.filename]#GENERIC# kernel using the [.filename]#/boot/loader.conf# " "facility. It is recommended to disable non-essential services as well as " "any disk and network mounts until the upgrade process is complete." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:397 msgid "The machine should now be restarted with the updated kernel:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:401 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1104 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1251 #, no-wrap msgid "# shutdown -r now\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:406 msgid "" "Once the system has come back online, restart `freebsd-update` using the " "following command. Since the state of the process has been saved, `freebsd-" "update` will not start from the beginning, but will instead move on to the " "next phase and remove all old shared libraries and object files." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:415 msgid "" "Depending upon whether any library version numbers were bumped, there may " "only be two install phases instead of three." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:420 msgid "" "The upgrade is now complete. If this was a major version upgrade, reinstall " "all ports and packages as described in crossref:cutting-edge[freebsdupdate-" "portsrebuild, Upgrading Packages After a Major Version Upgrade]." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:422 #, no-wrap msgid "Custom Kernels with FreeBSD 9.X and Later" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:427 msgid "" "Before using `freebsd-update`, ensure that a copy of the " "[.filename]#GENERIC# kernel exists in [.filename]#/boot/GENERIC#. If a " "custom kernel has only been built once, the kernel in [.filename]#/boot/" "kernel.old# is the `GENERIC` kernel. Simply rename this directory to " "[.filename]#/boot/GENERIC#." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:431 msgid "" "If a custom kernel has been built more than once or if it is unknown how " "many times the custom kernel has been built, obtain a copy of the `GENERIC` " "kernel that matches the current version of the operating system. If " "physical access to the system is available, a copy of the `GENERIC` kernel " "can be installed from the installation media:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:437 #, no-wrap msgid "" "# mount /media\n" "# cd /media/usr/freebsd-dist\n" "# tar -C/ -xvf kernel.txz boot/kernel/kernel\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:440 msgid "" "Alternately, the `GENERIC` kernel may be rebuilt and installed from source:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:445 #, no-wrap msgid "" "# cd /usr/src\n" "# make kernel __MAKE_CONF=/dev/null SRCCONF=/dev/null\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:450 msgid "" "For this kernel to be identified as the `GENERIC` kernel by `freebsd-" "update`, the [.filename]#GENERIC# configuration file must not have been " "modified in any way. It is also suggested that the kernel is built without " "any other special options." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:452 msgid "" "Rebooting into the [.filename]#GENERIC# kernel is not required as `freebsd-" "update` only needs [.filename]#/boot/GENERIC# to exist." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:454 #, no-wrap msgid "Upgrading Packages After a Major Version Upgrade" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:461 msgid "" "Generally, installed applications will continue to work without problems " "after minor version upgrades. Major versions use different Application " "Binary Interfaces (ABIs), which will break most third-party applications. " "After a major version upgrade, all installed packages and ports need to be " "upgraded. Packages can be upgraded using `pkg upgrade`. To upgrade " "installed ports, use a utility such as package:ports-mgmt/portmaster[]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:465 msgid "" "A forced upgrade of all installed packages will replace the packages with " "fresh versions from the repository even if the version number has not " "increased. This is required because of the ABI version change when " "upgrading between major versions of FreeBSD. The forced upgrade can be " "accomplished by performing:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:469 #, no-wrap msgid "# pkg-static upgrade -f\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:472 msgid "" "A rebuild of all applications installed from the ports collection can be " "accomplished with this command:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:476 #, no-wrap msgid "# portmaster -af\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:480 msgid "" "This command will display the configuration screens for each application " "that has configurable options and wait for the user to interact with those " "screens. To prevent this behavior, and use only the default options, " "include `-G` in the above command." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:483 msgid "" "Once the software upgrades are complete, finish the upgrade process with a " "final call to `freebsd-update` in order to tie up all the loose ends in the " "upgrade process:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:491 msgid "" "If the [.filename]#GENERIC# kernel was temporarily used, this is the time to " "build and install a new custom kernel using the instructions in " "crossref:kernelconfig[kernelconfig,Configuring the FreeBSD Kernel]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:494 msgid "" "Reboot the machine into the new FreeBSD version. The upgrade process is now " "complete." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:496 #, no-wrap msgid "System State Comparison" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:500 msgid "" "The state of the installed FreeBSD version against a known good copy can be " "tested using `freebsd-update IDS`. This command evaluates the current " "version of system utilities, libraries, and configuration files and can be " "used as a built-in Intrusion Detection System (IDS)." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:508 msgid "" "This command is not a replacement for a real IDS such as package:security/" "snort[]. As `freebsd-update` stores data on disk, the possibility of " "tampering is evident. While this possibility may be reduced using " "`kern.securelevel` and by storing the `freebsd-update` data on a read-only " "file system when not in use, a better solution would be to compare the " "system against a secure disk, such as a DVD or securely stored external USB " "disk device. An alternative method for providing IDS functionality using a " "built-in utility is described in crossref:security[security-ids,\"Binary " "Verification\"]" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:511 msgid "" "To begin the comparison, specify the output file to save the results to:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:515 #, no-wrap msgid "# freebsd-update IDS >> outfile.ids\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:518 msgid "" "The system will now be inspected and a lengthy listing of files, along with " "the SHA256 hash values for both the known value in the release and the " "current installation, will be sent to the specified output file." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:521 msgid "" "The entries in the listing are extremely long, but the output format may be " "easily parsed. For instance, to obtain a list of all files which differ " "from those in the release, issue the following command:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:529 #, no-wrap msgid "" "# cat outfile.ids | awk '{ print $1 }' | more\n" "/etc/master.passwd\n" "/etc/motd\n" "/etc/passwd\n" "/etc/pf.conf\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:536 msgid "" "This sample output has been truncated as many more files exist. Some files " "have natural modifications. For example, [.filename]#/etc/passwd# will be " "modified if users have been added to the system. Kernel modules may differ " "as `freebsd-update` may have updated them. To exclude specific files or " "directories, add them to the `IDSIgnorePaths` option in [.filename]#/etc/" "freebsd-update.conf#." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:538 #, no-wrap msgid "Updating Bootcode" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:541 msgid "" "The following manuals describe the upgrade process of bootcode and boot " "loaders: man:gpart[8], man:gptboot[8], man:gptzfsboot[8], and " "man:loader.efi[8]." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:543 #, no-wrap msgid "Updating the Documentation Set" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:547 msgid "" "Documentation is an integral part of the FreeBSD operating system. While an " "up-to-date version of the FreeBSD documentation is always available on the " "FreeBSD web site (link:https://docs.FreeBSD.org[Documentation Portal]), it " "can be handy to have an up-to-date, local copy of the FreeBSD website, " "handbooks, FAQ, and articles." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:549 msgid "" "This section describes how to use either source or the FreeBSD Ports " "Collection to keep a local copy of the FreeBSD documentation up-to-date." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:552 msgid "" "For information on editing and submitting corrections to the documentation, " "refer to the FreeBSD Documentation Project Primer for New Contributors " "(extref:{fdp-primer}[FreeBSD Documentation Project Primer for New " "Contributors])." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:554 #, no-wrap msgid "Updating Documentation from Source" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:558 msgid "" "Rebuilding the FreeBSD documentation from source requires a collection of " "tools which are not part of the FreeBSD base system. The required tools can " "be installed following extref:{fdp-primer}overview[these steps, overview-" "quick-start] from the FreeBSD Documentation Project Primer." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:560 msgid "" "Once installed, use `git` to fetch a clean copy of the documentation source:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:564 #, no-wrap msgid "# git clone https://git.FreeBSD.org/doc.git /usr/doc\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:568 msgid "" "The initial download of the documentation sources may take a while. Let it " "run until it completes." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:570 msgid "Future updates of the documentation sources may be fetched by running:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:574 #, no-wrap msgid "# git pull\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:578 msgid "" "Once an up-to-date snapshot of the documentation sources has been fetched to " "[.filename]#/usr/doc#, everything is ready for an update of the installed " "documentation." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:580 msgid "A full update may be performed by typing:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:585 #, no-wrap msgid "" "# cd /usr/doc\n" "# make\n" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:588 #, no-wrap msgid "Tracking a Development Branch" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:591 msgid "" "FreeBSD has two development branches: FreeBSD-CURRENT and FreeBSD-STABLE." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:593 msgid "" "This section provides an explanation of each branch and its intended " "audience, as well as how to keep a system up-to-date with each respective " "branch." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:595 #, no-wrap msgid "Using FreeBSD-CURRENT" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:599 msgid "" "FreeBSD-CURRENT is the \"bleeding edge\" of FreeBSD development and FreeBSD-" "CURRENT users are expected to have a high degree of technical skill. Less " "technical users who wish to track a development branch should track FreeBSD-" "STABLE instead." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:603 msgid "" "FreeBSD-CURRENT is the very latest source code for FreeBSD and includes " "works in progress, experimental changes, and transitional mechanisms that " "might or might not be present in the next official release. While many " "FreeBSD developers compile the FreeBSD-CURRENT source code daily, there are " "short periods of time when the source may not be buildable. These problems " "are resolved as quickly as possible, but whether or not FreeBSD-CURRENT " "brings disaster or new functionality can be a matter of when the source code " "was synced." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:605 msgid "FreeBSD-CURRENT is made available for three primary interest groups:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:607 msgid "" "Members of the FreeBSD community who are actively working on some part of " "the source tree." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:608 msgid "" "Members of the FreeBSD community who are active testers. They are willing to " "spend time solving problems, making topical suggestions on changes and the " "general direction of FreeBSD, and submitting patches." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:609 msgid "" "Users who wish to keep an eye on things, use the current source for " "reference purposes, or make the occasional comment or code contribution." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:613 msgid "" "FreeBSD-CURRENT should _not_ be considered a fast-track to getting new " "features before the next release as pre-release features are not yet fully " "tested and most likely contain bugs. It is not a quick way of getting bug " "fixes as any given commit is just as likely to introduce new bugs as to fix " "existing ones. FreeBSD-CURRENT is not in any way \"officially supported\"." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:615 msgid "To track FreeBSD-CURRENT:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:617 msgid "" "Join the {freebsd-current} and the {dev-commits-src-main} lists. This is " "_essential_ in order to see the comments that people are making about the " "current state of the system and to receive important bulletins about the " "current state of FreeBSD-CURRENT." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:619 msgid "" "The {dev-commits-src-main} list records the commit log entry for each change " "as it is made, along with any pertinent information on possible side effects." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:622 msgid "" "To join these lists, go to {mailing-lists}, click on the list to subscribe " "to, and follow the instructions. In order to track changes to the whole " "source tree, not just the changes to FreeBSD-CURRENT, subscribe to the {dev-" "commits-src-all}." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:623 msgid "" "Synchronize with the FreeBSD-CURRENT sources. Typically, `git` is used to " "check out the -CURRENT code from the `main` branch of the FreeBSD Git " "repository (see crossref:mirrors[git,“Using Git”] for details)." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:624 msgid "" "Due to the size of the repository, some users choose to only synchronize the " "sections of source that interest them or which they are contributing patches " "to. However, users that plan to compile the operating system from source " "must download _all_ of FreeBSD-CURRENT, not just selected portions." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:628 msgid "" "Before compiling FreeBSD-CURRENT, read [.filename]#/usr/src/Makefile# very " "carefully and follow the instructions in crossref:cutting-edge[makeworld, " "Updating FreeBSD from Source]. Read the {freebsd-current} and [.filename]#/" "usr/src/UPDATING# to stay up-to-date on other bootstrapping procedures that " "sometimes become necessary on the road to the next release." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:629 msgid "" "Be active! FreeBSD-CURRENT users are encouraged to submit their suggestions " "for enhancements or bug fixes. Suggestions with accompanying code are always " "welcome." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:631 #, no-wrap msgid "Using FreeBSD-STABLE" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:638 msgid "" "FreeBSD-STABLE is the development branch from which major releases are " "made. Changes go into this branch at a slower pace and with the general " "assumption that they have first been tested in FreeBSD-CURRENT. This is " "_still_ a development branch and, at any given time, the sources for FreeBSD-" "STABLE may or may not be suitable for general use. It is simply another " "engineering development track, not a resource for end-users. Users who do " "not have the resources to perform testing should instead run the most recent " "release of FreeBSD." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:640 msgid "" "Those interested in tracking or contributing to the FreeBSD development " "process, especially as it relates to the next release of FreeBSD, should " "consider following FreeBSD-STABLE." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:645 msgid "" "While the FreeBSD-STABLE branch should compile and run at all times, this " "cannot be guaranteed. Since more people run FreeBSD-STABLE than FreeBSD-" "CURRENT, it is inevitable that bugs and corner cases will sometimes be found " "in FreeBSD-STABLE that were not apparent in FreeBSD-CURRENT. For this " "reason, one should not blindly track FreeBSD-STABLE. It is particularly " "important _not_ to update any production servers to FreeBSD-STABLE without " "thoroughly testing the code in a development or testing environment." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:647 msgid "To track FreeBSD-STABLE:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:649 msgid "" "Join the {freebsd-stable} in order to stay informed of build dependencies " "that may appear in FreeBSD-STABLE or any other issues requiring special " "attention. Developers will also make announcements in this mailing list when " "they are contemplating some controversial fix or update, giving the users a " "chance to respond if they have any issues to raise concerning the proposed " "change." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:653 msgid "" "Join the relevant git list for the branch being tracked. For example, users " "tracking the {betarel-current-major}-STABLE branch should join the {dev-" "commits-src-branches}. This list records the commit log entry for each " "change as it is made, along with any pertinent information on possible side " "effects." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:656 msgid "" "To join these lists, go to {mailing-lists}, click on the list to subscribe " "to, and follow the instructions. In order to track changes for the whole " "source tree, subscribe to {dev-commits-src-all}." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:657 msgid "" "To install a new FreeBSD-STABLE system, install the most recent FreeBSD-" "STABLE release from the crossref:mirrors[mirrors,FreeBSD mirror sites] or " "use a monthly snapshot built from FreeBSD-STABLE. Refer to link:https://" "www.FreeBSD.org/snapshots/[www.freebsd.org/snapshots] for more information " "about snapshots." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:660 msgid "" "To compile or upgrade an existing FreeBSD system to FreeBSD-STABLE, use " "`git` to check out the source for the desired branch. Branch names, such as " "`stable/13`, are listed at link:https://www.FreeBSD.org/releng/" "[www.freebsd.org/releng]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:663 msgid "" "Before compiling or upgrading to FreeBSD-STABLE , read [.filename]#/usr/src/" "Makefile# carefully and follow the instructions in crossref:cutting-" "edge[makeworld, Updating FreeBSD from Source]. Read the {freebsd-stable} and " "[.filename]#/usr/src/UPDATING# to keep up-to-date on other bootstrapping " "procedures that sometimes become necessary on the road to the next release." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:665 #, no-wrap msgid "The N-number" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:669 msgid "" "When tracking down bugs it is important to know which versions of the source " "code have been used to create the system exhibiting an issue. FreeBSD " "provides version information compiled into the kernel. man:uname[1] " "retrieves this information, for example:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:673 #, no-wrap msgid "" "% uname -v\n" "FreeBSD 14.0-CURRENT #112 main-n247514-031260d64c18: Tue Jun 22 20:43:19 MDT 2021 fred@machine:/usr/home/fred/obj/usr/home/fred/git/head/amd64.amd64/sys/FRED\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:676 msgid "" "The final field gives information regarding the kernel name, the person that " "built it, and the location that it was compiled in. Looking at the 4th " "field, it is made up of several parts:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:679 #, no-wrap msgid "main-n247514-031260d64c18\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:684 #, no-wrap msgid "" "main\t\t<.>\n" "n247514\t\t<.>\n" "031260d64c18\t<.>\n" "\t\t<.>\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:688 msgid "" "Git branch name. Note: comparisons of n-numbers are only valid on branches " "published by the project (`main`, `stable/XX` and `releng/XX`). Local " "branches will have n-numbers that will overlap commits of their parent " "branch." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:689 msgid "" "The n-number is a linear count of commits back to the start of the Git " "repository starting with the Git hash included in the line." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:690 msgid "Git hash of the checked out tree" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:692 msgid "" "Sometimes a suffix of `-dirty` is present when the kernel was built in a " "tree with uncommitted changes. It is absent in this example because the " "FRED kernel was built from a pristine checkout." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:695 msgid "" "The `git rev-list` command is used to find the n-number corresponding to a " "Git hash. For example:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:699 #, no-wrap msgid "" "% git rev-list --first-parent --count 031260d64c18 <.>\n" "247514 <.>\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:701 msgid "git hash to translate (the hash from the above example is reused)" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:702 msgid "The n-number." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:708 msgid "" "Usually this number is not all that important. However, when bug fixes are " "committed, this number makes it easy to quickly determine whether the fix is " "present in the currently running system. Developers will often refer to the " "hash of the commit (or provide a URL which has that hash), but not the n-" "number since the hash is the easily visible identifier for a change while " "the n-number is not. Security advisories and errata notices will also note " "an n-number, which can be directly compared against the system. When " "shallow Git clones are used, n-numbers cannot be compared reliably, as the " "git rev-list command counts all revisions in the repository, which a shallow " "clone omits." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:710 #, no-wrap msgid "Updating FreeBSD from Source" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:716 msgid "" "Updating FreeBSD by compiling from source offers several advantages over " "binary updates. Code can be built with options to take advantage of " "specific hardware. Parts of the base system can be built with non-default " "settings, or left out entirely where they are not needed or desired. The " "build process takes longer to update a system than just installing binary " "updates, but allows complete customization to produce a tailored version of " "FreeBSD." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:718 #, no-wrap msgid "Quick Start" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:722 msgid "" "This is a quick reference for the typical steps used to update FreeBSD by " "building from source. Later sections describe the process in more detail." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:727 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1035 msgid "" "When switching from man:mergemaster[8] to man:etcupdate[8], the first run " "might merge changes incorrectly generating spurious conflicts. To prevent " "this, perform the following steps *before* updating sources and building the " "new world:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:732 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1040 #, no-wrap msgid "" "# etcupdate extract <.>\n" "# etcupdate diff <.>\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:735 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1043 msgid "" "Bootstrap the database of stock [.filename]#/etc# files; for more " "information see man:etcupdate[8]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:737 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1045 msgid "" "Check the diff after bootstrapping. Trim any local changes that are no " "longer needed to reduce the chance of conflicts in future updates." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:742 msgid "Update and Build" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:756 #, no-wrap msgid "" "# git -C /usr/src pull <.>\n" "check /usr/src/UPDATING <.>\n" "# cd /usr/src <.>\n" "# make -j4 buildworld <.>\n" "# make -j4 kernel <.>\n" "# shutdown -r now <.>\n" "# etcupdate -p <.>\n" "# cd /usr/src <.>\n" "# make installworld <.>\n" "# etcupdate -B <.>\n" "# shutdown -r now <.>\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:760 msgid "" "Get the latest version of the source. See crossref:cutting-edge[updating-src-" "obtaining-src, Updating the Source] for more information on obtaining and " "updating source." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:762 msgid "" "Check [.filename]#/usr/src/UPDATING# for any manual steps required before or " "after building from source." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:764 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:774 msgid "Go to the source directory." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:766 msgid "Compile the world, everything except the kernel." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:768 msgid "" "Compile and install the kernel. This is equivalent to `make buildkernel " "installkernel`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:770 msgid "Reboot the system to the new kernel." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:772 msgid "" "Update and merge configuration files in [.filename]#/etc/# required before " "installworld." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:776 msgid "Install the world." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:778 msgid "Update and merge configuration files in [.filename]#/etc/#." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:780 msgid "Restart the system to use the newly-built world and kernel." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:783 #, no-wrap msgid "Preparing for a Source Update" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:786 msgid "" "Read [.filename]#/usr/src/UPDATING#. Any manual steps that must be performed " "before or after an update are described in this file." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:788 #, no-wrap msgid "Updating the Source" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:793 msgid "" "FreeBSD source code is located in [.filename]#/usr/src/#. The preferred " "method of updating this source is through the Git version control system. " "Verify that the source code is under version control:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:800 #, no-wrap msgid "" "# cd /usr/src\n" "# git remote --v\n" "origin https://git.freebsd.org/src.git (fetch)\n" "origin https://git.freebsd.org/src.git (push)\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:803 msgid "" "This indicates that [.filename]#/usr/src/# is under version control and can " "be updated with man:git[1]:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:808 #, no-wrap msgid "# git -C /usr/src pull\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:812 msgid "" "The update process can take some time if the directory has not been updated " "recently. After it finishes, the source code is up to date and the build " "process described in the next section can begin." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:816 msgid "Obtaining the source:" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:819 msgid "" "If the output says `fatal: not a git repository`, the files there are " "missing or were installed with a different method. A new checkout of the " "source is required." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:822 #, no-wrap msgid "FreeBSD Versions and Repository Branches" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:826 #, no-wrap msgid "uname ‑r Output" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:827 #, no-wrap msgid "Repository Path" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:829 #, no-wrap msgid "Description" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:830 #, no-wrap msgid "`_X.Y_-RELEASE`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:831 #, no-wrap msgid "`releng/_X.Y_`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:833 #, no-wrap msgid "The Release version plus only critical security and bug fix patches. This branch is recommended for most users." msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:834 #, no-wrap msgid "`_X.Y_-STABLE`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:835 #, no-wrap msgid "`stable/_X_`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:841 #, no-wrap msgid "" "The Release version plus all additional development on that branch. _STABLE_ refers to the Applications Binary Interface (ABI) not changing, so software compiled for earlier versions still runs. For example, software compiled to run on FreeBSD {rel-legacy} will still run on FreeBSD {rel-legacy-major}-STABLE compiled later.\n" "\n" "STABLE branches occasionally have bugs or incompatibilities which might affect users, although these are typically fixed quickly." msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:842 #, no-wrap msgid "`_X_-CURRENT`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:843 #, no-wrap msgid "`main`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:844 #, no-wrap msgid "The latest unreleased development version of FreeBSD. The CURRENT branch can have major bugs or incompatibilities and is recommended only for advanced users." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:847 msgid "Determine which version of FreeBSD is being used with man:uname[1]:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:852 #, no-wrap msgid "" "# uname -r\n" "13.2-RELEASE\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:856 msgid "" "Based on crossref:cutting-edge[updating-src-obtaining-src-repopath,FreeBSD " "Versions and Repository Branches], the source used to update `13.2-RELEASE` " "has a repository path of `releng/13.2`. That path is used when checking out " "the source:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:861 #, no-wrap msgid "" "# mv /usr/src /usr/src.bak <.>\n" "# git clone --branch releng/13.2 https://git.FreeBSD.org/src.git /usr/src <.>\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:864 msgid "" "Move the old directory out of the way. If there are no local modifications " "in this directory, it can be deleted." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:866 msgid "" "The path from crossref:cutting-edge[updating-src-obtaining-src-" "repopath,FreeBSD Versions and Repository Branches] is added to the " "repository URL. The third parameter is the destination directory for the " "source code on the local system." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:868 #, no-wrap msgid "Building from Source" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:873 msgid "" "The _world_, or all of the operating system except the kernel, is compiled. " "This is done first to provide up-to-date tools to build the kernel. Then " "the kernel itself is built:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:879 #, no-wrap msgid "" "# cd /usr/src\n" "# make buildworld\n" "# make buildkernel\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:882 msgid "The compiled code is written to [.filename]#/usr/obj#." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:885 msgid "" "These are the basic steps. Additional options to control the build are " "described below." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:887 #, no-wrap msgid "Performing a Clean Build" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:892 msgid "" "Some versions of the FreeBSD build system leave previously-compiled code in " "the temporary object directory, [.filename]#/usr/obj#. This can speed up " "later builds by avoiding recompiling code that has not changed. To force a " "clean rebuild of everything, use `cleanworld` before starting a build:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:896 #, no-wrap msgid "# make cleanworld\n" msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:899 #, no-wrap msgid "Setting the Number of Jobs" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:906 msgid "" "Increasing the number of build jobs on multi-core processors can improve " "build speed. Determine the number of cores with `sysctl hw.ncpu`. " "Processors vary, as do the build systems used with different versions of " "FreeBSD, so testing is the only sure method to tell how a different number " "of jobs affects the build speed. For a starting point, consider values " "between half and double the number of cores. The number of jobs is " "specified with `-j`." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:908 #, no-wrap msgid "Increasing the Number of Build Jobs" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:912 msgid "Building the world and kernel with four jobs:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:916 #, no-wrap msgid "# make -j4 buildworld buildkernel\n" msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:921 #, no-wrap msgid "Building Only the Kernel" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:926 msgid "" "A `buildworld` must be completed if the source code has changed. After " "that, a `buildkernel` to build a kernel can be run at any time. To build " "just the kernel:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:931 #, no-wrap msgid "" "# cd /usr/src\n" "# make buildkernel\n" msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:934 #, no-wrap msgid "Building a Custom Kernel" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:939 msgid "" "The standard FreeBSD kernel is based on a _kernel config file_ called " "[.filename]#GENERIC#. The [.filename]#GENERIC# kernel includes the most " "commonly-needed device drivers and options. Sometimes it is useful or " "necessary to build a custom kernel, adding or removing device drivers or " "options to fit a specific need." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:941 msgid "" "For example, someone developing a small embedded computer with severely " "limited RAM could remove unneeded device drivers or options to make the " "kernel slightly smaller." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:944 msgid "" "Kernel config files are located in [.filename]#/usr/src/sys/arch/conf/#, " "where _arch_ is the output from `uname -m`. On most computers, that is " "`amd64`, giving a config file directory of [.filename]#/usr/src/sys/amd64/" "conf/#." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:950 msgid "" "[.filename]#/usr/src# can be deleted or recreated, so it is preferable to " "keep custom kernel config files in a separate directory, like [.filename]#/" "root#. Link the kernel config file into the [.filename]#conf# directory. " "If that directory is deleted or overwritten, the kernel config can be re-" "linked into the new one." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:954 msgid "" "A custom config file can be created by copying the [.filename]#GENERIC# " "config file. In this example, the new custom kernel is for a storage " "server, so is named [.filename]#STORAGESERVER#:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:960 #, no-wrap msgid "" "# cp /usr/src/sys/amd64/conf/GENERIC /root/STORAGESERVER\n" "# cd /usr/src/sys/amd64/conf\n" "# ln -s /root/STORAGESERVER .\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:963 msgid "" "[.filename]#/root/STORAGESERVER# is then edited, adding or removing devices " "or options as shown in man:config[5]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:965 msgid "" "The custom kernel is built by setting `KERNCONF` to the kernel config file " "on the command line:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:969 #, no-wrap msgid "# make buildkernel KERNCONF=STORAGESERVER\n" msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:972 #, no-wrap msgid "Installing the Compiled Code" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:975 msgid "" "After the `buildworld` and `buildkernel` steps have been completed, the new " "kernel and world are installed:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:984 #, no-wrap msgid "" "# cd /usr/src\n" "# make installkernel\n" "# shutdown -r now\n" "# cd /usr/src\n" "# make installworld\n" "# shutdown -r now\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:987 msgid "" "If a custom kernel was built, `KERNCONF` must also be set to use the new " "custom kernel:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:996 #, no-wrap msgid "" "# cd /usr/src\n" "# make installkernel KERNCONF=STORAGESERVER\n" "# shutdown -r now\n" "# cd /usr/src\n" "# make installworld\n" "# shutdown -r now\n" msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:999 #, no-wrap msgid "Completing the Update" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1003 msgid "" "A few final tasks complete the update. Any modified configuration files are " "merged with the new versions, outdated libraries are located and removed, " "then the system is restarted." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1005 #, no-wrap msgid "Merging Configuration Files with man:etcupdate[8]" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1010 msgid "" "man:etcupdate[8] is a tool for managing updates to files that are not " "updated as part of an installworld such as files located in [.filename]#/etc/" "#. It manages updates by doing a three-way merge of changes made to these " "files against the local versions. man:etcupdate[8] is designed to minimize " "the amount of user intervention." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1015 msgid "" "In general, man:etcupdate[8] does not need any specific arguments for its " "job. There is however a handy in between command for sanity checking what " "will be done the first time man:etcupdate[8] is used:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1019 #, no-wrap msgid "# etcupdate diff\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1022 msgid "This command allows the user to audit configuration changes." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1025 msgid "" "If man:etcupdate[8] is not able to merge a file automatically, the merge " "conflicts can be resolved with manual interaction by issuing:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1029 #, no-wrap msgid "# etcupdate resolve\n" msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1048 #, no-wrap msgid "Checking for Outdated Files and Libraries" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1052 msgid "" "Some obsolete files or directories can remain after an update. These files " "can be located:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1056 #, no-wrap msgid "# make check-old\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1059 msgid "and deleted:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1063 #, no-wrap msgid "# make delete-old\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1067 msgid "Some obsolete libraries can also remain. These can be detected with:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1071 #, no-wrap msgid "# make check-old-libs\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1074 msgid "and deleted with" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1078 #, no-wrap msgid "# make delete-old-libs\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1082 msgid "" "Programs which were still using those old libraries will stop working when " "the library has been deleted. These programs must be rebuilt or replaced " "after deleting the old libraries." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1088 msgid "" "When all the old files or directories are known to be safe to delete, " "pressing kbd:[y] and kbd:[Enter] to delete each file can be avoided by " "setting `BATCH_DELETE_OLD_FILES` in the command. For example:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1092 #, no-wrap msgid "# make BATCH_DELETE_OLD_FILES=yes delete-old-libs\n" msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1097 #, no-wrap msgid "Restarting After the Update" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1100 msgid "" "The last step after updating is to restart the computer so all the changes " "take effect:" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1107 #, no-wrap msgid "Updating FreeBSD with packages" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1113 msgid "" "Starting from 14.0-RELEASE, the FreeBSD project has published a set of " "packages of the base system, using man:pkg[8]. The convenience of pkg is no " "longer limited to the FreeBSD ports collection. man:pkg[8] can be used for " "FreeBSD itself. Base packages, and usage thereof, were traditionally " "referred to as _pkgbase_." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1116 msgid "" "Publication of official packages began in link:https://lists.freebsd.org/" "archives/freebsd-pkgbase/2023-October/000221.html[October 2023]. Their use " "with FreeBSD 14 is currently experimental." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1118 msgid "" "Starting from 15.0-RELEASE, man:freebsd-base[7] will be supported as a tech " "preview for:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1120 msgid "installation" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1121 msgid "minor upgrades" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1122 msgid "major upgrades" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1124 msgid "freebsd-base will eventually replace:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1126 msgid "" "tarball distribution sets, such as `base.txz` or `kernel.txz`, which are " "historically used for installation of the OS with man:bsdinstall[8]" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1127 msgid "man:freebsd-update[8] for updates to the OS." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1129 msgid "The current plan is for freebsd-update to work with pkg." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1133 msgid "" "The replacement of distribution sets will take some time, until freebsd-base " "is fully stable!" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1137 msgid "" "Base System packages complement crossref:cutting-edge[makeworld,\"building " "and installing from source\"], which is still available for those who wish " "to build their own custom kernels or userland. It is also possible to build " "custom base system packages from local sources, as well as just relying on " "officially provided packages." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1138 #, no-wrap msgid "Converting a Host to use freebsd-base" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1142 msgid "" "FreeBSD 14.0-RELEASE or later can be converted to use base packages. " "Earlier versions must be upgraded with freebsd-update before conversion." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1145 msgid "" "For conversion, the FreeBSD Foundation-sponsored link:https://github.com/" "FreeBSDFoundation/pkgbasify[pkgbasify] tool is recommended. Follow the " "instructions given there." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1147 msgid "man:freebsd-update[8] will be enhanced to use pkg and pkgbasify." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1152 msgid "" "Note that this migration requires up to 5GiB additional free space, to " "download, unpack, and relocate any conflicting files. The pkgbasify tool " "does not check for this and it is the responsibility of the user to ensure " "that enough space is available before running the migration." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1155 msgid "" "man:pkgbasify[8] (or whatever outcome link:https://reviews.freebsd.org/" "D51594[D51594] or link:https://wiki.freebsd.org/WantedPorts#O-P[port " "request] will have) performs 6 main tasks:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1157 msgid "Creates a backup boot environment (ZFS only) with man:bectl[8]" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1158 msgid "Creates the new package repository config files" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1159 msgid "Upgrades existing system components such as base, kernel, lib32, debug" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1160 msgid "Merges existing and new config files" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1161 msgid "Updates passwd and capabilities databases" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1162 msgid "Restarts sshd immediately" msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1163 #, no-wrap msgid "Upgrading a Host using freebsd-base" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1168 msgid "" "This is still in development, so please be careful especially when " "converting an existing system to use freebsd-base." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1171 msgid "" "Create a folder for custom pkg repository config files, if there is none " "present already." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1175 #, no-wrap msgid "# mkdir -p /usr/local/etc/pkg/repos/\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1178 msgid "" "For using the freebsd-base repository, create a pkg repository configuration " "file called `FreeBSD-base.conf`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1189 #, no-wrap msgid "" "FreeBSD-base {\n" " url = \"pkg+https://pkg.freebsd.org/${ABI}/base_release_${VERSION_MINOR}\";\n" " mirror_type = \"srv\";\n" " signature_type = \"fingerprints\";\n" " fingerprints = \"/usr/share/keys/pkg\";\n" " enabled = yes;\n" "}\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1192 msgid "" "for more information on specific configuration options see man:pkg.conf[5]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1194 msgid "" "There are different branches to choose from (by changing the url " "accordingly):" msgstr "" #. type: Block title #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1196 #, no-wrap msgid "Base system package Branches" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1200 #, no-wrap msgid "Branch" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1201 #, no-wrap msgid "Frequency" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1203 #, no-wrap msgid "URL" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1204 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1208 #, no-wrap msgid "main" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1205 #, no-wrap msgid "twice daily - 12:00 and 00:00 UTC" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1207 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1215 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1231 #, no-wrap msgid "`pkg+https://pkg.freebsd.org/${ABI}/base_latest`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1209 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1217 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1233 #, no-wrap msgid "weekly – Sunday at 12:00 UTC" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1211 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1219 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1234 #, no-wrap msgid "`pkg+https://pkg.freebsd.org/${ABI}/base_weekly`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1212 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1216 #, no-wrap msgid "stable/14" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1213 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1221 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1225 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1229 #, no-wrap msgid "twice daily – 12:00 and 00:00 UTC" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1220 #, no-wrap msgid "releng/14.3" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1223 #, no-wrap msgid "`pkg+https://pkg.freebsd.org/${ABI}/base_release_3`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1224 #, no-wrap msgid "releng/15.0" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1227 #, no-wrap msgid "`pkg+https://pkg.freebsd.org/${ABI}/base_release_0`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1228 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1232 #, no-wrap msgid "stable/15" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1237 msgid "" "To upgrade the system, change the configuration file according to the " "desired release, and run:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1242 #, no-wrap msgid "" "# pkg update -r FreeBSD-base\n" "# pkg upgrade -r FreeBSD-base\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1245 msgid "check, if these packages are correct and accept the changes." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1247 msgid "Reboot the OS executing the following command:" msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1254 #, no-wrap msgid "Major Upgrades" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1257 msgid "" "With ZFS, boot environments allow an upgrade to be performed without " "interrupting running software. If the system does not use root-on-ZFS: " "backup before upgrading." msgstr "" #. type: Title ===== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1258 #, no-wrap msgid "Preparations" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1260 msgid "" "Change `/usr/local/etc/pkg/repos/FreeBSD-base.conf` to target the correct " "major release like `base_release_0` for 15.0-RELEASE, to look like this:" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1264 msgid "This file might change to be included in RELEASE with a different path." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1275 #, no-wrap msgid "" "FreeBSD-base {\n" " url = \"pkg+https://pkg.freebsd.org/${ABI}/base_release_0\";\n" " mirror_type = \"srv\";\n" " signature_type = \"fingerprints\";\n" " fingerprints = \"/usr/share/keys/pkg\";\n" " enabled = yes;\n" "}\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1283 msgid "" "As pkgbase with FreeBSD 14 is experimental, so is a pkgbase major upgrade to " "15. At the time of this writing in some edge-cases the major upgrade " "removes pkg and therefore segfaults. This is considered a (link:https://" "github.com/freebsd/pkg/issues/2475[known issue]) for 15.0-RELEASE. To work " "around this issue, lock pkg before upgrading." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1287 #, no-wrap msgid "# pkg -c /mnt/upgrade lock pkg\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1290 msgid "" "An experimental major upgrade from FreeBSD 14, to 15 (or 16.0-CURRENT), " "should be followed by installation of meta package `FreeBSD-set-minimal`." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1294 msgid "Save a list of the non-base packages in case they are needed later:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1298 #, no-wrap msgid "pkg prime-origins | sort -u > /var/tmp/pkg-prime-origins.txt\n" msgstr "" #. type: Title ===== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1301 #, no-wrap msgid "Major Upgrade With ZFS" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1303 msgid "" "Create a boot environment using man:bectl[8] and name it according to the " "version upgrading to" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1306 #, no-wrap msgid "# bectl create 15.0-RELEASE\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1309 msgid "" "Create a directory then mount the new boot environment there to enable " "working with pkg man:chroot[8] and rootdir." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1314 #, no-wrap msgid "" "# mkdir /mnt/upgrade\n" "# bectl mount 15.0-RELEASE /mnt/upgrade\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1317 msgid "" "The next step will upgrade the boot environment to the specified version." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1321 msgid "" "This step might remove non-base packages, which could include the running " "desktop environment." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1325 msgid "" "Set the environment variable ABI to upgrade the major version (replace amd64 " "with the architecture and 15 with the targeted version). Set the pkg-static " "chroot directory to the boot environment mountpoint." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1329 #, no-wrap msgid "# env ABI=FreeBSD:15:amd64 pkg-static -c /mnt/upgrade upgrade -r FreeBSD-base\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1332 msgid "" "There will be a prompt asking about ignoring the version mismatch looking " "like this:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1340 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1388 #, no-wrap msgid "" "Newer FreeBSD version for package FreeBSD-zoneinfo:\n" "To ignore this error set IGNORE_OSVERSION=yes\n" "- package: 1500058\n" "- running userland: 1500000\n" "Ignore the mismatch and continue? [y/N]:\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1343 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1391 msgid "Check and confirm that." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1345 msgid "" "To check if that was successful, chroot into the mountpoint of the boot " "environment and run `freebsd-version -ku`." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1351 #, no-wrap msgid "" "# chroot /mnt/upgrade\n" "# freebsd-version -ku\n" "# exit\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1354 msgid "Activate the boot environment temporarily and reboot." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1358 #, no-wrap msgid "" "# bectl activate -t 15.0-RELEASE\n" "# shutdown -r now\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1362 msgid "" "If the system does not work as expected: restart the OS to cease using the " "temporarily active boot environment. The next boot will reuse the pre-" "upgrade environment." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1364 msgid "" "If the system runs stable after reboot, don't forget to permanently activate " "this boot environment to prevent accidentally booting the old system." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1368 #, no-wrap msgid "bectl activate 15.0-RELEASE\n" msgstr "" #. type: Title ===== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1371 #, no-wrap msgid "Major Upgrade Without ZFS" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1373 msgid "" "Set the environment variable ABI to upgrade the major version (replace amd64 " "with the architecture and 15 with the targeted version)." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1377 #, no-wrap msgid "# env ABI=FreeBSD:15:amd64 pkg-static upgrade -r FreeBSD-base\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1380 msgid "" "There will be a prompt to ask about ignoring the version mismatch looking " "like this:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1393 msgid "To check if the upgrade was successful, run `freebsd-version -ku`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1395 msgid "Then reboot." msgstr "" #. type: Title ===== #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1396 #, no-wrap msgid "Post-upgrade tasks" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1398 msgid "" "If pkg was locked during the update as a workaround remove the lock like " "this:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1401 #, no-wrap msgid "# pkg unlock pkg\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1404 msgid "" "After upgrading to a new major version, updates and upgrades of installed " "packages to match the ABI version may be necessary." msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1408 #, no-wrap msgid "# pkg upgrade\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1411 msgid "" "Consider getting help from link:https://www.freebsd.org/support/[FreeBSD " "Support] when experiencing issues." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1413 #, no-wrap msgid "Manually building pkgbase and publishing it to the local network" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1416 msgid "When building custom pkgbase packages clone the FreeBSD source tree:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1421 #, no-wrap msgid "" "# cd /usr/src\n" "# git clone https://github.com/freebsd/freebsd-src.git /usr/src\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1424 msgid "Check out the branch for the release to build packages for:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1428 #, no-wrap msgid "# git checkout releng/14.3\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1432 msgid "" "Start the building process, depending on the resources available this could " "take some while. Set the parallel processes according to the CPU core count." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1434 msgid "This example is written for an 8 core CPU:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1438 #, no-wrap msgid "# make -j8 buildworld && make -j8 buildkernel && make -j8 packages\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1441 msgid "" "When building frequently, consider using package:devel/ccache[] to speed up " "subsequent builds from the cache." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1443 msgid "" "After building, the packages will get saved into `/usr/obj/usr/src/repo/" "FreeBSD:14:amd64/14.3p2` or something like that, depending on the version " "build." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1445 msgid "" "To publish these packages to the network set up a nginx service and use this " "location in the http server configuration:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1452 #, no-wrap msgid "" " location /FreeBSD:14:amd64 {\n" " alias /usr/obj/usr/src/repo/FreeBSD:14:amd64/;\n" " autoindex on;\n" " }\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1455 msgid "And reload the nginx service." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1457 msgid "" "When not using https, use a small configuration file on the clients to " "target the pkgbase version just built by editing `/usr/local/etc/pkg/repos/" "upgrade.conf`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1464 #, no-wrap msgid "" "upgrade: {\n" "\turl = http://ip.of.the.server/FreeBSD:14:amd64/14.3p2\n" "\tenabled = yes\n" "}\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1467 msgid "" "and use it as written above (but use -r upgrade instead of FreeBSD-base)." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1469 #, no-wrap msgid "Tracking for Multiple Machines" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1475 msgid "" "When multiple machines need to track the same source tree, it is a waste of " "disk space, network bandwidth, and CPU cycles to have each system download " "the sources and rebuild everything. The solution is to have one machine do " "most of the work, while the rest of the machines mount that work via NFS. " "This section outlines a method of doing so. For more information about " "using NFS, refer to crossref:network-servers[network-nfs,\"Network File " "System (NFS)\"]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1480 msgid "" "First, identify a set of machines which will run the same set of binaries, " "known as a _build set_. Each machine can have a custom kernel, but will run " "the same userland binaries. From that set, choose a machine to be the " "_build machine_ that the world and kernel are built on. Ideally, this is a " "fast machine that has sufficient spare CPU to run `make buildworld` and " "`make buildkernel`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1484 msgid "" "Select a machine to be the _test machine_, which will test software updates " "before they are put into production. This _must_ be a machine that can " "afford to be down for an extended period of time. It can be the build " "machine, but need not be." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1487 msgid "" "All the machines in this build set need to mount [.filename]#/usr/obj# and " "[.filename]#/usr/src# from the build machine via NFS. For multiple build " "sets, [.filename]#/usr/src# should be on one build machine, and NFS mounted " "on the rest." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1493 msgid "" "Ensure that [.filename]#/etc/make.conf# and [.filename]#/etc/src.conf# on " "all the machines in the build set agree with the build machine. That means " "that the build machine must build all the parts of the base system that any " "machine in the build set is going to install. Also, each build machine " "should have its kernel name set with `KERNCONF` in [.filename]#/etc/" "make.conf#, and the build machine should list them all in its `KERNCONF`, " "listing its own kernel first. The build machine must have the kernel " "configuration files for each machine in its [.filename]#/usr/src/sys/arch/" "conf#." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1501 msgid "" "On the build machine, build the kernel and world as described in " "crossref:cutting-edge[makeworld, Updating FreeBSD from Source], but do not " "install anything on the build machine. Instead, install the built kernel on " "the test machine. On the test machine, mount [.filename]#/usr/src# and " "[.filename]#/usr/obj# via NFS. Then, run `shutdown now` to go to single-" "user mode in order to install the new kernel and world and run `etcupdate` " "as usual. When done, reboot to return to normal multi-user operations." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1504 msgid "" "After verifying that everything on the test machine is working properly, use " "the same procedure to install the new software on each of the other machines " "in the build set." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1512 msgid "" "The same methodology can be used for the ports tree. The first step is to " "share [.filename]#/usr/ports# via NFS to all the machines in the build set. " "To configure [.filename]#/etc/make.conf# to share distfiles, set `DISTDIR` " "to a common shared directory that is writable by whichever user `root` is " "mapped to by the NFS mount. Each machine should set `WRKDIRPREFIX` to a " "local build directory, if ports are to be built locally. Alternately, if " "the build system is to build and distribute packages to the machines in the " "build set, set `PACKAGES` on the build system to a directory similar to " "`DISTDIR`." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1514 #, no-wrap msgid "Building on non-FreeBSD Hosts" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1518 msgid "" "Historically, building required a FreeBSD host. Nowadays, FreeBSD can be " "built on Linux and macOS." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1524 msgid "" "To build on a non-FreeBSD host, the `tools/build/make.py` script is " "recommended. This script acts as a wrapper around `bmake`, which is the " "make implementation used by FreeBSD. It ensures that the necessary tooling, " "including the actual FreeBSD's man:make[1], is bootstrapped and that the " "build environment is properly configured. In particular, it sets the " "external toolchain variables, such as `XCC`, `XLD`, and others. " "Additionally, the script can pass any additional command arguments, such as " "`-j 4` for parallel builds or specific make targets, to `bmake`." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1529 msgid "" "A recent version of `bmake` can be used instead of the `tools/build/make.py` " "script as well. In that case, however, required environment variables need " "to be set manually (the easiest way to obtain a list of them is by running " "`tools/build/make.py --debug`)." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1533 msgid "" "Otherwise, the list of prerequisites for building FreeBSD is rather short. " "In fact, it boils down to installing a couple of dependencies." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1536 msgid "" "On macOS, the only dependency is LLVM. The necessary dependencies can be " "installed with package manager (e.g., link:https://brew.sh/[Homebrew]):" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1540 #, no-wrap msgid "brew install llvm\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1543 msgid "" "On a Linux distributions, install link:https://clang.llvm.org/[Clang] " "version 10.0 or newer and the headers for libarchive and libbz2 (often " "packaged as libarchive-dev and libbz2-dev)." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1545 msgid "" "Once the dependencies are installed, the host should be able to build " "FreeBSD." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1547 msgid "" "For example, the following `tools/build/make.py` invocation builds the world:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1551 #, no-wrap msgid "MAKEOBJDIRPREFIX=/tmp/obj tools/build/make.py -j 8 TARGET=arm64 TARGET_ARCH=aarch64 buildworld\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1556 msgid "" "It builds the world for target `aarch64:arm64` on 8 CPUs and uses " "[.filename]#/tmp/obj# for object files. Note that the variables " "`MAKEOBJDIRPREFIX`, `TARGET`, and `TARGET_ARCH` are mandatory when building " "on non-FreeBSD hosts. Also, make sure to create the object directory " "pointed to by the `MAKEOBJDIRPREFIX` environment variable." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/cutting-edge/_index.adoc:1557 msgid "Refer to man:arch[7] and man:build[7] for more details." msgstr ""