diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-09-06 16:24:09 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-09-06 18:45:12 +0200 |
commit | e3c1e1fbcbf50d86bdbc6d6cf31ea6c87b1ed407 (patch) | |
tree | 2501352e22b74a40fc8ea3d866ee148687491ec4 | |
parent | 706e37a42c4ab2bae47ead5045a582aed7607f4e (diff) | |
download | qpdf-e3c1e1fbcbf50d86bdbc6d6cf31ea6c87b1ed407.tar.zst |
Validate RUNPATH of standalone Linux binaries in CI
-rw-r--r-- | TODO | 4 | ||||
-rwxr-xr-x | build-scripts/build-appimage | 7 |
2 files changed, 7 insertions, 4 deletions
@@ -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" diff --git a/build-scripts/build-appimage b/build-scripts/build-appimage index 3ba7175e..a9fba23c 100755 --- a/build-scripts/build-appimage +++ b/build-scripts/build-appimage @@ -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/*) |