Page MenuHome GnuPG

No OneTemporary

diff --git a/docker/appimage/Dockerfile b/docker/appimage/Dockerfile
index 5fd1ae8d..e0c701f6 100644
--- a/docker/appimage/Dockerfile
+++ b/docker/appimage/Dockerfile
@@ -1,115 +1,116 @@
# Dockerfile - docker/appimage
# Copyright (C) 2021 g10 Code GmbH
#
# Software engineering by Ingo Klöcker <dev@ingo-kloecker.de>
#
# This file is part of GnuPG.
#
# Gpg4win is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Gpg4win is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-2.0+
FROM centos:7
# Import the CentOS 7 package signing key after verifying its fingerprint.
# Then add the software collections repository from the CentOS SCLo SIG and
# import its package signing key after verifying the fingerprint.
# Ditto for the EPEL 7 package signing key.
RUN test $(gpg --with-colons --with-fingerprint < /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | grep ^pub: | wc -l) = 1 \
&& gpg --with-colons --with-fingerprint < /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | grep -q ^fpr:::::::::6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 \
&& rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 \
&& yum -y update \
&& yum -y install \
centos-release-scl \
&& test $(gpg --with-colons --with-fingerprint < /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo | grep ^pub: | wc -l) = 1 \
&& gpg --with-colons --with-fingerprint < /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo | grep -q ^fpr:::::::::C4DBD535B1FBBA14F8BA64A84EB84E71F2EE9D55 \
&& rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo \
&& yum -y update \
&& yum -y install \
epel-release \
&& test $(gpg --with-colons --with-fingerprint < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 | grep ^pub: | wc -l) = 1 \
&& gpg --with-colons --with-fingerprint < /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 | grep -q ^fpr:::::::::91E97D7C4A5E96F17F3E888F6A2FAEA2352C64E5 \
&& rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 \
&& yum -y update \
&& rm -rf /root/.gnupg
RUN yum -y install \
at-spi2-core-devel \
automake \
boost169-devel \
bzip2 \
bzip2-devel \
cmake3 \
cups-devel \
dbus-devel \
devtoolset-7-binutils \
devtoolset-7-gcc \
devtoolset-7-gcc-c++ \
devtoolset-7-make \
double-conversion-devel \
egl-wayland-devel \
file \
fontconfig-devel \
freetype-devel \
gettext \
git \
gnutls-devel \
gperf \
gtk-update-icon-cache \
harfbuzz-devel \
libXrender-devel \
libicu-devel \
libinput-devel \
libjpeg-devel \
libpng-devel \
libusbx-devel \
libxkbcommon-x11-devel \
libzstd-devel \
mesa-libEGL-devel \
mesa-libGL-devel \
mtdev-devel \
openldap-devel \
openssl11-devel \
patch \
pcre2-devel \
python36-lxml \
readline-devel \
stow \
systemd-devel \
wayland-devel \
wget \
which \
xcb-util-image-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
xcb-util-wm-devel \
xz-devel \
zlib-devel
# download the necessary linuxdeploy AppImages and extract them because we have no fuse in the container
RUN mkdir -p /tmp/download \
&& cd /tmp/download \
&& wget --no-verbose https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \
&& wget --no-verbose https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage \
&& chmod +x linuxdeploy-* \
&& cd /tmp \
&& download/linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract \
&& download/linuxdeploy-x86_64.AppImage --appimage-extract \
&& rm -rf /tmp/download \
&& mkdir -p /opt \
&& mv /tmp/squashfs-root /opt/linuxdeploy
-COPY build-appimage.sh /
-
-RUN chmod +x build-appimage.sh
+# No need to copy the build scripts becuase it is available
+# in the mounted /src hierachy.
+# COPY build-appimage.sh /
+# RUN chmod +x build-appimage.sh
diff --git a/docker/run-appimage-build.sh b/docker/run-appimage-build.sh
index 54777116..5663dac1 100755
--- a/docker/run-appimage-build.sh
+++ b/docker/run-appimage-build.sh
@@ -1,27 +1,27 @@
#! /bin/bash
set -e
if [ "$1" = "--devel" ]; then
devmode=
else
- devmode="/build-appimage.sh"
+ devmode="/src/src/appimage/build-appimage.sh"
fi
sourcedir=$(cd $(dirname $0)/..; pwd)
if [ -z "$devmode" ]; then
buildroot="/tmp/appimage-gnupg.$(id -un).d"
[ -d "$buildroot" ] || mkdir "$buildroot"
else
buildroot=$(mktemp -d --tmpdir appimage-gnupg.XXXXXXXXXX)
fi
echo Using ${buildroot}
docker run -it --rm --user "$(id -u):$(id -g)" \
--volume ${sourcedir}:/src \
--volume ${buildroot}:/build \
g10-build-appimage-kleopatra:centos7 $devmode
echo "You can find the AppImage in ${buildroot} (if the build succeeded)."
diff --git a/docker/appimage/build-appimage.sh b/src/appimage/build-appimage.sh
old mode 100644
new mode 100755
similarity index 92%
rename from docker/appimage/build-appimage.sh
rename to src/appimage/build-appimage.sh
index fbddfc41..c79f162c
--- a/docker/appimage/build-appimage.sh
+++ b/src/appimage/build-appimage.sh
@@ -1,114 +1,123 @@
#!/bin/sh
-# Build an AppImage of Kleopatra
+# Build an AppImage of GnuPG (VS-)Desktop
# Copyright (C) 2021 g10 Code GmbH
#
# Software engineering by Ingo Klöcker <dev@ingo-kloecker.de>
#
# This file is part of GnuPG.
#
# GnuPG is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# GnuPG is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0+
set -e
. /opt/rh/devtoolset-7/enable
cd /src
./configure --enable-appimage --enable-maintainer-mode --disable-manuals
cd /src
make
if [ -f /src/src/gnupg-vsd/custom.mk ]; then
GNUPG_BUILD_VSD=yes
else
GNUPG_BUILD_VSD=no
fi
export GNUPG_BUILD_VSD
echo 'rootdir = $APPDIR/usr' >/build/AppDir/usr/bin/gpgconf.ctl
if [ $GNUPG_BUILD_VSD = yes ]; then
echo 'sysconfdir = /etc/gnupg-vsd' >>/build/AppDir/usr/bin/gpgconf.ctl
else
echo 'sysconfdir = /etc/gnupg' >>/build/AppDir/usr/bin/gpgconf.ctl
fi
# Copy the start-shell helper for use AppRun
cp /src/src/appimage/start-shell /build/AppDir/
chmod +x /build/AppDir/start-shell
# Copy standard global configuration
if [ $GNUPG_BUILD_VSD = yes ]; then
mkdir -p /build/AppDir/usr/share/gnupg/conf/gnupg-vsd
rsync -aLv --delete --omit-dir-times \
/src/src/gnupg-vsd/Standard/etc/gnupg/ \
/build/AppDir/usr/share/gnupg/conf/gnupg-vsd/
fi
export PATH=/opt/linuxdeploy/usr/bin:$PATH
export LD_LIBRARY_PATH=/build/install/lib
# tell the linuxdeploy qt-plugin where to find qmake
export QMAKE=/build/install/bin/qmake
# create plugin directories expected by linuxdeploy qt-plugin
# workaround for
# [qt/stdout] Deploy[qt/stderr] terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
# [qt/stderr] what(): boost::filesystem::directory_iterator::construct: No such file or directory: "/build/AppDir/usr/plugins/sqldrivers"
# ERROR: Failed to run plugin: qt (exit code: 6)
mkdir -p /build/install/plugins/sqldrivers
# copy KDE plugins
for d in iconengines kf5 pim; do
mkdir -p /build/AppDir/usr/plugins/${d}/
rsync -av --delete --omit-dir-times /build/install/lib64/plugins/${d}/ /build/AppDir/usr/plugins/${d}/
done
cd /build
# Remove existing AppRun and wrapped AppRun, that may be left over
# from a previous run of linuxdeploy, to ensure that our custom AppRun
# is deployed
rm -f /build/AppDir/AppRun /build/AppDir/AppRun.wrapped 2>/dev/null
# Remove existing translations that may be left over from a previous
# run of linuxdeploy
rm -rf /build/AppDir/usr/translations
# Remove the version files to make sure that only one will be created.
rm -f /build/AppDir/GnuPG-VS-Desktop-VERSION 2>/dev/null
rm -f /build/AppDir/GnuPG-Desktop-VERSION 2>/dev/null
# Extract gnupg version or (for VSD builds) gpg4win version for use
# as filename of the AppImage
if [ $GNUPG_BUILD_VSD = yes ]; then
myversion=$(grep PACKAGE_VERSION /src/config.h|sed -n 's/.*"\(.*\)"$/\1/p')
OUTPUT=gnupg-vs-desktop-${myversion}-x86_64.AppImage
echo "Packaging GnuPG VS-Desktop Appimage: $myversion"
echo $myversion >/build/AppDir/GnuPG-VS-Desktop-VERSION
cp /src/src/gnupg-vsd/Standard/VERSION* /build/AppDir/usr/
else
myversion=$(ls /src/packages/gnupg-2.*tar.* \
| sed -n 's,.*/gnupg-\(2.*\).tar.*,\1,p')
OUTPUT=gnupg-desktop-${myversion}-x86_64.AppImage
echo "Packaging Gpg4win Appimage: $myversion"
echo $myversion >/build/AppDir/GnuPG-Desktop-VERSION
fi
export OUTPUT
linuxdeploy --appdir /build/AppDir \
--desktop-file /build/AppDir/usr/share/applications/org.kde.kleopatra.desktop \
--icon-file /build/AppDir/usr/share/icons/hicolor/256x256/apps/kleopatra.png \
--custom-apprun /src/src/appimage/AppRun \
--plugin qt \
--output appimage \
2>&1 | tee /build/logs/linuxdeploy-gnupg-desktop.log
+
+# Hack around that linuxdeploy does not know libexec
+for f in dirmngr_ldap gpg-check-pattern \
+ gpg-preset-passphrase gpg-protect-tool \
+ gpg-wks-client scdaemon ; do
+ /opt/linuxdeploy/usr/bin/patchelf \
+ --set-rpath '$ORIGIN/../lib' /build/AppDir/usr/libexec/$f
+done
+echo ready

File Metadata

Mime Type
text/x-diff
Expires
Sat, May 10, 8:53 AM (1 d, 8 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5c/ba/6cf8f9f237dcf460ec62b34fa694

Event Timeline