148ffe56aSColin Percival.\"- 2db6b0a61SColin Percival.\" Copyright 2006, 2007 Colin Percival 348ffe56aSColin Percival.\" All rights reserved 448ffe56aSColin Percival.\" 548ffe56aSColin Percival.\" Redistribution and use in source and binary forms, with or without 648ffe56aSColin Percival.\" modification, are permitted providing that the following conditions 748ffe56aSColin Percival.\" are met: 848ffe56aSColin Percival.\" 1. Redistributions of source code must retain the above copyright 948ffe56aSColin Percival.\" notice, this list of conditions and the following disclaimer. 1048ffe56aSColin Percival.\" 2. Redistributions in binary form must reproduce the above copyright 1148ffe56aSColin Percival.\" notice, this list of conditions and the following disclaimer in the 1248ffe56aSColin Percival.\" documentation and/or other materials provided with the distribution. 1348ffe56aSColin Percival.\" 1448ffe56aSColin Percival.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1548ffe56aSColin Percival.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 1648ffe56aSColin Percival.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1748ffe56aSColin Percival.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 1848ffe56aSColin Percival.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1948ffe56aSColin Percival.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2048ffe56aSColin Percival.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2148ffe56aSColin Percival.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 2248ffe56aSColin Percival.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 2348ffe56aSColin Percival.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2448ffe56aSColin Percival.\" POSSIBILITY OF SUCH DAMAGE. 2548ffe56aSColin Percival.\" 26*0b287d19SGraham Perrin.Dd February 2, 2024 2748ffe56aSColin Percival.Dt FREEBSD-UPDATE 8 28c0755420SEd Maste.Os 2948ffe56aSColin Percival.Sh NAME 3048ffe56aSColin Percival.Nm freebsd-update 3148ffe56aSColin Percival.Nd fetch and install binary updates to FreeBSD 3248ffe56aSColin Percival.Sh SYNOPSIS 3348ffe56aSColin Percival.Nm 34f69f0644SMateusz Piotrowski.Op Fl F 3548ffe56aSColin Percival.Op Fl b Ar basedir 36f69f0644SMateusz Piotrowski.Op Fl -currently-running Ar release 3748ffe56aSColin Percival.Op Fl d Ar workdir 3848ffe56aSColin Percival.Op Fl f Ar conffile 39c76da1f0SFaraz Vahedi.Op Fl j Ar jail 4048ffe56aSColin Percival.Op Fl k Ar KEY 41f69f0644SMateusz Piotrowski.Op Fl -not-running-from-cron 42db6b0a61SColin Percival.Op Fl r Ar newrelease 4348ffe56aSColin Percival.Op Fl s Ar server 4448ffe56aSColin Percival.Op Fl t Ar address 4515647a71SMateusz Piotrowski.Ar command ... 4648ffe56aSColin Percival.Sh DESCRIPTION 4748ffe56aSColin PercivalThe 4848ffe56aSColin Percival.Nm 4948ffe56aSColin Percivaltool is used to fetch, install, and rollback binary 50c0755420SEd Masteupdates to the 51c0755420SEd Maste.Fx 52c0755420SEd Mastebase system. 53460ad988SMateusz Piotrowski.Sh BINARY UPDATES AVAILABILITY 54460ad988SMateusz PiotrowskiBinary updates are not available for every single 55c0755420SEd Maste.Fx 56460ad988SMateusz Piotrowskiversion and architecture. 57460ad988SMateusz Piotrowski.Pp 58460ad988SMateusz PiotrowskiIn general, binary updates are available for ALPHA, BETA, RC, and RELEASE 59460ad988SMateusz Piotrowskiversions of 60460ad988SMateusz Piotrowski.Fx , 61460ad988SMateusz Piotrowskie.g.: 62460ad988SMateusz Piotrowski.Bl -item -offset indent -compact 63460ad988SMateusz Piotrowski.It 64460ad988SMateusz Piotrowski.Fx 13.1-ALPHA3 65460ad988SMateusz Piotrowski.It 66460ad988SMateusz Piotrowski.Fx 13.1-BETA2 67460ad988SMateusz Piotrowski.It 68460ad988SMateusz Piotrowski.Fx 13.1-RC1 69460ad988SMateusz Piotrowski.It 70460ad988SMateusz Piotrowski.Fx 13.1-RELEASE 71460ad988SMateusz Piotrowski.El 72460ad988SMateusz PiotrowskiThey are not available for branches such as PRERELEASE, STABLE, and CURRENT, 73460ad988SMateusz Piotrowskie.g.: 74460ad988SMateusz Piotrowski.Bl -item -offset indent -compact 75460ad988SMateusz Piotrowski.It 76460ad988SMateusz Piotrowski.Fx 13.0-PRERELEASE 77460ad988SMateusz Piotrowski.It 78460ad988SMateusz Piotrowski.Fx 13.1-STABLE 79460ad988SMateusz Piotrowski.It 80460ad988SMateusz Piotrowski.Fx 14.0-CURRENT 81460ad988SMateusz Piotrowski.El 82460ad988SMateusz Piotrowski.Pp 83460ad988SMateusz PiotrowskiIn particular, the 84764dd6b4SColin Percival.Fx 854c1c516cSGraham PerrinSecurity Team only builds updates for releases shipped in binary form by the 86764dd6b4SColin Percival.Fx 87460ad988SMateusz PiotrowskiRelease Engineering Team. 8848ffe56aSColin Percival.Sh OPTIONS 89344c81a1SWarren BlockThe following options are supported: 908935f242SAllan Jude.Bl -tag -width "-r newrelease" 9148ffe56aSColin Percival.It Fl b Ar basedir 9248ffe56aSColin PercivalOperate on a system mounted at 9348ffe56aSColin Percival.Ar basedir . 9448ffe56aSColin Percival(default: 9548ffe56aSColin Percival.Pa / , 9648ffe56aSColin Percivalor as given in the configuration file.) 9748ffe56aSColin Percival.It Fl d Ar workdir 9848ffe56aSColin PercivalStore working files in 9948ffe56aSColin Percival.Ar workdir . 10048ffe56aSColin Percival(default: 10148ffe56aSColin Percival.Pa /var/db/freebsd-update/ , 10248ffe56aSColin Percivalor as given in the configuration file.) 10348ffe56aSColin Percival.It Fl f Ar conffile 10448ffe56aSColin PercivalRead configuration options from 10548ffe56aSColin Percival.Ar conffile . 10648ffe56aSColin Percival(default: 10748ffe56aSColin Percival.Pa /etc/freebsd-update.conf ) 1088935f242SAllan Jude.It Fl F 1098935f242SAllan JudeForce 1108935f242SAllan Jude.Nm Cm fetch 111df7e2e0dSEd Masteto proceed in the case of an unfinished upgrade. 112c76da1f0SFaraz Vahedi.It Fl j Ar jail 113c76da1f0SFaraz VahediOperate on the given jail specified by 114c76da1f0SFaraz Vahedi.Va jid 115c76da1f0SFaraz Vahedior 116c76da1f0SFaraz Vahedi.Va name . 117c76da1f0SFaraz Vahedi(The version of the installed userland is detected and the 118c76da1f0SFaraz Vahedi.Fl -currently-running 119c76da1f0SFaraz Vahedioption is no more required.) 12048ffe56aSColin Percival.It Fl k Ar KEY 12148ffe56aSColin PercivalTrust an RSA key with SHA256 of 12248ffe56aSColin Percival.Ar KEY . 12348ffe56aSColin Percival(default: read value from configuration file.) 124db6b0a61SColin Percival.It Fl r Ar newrelease 12518a52cf4SEd MasteSpecify the new release (e.g., 11.2-RELEASE) to which 126db6b0a61SColin Percival.Nm 12715647a71SMateusz Piotrowskishould upgrade 12815647a71SMateusz Piotrowski.Pq Cm upgrade No command only . 12948ffe56aSColin Percival.It Fl s Ar server 13048ffe56aSColin PercivalFetch files from the specified server or server pool. 13148ffe56aSColin Percival(default: read value from configuration file.) 13248ffe56aSColin Percival.It Fl t Ar address 13348ffe56aSColin PercivalMail output of 13448ffe56aSColin Percival.Cm cron 13548ffe56aSColin Percivalcommand, if any, to 13648ffe56aSColin Percival.Ar address . 13748ffe56aSColin Percival(default: root, or as given in the configuration file.) 1388935f242SAllan Jude.It Fl -not-running-from-cron 1398935f242SAllan JudeForce 1408935f242SAllan Jude.Nm Cm fetch 14115647a71SMateusz Piotrowskito proceed when there is no controlling 14215647a71SMateusz Piotrowski.Xr tty 4 . 1438935f242SAllan JudeThis is for use by automated scripts and orchestration tools. 1448935f242SAllan JudePlease do not run 1458935f242SAllan Jude.Nm Cm fetch 14615647a71SMateusz Piotrowskifrom 14715647a71SMateusz Piotrowski.Xr crontab 5 14815647a71SMateusz Piotrowskior similar using this flag, see: 1498935f242SAllan Jude.Nm Cm cron 150b39ce43eSColin Percival.It Fl -currently-running Ar release 1514c1c516cSGraham PerrinDo not detect the currently-running release; instead, assume that the system is 1524c1c516cSGraham Perrinrunning the specified 153b39ce43eSColin Percival.Ar release . 154b39ce43eSColin PercivalThis is most likely to be useful when upgrading jails. 15548ffe56aSColin Percival.El 15648ffe56aSColin Percival.Sh COMMANDS 15748ffe56aSColin PercivalThe 15848ffe56aSColin Percival.Cm command 15948ffe56aSColin Percivalcan be any one of the following: 1608935f242SAllan Jude.Bl -tag -width "rollback" 16148ffe56aSColin Percival.It Cm fetch 1624c1c516cSGraham PerrinBased on the currently installed world and the configuration options set, fetch 1634c1c516cSGraham Perrinall available binary updates. 16448ffe56aSColin Percival.It Cm cron 1654c1c516cSGraham PerrinSleep a random amount of time between 1 and 3600 seconds, then download updates 1664c1c516cSGraham Perrinas if the 16748ffe56aSColin Percival.Cm fetch 16848ffe56aSColin Percivalcommand was used. 1694c1c516cSGraham PerrinIf updates are downloaded, an email will be sent (to root or a different 1704c1c516cSGraham Perrinaddress if specified via the 17148ffe56aSColin Percival.Fl t 17248ffe56aSColin Percivaloption or in the configuration file). 1734c1c516cSGraham PerrinAs the name suggests, this command is designed for running from 17448ffe56aSColin Percival.Xr cron 8 ; 1754c1c516cSGraham Perrinthe random delay serves to minimize the probability that a large number of 1764c1c516cSGraham Perrinmachines will simultaneously attempt to fetch updates. 177db6b0a61SColin Percival.It Cm upgrade 178db6b0a61SColin PercivalFetch files necessary for upgrading to a new release. 1794c1c516cSGraham PerrinBefore using this command, make sure that you read the announcement and release 1804c1c516cSGraham Perrinnotes for the new release in case there are any special steps needed for 1814c1c516cSGraham Perrinupgrading. 182adbcc996SColin PercivalNote that this command may require up to 500 MB of space in 183adbcc996SColin Percival.Ar workdir 184adbcc996SColin Percivaldepending on which components of the 185adbcc996SColin Percival.Fx 186adbcc996SColin Percivalbase system are installed. 1878cfda118SMichael Gmelin.It Cm updatesready 1888cfda118SMichael GmelinCheck if there are fetched updates ready to install. 1898cfda118SMichael GmelinReturns exit code 2 if there are no updates to install. 19048ffe56aSColin Percival.It Cm install 191db6b0a61SColin PercivalInstall the most recently fetched updates or upgrade. 1924c1c516cSGraham PerrinReturns exit code 2 if there are no updates to install and the 1938cfda118SMichael Gmelin.Cm fetch 1944c1c516cSGraham Perrincommand wasn't passed as an earlier argument in the same invocation. 19548ffe56aSColin Percival.It Cm rollback 19648ffe56aSColin PercivalUninstall the most recently installed updates. 19708e23beeSColin Percival.It Cm IDS 1984c1c516cSGraham PerrinCompare the system against a "known good" index of the installed release. 1998cfda118SMichael Gmelin.It Cm showconfig 2004c1c516cSGraham PerrinShow configuration options after parsing conffile and command line options. 20148ffe56aSColin Percival.El 20248ffe56aSColin Percival.Sh TIPS 20348ffe56aSColin Percival.Bl -bullet 20448ffe56aSColin Percival.It 20548ffe56aSColin PercivalIf your clock is set to local time, adding the line 20648ffe56aSColin Percival.Pp 20748ffe56aSColin Percival.Dl 0 3 * * * root /usr/sbin/freebsd-update cron 20848ffe56aSColin Percival.Pp 20915647a71SMateusz Piotrowskito 21015647a71SMateusz Piotrowski.Pa /etc/crontab 21115647a71SMateusz Piotrowskiwill check for updates every night. 2124c1c516cSGraham PerrinIf your clock is set to UTC, please pick a random time other than 3AM, to avoid 2134c1c516cSGraham Perrinoverly imposing an uneven load on the server(s) hosting the updates. 21408e23beeSColin Percival.It 21508e23beeSColin PercivalIn spite of its name, 21663d46d1dSUlrich Spörlein.Nm 2174c1c516cSGraham PerrinIDS should not be relied upon as an "Intrusion Detection System", since if the 2184c1c516cSGraham Perrinsystem has been tampered with it cannot be trusted to operate correctly. 2194c1c516cSGraham PerrinIf you intend to use this command for intrusion-detection purposes, make sure 2204c1c516cSGraham Perrinyou boot from a secure disk (e.g., a CD). 22148ffe56aSColin Percival.El 22232f45927SMateusz Piotrowski.Sh ENVIRONMENT 22332f45927SMateusz Piotrowski.Bl -tag -width "PAGER" 22432f45927SMateusz Piotrowski.It Ev PAGER 22532f45927SMateusz PiotrowskiThe pager program used to present various reports during the execution. 22632f45927SMateusz Piotrowski.Po 22732f45927SMateusz PiotrowskiDefault: 22832f45927SMateusz Piotrowski.Dq Pa /usr/bin/less . 22932f45927SMateusz Piotrowski.Pc 23032f45927SMateusz Piotrowski.Pp 23132f45927SMateusz Piotrowski.Ev PAGER 23232f45927SMateusz Piotrowskican be set to 23332f45927SMateusz Piotrowski.Dq cat 23432f45927SMateusz Piotrowskiwhen a non-interactive pager is desired. 23532f45927SMateusz Piotrowski.El 23648ffe56aSColin Percival.Sh FILES 23748ffe56aSColin Percival.Bl -tag -width "/etc/freebsd-update.conf" 2382710751bSJoel Dahl.It Pa /etc/freebsd-update.conf 23948ffe56aSColin PercivalDefault location of the 24048ffe56aSColin Percival.Nm 24148ffe56aSColin Percivalconfiguration file. 2422710751bSJoel Dahl.It Pa /var/db/freebsd-update/ 24348ffe56aSColin PercivalDefault location where 24448ffe56aSColin Percival.Nm 24530beebe4SEd Mastestores temporary files, downloaded updates, and files required for rollback. 24630beebe4SEd MasteAll files under 24730beebe4SEd Maste.Pa /var/db/freebsd-update/ 24830beebe4SEd Mastemay be deleted if an upgrade is not in progress and rollback will not be 24930beebe4SEd Masterequired. 25048ffe56aSColin Percival.El 25148ffe56aSColin Percival.Sh SEE ALSO 2528f98a937SGordon Bergling.Xr freebsd-version 1 , 2538f98a937SGordon Bergling.Xr uname 1 , 254075999d3SMateusz Piotrowski.Xr freebsd-update.conf 5 , 255075999d3SMateusz Piotrowski.Xr nextboot 8 25648ffe56aSColin Percival.Sh AUTHORS 25701c2b8acSBaptiste Daroussin.An Colin Percival Aq Mt cperciva@FreeBSD.org 258a8c1ffcaSGraham Perrin.Sh BUGS 2594c1c516cSGraham PerrinIn patch level situations – for example, 13.2-RELEASE-p1 up to 2604c1c516cSGraham Perrin13.2-RELEASE-p2: if any previous modification to a file in 261a8c1ffcaSGraham Perrin.Pa /etc/ 262a8c1ffcaSGraham Perrinwill conflict with an available update, then 263a8c1ffcaSGraham Perrin.Nm 264a8c1ffcaSGraham Perrinwill make no attempt to merge. 265a8c1ffcaSGraham PerrinInstead: 266a8c1ffcaSGraham Perrin.Nm 267a8c1ffcaSGraham Perrinwill print a list of affected locally-modified files. 268