diff options
| author | Ross Burton <ross.burton@arm.com> | 2024-07-18 15:48:28 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-07-19 17:51:00 +0100 |
| commit | 45c7150b918cb273ec1a03762db85ad6b3cdfd2a (patch) | |
| tree | d5cef7f57ec53cb60d6057f23c51c581c03b19bb /meta | |
| parent | aca8acceb87e568115da9696732e915d91da9652 (diff) | |
| download | poky-45c7150b918cb273ec1a03762db85ad6b3cdfd2a.tar.gz | |
openssl: strip the test suite
The test suite is huge because every test binary is statically linked to
libssl and/or libcrypto. This bloats the size of the -dbg package hugely,
so strip the test suite before packaging.
This reduces the size of openssl-dbg by 90% from ~1.2GB to ~120MB, and
reduces the size of the build tree from ~1.9GB to ~800MB.
(From OE-Core rev: 92f09a4269e45e09643a7e7aafd2811cfd47cb68)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl_3.3.1.bb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl_3.3.1.bb b/meta/recipes-connectivity/openssl/openssl_3.3.1.bb index f8f2254153..36d2f87c26 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.3.1.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.3.1.bb | |||
| @@ -146,6 +146,13 @@ do_configure () { | |||
| 146 | perl ${B}/configdata.pm --dump | 146 | perl ${B}/configdata.pm --dump |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | do_compile:append () { | ||
| 150 | # The test suite binaries are large and we don't need the debugging in them | ||
| 151 | if test -d ${B}/test; then | ||
| 152 | find ${B}/test -type f -executable -exec ${STRIP} {} \; | ||
| 153 | fi | ||
| 154 | } | ||
| 155 | |||
| 149 | do_install () { | 156 | do_install () { |
| 150 | oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install_sw install_ssldirs ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'install_docs', '', d)} | 157 | oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install_sw install_ssldirs ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'install_docs', '', d)} |
| 151 | 158 | ||
| @@ -252,6 +259,9 @@ RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash sed" | |||
| 252 | 259 | ||
| 253 | RDEPENDS:${PN}-bin += "openssl-conf" | 260 | RDEPENDS:${PN}-bin += "openssl-conf" |
| 254 | 261 | ||
| 262 | # The test suite is installed stripped | ||
| 263 | INSANE_SKIP:${PN} = "already-stripped" | ||
| 264 | |||
| 255 | BBCLASSEXTEND = "native nativesdk" | 265 | BBCLASSEXTEND = "native nativesdk" |
| 256 | 266 | ||
| 257 | CVE_PRODUCT = "openssl:openssl" | 267 | CVE_PRODUCT = "openssl:openssl" |
