Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jul 2009 21:29:30 +0000
From:      "b. f." <bf1783@googlemail.com>
To:        freebsd-ports@FreeBSD.org
Cc:        enlil65@gmail.com
Subject:   Re: Using WITH_OPENSSL_PORT
Message-ID:  <d873d5be0907251429u2b48c11bifbcfce396628b656@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Argh! This again.

On Sat, 25 Jul 2009 11:50:17 -0500
Peggy Wilkins <enlil65 at gmail.com> wrote:

>
> I recently installed security/krb5 which is my first installed port
> that has set WITH_OPENSSL_PORT in its Makefile.  It didn't take me
> long to notice after the installation of security/krb5 that
> security/pam_ldap on the same system no longer works, so I tried
> recompiling/reinstalling openldap and pam_ldap but that didn't fix it.
>  However, I didn't set WITH_OPENSSL_PORT myself when I did that -- I
> assumed the ports system would automatically detect that the openssl
> port was installed and would use that.

If the port uses the bsd.openssl.mk framework properly, it should use
the openssl port if it is installed, and if it is not explicitly told
to use the base openssl.  This is clear from lines 44-51 of version
1.44 of bsd.openssl.mk.


>
> I am unsure what I need to do to use the ports openssl on my system
> instead of the one that comes with the base system, without breaking
> things.  I assume I need to recompile the ports that depend on
> openssl, but how do I get the list of those things, given that (AFAIK)
> none of them list openssl as a dependency?

If you have a ports tree, and LOCALBASE and PREFIX are subdirectories
of usr/ (they are both /usr/local by default),  you can do something
like:

pkg_info -aoq | xargs -I % make -C /usr/ports/% -V OPENSSLBASE -V
PKGORIGIN | sed -n '/^\/usr/{n;p;}'

which will list the ports that USE_OPENSSL.  (You should really just
be able to test that USE_OPENSSL is defined, but a small number of
ports (77) use hacks to include bsd.openssl.mk without ever defining
USE_OPENSSL, so you need to do something like the above instead.) You
should then rebuild these ports, and, if you want to be safe, the
ports that depend upon them.  This will not find ports that don't
properly use the bsd.openssl.mk framework, but still link against the
openssl libraries.  There ought not to be any such ports, but
occasionally mistakes are made.


>
> Since I do OS updates from source, will using ports openssl affect
> make installworld and/or make installkernel on the base system?
>

No, it shouldn't.

> I read the openssl section in the FreeBSD Handbook and didn't find any
> useful information about this in there.  I also read through (as much
> as I could follow, anyway) /usr/ports/Mk/bsd.openssl.mk but am still
> clueless.

Well, it's all in there... :)

>
> Can someone outline how to use openssl from ports correctly?

Just install the openssl port, and, to be on the safe side, define
WITH_OPENSSL_PORT in the build environment of the ports that
USE_OPENSSL -- in /etc/make.conf is a good place, as someone
mentioned.

b.



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