1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

appimage: Add experimental scripts for building an AppImage of gpg

GnuPG-bug-id: 5598
This commit is contained in:
Ingo Klöcker 2021-09-15 11:57:38 +02:00
parent 4bfa19799b
commit 1e32524494
5 changed files with 187 additions and 0 deletions

View file

@ -0,0 +1,57 @@
# Dockerfile - appimage/docker
# 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+
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.
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
RUN yum -y install \
automake \
bzip2 \
devtoolset-7-binutils \
devtoolset-7-gcc \
devtoolset-7-gcc-c++ \
devtoolset-7-make \
file \
gnutls-devel \
openldap-devel \
qt5-qtbase-devel \
readline-devel \
sqlite-devel \
wget
COPY build-appimage.sh /
RUN chmod +x build-appimage.sh

View file

@ -0,0 +1,43 @@
#!/bin/sh
# Build an AppImage of gpg
# 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
mkdir -p /build/AppDir
cd /src
source /opt/rh/devtoolset-7/enable
make -f build-aux/speedo.mk INSTALL_PREFIX=/build/AppDir/usr CUSTOM_SWDB=1 appimage
mkdir -p /build/download
cd /build/download
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-*
cd /build
# extract the AppImages because we have no fuse in the container
download/linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract
download/linuxdeploy-x86_64.AppImage --appimage-extract
export PATH=squashfs-root/usr/bin:$PATH
export LD_LIBRARY_PATH=/build/AppDir/usr/lib
linuxdeploy --appdir AppDir --desktop-file /src/appimage/appimage.desktop --icon-file /src/artwork/gnupg-lock-256x256tr.png --icon-filename gpg --plugin qt --output appimage