xref: /freebsd/usr.sbin/freebsd-update/freebsd-update.8 (revision f856af0466c076beef4ea9b15d088e1119a945b8)
1.\"-
2.\" Copyright 2006 Colin Percival
3.\" All rights reserved
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted providing that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
18.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
23.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24.\" POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd August 30, 2006
29.Dt FREEBSD-UPDATE 8
30.Os FreeBSD
31.Sh NAME
32.Nm freebsd-update
33.Nd fetch and install binary updates to FreeBSD
34.Sh SYNOPSIS
35.Nm
36.Op Fl b Ar basedir
37.Op Fl d Ar workdir
38.Op Fl f Ar conffile
39.Op Fl k Ar KEY
40.Op Fl s Ar server
41.Op Fl t Ar address
42.Cm command ...
43.Sh DESCRIPTION
44The
45.Nm
46tool is used to fetch, install, and rollback binary
47updates to the FreeBSD base system.
48Note that updates are only available if they are being built for the
49FreeBSD release and architecture being used; in particular, the
50.Fx
51Security Team only builds updates for releases shipped in binary form
52by the
53.Fx
54Release Engineering Team, e.g.,
55.Fx
566.1-RELEASE and
57.Fx
586.2-RC1, but not
59.Fx
606.2-STABLE or
61.Fx
627.0-CURRENT.
63.Sh OPTIONS
64The following options are supported
65.Bl -tag -width "-f conffile"
66.It Fl b Ar basedir
67Operate on a system mounted at
68.Ar basedir .
69(default:
70.Pa / ,
71or as given in the configuration file.)
72.It Fl d Ar workdir
73Store working files in
74.Ar workdir .
75(default:
76.Pa /var/db/freebsd-update/ ,
77or as given in the configuration file.)
78.It Fl f Ar conffile
79Read configuration options from
80.Ar conffile .
81(default:
82.Pa /etc/freebsd-update.conf )
83.It Fl k Ar KEY
84Trust an RSA key with SHA256 of
85.Ar KEY .
86(default: read value from configuration file.)
87.It Fl s Ar server
88Fetch files from the specified server or server pool.
89(default: read value from configuration file.)
90.It Fl t Ar address
91Mail output of
92.Cm cron
93command, if any, to
94.Ar address .
95(default: root, or as given in the configuration file.)
96.El
97.Sh COMMANDS
98The
99.Cm command
100can be any one of the following:
101.Pp
102.Bl -tag -width "-f conffile"
103.It Cm fetch
104Based on the currently installed world and the configuration
105options set, fetch all available binary updates.
106.It Cm cron
107Sleep a random amount of time between 1 and 3600 seconds,
108then download updates as if the
109.Cm fetch
110command was used.
111If updates are downloaded, an email will be sent
112(to root or a different address if specified via the
113.Fl t
114option or in the configuration file).
115As the name suggests, this command is designed for running
116from
117.Xr cron 8 ;
118the random delay serves to minimize the probability that
119a large number of machines will simultaneously attempt to
120fetch updates.
121.It Cm install
122Install the most recently fetched updates.
123.It Cm rollback
124Uninstall the most recently installed updates.
125.El
126.Sh TIPS
127.Bl -bullet
128.It
129If your clock is set to local time, adding the line
130.Pp
131.Dl 0 3 * * * root /usr/sbin/freebsd-update cron
132.Pp
133to /etc/crontab will check for updates every night.
134If your clock is set to UTC, please pick a random time
135other than 3AM, to avoid overly imposing an uneven load
136on the server(s) hosting the updates.
137.El
138.Sh FILES
139.Bl -tag -width "/etc/freebsd-update.conf"
140.It /etc/freebsd-update.conf
141Default location of the
142.Nm
143configuration file.
144.It /var/db/freebsd-update/
145Default location where
146.Nm
147stores temporary files and downloaded updates.
148.El
149.Sh SEE ALSO
150.Xr freebsd-update.conf 5
151.Sh AUTHORS
152.An Colin Percival Aq cperciva@FreeBSD.org
153