openssl from ports

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Mar 2 23:53:44 UTC 2012


On 02/03/2012 22:27, Randal L. Schwartz wrote:

> Ahh, according to my read of /usr/ports/Mk/bsd.openssl.mk,
> it looks like:
> 
>     #       if no preference was set, check for an installed base version
>     #       but give an installed port preference over it.
>     .if     !defined(WITH_OPENSSL_BASE) && \
>             !defined(WITH_OPENSSL_PORT) && \
>             !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \
>             exists(${DESTDIR}/usr/include/openssl/opensslv.h)
>     WITH_OPENSSL_BASE=yes
>     .endif
> 
> and later
> 
>     .if exists(${LOCALBASE}/lib/libcrypto.so)
>     check-depends::
>             @${ECHO_CMD} "Dependency error: this port wants the OpenSSL
>             library from the FreeBSD"
>             @${ECHO_CMD} "base system. You can't build against it, while a
>             newer"
>             @${ECHO_CMD} "version is installed by a port."
>             @${ECHO_CMD} "Please deinstall the port or undefine
>             WITH_OPENSSL_BASE."
>             @${FALSE}
>     .endif
> 
> So it looks like modern FreeBSD will Do The Right Thing if I just
> recompile the apache22 port.  Once I knew what to look for, I found it
> with a bit of grepping.

You do need WITH_OPENSSL_PORT=yes in /etc/make.conf or equivalent; just
installing security/openssl alone will cause any port that links against
openssl shlibs to emit rude messages.

Also, beware of any apache modules that might link against openssl in
their own right which should also be rebuild to use the ports version --
the classic example here is php5-openssl loaded via mod_php -- but there
are many ways of doing this.  Trying to load two different OpenSSL
shlibs into the same execution image causes instant crash and burn.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20120302/86064776/signature.pgp


More information about the freebsd-questions mailing list