[OE-core] [PATCH] openssl: add a vardeps for configure on libdir

Mark Asselstine mark.asselstine at windriver.com
Wed Mar 25 16:28:34 UTC 2015


Configure makes use of 'libdir' to set 'openssldir'. Unfortunately
openssl treats this as a hardcoded absolute path. The value passed in
as openssl becomes part of header files and baked in to executables.

For target builds libdir is not something that changes and for -native
builds unless you move your builds around you will see no issue with
the current implementation. If you do update libdir or if you move
your build or reuse sstate by copying it to a new build you will start
to see errors. These will be seen when you use the 'openssl' tool and
look like the following:

WARNING: can't open config file: /home/build/bitbake_build/tmp/
                        sysroots/x86_64-linux/usr/lib/ssl/openssl.cnf

Knowing that openssl treats 'openssldir' as a hard coded absolute path
and that we set this in configure we must add a 'vardeps' to ensure
that things get re-configured and built whenever 'libdir' is
modified. This will fix both target and -native builds per the
usecases described above. If 'libdir' is unchanged things continue to
function as they did before and a re-configure will not happen.

Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
---
 meta/recipes-connectivity/openssl/openssl.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index d337017..105b3fa 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -54,6 +54,8 @@ do_configure_prepend_darwin () {
 	sed -i -e '/version-script=openssl\.ld/d' Configure
 }
 
+do_configure[vardeps] += "${libdir}"
+
 do_configure () {
 	cd util
 	perl perlpath.pl ${STAGING_BINDIR_NATIVE}
-- 
2.0.1




More information about the Openembedded-core mailing list