Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] openssl: add a vardeps for configure on libdir
@ 2015-03-25 16:28 Mark Asselstine
  2015-03-25 17:34 ` Christopher Larson
  2015-03-25 20:44 ` Burton, Ross
  0 siblings, 2 replies; 8+ messages in thread
From: Mark Asselstine @ 2015-03-25 16:28 UTC (permalink / raw)
  To: openembedded-core

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@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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-03-26  2:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 16:28 [PATCH] openssl: add a vardeps for configure on libdir Mark Asselstine
2015-03-25 17:34 ` Christopher Larson
2015-03-25 19:28   ` Mark Asselstine
2015-03-25 20:35     ` Christopher Larson
2015-03-26  0:33       ` Mark Asselstine
2015-03-25 20:44 ` Burton, Ross
2015-03-26  0:37   ` Mark Asselstine
2015-03-26  2:07     ` Mark Asselstine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox