<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 23 January 2017 at 15:59, David Vincent <span dir="ltr">&lt;<a href="mailto:freesilicon@gmail.com" target="_blank">freesilicon@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Symlinking the openssl configuration file at install time results in<br>
errors when overriding it using an external package which also provides<br>
openssl-conf. This should be done as a postinstall task for such<br>
packages.<br></blockquote><div><br></div><div>This apparently breaks key generation with openssl-native because the file doesn&#39;t exist. </div><div><br></div><div>I can fix it by adding one more complication to the recipe (will send a patch) but I don&#39;t think the current solution is all that great: I&#39;ve been looking at this patch for a while now and still don&#39;t really understand why it is needed and how these different packages interact. I&#39;m sure it makes sense when you look at the other recipe but ... isn&#39;t it a bad sign that that context seems to be needed?</div><div><br></div><div>Jussi</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Signed-off-by: David Vincent &lt;<a href="mailto:freesilicon@gmail.com">freesilicon@gmail.com</a>&gt;<br>
---<br>
 meta/recipes-connectivity/<wbr>openssl/openssl.inc | 13 ++++++++++++-<br>
 1 file changed, 12 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/meta/recipes-connectivity/<wbr>openssl/openssl.inc b/meta/recipes-connectivity/<wbr>openssl/openssl.inc<br>
index 5cca019e1d..696b564cdd 100644<br>
--- a/meta/recipes-connectivity/<wbr>openssl/openssl.inc<br>
+++ b/meta/recipes-connectivity/<wbr>openssl/openssl.inc<br>
@@ -201,7 +201,6 @@ do_install () {<br>
           ${D}${sysconfdir}/ssl/<br>
        ln -sf ${sysconfdir}/ssl/certs ${D}${libdir}/ssl/certs<br>
        ln -sf ${sysconfdir}/ssl/private ${D}${libdir}/ssl/private<br>
-       ln -sf ${sysconfdir}/ssl/openssl.cnf ${D}${libdir}/ssl/openssl.cnf<br>
 }<br>
<br>
 do_install_ptest () {<br>
@@ -245,4 +244,16 @@ do_install_append_class-<wbr>native() {<br>
            OPENSSL_ENGINES=${libdir}/ssl/<wbr>engines<br>
 }<br>
<br>
+pkg_postinst_openssl-conf () {<br>
+#!/bin/sh<br>
+if [ -e $D${libdir}/ssl/openssl.cnf ]; then<br>
+       rm -f $D${libdir}/ssl/openssl.cnf<br>
+fi<br>
+<br>
+# If openssl-conf is installed before openssl, we must ensure that the symlink<br>
+# destination exists<br>
+mkdir -p $D${libdir}/ssl/<br>
+ln -s ${sysconfdir}/ssl/openssl.cnf $D${libdir}/ssl/openssl.cnf<br>
+}<br>
+<br>
 BBCLASSEXTEND = &quot;native nativesdk&quot;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.0<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br></div></div>