Bug 211832 - net/qt5-network: fix build with LibreSSL
Summary: net/qt5-network: fix build with LibreSSL
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: kde
URL:
Keywords: easy, needs-qa
Depends on:
Blocks:
 
Reported: 2016-08-14 10:27 UTC by Matthew Rezny
Modified: 2016-08-23 15:55 UTC (History)
3 users (show)

See Also:
rakuco: maintainer-feedback+
rakuco: merge-quarterly+


Attachments
fix build of qt5-network with libressl (1.95 KB, patch)
2016-08-14 10:27 UTC, Matthew Rezny
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Rezny freebsd_committer 2016-08-14 10:27:08 UTC
Created attachment 173657 [details]
fix build of qt5-network with libressl

Add patch to fix build with LibreSSL
Comment 2 Bernard Spil freebsd_committer 2016-08-18 06:39:16 UTC
Can confirm that this works with LibreSSL 2.4 (in base)

https://builds.ixsystems.com/devastator/data/master-trueosports/2016-08-11_18h03m08s/logs/py27-qt5-network-5.5.1.log
Comment 3 Raphael Kubo da Costa freebsd_committer 2016-08-21 12:09:33 UTC
I've submitted this upstream for a double-check: https://codereview.qt-project.org/#/c/168666/ and will land this patch in the upcoming week (hopefully I'll get a comment in Gerrit soon).
Comment 4 Marie Loise Nolden 2016-08-21 13:17:32 UTC
Please see https://codereview.qt-project.org/#/c/161039/

At the time I tried adding support to LibreSSL on OpenBSD so we had that discussion here also already. I guess as long as there is no real commitment to support LibreSSL in Qt, it won't happen anytime soon.
Comment 5 Raphael Kubo da Costa freebsd_committer 2016-08-23 14:21:38 UTC
As Loise predicted, my patch was rejected upstream: it had already been submitted once before, and upstream does not want to complicate the OpenSSL code even further. People are welcome to submit and maintain a separate LibreSSL backend upstream though.

More information here: https://codereview.qt-project.org/#/c/154800/

For now, I'm merging the patch so it also gets into 2016Q3 and people use it with Qt 5.5 while we don't update the ports tree to 5.6.
Comment 6 commit-hook freebsd_committer 2016-08-23 14:23:19 UTC
A commit references this bug:

Author: rakuco
Date: Tue Aug 23 14:23:05 UTC 2016
New revision: 420681
URL: https://svnweb.freebsd.org/changeset/ports/420681

Log:
  Fix the build with LibreSSL.

  LibreSSL does not define SSL_CTRL_SET_CURVES, so check for the macro's
  existence before using it.

  I'm committing this mostly to get it into the 2016Q3 branch so it lives a bit
  longer: starting with Qt 5.6, upstream explicitly does not support LibreSSL and
  fails at configuration time if it is detected (the rationale being that they do
  not want to make the OpenSSL backend code even more confusing with additional
  checks and code paths for LibreSSL; patches adding a separate LibreSSL backend
  are more than welcome, but someone needs to write the code and maintain it).

  PORTREVISION is not being bumped because the LibreSSL build was simply broken
  before, and the patch does not change anything for OpenSSL users.

  PR:		211832
  Submitted by:	matthew@reztek.cz
  MFH:		2016Q3

Changes:
  head/net/qt5-network/files/patch-src_network_ssl_qsslcontext__openssl.cpp
Comment 7 commit-hook freebsd_committer 2016-08-23 15:38:38 UTC
A commit references this bug:

Author: rakuco
Date: Tue Aug 23 15:38:11 UTC 2016
New revision: 420703
URL: https://svnweb.freebsd.org/changeset/ports/420703

Log:
  MFH: r420681

  Fix the build with LibreSSL.

  LibreSSL does not define SSL_CTRL_SET_CURVES, so check for the macro's
  existence before using it.

  I'm committing this mostly to get it into the 2016Q3 branch so it lives a bit
  longer: starting with Qt 5.6, upstream explicitly does not support LibreSSL and
  fails at configuration time if it is detected (the rationale being that they do
  not want to make the OpenSSL backend code even more confusing with additional
  checks and code paths for LibreSSL; patches adding a separate LibreSSL backend
  are more than welcome, but someone needs to write the code and maintain it).

  PORTREVISION is not being bumped because the LibreSSL build was simply broken
  before, and the patch does not change anything for OpenSSL users.

  PR:		211832
  Submitted by:	matthew@reztek.cz

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/net/qt5-network/files/patch-src_network_ssl_qsslcontext__openssl.cpp