2 .\" Copyright 2004-2005 Colin Percival
3 .\" All rights reserved
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted providing that the following conditions
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.
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.
28 .Dd September 15, 2008
33 .Nd fetch and extract compressed snapshots of the ports tree
48 tool is used to fetch and update compressed snapshots
51 ports tree, and extract and update an
52 uncompressed ports tree.
54 In a normal update operation,
56 will routinely restore modified files to their unmodified state and
57 delete unrecognized local files.
58 This behavior is different to
63 The following options are supported:
64 .Bl -tag -width "-f conffile"
66 Store working files (e.g.\& downloaded updates) in
69 .Pa /var/db/portsnap ,
70 or as given in the configuration file.)
72 Read the configuration from
75 .Pa /etc/portsnap.conf )
79 command, update INDEX files, but not the rest of the ports tree.
81 Expect a public key with given SHA256 hash.
82 (default: read value from configuration file.)
84 Merge the specified local describes file into the INDEX files being
88 should be generated by running
90 in each of the local port directories.
92 When extracting or updating an uncompressed snapshot,
93 operate on the directory
97 or as given in the configuration file.)
99 Fetch files from the specified server or server pool.
100 (default: portsnap.FreeBSD.org , or as given in the
105 command only, operate only on parts of the ports tree starting with
111 would extract sysutils/portsman, sysutils/portsnap,
112 sysutils/portupgrade, etc.)
117 can be any one of the following:
119 .Bl -tag -width "-f conffile"
121 Fetch a compressed snapshot of the ports tree, or update
122 the existing snapshot.
123 This command should only be used interactively; for
124 non-interactive use, you should use the
128 Sleep a random amount of time between 1 and 3600 seconds,
129 then operate as if the
131 command was specified.
132 As the name suggests, this command is designed for running
135 the random delay serves to minimize the probability that
136 a large number of machines will simultaneously attempt to
139 Extract a ports tree, replacing existing files and directories.
140 NOTE: This will remove anything occupying the location where
141 files or directories are being extracted; in particular, any
142 changes made locally to the ports tree (for example, adding new
143 patches) will be silently obliterated.
145 Only run this command to initialize your portsnap-maintained
146 ports tree for the first time, if you wish to start over with
147 a clean, completely unmodified tree, or if you wish to extract
148 a specific part of the tree (using the
152 Update a ports tree extracted using the
155 You must run this command to apply changes to your ports tree
156 after downloading updates via the
161 Again, note that in the parts of the ports tree which are being
162 updated, any local changes or additions will be removed.
167 If your clock is set to local time, adding the line
169 .Dl 0 3 * * * root /usr/sbin/portsnap cron
171 to /etc/crontab is a good way to make sure you always have
172 an up-to-date snapshot of the ports tree available which
173 can quickly be extracted into
175 If your clock is set to UTC, please pick a random time other
176 than 3AM, to avoid overly imposing an uneven load on the
177 server(s) hosting the snapshots.
184 is a bad idea -- if you are ever installing or updating a
185 port at the time the cron job runs, you will probably end up
188 updates or removes files which are being used by the port
194 is probably safe, and can be used together with
196 to identify installed software which is out of date.
200 to keep a large number of machines up to date, you may wish
201 to set up a caching HTTP proxy.
206 to download updates, setting the
208 environment variable will direct it to fetch updates from
210 This is much more efficient than
212 the files on the portsnap server, since the vast majority
213 of files are not needed by any particular client.
216 As an unavoidable part of its operation, a machine running
218 will make its public IP address and the list of files it fetches
219 available to the server from which it fetches updates.
220 Using these it may be possible to recognize a machine over an extended
221 period of time, determine when it is updated, and identify which
222 portions of the FreeBSD ports tree, if any, are being ignored using
223 "REFUSE" directives in
225 In addition, the FreeBSD release level is transmitted to the server.
227 Statistical data generated from information collected in this manner
228 may be published, but only in aggregate and after anonymizing the
231 .Bl -tag -width "/etc/portsnap.conf"
232 .It /etc/portsnap.conf
233 Default location of the portsnap configuration file.
235 Default location where compressed snapshots are stored.
237 Default location where the ports tree is extracted.
245 .An Colin Percival Aq cperciva@FreeBSD.org