220.2. sideband-2.1.0
LXMF messaging, voice, telemetry and maps over a Reticulum mesh
| Version | 2.1.0, release 1 |
| Shelf | hamradio — Amateur-radio operation: rig control, digital modes, logging, packet and APRS, propagation, and mesh radio |
| Phase | 42_graphics (Graphics Stack), 125 of 189 in build order |
| Licence | CC-BY-NC-SA-4.0 AND CC-BY-NC-ND-4.0 AND BSD-3-Clause AND PSF-2.0 |
| Homepage | https://unsigned.io/sideband |
| Build time | 0.7 SBU |
| Installed size | 75.0 MiB in 997 files |
| Recipe | ports/core/hamradio/sideband/kpkgbuild |
About
Sideband is a messaging, voice-call, telemetry and map client for Reticulum, the mesh networking stack that runs over LoRa radios, packet radio, serial links and ordinary IP. It speaks LXMF, the messaging protocol built on Reticulum, and carries voice through LXST with the Codec2 and Opus codecs. It is a Kivy program, drawn through SDL. Reticulum, LXMF, Kivy, NumPy, Pillow, qrcode and the rest of its dependencies are ports of their own, found in site-packages through depends.
Sources
sideband-2.1.0.tar.gz(48.3 MiB)
sha256dff65365a3b650bff349c518e66b0c534b8541594cfc0e2c4f8ee1a2ecc6bb6f
upstream: https://github.com/markqvist/Sideband/archive/refs/tags/2.1.0.tar.gz
archive copy: sources-3/hamradio--sideband-2.1.0.tar.gzlxst-0.5.3.tar.gz(6.4 MiB)
sha256a11f815188be4d281286a3be955dc121074b9d90c559797ebcdd42b46f241cc7
upstream: https://github.com/markqvist/LXST/archive/refs/tags/0.5.3.tar.gz
archive copy: sources-3/hamradio--lxst-0.5.3.tar.gzsideband-vendor-2.1.0.tar.xz(27.0 MiB)
sha256daacf9b9ae8ce738021cda28ee3548aaaa49f9d40892e33a3ee3daeb1b6d1b44
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-3/hamradio--sideband-vendor-2.1.0.tar.xz
Dependencies
Depends on: python3, python3-setuptools, python3-pip, python3-cython, python3-cffi, numpy, codec2, opus, libpulse, python3-rns, python3-lxmf, python3-kivy, python3-pillow, python3-qrcode, python3-requests, python3-cryptography, python3-pyserial.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
setup-kv-glob.patch points setup.py’s glob_paths() at sbapp/kivymd, where the bundled KivyMD lives. Upstream walks a top-level kivymd directory that does not exist, so its package_data names no .kv file, pip installs none, and Sideband exits at start-up when KivyMD cannot load its first widget rule. The test line after the install stops the build if kivymd/uix/label/label.kv is missing from the prefix.
setup-kv-glob.patch— setup.py: collect the KivyMD .kv files from sbapp/kivymdThe bundled KivyMD lives at sbapp/kivymd; glob_paths() walked a top-level kivymd directory that does not exist, so package_data carried no .kv file and the installed app could not load a single widget rule.
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/42_graphics/phase.env && kpkg install sideband'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/hamradio/sideband.
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/hamradio/sideband
echo 'dff65365a3b650bff349c518e66b0c534b8541594cfc0e2c4f8ee1a2ecc6bb6f sideband-2.1.0.tar.gz' | sha256sum -c -
echo 'a11f815188be4d281286a3be955dc121074b9d90c559797ebcdd42b46f241cc7 lxst-0.5.3.tar.gz' | sha256sum -c -
echo 'daacf9b9ae8ce738021cda28ee3548aaaa49f9d40892e33a3ee3daeb1b6d1b44 sideband-vendor-2.1.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/sideband
SRC=$SRC_ROOT/sideband-2.1.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf sideband-2.1.0.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf lxst-0.5.3.tar.gz -C "$SRC_ROOT"
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 recipe’s helpers _lxst, pyrequirements and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
_home=/usr/lib/sideband
patch -p1 -i "$PORT_SRC/setup-kv-glob.patch"
mkdir -p vendor
tar -xf $PORT_SRC/$name-vendor-$version.tar.xz --strip-components=1 -C vendor
pip3 install --no-deps --no-index --find-links=vendor --no-build-isolation \
--ignore-installed --root=$PKG --prefix=$_home \
pycodec2 mistune audioop-lts
pip3 install --no-deps --no-index --no-build-isolation \
--ignore-installed --root=$PKG --prefix=$_home \
"$SRC_ROOT/LXST-$_lxst"
_site=$(python3 -c 'import sys, sysconfig; print(sysconfig.get_path("purelib", vars={"base": sys.argv[1]}))' "$PKG$_home")
_plat=$(python3 -c 'import sys, sysconfig; print(sysconfig.get_path("platlib", vars={"base": sys.argv[1], "platbase": sys.argv[1]}))' "$PKG$_home")
rm -rf "$_site/LXST/Codecs/libs/pyogg/libs" "$_plat/LXST/Codecs/libs/pyogg/libs"
pip3 install --no-deps --no-index --no-build-isolation \
--ignore-installed --root=$PKG --prefix=$_home .
install -Dm644 sbapp/assets/io.unsigned.sideband.png \
"$PKG/usr/share/icons/hicolor/512x512/apps/io.unsigned.sideband.png"
rm -rf "$PKG$_home/share"
test -f "$_site/sbapp/kivymd/uix/label/label.kv"
install -d "$PKG/usr/bin"
cat > "$PKG/usr/bin/sideband" <<'KDOS_SH'
#!/bin/sh
home=/usr/lib/sideband
site=$(python3 -c 'import sys, sysconfig; b = sys.argv[1]; print(sysconfig.get_path("purelib", vars={"base": b}) + ":" + sysconfig.get_path("platlib", vars={"platbase": b, "base": b}))' "$home") || exit 1
PYTHONPATH=$site${PYTHONPATH:+:$PYTHONPATH}
SDL_APP_ID=${SDL_APP_ID:-io.unsigned.sideband}
export PYTHONPATH SDL_APP_ID
exec "$home/bin/sideband" "$@"
KDOS_SH
chmod 755 "$PKG/usr/bin/sideband"
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/io.unsigned.sideband.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Sideband
GenericName=Mesh Messaging
Comment=Messages, voice, telemetry and maps over a Reticulum mesh
Exec=sideband
Icon=io.unsigned.sideband
Terminal=false
StartupWMClass=io.unsigned.sideband
Categories=Network;Chat;
Keywords=reticulum;lxmf;mesh;lora;radio;chat;voice;telemetry;
DESKTOP
chmod 644 "$PKG/usr/share/applications/io.unsigned.sideband.desktop"
The switches, and why each is set:
--prefix=$_home— Installs Sideband and the four Python packages only it imports (LXST, the voice transport, and pycodec2, mistune and audioop-lts) under their own prefix,/usr/lib/sideband, where they cannot collide with a copy another port puts insite-packages.--no-build-isolation— Builds each package with the build backends already installed (the Cython, NumPy and setuptools ports) instead of an isolated environment pip would fill from the network. pycodec2 binds codec2’s C library and builds against NumPy’s headers with Cython.--ignore-installed— Keeps the prefix whole when a copy of a package is already in the build root; without it pip would uninstall that copy from the root instead of writing the new one into$PKG(see The three Python keys).--no-deps— Installs exactly the named packages and resolves nothing. Of Sideband’s declared requirements, materialyoucolor and beautifulsoup4 are imported by no module it ships, and are not installed.
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/sideband, 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 sideband-2.1.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/sideband, and runs the triggers its paths call for.
Contents
Installed programs: sideband.
Installed directories: /usr/lib/sideband, /usr/share/licenses/sideband.
Notes
The vendor bundle, sideband-vendor-<version>.tar.xz, is a Python bundle that ports/fetch makes from the recipe’s pypackages line, pycodec2 mistune audioop-lts, as source distributions with their build requirements, and pins by its sha256 (see Vendoring). LXST is the recipe’s second source =, a GitHub tag archive installed from its unpacked tree. audioop-lts is the audioop module Python 3.13 removed from the standard library, which LXST’s pydub imports.
LXST builds its filter library from LXST/Filters.c, loaded at run time through cffi. Its source also carries prebuilt Windows and macOS libraries for its bundled pyogg, which setup.py installs as package data; they are code for other systems and build.sh removes them. pyogg then loads the system’s libopus by name at run time; without opus, LXST’s Opus codec cannot load and calls are left with Codec2 and raw audio.
The platlib directory for that removal is resolved with both base and platbase set to the prefix. With base alone it resolves to the build root’s own site-packages, and the rm would reach outside $PKG.
/usr/bin/sideband is a launcher written by build.sh. It puts the prefix’s site directories, resolved through sysconfig so that it names no Python version, ahead of any PYTHONPATH the caller set, and runs the entry point pip wrote. It also sets SDL_APP_ID, the Wayland app_id SDL gives the window; unset, the app_id is the Python interpreter’s name, which no desktop entry can match. setup.py’s data files land under the prefix and are deleted; the icon and the desktop entry are installed into /usr/share by build.sh.