297.1. podman-tui-2.0.0
Terminal UI for podman
| Version | 2.0.0, release 1 |
| Shelf | containers — Container runtimes, image tools, container networking and sandbox primitives |
| Phase | 44_apps (Applications), 38 of 422 in build order |
| Licence | Apache-2.0 |
| Homepage | https://github.com/containers/podman-tui |
| Build time | 1.2 SBU |
| Installed size | 33.0 MiB in 3 files |
| Recipe | ports/core/containers/podman-tui/kpkgbuild |
About
podman-tui is a terminal interface for Podman: images, containers, pods, volumes, networks and secrets, browsed and managed from one screen. It is a client of the Podman API, not of the podman command, so it needs a running API service to talk to. It is a Go program built from its vendor bundle, the second sha256 = line (see Vendoring).
Why it is in KDOS
The comment above it in script/phases/44_apps/packages.d/containers.txt:
Every documented appbox failure is podman state — a box stuck in
stopping, a half-built init, a storage driver mismatch.
Sources
podman-tui-2.0.0.tar.gz(18.1 MiB)
sha25632c8ffced718cda2d5b4bcedddb71299aaa035f035de6886100ab0f6469ca3dd
upstream: https://github.com/containers/podman-tui/archive/refs/tags/v2.0.0.tar.gz
archive copy: sources-1/containers--podman-tui-2.0.0.tar.gzpodman-tui-vendor-2.0.0.tar.xz(8.7 MiB)
sha25612f6823a2b5c5c764e9eb07f844b780e3f7fc3024df9abbc410bbba1e5a84658
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-1/containers--podman-tui-vendor-2.0.0.tar.xz
Dependencies
Required by: no port names it.
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/44_apps/phase.env && kpkg install podman-tui'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/containers/podman-tui.
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/podman-tui
echo '32c8ffced718cda2d5b4bcedddb71299aaa035f035de6886100ab0f6469ca3dd podman-tui-2.0.0.tar.gz' | sha256sum -c -
echo '12f6823a2b5c5c764e9eb07f844b780e3f7fc3024df9abbc410bbba1e5a84658 podman-tui-vendor-2.0.0.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/podman-tui
SRC=$SRC_ROOT/podman-tui-2.0.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf podman-tui-2.0.0.tar.gz -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:
tar xf $PORT_SRC/${name}-vendor-${version}.tar.xz
export CGO_ENABLED=0
go build -mod=vendor -tags "remote containers_image_openpgp exclude_graphdriver_btrfs" \
-ldflags "-s -w" -o podman-tui
install -Dm755 podman-tui $PKG/usr/bin/podman-tui
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/podman-tui.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=Containers
GenericName=Container Manager
Comment=Images, containers, pods and volumes
Exec=kdos-podman-api podman-tui
Icon=network-server
Terminal=true
Categories=System;
Keywords=container;podman;image;pod;box;
EOF
chmod 644 "$PKG/usr/share/applications/podman-tui.desktop"
The switches, and why each is set:
-tags "remote containers_image_openpgp exclude_graphdriver_btrfs"— the same build tags as upstream’sMakefile(BUILDTAGS).remotecompiles the Podman bindings as an API client only, without the local container engine;containers_image_openpgpverifies image signatures with a pure-Go OpenPGP implementation instead of binding gpgme;exclude_graphdriver_btrfsleaves out the btrfs storage driver, which needs the btrfs C headers. The last two are what let the program build withCGO_ENABLED=0, which upstream’sMakefilealso sets.
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/podman-tui, 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 podman-tui-2.0.0-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/podman-tui, and runs the triggers its paths call for.
Contents
Installed programs: podman-tui.
Installed directories: /usr/share/licenses/podman-tui.
Notes
The menu entry, Containers, runs kdos-podman-api podman-tui in a terminal. That wrapper starts podman system service when nothing answers on the account’s API socket and gives podman-tui a default connection to it; run bare, podman-tui has no connection until one is added, with podman system connection add or in podman-tui’s own system view. See Containers.