Re: Is it possibly to detect which OpenSSL is used for a port?
On 2015-03-20 14:49, Naram Qashat wrote: I've looked at bsd.openssl.mk and from what it says, those WITH_OPENSSL_* knobs are use-set, not port-set. So that doesn't help me. I'm not sure what you read, but lines 5 through 10 of ports/Mk/bsd.openssl.mk are: # Use of 'USE_OPENSSL=yes' includes this Makefile after bsd.ports.pre.mk # # the user/port can now set this options in the makefiles. # # WITH_OPENSSL_BASE=yes - Use the version in the base system. # WITH_OPENSSL_PORT=yes - Use the OpenSSL port, even if base is up to date I can confirm that setting or testing those variables is how you modify the OpenSSL linking behaviour of a port. There's currently 51 ports that do so. Off hand, an example is www/nginx-devel. It can't use OpenSSL 0.9.8 if you enable SPDY, so it sets WITH_OPENSSL_PORT=yes if OSVERSION 128. On 2015-03-20 11:02, Naram Qashat wrote: This isn't quite what I'm looking for. I want to be able to tell within a port's Makefile if the user wanted the base or ports OpenSSL to be used. I've been trying to port TDE to FreeBSD, and tdelibs uses pkg-config to check for OpenSSL. This would work if the only form of OpenSSL was in ports, but the base OpenSSL doesn't have a pkg-config file to use, so I need to know which is going to be used so I can determine when this pkg-config check can be removed. `grep WITH_OPENSSL_ Makefile` If the port expresses an opinion about which OpenSSL to use, it has to use WITH_OPENSSL_PORT or WITH_OPENSSL_BASE. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Is it possibly to detect which OpenSSL is used for a port?
On 21/03/2015 04:32, Naram Qashat wrote: This isn't quite what I'm looking for. I want to be able to tell within a port's Makefile if the user wanted the base or ports OpenSSL to be used. I've been trying to port TDE to FreeBSD, and tdelibs uses pkg-config to check for OpenSSL. This would work if the only form of OpenSSL was in ports, but the base OpenSSL doesn't have a pkg-config file to use, so I need to know which is going to be used so I can determine when this pkg-config check can be removed. I created a new port devel/godot not long ago, it used pkg-config to find openssl so I set it to use openssl port as it was a quick easy fix till I got around to finding a better solution. I was then offered a patch to fix this, which removed a test whether pkg config openssl failed and changed 'pkg-config openssl --cflags --libs' to 'echo -lssl -lcrypto' https://svnweb.freebsd.org/ports/head/devel/godot/files/patch-platform_x11_detect.py?r1=377975r2=380508 Having USE_OPENSSL=yes in your Makefile leads to LDFLAGS getting -rpath set to the location of the ssl libs. Therefore adding -lssl -lcrypto instead of the pkg-config response leads to finding the ssl libs based on the ssl option set at build time. Worst case you may need to re-order the LDFLAGS so that other -L/path entries are placed after the ssl search paths. If you still need tests then try testing ${OPENSSLBASE} == '/usr' # The makefile sets this variables: # OPENSSLBASE - /usr or ${LOCALBASE} # OPENSSLDIR- path to openssl # OPENSSLLIB- path to the libs # OPENSSLINC- path to the matching includes # OPENSSLRPATH - rpath for dynamic linker -- FreeBSD - the place to B...Software Developing Shane Ambler ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Is it possibly to detect which OpenSSL is used for a port?
This isn't quite what I'm looking for. I want to be able to tell within a port's Makefile if the user wanted the base or ports OpenSSL to be used. I've been trying to port TDE to FreeBSD, and tdelibs uses pkg-config to check for OpenSSL. This would work if the only form of OpenSSL was in ports, but the base OpenSSL doesn't have a pkg-config file to use, so I need to know which is going to be used so I can determine when this pkg-config check can be removed. Naram Qashat schrieb:, So, I know that WITH_OPENSSL_BASE=yes or WITH_OPENSSL_PORT=yes can be set by a user to say they specifically want either the base or the ports version of OpenSSL. But is there a way to determine within a port which OpenSSL is being used, either base or ports? Should I check if OPENSSLBASE is set to /usr? Is there some other (or better) way to do it? You can check the shared binaries with ldd. $ ldd /usr/local/libexec/dovecot/imap-login /usr/local/libexec/dovecot/imap-login: libssl.so.6 = /usr/lib/libssl.so.6 (0x33cb7000) libcrypto.so.6 = /lib/libcrypto.so.6 (0x33d04000) librt.so.1 = /usr/lib/librt.so.1 (0x33e66000) libc.so.7 = /lib/libc.so.7 (0x33e6b000) We look for libssl $ ldd /usr/local/libexec/dovecot/imap-login | grep libssl.so libssl.so.6 = /usr/lib/libssl.so.6 (0x33cb7000) This dovecot was build with the openssl-port. $ ldd /usr/local/bin/stunnel | grep libssl.so libssl.so.6 = /usr/lib/libssl.so.6 (0x33cab000) This stunnel was build with OpenSSL from base. kind regards Dirk - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany - [dirk.me...@dinoex.sub.org],[dirk.me...@guug.de],[din...@freebsd.org] ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Is it possibly to detect which OpenSSL is used for a port?
On 2015-03-20 11:02, Naram Qashat wrote: This isn't quite what I'm looking for. I want to be able to tell within a port's Makefile if the user wanted the base or ports OpenSSL to be used. I've been trying to port TDE to FreeBSD, and tdelibs uses pkg-config to check for OpenSSL. This would work if the only form of OpenSSL was in ports, but the base OpenSSL doesn't have a pkg-config file to use, so I need to know which is going to be used so I can determine when this pkg-config check can be removed. `grep WITH_OPENSSL_ Makefile` If the port expresses an opinion about which OpenSSL to use, it has to use WITH_OPENSSL_PORT or WITH_OPENSSL_BASE. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Is it possibly to detect which OpenSSL is used for a port?
On 2015-03-20 09:51, Dirk Meyer wrote: We look for libssl $ ldd /usr/local/libexec/dovecot/imap-login | grep libssl.so libssl.so.6 = /usr/lib/libssl.so.6 (0x33cb7000) This dovecot was build with the openssl-port. That output shows it's linked to the in-base OpenSSL. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: Is it possibly to detect which OpenSSL is used for a port?
I've looked at bsd.openssl.mk and from what it says, those WITH_OPENSSL_* knobs are use-set, not port-set. So that doesn't help me. On 2015-03-20 11:02, Naram Qashat wrote: This isn't quite what I'm looking for. I want to be able to tell within a port's Makefile if the user wanted the base or ports OpenSSL to be used. I've been trying to port TDE to FreeBSD, and tdelibs uses pkg-config to check for OpenSSL. This would work if the only form of OpenSSL was in ports, but the base OpenSSL doesn't have a pkg-config file to use, so I need to know which is going to be used so I can determine when this pkg-config check can be removed. `grep WITH_OPENSSL_ Makefile` If the port expresses an opinion about which OpenSSL to use, it has to use WITH_OPENSSL_PORT or WITH_OPENSSL_BASE. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org