Bug 200555 - [patch] improve ftp/curl OPENSSL vs. GSSAPI_BASE sanity check
Summary: [patch] improve ftp/curl OPENSSL vs. GSSAPI_BASE sanity check
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-05-31 22:05 UTC by Don Lewis
Modified: 2015-06-25 04:33 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
patch to improve OPENSSL vs. GSSAPI_BASE sanity check (1.40 KB, patch)
2015-05-31 22:05 UTC, Don Lewis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Lewis freebsd_committer freebsd_triage 2015-05-31 22:05:57 UTC
Created attachment 157314 [details]
patch to improve OPENSSL vs. GSSAPI_BASE sanity check

When doing a poudriere build of ftp/curl and WITH_OPENSSL_PORT=yes included in make.conf, bsd.openssl.mk will cause OPENSSL_PORT to be installed as a build dependency, but the resulting curl package gets linked to the base version of openssl if the GSSAPI_BASE options is set (default).

There is some sanity check logic in ftp/curl/Makefile that attempts to catch this, but it misses some cases:
  * If the OPENSSL option is set and WITH_OPENSSL_PORT is defined, then we
    always want to link to OPENSSL_PORT.

  * If the OPENSSL option is set in a non-poudriere build and no WITH_OPENSSL_*
    preferences are specified, bsd.openssl.mk will check to see whether
    the openssl or libressl port is installed and if so it will expect to use
    that for the build.  Note: poudriere builds will be in a clean environment,
    so they will default to using openssl from base.

Setting OPENSSL_PORT does not cause poudriere to install OPENSSL_PORT as a build dependency before building curl, so testing OPENSSL_PORT is not useful as part of the sanity check.

If base openssl is not installed, bsd.openssl.mk will add OPENSSL_PORT as a
build dependency, but this case should not conflict with GSSAPI_BASE.

The attached patch attempts to match the GSSAPI_BASE sanity check logic to the logic in bsd.openssl.mk.  It also tweaks the message and removes some extraneous whitespace.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-06-24 17:21:42 UTC
A commit references this bug:

Author: bdrewery
Date: Wed Jun 24 17:21:30 UTC 2015
New revision: 390499
URL: https://svnweb.freebsd.org/changeset/ports/390499

Log:
  Prevent building a broken curl when using the openssl port when GSSAPI_BASE set.

  Without this curl would link to both /usr/lib/libssl.so and /usr/local/lib/libssl.so
  resulting in a crash at runtime.

  Bump revision as current builds are broken at runtime and need to be rebuilt.

  PR:		200555
  Submitted by:	truckman
  Approved by:	maintainer timeout

Changes:
  head/ftp/curl/Makefile
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2015-06-24 17:21:55 UTC
Committed
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-06-25 00:17:22 UTC
A commit references this bug:

Author: bdrewery
Date: Thu Jun 25 00:17:09 UTC 2015
New revision: 390525
URL: https://svnweb.freebsd.org/changeset/ports/390525

Log:
  Try to improve the wording for the GSSAPI+OpenSSL IGNORE in r390499.

  PR:		200555

Changes:
  head/ftp/curl/Makefile
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-06-25 00:23:25 UTC
A commit references this bug:

Author: bdrewery
Date: Thu Jun 25 00:22:30 UTC 2015
New revision: 390526
URL: https://svnweb.freebsd.org/changeset/ports/390526

Log:
  Be more explicit about which setting to use.

  PR:		200555

Changes:
  head/ftp/curl/Makefile
Comment 5 Bryan Drewery freebsd_committer freebsd_triage 2015-06-25 00:24:30 UTC
For more context this particular issue broke 'git clone https:///' for me resulting in crashes in OpenSSL.
Comment 6 Don Lewis freebsd_committer freebsd_triage 2015-06-25 04:33:39 UTC
(In reply to commit-hook from comment #4)

Any of the possible GSSAPI option values other than GSSAPI_BASE seemed to work properly for me.  I chose GSSAPI_NONE because I didn't need the functionality, but that may not be the case for all users.