Update to qdigidoc4 4.2.12

Trade local patches for rebased upstream PRs.
Stick to Qt5 for now (Qt6 is new default).
This commit is contained in:
kn 2022-07-22 05:32:54 +00:00
parent e595f55683
commit d9fb3c8247
8 changed files with 42 additions and 99 deletions

View File

@ -1,11 +1,7 @@
COMMENT = DigiDoc4 GUI client for signing and encrypting documents
V = 4.2.11
DISTNAME = qdigidoc4_${V}.110-1804
REVISION = 4
EXTRACT_SUFX = .tar.xz
WRKDIST = ${WRKDIR}/qdigidoc4
PKGNAME = qdigidoc4-${V}
V = 4.2.12
DISTNAME = qdigidoc4-${V}
CATEGORIES = security x11
DEBUG_PACKAGES = ${BUILD_PACKAGES}
@ -31,6 +27,20 @@ MASTER_SITES1 = https://ec.europa.eu/tools/lotl/
DISTFILES += eu-lotl-pivot-300.xml:1
CONFIGURE_ENV += TSL_URL=file://${FULLDISTDIR}/eu-lotl-pivot-300.xml
MASTER_SITES2 = https://github.com/open-eid/DigiDoc4-Client/
# all pending
PATCHFILES += bsd-{pull/}1072.patch:2
MASTER_SITES3 = https://github.com/open-eid/qt-common/
# all pending
PATCHFILES += qt-common-pcsc-lite-{pull/}121.patch:3
PATCHFILES += qt-common-fix-i386-{pull/}124.patch:3
PATCH_CASES += qt-common-*.patch) \
${PATCH} ${PATCH_DIST_ARGS} < $$patchfile \
-d${WRKSRC}/common ;;
PATCH_DIST_STRIP = -p1
MAINTAINER = Klemens Nanni <kn@openbsd.org>
WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Network Qt5PrintSupport
@ -43,7 +53,7 @@ BUILD_DEPENDS = devel/gettext,-tools \
x11/qt5/qttools
LIB_DEPENDS = databases/openldap,-main \
security/libdigidocpp>=3.14.8 \
security/libdigidocpp>=3.14.10 \
security/pcsc-lite \
x11/qt5/qtsvg

View File

@ -1,10 +1,16 @@
SHA256 (qdigidoc4/bsd-1072.patch) = MgnfvJ6et+QjlcAntBnjRqpgefCdfffd8/5sGXi34qg=
SHA256 (qdigidoc4/config.json) = 0xbWoDD8Bt3NDSy5mcfEROsrX/pviR0+lB+9Vc3t69I=
SHA256 (qdigidoc4/config.pub) = KeBXeM6YtRl5YyZr3Ckq+AqUBszMP+XvfKK3WxvrNOs=
SHA256 (qdigidoc4/config.rsa) = 2pSXSsQt+EKU6+n1x3P3iuXxV18bgrQ3CZQYhK2K/p0=
SHA256 (qdigidoc4/eu-lotl-pivot-300.xml) = DSmCpZOMKFf1lEcM4XkKac7R65hkcovZZw/exM34M7I=
SHA256 (qdigidoc4/qdigidoc4_4.2.11.110-1804.tar.xz) = Sg6lFZeIJn3T/suDc5Z/kNqBf/sIV9c6EJJ0Nr0dwTM=
SHA256 (qdigidoc4/qdigidoc4-4.2.12.tar.gz) = 6bso1qvhVhbBfrcTq4S+aHtHli7X2A926N4r45ztq4E=
SHA256 (qdigidoc4/qt-common-fix-i386-124.patch) = RqNRZmbXRhI/ni/uGK3Z5heSv3fqLmBAIE1aG+0iVrY=
SHA256 (qdigidoc4/qt-common-pcsc-lite-121.patch) = 6mZNDCrZszL/7CdD7b12zcC5klsi0+GDLxoZ3S3U+OM=
SIZE (qdigidoc4/bsd-1072.patch) = 5862
SIZE (qdigidoc4/config.json) = 67182
SIZE (qdigidoc4/config.pub) = 426
SIZE (qdigidoc4/config.rsa) = 349
SIZE (qdigidoc4/eu-lotl-pivot-300.xml) = 424989
SIZE (qdigidoc4/qdigidoc4_4.2.11.110-1804.tar.xz) = 2838392
SIZE (qdigidoc4/qdigidoc4-4.2.12.tar.gz) = 4179889
SIZE (qdigidoc4/qt-common-fix-i386-124.patch) = 1755
SIZE (qdigidoc4/qt-common-pcsc-lite-121.patch) = 2040

View File

@ -0,0 +1,17 @@
Stick to Qt5 for now, see "Cannot build against Qt5 if Qt6 is installed"
https://github.com/open-eid/DigiDoc4-Client/issues/1097
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -14,7 +14,9 @@ include( VersionInfo )
find_package( PKCS11 )
find_package( LibDigiDocpp 3.14.8 REQUIRED )
find_package( LDAP REQUIRED )
-find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
+find_package(Qt5 COMPONENTS Core REQUIRED)
+set(QT_VERSION ${Qt5_VERSION})
+set(QT_VERSION_MAJOR ${Qt5_VERSION_MAJOR})
find_package(Qt${QT_VERSION_MAJOR} 5.9.0 REQUIRED COMPONENTS Core Widgets Network PrintSupport Svg LinguistTools)
set_env( TSL_URL "https://ec.europa.eu/tools/lotl/eu-lotl.xml" CACHE STRING "TSL trust list primary URL" )

View File

@ -1,30 +0,0 @@
Index: client/QSigner.cpp
--- client/QSigner.cpp.orig
+++ client/QSigner.cpp
@@ -70,7 +70,7 @@ class QSigner::Private (public)
static ECDSA_SIG* ecdsa_do_sign(const unsigned char *dgst, int dgst_len,
const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RSA_METHOD rsamethod = *RSA_get_default_method();
ECDSA_METHOD *ecmethod = ECDSA_METHOD_new(nullptr);
#else
@@ -123,7 +123,7 @@ QSigner::QSigner( ApiType api, QObject *parent )
: QThread(parent)
, d(new Private)
{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
d->rsamethod.name = "QSmartCard";
d->rsamethod.rsa_sign = Private::rsa_sign;
d->rsamethod.flags |= RSA_FLAG_SIGN_VER;
@@ -317,7 +317,7 @@ QSslKey QSigner::key() const
else
{
RSA *rsa = (RSA*)key.handle();
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
RSA_set_method(rsa, &d->rsamethod);
rsa->flags |= RSA_FLAG_SIGN_VER;
#else

View File

@ -1,12 +0,0 @@
Index: client/SslCertificate.cpp
--- client/SslCertificate.cpp.orig
+++ client/SslCertificate.cpp
@@ -59,7 +59,7 @@ static QByteArray i2dDer(Func func, Arg arg)
return der;
}
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
static void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
{
if(n) *n = r->n;

View File

@ -1,15 +0,0 @@
Use Q_OS_UNIX do detect BSDs next to Linux
https://github.com/open-eid/DigiDoc4-Client/pull/1072
Index: client/dialogs/CertificateDetails.cpp
--- client/dialogs/CertificateDetails.cpp.orig
+++ client/dialogs/CertificateDetails.cpp
@@ -210,7 +210,7 @@ QString CertificateDetails::decodeCN(const QString &cn
#ifndef Q_OS_MAC
void CertificateDetails::showCertificate(const SslCertificate &cert, QWidget *parent, const QString &suffix)
{
-#ifdef Q_OS_LINUX
+#ifdef Q_OS_UNIX
CertificateDetails(cert, parent).exec();
#else
Q_UNUSED(parent);

View File

@ -1,15 +0,0 @@
Remove DWORD cast to fix i386 build
https://github.com/open-eid/qt-common/pull/124
Index: common/QPCSC.cpp
--- common/QPCSC.cpp.orig
+++ common/QPCSC.cpp
@@ -513,7 +513,7 @@ bool QPCSCReader::updateState( quint32 msec )
if(!d->d->context)
return false;
d->state.dwCurrentState = d->state.dwEventState;
- switch(DWORD(SC(GetStatusChange, d->d->context, msec, &d->state, 1U))) //INFINITE
+ switch(SC(GetStatusChange, d->d->context, msec, &d->state, 1U))
{
case SCARD_S_SUCCESS: return true;
case SCARD_E_TIMEOUT: return msec == 0;

View File

@ -1,18 +0,0 @@
Fix security/pcsc-lite's include path to match what pkg-config(1) says and
cmake uses.
https://github.com/open-eid/qt-common/pull/121
Index: common/QPCSC_p.h
--- common/QPCSC_p.h.orig
+++ common/QPCSC_p.h
@@ -30,8 +30,8 @@
#include <winsock2.h>
#include <winscard.h>
#else
-#include <PCSC/wintypes.h>
-#include <PCSC/winscard.h>
+#include <wintypes.h>
+#include <winscard.h>
#include <arpa/inet.h>
#endif