summaryrefslogtreecommitdiffstats
path: root/trinity-base/libtdenetwork
diff options
context:
space:
mode:
Diffstat (limited to 'trinity-base/libtdenetwork')
-rw-r--r--trinity-base/libtdenetwork/files/libtdenetwork-14.1.4-remove-trust-item-and-trust-list-related.patch472
-rw-r--r--trinity-base/libtdenetwork/libtdenetwork-14.1.2.ebuild6
-rw-r--r--trinity-base/libtdenetwork/libtdenetwork-14.1.4.ebuild4
-rw-r--r--trinity-base/libtdenetwork/libtdenetwork-9999.ebuild2
4 files changed, 480 insertions, 4 deletions
diff --git a/trinity-base/libtdenetwork/files/libtdenetwork-14.1.4-remove-trust-item-and-trust-list-related.patch b/trinity-base/libtdenetwork/files/libtdenetwork-14.1.4-remove-trust-item-and-trust-list-related.patch
new file mode 100644
index 00000000..debe0b02
--- /dev/null
+++ b/trinity-base/libtdenetwork/files/libtdenetwork-14.1.4-remove-trust-item-and-trust-list-related.patch
@@ -0,0 +1,472 @@
+From 9441cfb0db89a24d2a01c85416677a56c9b269b0 Mon Sep 17 00:00:00 2001
+From: Michele Calgaro <michele.calgaro@yahoo.it>
+Date: Tue, 19 Aug 2025 21:15:41 +0900
+Subject: tdenetwork: remove trust item and trust list related
+ code. This resolves issue #162.
+
+libgpgme-dev 2.0 completely removed the code related to trust item and
+trust list. Moreover according the their author, that code was only
+working for a brief time around 2003. In view of that, the code in TDE
+has been fully removed rather than making conditional based on the
+library version available.
+
+Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
+---
+ libtdenetwork/gpgmepp/CMakeLists.txt | 6 +-
+ libtdenetwork/gpgmepp/Makefile.am | 4 +-
+ libtdenetwork/gpgmepp/context.cpp | 17 +--
+ libtdenetwork/gpgmepp/context.h | 9 --
+ libtdenetwork/gpgmepp/context_p.h | 2 +-
+ libtdenetwork/gpgmepp/eventloopinteractor.cpp | 8 --
+ libtdenetwork/gpgmepp/eventloopinteractor.h | 4 +-
+ libtdenetwork/gpgmepp/gpgme-0-3-compat.h | 1 -
+ libtdenetwork/gpgmepp/gpgmefw.h | 3 -
+ libtdenetwork/gpgmepp/trustitem.cpp | 109 ------------------
+ libtdenetwork/gpgmepp/trustitem.h | 59 ----------
+ libtdenetwork/qgpgme/eventloopinteractor.cpp | 4 -
+ libtdenetwork/qgpgme/eventloopinteractor.h | 4 -
+ 13 files changed, 7 insertions(+), 223 deletions(-)
+ delete mode 100644 libtdenetwork/gpgmepp/trustitem.cpp
+ delete mode 100644 libtdenetwork/gpgmepp/trustitem.h
+
+diff --git a/libtdenetwork/gpgmepp/CMakeLists.txt b/libtdenetwork/gpgmepp/CMakeLists.txt
+index 93bc16e5..844f34d2 100644
+--- a/libtdenetwork/gpgmepp/CMakeLists.txt
++++ b/libtdenetwork/gpgmepp/CMakeLists.txt
+@@ -30,7 +30,7 @@ link_directories(
+ ##### headers ###################################
+
+ install( FILES
+- context.h key.h trustitem.h eventloopinteractor.h
++ context.h key.h eventloopinteractor.h
+ data.h gpgmefw.h result.h keylistresult.h
+ keygenerationresult.h importresult.h decryptionresult.h
+ verificationresult.h signingresult.h encryptionresult.h
+@@ -42,13 +42,13 @@ install( FILES
+
+ tde_add_library( gpgme++ SHARED
+ SOURCES
+- context.cpp key.cpp trustitem.cpp data.cpp
++ context.cpp key.cpp data.cpp
+ callbacks.cpp eventloopinteractor.cpp
+ keylistresult.cpp keygenerationresult.cpp
+ importresult.cpp decryptionresult.cpp
+ verificationresult.cpp signingresult.cpp
+ encryptionresult.cpp engineinfo.cpp
+- VERSION 0.4.0
++ VERSION 5.0.0
+ LINK ${TQT_LIBRARIES} ${GPGME_LIBRARIES}
+ DESTINATION ${LIB_INSTALL_DIR}
+ )
+diff --git a/libtdenetwork/gpgmepp/Makefile.am b/libtdenetwork/gpgmepp/Makefile.am
+index d4ebfde9..b4489217 100644
+--- a/libtdenetwork/gpgmepp/Makefile.am
++++ b/libtdenetwork/gpgmepp/Makefile.am
+@@ -9,7 +9,6 @@ INCLUDES = -I$(top_srcdir)/libtdenetwork -I$(top_srcdir)/libtdenetwork/gpgmepp \
+ gpgmeppdir = $(includedir)/gpgme++
+ gpgmepp_HEADERS = context.h \
+ key.h \
+- trustitem.h \
+ eventloopinteractor.h \
+ data.h \
+ gpgmefw.h \
+@@ -28,7 +27,6 @@ noinst_HEADERS = context_p.h data_p.h shared.h callbacks.h gpgme-0-3-compat.h re
+ lib_LTLIBRARIES = libgpgme++.la
+ libgpgme___la_SOURCES = context.cpp \
+ key.cpp \
+- trustitem.cpp \
+ data.cpp \
+ callbacks.cpp \
+ eventloopinteractor.cpp \
+@@ -46,7 +44,7 @@ libgpgme___la_SOURCES = context.cpp \
+ # (Interfaces added/removed/changed: CURRENT++, REVISION=0)
+ # (Interfaces added: AGE++)
+ # (Interfaces removed/changed: AGE=0)
+-libgpgme___la_LDFLAGS = -no-undefined -version-info 4:0:4
++libgpgme___la_LDFLAGS = -no-undefined -version-info 5:0:0
+ libgpgme___la_LIBADD = $(GPGME_LIBS)
+ libgpgme___la_DEPENDENCIES = $(GPGME_LIBS_DEP)
+
+diff --git a/libtdenetwork/gpgmepp/context.cpp b/libtdenetwork/gpgmepp/context.cpp
+index 547adde9..5c61bd53 100644
+--- a/libtdenetwork/gpgmepp/context.cpp
++++ b/libtdenetwork/gpgmepp/context.cpp
+@@ -23,7 +23,7 @@
+
+ #include <gpgmepp/context.h>
+ #include <gpgmepp/eventloopinteractor.h>
+-#include <gpgmepp/trustitem.h>
++#include <gpgmepp/key.h>
+ #include <gpgmepp/keylistresult.h>
+ #include <gpgmepp/keygenerationresult.h>
+ #include <gpgmepp/importresult.h>
+@@ -348,21 +348,6 @@ namespace GpgME {
+ return d->lasterr = gpgme_op_delete_start( d->ctx, key.impl(), int( allowSecretKeyDeletion ) );
+ }
+
+- Error Context::startTrustItemListing( const char * pattern, int maxLevel ) {
+- d->lastop = Private::TrustList;
+- return d->lasterr = gpgme_op_trustlist_start( d->ctx, pattern, maxLevel );
+- }
+-
+- TrustItem Context::nextTrustItem( Error & e ) {
+- gpgme_trust_item_t ti = 0;
+- e = d->lasterr = gpgme_op_trustlist_next( d->ctx, &ti );
+- return ti;
+- }
+-
+- Error Context::endTrustItemListing() {
+- return d->lasterr = gpgme_op_trustlist_end( d->ctx );
+- }
+-
+ DecryptionResult Context::decrypt( const Data & cipherText, Data & plainText ) {
+ d->lastop = Private::Decrypt;
+ Data::Private * cdp = cipherText.impl();
+diff --git a/libtdenetwork/gpgmepp/context.h b/libtdenetwork/gpgmepp/context.h
+index 03c03829..580d766c 100644
+--- a/libtdenetwork/gpgmepp/context.h
++++ b/libtdenetwork/gpgmepp/context.h
+@@ -31,7 +31,6 @@ namespace GpgME {
+
+ class Key;
+ class Data;
+- class TrustItem;
+ class ProgressProvider;
+ class PassphraseProvider;
+ class EventLoopInteractor;
+@@ -179,14 +178,6 @@ namespace GpgME {
+ GpgME::Error deleteKey( const Key & key, bool allowSecretKeyDeletion=false );
+ GpgME::Error startKeyDeletion( const Key & key, bool allowSecretKeyDeletion=false );
+
+- //
+- // Trust Item Management
+- //
+-
+- GpgME::Error startTrustItemListing( const char * pattern, int maxLevel );
+- TrustItem nextTrustItem( GpgME::Error & e );
+- GpgME::Error endTrustItemListing();
+-
+ //
+ //
+ // Crypto Operations
+diff --git a/libtdenetwork/gpgmepp/context_p.h b/libtdenetwork/gpgmepp/context_p.h
+index 5d44ba7c..c6f2da8e 100644
+--- a/libtdenetwork/gpgmepp/context_p.h
++++ b/libtdenetwork/gpgmepp/context_p.h
+@@ -43,7 +43,7 @@ namespace GpgME {
+
+ KeyGen = 0x080,
+ KeyList = 0x100,
+- TrustList = 0x200, // gpgme_trustlist_result_t, but nevertheless...
++ NOT_USED = 0x200, // was TrustList, no more used
+
+ GetAuditLog = 0x1000 // no gpgme_getauditlog_result_t, but nevertheless...
+ };
+diff --git a/libtdenetwork/gpgmepp/eventloopinteractor.cpp b/libtdenetwork/gpgmepp/eventloopinteractor.cpp
+index cdac7d56..b04a36c8 100644
+--- a/libtdenetwork/gpgmepp/eventloopinteractor.cpp
++++ b/libtdenetwork/gpgmepp/eventloopinteractor.cpp
+@@ -26,7 +26,6 @@
+ #include <gpgmepp/context.h>
+ #include "context_p.h"
+ #include <gpgmepp/key.h>
+-#include <gpgmepp/trustitem.h>
+
+ #include <gpgme.h>
+
+@@ -131,13 +130,6 @@ namespace GpgME {
+ instance()->nextKeyEvent( ctx, Key( key, false, ctx ? ctx->keyListMode() : 0 ) );
+ }
+ break;
+- case GPGME_EVENT_NEXT_TRUSTITEM:
+- {
+- gpgme_trust_item_t item = static_cast<gpgme_trust_item_t>( type_data );
+- instance()->nextTrustItemEvent( ctx, TrustItem( item ) );
+- gpgme_trust_item_unref( item );
+- }
+- break;
+ default: // warn
+ ;
+ }
+diff --git a/libtdenetwork/gpgmepp/eventloopinteractor.h b/libtdenetwork/gpgmepp/eventloopinteractor.h
+index 6a696a40..9343b501 100644
+--- a/libtdenetwork/gpgmepp/eventloopinteractor.h
++++ b/libtdenetwork/gpgmepp/eventloopinteractor.h
+@@ -25,7 +25,6 @@ namespace GpgME {
+
+ class Context;
+ class Error;
+- class TrustItem;
+ class Key;
+
+ /*! \file eventloopinteractor.h
+@@ -38,7 +37,7 @@ namespace GpgME {
+ IO Callback handling and one for gpgme events. The IO Callback
+ interface consists of the three methods \c actOn(), \c
+ registerWatcher() and \c unregisterWatcher(). The event
+- interface consists of the three methods \c nextTrustItemEvent(),
++ interface consists of the two methods
+ \c nextKeyEvent() and \c operationDoneEvent().
+
+ \sect General Usage
+@@ -130,7 +129,6 @@ namespace GpgME {
+ // Event Handler Interface
+ //
+
+- virtual void nextTrustItemEvent( Context * context, const TrustItem & item ) = 0;
+ virtual void nextKeyEvent( Context * context, const Key & key ) = 0;
+ virtual void operationDoneEvent( Context * context, const Error & e ) = 0;
+
+diff --git a/libtdenetwork/gpgmepp/gpgme-0-3-compat.h b/libtdenetwork/gpgmepp/gpgme-0-3-compat.h
+index 5f8c5b61..1345cfd0 100644
+--- a/libtdenetwork/gpgmepp/gpgme-0-3-compat.h
++++ b/libtdenetwork/gpgmepp/gpgme-0-3-compat.h
+@@ -34,7 +34,6 @@ typedef GpgmeRegisterIOCb gpgme_register_io_cb_t;
+ typedef GpgmeRemoveIOCb gpgme_remove_io_cb_t;
+ typedef GpgmeSigStat gpgme_sig_stat_t;
+ typedef GpgmeAttr gpgme_attr_t;
+-typedef GpgmeTrustItem gpgme_trust_item_t;
+ typedef GpgmeCtx gpgme_ctx_t;
+ typedef GpgmeProtocol gpgme_protocol_t;
+ typedef GpgmeData gpgme_data_t;
+diff --git a/libtdenetwork/gpgmepp/gpgmefw.h b/libtdenetwork/gpgmepp/gpgmefw.h
+index 8fe43746..90d958a1 100644
+--- a/libtdenetwork/gpgmepp/gpgmefw.h
++++ b/libtdenetwork/gpgmepp/gpgmefw.h
+@@ -36,9 +36,6 @@ struct gpgme_io_cbs;
+ struct _gpgme_key;
+ typedef struct _gpgme_key * gpgme_key_t;
+
+-struct _gpgme_trust_item;
+-typedef struct _gpgme_trust_item * gpgme_trust_item_t;
+-
+ struct _gpgme_subkey;
+ typedef struct _gpgme_subkey * gpgme_sub_key_t;
+
+diff --git a/libtdenetwork/gpgmepp/trustitem.cpp b/libtdenetwork/gpgmepp/trustitem.cpp
+deleted file mode 100644
+index 59840ebb..00000000
+--- a/libtdenetwork/gpgmepp/trustitem.cpp
++++ /dev/null
+@@ -1,109 +0,0 @@
+-/* trustitem.cpp - wraps a gpgme trust item
+- Copyright (C) 2003 Klarälvdalens Datakonsult AB
+-
+- This file is part of GPGME.
+-
+- GPGME 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.
+-
+- GPGME 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 GPGME; if not, write to the Free Software Foundation,
+- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
+-
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
+-
+-#include <gpgmepp/trustitem.h>
+-
+-#include <gpgme.h>
+-
+-#include <cassert>
+-
+-namespace GpgME {
+-
+- struct TrustItem::Private {
+- Private( gpgme_trust_item_t aItem )
+- : item( aItem )
+- {
+- }
+-
+- gpgme_trust_item_t item;
+- };
+-
+- TrustItem::TrustItem( gpgme_trust_item_t item ) {
+- d = new Private( item );
+- if ( d->item )
+- gpgme_trust_item_ref( d->item );
+- }
+-
+- TrustItem::TrustItem( const TrustItem & other ) {
+- d = new Private( other.d->item );
+- if ( d->item )
+- gpgme_trust_item_ref( d->item );
+- }
+-
+- const TrustItem & TrustItem::operator=( const TrustItem & other ) {
+- if ( &other == this ) return *this;
+-
+- if ( other.d->item )
+- gpgme_trust_item_ref( other.d->item );
+- if ( d->item )
+- gpgme_trust_item_unref( d->item );
+- *d = *other.d;
+- return *this;
+- }
+-
+- TrustItem::~TrustItem() {
+- if ( d->item )
+- gpgme_trust_item_unref( d->item );
+- delete d; d = 0;
+- }
+-
+- bool TrustItem::isNull() const {
+- return !d || !d->item;
+- }
+-
+- gpgme_trust_item_t TrustItem::impl() const {
+- return d->item;
+- }
+-
+-
+- const char * TrustItem::keyID() const {
+- return d->item ? d->item->keyid : 0 ;
+- }
+-
+- const char * TrustItem::userID() const {
+- return d->item ? d->item->name : 0 ;
+- }
+-
+- const char * TrustItem::ownerTrustAsString() const {
+- return d->item ? d->item->owner_trust : 0 ;
+- }
+-
+- const char * TrustItem::validityAsString() const {
+- return d->item ? d->item->validity : 0 ;
+- }
+-
+- int TrustItem::trustLevel() const {
+- return d->item ? d->item->level : 0 ;
+- }
+-
+- TrustItem::Type TrustItem::type() const {
+- if ( !d->item )
+- return Unknown;
+- else
+- return
+- d->item->type == 1 ? Key :
+- d->item->type == 2 ? UserID :
+- Unknown ;
+- }
+-
+-} // namespace GpgME
+diff --git a/libtdenetwork/gpgmepp/trustitem.h b/libtdenetwork/gpgmepp/trustitem.h
+deleted file mode 100644
+index aa1850b5..00000000
+--- a/libtdenetwork/gpgmepp/trustitem.h
++++ /dev/null
+@@ -1,59 +0,0 @@
+-/* trustitem.h - wraps a gpgme trust item
+- Copyright (C) 2003 Klarälvdalens Datakonsult AB
+-
+- This file is part of GPGME.
+-
+- GPGME 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.
+-
+- GPGME 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 GPGME; if not, write to the Free Software Foundation,
+- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
+-#ifndef __GPGMEPP_TRUSTITEM_H__
+-#define __GPGMEPP_TRUSTITEM_H__
+-
+-#include <gpgmepp/gpgmefw.h>
+-#include <gpgmepp/key.h>
+-
+-namespace GpgME {
+-
+- class Context;
+-
+- class TrustItem {
+- friend class Context;
+- public:
+- TrustItem( gpgme_trust_item_t item=0 );
+- TrustItem( const TrustItem & other );
+- virtual ~TrustItem();
+-
+- const TrustItem & operator=( const TrustItem & other );
+-
+- bool isNull() const;
+-
+- const char * keyID() const;
+- const char * userID() const;
+-
+- const char * ownerTrustAsString() const;
+- const char * validityAsString() const;
+-
+- int trustLevel() const;
+-
+- enum Type { Unknown=0, Key=1, UserID=2 };
+- Type type() const;
+-
+- private:
+- gpgme_trust_item_t impl() const;
+- class Private;
+- Private * d;
+- };
+-
+-} // namepace GpgME
+-
+-#endif // __GPGMEPP_TRUSTITEM_H__
+diff --git a/libtdenetwork/qgpgme/eventloopinteractor.cpp b/libtdenetwork/qgpgme/eventloopinteractor.cpp
+index 34cc51f4..c9a4764a 100644
+--- a/libtdenetwork/qgpgme/eventloopinteractor.cpp
++++ b/libtdenetwork/qgpgme/eventloopinteractor.cpp
+@@ -96,10 +96,6 @@ void QGpgME::EventLoopInteractor::slotReadActivity( int socket ) {
+ readActivity.remove(socket);
+ }
+
+-void QGpgME::EventLoopInteractor::nextTrustItemEvent( GpgME::Context * context, const GpgME::TrustItem & item ) {
+- emit nextTrustItemEventSignal( context, item );
+-}
+-
+ void QGpgME::EventLoopInteractor::nextKeyEvent( GpgME::Context * context, const GpgME::Key & key ) {
+ emit nextKeyEventSignal( context, key );
+ }
+diff --git a/libtdenetwork/qgpgme/eventloopinteractor.h b/libtdenetwork/qgpgme/eventloopinteractor.h
+index 7fca3bc0..b28d1f30 100644
+--- a/libtdenetwork/qgpgme/eventloopinteractor.h
++++ b/libtdenetwork/qgpgme/eventloopinteractor.h
+@@ -27,7 +27,6 @@
+ namespace GpgME {
+ class Context;
+ class Error;
+- class TrustItem;
+ class Key;
+ } // namespace GpgME
+
+@@ -44,7 +43,6 @@ namespace QGpgME {
+ static EventLoopInteractor * instance();
+
+ signals:
+- void nextTrustItemEventSignal( GpgME::Context * context, const GpgME::TrustItem & item );
+ void nextKeyEventSignal( GpgME::Context * context, const GpgME::Key & key );
+ void operationDoneEventSignal( GpgME::Context * context, const GpgME::Error & e );
+
+@@ -68,8 +66,6 @@ namespace QGpgME {
+ // Event Handler Interface
+ //
+
+- /*! \reimp */
+- void nextTrustItemEvent( GpgME::Context * context, const GpgME::TrustItem & item );
+ /*! \reimp */
+ void nextKeyEvent( GpgME::Context * context, const GpgME::Key & key );
+ /*! \reimp */
+--
+2.51.2
+
diff --git a/trinity-base/libtdenetwork/libtdenetwork-14.1.2.ebuild b/trinity-base/libtdenetwork/libtdenetwork-14.1.2.ebuild
index 373113fe..de137fa2 100644
--- a/trinity-base/libtdenetwork/libtdenetwork-14.1.2.ebuild
+++ b/trinity-base/libtdenetwork/libtdenetwork-14.1.2.ebuild
@@ -1,5 +1,5 @@
# Copyright 1999-2024 Gentoo Authors
-# Copyright 2020-2024 The Trinity Desktop Project
+# Copyright 2020-2025 The Trinity Desktop Project
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@@ -15,5 +15,7 @@ if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~arm64 ~x86"
fi
-DEPEND="app-crypt/gpgme"
+DEPEND="app-crypt/gpgme:="
RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-14.1.4-remove-trust-item-and-trust-list-related.patch" )
diff --git a/trinity-base/libtdenetwork/libtdenetwork-14.1.4.ebuild b/trinity-base/libtdenetwork/libtdenetwork-14.1.4.ebuild
index 298343bd..c5754d77 100644
--- a/trinity-base/libtdenetwork/libtdenetwork-14.1.4.ebuild
+++ b/trinity-base/libtdenetwork/libtdenetwork-14.1.4.ebuild
@@ -16,5 +16,7 @@ if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~arm64 ~x86"
fi
-DEPEND="app-crypt/gpgme"
+DEPEND="app-crypt/gpgme:="
RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-remove-trust-item-and-trust-list-related.patch" )
diff --git a/trinity-base/libtdenetwork/libtdenetwork-9999.ebuild b/trinity-base/libtdenetwork/libtdenetwork-9999.ebuild
index 298343bd..3c5e764a 100644
--- a/trinity-base/libtdenetwork/libtdenetwork-9999.ebuild
+++ b/trinity-base/libtdenetwork/libtdenetwork-9999.ebuild
@@ -16,5 +16,5 @@ if [[ ${PV} != *9999* ]] ; then
KEYWORDS="~amd64 ~arm64 ~x86"
fi
-DEPEND="app-crypt/gpgme"
+DEPEND="app-crypt/gpgme:="
RDEPEND="${DEPEND}"