Bug 14083 - [openssl-bin] missing runtime dependency to perl due to c_rehash
Summary: [openssl-bin] missing runtime dependency to perl due to c_rehash
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium+ minor
Target Milestone: 3.3 M1
Assignee: Federico
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-10-10 22:47 UTC by Federico
Modified: 2020-11-25 04:56 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Federico 2020-10-10 22:47:54 UTC
openssl-bin does not depend at runtime with perl:

RDEPENDS_${PN}-bin += "openssl-conf"

(just the ptest do), but it contains a perl script inside, namely c_rehash:

https://github.com/openssl/openssl/blob/master/tools/c_rehash.in

I believe it should either RDEPEND on perl as well, or c_rehash not be shipped or if we don't want to introduce this heavy dependency we could be split c_rehash in a separate package.
Comment 1 Richard Purdie 2020-10-11 10:06:51 UTC
Looks like rehash has had a chequered history, there was a shell version for a while:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=15f2cefac48f0e1d8f0e921b858df2355da5bbcd

We should perhaps move rehash back to ${PN}-misc and add the perl dependency there? Could you send a patch please to do that?
Comment 2 Federico 2020-10-15 20:35:53 UTC
Thanks for the pointers Richard! And sorry for the late response was waiting (still indeed ;-) ) for the git access after requesting as per docs.

In the meantime here below is the patch that should fix it (tested on my system successfully):




openssl: Add c_rehash to misc package and add perl runtime dependency
c_rehash implemented in perl is back (in history was moved to shell for
some time), so handle it inside the -misc package so just that one will
carry the heavy runtime dependency on perl

Signed-off-by: Federico Pellegrin <fede@evolware.org>

diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1g.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1g.bb
index 815955837b..66d8851426 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.1.1g.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.1.1g.bb
@@ -195,13 +195,14 @@ FILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf \
                       ${libdir}/ssl-1.1/openssl.cnf* \
                       "
 FILES_${PN}-engines = "${libdir}/engines-1.1"
-FILES_${PN}-misc = "${libdir}/ssl-1.1/misc"
+FILES_${PN}-misc = "${libdir}/ssl-1.1/misc ${bindir}/c_rehash"
 FILES_${PN} =+ "${libdir}/ssl-1.1/*"
 FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
 
 CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf"
 
 RRECOMMENDS_libcrypto += "openssl-conf"
+RDEPENDS_${PN}-misc = "perl"
 RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash"
 
 RDEPENDS_${PN}-bin += "openssl-conf"
Comment 3 Federico 2020-10-20 20:25:47 UTC
Created fix in https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=fedepell/bug14083 and posted to mailing list (hopefully the right one) the pull request.
Comment 4 Federico 2020-11-08 21:32:19 UTC
Just pinging, wondering if I didn't follow the right procedure to submit a PR (created in git branch, sent request in mailing list, added here a comment and so on) or just in queue to be processed.

Thanks!
F.