Files
rustguac/scripts/check-guacd-plugins.sh
T
Dave Kempe 994f138685 packaging: build guacenc and ship it in every package
guacenc, from guacamole-server, converts .guac recordings to video and is
what MP4 downloads (#241) run. Stop passing --disable-guacenc in
build-deb.sh, the release workflow, install.sh, the Dockerfile and
dev.sh, and ship /opt/rustguac/bin/guacenc in the .deb (debian/rules),
the Docker runtime image and the release tarball (install-release.sh
installs it when present). It needs only the ffmpeg libraries guacd is
already built and shipped with, so no new dependencies.

configure leaves guacenc out quietly when an ffmpeg library is missing,
like the protocols, so check-guacd-plugins.sh now also fails the build
when guacenc was not built.
2026-10-18 13:23:14 +11:00

30 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Fail unless every guacd protocol plugin rustguac uses, and guacenc (which
# converts recordings to video for MP4 downloads), was built.
#
# guacd's configure quietly leaves out a protocol whose library is missing,
# even when it is asked for with --with-<protocol>, so a build machine
# without libspice-client-glib-2.0-dev produced a guacd with no SPICE and
# nothing failed: SPICE and Proxmox consoles were missing from every .deb
# from v1.9.0 to v1.11.0. Run this after `make install` in every build path.
#
# guacenc is left out the same way when an ffmpeg library is missing.
#
# Usage: check-guacd-plugins.sh <dir holding libguac-client-*.so>
# (guacenc is looked for in the sibling bin/ directory, as `make install`
# lays them out)
set -euo pipefail
dir="${1:?usage: $0 <guacd lib dir>}"
missing=()
for protocol in rdp ssh vnc spice; do
[[ -e "$dir/libguac-client-$protocol.so.0" ]] || missing+=("$protocol")
done
[[ -x "$dir/../bin/guacenc" ]] || missing+=("guacenc")
if (( ${#missing[@]} )); then
echo "ERROR: guacd was built without: ${missing[*]} (looked in $dir)" >&2
echo "Install the development library for each and rebuild; configure skips them silently." >&2
exit 1
fi
echo "guacd plugins present: rdp ssh vnc spice; guacenc present"