Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 May 2021 10:05:56 +0900 (JST)
From:      Yasuhiro Kimura <yasu@utahime.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: Making a port to use OpenSSL of ports collection on FreeBSD 11.x,Re: Making a port to use OpenSSL of ports collection on FreeBSD 11.x
Message-ID:  <20210507.100556.694097639001344220.yasu@utahime.org>
In-Reply-To: <12e142be-43c8-70fc-d0d8-d17969d8c734@freebsd.org>
References:  <20210505173202.36f1c307@bsd64.grem.de> <20210506.010002.255215505975340477.yasu@utahime.org> <12e142be-43c8-70fc-d0d8-d17969d8c734@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
From: Stefan Esser <se@freebsd.org>
Subject: Re: Making a port to use OpenSSL of ports collection on FreeBSD 11.x,Re: Making a port to use OpenSSL of ports collection on FreeBSD 11.x
Date: Wed, 5 May 2021 18:55:47 +0200

>> You misunderstand my intention. What I would like to do is to make a
>> port use security/openssl instead of base OpenSSL even if user sets
>> 'DEFAULT_VERSIONS+=ssl=base' in /etc/make.conf (or user doesn't
>> customize setting about ssl at all).
> 
> You can mark the port as broken if the user has selected "base" and
> this is incompatible with the port's requirements. E.g.:
> 
> .include <bsd.port.pre.mk>
> 
> .if ${SSL_DEFAULT} == base
> BROKEN_FreeBSD_11=      OpenSSL 1.1 required
> .endif
> 
> .include <bsd.port.post.mk>
> 
> You can of course add a better message, and the user can decide to
> try the compilation again after changing the default. But this will
> of course prevent the building of official packages for FreeBSD-11.
> 
>> As I wrote previous mail, if 'USES=python:3.8+' is specified in
>> Makefile of a port, lang/python38 is used for the port event if user
>> adds 'DEFAULT_VERSIONS+=python=3.7' in /etc/make.conf. I'm looking for
>> similar way about ssl setting.
> 
> You could add a dependency on the openssl port and make sure, that
> the port's include file and library is used in preference of the
> base version on FreeBSD-11.
> 
> But you have to consider the risk of mixing references to the base and
> the ports version in one binary (e.g. other libraries are linked in that
> had been built against the base version).

Thank you for explanation. The risk certainly cannot be ignored. So
the best practice is

1. Mark BROKEN if system is FreeBSD 11.x and SSL_DEFAULT is base.
2. For uses who want to used a port on FreeBSD 11.x with base OpenSSL,
   copy it to other name before updating it.

And before I came to this conclusion, I noticed that the port in
question was already updated exactly this way;-).

---
Yasuhiro Kimura



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210507.100556.694097639001344220.yasu>