lesavka: verify client build toolchain
This commit is contained in:
parent
cf8fadd368
commit
95445e9252
@ -26,6 +26,16 @@ require_command() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
require_linkable() {
|
||||
local path=$1
|
||||
local label=$2
|
||||
if ldd "$path" 2>/dev/null | grep -q 'not found'; then
|
||||
echo "❌ $label is present but has unresolved shared-library dependencies:" >&2
|
||||
ldd "$path" 2>/dev/null | grep 'not found' >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
run_as_user() {
|
||||
sudo -u "$ORIG_USER" env HOME="$USER_HOME" SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-}" "$@"
|
||||
}
|
||||
@ -42,7 +52,7 @@ log "1. Installing base packages"
|
||||
# tightly versioned PipeWire packages, and Lesavka should not force an audio
|
||||
# stack upgrade just to install the client.
|
||||
sudo pacman -Sq --needed --noconfirm \
|
||||
git rustup protobuf abseil-cpp gcc clang evtest base-devel libpulse \
|
||||
git rustup protobuf abseil-cpp gcc clang llvm-libs compiler-rt evtest base-devel libpulse \
|
||||
gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav \
|
||||
wmctrl qt6-tools wl-clipboard xclip xsel desktop-file-utils
|
||||
|
||||
@ -77,12 +87,18 @@ log "1d. Verifying runtime tools"
|
||||
require_command pactl "libpulse"
|
||||
require_command wmctrl "wmctrl"
|
||||
require_command qdbus6 "qt6-tools"
|
||||
require_command protoc "protobuf"
|
||||
if ! command -v wl-paste >/dev/null 2>&1 \
|
||||
&& ! command -v xclip >/dev/null 2>&1 \
|
||||
&& ! command -v xsel >/dev/null 2>&1; then
|
||||
echo "❌ no clipboard reader found after install (expected one of wl-clipboard/xclip/xsel)" >&2
|
||||
exit 1
|
||||
fi
|
||||
require_linkable "$(command -v protoc)" "protoc"
|
||||
if [[ -e /usr/lib/libclang.so ]]; then
|
||||
require_linkable /usr/lib/libclang.so "libclang"
|
||||
fi
|
||||
protoc --version >/dev/null
|
||||
if ! run_as_user pactl info >/dev/null 2>&1; then
|
||||
echo "⚠️ pactl is installed, but no PulseAudio/PipeWire Pulse server is reachable right now."
|
||||
echo " Lesavka will still install, but local speaker/mic staging may stay empty until the host audio session is up."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user