All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vincent <freesilicon@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] openssl: Fix symlink creation
Date: Mon, 23 Jan 2017 14:59:16 +0100	[thread overview]
Message-ID: <20170123135916.4618-1-freesilicon@gmail.com> (raw)

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>
---
 meta/recipes-connectivity/openssl/openssl.inc | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index 5cca019e1d..696b564cdd 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"
-- 
2.11.0



             reply	other threads:[~2017-01-23 14:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 13:59 David Vincent [this message]
2017-04-05  7:30 ` [PATCH] openssl: Fix symlink creation Jussi Kukkonen
2017-04-06  9:23   ` David Vincent
2017-04-06 10:55     ` Jussi Kukkonen
2017-04-06 13:03       ` Martin Jansa
2017-04-07 12:27         ` David Vincent
2017-04-07 12:52           ` Jussi Kukkonen
2017-04-07 13:09           ` Martin Jansa
     [not found] ` <CAHiDW_EQL63FQt7t8fETRZkx0sVjNs-as5Y+qexN48CtCUS5MQ@mail.gmail.com>
2017-04-19  8:27   ` David Vincent
2017-04-19 10:21     ` Alexander Kanavin
2017-04-19 11:53       ` David Vincent
2017-04-19 11:57         ` Alexander Kanavin
2017-04-19 12:56           ` Alexander Kanavin
2017-04-19 13:03           ` David Vincent
2017-04-20 12:37             ` Alexander Kanavin
2017-04-20 12:56               ` Mark Hatle
2017-04-20 13:04               ` Martin Jansa
2017-04-21  7:55                 ` David Vincent
  -- strict thread matches above, loose matches on Subject: below --
2017-03-06  8:49 David Vincent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170123135916.4618-1-freesilicon@gmail.com \
    --to=freesilicon@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.