Skip to content

Packages

rat installs and removes packages: programs that are not part of the ginnOS image, such as Lua. rat gets them from the ginnOS repository on GitHub, over the network.

$ rat update
Updated the package index: 3 packages, 2026-12-02.
$ rat install lua
lua-5.4.9-1-x86_64.rat  100%  131.7 KiB of 131.7 KiB
Installed lua 5.4.9-1.
$ lua -v
Lua 5.4.9  Copyright (C) 1994-2026 Lua.org, PUC-Rio
$ rat remove lua
Removed lua 5.4.9-1.

update, install, upgrade, remove and clean need root. In the text session the shell is root already; on the desktop, use su. The other commands work for every user.

The packages

Package What it is
lua the Lua 5.4 interpreter, /bin/lua
sdldemo a small SDL 3 program: a moving ball, drawing with the mouse, and a tone on Space
mbedtls-selftest the self test of the mbedTLS cryptography library

rat search lists the packages of the index that rat update got last.

The commands

Command What it does
rat update get the package index of the repository and check its signature
rat search [WORD] list the packages of the index whose name or description has the word; * marks an installed package
rat install NAME... download packages of the index, check them, and install or upgrade them
rat install FILE.rat... install or upgrade with package files from the disk
rat install --force ... install, and replace files that no package owns
rat install --downgrade ... replace an installed package with an older version
rat upgrade [NAME...] upgrade the installed packages that the index has in a newer version; all of them without a name
rat upgrade -y ... upgrade without the question
rat remove NAME... remove installed packages
rat list list the installed packages, with version and description; + marks a package with a newer version in the index, - one that the index does not have
rat info NAME show the details of a package, installed or in the index
rat info FILE.rat show the details of a package file, without installing it
rat files NAME list the folders, files and links of an installed package
rat owner PATH... show the package that owns a path, or base system
rat verify [NAME...] compare the installed files with the record; all packages without a name
rat clean remove the downloaded packages that an interrupted install left
rat --root DIR COMMAND work on the root file system in DIR, not on /
rat --help show the commands

rat exits with status 0 on success, 1 when a command fails, verify finds a difference, or you answer no to upgrade, and 2 for a wrong command line.

Upgrades

$ rat update
Updated the package index: 3 packages, 2026-12-20.
$ rat upgrade
1 package to upgrade:
  lua  5.4.9-1 -> 5.4.9-2
Download: 131.9 KiB.
Continue? [y/N] y
lua-5.4.9-2-x86_64.rat  100%  131.9 KiB of 131.9 KiB
Upgraded lua 5.4.9-1 to 5.4.9-2.

rat upgrade asks before the change. When its input is not a terminal (a script), it needs -y. Each package is its own change: if one fails, the packages before it stay upgraded. A package that the repository does not have any more stays installed, and rat list marks it with -.

rat install lua upgrades lua too. An older package file needs --downgrade:

$ rat install lua-5.4.9-1-x86_64.rat
rat: cannot install lua: lua 5.4.9-2 is installed, which is newer than 5.4.9-1 (--downgrade installs the older version)

Settings files

The files of a package under /etc are settings files. rat keeps your changes to them:

  • When an upgrade changes a settings file that you changed, your file stays and the new one goes next to it with .ratnew at the end. Compare the two and merge what you need.
  • rat remove keeps a settings file that you changed, and removes its .ratnew file. When you install the package again, your file stays, and the new one goes to .ratnew. --force replaces it.
$ rat upgrade -y
rat: /etc/hello/hello.conf stays as it is; the new version is /etc/hello/hello.conf.ratnew
Upgraded hello 1.0-1 to 2.0-1.

rat verify reports a settings file that stayed as changed.

Which packages rat trusts

rat update gets two files: index.conf, the list of packages with the size and the SHA-256 of each file, and index.conf.sig, its signature. rat accepts the index only when one of the keys in /etc/rat/keys verifies the signature, and only when it is not older than the index that rat has. rat install NAME then accepts a download only when its size and its SHA-256 are those of the index. So a package that comes by name is one that the ginnOS maintainers signed, from any server.

A package file that you install from the disk (rat install FILE.rat) has no signature. rat installs it, as root can put any file on the disk, and says that it is not from the repository.

Message What to do
there is no package index yet; run rat update run rat update
the package index is 45 days old; run rat update a warning: run rat update to see newer packages
index.conf.sig: the signature is not correct for any key in /etc/rat/keys the index is not from ginnOS, or was changed on the way; rat keeps the old index
the index of the repository is older than the one rat has the server gives an old index; rat keeps the newer one
the download of ... is damaged or the file is larger than ... bytes the file is not the one of the index; rat deletes it and changes nothing
the repository has no package lau; did you mean lua? check the name with rat search
cannot download ... check the network (see The network)

The repository of each architecture is in /etc/rat/repos.conf:

[x86_64]
url = https://github.com/lassedtu/ginnOS/releases/download/packages-x86_64

A file:/// URL uses a folder on the disk, for a computer without a network. The folder needs index.conf, index.conf.sig and the package files.

What rat refuses

rat checks the whole package before it changes a file. It refuses a package when:

  • the file is damaged or is not a rat package,
  • the package is for the other architecture (i686 or x86_64),
  • a path in the package is a file of the base system or of another package,
  • a file in the package is already on the disk and no package owns it. --force replaces such a file,
  • the same version of the package is installed, or a newer one (see --downgrade),
  • a folder of the installed version is a file in the new one. Remove the package first, then install the new version.

Changed files

rat verify reports each file that is missing, changed, of another type or with other permissions:

$ rat verify lua
lua: /bin/lua: changed
lua: /usr/share/doc/lua/COPYRIGHT: permissions 0700, not 0644

rat remove removes a changed file too, and says so, but not a changed settings file. A folder stays when another package or the base system uses it, or when it has other files in it.

Power cuts

If the power goes off during an install or a remove, the next rat install or rat remove finishes the change first and tells you which one it was. Until then, the other commands show a warning.

The image in RAM

When ginnOS starts from the image in RAM (no disk), rat warns before install and remove: the change is lost at the next boot.