Updating FreeBSD: Difference between revisions

 
(2 intermediate revisions by the same user not shown)
Line 9: Line 9:


==Base system sources==
==Base system sources==
Use <tt>freebsd-update</tt>, which comes as part of the Base System.
* <tt>freebsd-update fetch</tt>
* <tt>freebsd-update -r NEWVERSION upgrade</tt>
The installer (/stand/sysinstall) can unpack the src distribution wholesale or piecemeal (see "source collections" below) into your /usr/src. cvsup(1) or cvs(1) can be used to both check out base system sources and keep them up-to-date. CVS is part of the base FreeBSD system, whereas CVSup is a port. Otherwise, however, CVSup is generally superior; it is faster, generates less network load and disk I/O, and understands source collections.
The installer (/stand/sysinstall) can unpack the src distribution wholesale or piecemeal (see "source collections" below) into your /usr/src. cvsup(1) or cvs(1) can be used to both check out base system sources and keep them up-to-date. CVS is part of the base FreeBSD system, whereas CVSup is a port. Otherwise, however, CVSup is generally superior; it is faster, generates less network load and disk I/O, and understands source collections.


Line 20: Line 24:
<code>portsnap fetch extract</code>
<code>portsnap fetch extract</code>
is sufficient to update the ports tree on a fresh install.
is sufficient to update the ports tree on a fresh install.
===poudriere===
As of FreeBSD 14, portsnap has been removed. Use <tt>poudriere</tt>. Create the ports tree:
* <tt>poudriere ports -c</tt>
Update it:
* <tt>poudriere ports -u</tt>
But <tt>portupgrade</tt> is then still used to actually rebuild ports.


===Portsnap===
===Portsnap===
The first time portsnap(8) is run, use the following method: <tt>portsnap fetch extract</tt> (on older versions of portsnap, you'll also need append a configuration file argument via <tt>-f</tt>; the default works just fine for most cases, ie <tt>portsnap fetch extract -f /usr/local/etc/portsnap.conf.sample</tt>). Following this (time-consuming) run, <tt>portsnap fetch upgrade</tt> is sufficient to pull in package updates (the same rule about <tt>-f</tt> applies).
The first time portsnap(8) is run, use the following method: <tt>portsnap fetch extract</tt> (on older versions of portsnap, you'll also need append a configuration file argument via <tt>-f</tt>; the default works just fine for most cases, ie <tt>portsnap fetch extract -f /usr/local/etc/portsnap.conf.sample</tt>). Following this (time-consuming) run, <tt>portsnap fetch upgrade</tt> is sufficient to pull in package updates (the same rule about <tt>-f</tt> applies).
This can be followed with <tt>portupgrade -ai</tt> to actually rebuild ports.


===Cvsup===
===Cvsup===