Bug 196445

Summary: Mk/bsd.openssl.mk: Does not pick up SHLIBVER of LibreSSL
Product: Ports & Packages Reporter: Bernard Spil <brnrd>
Component: Ports FrameworkAssignee: Dirk Meyer <dinoex>
Status: Closed FIXED    
Severity: Affects Some People CC: dinoex, portmgr, vsevolod
Priority: --- Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192511
Attachments:
Description Flags
Patch to default to correct SHLIBVER for LibreSSL none

Description Bernard Spil freebsd_committer freebsd_triage 2015-01-02 19:59:20 UTC
When LibreSSL is installed, bsd.openssl.mk doesn't pick up the SHLIBVER from libcrypto.

Currenly, to use LibreSSL you must set
WITH_OPENSSL_PORT=    yes
OPENSSL_SHLIBVER=     30
OPENSSL_PORT=         security/libressl
to make ports use it.

As shown in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192511#c24 this is an issue. Otherwise we should add a pkg-message to security/libressl to warn users to setup their /etc/make.conf properly for LibreSSL.
Comment 1 Bernard Spil freebsd_committer freebsd_triage 2015-01-02 20:39:39 UTC
Created attachment 151223 [details]
Patch to default to correct SHLIBVER for LibreSSL

And added LibreSSL port maintainer to CC
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2015-01-02 20:48:27 UTC
unable to reproduce:

clean jail, only pkg and libressl installed.

~# pkg info
libressl-2.1.2                 Free version of the SSL/TLS protocol forked from OpenSSL

~# cd /usr/ports/ftp/vsftpd
/usr/ports/ftp/vsftpd# make all-depends-list
/usr/ports/security/libressl
/usr/ports/devel/pkgconf

/usr/ports/ftp/vsftpd# make -V BUILD_DEPENDS
/usr/local/lib/libcrypto.so.30:/usr/ports/security/libressl

/usr/ports/ftp/vsftpd# make -V RUN_DEPENDS
/usr/local/lib/libcrypto.so.30:/usr/ports/security/libressl

looks fine.
When LibreSSL is installed, bsd.openssl.mk picks up the SHLIBVER from libcrypto.

The settings in make.conf are only needed,
when you build without LibreSSL installed.

Please tell me what you expect.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-01-02 21:06:52 UTC
A commit references this bug:

Author: dinoex
Date: Fri Jan  2 21:06:06 UTC 2015
New revision: 376068
URL: https://svnweb.freebsd.org/changeset/ports/376068

Log:
  - try to guess SHLIBVER for libressl
  PR:		196445

Changes:
  head/Mk/bsd.openssl.mk
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2015-01-02 21:23:12 UTC
Commited with changes.

The Problem occurs only when you have set:
OPENSSL_PORT=security/libressl

regardless if libresll is installed or not.