2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Validate RUNPATH of standalone Linux binaries in CI

This commit is contained in:
Jay Berkenbilt 2022-09-06 10:24:09 -04:00
parent 706e37a42c
commit e3c1e1fbcb
2 changed files with 7 additions and 4 deletions

4
TODO
View File

@ -19,10 +19,6 @@ Pending changes:
* Consider also exposing a way to set a new logger and to get the
logger from QPDF and QPDFJob in the C API.
* Check about runpath in the linux-bin distribution. I think the
appimage build specifically is setting the runpath, which is
actually desirable in this case. Make sure to understand and
document this. Maybe add a check for it in the build.
Soon: Break ground on "Document-level work"

View File

@ -26,6 +26,13 @@ done
version=$(basename distribution/qpdf*AppImage | cut -d- -f 2)
./distribution/qpdf*AppImage --appimage-extract
D=$PWD/distribution
if ! (readelf -d squashfs-root/usr/bin/qpdf | \
grep RUNPATH | grep -q -F ..); then
# We are relying on the AppImage build to create an executable
# whose runpath is relative to the binary so that the extract zip
# file is relocatable.
echo "Standalone linux binary lacks relative RUNPATH"
fi
(cd squashfs-root/usr; \
zip -9 --symlinks $D/qpdf-$version-bin-linux-x86_64-ci.zip \
bin/{qpdf,fix-qdf,zlib-flate} lib/*)