302.7. mumble-1.5.939
Low-latency voice chat — the Mumble client and mumble-server, for group voice on a LAN
| Version | 1.5.939, release 1 |
| Shelf | chat — Instant messaging, IRC, XMPP, Matrix, fediverse and voice clients, with their protocol and E2E libraries |
| Phase | 44_apps (Applications), 34 of 422 in build order |
| Licence | BSD-3-Clause |
| Homepage | https://www.mumble.info/ |
| Build time | 4.8 SBU |
| Installed size | 10.9 MiB in 57 files |
| Recipe | ports/core/chat/mumble/kpkgbuild |
About
Mumble is low-latency group voice chat: the mumble client and mumble-server, the server it connects to (Murmur, in upstream’s build options), which a machine on a LAN can host for its own group. Both are built from the one source. The client is a Qt 5 application, which decides how the port links OpenSSL.
Sources
mumble-1.5.939.tar.gz(24.9 MiB)
sha256da181098ab062a44ab7f2b65ab2b65926898ebca5d8c665ca2ce50d38cd11414
upstream: https://github.com/mumble-voip/mumble/releases/download/v1.5.939/mumble-1.5.939.tar.gz
archive copy: sources-1/chat--mumble-1.5.939.tar.gzopenssl3-3.5.9.tar.gz(50.8 MiB)
sha256603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a
upstream: https://openssl.org/source/openssl-3.5.9.tar.gz
archive copy: sources-1/chat--openssl3-3.5.9.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, python3, qt5-qtbase, qt5-qtsvg, qt5-qttools, qt5-qtwayland, perl, openssl3, protobuf, boost, poco, libsndfile, opus, speex, speexdsp, alsa-lib, pipewire, nlohmann-json, speech-dispatcher, avahi, libX11, libXext, libXi, libcap, sqlite, hicolor-icon-theme.
Required by: no port names it.
Optional, off in KDOS
These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.
-Dportaudio=OFF, line 67: portaudio (explained with the switches below)-Dice=OFF, line 77: libICE (explained with the switches below)
Patches
build.sh applies these; kpkg applies nothing by itself.
EVIO-int.patch— casts theEVIOCGVERSION,EVIOCGNAME,EVIOCGBITandEVIOCGRABrequest codes tointin theioctl()calls ofsrc/mumble/GlobalShortcut_unix.cpp, which reads keyboards from/dev/inputfor global shortcuts. musl declaresioctl()with anintrequest, and the read requests’ codes are larger thanINT_MAX, so without the cast the compiler stops with an overflow-in-conversion error.server-ini.patch— setsdatabase=in the shippedmumble-server.inito/var/lib/mumble-server/mumble-server.sqlite, the state directory the package creates and the path the init script checks. Upstream leaves it empty, which makes the server search its default locations for the file and create it there if none is found.
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 mumble'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/chat/mumble.
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/chat/mumble
echo 'da181098ab062a44ab7f2b65ab2b65926898ebca5d8c665ca2ce50d38cd11414 mumble-1.5.939.tar.gz' | sha256sum -c -
echo '603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a openssl3-3.5.9.tar.gz' | 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/mumble
SRC=$SRC_ROOT/mumble-1.5.939
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf mumble-1.5.939.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf openssl3-3.5.9.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 _openssl and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/EVIO-int.patch"
patch -p1 -i "$PORT_SRC/server-ini.patch"
_ossl="$SRC_ROOT/openssl-$_openssl"
(
cd "$_ossl"
./config \
--prefix=/usr \
--libdir=lib \
--openssldir=/etc/ssl \
enable-ec_nistp_64_gcc_128 \
enable-camellia \
enable-seed \
enable-rfc3779 \
enable-ktls \
enable-argon2 \
no-mdc2 \
no-ec2m \
no-sm2 \
no-sm4 \
no-module \
no-tests \
shared \
threads \
zlib
make build_generated
)
cmake -S . -B build -G Ninja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_CXX_STANDARD=17 \
-DBUILD_NUMBER="${version##*.}" \
-Dclient=ON \
-Dserver=ON \
-Dtests=OFF \
-Dbenchmarks=OFF \
-Dplugins=ON \
-Dwarnings-as-errors=OFF \
-Duse-timestamps=OFF \
-Dupdate=OFF \
-Dcrash-report=OFF \
-Dtranslations=OFF \
-Dbundle-qt-translations=OFF \
-Dbundled-speex=OFF \
-Dbundled-json=OFF \
-Dbundled-gsl=ON \
-Drenamenoise=ON \
-Dbundled-renamenoise=ON \
-Dalsa=ON \
-Dpipewire=ON \
-Dpulseaudio=ON \
-Djackaudio=OFF \
-Dportaudio=OFF \
-Doss=OFF \
-Dspeechd=ON \
-Dqtspeech=OFF \
-Dxinput2=ON \
-Dg15=OFF \
-Dzeroconf=ON \
-Dqssldiffiehellmanparameters=ON \
-Doverlay=OFF \
-Doverlay-xcompile=OFF \
-Dice=OFF \
-Dmanual-plugin=ON \
-DCMAKE_IGNORE_PATH="/usr/lib/cmake/OpenSSL;/usr/lib64/cmake/OpenSSL;/lib/cmake/OpenSSL;/lib64/cmake/OpenSSL" \
-DOPENSSL_INCLUDE_DIR="$_ossl/include" \
-DOPENSSL_SSL_LIBRARY=/usr/lib/libssl.so.3 \
-DOPENSSL_CRYPTO_LIBRARY=/usr/lib/libcrypto.so.3
cmake --build build
DESTDIR=$PKG cmake --install build
for _b in mumble mumble-server; do
_need=$(readelf -d "$PKG/usr/bin/$_b")
case $_need in *libssl.so.3*) ;; *) exit 1 ;; esac
case $_need in *libssl.so.4*|*libcrypto.so.4*) exit 1 ;; esac
done
rm -rf "$PKG/etc/systemd" "$PKG/etc/sysusers.d" "$PKG/etc/tmpfiles.d"
rm -f "$PKG/usr/bin/mumble-server-user-wrapper" \
"$PKG/usr/share/man/man1/mumble-server-user-wrapper.1"
install -d -m 750 "$PKG/var/lib/mumble-server"
cat > "$PKG/usr/share/applications/info.mumble.Mumble.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Mumble
GenericName=Voice Chat
Comment=Low-latency group voice chat
Exec=mumble %u
Icon=mumble
Terminal=false
StartupWMClass=info.mumble.Mumble
MimeType=x-scheme-handler/mumble;
Categories=Network;Chat;AudioVideo;Qt;
Keywords=voip;voice;chat;talk;mumble;murmur;
DESKTOP
chmod 644 "$PKG/usr/share/applications/info.mumble.Mumble.desktop"
install -d "$PKG/etc/init.d"
cat > "$PKG/etc/init.d/75_mumble-server.sh" <<'KDOS_SH'
#!/bin/bash
. /etc/init.d/service_helper
NAME="mumble-server"
DAEMON="/usr/bin/mumble-server"
INI="/etc/mumble/mumble-server.ini"
case "$1" in
start)
[ ! -x "$DAEMON" ] && { echo "[SKIP] $NAME: $DAEMON not found"; exit 0; }
if ! getent passwd mumble-server >/dev/null; then
echo "[SKIP] $NAME: no mumble-server account (the port's postinstall makes it)"
exit 0
fi
if [ ! -s /var/lib/mumble-server/mumble-server.sqlite ]; then
echo "[SKIP] $NAME: no database yet ('mumble-server -supw' as the account makes one)"
exit 0
fi
echo "[KDOS] Starting $NAME..."
supervise "$NAME" setpriv --reuid=mumble-server --regid=mumble-server \
--init-groups "$DAEMON" -fg -ini "$INI"
;;
stop) stop_service "$NAME" ;;
status) check_status "$NAME" ;;
*) echo "Usage: $0 {start|stop|status}"; exit 1 ;;
esac
KDOS_SH
chmod 755 "$PKG/etc/init.d/75_mumble-server.sh"
The switches, and why each is set:
-DOPENSSL_INCLUDE_DIR="$_ossl/include"— with-DOPENSSL_SSL_LIBRARY=/usr/lib/libssl.so.3and-DOPENSSL_CRYPTO_LIBRARY=/usr/lib/libcrypto.so.3, hand CMake’s FindOpenSSL the OpenSSL 3 headers generated in the second source (see Notes) and the openssl3 slot’s two libraries, by path.-DCMAKE_IGNORE_PATH="/usr/lib/cmake/OpenSSL;/usr/lib64/cmake/OpenSSL;/lib/cmake/OpenSSL;/lib64/cmake/OpenSSL"— hide OpenSSL 4’s CMake package. Mumble’s dependency search tries a CMake configuration package before FindOpenSSL, and a package it finds there wins over theOPENSSL_*paths above.-DCMAKE_INSTALL_SYSCONFDIR=/etc— installmumble-server.inias/etc/mumble/mumble-server.ini.-DCMAKE_CXX_STANDARD=17— compile as C++17 instead of Mumble’s default of C++14. The protobuf package Mumble links requires C++17 of its consumers (cxx_std_17), and the Abseil headers it includes stop with an error under anything older.-DBUILD_NUMBER="${version##*.}"— the last part of the version. Mumble’s version is1.5.<build number>, and without the switch upstream sets the number to 0, so the program would report the wrong version.-Dclient=ON— build the client and, with-Dserver=ON, the server;-Dplugins=ONbuilds the positional-audio plugins and-Dmanual-plugin=ONthe built-in manual one. All are upstream’s defaults, named.-Dtests=OFF— no test suite and, with-Dbenchmarks=OFF, no benchmarks.-Dwarnings-as-errors=OFF— upstream’s default is on, so any warning the tree’s compiler raises that upstream’s did not would stop the build.-Duse-timestamps=OFF— keep the build’s clock out of the output. With the switch on, upstream compiles the current year into the client’s copyright line and writes the day of the build as the release date in the generated AppStream metadata, so two builds of one recipe on different days differ. Upstream’s default is on.-Dupdate=OFF— the client does not check for a newer version by default. Upstream’s default is on.-Dcrash-report=OFF— leave out the crash reporter that sends reports to the Mumble developers. Upstream’s default is on.-Dtranslations=OFF— only the English interface, with-Dbundle-qt-translations=OFFadding no copy of Qt’s translations. The tree’s language policy would remove the catalogues in any case.-Dbundled-speex=OFF— link the speex and speexdsp ports, and with-Dbundled-json=OFFthe nlohmann-json port, instead of the copies under3rdparty/. Upstream’s default for both is the bundled copy.-Dbundled-gsl=ON— use the copy of Microsoft’s Guidelines Support Library under3rdparty/gsl, upstream’s default; it is not a port (the tree’sgslis the GNU Scientific Library).-Drenamenoise=ON— machine-learning noise suppression with ReNameNoise, and with-Dbundled-renamenoise=ONthe copy under3rdparty/, which is not a port. Both are upstream’s defaults.-Dalsa=ON— the ALSA,-Dpipewire=ONPipeWire and-Dpulseaudio=ONPulseAudio audio backends, upstream’s defaults on Linux, named.-Djackaudio=OFF— no JACK backend. The JACK library on the system is PipeWire’s own, so a JACK switch left to detection would follow build order, and every port that can link JACK names it; see JACK programs on the host. Upstream’s default is on.-Dportaudio=OFF— no PortAudio backend, and with-Doss=OFFno OSS one. Both are on by default upstream.-Dspeechd=ON— text-to-speech of chat events through speech-dispatcher, upstream’s default on Linux;-Dqtspeech=OFF, also the default, keeps that rather than Qt Speech.-Dxinput2=ON— link the X Input 2 extension (X11::Xi), which the client’s global shortcuts use under X11; upstream’s default on Linux.-Dg15=OFF, the default, leaves out the Logitech G15 keyboard display.-Dzeroconf=ON— find servers on the local network over mDNS through avahi, and announcemumble-serverthere; upstream’s default.-Dqssldiffiehellmanparameters=ON— let the server use custom Diffie-Hellman parameters, upstream’s default.-Doverlay=OFF— no in-game overlay, which upstream builds with the client by default; with-Doverlay-xcompile=OFFno 32-bit build of it either.-Dice=OFF— no remote control of the server over ZeroC Ice RPC, which the tree does not carry. Upstream’s default is on.
The common switches of each build system are explained in the Flag glossary.
postinstall.sh runs on the installed system after the package is adopted:
# Everything is written under PKG_ROOT, the root kpkgadd is installing into:
# --root and an A/B update install into a tree that is not the running one, and
# an account made in / instead would be missing from the system that needs it.
#
# The guard reads PKG_ROOT's files: getent answers for the running root, not
# the tree being installed, and would let useradd run against an account the
# target already has.
root="${PKG_ROOT:-/}"
grep -q '^mumble-server:' "$root/etc/group" 2>/dev/null || groupadd -R "$root" -r mumble-server
grep -q '^mumble-server:' "$root/etc/passwd" 2>/dev/null || \
useradd -R "$root" -r -g mumble-server -d /var/lib/mumble-server -s /sbin/nologin mumble-server
# chown resolves a name against the running root's passwd, so the ids are read
# out of PKG_ROOT's. The ini is group-readable only, and the server reads it
# after setpriv has made it the account.
# The mode is set as well: kpkgadd creates every directory 0755, whatever mode
# it was packaged with, because the package carries no group to give it.
while IFS=: read -r n _ uid gid _; do
[ "$n" = mumble-server ] || continue
chown "$uid:$gid" "$root/var/lib/mumble-server"
chmod 750 "$root/var/lib/mumble-server"
chown "0:$gid" "$root/etc/mumble/mumble-server.ini"
done < "$root/etc/passwd"
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/mumble, 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 mumble-1.5.939-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/mumble, and runs the triggers its paths call for.
Contents
Installed programs: mumble, mumble-server.
Installed directories: /etc/mumble, /usr/lib/mumble, /usr/share/licenses/mumble, /var/lib/mumble-server.
Short descriptions
mumble |
a low-latency, high quality voice chat program |
mumble-server |
VoIP server. |
Notes
The tree’s openssl is version 4, and Qt 5 cannot be built against it, so a Qt 5 program links the openssl3 slot, which installs libssl.so.3 and libcrypto.so.3 and no headers (see A second version beside the first). The recipe’s second source is that OpenSSL release, pinned in _openssl, and build.sh runs its ./config with the slot’s own configuration line, word for word, then make build_generated, which writes the generated headers and sources without compiling the library. The configuration has to match, because the generated include/openssl/configuration.h records which algorithms the library was built with. Nothing from that tree is installed.
After the install, build.sh reads the dynamic section of mumble and mumble-server and fails the build unless each needs libssl.so.3 and neither needs an OpenSSL 4 library. musl’s loader has one symbol namespace, so two libcrypto sonames in one process would resolve each other’s calls.
KDOS has no systemd, so the unit file, the sysusers.d and tmpfiles.d entries and the per-user mumble-server-user-wrapper script upstream installs with them are deleted, and the port ships its own init script, /etc/init.d/75_mumble-server.sh. It runs the server under supervise as the mumble-server account, through setpriv, and skips with a message while there is no account or no database yet; a database is made by running mumble-server -supw as that account. postinstall.sh creates the account and group in the root being installed into, PKG_ROOT, and gives the account /var/lib/mumble-server (mode 0750) and the .ini, which only its group may read. It reads /etc/passwd and /etc/group under PKG_ROOT directly, because getent answers for the running system and not the tree being installed. See postinstall.sh.