Installing Software

Package Layers (RakuOS 45)

This page is about RakuOS 45, the staging channel. RakuOS 44 (stable) still keeps your packages in a single overlay; it moves to package layers when RakuOS 45 is released.

On RakuOS 45 the packages you install with rum or the Software Center go into package layers: separate stacks of files placed over the read-only system image. You use rum and the Software Center the same way as before. What's new:

  • Installs and removals work right away, without a reboot, and a failed install changes nothing.
  • When an update arrives, your packages are prepared for the new image before you reboot.
  • Every system version you can pick in the boot menu keeps its own packages, so going back to an older version gives you the packages you had with it.
  • RakuOS remembers your last changes, and you can go back to how your packages were before one of them.

Where is a package or file from?

rum origin tells you which layer something comes from:

rum origin htop              # htop: user layer (htop-3.4.1-1.fc45.x86_64)
rum origin bash              # bash: image (bash-5.3.15-2.fc45.x86_64)
rum origin /usr/bin/htop     # /usr/bin/htop: user layer; from htop-3.4.1-1.fc45.x86_64

For a file, it names the layer whose copy you see in /usr and the package it belongs to. It also tells you when a file is covering another copy below it, or is hidden by rum override remove. Package counters like fastfetch show your installed packages as "(rum)", next to the system image's "(rpm)".

The layers

You don't choose a layer: rum puts each package where it belongs. Each layer that holds packages keeps its own package database, so going back to an earlier set brings back exactly the packages that went with it.

The layers live in /var/lib/rakuos/layers, and only rum can change them: everything else, sudo included, gets "Read-only file system" there. Change your packages with rum, the Software Center or RakuOS System, never by hand in that folder.

LayerWhat's in it
systemRakuOS's own settings, like your sudo and coreutils choices
localsoftware you installed yourself (see below)
local-rpmpackages you installed from a downloaded .rpm file
overridesystem packages you replaced or removed
usereverything else you installed
develdevelopment packages, compilers and build tools
driverskernel drivers and what they need

Undoing a change

Each time you install, remove or update packages, RakuOS keeps the set you had before: the last 5 changes. Going back takes effect right away, and the set you leave is kept too, so you can switch back again.

In RakuOS System: open Deployments and scroll to Package layer history. Each row says which change it undoes ("Before rum install htop") and what going back removes or brings back. Click Go Back to This and confirm.

In a terminal:

rum layer-history            # list the earlier sets, newest first
sudo rum layer-rollback      # go back to the newest one
sudo rum layer-rollback 3    # or to set number 3

Updates made after that set are undone as well, so run updates again afterwards if you only wanted to remove one app.

If the desktop doesn't start after a change

  • In the boot menu, open RakuOS previous package layers and pick the first entry. RakuOS starts with the packages you had before the last change.
  • You don't have to do anything if the system fails to start twice in a row after a package change: the third start goes back to the previous set by itself.

Either way, sudo rum layer-rollback brings back the set it left if you want it again.

Updates

When you update from the Software Center (or run sudo rum system-upgrade), the new system image is downloaded first. Then RakuOS prepares your packages for it, upgrading them against the new image, before you reboot. Nothing changes on the running system until then.

This happens however the update or switch is started: the Software Center, RakuOS System, or sudo bootc upgrade and sudo bootc switch in a terminal. sudo bootc upgrade --apply also prepares your packages first and then reboots.

  • While an update is waiting, the Software Center doesn't list separate package updates: the update already takes care of them.
  • If you install or remove packages while an update is waiting for a reboot, the prepared packages are thrown away and the update starts with your current ones. Run sudo rum layer-prepare to prepare them again.
  • Switching to another desktop (for example KDE to GNOME with bootc switch or RakuOS System) reinstalls your packages for the new desktop before the reboot, so the first start doesn't have to. You'll see "The new image has another desktop … reinstalling your packages for it." If that fails, the first start reinstalls them instead, as before.
  • Moving to a new RakuOS release still reinstalls your packages on the first start of the new release, as before. Keep the network connected.

Going back to an older version in the boot menu, or with Roll Back in RakuOS System, gives you that version's own packages. See Rolling Back.

Changing system packages

You can replace a package that comes with RakuOS with another version, or hide one you don't want, without building your own image:

sudo rum override replace mesa-vulkan-drivers   # use the newest version from the repos
sudo rum override replace ./my-build.rpm        # or a downloaded .rpm file
sudo rum override remove gnome-tour             # hide a system package
rum override list                               # what you changed
sudo rum override reset gnome-tour              # back to the system's own version
  • A replacement is dropped by itself once a RakuOS update ships that version or newer.
  • Removing is refused while something else still needs the package. Core packages (the kernel, glibc, systemd, rpm, bootc and a few more) can't be changed at all.
  • Removing a package hides its files under /usr; its settings in /etc stay.

Programs that write into /usr

/usr is read-only on RakuOS 45. Scripts that patch an installed app or install into /usr stop with "Read-only file system". Run them with rum layer-run, naming the layer the app lives in: user for apps installed from the repos, local-rpm for apps installed from a downloaded .rpm file.

# Example: SpotX for the Spotify RPM (apps from rum are in the user layer)
sudo rum layer-run user -- bash -c 'bash <(curl -sSL https://spotx-official.github.io/run.sh)'
rm -rf ~/.cache/spotify

# Software you build yourself goes in the local layer
sudo rum layer-run local -- make install PREFIX=/usr

Run a patch again after the app updates. If a patch goes wrong, sudo rum layer-rollback undoes it. Plain scripts can also go in /usr/local, which stays writable.

The first start of RakuOS 45

The first time you start a RakuOS 45 image with package layers, RakuOS reinstalls your packages once into the new layers (the same as a soft reset). Keep the network connected. After that, nothing is reinstalled when you start up, update or roll back, except when moving to a new RakuOS release.

If you were already testing package layers on staging, the first image where each layer has its own package database reinstalls your packages once more, and clears the list of earlier package sets (those can't be restored in the new layout).

Resetting

A soft reset still rebuilds your packages from your package list. On RakuOS 45 it also keeps the software you installed yourself into the local layer and your system package changes (overrides). A full reset removes all of that. Try Go Back to This or sudo rum layer-rollback first: it's quicker and reinstalls nothing. See Resetting Your Apps.