|Main index||Section 8||Options|
In a normal update operation, portsnap will routinely restore modified files to their unmodified state and delete unrecognized local files.
|Store working files (e.g. downloaded updates) in workdir. (default: /var/db/portsnap, or as given in the configuration file.)|
|Read the configuration from conffile. (default: /etc/portsnap.conf)|
| ||For the update command, update INDEX files, but not the rest of the ports tree.|
|Expect a public key with given SHA256 hash. (default: read value from configuration file.)|
|Merge the specified local describes file into the INDEX files being built. The descfile should be generated by running make describe in each of the local port directories.|
|When extracting or updating an uncompressed snapshot, operate on the directory portsdir. (default: /usr/ports/, or as given in the configuration file.)|
|Fetch files from the specified server or server pool. (default: portsnap.FreeBSD.org, or as given in the configuration file.)|
|path||For extract command only, operate only on parts of the ports tree starting with path. (e.g. portsnap extract sysutils/port would extract sysutils/portsman, sysutils/portsnap, sysutils/portupgrade, etc.)|
|override auto-detection of calling process. Only use this when calling portsnap from an interactive, non-terminal application. (Cron jobs are particularly bad since they cause load spikes on the Portsnap mirrors.)|
|fetch||Fetch a compressed snapshot of the ports tree, or update the existing snapshot. This command should only be used interactively; for non-interactive use, you should use the cron command.|
|cron||Sleep a random amount of time between 1 and 3600 seconds, then operate as if the fetch command was specified. As the name suggests, this command is designed for running from cron(8); the random delay serves to minimize the probability that a large number of machines will simultaneously attempt to fetch updates.|
Extract a ports tree, replacing existing files and directories.
NOTE: This will remove anything occupying the location where
files or directories are being extracted; in particular, any
changes made locally to the ports tree (for example, adding new
patches) will be silently obliterated.
Only run this command to initialize your portsnap-maintained ports tree for the first time, if you wish to start over with a clean, completely unmodified tree, or if you wish to extract a specific part of the tree (using the path option).
|update||Update a ports tree extracted using the extract command. You must run this command to apply changes to your ports tree after downloading updates via the fetch or cron commands. Again, note that in the parts of the ports tree which are being updated, any local changes or additions will be removed.|
|auto||Run fetch or cron depending on whether stdin is a terminal; then run update or extract depending on whether portsdir exists.|
0 3 * * * root /usr/sbin/portsnap cron
to /etc/crontab is a good way to make sure you always have an up-to-date snapshot of the ports tree available which can quickly be extracted into /usr/ports. If your clock is set to UTC, please pick a random time other than 3AM, to avoid overly imposing an uneven load on the server(s) hosting the snapshots.
Note that running portsnap cron or portsnap fetch does not apply the changes that were received: they only download them. To apply the changes, you must follow these commands with portsnap update. The portsnap update command is normally run by hand at a time when you are sure that no one is manually working in the ports tree.
Statistical data generated from information collected in this manner may be published, but only in aggregate and after anonymizing the individual systems.
|Default location of the portsnap configuration file.|
|/var/db/portsnap||Default location where compressed snapshots are stored.|
|/usr/ports||Default location where the ports tree is extracted.|
|FreeBSD||PORTSNAP (8)||March 1, 2016|
|Main index||Section 8||Options|
|“|| A UNIX saleslady, Lenore,
Enjoys work, but she likes the beach more.
She found a good way
To combine work and play:
She sells C shells by the seashore.