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

David Vincent freesilicon at gmail.com
Wed Apr 19 08:27:50 UTC 2017


On jeudi 13 avril 2017 10:05:29 CEST Jussi Kukkonen wrote:
> Hi David,
> 
> Just a heads-up: I will propose a revert of this patch this week unless
> better ideas come up in the mean time.
Sorry, I've been away last week so didn't have time to respond to your 
previous mails. I've seen the revert proposal but I think I could provide some 
heads-up to find a better solution to deal with my problem after the revert.
> 
> I get that you have an actual problem you're solving but I don't think
> postinstall is a correct solution. I'm sorry I don't have an alternative
> solution ready for you: if you share your other configuration recipe and
> explain how you use the two, maybe we can figure something out.
This is my other recipe that installs the alternative configuration:

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://openssl-hwengine.cnf"

do_install_append () {
    install -m 0644 ${WORKDIR}/openssl-hwengine.cnf ${D}${sysconfdir}/ssl/
}

PACKAGES =+ "${PN}-conf-hwengine"

FILES_${PN}-conf-hwengine = "${sysconfdir}/ssl/openssl-hwengine.cnf"
CONFFILES_${PN}-conf-hwengine = "${sysconfdir}/ssl/openssl-hwengine.cnf"
RPROVIDES_${PN}-conf-hwengine += "${PN}-conf"
RCONFLICTS_${PN}-conf-hwengine += "${PN}-conf"
RREPLACES_${PN}-conf-hwengine += "${PN}-conf"
RDEPENDS_${PN}-conf-hwengine = "libp11-engine"
RDEPENDS_${PN}-conf-hwengine_class-native = ""
RDEPENDS_${PN}-conf-hwengine_class-nativesdk = ""

pkg_postinst_${PN}-conf-hwengine () {
#!/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-hwengine.cnf $D${libdir}/ssl/openssl.cnf
}


The package is then chosen during image creation based on some 
MACHINE_FEATURES, i.e. if the machine provides a crypto accelerator to use 
instead of relying on software implementations. I hope that these new details 
will help you understand what I was trying to achieve.

> 
> Jussi
> 

David



More information about the Openembedded-core mailing list