diff --git a/ChangeLog b/ChangeLog index 3c748cc3..8d772d91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2020-10-21 Jay Berkenbilt + + * Add qpdf--linux-x86_64.zip to the list of built + distributions. This is a simple zip file that contains just the + qpdf executables and the dependent shared libraries that would not + ordinarily be present on a base system. This minimal binary + distribution works as is when used as a Lambda layer in AWS and + could be suitable for inclusion in a docker image or other + standalone Linux/x86_64 environment where you want minimal support + for running the qpdf executable. Fixes #352. + 2020-10-20 Jay Berkenbilt * Add --warning-exit-0 option to the qpdf command line. When diff --git a/TODO b/TODO index 98512644..2e76e5f8 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ Candidates for upcoming release =============================== * Easy build/test - * #352: building standalone executables (lambda layer) * #460: potential malware in fuzzer seed corpus * Consider building workflow on a schedule to detect build rot. This may enable safe use of *-latest especially if Windows wildcard is diff --git a/build-scripts/build-appimage b/build-scripts/build-appimage index 8a614701..3ba7175e 100755 --- a/build-scripts/build-appimage +++ b/build-scripts/build-appimage @@ -19,4 +19,15 @@ cp -p appimage/build/qpdf/appimage/build/qpdf*AppImage* distribution for i in distribution/*; do mv $i $(echo $i | sed -e 's/\.AppImage/-ci.AppImage/') done + +# Extract a standalone copy of binaries and libraries from the +# AppImage. This is suitable for use in AWS Lambda, docker, or other +# self-contained environments. +version=$(basename distribution/qpdf*AppImage | cut -d- -f 2) +./distribution/qpdf*AppImage --appimage-extract +D=$PWD/distribution +(cd squashfs-root/usr; \ + zip -9 --symlinks $D/qpdf-$version-bin-linux-x86_64-ci.zip \ + bin/{qpdf,fix-qdf,zlib-flate} lib/*) + sha256sum distribution/* diff --git a/make/libtool.mk b/make/libtool.mk index 6a2bbc1a..a259afe0 100644 --- a/make/libtool.mk +++ b/make/libtool.mk @@ -106,6 +106,8 @@ endef # Install target +# NOTE: If installing any new executables, remember to update the +# lambda layer code in build-scripts/build-appimage. install: all ./mkinstalldirs -m 0755 $(DESTDIR)$(libdir)/pkgconfig ./mkinstalldirs -m 0755 $(DESTDIR)$(bindir)