git » qt5-webengine.git » commit 95800e2

Add fix for recent nss

author Antonio Rojas
2016-03-05 17:16:33 UTC
committer Antonio Rojas
2016-03-05 17:16:33 UTC
parent acfbc10c3e4edf0169571d2a1c49ae57d3145d10

Add fix for recent nss

PKGBUILD +10 -5
qt5-webengine-nss.patch +50 -0

diff --git a/PKGBUILD b/PKGBUILD
index 15b49ba..45ed65e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,19 +5,20 @@
 pkgname=qt5-webengine
 _qtver=5.6.0-rc
 pkgver=${_qtver/-/}
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url='http://qt-project.org/'
 license=('GPL3' 'LGPL' 'FDL' 'custom')
 pkgdesc='Provides support for web applications using the Chromium browser project'
-depends=('qt5-webchannel' 'libxcomposite' 'libxrandr' 'libxtst' 'libxcursor' 'libpulse' 'pciutils' 'libxss' 'nss'
-         'libvpx' 'opus' 'libevent' 'libsrtp' 'jsoncpp' 'libwebp' 'snappy' 'minizip')
+depends=('qt5-webchannel' 'libxcomposite' 'libxrandr' 'libxtst' 'libxcursor' 'libpulse' 'pciutils' 'libxss' 'libvpx' 'opus'
+         'libevent' 'libsrtp' 'jsoncpp' 'libwebp' 'snappy' 'minizip' 'nss' 'libxml2' 'libxslt')
 makedepends=('python2' 'git' 'gperf')
 conflicts=('qt')
 groups=('qt' 'qt5')
 _pkgfqn="${pkgname/5-/}-opensource-src-${_qtver}"
-source=("http://download.qt.io/development_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz")
-md5sums=('af563195bc61e878e8de45658a1bd745')
+source=("http://download.qt.io/development_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz" qt5-webengine-nss.patch)
+md5sums=('af563195bc61e878e8de45658a1bd745'
+         '26f5e1e96be524ccad564dc2fdb9766c')
 
 prepare() {
   mkdir -p build
@@ -25,6 +26,10 @@ prepare() {
   # Hack to force using python2
   mkdir -p bin
   ln -s /usr/bin/python2 bin/python
+
+  # Fix opening some websites with recent NSS https://github.com/QupZilla/qupzilla/issues/1870
+  cd ${_pkgfqn}
+  patch -p1 -i ../qt5-webengine-nss.patch
 }
 
 build() {
diff --git a/qt5-webengine-nss.patch b/qt5-webengine-nss.patch
new file mode 100644
index 0000000..1a7a09f
--- /dev/null
+++ b/qt5-webengine-nss.patch
@@ -0,0 +1,50 @@
+diff -ur qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc 
+qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc
+--- qtwebengine-opensource-src-5.6.0-beta/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc	2015-12-10 18:17:21.000000000 +0100
++++ qtwebengine-opensource-src-5.6.0-beta-chimera-nss-init/src/3rdparty/chromium/net/socket/ssl_client_socket_openssl.cc	2016-01-14 
+17:11:38.432633534 +0100
+@@ -57,6 +57,10 @@
+ #include "net/ssl/ssl_platform_key.h"
+ #endif
+ 
++#if defined(USE_NSS_CERTS) || defined(OS_IOS)
++#include "net/cert_net/nss_ocsp.h"
++#endif
++
+ namespace net {
+ 
+ namespace {
+@@ -795,6 +799,14 @@
+   DCHECK(!ssl_);
+   DCHECK(!transport_bio_);
+ 
++#if defined(USE_NSS_CERTS) || defined(OS_IOS)
++  if (ssl_config_.cert_io_enabled) {
++    // TODO(davidben): Move this out of SSLClientSocket. See
++    // https://crbug.com/539520.
++    EnsureNSSHttpIOInit();
++  }
++#endif
++
+   SSLContext* context = SSLContext::GetInstance();
+   crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
+   
+diff -ur qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri
+--- qtwebengine-opensource-src-5.6.0-beta/src/core/config/linux.pri	2015-12-14 16:27:24.000000000 +0100
++++ qtwebengine-opensource-src-5.6.0-beta-linux-pri/src/core/config/linux.pri	2016-01-14 17:31:05.765975551 +0100
+@@ -18,7 +18,13 @@
+     use_kerberos=0 \
+     use_pango=0
+ 
+-!use?(nss) {
++use?(nss) {
++# do a "chimera build" (BoringSSL code, NSS certs): This is the default in
++# Chromium 47+, and it is the only variant that works with NSS 3.21.
++    GYP_CONFIG += use_nss_certs=1 \
++        use_openssl=1 \
++        use_openssl_certs=0
++} else {
+     GYP_CONFIG += use_nss_certs=0 \
+         use_openssl=1 \
+         use_openssl_certs=1
+