[OE-core] [PATCH] openssl: Fix symlink creation

Martin Jansa martin.jansa at gmail.com
Thu Apr 20 13:04:00 UTC 2017


On Thu, Apr 20, 2017 at 03:37:24PM +0300, Alexander Kanavin wrote:
> On 04/19/2017 04:03 PM, David Vincent wrote:
> > The problem is that I must be able to manage the configuration of a machine
> > without physical intervention and only via package upgrades. A new
> > configuration can be applied simply by incrementing the PR of a configuration
> > package.
> >
> > But maybe this is a use case only needed by me and I should manage it in my
> > own specific layer ?
> >
> > Now that I think of it, I have the same kind of problem for all machine
> > specific configurations. For now, I just replace the PACKAGE_ARCH in my BSP
> > layer with a machine specific one to indicate that a package contains a
> > configuration valid only for a specific machine. Maybe, in a future release, it
> > should be desirable to create -conf packages based on the CONFFILES variable ?
> > I don't know if it's a good idea, but maybe I could bring that up on the
> > architecture mailing list ?
> 
> By all means please do so. Yocto lacks a solution for configuration 
> management, and this was discussed some time ago, although I cannot 
> anymore find where it happened. Mark, do you remember?

I still haven't seen any argument why not use u-a like for any other
alternative files.

All you have to do is create openssl bbappend (this part might be
integrated into oe-core):

inherit update-alternatives
ALTERNATIVE_${PN} = "openssl-cnf"
ALTERNATIVE_LINK_NAME[openssl-cnf] = "${sysconfdir}/ssl/openssl.cnf"
ALTERNATIVE_PRIORITY[openssl-cnf] ?= "1"

And then in your recipe which provides alternative config add similar
fragment:

inherit update-alternatives
ALTERNATIVE_${PN} = "openssl-cnf"
ALTERNATIVE_LINK_NAME[openssl-cnf] = "${sysconfdir}/ssl/openssl.cnf"
ALTERNATIVE_PRIORITY[openssl-cnf] ?= "10"

And that's it. We're using this for last 4 years since:
https://github.com/openwebos/meta-webos/commit/b13980be3f28bf60582ec3f691e392db03942e21
and it worked fine until this oe-core change was merged (and I had to
undo it in the same bbappend).

Regards,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170420/de2b09c3/attachment-0002.sig>


More information about the Openembedded-core mailing list