Bug 209196 - net/freeswitch: Remove dependency on openssl port
Summary: net/freeswitch: Remove dependency on openssl port
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-02 07:18 UTC by Šimun Mikecin
Modified: 2016-05-18 04:34 UTC (History)
3 users (show)

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


Attachments
Removes dependency on openssl port (SVN diff) (524 bytes, patch)
2016-05-02 07:18 UTC, Šimun Mikecin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Šimun Mikecin 2016-05-02 07:18:11 UTC
Created attachment 169874 [details]
Removes dependency on openssl port (SVN diff)

This update removes dependency on openssl port because it is not neccessary.

Installing openssl port can lead to conflicts when building other packages:
linking with options -lcrypto and/or -lssl can lead to undefined result because of file versions:
/lib/libcrypto.so.7
/usr/lib/libssl.so.7
/usr/local/lib/libcrypto.so.8
/usr/local/lib/libssl.so.8
Comment 1 corsmith 2016-05-12 21:59:52 UTC
Check out bug id: 209353

The latest version of the port will not include SSL by default.  The base system ssl is not detected by the configure script in freeswitch because it uses pkg-config to find the dependency and the base system does not install an openssl.pc.

For ssl support to be built properly the openssl port is necessary.  An upstream patch to the configure script would be required for the base system version of openssl to be used.

I believe this ticket should be rejected.
Comment 2 Šimun Mikecin 2016-05-13 08:02:54 UTC
If you do this (after patching with an attached patch):

# pkg remove openssl
# cd /usr/ports/net/freeswitch
# make patch
# cd work/freeswitch-1.6.7
# ./configure|&tee /tmp/log
# fgrep -i ssl /tmp/log

You will see:
checking for openssl... checking for openssl/tls1.h... yes
checking for TLSv1_method in -lssl... yes
  adding "-DHAVE_OPENSSL" to SWITCH_AM_CFLAGS
checking for SSL_CTX_set_tlsext_use_srtp in -lssl... yes
checking for DTLSv1_method in -lssl... yes
checking whether to leverage OpenSSL crypto... yes
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
Package 'openssl', required by 'world', not found
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
Package 'openssl', required by 'world', not found
checking for openssl... checking for openssl/tls1.h... yes
checking for TLSv1_method in -lssl... yes
checking for openssl... checking for openssl/tls1.h... yes
checking for TLSv1_method in -lssl... yes

So it seems base openssl is detected just fine even without pkg-config.

After you build and install patched port you can check that base openssl is really linked with freeswitch with:
# ldd /usr/local/bin/freeswitch|egrep '(ssl|crypto)'

And it shows that it is:
        libssl.so.7 => /usr/lib/libssl.so.7 (0x803054000)
        libcrypto.so.7 => /lib/libcrypto.so.7 (0x8032c0000)

So I don't see a problem here.
Comment 3 corsmith 2016-05-18 01:04:53 UTC
Bug 209353 includes the proposed changes.  IMHO this ticket can be closed.
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2016-05-18 04:34:35 UTC
Will be done with the change in 209353