Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Mar 2003 07:34:00 +0100
From:      dirk.meyer@dinoex.sub.org (Dirk Meyer)
To:        freebsd-ports@FreeBSD.ORG, dsilver@urchin.com (Doug Silver)
Subject:   Re: Clarification on ports openssl
Message-ID:  <wkMDvkD3Vt@dmeyer.dinoex.sub.org>
References:  <200303211533.58366.dsilver@urchin.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug Silver wrote:,

> I have the latest openssl port installed and the following in make.conf but it
> seemed to get ignored during the build:

> [mod_php4]# egrep -i openssl /etc/make.conf
> USE_OPENSSL_PORT=yes

fine ... valid 

> OPENSSLBASE=    /usr/local
> OPENSSLDIR=     /usr/local/etc/ssl

This settings are overritten bye the Makefiles.

> So I forced the issue:
> However even that doesn't seem to work:
> [snip from end of "make" ]
> /usr/local/lib/libc-client4.so: warning: tmpnam() possibly used unsafely; 
> consider using mkstemp()
> /usr/libexec/elf/ld: warning: libcrypto.so.2, needed by 
> /usr/local/lib/libc-client4.so, may conflict with libcrypto.so.3

yes, you need all libs to be build against the same version of openssl.

> I realize the cclient is the problem, but beyond hacking the code to link 
> libcrypto to /usr/local I wanted to check here first.  Am I missing something 
> that should be set in /etc/make.conf or elsewhere?  I see from a January 
> thread that Dirk wrote:
> Subject:   Re: USE_OPENSSL and openssl from ports...
> right...
> 
> USE_OPENSSL is defunct, see PR from June 2002:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/39054

No comment has been made on this problem...
only CURRENT and STABLE users don't suffer from it.

> But from that PR it seems like there should be a Mk/bsd.openssl.mk file, or 
> perhaps it was merged into the main bsd.port.mk?  Even so, how should the 
> openssl port be maintened so other ports link against it instead of the base 
> one?  I hope the answer isn't to overwrite the base ;)

unless bsd.port.mk can be changed, you have to modify the makefiles in the
ports you use.

you have to fix all ports. Remove the line:
USE_OPENSSL=    yes

and add later (after bsd.pre.mk):
.include "${PORTSDIR}/security/openssl/Makefile.ssl"

See for examples the ports:

/usr/ports/ftp/curl/Makefile
/usr/ports/mail/pantomime-ssl/Makefile
/usr/ports/mail/sendmail/Makefile
/usr/ports/mail/sendmail-old/Makefile
/usr/ports/net/bind9-dlz/Makefile
/usr/ports/news/suck/Makefile
/usr/ports/security/openssh/Makefile
/usr/ports/security/openssh-portable/Makefile
/usr/ports/security/openssl/Makefile.ssl
/usr/ports/www/apache13-modssl/Makefile
/usr/ports/www/apache13-ssl/Makefile

The easy way is to apply thsi patch

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]

Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.444
diff -u -r1.444 bsd.port.mk
--- bsd.port.mk	22 Mar 2003 04:45:24 -0000	1.444
+++ bsd.port.mk	22 Mar 2003 06:33:30 -0000
@@ -927,45 +927,7 @@
 .endif # !defined(PERL_LEVEL) && defined(PERL_VERSION)
 
 .if defined(USE_OPENSSL)
-.if ${OSVERSION} >= 400014
-.if !exists(/usr/lib/libcrypto.so)
-.BEGIN:
-	@${ECHO_CMD} "This port requires the OpenSSL library, which is part of"
-	@${ECHO_CMD} "the FreeBSD crypto distribution but not installed on your"
-	@${ECHO_CMD} "machine. Please see the \"OpenSSL\" section in the handbook"
-	@${ECHO_CMD} "(at \"http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/openssl.html\", for instance)"
-	@${ECHO_CMD} "for instructions on how to obtain and install the FreeBSD"
-	@${ECHO_CMD} "OpenSSL distribution."
-	@${FALSE}
-.else
-OPENSSLBASE=	/usr
-OPENSSLDIR=		/etc/ssl
-# OpenSSL in the base system may not include IDEA for patent licensing reasons.
-.if defined(MAKE_IDEA) && !defined(OPENSSL_IDEA)
-OPENSSL_IDEA=	${MAKE_IDEA}
-.else
-OPENSSL_IDEA?=	NO
-.endif
-.if ${OPENSSL_IDEA} == "NO"
-# XXX This is a hack to work around the fact that /etc/make.conf clobbers
-#     our CFLAGS. It might not be enough for all future ports.
-.if defined(HAS_CONFIGURE)
-CFLAGS+=		-DNO_IDEA
-.else
-OPENSSL_CFLAGS+=-DNO_IDEA
-.endif
-MAKE_ARGS+=		OPENSSL_CFLAGS="${OPENSSL_CFLAGS}"
-.endif
-.endif
-.else
-LIB_DEPENDS+=	crypto.2:${PORTSDIR}/security/openssl
-OPENSSLBASE?=	${LOCALBASE}
-OPENSSLDIR?=	${OPENSSLBASE}/openssl
-.endif
-OPENSSLLIB=		${OPENSSLBASE}/lib
-OPENSSLINC=		${OPENSSLBASE}/include
-MAKE_ENV+=		OPENSSLLIB=${OPENSSLLIB} OPENSSLINC=${OPENSSLINC} \
-				OPENSSLBASE=${OPENSSLBASE} OPENSSLDIR=${OPENSSLDIR}
+.include "${PORTSDIR}/security/Makefile.ssl"
 .endif
 
 .if defined(EMACS_PORT_NAME)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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