[4/6] package/libopenssl: use `no-apps' configuration option

Message ID 20240621161049.4085310-4-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [1/6] package/libopenssl: use $(RM) instead of rm
Related show

Commit Message

Dario Binacchi June 21, 2024, 4:10 p.m. UTC
With version 3.2.0 of OpenSSL, the "no-apps" configuration option was
added, which does not build apps, e.g. the openssl program. This is
handy for minimization. This option also disables tests.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 package/libopenssl/libopenssl.mk | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Peter Korsgaard July 8, 2024, 6:53 a.m. UTC | #1
>>>>> "Dario" == Dario Binacchi <dario.binacchi@amarulasolutions.com> writes:

 > With version 3.2.0 of OpenSSL, the "no-apps" configuration option was
 > added, which does not build apps, e.g. the openssl program. This is
 > handy for minimization. This option also disables tests.

 > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Committed to 2024.02.x and 2024.05.x, thanks.

Patch

diff --git a/package/libopenssl/libopenssl.mk b/package/libopenssl/libopenssl.mk
index ed36fb593dde..fe472e2c7a19 100644
--- a/package/libopenssl/libopenssl.mk
+++ b/package/libopenssl/libopenssl.mk
@@ -84,6 +84,7 @@  define LIBOPENSSL_CONFIGURE_CMDS
 			no-fuzz-libfuzzer \
 			no-fuzz-afl \
 			no-afalgeng \
+			$(if $(BR2_PACKAGE_LIBOPENSSL_BIN),,no-apps) \
 			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA),,no-chacha) \
 			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2),,no-rc2) \
 			$(if $(BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4),,no-rc4) \
@@ -156,14 +157,6 @@  endef
 LIBOPENSSL_POST_INSTALL_TARGET_HOOKS += LIBOPENSSL_REMOVE_PERL_SCRIPTS
 endif
 
-ifeq ($(BR2_PACKAGE_LIBOPENSSL_BIN),)
-define LIBOPENSSL_REMOVE_BIN
-	$(RM) -f $(TARGET_DIR)/usr/bin/openssl
-	$(RM) -f $(TARGET_DIR)/etc/ssl/misc/{CA.*,c_*}
-endef
-LIBOPENSSL_POST_INSTALL_TARGET_HOOKS += LIBOPENSSL_REMOVE_BIN
-endif
-
 ifeq ($(BR2_PACKAGE_LIBOPENSSL_ENGINES),)
 define LIBOPENSSL_REMOVE_LIBOPENSSL_ENGINES
 	$(RM) -rf $(TARGET_DIR)/usr/lib/engines-3