From: Ovidiu Panait <ovidiu.pan...@windriver.com> When SDK is not installed in the default location, openssl will not be able to find the the openssl.cnf config file:
"WARNING: can't open config file: XXXX/usr/lib/ssl/openssl.cnf" To fix this, we need to provide the environment variable $OPENSSL_CONF pointing to the correct config file location. Signed-off-by: Ovidiu Panait <ovidiu.pan...@windriver.com> Signed-off-by: Yi Zhao <yi.z...@windriver.com> --- .../openssl/openssl/environment.d-openssl.sh | 1 + meta/recipes-connectivity/openssl/openssl10.inc | 7 +++++++ meta/recipes-connectivity/openssl/openssl_1.0.2o.bb | 5 +++++ meta/recipes-connectivity/openssl/openssl_1.1.0h.bb | 11 +++++++++++ 4 files changed, 24 insertions(+) create mode 100644 meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh diff --git a/meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh b/meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh new file mode 100644 index 0000000..b9cc24a --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh @@ -0,0 +1 @@ +export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf" diff --git a/meta/recipes-connectivity/openssl/openssl10.inc b/meta/recipes-connectivity/openssl/openssl10.inc index 645d64e..9f23758 100644 --- a/meta/recipes-connectivity/openssl/openssl10.inc +++ b/meta/recipes-connectivity/openssl/openssl10.inc @@ -281,5 +281,12 @@ do_install_append_class-native() { OPENSSL_ENGINES=${libdir}/ssl/engines } +do_install_append_class-nativesdk() { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh +} + +FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" + BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb index 413ebf3..7cae553 100644 --- a/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb +++ b/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb @@ -47,6 +47,11 @@ SRC_URI_append_class-target = "\ file://reproducible-cflags.patch \ file://reproducible-mkbuildinf.patch \ " + +SRC_URI_append_class-nativesdk = " \ + file://environment.d-openssl.sh \ + " + SRC_URI[md5sum] = "44279b8557c3247cbe324e2322ecd114" SRC_URI[sha256sum] = "ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d" diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb index 94b75eb..29f83a3 100644 --- a/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb +++ b/meta/recipes-connectivity/openssl/openssl_1.1.0h.bb @@ -19,6 +19,10 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ file://0001-Take-linking-flags-from-LDFLAGS-env-var.patch \ " +SRC_URI_append_class-nativesdk = " \ + file://environment.d-openssl.sh \ + " + S = "${WORKDIR}/openssl-${PV}" inherit lib_package multilib_header ptest @@ -142,6 +146,13 @@ do_install_append_class-native () { sed -i -e 's,/etc/openssl,${sysconfdir}/ssl,g' ${D}${bindir}/c_rehash } +do_install_append_class-nativesdk() { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d + install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh +} + +FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" + do_install_ptest() { cp -r * ${D}${PTEST_PATH} -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core