Commit 30380b64e37b275854553668a4fa32be7fc4a11d

Authored by Jay Berkenbilt
1 parent ac4cca7c

Add docker file for building app image

The official, signed AppImage will be build locally for now for
security of my key, but I still want it to be built in a clean,
controlled environment based off a suitably old Linux distribution for
maximal portability in the AppImage.
README-maintainer.md
@@ -27,7 +27,17 @@ @@ -27,7 +27,17 @@
27 * libqpdf/QPDF.cc 27 * libqpdf/QPDF.cc
28 * manual/qpdf-manual.xml 28 * manual/qpdf-manual.xml
29 `make_dist` verifies this consistency. 29 `make_dist` verifies this consistency.
30 -* Generate a signed AppImage. To do this, have the gpg key available and run `./appimage/build-appimage --sign`. Rename the AppImage in appimage/build to qpdf-<version>-x86_64.AppImage and include it in the set of files to be released. 30 +* Generate a signed AppImage using the docker image in appimage. Arguments to the docker container are arguments to git clone. The build should be made off the exact commit that will be officially tagged as the release but built prior to tagging the release.
  31 +Example:
  32 + ```
  33 + cd appimage
  34 + docker build -t qpdfbuild .
  35 + rm -rf /tmp/build
  36 + mkdir -p /tmp/build
  37 + cp -rLp ~/.gnupg/. /tmp/build/.gnupg
  38 + docker run --privileged -ti --rm -v /tmp/build:/tmp/build qpdfbuild https://github.com/jberkenbilt/qpdf -b work
  39 + ```
  40 + Rename the AppImage in appimage/build to qpdf-<version>-x86_64.AppImage and include it in the set of files to be released.
31 * Update release date in `manual/qpdf-manual.xml`. Remember to ensure that the entities at the top of the document are consistent with the release notes for both version and release date. 41 * Update release date in `manual/qpdf-manual.xml`. Remember to ensure that the entities at the top of the document are consistent with the release notes for both version and release date.
32 * Check `TODO` file to make sure all planned items for the release are done or retargeted. 42 * Check `TODO` file to make sure all planned items for the release are done or retargeted.
33 * Each year, update copyright notices. Just do a case-insensitive search for copyright. Don't forget copyright in manual. Also update debian copyright in debian package. Last updated: 2018. 43 * Each year, update copyright notices. Just do a case-insensitive search for copyright. Don't forget copyright in manual. Also update debian copyright in debian package. Last updated: 2018.
appimage/Dockerfile 0 → 100644
  1 +FROM ubuntu:14.04
  2 +RUN apt-get update && \
  3 + apt-get -y install screen autoconf git \
  4 + build-essential zlib1g-dev libjpeg-dev \
  5 + docbook-xsl fop xsltproc \
  6 + imagemagick wget fuse && \
  7 + apt-get clean && \
  8 + rm -rf /var/lib/apt/lists/*
  9 +COPY entrypoint /entrypoint
  10 +RUN chmod +x /entrypoint
  11 +ENTRYPOINT [ "/entrypoint" ]
appimage/entrypoint 0 → 100755
  1 +#!/bin/bash
  2 +set -e
  3 +if [ $(id -u) = 0 ]; then
  4 + if [ ! -d /tmp/build/.gnupg ]; then
  5 + echo "/tmp/build must exist and must contain .gnupg"
  6 + exit 2
  7 + fi
  8 + id=$(stat -c %u /tmp/build)
  9 + adduser --home /tmp/build --no-create-home --uid $id --disabled-password --gecos build build
  10 + exec sudo -iu build $0 "$@"
  11 +fi
  12 +
  13 +cd /tmp/build
  14 +if [ ! -d qpdf ]; then
  15 + if [ "$1" == "" ]; then
  16 + echo "A repository and optional git clone arguments must be given"
  17 + exit 2
  18 + fi
  19 + git clone "$@" qpdf
  20 +fi
  21 +cd qpdf
  22 +./appimage/build-appimage --sign