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

103.1. passt-2026_07_28.f8df3f1

User-mode networking for VMs and containers, unprivileged and without a tap device

Version 2026_07_28.f8df3f1, release 1
Shelf containers — Container runtimes, image tools, container networking and sandbox primitives
Phase 41_system (System), 301 of 1047 in build order
Licence GPL-2.0-or-later AND BSD-3-Clause
Homepage https://passt.top/
Build time 0.5 SBU
Installed size 1.1 MiB in 14 files
Recipe ports/core/containers/passt/kpkgbuild

About

passt and pasta give a virtual machine or a container a network connection without root and without a tap device or a bridge: they translate the guest’s traffic into ordinary sockets of the unprivileged user that runs them. passt serves a QEMU or libvirt guest over a UNIX socket; pasta attaches to a network namespace, and it is the network podman gives a rootless container, set as default_rootless_network_cmd in containers-common’s containers.conf. The port also installs passt-repair, the helper that sets the TCP_REPAIR socket options passt needs to move a guest’s connections during a migration, pesto, which shows and changes the port forwarding of a running passt or pasta, and the manual pages.

Why it is in KDOS

The comment above it in script/phases/41_system/packages.d/containers.txt:

User-mode networking for rootless containers: pasta is the only rootless network podman drives.

Sources

Dependencies

Depends on: nothing a recipe names.

Required by (3): buildah, podman, qemu.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install passt'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/containers/passt.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/containers/passt
echo 'fcfeb5fbdf775bcc48edc1d5eac8a6d57bc333f8e67b714149376d36061416f0  passt-2026_07_28.f8df3f1.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/passt
SRC=$SRC_ROOT/passt-2026_07_28.f8df3f1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf passt-2026_07_28.f8df3f1.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/musl-close-range.patch"

export VERSION="$version"

install -d "$SRC_ROOT/fmt-shim"
printf '#!/bin/sh\nexec cat\n' > "$SRC_ROOT/fmt-shim/fmt"
chmod 755 "$SRC_ROOT/fmt-shim/fmt"
export PATH="$SRC_ROOT/fmt-shim:$PATH"

make

make DESTDIR="$PKG" prefix=/usr install

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/passt, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf passt-2026_07_28.f8df3f1-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/passt, and runs the triggers its paths call for.

Contents

Installed programs: passt, passt-repair, passt.avx2, pasta, pasta.avx2, pesto.

Installed directories: /usr/share/doc/passt, /usr/share/licenses/passt.

Short descriptions

passt Unprivileged user-mode network connectivity for virtual machines pasta - Unprivileged user-mode network connectivity for network namespaces
passt-repair Helper setting TCP_REPAIR socket options for passt(1)
pesto Configure a running passt(1) or pasta(1) instance.

Notes

On x86-64 the default target compiles passt twice, once for any x86-64 processor and once as passt.avx2 with AVX2 code; pasta and pasta.avx2 are symbolic links to them. At start the plain binary re-executes its own executable, as /proc/self/exe names it, with .avx2 appended when the processor supports AVX2. Both are installed side by side; without the .avx2 file the plain binary warns and carries on with its own code.

build.sh puts a fmt that only copies its input ahead of the real one on PATH. seccomp.sh, which generates the seccomp filters during the build, pipes the list of system calls each profile allows through fmt -t to wrap it to the terminal’s width. The script runs under sh -eu, so a fmt that rejects -t would stop it with the seccomp header half written; the message goes to standard output and nowhere into the generated headers, so the substitute changes only how the build log looks.