Updates
How the Client App finds, downloads and installs an Update, and then upgrades the installation on this computer.
An Update is a newer release of the Client App. The Client App finds, downloads and installs each Update itself (ADR-0027), on macOS and from the AppImage and the deb on Linux.
Check and download
-
When it checks. After setup, the Client App reads the releases of Pagis on GitHub when it starts, and every 24 hours while it runs. It does not take a prerelease.
-
Which release. A Client App that installed Pagis on this computer takes the latest release. A Client App that is connected to a server takes only the oldest release of its stored servers (Connect to a server).
-
Check for Updates… in the tray menu checks immediately. It is also in the Pagis menu on macOS, and in the File menu of the window on Linux. A message box shows the result: Pagis is up to date (or up to date with its server), an Update downloads, or the reason why the check failed.
-
The download. When the Client App finds an Update, it downloads it and asks no question. The menus show the progress, for example "Downloading Pagis 0.2.0… 40%".
-
The checks. The download must have the SHA-512 and the size that the feed of the release gives. Then the Client App checks the new release:
- On macOS, macOS checks that the new app has the signature of the Pagis team.
- On Linux, the Client App downloads
Pagis-<release>-linux.SHA256SUMSand its Ed25519 signaturePagis-<release>-linux.SHA256SUMS.sigfrom the release. The signature must verify with the Pagis Update Key in the package, and the SHA-256 of the download must be the value on its line of the list.
When a check fails, the menus show "Check for Updates…" again, and nothing installs.
-
The preparation. A Client App that installed Pagis on this computer then prepares the restart, and the menus show "Preparing Pagis 0.2.0…". It downloads the Server Package of the new release, and the server on this computer pulls the Computer Image of that release. The new Client App uses the downloaded package only when its bytes match the Runtime Lock that the new Client App contains. When a step fails, the Update continues, and the new Client App and its server download what is missing. A connected Client App prepares nothing.
-
Ready. The menus then show "Restart to Update", and the Client App sends one notification.
A Client App with no setup does not check for Updates. The Quickstart gives the latest release. An Update before setup could be newer than the server that the Client App then connects to, and the new Client App would refuse that server.
Install the Update
- Restart to Update stops the server on this computer, installs the Update and starts the new Client App. A restart stops each Run that has not finished. When Runs are in progress, the Client App tells you how many, and asks before it continues. A connected Client App asks no question, because the Runs belong to its server.
- Quit Pagis also installs a downloaded Update. The next start opens the new Client App.
- The AppImage replaces its own file, and the new file has the name of the new release. The Client App writes the "Open at login" entry again for the new file.
- The deb installs with
pkexec dpkg -i, and you type your password. It installs only from Restart to Update, and not at quit, because a password prompt at quit or at logout stops the shutdown.
The Upgrade at the next start
The new Client App upgrades the installation on this computer when it starts, and asks no setup question. The window shows each step:
- The
pagiscommand of the old release makes a Backup at~/.pagis/backups/<old release>. - The Client App installs the server of its own release and starts it. The server migrates the data.
- The Client App removes the Backup of the Upgrade before it, and the files of the other releases.
When the Backup fails, the Upgrade stops before the data changes, and the window offers Retry and "Continue without a Backup". After the new server starts, the old release does not start again. Back up and restore tells how to restore the Backup.
Pagis has no setting that turns off the check or the download, and no beta or other release channel.