summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2017-12-20 13:15:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-07 10:59:16 +0100
commitb3f148333515efdb746b78c57d62cfbf3321b21e (patch)
tree029a2e6c0c687e4e361e16e4b89a926d80b74484
parentd3e69fa2fef83015658aa5fa1442bab5a8c3edaa (diff)
downloadopenembedded-core-contrib-b3f148333515efdb746b78c57d62cfbf3321b21e.tar.gz
openembedded-core-contrib-b3f148333515efdb746b78c57d62cfbf3321b21e.tar.bz2
openembedded-core-contrib-b3f148333515efdb746b78c57d62cfbf3321b21e.zip
openssl-nativesdk: Fix "can't open config file" warning
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.panait@windriver.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-connectivity/openssl/openssl/environment.d-openssl.sh1
-rw-r--r--meta/recipes-connectivity/openssl/openssl10.inc7
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.0.2o.bb5
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.1.0h.bb11
4 files changed, 24 insertions, 0 deletions
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 0000000000..b9cc24a7ac
--- /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 995177d320..1f8834f2e8 100644
--- a/meta/recipes-connectivity/openssl/openssl10.inc
+++ b/meta/recipes-connectivity/openssl/openssl10.inc
@@ -285,5 +285,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 413ebf37f4..7cae553f35 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 94b75eb92a..29f83a31a2 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}