diff --git a/TODO b/TODO index 8bb9fcbe..5bf49fe6 100644 --- a/TODO +++ b/TODO @@ -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/*)