f6f54932ed848e6b7e32c8496df196a25497a6f0 — Fred. Galusik 2 years ago 94c73b6
take care of last changes
1 files changed, 34 insertions(+), 19 deletions(-)

M README.md => README.md +34 -19
@@ 6,13 6,12 @@ An admin utility designed for the [OpenBSD operating system](http://www.openbsd.

It is made for users who use [-current](https://www.openbsd.org/faq/current.html) and jump from snapshot to snapshot.

It will help you to download the needed bsd.rd, check it and move it to the right place before rebooting.
A backup of your last bsd.rd is made. All steps are verbose.
**snaps** helps you to see if you need and/or can upgrade your -current BASE and PACKAGES system to next snapshots. It can show you when your system has been upgraded, which BASE snapshot you are using and compare it to your *$MIRROR* freshness in order to let you choose to run **sysupgrade** or not.

If you need to, it can also ckeck available mirrors and show you their BASE and PACKAGES build dates. Moreover, you can also read the online FAQ **Following -current and using snapshots** and see if you have to make some tweaks.

Nevertheless, **curl** and **links** (or **lynx**) from packages, are mandatory to run **snaps**.

It can be run with only the base system. Nevertheless if you install *curl*
from packages, it will check your $MIRROR build date of base and packages. You
will be able to decide if you want to do the update now or wait for the
synchronicity of the two directories.

## Usage

@@ 21,34 20,34 @@ Snaps will use your `/etc/installurl` file to setup automatically the `$MIRROR` 
You can also want to setup this variable manually:

$ MIRROR=http://another/openbsd/mirror/pub/OpenBSD doas snaps -G
$ MIRROR=http://another/openbsd/mirror/pub/OpenBSD doas snaps -s

Note that you have to indicate the root of the MIRROR followed with **/pub/OpenBSD**.
This one have to follow the OpenBSD [directory layout](http://www.openbsd.org/ftp.html#layout).

### -g
### -s

Fetch and check (SHA256 and signify) bsd.rd from $MIRROR (no need to be root for that one)
Check your BASE snapshot and your *$MIRROR* BASE and PACKAGES build dates to let you choose to run **sysupgrade -s** or not.

$ snaps -g
$ doas snaps -s

### -G
### -c

Fetch, check bsd.rd from $MIRROR then, move it to the right place, backup your last bsd.rd, print some reminders and reboot.
Check BASE and PACKAGES build dates from *$MIRROR*.

$ doas snaps -G
$ snaps -c

### -p
### -a

Update your -current port tree
Check BASE and PACKAGES build dates from all available online mirrors.

$ doas snaps -p
$ snaps -a

### -l

@@ 57,9 56,17 @@ List date and download places of the 3 last -G from /var/log/snaps.log

$ snaps -l
2016-04-30 22:16 FROM http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/amd64/
2016-05-10 11:03 FROM http://mirrors.ircam.fr/pub/OpenBSD/snapshots/amd64/
2016-05-14 11:11 FROM http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/amd64/
2020-04-18 22:16 FROM http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/amd64/
2020-05-02 11:03 FROM http://mirrors.ircam.fr/pub/OpenBSD/snapshots/amd64/
2016-05-09 13:37 FROM http://ftp.fr.openbsd.org/pub/OpenBSD/snapshots/amd64/

### -f

Read the online FAQ **Following -current and using snapshots**.

$ snaps -f

### -u

@@ 70,6 77,14 @@ Upgrade snaps to the last release.
$ doas snaps -u

### -p

Update the ports tree to -current.

$ doas snaps -p

### -h

Print help and exit. It also print the content of the MIRROR variable based upon /etc/pkg.conf for a quick look.