Page MenuHome GnuPG

No OneTemporary

diff --git a/Makefile.am b/Makefile.am
index b2779f5c..b2af7dcc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,139 +1,144 @@
# Makefile.am - Installer for GnuPG 4 Windows Makefile.
# Copyright (C) 2005, 2008, 2012 g10 Code GmbH
#
# This file is part of GPG4Win.
#
# 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 <http://www.gnu.org/licenses/>.
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-xz no-dist-gzip
DISTCHECK_CONFIGURE_FLAGS = --host=i686-w64-mingw32
if BUILD_GPG4WIN
po = po
else
po =
endif
if BUILD_GPG4WIN
doc = doc
else
doc =
endif
SUBDIRS = ${po} packages ${doc} src
# find patches -type f | sort | sed 's/$/ \\/' | sed 's/^/ /'
# find patches-appimage -type f | sort | sed 's/$/ \\/' | sed 's/^/ /'
EXTRA_DIST = autogen.rc autogen.sh README.GIT ONEWS \
doc/license-page doc/GPLv3 \
build-aux/git-log-footer build-aux/git-log-fix \
docker/appimage/Dockerfile \
docker/build-appimage-docker-image.sh \
docker/build-gpg4win-docker-image.sh \
docker/gpg4win-bullseye/Dockerfile \
docker/run-appimage-build.sh \
docker/run-gpg4win-build.sh \
patches/breeze-icons/subset-crossbuild.patch \
patches/breeze-icons/add-the-nose.patch \
patches/extra-cmake-modules/0001-Use-BIN_INSTALL_DIR-data-for-DATAROOTDIR-on-Windows.patch \
patches/kconfig/0001-Read-defaults-from-Windows-registry.patch \
patches/kconfigwidgets/0001-Fix-crash-on-exit-on-Windows.patch \
patches/kconfigwidgets/0001-Make-QDbus-optional.patch \
patches/kiconthemes/0001-Make-DBus-optional.patch \
patches/kiconthemes/dark-mode-detection.patch \
patches/kleopatra/set-windows-registry.patch \
patches/kleopatra/0001-Make-KCMUtils-optional.patch \
patches/kwidgetsaddons/0001-Set-the-modes-on-the-date-picker.patch \
patches/kwidgetsaddons/0002-Remove-No-date-option-from-date-picker-popup-used-by.patch \
patches/kxmlgui/0001-make-qdbus-optional.patch \
patches/kxmlgui/0004-Cruedly-disable-KSendbugmail.patch \
patches/libical/workaround-weird-mingw-10.0.0-issue.patch \
patches/qtbase/0001-Fix-build-without-std-thread.patch \
patches/qtbase/0001-Gpg4win-qstandardpaths-patch.patch \
patches/qtbase/0002-Gpg4win-theme-names-and-relpaths.patch \
patches/qtsvg/CVE-2023-32573-qtsvg-5.15.patch \
patches/qtbase/CVE-2023-32763-qtbase-5.15.diff \
patches/qttools/disable-most-tools.patch \
patches/kcoreaddons/0001-Fix-MINGW-build.patch \
+ patches/kcoreaddons/0001-Add-KAboutData-updateFromSettings.patch \
+ patches/kcoreaddons/0002-Draft-Add-KVerify-class-to-verify-files.patch \
patches/ki18n/0001-Undef-snprintf-for-windows.patch \
patches/kio/0001-WIP-Remove-dependency-to-dbus.patch \
patches/kio/FileManagerWindowJob.patch \
patches/okular/lower-cmake-requirement.patch \
patches/okular/0001-Add-GnuPG-specific-manifest-to-okular.patch \
patches/okular/0001-Hack-in-some-aboutdata-for-GnuPG-Edition.patch \
patches/kparts/0001-Apply-implicit-android-DBUS-fix-for-Win.patch \
patches/kparts/disable-jobuidelegate.patch \
patches/sonnet/0001-W32-Force-ispellchecker-for-sonnet.patch \
patches/jpeg/fix-redefine.patch \
patches-appimage/kleopatra/0001-Make-KCMUtils-optional.patch \
patches-appimage/libkleo/gpg4win-check.patch \
patches-appimage/okular/0001-Make-KF5Pty-dependency-optional.patch \
patches-appimage/okular/0001-Hack-in-some-aboutdata-for-GnuPG-Edition.patch \
patches-appimage/okular/lower-cmake-requirement.patch \
patches-appimage/poppler/fix-gpg-error-include.patch \
patches-appimage/qtbase/CVE-2023-32763-qtbase-5.15.diff \
patches-appimage/qtsvg/CVE-2023-32573-qtsvg-5.15.patch \
- patches-appimage/qtwayland-5.15.0/00-disable-wayland-server.patch
+ patches-appimage/qtwayland-5.15.0/00-disable-wayland-server.patch \
+ patches-appimage/kcoreaddons/0001-Fix-MINGW-build.patch \
+ patches-appimage/kcoreaddons/0001-Add-KAboutData-updateFromSettings.patch \
+ patches-appimage/kcoreaddons/0002-Draft-Add-KVerify-class-to-verify-files.patch
copy-news:
cp NEWS doc/website/NEWS.last
copy-release: gpg4win-$(VERSION).tar.bz2 installers/gpg4win-$(VERSION).exe \
installers/gpg4win-light-$(VERSION).exe \
installers/gpg4win-vanilla-$(VERSION).exe
@echo Copying $(VERSION) to $(RELEASEHOST) >&2
@set -e;\
if ssh "$$(echo $(RELEASEHOST)|cut -d: -f -1)" \
test -f "$$(echo $(RELEASEHOST)/gpg4win-$(VERSION).exe|cut -d: -f2-)";\
then echo "This release has already been copied to the server" >&2 ;\
else scp gpg4win-$(VERSION).tar.bz2 \
installers/gpg4win-$(VERSION).exe \
installers/gpg4win-light-$(VERSION).exe \
installers/gpg4win-vanilla-$(VERSION).exe \
installers/gpg4win-src-$(VERSION).exe $(RELEASEHOST)/ ;\
for f in en de ; do \
scp src/README.$$f.txt \
$(RELEASEHOST)/README-$(VERSION).$$f.txt; \
done;\
fi
dist-hook: gen-ChangeLog
gen_start_date = 2012-03-26T00:00:00
.PHONY: gen-ChangeLog
gen-ChangeLog:
set -e; \
if test -d $(top_srcdir)/.git; then \
(cd $(top_srcdir) && \
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
--amend=build-aux/git-log-fix \
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
download: packages/packages.common packages/packages.4 packages/packages.3
(cd packages; ./download.sh)
msi:
$(MAKE) $(AM_MAKEFLAGS) -C src msi
msi-signed:
$(MAKE) $(AM_MAKEFLAGS) -C src msi-signed
msi-upload:
$(MAKE) $(AM_MAKEFLAGS) -C src msi-upload
diff --git a/patches-appimage/kcoreaddons b/patches-appimage/kcoreaddons
new file mode 120000
index 00000000..ded4adc9
--- /dev/null
+++ b/patches-appimage/kcoreaddons
@@ -0,0 +1 @@
+../patches/kcoreaddons
\ No newline at end of file
diff --git a/patches/kcoreaddons/0001-Add-KAboutData-updateFromSettings.patch b/patches/kcoreaddons/0001-Add-KAboutData-updateFromSettings.patch
new file mode 100755
index 00000000..0158e81f
--- /dev/null
+++ b/patches/kcoreaddons/0001-Add-KAboutData-updateFromSettings.patch
@@ -0,0 +1,94 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From 083150215ed1c0341d53a73b8db75baa86dde7f8 Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke@gnupg.org>
+Date: Fri, 10 Nov 2023 12:18:39 +0100
+Subject: [PATCH 1/2] Add KAboutData::updateFromSettings
+
+This allows distributions to ship a custom about data
+file with software that supports it to update their about
+data. A common usecase for that would be to change the bug
+reporting URL in case they heavily patched it or in our
+case ship a windows distribution that differs far from an
+upstream windows distribution with regards to optional
+depdendencies.
+
+GnuPG-Bug-Id: T6594
+---
+ src/lib/kaboutdata.cpp | 20 ++++++++++++++++++++
+ src/lib/kaboutdata.h | 13 +++++++++++++
+ 2 files changed, 33 insertions(+)
+
+diff --git a/src/lib/kaboutdata.cpp b/src/lib/kaboutdata.cpp
+index fcf8eb9e..8fef0b0a 100644
+--- a/src/lib/kaboutdata.cpp
++++ b/src/lib/kaboutdata.cpp
+@@ -23,6 +23,7 @@
+ #include <QJsonObject>
+ #include <QList>
+ #include <QLoggingCategory>
++#include <QSettings>
+ #include <QSharedData>
+ #include <QStandardPaths>
+ #include <QTextStream>
+@@ -1056,6 +1057,25 @@ QString KAboutData::desktopFileName() const
+ #endif
+ }
+
++KAboutData &KAboutData::updateFromSettings(const QSettings *settings)
++{
++ if (!settings) {
++ return *this;
++ }
++ d->_displayName = settings->value(QStringLiteral("displayName"), d->_displayName).toString();
++ d->productName = settings->value(QStringLiteral("productName"), d->productName).toByteArray();
++ d->_componentName = settings->value(QStringLiteral("componentName"), d->_componentName).toString();
++ d->_shortDescription = settings->value(QStringLiteral("shortDescription"), d->_shortDescription).toString();
++ d->_homepageAddress = settings->value(QStringLiteral("homepage"), d->_homepageAddress).toString();
++ d->_bugAddress = settings->value(QStringLiteral("bugAddress"), d->_bugAddress).toByteArray();
++ d->_version = settings->value(QStringLiteral("version"), d->_version).toByteArray();
++ d->_otherText = settings->value(QStringLiteral("otherText"), d->_otherText).toString();
++ d->_copyrightStatement = settings->value(QStringLiteral("copyrightStatement"), d->_copyrightStatement).toString();
++ d->desktopFileName = settings->value(QStringLiteral("desktopFileName"), d->desktopFileName).toString();
++
++ return *this;
++}
++
+ class KAboutDataRegistry
+ {
+ public:
+diff --git a/src/lib/kaboutdata.h b/src/lib/kaboutdata.h
+index a0d4a4f7..41f4a7ad 100644
+--- a/src/lib/kaboutdata.h
++++ b/src/lib/kaboutdata.h
+@@ -25,6 +25,7 @@ class QCommandLineParser;
+ class QJsonObject;
+ class KAboutData;
+ class KPluginMetaData;
++class QSettings;
+ namespace KCrash
+ {
+ #ifdef KCOREADDONS_STATIC
+@@ -1310,6 +1311,18 @@ public:
+ */
+ KAboutData &unsetCustomAuthorText();
+
++ /**
++ * Updates all properties available properties from the @p settings object.
++ * This can be used by by distributors that heavily modify optional dependencies
++ * to make it clear that this is not the "real" version of an application by
++ * including a custom settings file in their distribution.
++ *
++ * Note that this does not modify:
++ * authors, credits, translators, components and licenses.
++ * @since never
++ * */
++ KAboutData &updateFromSettings(const QSettings *settings);
++
+ /**
+ * Configures the @p parser command line parser to provide an authors entry with
+ * information about the developers of the application and an entry specifying the license.
+--
+2.42.1
diff --git a/patches/kcoreaddons/0002-Draft-Add-KVerify-class-to-verify-files.patch b/patches/kcoreaddons/0002-Draft-Add-KVerify-class-to-verify-files.patch
new file mode 100755
index 00000000..50d2dfe4
--- /dev/null
+++ b/patches/kcoreaddons/0002-Draft-Add-KVerify-class-to-verify-files.patch
@@ -0,0 +1,204 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From 6826a1fc65fe52342008081af07b81aa7386b822 Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke@gnupg.org>
+Date: Fri, 10 Nov 2023 12:37:43 +0100
+Subject: [PATCH 2/2] Draft: Add KVerify class to verify files
+
+This currently uses gpgv to verify PGP signatures but
+could be extended to also do binary verification with
+elfsign on Linux and windows codesigning verification.
+
+It can be used for example to verify a custom about
+data file before loading it.
+
+GnuPG-Bug-Id: T6594
+---
+ src/lib/CMakeLists.txt | 2 +
+ src/lib/util/kverify.cpp | 108 +++++++++++++++++++++++++++++++++++++++
+ src/lib/util/kverify.h | 37 ++++++++++++++
+ 3 files changed, 147 insertions(+)
+ create mode 100644 src/lib/util/kverify.cpp
+ create mode 100644 src/lib/util/kverify.h
+
+diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
+index 6e8ea137..9879914e 100644
+--- a/src/lib/CMakeLists.txt
++++ b/src/lib/CMakeLists.txt
+@@ -149,6 +149,7 @@ target_sources(KF5CoreAddons PRIVATE
+ util/ksandbox.cpp
+ util/kmemoryinfo.cpp
+ util/kruntimeplatform.cpp
++ util/kverify.cpp
+
+ kaboutdata.h
+ kcoreaddons.h
+@@ -369,6 +370,7 @@ ecm_generate_headers(KCoreAddons_HEADERS
+ KRuntimePlatform
+ KSandbox
+ KMemoryInfo
++ KVerify
+ RELATIVE util
+ REQUIRED_HEADERS KCoreAddons_HEADERS
+ )
+diff --git a/src/lib/util/kverify.cpp b/src/lib/util/kverify.cpp
+new file mode 100644
+index 00000000..658ada06
+--- /dev/null
++++ b/src/lib/util/kverify.cpp
+@@ -0,0 +1,108 @@
++/*
++ KVerify - verify a file with GnuPG or Windows system tools
++
++ SPDX-FileCopyrightText: 2023 g10 Code GmbH
++ SPDX-FileContributor: Andre Heinecke <aheinecke@gnupg.org>
++
++ SPDX-License-Identifier: LGPL-2.0-or-later
++*/
++#include "kverify.h"
++
++#include <QFileInfo>
++#include <QProcess>
++#include <QStandardPaths>
++
++#include "kcoreaddons_debug.h"
++
++class KVerify::Private
++{
++public:
++ Private(KVerify *qq)
++ : q(qq)
++ {
++ }
++
++ void setGPGVSearchPaths(const QStringList &paths)
++ {
++ gpgvPath = QStandardPaths::findExecutable(QStringLiteral("gpgv"), paths);
++ }
++
++ void startGPGVerification(const QString &filePath, const QString &sigPath = QString(), const QString &keyring = QString())
++ {
++ if (gpgvPath.isEmpty()) {
++ gpgvPath = QStandardPaths::findExecutable(QStringLiteral("gpgv"));
++ if (gpgvPath.isEmpty()) {
++ qCDebug(KCOREADDONS_DEBUG) << "Could not find gpgv";
++ Q_EMIT q->verificationDone(false, QString(), QString());
++ return;
++ }
++ }
++
++ const QFileInfo verifyFi(filePath);
++ if (!verifyFi.isReadable()) {
++ // Pretty much the standard case for applications which do
++ // not ship custom signed files.
++ Q_EMIT q->verificationDone(false, QString(), QString());
++ return;
++ }
++
++ QFileInfo sigFi;
++ if (!sigPath.isEmpty()) {
++ sigFi.setFile(sigPath);
++ } else {
++ sigFi.setFile(sigPath + QStringLiteral(".sig"));
++ }
++
++ if (!sigFi.isReadable()) {
++ qCDebug(KCOREADDONS_DEBUG) << "No signature found at" << sigFi.absoluteFilePath();
++ Q_EMIT q->verificationDone(false, QString(), QString());
++ return;
++ }
++
++ auto process = new QProcess(q);
++ process->setProgram(gpgvPath);
++ QStringList args;
++ if (!keyring.isEmpty()) {
++ args << QStringLiteral("--keyring") << keyring;
++ }
++ args << QStringLiteral("--") << sigFi.absoluteFilePath() << verifyFi.absoluteFilePath();
++ process->setArguments(args);
++
++ QObject::connect(process, qOverload<int, QProcess::ExitStatus>(&QProcess::finished), [process, this](int exitCode, QProcess::ExitStatus exitStatus) {
++ const QString err = QString::fromUtf8(process->readAllStandardError());
++ const QString out = QString::fromUtf8(process->readAllStandardOutput());
++ if (exitStatus == QProcess::NormalExit && exitCode == 0) {
++ qCDebug(KCOREADDONS_DEBUG) << "verification successful";
++ Q_EMIT q->verificationDone(true, out, err);
++ } else {
++ Q_EMIT q->verificationDone(false, out, err);
++ qCDebug(KCOREADDONS_DEBUG) << "Stdout:" << out;
++ qCDebug(KCOREADDONS_DEBUG) << "Stderr:" << err;
++ }
++ process->deleteLater();
++ });
++
++ qCDebug(KCOREADDONS_DEBUG).nospace() << "Starting gpgv (" << process << ") with arguments " << process->arguments().join(QLatin1Char(' ')) << " ...";
++ process->start();
++ }
++ KVerify *const q;
++ QString gpgvPath;
++};
++
++void KVerify::startGPGVerification(const QString &filePath, const QString &sigPath, const QString &keyring)
++{
++ d->startGPGVerification(filePath, sigPath, keyring);
++}
++
++void KVerify::setGPGVSearchPaths(const QStringList &paths)
++{
++ d->setGPGVSearchPaths(paths);
++}
++
++KVerify::KVerify(QObject *parent)
++ : QObject(parent)
++ , d(new Private(this))
++{
++}
++
++#include "moc_kverify.cpp"
+diff --git a/src/lib/util/kverify.h b/src/lib/util/kverify.h
+new file mode 100644
+index 00000000..f374c936
+--- /dev/null
++++ b/src/lib/util/kverify.h
+@@ -0,0 +1,37 @@
++/*
++ KVerify - verify a file with GnuPG or Windows system tools
++
++ SPDX-FileCopyrightText: 2023 g10 Code GmbH
++ SPDX-FileContributor: Andre Heinecke <aheinecke@gnupg.org>
++
++ SPDX-License-Identifier: LGPL-2.0-or-later
++*/
++#pragma once
++
++#include <kcoreaddons_export.h>
++
++#include <QObject>
++#include <memory>
++
++class QString;
++class QStringList;
++
++class KCOREADDONS_EXPORT KVerify : public QObject
++{
++ Q_OBJECT
++
++public:
++ explicit KVerify(QObject *parent = nullptr);
++ ~KVerify() = default;
++
++ void setGPGVSearchPaths(const QStringList &paths);
++
++ void startGPGVerification(const QString &filePath, const QString &sigPath = QString(), const QString &keyring = QString());
++Q_SIGNALS:
++ /** Emitted when the verification is done. */
++ void verificationDone(bool valid, const QString &stdOutput, const QString &errorOutput);
++
++private:
++ class Private;
++ std::unique_ptr<Private> d;
++};
+--
+2.42.1

File Metadata

Mime Type
text/x-diff
Expires
Sun, Dec 28, 10:16 PM (1 d, 18 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c2/37/aa395311ea5e6f8830329a1a0407

Event Timeline