Global Rolling Updater (GRU current) is an automatic update system, a set of specifications, and general deployment principles. A well-known project that uses GRU is Tor Portable.
- A program that adheres to GRU stores itself in an archive via a permanent link. Archive formats for GRU must be widely known and cross-platform, such as .zip. Depending on the specific implementation, the method of preserving the link may vary; one of them is to keep the archive name unchanged (IPNS).
- The current version of the program can be specified via a special file (let's call it VERSION for example) inside the archive itself, in its interface, in the properties of binary files, or in the directory with archives. It is recommended to place it in the directory with archives and in the archives themselves, as this provides the most information for both the user and the program. Auto-update is implemented by comparing the VERSION files inside the archive and in the directory with archives — it can be added to the code of any program, and it will connect to the main updater. For this reason, there should be no spaces in the VERSION file name: while PowerShell still works fine with them, curl has additional difficulties.
- The program, hosted on the GRU system, does not store the version history at the current link, instead always pointing to the latest one. This makes it convenient to hide previous versions and impossible to download them accidentally. In the case of IPNS, previous versions may remain in the file system.
- The update itself follows this pattern: 1) move the directory to the current one; 2) delete all files and directories in the folder, copying user files; 3) download the archive; 4) unpack the archive; 5) delete the archive and all temporary files. The implementations on Windows and Linux differ: Linux stores the executable script in RAM and makes it possible to hot-delete it, unlike Windows. Therefore, on Windows, it is necessary to create several scripts that run in parallel.
- On Linux, the reference deterministic deployment is to use portable libraries via
./ld-linux-x86-64.so.2 --library-path ., which allows any program to run in an identical environment, regardless of the distribution. GRU allows for lightning-fast updates of both the program itself and portable libraries, which should be used to unify the user experience when necessary.
This concludes the description of the GRU current specifications.
- Versatility. No separate programs need to be installed to comply with all specifications. The principles of the system can be compatible with a variety of file storage systems (IPNS and Dropbox have been tested). IPNS requires the use of republisher along with the portable Kubo version, Dropbox — changing its parameter from dl=0 to dl=1; IPNS fundamentally has no internal censorship and is open-source, Dropbox may be easier to use.
- The rolling release architecture ensures that the user will only receive the latest version of the application, avoiding outdated links.
- Support for updates starting with Windows 7 and on any Linux systems. Any update file is extremely small in size and generates an already unpacked program with a single click, avoiding restrictions on transferring large files.
- Preservation of execution bits and any metadata in unpacked files, unlike, for example, git-clone.
- Ability to transfer any type of information, including constantly updated collections of images and music.