Fix FTBFS

This commit is contained in:
Than Ngo 2021-10-19 17:10:50 +02:00
parent f48052b0ce
commit b58bf0b666
2 changed files with 98 additions and 1 deletions

View File

@ -0,0 +1,90 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp.me qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp.me 2021-10-19 15:12:03.727951685 +0200
+++ qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp 2021-10-19 15:18:59.795315141 +0200
@@ -273,7 +273,11 @@ init_context:
#endif
break;
case QSsl::SslV3:
+#ifndef OPENSSL_NO_SSL3
ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
+#else
+ ctx = 0;
+#endif
break;
case QSsl::SecureProtocols: // SslV2 will be disabled below
case QSsl::TlsV1SslV3: // SslV2 will be disabled below
diff -up qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp.me qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp.me 2021-10-12 19:58:01.005913416 +0200
+++ qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp 2021-10-19 15:11:32.660331443 +0200
@@ -253,7 +253,9 @@ DEFINEFUNC(int, SSL_shutdown, SSL *a, a,
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
#else
@@ -263,7 +265,9 @@ DEFINEFUNC(const SSL_METHOD *, TLSv1_cli
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
#else
@@ -272,11 +276,15 @@ DEFINEFUNC(const SSL_METHOD *, TLS_serve
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
#else
DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
@@ -756,11 +764,15 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_shutdown, 173, libs.first )
RESOLVEFUNC(SSL_write, 188, libs.first )
RESOLVEFUNC(SSLv2_client_method, 192, libs.first )
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_client_method, 195, libs.first )
+#endif
RESOLVEFUNC(SSLv23_client_method, 189, libs.first )
RESOLVEFUNC(TLSv1_client_method, 198, libs.first )
RESOLVEFUNC(SSLv2_server_method, 194, libs.first )
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_server_method, 197, libs.first )
+#endif
RESOLVEFUNC(SSLv23_server_method, 191, libs.first )
RESOLVEFUNC(TLSv1_server_method, 200, libs.first )
RESOLVEFUNC(SSL_CTX_load_verify_locations, 34, libs.first )
@@ -927,7 +939,9 @@ bool q_resolveOpenSslSymbols()
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_client_method)
#endif
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_client_method)
+#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSLv23_client_method)
#else
@@ -937,7 +951,9 @@ bool q_resolveOpenSslSymbols()
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_server_method)
#endif
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_server_method)
+#endif
#if OPENSSL_VERSION_NUMBER < 0x10100000L
RESOLVEFUNC(SSLv23_server_method)
#else

View File

@ -43,7 +43,7 @@ Summary: Qt toolkit
Name: qt
Epoch: 1
Version: 4.8.7
Release: 65%{?dist}
Release: 66%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT
@ -209,6 +209,9 @@ Patch97: qt-everywhere-opensource-src-4.8.7-gcc11.patch
# hardcode the compiler version in the build key once and for all
Patch98: qt-everywhere-opensource-src-4.8.7-hardcode-buildkey.patch
# FTBFS openssl3
Patch99: qt-everywhere-opensource-src-4.8.7-openssl3.patch
# upstream patches
# backported from Qt5 (essentially)
# http://bugzilla.redhat.com/702493
@ -666,6 +669,7 @@ rm -rf src/3rdparty/clucene
%endif
%patch97 -p1 -b .gcc11
%patch98 -p1 -b .hardcode-buildkey
%patch99 -p1 -b .ssl3
# upstream patches
%patch102 -p1 -b .qgtkstyle_disable_gtk_theme_check
@ -1403,6 +1407,9 @@ fi
%changelog
* Tue Oct 19 2021 Than Ngo <than@redhat.com> - 1:4.8.7-66
- Fix FTBFS
* Tue Oct 12 2021 Than Ngo <than@redhat.com> - 1:4.8.7-65
- CVE-2020-24741, Do not attempt to load a library relative to $PWD