13/29: openssl: Fix symlink creation
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Why not use update-alternatives for this file?
That's what I'm using in openssl bbappend because we also use different provider for this file and it worked well .. until this change.
Quoted 63 lines · On Fri, Mar 10, 2017 at 11:16 AM, <[email protected]> wrote:
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.commit
991620f3962a9917fa99abb5582f4b72ebd42a3d
Author: David Vincent <[email protected]>
AuthorDate: Mon Jan 23 14:59:16 2017 +0100openssl: Fix symlink creation
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 <[email protected]>Signed-off-by Ross Burton <[email protected]>--- meta/recipes-connectivity/openssl/openssl.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)meta/recipes-connectivity/openssl/openssl.inc +7
-1@@ -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 thesymlink
meta/recipes-connectivity/openssl/openssl.inc +5
-1+# destination exists +mkdir -p $D${libdir}/ssl/ +ln -s ${sysconfdir}/ssl/openssl.cnf $D${libdir}/ssl/openssl.cnf +} + BBCLASSEXTEND = "native nativesdk" --To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Quoted 1 line · On samedi 11 mars 2017 21:50:23 CET Martin Jansa wrote:
Why not use update-alternatives for this file?
IMO, update-alternatives should not handle configuration files. I think that using it can “silently” apply a new configuration with higher priority and things will break in some odd ways. Using conflicting packages ensures that the applied configuration has been enforced at install time and the administrator knows what is doing. Again, it is just my personal taste...
Quoted 4 lines
That's what I'm using in openssl bbappend because we also use different provider for this file and it worked well .. until this change.
Sorry this change broke some builds, if I am the only one to use this configuration, feel free to revert this patch.
OTOH, I have also provided the same kind of patch for OpenSSH configuration (not yet applied), so tell me what would be the best way to handle configuration files in Yocto, I may have missed it in the documentation.
David