Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

431. Updating

This page is for anyone keeping a KDOS machine current or adding software to it. Most people only need From the desktop and Installing software; the rest is for administering an update from a terminal and finding out why one stopped.

Every KDOS package is built from a recipe that pins its version, so a newer KDOS arrives as a newer recipe tree, the ports tree at /ports. Three commands do the work:

Discover shows the same system update beside the applications’ updates and installs it through kdos-sysupdated. The ISO carries only a base set of software, so the same command also adds software: kdos update install puts a port, or a named group of them, into the running root, prebuilt from the release’s binhost or built here. Boxed applications are updated differently; see Updating boxed applications.

Installation

The timer is enabled on the live medium and on an installed system alike.

Configuration

/etc/kdos/update.conf

Not shipped. The first four keys name places, each a URL or a directory such as a mounted USB stick or an NFS share; the last two name how kdos update install installs. The binhost and image places hold a kdos-update.idx with its .sig, and every file is fetched from where that index says, never by its name:

Key Where kdos update fetch takes it from With no key
tree kdos-ports.tar.xz and its .sig the latest KDOS release on GitHub
binhost the release index through which the binhost index, PACKAGES and PACKAGES.sig, and the packages it names are found the release <tag> of a tree whose stamp names its release, whose index points into the releases binhost-<tag>-01, -02, …
image the release index through which the slot image manifest, kdos-image.manifest and its .sig, and its bundles are found the latest KDOS release, whose index points into the release image-<tag>
carry a path, under /etc or /var, carried into a slot when an update arms it (see A/B slots and rollback); one line per path nothing beyond the built-in list
install prebuilt or source: the route kdos update install takes when no flag names one prebuilt
build-deps prebuilt or source: for a source install, whether each dependency the machine lacks is downloaded or built too prebuilt

Any other value of install or build-deps makes kdos update install exit 2. The System Versions page’s update-source setting writes tree, and its Installing software section writes install and build-deps, both through kdos-sysupdated. A file pointing every download at a stick:

tree = /media/stick
binhost = /media/stick/binhost
image = /media/stick

$KDOS_UPDATE_BINHOST and $KDOS_UPDATE_IMAGE stand in for a missing binhost or image key. $KDOS_UPDATE_TREE is different: it overrides a tree = line, and kdos update fetch --from overrides both. sudo clears the environment, so a variable reaches the command only when it is set behind sudo: sudo env KDOS_UPDATE_TREE=/media/stick kdos update fetch. See /etc/kdos/update.conf.

/etc/kdos/keys/tree/

A fetched tree is unpacked only when its signature verifies against a *.pub in this directory. Its description, from fs/etc/kdos/keys/tree/README:

Trusted keys for the ports tree.

`kdos update fetch` replaces /ports with a published recipe tree only when
its signature (kdos-ports.tar.xz.sig) verifies against a `*.pub` here. The
build puts the public half of its release key here as kdos-release.pub:
the key `ports/publish --release` signs each system release with, kept in
build/keys/ on the machine that builds and never in git. An image built
without that key carries none, and fetches no tree.

A ring of its own, for the reason packs/ is one: a key that vouches for
recipes must not thereby vouch for packages or packs, and the reverse.
Adding a key is copying a file in; removing trust is deleting one.

fs/etc/kdos/keys/tree/README

The image step that fills it. An image built without the release key ships the ring empty, and then refuses every fetched tree:

RELEASE_PUB=/kdos/build/keys/kdos-release.pub
TREE_RING=/etc/kdos/keys/tree
mkdir -p "$TREE_RING"
rm -f "$TREE_RING"/*.pub
if [ -f "$RELEASE_PUB" ]; then
    install -m 0644 "$RELEASE_PUB" "$TREE_RING/kdos-release.pub"
    echo "  $TREE_RING trusts build/keys/kdos-release.pub"
else
    echo "  no build/keys/kdos-release.pub: $TREE_RING is empty and this image fetches no tree"
fi

script/phases/70_image/105_ports.sh, lines 185–194

/etc/kdos/keys/

The release index, the binhost index and the slot image manifest are kept only when their signature verifies against a *.pub directly in this directory; a release’s index is signed with both the release key and the binhost key. The image ships the two keys of the build that made it, kdos-binhost.pub and kdos-release.pub, when that build had them; an image built without them ships the directory with no key, and then all of them are recorded as no-key: kdos update apply refuses the image and binhost lanes, Discover offers no system update, and kdos update apply --source is the one way to update, by building here. Its description, from fs/etc/kdos/keys/README:

Trusted package-signing keys.

Every `*.pub` in this directory is a key this machine will accept a signature
from — for the binhost index (PACKAGES.sig) and for a package's own `.sig`
sidecar. Adding a key is copying a file in; removing trust is deleting one.
There is no revocation list and no online check: the directory IS the policy.

    kpkg keygen builder          # on the machine that builds
    cp builder.pub /etc/kdos/keys/   # on every machine that should trust it

A key id (16 hex characters, printed by kpkg) identifies a key. It is NOT a
credential: a signature file names the id so a person can be told which key
signed, and verification always uses the key from THIS directory.

THE IMAGE SHIPS ITS OWN BUILD'S TWO KEYS HERE: kdos-binhost.pub, which signs
its release's binhost, and kdos-release.pub, which signs the release index
and the slot image. Both come from the same build that made this image, so
trusting them is trusting whoever built the image, which booting the image
already is. They verify the release index, the binhost index (PACKAGES.sig),
each prebuilt package's .sig and the slot image's manifest, and nothing from
another builder. Delete them and this machine takes no prebuilt package and
no slot image; it still builds every port from source, whose integrity comes
from the `sha256 =` lines of its recipe. Add another builder's .pub to trust
that binhost too.

`packs/` IS SHIPPED WITH A KEY, and it is a different question. kdos-packd
checks an application pack's own signature, or a signed pack index (PACKAGES)
beside the packs being imported, against it. Nothing the build makes is signed
with that key and the build does not hold its secret half, so on a fresh system
it verifies nothing; add the `.pub` from `kdos-pack keygen` to trust packs you
sign yourself. It is a subdirectory because a keyring is a flat read of
`*.pub`: a key that vouches for a pack must not thereby vouch for a package
repository.

`tree/` holds the key that signs a published ports tree, which
`kdos update fetch` installs as /ports. The build puts its release key's public
half there; tree/README says how. It is a subdirectory for the same reason.

fs/etc/kdos/keys/README

/ports/TREE

The stamp naming the commit /ports was made from and when, and the release it is. kdos update fetch compares it with a fetched tree’s own stamp and refuses an older tree; a /ports with no stamp, from an image built without a commit, accepts any signed tree. The same step writes it:

if [ -n "${KDOS_GIT_COMMIT:-}" ]; then
    {
        echo "kdos-tree 1"
        echo "commit $KDOS_GIT_COMMIT"
        echo "time ${KDOS_GIT_TIME:-0}"
        [ -z "$release" ] || echo "version $release"
    } > "$TREE/TREE"
    chmod 0644 "$TREE/TREE"
    if [ -n "$release" ]; then
        echo "  /ports/TREE names release $release"
    elif [ -n "$tag" ]; then
        echo "  the checkout has changes: /ports/TREE does not name release $tag"
    else
        echo "  HEAD carries no tag: /ports/TREE names no release, and prebuilt installs need binhost = in update.conf"
    fi
else
    echo "  no commit given: /ports carries no TREE stamp"
fi

script/phases/70_image/105_ports.sh, lines 167–184

On a booted image it reads, with the image’s own commit, time and release:

kdos-tree 1
commit <short commit>
time <seconds since 1970>
version <release>

The version line names the release whose kdos-update.idx the binhost is found through. An image has it when it was built from a clean checkout of a tagged commit, and every tree a release published has it; an image without it finds no binhost until /etc/kdos/update.conf names one or a fetch installs the published tree (see Fetching a newer tree).

/etc/kpkg.conf

kdos update finds /ports through PORT_REPO in /etc/kpkg.conf: the tree’s root is the directory above the first repository it names. See kpkg.

The nightly check

# The installed packages older than their recipe in the tree already in
# place, which of them the signed binhost index already in the cache covers,
# and the update that makes this system current, into the update document.
# Its readers are kdos-sysupdated (the system update Discover shows, and the
# AppStream file it serves), the update tray (the Discover notifier's KDOS
# plugin) and kdos-notice. It downloads nothing: no tree, no index, no source.
# A newer tree and its index arrive only when somebody asks — Discover's
# "Check for updates", which kdos-sysupdated answers with
# `kdos update check --fetch`, or `kdos update fetch` typed at a shell — so no
# machine reaches the network on a schedule of its own. Nightly and NOT at
# midnight: the job reads the whole ports tree and every package entry.
#
# -s 8h is the missed-run rule and it is snooze's, not ours: a machine that was
# ASLEEP at 04:17 runs the job ONCE when it wakes, if it wakes within eight
# hours of the slot. Not once per missed occurrence — a laptop shut for a
# fortnight would otherwise run fourteen of them at breakfast.
#
# A machine that was OFF is a different case and this line does not cover it: a
# snooze started at boot begins looking one second from now, so the slot it
# slept through is simply tomorrow's. Reaching back needs `-t FILE`, and a
# timefile only the job itself may touch.
update-check  -H 4 -M 17 -s 8h  --  kdos update check --out /var/lib/kdos/update.json

fs/etc/kdos/timers.d/10-update-check.timer

State files

File Written by Holds
/var/lib/kdos/update.state fetch, apply The outcome of the last fetch of the tree, the release index with the binhost index, and the release index with the image manifest, and of the last apply: ok, absent, unverified, no-key, no-network, fetch-failed, build-failed, acquired or cancelled, with a time and a sentence
/var/lib/kdos/update.state.lock fetch, apply The lock both hold, so a tree is never replaced under a build
/var/lib/kdos/update.state.sig fetch The signature of the tree last installed
/var/lib/kdos/update.json The nightly check, fetch, apply, kdos-sysupdated at start What check --json found: what is behind, what is offered and by which lane; kdos-sysupdated serves Discover from it
/var/lib/kdos/binhost/ fetch, apply The verified binhost index, the release index it was fetched by (INDEX, INDEX.sig, ORIGIN), and the packages it names, kept until a newer index names others
/var/lib/kdos/image/offer/ fetch The verified manifest of the newest slot image and the release index that names its bundles
/var/lib/kdos/image/MANIFEST apply by the image lane The manifest of the image the root was written from, which the next image lane reads to pick its delta
/var/lib/kdos/world install The world set: each port installed on purpose, one name per line, which every update keeps installed
/var/lib/kdos/origin install, apply One <package> prebuilt\|source line for each package an install or an update added; a package with no line came prebuilt, as everything the image brought did. Carried into a slot beside the world set
/var/lib/kdos/groups-pending the installer The groups chosen at install time and not installed yet (recorded without an attempt when the medium names no binary host), one id per line, for install --pending

A freshly booted image has none of them. The first fetch or apply writes update.state and its lock, and update.json appears at the nightly check’s first run, or sooner when a fetch or an apply is run as root. update.state.sig appears only once a fetch has installed a tree, or has found the published tree to be the one already installed.

The full list is in Filesystem and IPC.

Usage

A release’s tree, binhost and slot image are published together, with the release index that finds them, by ports/publish --release on the machine that built the release. Against a published release, the tree’s fetch, the binhost index and prebuilt installs work over the network. An image update has been applied only from a signed local image, and applying a published release’s update to an installed machine is unproven; see Known gaps. The update lanes are exercised against fixtures by testing/selftest.sh.

From the desktop

Discover’s tray icon shows when an update is offered. Open Discover’s Updates page: the KDOS system update is listed with its version beside any application updates, and its text names the lane it comes by and the size still to download, or to copy when the binhost or image is a local directory. Update All writes the inactive slot, and Restart to update reboots into it. The update is kept when a session on that boot runs for a minute, or, on a machine SDDM does not log in automatically, when the login screen does; a version that does not get that far is rolled back by itself (see A/B slots and rollback). System Settings → System Versions shows what each slot holds and why the last update stopped, if it did.

Checking what is behind

  1. Ask:

    kdos update check

    kdos update with no verb does the same. The report:

    • lists each installed package whose version, or release, is older than its recipe in /ports, and which of them the verified binhost index covers;
    • counts the installed packages that have no recipe there, and names the tree’s commit;
    • says whether a verified slot image of a newer release is cached (a machine with one slot is never offered one);
    • reports the last problem a fetch or an apply recorded.

    It asks no server. On a machine with no fetch recorded it says no fetch is recorded yet before the counts; sudo kdos update fetch (or sudo kdos update check --fetch) is what learns whether a newer release is published.

    The binhost: line says how much of what is behind the verified index covers, or, with no index, the step that takes one. When the keys in /etc/kdos/keys/ are why there is none, that step is putting the release’s public keys there; a fetch would be refused again by the same keys. When the index in place came from another binhost than the one named now, as after a binhost = change whose fetch found nothing, a second binhost: line names both, the result of the last fetch of the named one, and says that installs still read the index in place.

    A tree fetch refused because the published tree is older than this machine’s ranks below every other problem, so on a tree ahead of the release a binhost problem is still the one reported.

  2. Read the exit status: 0 nothing is behind, 1 something is behind, 2 there is no tree or no package database. A recorded problem does not change it: the check above exits 0.

  3. For a script, ask for JSON, or write it to a file:

    kdos update check --json
    kdos update check --out ~/update.json

    The document’s binhost_base is the binhost named now, which a binhost- problem is about, and binhost where the index in place came from. Its offer is the version an update would make this system and lane is where it comes from: image, or binhost when every package behind is covered by a verified index or was built here. builds counts the packages behind that the update builds here, because their origin is source; they count as covered. With neither lane, nothing is offered to Discover, and apply --source is the way.

Fetching a newer tree

  1. Fetch the newest published tree. It is downloaded with its signature, the signature is checked against /etc/kdos/keys/tree/, and only then is the tree unpacked and exchanged with /ports. The release index follows, checked against /etc/kdos/keys/, and through it the binhost index and the slot image manifest, each kept only with the size and hash the index gives and when its own signature verifies; a release that publishes no image is recorded as absent, which is not a failure, and an index for another release than the tree is unverified:

    sudo kdos update fetch
  2. Read the result: exit 0 installed or already current, 1 refused or failed, 2 not attempted (not root, another update running, or /ports inside a git checkout). Run as an ordinary user it prints kdos update fetch replaces the ports tree and needs root and exits 2.

  3. Check against the new tree, or do both in one command:

    kdos update check
    sudo kdos update check --fetch

A tree whose stamp is older than the installed one is refused, and a tree with the same commit is reported as current (the ports tree is current (<commit>)), unless the installed stamp names no release and the published one does: then the published tree replaces /ports (/ports now holds tree <commit> (signed by key <id>)), so an image built from an untagged checkout of a release’s commit learns the release, and its binhost, at its first fetch.

Fetching from a stick

A stick, or any directory, holding kdos-ports.tar.xz and kdos-ports.tar.xz.sig from a release can stand in for the network for the tree, and a binhost or slot image directory as a build wrote it (build/binhost, or what script/release-image.sh wrote), each with its own kdos-update.idx, for theirs (see /etc/kdos/update.conf):

  1. Mount it, for example at /media/stick.

  2. Fetch from it:

    sudo kdos update fetch --from /media/stick

    An image with no tree key stops at no-key before reading the stick. On one with a key, the signature is fetched first: a directory without the two files fails with curl’s (37) Could not open file /media/stick/kdos-ports.tar.xz.sig, then kdos update: file:///media/stick/kdos-ports.tar.xz could not be downloaded, exit 1, and fetch-failed in /var/lib/kdos/update.state.

  3. To make the stick the usual source, write tree = /media/stick into /etc/kdos/update.conf.

The sources a --source update builds from still come from the network, from the KDOS source archive and then upstream. KDOS_SOURCES_BASE, set to an absolute path, names a directory laid out as the archive is, <tag>/<asset>, in its place, and like any variable it has to be set behind sudo: sudo env KDOS_SOURCES_BASE=/media/archive kdos update apply. See Fetching sources on a machine.

Applying an update

  1. See what would be done. This needs no root. On an A/B machine the inactive slot is not mounted, and a plain --dry-run refuses it, so pass --mount, which a dry run only names:

    kdos update apply --dry-run --mount

    On a mounted slot with nothing behind it prints nothing to take: everything installed matches the ports tree, or the candidate it would take; a mounted slot an update stopped while writing prints slot <x> holds every package of <version> but was left incomplete; finishing it and stops there, <version> being the version the slot records, the name System Versions and kdos-bootctl status show. On an unmounted slot it prints dry run: slot <x> (<uuid>) is not mounted; without --dry-run, --mount mounts it at /run/kdos/slot-<x> and installs the candidate there, unless an update stopped while writing that slot: then it prints dry run: slot <x> (<uuid>) is not mounted, and an update stopped while writing it; without --dry-run, --mount mounts it at /run/kdos/slot-<x> and finishes it, which the apply below does, and a slot that then holds the version running is made complete again without a trial.

  2. Apply:

    sudo kdos update apply --mount

    On a machine with two root slots apply writes the inactive one, which --mount mounts at /run/kdos/slot-<x> for the run; without --mount the slot has to be mounted already, wherever it is, and apply finds it by its UUID in the boot state. It takes the first lane that can deliver the update:

    • The slot image, when a verified manifest of a newer release is cached. The slot is synchronised, not formatted: files the slot or the running root already hold are copied and checked, the delta from the version this root was written from is streamed, and the full image fills only what is still missing. Every file is checked against the signed manifest, so a damaged delta falls back to the full image. A slot image is the base alone, so apply then installs the world set, and whatever it lacks, into the slot: prebuilt from the same release’s binhost, or built here for a package whose origin is source. It decides that before writing anything: when a prebuilt package of the world set, or a dependency of one, is not in that binhost, the lane refuses with needs-source and writes nothing. With no world set there is no such step.
    • The binhost, when the verified index covers every package behind that came prebuilt. kpkg installs each prebuilt package after its three equality tests (architecture, build configuration, recipe); one package that fails them refuses the whole lane before the slot is written, with N packages need a source build. A package whose line in /var/lib/kdos/origin says source was built here and is built here again, in a chroot of the slot, so it needs no index.
    • --source, a build on this machine: every source of every package behind is downloaded before anything compiles, then each package is built and installed with kpkg install -f, dependencies first, in a chroot of the inactive slot against that slot’s libraries.

    --image, --binhost and --source name a lane instead.

  3. On a machine with two slots, apply then runs kpkg check --all on the slot, carries this machine’s configuration into it, copies /ports into it unless an image brought its own, records its version, puts its kernel on the EFI system partition with kdos-bootctl deploy, and marks it to be tried with kdos-bootctl try. A failure at any step leaves the slot untried. Reboot to try it.

  4. On a machine with one root, apply prints no A/B slots — updating the running root in place and updates the running root. A slot image has nowhere to go there, so the image lane is never taken: check offers no image, and apply prints a slot image is on offer, but this machine has one slot; installing from the binhost and takes the binhost lane; --image is refused. On a machine with two slots, --in-place updates the running root instead of the slot, passes an image over the same way, and gives up the rollback.

apply --acquire does only the long half, the download, the write and the check, and records the slot as acquired; apply --arm does the rest. Discover runs the two as its download and its install step. While the running boot is itself a trial, apply refuses: the other slot is the confirmed way back until this one is confirmed or rolled back.

--root DIR installs into DIR instead of choosing a root. It does nothing about slots, even when DIR is the inactive slot: no kpkg check, no carry, no copy of /ports, no kdos-bootctl deploy and no try, so a slot updated this way is never booted as a candidate.

Installing software

The base the ISO carries is Plasma, the core KDE applications, Firefox ESR and the system’s own tools, with no compiler; everything else the release built is in its binhost. A port reaches this machine by one of three routes:

Route How What it takes
Prebuilt kdos update install --prebuilt <port>, or Discover’s KDOS system origin The port and every dependency it lacks from the release’s binhost, each checked against the signed index
Built here kdos update install --source <port>, or Discover’s KDOS, built on this computer origin Every source downloaded, then the port built and installed on this machine
Boxed kdos app install <id>, or Discover’s boxed applications A container image built on this machine from the catalogue; see Boxes

/etc/kdos/update.conf’s install = names the route kdos update install takes with no flag, and build-deps = whether a source install downloads or builds what the port lacks (see /etc/kdos/update.conf); System Settings → System Versions → Installing software writes both. Discover does not read install =: it lists one application with both origins in its source picker, and asks for the administrator password every time it builds.

  1. Have the release’s binhost index. A machine that has fetched an update has it, and the first install takes it on one that has not; a dry run needs it in place first, the index of the tree in place and not a newer tree’s:

    sudo kdos update fetch --binhost-only

    It fetches the index of the release /ports/TREE names, or of the binhost = in /etc/kdos/update.conf. With neither it exits 1 and says so: kdos update: no binhost is named: /ports/TREE names no release and /etc/kdos/update.conf has no `binhost =` line; `sudo kdos update fetch` takes a published tree that names its release. When the last full fetch refused the published tree as older than this machine’s, as it does on an image built after the release, the fetch is left out and only binhost = is named: kdos update: no binhost is named: /ports/TREE names no release, and the published tree is older than this machine's; name one with `binhost =` in /etc/kdos/update.conf. A named release with nothing published at its address gives kdos update: no binhost is published at <base>.

  2. See what an install would do. This needs no root:

    kdos update install --dry-run <port>

    One line per package, <pkg> prebuilt <file> <bytes> or <pkg> source <version>-<release>, then total <prebuilt-count> <bytes> <source-count> and installed <bytes>, what the packages take once installed. When the download does not fit in the free space where the cache is, the plan ends with kdos update: the packages to download take <size> and <cache> has <size> free, and when the installed packages would not fit on the root, with kdos update: the packages take <size> once installed and / has <size> free; either way the dry run exits 1.

  3. Install:

    sudo kdos update install <port>
    sudo kdos update install --source <port>
    sudo kdos update install --source --build-deps=source <port>

    Each download prints ==> downloading <file> (<size>) as it starts, and each package ==> installing <pkg> (prebuilt) or ==> installing <pkg> (built here). A download cut off part way is continued by running the same command again. A source install runs kpkg fetch for every source first, then builds under /etc/kdos/chroot.env, so what it builds has the build configuration the binhost’s packages have; under build-deps = prebuilt a dependency the binhost does not hold is built too. The port joins /var/lib/kdos/world, and each package it added gets its route in /var/lib/kdos/origin, which later updates keep: a package built here is built here again.

An install never rebuilds a package that is installed. Asking for an installed port by the other route installs that port again, alone, by the route asked for.

A source install readies the machine first, because the image carries each package without its headers and static libraries (Development files) and carries no build tools. In order, it:

  1. installs, prebuilt, each member of the build-tools group the machine lacks (fortify-headers among them, the /usr/include/fortify that chroot.env’s flags include), printing ==> installing <pkg> (prebuilt, for building) for each;
  2. installs the same way each build-only header port (/ports/buildheaders: xorgproto, wayland-protocols and the rest) that the build needs and the machine lacks;
  3. installs again whole, from the binhost, every installed package the build compiles against that lacks its development files, printing ==> restoring the development files of <pkg> (prebuilt).

Each package installed in steps 1 and 2 records prebuilt in /var/lib/kdos/origin, and the build tools and header ports join /var/lib/kdos/world, so kdos update removable lists them and kdos update remove takes them away again. The dry run lists all of this first, as <pkg> prebuilt … and <pkg> dev <file> <bytes> lines.

Plan for the first source install to be large, whatever the size of the application. Building a KDE application on a fresh install restores the development files of most of Qt, KDE Frameworks and the libraries under them, about 170 to 260 packages; with the build tools, expect roughly 600 MiB of downloads and about 1.5 GB of the root slot, most of it the restored development files. A later build against the same libraries restores nothing.

To bring development files back without building anything: the first command below restores one package’s, the second those of everything a build against it compiles against, and the third installs a working cc with the C library’s and the kernel’s headers:

sudo kdos update install --dev zlib
sudo kdos update install --dev --deps qt6-qtbase
sudo kdos update install build-tools
Groups

/ports/groups names sets of ports a machine installs by one name:

Kind Groups
KDE Gear kde-games, kde-education, kde-pim, kde-multimedia, kde-graphics, kde-utilities, kde-devtools, kde-network, kde-system, kde-artwork
Applications office, graphics, internet, multimedia, games, science, development, windows
Building software build-tools
Languages lang-zh, lang-ja, lang-ko: input methods and fonts for Chinese, Japanese and Korean

List them, with what each would add:

kdos update groups
kdos update groups --json

Each line names the group, its title, and either installed or how many of its members are missing, how many packages that is, and the download size from the cached index (not all prebuilt when the binhost does not hold every one; no size at all without an index). The JSON rows carry the same facts, with size null where no size can be given and binhost false where no index is in place, nothing names a binhost for the tree and no refresh can name one (the last binhost step found none named, the last fetch refused the published tree as older, or there is no second slot, whose refresh fetches no tree); Welcome Center’s Make It Yours page reads that to say this release installs no group ready-made rather than to ask for a refresh. Install one as you would a port:

sudo kdos update install office

Each member is installed as the port it is and joins the world set by its own name, so a member a later tree drops from the group stays installed.

At install time and on the live medium

The installer’s Applications page lists the groups as KDOS applications, none chosen by default, above the boxed applications; an answer file names them with groups =, separately from the boxed groups of apps = (see kinstall). Its Packs step runs kdos update fetch --binhost-only with the cache on the target and then kdos update install --prebuilt --root <target> <id> for each group. When the fetch or a group fails, for instance with no network, the ids go to /var/lib/kdos/groups-pending on the target with a warning, and the install still succeeds. Install them once the machine is online:

sudo kdos update install --pending

Each group that installs leaves the file; with nothing recorded it prints nothing is pending. The first login’s notice names the groups still waiting and this command, and goes once they are installed.

On the live medium, kdos update install works the same way, into the overlay in RAM: what it installs is gone at the next restart, unless the medium has a persistence store (see Live persistence). Each package file and its .sig leave the cache once the package is installed, since the cache is in the same RAM as the root it went into.

--root DIR installs into a root that is not running, DIR absolute, by the prebuilt route only: a build compiles against the root it runs in, so --source with --root exits 2.

After an update

  1. List the running processes that still use code the update replaced; each keeps the old code until it restarts. Run it as root to include the services: an ordinary user cannot read another account’s processes, and kdos restarts skips them, so without root its answer covers only your own:

    sudo kdos restarts

    With nothing replaced it prints Nothing is running deleted code. and exits 0; it exits 1 when something needs restarting.

  2. Restart those services (sudo service restart <name>; see Services), or log out and back in for the desktop’s own programs. A new kernel runs from the next boot.

  3. After a slot switch, list the configuration files where the new version’s default and this machine’s copy differ, and merge what you want from each:

    find /etc -name '*.kdos-new'

    The new default sits beside this machine’s copy as <file>.kdos-new, and inside a *.d directory as the hidden .<file>.kdos-new, because a program that reads such a directory whole would read a visible copy too. See A/B slots and rollback.

  4. Read what the running version changed: kdos update notes.

  5. If the update changed the artwork, re-apply your accent to your home:

    kdos update theme

Checking for known vulnerabilities

kdos cve
kdos cve openssl
kdos doctor --cve

kdos cve compares the installed versions against a copy of Alpine’s security database shipped at /usr/share/kdos/secdb.txt, with no network. It exits 1 when any package is behind a recorded fix. A package the database does not carry is counted as unknown, not as clean, and the report gives the database’s date and warns when it is more than 180 days old. The report opens with the database’s date and age (Alpine secdb of <date> (<n> days old)), lists each package behind a fix with the version that fixed it and its CVE numbers, then the programs that bundle their own copy of a library (most of them Rust programs), and ends with the counts: <n> checked, <n> not in the database, <n> behind a recorded fix, and a count of the bundled copies. kdos doctor --cve prints the same report. The database arrives with kdos-tools, so a newer one comes with an update of that port. See Vulnerability tracking.

Updating boxed applications

A boxed application is not part of kdos update. It is a stack of container images this machine built, and an image that exists is never rebuilt, so the update is a removal and a fresh install:

kdos app remove app.hugin
kdos app install app.hugin

The removal takes the application’s own image and every runtime image no other box needs; the base image is kept, so the Debian userland under every application is not rebuilt. Installing an application that is already installed builds nothing and reports a failure. The fresh install builds the images and then creates the box on them; see Installing an application and Updating in the user guide.

On the live medium

/ports on the live medium lies in the overlay’s read-only lower layer, which cannot be renamed, so fetch removes the old entries and moves the new ones in one at a time. Everything fetch and apply write goes into the overlay in RAM and is gone at power-off unless the medium has a persistence store (kdos persist). The live medium has no slot state, so apply updates the running root. The software the base leaves out is installed there as on an installed machine, into the same overlay; see Installing software.

Tips

Troubleshooting

Discover offers no system update, or kdos update check reports a problem
check names the first of no-tree, then the last fetch’s no-key, no-network or fetch-failed, then the binhost’s binhost-no-key, binhost-no-network, binhost-fetch-failed, binhost-unverified, or binhost-absent when the base update.conf or $KDOS_UPDATE_BINHOST names publishes none (a result recorded for another base than the one named now is passed over), then the image’s image-<code> other than image-absent, then the last apply’s no-network, fetch-failed or build-failed. The sentence beside it is in /var/lib/kdos/update.state, which also has the binhost and image lines:
cat /var/lib/kdos/update.state
kdos update check exits 2
There is no tree at the root PORT_REPO names, or no package database. Check /ports/core and /etc/kpkg.conf.
no-key on every fetch
The image’s ring, /etc/kdos/keys/tree/, holds no key: the image was built without the release key, so it can verify no published tree, and fetch stops before downloading it, exit 1. With no key in /etc/kdos/keys/ either, the binhost and image lines say no-key too, and nothing at all is downloaded. ls /etc/kdos/keys/tree/ shows whether a kdos-release.pub is there; on such an image the directory holds only its README. kdos update apply still builds whatever the recipes in /ports are ahead of. See Known gaps.
no signed binhost index is on this machine
kdos update install found no binhost index and could not fetch one. The second line says why: no binhost is named means /ports/TREE names no release and update.conf has no binhost =; write one (the binhost key in Configuration), or run sudo kdos update fetch to take a published tree that names its release. When the line says the published tree is older than this machine’s, that fetch is refused, and binhost = is the one way. <base> names a binhost the last fetch did not see means one has been named since, or the base named now is another than the last fetch’s: run sudo kdos update fetch --binhost-only.
the packages to download take <size> and <cache> has <size> free
The install would not fit where its packages are cached, and nothing was downloaded. Free space there, or install fewer ports at once; on the live medium the cache is in RAM.
the packages take <size> once installed and / has <size> free
The packages would not fit on the root once unpacked, with 128 MiB left over, and nothing was downloaded; when the cache shares the root its downloads are counted too. Free space on the root, or install fewer ports at once. A group is measured whole and refused before its first member.
fetch-failed on every fetch
The place the tree is fetched from holds no kdos-ports.tar.xz. With no update.conf that place is the latest KDOS release on GitHub, and a release published without a tree makes sudo kdos update fetch print curl: (22) The requested URL returned error: 404 and exit 1. Point tree = at a place that holds one, or fetch from a stick with --from. See Known gaps.
fetch-failed after the tree downloaded
The sentence in /var/lib/kdos/update.state names the cause, such as a signature that does not verify against /etc/kdos/keys/tree/, a published tree older than the one installed, or an archive that is not a ports tree. In each of these /ports keeps the tree it had.
fetch-failed or no-network after apply
apply fetches every source before building anything, and stopped there: it prints nothing was built, and update.state lists the packages whose sources neither the archive nor upstream had, or says the network could not be reached. Fetch one by hand to see why: sudo kpkg fetch <port>.
unverified on the binhost or image line
No key in /etc/kdos/keys/ verifies the release index, the binhost index or the manifest, a file is not the one the release index names, or the index is for another release; nothing was kept, and Discover offers nothing. Add the key that signed the release, or update with --source.
N packages need a source build
The binhost does not cover every package behind (another architecture, another build configuration, or a recipe the index predates). The binhost lane refuses whole; use --source. From kdos update install, the same line ends with `kdos update install --source <port>` builds it here: the prebuilt route refuses the whole install when the index does not hold every package it needs.
<pkg> is older than its recipe; apply the system update first
kdos update install refuses when a dependency the port needs is installed and behind its recipe in /ports, because the new port was built against the newer one. Apply the update, then install.
needs-source from the image lane
N package(s) of what was installed on purpose is not in release X's binhost (...): a port in the world set, or a dependency of one, came prebuilt and the new release’s binhost does not hold it, so the slot image would boot without it. Nothing was written. Install each package the message names with kdos update install --source, so its origin is source and every update builds it here, or update with --source.
fetch exits 2
It needs root (kdos update fetch replaces the ports tree and needs root), another fetch or apply holds the lock, or /ports is inside a git checkout, which belongs to git and is never replaced.
no-network
The server’s name did not resolve, or the machine has no default route. Check the connection with nmcli general status, or fetch from a stick with --from. A server that refused the connection or did not answer while a route exists is fetch-failed, “the server at <host:port> did not answer”: the network is up and the server is not. One that answered and then stalled, less than 1024 bytes a second for 60 seconds, is fetch-failed too, “the download from <host:port> stalled”; a package that stalls part way is kept and continued by the next run.
build-failed
A package did not build, or, on a machine with two slots, the slot failed its kpkg check, the copy of /ports, the kernel deploy or the try; the sentence in update.state says which. A slot that failed any of these is not marked to be tried. A package’s output is in the terminal apply ran in; rebuild that port alone with sudo env KPKG_FETCH=1 kpkg install -f <port> to see it again (see kpkg).
apply refuses: the inactive slot is not mounted
Pass --mount, mount it and run apply again, or pass --in-place. See A/B slots and rollback.

Known gaps

See also