mirror of
https://github.com/kirbylink/mpv-natives
synced 2026-11-27 11:42:26 +01:00
fix: fontconfig build must not pin sysconfdir=/etc
Pinning fontconfig's sysconfdir to /etc made the build try to install its own conf files into the real /etc/fonts/conf.d, which fails without root on the runner (PermissionError). Revert to the default prefix: the prefix-baked config paths are harmless because fontconfig falls back to a built-in config that scans /usr/share/fonts and /usr/local/share/fonts when no config file exists at the compiled-in path - so libass's font lookup works on any standard box without env vars. Also tighten the artifact verification: instead of a broad build-path grep (which would false-positive on fontconfig's benign prefix strings), assert the ALSA config dir is the system path and not the build prefix - the specific regression that broke audio.
This commit is contained in:
@@ -82,26 +82,37 @@ jobs:
|
||||
echo "=== contents ==="
|
||||
ls -l artifact-libmpv
|
||||
|
||||
# Verify the artifact is self-contained and portable: (1) it only links
|
||||
# against system libs (no vendored .so), (2) it carries no debug sections
|
||||
# (strip worked, artifact stays small), and (3) no build-machine paths
|
||||
# leaked into the binary (the runtime config lookup must not depend on the
|
||||
# runner's prefix - that is what broke ALSA before).
|
||||
- name: Verify artifact (ldd, size, no build paths)
|
||||
# Verify the artifact is self-contained and portable:
|
||||
# (1) ldd shows only system libs (no vendored .so to ship),
|
||||
# (2) no .debug sections remain (strip worked, artifact stays small),
|
||||
# (3) the ALSA config dir is the system path, not the build prefix.
|
||||
# (The prefix-baked ALSA_CONFIG_DIR is what broke audio before:
|
||||
# snd_pcm_open("default") looked for <prefix>/share/alsa/alsa.conf
|
||||
# on the target box. fontconfig also bakes its prefix into the
|
||||
# binary, but that is benign - with no config at that path it falls
|
||||
# back to a built-in config that scans /usr/share/fonts, so we do
|
||||
# NOT fail on fontconfig prefix strings.)
|
||||
- name: Verify artifact (ldd, size, alsa config dir)
|
||||
run: |
|
||||
cd artifact-libmpv
|
||||
echo "=== dynamic deps (system libs only) ==="
|
||||
ldd libmpv.so
|
||||
echo "=== debug sections (expect none) ==="
|
||||
echo "=== debug sections (expect 0) ==="
|
||||
readelf -S libmpv.so | grep -c '\.debug' || true
|
||||
echo "=== size ==="
|
||||
du -h libmpv.so
|
||||
echo "=== build-machine paths (expect no match) ==="
|
||||
if strings -a libmpv.so | grep -q "linux_prefix\|/home/runner\|mpv-natives"; then
|
||||
echo "ERROR: build paths found in libmpv.so"
|
||||
echo "=== ALSA config dir baked into the lib (must be /usr/share/alsa) ==="
|
||||
if strings -a libmpv.so | grep -q "linux_prefix/share/alsa\|/share/alsa"; then
|
||||
strings -a libmpv.so | grep -o "[^ ]*share/alsa" | sort -u
|
||||
else
|
||||
echo "ERROR: no ALSA config dir found in libmpv.so (libasound not linked?)"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK: no build paths"
|
||||
if strings -a libmpv.so | grep -q "linux_prefix/share/alsa"; then
|
||||
echo "ERROR: ALSA config dir points at the build prefix (audio will be broken)"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK"
|
||||
|
||||
- name: Checksums
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user