fix(packaging): make the AppImage self-contained and restore the RPM libva requirement
Two defects found by inspecting the published v0.2.19 artifacts. The AppImage contained the binary and the desktop file and nothing else. The binary links FFmpeg, PipeWire, ALSA and XCB directly, so the image only ran on a host that happened to carry the exact FFmpeg build the binary was linked against, which is the opposite of what an AppImage is for. The packaging step now bundles the shared library closure that ldd resolves, points the binary at it with an RPATH of $ORIGIN/../lib, and prepends it to LD_LIBRARY_PATH in AppRun. The C runtime is deliberately left on the host, because bundling a different glibc than the rest of the system expects produces failures that are very hard to trace. The step fails if fewer than five libraries were collected or if the image was not produced, so a silently empty image can never ship. alien drops libva2 when it converts the Debian package to an RPM, because it has no Debian to RPM name rule for it. libva is loaded at runtime by the FFmpeg VAAPI device, so the requirement is now added back explicitly with rpm --addrequires and the build fails if it is missing from the finished package. Without it an RPM install would leave hardware encoding unavailable until the user noticed and installed libva by hand. Version bumped to 0.2.20 across the manifest, lock file, RPM spec, AUR PKGBUILD and the guide.
This commit is contained in:
parent
f7f778916f
commit
2bd1e7c598
6 changed files with 53 additions and 10 deletions
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
|
||||
libavfilter-dev libavdevice-dev \
|
||||
libpipewire-0.3-dev libgtk-3-dev libgtk-layer-shell-dev libxcb1-dev libasound2-dev \
|
||||
rpm alien wget
|
||||
rpm alien wget patchelf
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
|
@ -78,10 +78,17 @@ jobs:
|
|||
DEB_FILE=$(ls dist/*.deb | head -n 1)
|
||||
alien --to-rpm --scripts "$DEB_FILE"
|
||||
mv *.rpm dist/
|
||||
# alien resolves the Debian package names to sonames, but it drops
|
||||
# libva2 because there is no matching Debian to RPM name rule.
|
||||
# libva is loaded at runtime by the FFmpeg VAAPI device, so the
|
||||
# requirement has to be added back explicitly.
|
||||
rpm --addrequires "libva.so.2()(64bit)" dist/*.rpm
|
||||
rpm -qp --requires dist/*.rpm | grep -q "libva.so.2" \
|
||||
|| { echo "::error::libva requirement missing from the RPM"; exit 1; }
|
||||
|
||||
- name: Package Standalone AppImage
|
||||
run: |
|
||||
mkdir -p AppDir/usr/bin AppDir/usr/share/applications AppDir/usr/share/icons/hicolor/scalable/apps
|
||||
mkdir -p AppDir/usr/bin AppDir/usr/lib AppDir/usr/share/applications AppDir/usr/share/icons/hicolor/scalable/apps
|
||||
cp target/release/scythe AppDir/usr/bin/
|
||||
ln -sf scythe AppDir/usr/bin/scythe-ui
|
||||
ln -sf scythe AppDir/usr/bin/scythe-daemon
|
||||
|
|
@ -89,10 +96,34 @@ jobs:
|
|||
ln -sf scythe AppDir/usr/bin/vrec-daemon
|
||||
ln -sf scythe AppDir/usr/bin/vrec
|
||||
cp packaging/scythe.desktop AppDir/usr/share/applications/
|
||||
|
||||
|
||||
# Bundle the shared library closure. Without this the image only
|
||||
# runs on a host that happens to carry the exact FFmpeg build the
|
||||
# binary was linked against, which defeats the point of an
|
||||
# AppImage. ldd already resolves the full transitive closure.
|
||||
ldd target/release/scythe | awk '/=>/ {print $3}' | sort -u | while read -r lib; do
|
||||
[ -e "$lib" ] || continue
|
||||
base=$(basename "$lib")
|
||||
# The C runtime stays on the host: bundling a different glibc
|
||||
# than the kernel and the other system libraries expect breaks
|
||||
# the image in ways that are hard to diagnose.
|
||||
case "$base" in
|
||||
libc.so.6|libm.so.6|libgcc_s.so.1|ld-linux*.so.2|libpthread.so.0|libdl.so.2|librt.so.1) continue ;;
|
||||
esac
|
||||
cp -L "$lib" "AppDir/usr/lib/$base"
|
||||
done
|
||||
lib_count=$(ls -1 AppDir/usr/lib | wc -l)
|
||||
echo "bundled libraries: ${lib_count}"
|
||||
ls -1 AppDir/usr/lib
|
||||
|
||||
# Prefer the bundled copies over anything the host provides.
|
||||
patchelf --set-rpath '$ORIGIN/../lib' AppDir/usr/bin/scythe
|
||||
patchelf --print-rpath AppDir/usr/bin/scythe
|
||||
|
||||
cat > AppDir/AppRun << 'EOF'
|
||||
#!/bin/sh
|
||||
HERE="$(dirname "$(readlink -f "${0}")")"
|
||||
export LD_LIBRARY_PATH="${HERE}/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
exec "${HERE}/usr/bin/scythe" "$@"
|
||||
EOF
|
||||
chmod +x AppDir/AppRun
|
||||
|
|
@ -105,6 +136,18 @@ jobs:
|
|||
chmod +x appimagetool
|
||||
./appimagetool --appimage-extract-and-run AppDir dist/scythe-x86_64.AppImage || true
|
||||
|
||||
# The image is only useful if the libraries actually made it in.
|
||||
lib_count=$(ls -1 AppDir/usr/lib | wc -l)
|
||||
echo "bundled libraries: ${lib_count}"
|
||||
if [ "${lib_count}" -lt 5 ]; then
|
||||
echo "::error::AppImage bundled only ${lib_count} libraries, expected the FFmpeg closure"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f dist/scythe-x86_64.AppImage ]; then
|
||||
echo "::error::AppImage was not produced"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Linux Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
|
|||
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -3242,7 +3242,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "scythe"
|
||||
version = "0.2.19"
|
||||
version = "0.2.20"
|
||||
dependencies = [
|
||||
"ashpd",
|
||||
"cpal",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "scythe"
|
||||
version = "0.2.19"
|
||||
version = "0.2.20"
|
||||
edition = "2024"
|
||||
|
||||
[[bin]]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ This document is the definitive technical reference for developers and AI agents
|
|||
|
||||
## 1. Project Overview & Current Status
|
||||
|
||||
**Current Version:** `v0.2.19`
|
||||
**Current Version:** `v0.2.20`
|
||||
**License:** Dual MIT / Apache 2.0
|
||||
|
||||
### Repository Topology
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Maintainer: oiupoyt
|
||||
pkgname=scythe-git
|
||||
pkgver=0.2.19
|
||||
pkgver=0.2.20
|
||||
pkgrel=1
|
||||
pkgdesc="High-performance GPU hardware screen recorder and instant replay overlay for Wayland and X11"
|
||||
arch=('x86_64')
|
||||
|
|
@ -15,7 +15,7 @@ sha256sums=('SKIP')
|
|||
|
||||
pkgver() {
|
||||
cd "$srcdir/scythe"
|
||||
git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || echo "0.2.19"
|
||||
git describe --long --tags 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || echo "0.2.20"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
Name: scythe
|
||||
Version: 0.2.19
|
||||
Version: 0.2.20
|
||||
Release: 1%{?dist}
|
||||
Summary: High-performance GPU hardware screen recorder and instant replay overlay
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ ln -sf %{_datadir}/applications/scythe.desktop %{buildroot}%{_datadir}/applicati
|
|||
%{_datadir}/applications/vrec.desktop
|
||||
|
||||
%changelog
|
||||
* Tue Oct 21 2026 oiupoyt - 0.2.19-1
|
||||
* Tue Oct 21 2026 oiupoyt - 0.2.20-1
|
||||
- Unified multicall binary: install scythe with the scythe-daemon, scythe-ui
|
||||
and vrec-* compatibility symlinks
|
||||
- Dropped the GTK 3 and GTK layer shell requirements, the GTK backend was
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue