Skip to content

Commit

Permalink
Build AppImage and linux binary using Ubuntu 18.04 (fixes qpdf#1068)
Browse files Browse the repository at this point in the history
This is needed to get an old enough version of glibc to run the Linux
binary as an AWS Lambda layer and to support some versions of CentOS.
  • Loading branch information
jberkenbilt committed Nov 20, 2023
1 parent b6e12f4 commit da3eae3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2023-11-20 Jay Berkenbilt <[email protected]>

* Build AppImage with an older Linux distribution to support AWS
Lambda. Fixes #1086.

2023-10-15 Jay Berkenbilt <[email protected]>

* 11.6.3: release
Expand Down
12 changes: 9 additions & 3 deletions appimage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
FROM ubuntu:20.04
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y install screen git sudo \
build-essential pkg-config cmake \
build-essential pkg-config \
zlib1g-dev libjpeg-dev libgnutls28-dev \
python3-pip texlive-latex-extra latexmk \
inkscape imagemagick busybox-static wget fuse && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN pip3 install sphinx sphinx_rtd_theme
# Get cmake from pypi. We need to keep Ubuntu 18.04 for a while longer
# since the glibc in Ubuntu 20.04 is too new (as of late 2023) for
# Amazon Linux 2 in Lambda and for some supported CentOS versions.
# When we are ready to update to 20.04 or newer, remove the version
# constraint on sphinx, and install the OS package for cmake.
RUN pip3 install --upgrade pip
RUN pip3 install sphinx==4 sphinx_rtd_theme cmake
COPY entrypoint /entrypoint
RUN chmod +x /entrypoint
ENTRYPOINT [ "/entrypoint" ]
4 changes: 2 additions & 2 deletions appimage/build-appimage
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ fi
_osversion=$(cat /etc/os-release | grep PRETTY_NAME | awk -F'=' '{print $2}' | sed 's#"##g')

# Warn users building the AppImage locally:
if [[ ! $_osversion =~ Ubuntu\ 20.04.*\ LTS ]]; then
if [[ ! $_osversion =~ Ubuntu\ 18.04.*\ LTS ]]; then
set +x
echo ""
# 0 1 2 3 4 5 6 7
# 01234567890123456789012345678901234567890123456789012345678901234567890123456789
echo "+===========================================================================+"
echo "|| WARNING: You are about to build a QPDF AppImage on a system which is ||"
echo "|| NOT Ubuntu 20.04 LTS. ||"
echo "|| NOT Ubuntu 18.04 LTS. ||"
echo "|| ||"
echo "|| It is recommended that you use a distribution that is at least a ||"
echo "|| few years old to maximize the number of Linux distributions the ||"
Expand Down

0 comments on commit da3eae3

Please sign in to comment.