summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vincent <freesilicon@gmail.com>2017-01-23 14:59:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-10 10:15:45 +0000
commit991620f3962a9917fa99abb5582f4b72ebd42a3d (patch)
tree799a84c51d1d8435048084a4b9b4286c531d49be
parent5c024d71f9413b81ee1707dbc41f0721f8f27bdb (diff)
downloadopenembedded-core-991620f3962a9917fa99abb5582f4b72ebd42a3d.tar.gz
openembedded-core-991620f3962a9917fa99abb5582f4b72ebd42a3d.tar.bz2
openembedded-core-991620f3962a9917fa99abb5582f4b72ebd42a3d.zip
openssl: Fix symlink creation
Symlinking the openssl configuration file at install time results in errors when overriding it using an external package which also provides openssl-conf. This should be done as a postinstall task for such packages. Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-connectivity/openssl/openssl.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index 0b7991d1fd..9afa5bd567 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -201,7 +201,6 @@ do_install () {
${D}${sysconfdir}/ssl/
ln -sf ${sysconfdir}/ssl/certs ${D}${libdir}/ssl/certs
ln -sf ${sysconfdir}/ssl/private ${D}${libdir}/ssl/private
- ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${libdir}/ssl/openssl.cnf
}
do_install_ptest () {
@@ -245,4 +244,16 @@ do_install_append_class-native() {
OPENSSL_ENGINES=${libdir}/ssl/engines
}
+pkg_postinst_openssl-conf () {
+#!/bin/sh
+if [ -e $D${libdir}/ssl/openssl.cnf ]; then
+ rm -f $D${libdir}/ssl/openssl.cnf
+fi
+
+# If openssl-conf is installed before openssl, we must ensure that the symlink
+# destination exists
+mkdir -p $D${libdir}/ssl/
+ln -s ${sysconfdir}/ssl/openssl.cnf $D${libdir}/ssl/openssl.cnf
+}
+
BBCLASSEXTEND = "native nativesdk"