On 23 January 2017 at 15:59, David Vincent <freesili...@gmail.com> wrote:

> 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.
>

This apparently breaks key generation with openssl-native because the file
doesn't exist.

I can fix it by adding one more complication to the recipe (will send a
patch) but I don't think the current solution is all that great: I've been
looking at this patch for a while now and still don't really understand why
it is needed and how these different packages interact. I'm sure it makes
sense when you look at the other recipe but ... isn't it a bad sign that
that context seems to be needed?

Jussi


> Signed-off-by: David Vincent <freesili...@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
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to