Bug 206523 - mail/opensmtpd: Add libressl support, Fix OPTIONS use
Summary: mail/opensmtpd: Add libressl support, Fix OPTIONS use
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: Ashish SHUKLA
URL:
Keywords: easy, feature, needs-qa, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2016-01-23 14:44 UTC by Andrey Fesenko
Modified: 2016-02-25 14:22 UTC (History)
1 user (show)

See Also:
ashish: maintainer-feedback+
koobs: merge-quarterly?


Attachments
patch-Makefile (1.86 KB, patch)
2016-01-23 14:44 UTC, Andrey Fesenko
no flags Details | Diff
poudriere bulk -t log (152.97 KB, text/plain)
2016-01-23 14:45 UTC, Andrey Fesenko
no flags Details
patch-Makefile (1.96 KB, patch)
2016-02-25 04:29 UTC, Andrey Fesenko
andrey: maintainer-approval? (ashish)
Details | Diff
poudriere bulk -t log (150.42 KB, text/plain)
2016-02-25 04:30 UTC, Andrey Fesenko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Fesenko 2016-01-23 14:44:07 UTC
Created attachment 165999 [details]
patch-Makefile

Add new options LIBRESSL and LIBRESSL_DEVEL, default OpenSSL

Fix use OPT_CONFIGURE_*
Comment 1 Andrey Fesenko 2016-01-23 14:45:39 UTC
Created attachment 166000 [details]
poudriere bulk -t log
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-23 15:04:15 UTC
I'm -1 on adding LIBRESSL and LIBRESSL_DEVEL options to every single port that supports SSL/OPENSSL, given:

 * libressl is a drop in replacement for openssl
 * the framework already provides a mechanism for users to select what port to use for an SSL library

I would much prefer to see the framework itself add these options for any port which contains an OPENSSL option, perhaps automatically adding an extra SSL_RADIO or OPTIONS_MULTI depending on whether OPENSSL is a conditional or unconditional dependency (USE_SSL).
Comment 3 Andrey Fesenko 2016-01-23 15:28:14 UTC
If I'm right understand. Use SSL old provides Mk/bsd.openssl.mk this forces to use ".include" not new OPT framework
Comment 4 Ashish SHUKLA freebsd_committer freebsd_triage 2016-01-26 15:53:11 UTC
(In reply to Kubilay Kocak from comment #2)

You're probably right, and also since LibreSSL and OpenSSL are mutually exclusive at this point in time, so you can't have one port compiled with OpenSSL, and another with LibreSSL. So, if anyone wants to install LibreSSL, then they have to have their whole ${PREFIX} built with LibreSSL support.

Maybe the better way is to advertise the fact to users, that who wish to use it with LibreSSL, should define `OPENSSL_PORT' variable in their make.conf(5), to security/libressl or security/libressl-devel, and the port will magically start depending on LibreSSL port, instead of OpenSSL.

This is kind of what happens with emacs, by default every emacs dependent port requires editors/emacs, so those who wish to run emacs-devel, need to specify EMACS_PORT_NAME=emacs-devel in make.conf(5) to have all ports refer to editors/emacs-devel in their list of dependencies.

(In reply to Andrey Fesenko from comment #0)

The diff looks good to me, but after what Kubilay pointed out, I'm not sure about LIBRESSL* options, but OPT_CONFIGURE_* seems fine to commit, and I'll think I just add a message to `pre-everything' on how one could build it with LibreSSL, by defining OPENSSL_PORT in their make.conf(5), or at command-line (make OPENSSL_PORT=security/libressl ....), i.e.:

% make -C /usr/ports/mail/opensmtpd -V BUILD_DEPENDS OPENSSL_PORT=security/libressl-devel  
/usr/local/lib/libcrypto.so.36:/usr/ports/security/libressl-devel

(In reply to Andrey Fesenko from comment #3)

There is no USE_SSL present in /usr/ports/Mk, so I'm not sure what you're hinting at.
Comment 5 Andrey Fesenko 2016-02-25 04:29:24 UTC
Created attachment 167379 [details]
patch-Makefile

Update port, SSL_PORT option change similar mail/opensmtpd-devel
Fix use OPT_CONFIGURE_*
Comment 6 Andrey Fesenko 2016-02-25 04:30:17 UTC
Created attachment 167380 [details]
poudriere bulk -t log
Comment 7 Ashish SHUKLA freebsd_committer freebsd_triage 2016-02-25 14:22:37 UTC
Committed in ports r409520, with some changes.

Thanks!