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

342.9. chirp-20260927

Programs the memory channels of hundreds of amateur radios, with a wxPython interface and the chirpc CLI

Version 20260927, release 1
Shelf hamradio — Amateur-radio operation: rig control, digital modes, logging, packet and APRS, propagation, and mesh radio
Phase 44_apps (Applications), 251 of 422 in build order
Licence GPL-3.0-or-later AND LGPL-2.1-only AND LGPL-3.0-or-later
Homepage https://chirpmyradio.com/
Build time 0.9 SBU
Installed size 18.4 MiB in 687 files
Recipe ports/core/hamradio/chirp/kpkgbuild

About

CHIRP reads, edits and writes the memory channels of handheld and mobile amateur radios from hundreds of models, over a programming cable. This port installs the wxPython program chirp and the command-line chirpc, built from a dated snapshot of upstream’s tree.

Sources

Dependencies

Depends on: python3, python3-pip, python3-setuptools, python3-setuptools-scm, python3-wheel, python3-wxpython, python3-pyserial, python3-requests, python3-lark, librsvg.

Required by: no port names it.

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/44_apps/phase.env && kpkg install chirp'

What kpkg does

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

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/chirp
echo '348e29f1e6d48e63df464932450dd02dad2de79072c857d8cebe95ff12b29580  chirp-20260927.tar.gz' | sha256sum -c -
echo '2dab482ebeb142da34e3c658a8724e5bae15e8faa513b9983a983f6c96951fba  chirp-vendor-20260927.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/chirp
SRC=$SRC_ROOT/chirp-20260927
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf chirp-20260927.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 recipe’s helpers _commit, pyrequirements, pyruntime and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/no-reporting.patch"
patch -p1 -i "$PORT_SRC/version.patch"
grep -qx "CHIRP_VERSION = \"next-$version\"" chirp/__init__.py
grep -q "version='$version'," setup.py

mkdir -p vendor
tar -xf $PORT_SRC/$name-vendor-$version.tar.xz --strip-components=1 -C vendor

pip3 install --ignore-installed --no-deps --no-index --find-links=vendor --no-build-isolation \
	--root=$PKG --prefix=/usr \
	yattag suds-community .

install -Dm644 chirp/share/chirpw.1 "$PKG/usr/share/man/man1/chirp.1"

install -Dm644 chirp/share/chirp.png "$PKG/usr/share/icons/hicolor/256x256/apps/chirp.png"
for s in 48 64 128; do
	install -d "$PKG/usr/share/icons/hicolor/${s}x${s}/apps"
	rsvg-convert -w $s -h $s chirp/share/chirp.svg \
		-o "$PKG/usr/share/icons/hicolor/${s}x${s}/apps/chirp.png"
done
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/chirp.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=CHIRP
GenericName=Radio Programming Tool
Comment=Read, edit and write the memory channels of hundreds of amateur radios
Exec=chirp --no-install-desktop-app %F
Icon=chirp
Terminal=false
StartupWMClass=Chirp
Categories=Utility;HamRadio;
Keywords=ham;radio;programming;handheld;memory;channels;baofeng;icom;yaesu;kenwood;
DESKTOP
chmod 644 "$PKG/usr/share/applications/chirp.desktop"

test -x "$PKG/usr/bin/chirp"
test -x "$PKG/usr/bin/chirpc"

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/chirp, 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 chirp-20260927-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/chirp, and runs the triggers its paths call for.

Contents

Installed programs: chirp, chirpc, experttune.

Installed directories: /usr/lib/python3.14/site-packages/chirp, /usr/lib/python3.14/site-packages/chirp-20260927.dist-info, /usr/lib/python3.14/site-packages/suds, /usr/lib/python3.14/site-packages/suds_community-1.2.0.dist-info, /usr/lib/python3.14/site-packages/yattag, /usr/lib/python3.14/site-packages/yattag-1.16.1.dist-info, /usr/share/licenses/chirp.

Short descriptions

chirp A tool for programming two-way radio equipment

Notes

The vendor bundle is the pypackages closure: the two distributions CHIRP needs that no port provides, yattag and suds-community, as source distributions. pypackages is the closure itself, so ports/fetch downloads exactly those two without resolving their dependencies. pyserial, requests, lark and wxPython come from their python3-* ports in depends. The pip3 install line names both bundled distributions and the program itself, installed --no-deps from vendor/ with no index (see The three Python keys).

version.patch carries the version, and the two grep lines after the patches check that it names $version. A version bump must rewrite the patch, or the build stops there.

By default on Linux CHIRP sets GDK_BACKEND=x11 before it imports wx, so it runs under Xwayland, and GTK’s X11 class is the program name capitalised, Chirp, which is the entry’s StartupWMClass. On its first run CHIRP offers to write ~/.local/share/applications/chirp.desktop, which would shadow the packaged entry with one that runs ~/.local/bin/chirp or, where that does not exist, python3 -mchirp.wxui; the entry’s --no-install-desktop-app stops the offer.