Skip to content

Commit

Permalink
Migrate to linuxdeploy for building AppImages
Browse files Browse the repository at this point in the history
AppImage recipes are the legacy method for building AppImages, whereas
linuxdeploy is meant to replace them. It takes care of finding and
deploying all needed libraries and Qt plugins automagically, but it's
still under heavy development, so some manual work using appimagetool
and a few fixes are required to make it work for KeePassXC.

This patch moves building of AppImages directly into the release-tool,
both as a separate module (release-tool appimage) as well as a flag
(--appimage) for the build module. The release and CI Dockerfiles were
updated accordingly to support the new build process. The release
Dockerfile also received a Qt update to version 5.10.1.

In theory, it is now possible to use release-tool appsign for embedding
PGP signatures into AppImages, but it fails in practice due to ELF
header size limitations.
  • Loading branch information
phoerious committed Sep 29, 2018
1 parent 61d7e6b commit a4c6529
Show file tree
Hide file tree
Showing 6 changed files with 398 additions and 303 deletions.
114 changes: 0 additions & 114 deletions AppImage-Recipe.sh

This file was deleted.

36 changes: 23 additions & 13 deletions Dockerfile
Expand Up @@ -18,16 +18,16 @@ FROM ubuntu:14.04

ENV REBUILD_COUNTER=8

ENV QT5_VERSION=59
ENV QT5_PPA_VERSION=${QT5_VERSION}4
ENV QT5_VERSION=qt510
ENV QT5_PPA_VERSION=qt-5.10.1
ENV TERM=xterm-256color

RUN set -x \
&& apt-get update -y \
&& apt-get -y install software-properties-common

RUN set -x \
&& add-apt-repository ppa:beineri/opt-qt${QT5_PPA_VERSION}-trusty \
&& add-apt-repository ppa:beineri/opt-${QT5_PPA_VERSION}-trusty \
&& add-apt-repository ppa:phoerious/keepassxc

RUN set -x \
Expand All @@ -38,39 +38,49 @@ RUN set -x \
RUN set -x \
&& apt-get install -y \
cmake3 \
curl \
g++ \
git \
libgcrypt20-18-dev \
libargon2-0-dev \
libsodium-dev \
libcurl-no-gcrypt-dev \
qt${QT5_VERSION}base \
qt${QT5_VERSION}tools \
qt${QT5_VERSION}x11extras \
qt${QT5_VERSION}translations \
qt${QT5_VERSION}imageformats \
${QT5_VERSION}base \
${QT5_VERSION}tools \
${QT5_VERSION}x11extras \
${QT5_VERSION}translations \
${QT5_VERSION}imageformats \
zlib1g-dev \
libxi-dev \
libxtst-dev \
mesa-common-dev \
libyubikey-dev \
libykpers-1-dev

ENV CMAKE_PREFIX_PATH="/opt/qt${QT5_VERSION}/lib/cmake"
ENV PATH="/opt/${QT5_VERSION}/bin:${PATH}"
ENV CMAKE_PREFIX_PATH="/opt/${QT5_VERSION}/lib/cmake"
ENV CMAKE_INCLUDE_PATH="/opt/keepassxc-libs/include"
ENV CMAKE_LIBRARY_PATH="/opt/keepassxc-libs/lib/x86_64-linux-gnu"
ENV CPATH="${CMAKE_INCLUDE_PATH}"
ENV LD_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}:/opt/qt${QT5_VERSION}/lib"
ENV LD_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}:/opt/${QT5_VERSION}/lib"

RUN set -x \
&& echo "/opt/qt${QT5_VERSION}/lib" > /etc/ld.so.conf.d/qt${QT5_VERSION}.conf \
&& echo "/opt/${QT5_VERSION}/lib" > /etc/ld.so.conf.d/${QT5_VERSION}.conf \
&& echo "/opt/keepassxc-libs/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/keepassxc.conf

# AppImage dependencies
RUN set -x \
&& apt-get install -y \
libfuse2 \
wget
curl \
libfuse2

RUN set -x \
&& curl -L "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" > /usr/bin/linuxdeploy \
&& curl -L "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" > /usr/bin/linuxdeploy-plugin-qt \
&& curl -L "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" > /usr/bin/appimagetool \
&& chmod +x /usr/bin/linuxdeploy \
&& chmod +x /usr/bin/linuxdeploy-plugin-qt \
&& chmod +x /usr/bin/appimagetool

RUN set -x \
&& apt-get autoremove --purge \
Expand Down
51 changes: 0 additions & 51 deletions ci/snapcraft/Dockerfile

This file was deleted.

65 changes: 40 additions & 25 deletions ci/trusty/Dockerfile
Expand Up @@ -20,7 +20,7 @@ FROM ubuntu:14.04

ENV REBUILD_COUNTER=4

ENV QT5_VERSION=53
ENV QT5_VERSION=qt53
ENV QT5_PPA_VERSION=${QT5_VERSION}2
ENV TERM=xterm-256color

Expand All @@ -29,43 +29,58 @@ RUN set -x \
&& apt-get -y install software-properties-common

RUN set -x \
&& add-apt-repository ppa:beineri/opt-qt${QT5_PPA_VERSION}-trusty \
&& add-apt-repository ppa:beineri/opt-${QT5_PPA_VERSION}-trusty \
&& add-apt-repository ppa:phoerious/keepassxc

RUN set -x \
&& apt-get -y update \
&& apt-get -y --no-install-recommends install \
build-essential \
clang-3.6 \
libclang-common-3.6-dev \
clang-format-3.6 \
cmake3 \
make \
libgcrypt20-18-dev \
libargon2-0-dev \
libsodium-dev \
libcurl-no-gcrypt-dev \
qt${QT5_VERSION}base \
qt${QT5_VERSION}tools \
qt${QT5_VERSION}x11extras \
qt${QT5_VERSION}translations \
zlib1g-dev \
libyubikey-dev \
libykpers-1-dev \
libxi-dev \
libxtst-dev \
xvfb
build-essential \
clang-3.6 \
libclang-common-3.6-dev \
clang-format-3.6 \
cmake3 \
make \
libgcrypt20-18-dev \
libargon2-0-dev \
libsodium-dev \
libcurl-no-gcrypt-dev \
${QT5_VERSION}base \
${QT5_VERSION}tools \
${QT5_VERSION}x11extras \
${QT5_VERSION}translations \
zlib1g-dev \
libyubikey-dev \
libykpers-1-dev \
libxi-dev \
libxtst-dev \
xvfb

ENV CMAKE_PREFIX_PATH="/opt/qt${QT5_VERSION}/lib/cmake"
ENV PATH="/opt/${QT5_VERSION}/bin:${PATH}"
ENV CMAKE_PREFIX_PATH="/opt/${QT5_VERSION}/lib/cmake"
ENV CMAKE_INCLUDE_PATH="/opt/keepassxc-libs/include"
ENV CMAKE_LIBRARY_PATH="/opt/keepassxc-libs/lib/x86_64-linux-gnu"
ENV CPATH="${CMAKE_INCLUDE_PATH}"
ENV LD_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}:/opt/qt${QT5_VERSION}/lib"
ENV LD_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}:/opt/${QT5_VERSION}/lib"

RUN set -x \
&& echo "/opt/qt${QT5_VERSION}/lib" > /etc/ld.so.conf.d/qt${QT5_VERSION}.conf \
&& echo "/opt/${QT5_VERSION}/lib" > /etc/ld.so.conf.d/${QT5_VERSION}.conf \
&& echo "/opt/keepassxc-libs/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/keepassxc.conf

# AppImage dependencies
RUN set -x \
&& apt-get install -y \
curl \
libfuse2

RUN set -x \
&& curl -L "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" > /usr/bin/linuxdeploy \
&& curl -L "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" > /usr/bin/linuxdeploy-plugin-qt \
&& curl -L "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" > /usr/bin/appimagetool \
&& chmod +x /usr/bin/linuxdeploy \
&& chmod +x /usr/bin/linuxdeploy-plugin-qt \
&& chmod +x /usr/bin/appimagetool

RUN set -x \
&& apt-get autoremove --purge \
&& rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit a4c6529

Please sign in to comment.