From 0523edc0c63edd034eca83bf7c43327056ab7d3d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 28 May 2022 15:30:53 +0200 Subject: [PATCH] - openssl: bump version to 1.1.1o; rework build --- package/openssl/openssl.mk | 61 +++++++++++-------- .../patches/0000-Configure-align-O-flag.patch | 13 ---- 2 files changed, 34 insertions(+), 40 deletions(-) delete mode 100644 package/openssl/patches/0000-Configure-align-O-flag.patch diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk index b1f29151..84b0adcb 100644 --- a/package/openssl/openssl.mk +++ b/package/openssl/openssl.mk @@ -4,14 +4,11 @@ # ################################################################################ -OPENSSL_VERSION = 1.0.2u +OPENSSL_VERSION = 1.1.1o OPENSSL_DIR = openssl-$(OPENSSL_VERSION) OPENSSL_SOURCE = openssl-$(OPENSSL_VERSION).tar.gz OPENSSL_SITE = https://www.openssl.org/source -$(DL_DIR)/$(OPENSSL_SOURCE): - $(download) $(OPENSSL_SITE)/$(OPENSSL_SOURCE) - ifeq ($(TARGET_ARCH),arm) OPENSSL_TARGET_ARCH = linux-armv4 else ifeq ($(TARGET_ARCH),mips) @@ -30,7 +27,6 @@ OPENSSL_CONF_OPTS += \ no-hw \ no-engine \ no-sse2 \ - no-perlasm \ no-tests \ no-fuzz-afl \ no-fuzz-libfuzzer @@ -41,30 +37,41 @@ OPENSSL_CONF_OPTS += \ $(TARGET_CFLAGS) \ $(TARGET_LDFLAGS) \ -openssl: $(DL_DIR)/$(OPENSSL_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - ./Configure \ - $($(PKG)_CONF_OPTS); \ +define OPENSSL_TARGET_CLEANUP + $(TARGET_RM) $(TARGET_libdir)/engines-1.1 + $(TARGET_RM) $(TARGET_bindir)/c_rehash + $(TARGET_RM) $(TARGET_sysconfdir)/ssl/ct_log_list.cnf* + $(TARGET_RM) $(TARGET_sysconfdir)/ssl/misc/{CA.pl,tsget*} + $(TARGET_RM) $(TARGET_sysconfdir)/ssl/openssl.cnf.dist +endef +OPENSSL_TARGET_FINALIZE_HOOKS += OPENSSL_TARGET_CLEANUP + +ifeq ($(BOXTYPE),coolstream) +define OPENSSL_TARGET_CLEANUP_COOLSTREAM + $(TARGET_RM) $(TARGET_sysconfdir)/ssl/misc/{CA.*,c_*} + $(TARGET_RM) $(TARGET_sysconfdir)/ssl/openssl.cnf + $(TARGET_RM) $(TARGET_bindir)/openssl +endef +OPENSSL_TARGET_FINALIZE_HOOKS += OPENSSL_TARGET_CLEANUP_COOLSTREAM +endif + +OPENSSL_COMPATIBILITY_VERSIONS = 0.9.7 0.9.8 1.0.0 1.0.2 1.1.0 +define OPENSSL_COMPATIBILITY_LINKS + $(foreach v,$(OPENSSL_COMPATIBILITY_VERSIONS),\ + ln -sf libcrypto.so.1.1 $(TARGET_libdir)/libcrypto.so.$(v)$(sep)) + $(foreach v,$(OPENSSL_COMPATIBILITY_VERSIONS),\ + ln -sf libssl.so.1.1 $(TARGET_libdir)/libssl.so.$(v)$(sep)) +endef +OPENSSL_TARGET_FINALIZE_HOOKS += OPENSSL_COMPATIBILITY_LINKS + +openssl: | $(TARGET_DIR) + $(call PREPARE) + $(CHDIR)/$($(PKG)_DIR); \ + ./Configure $($(PKG)_CONF_OPTS); \ $(SED) 's| build_tests||' Makefile; \ $(SED) 's|^MANDIR=.*|MANDIR=$(REMOVE_mandir)|' Makefile; \ $(SED) 's|^HTMLDIR=.*|HTMLDIR=$(REMOVE_htmldir)|' Makefile; \ $(MAKE) depend; \ $(MAKE); \ - $(MAKE) install_sw INSTALL_PREFIX=$(TARGET_DIR) - $(TARGET_RM) $(TARGET_libdir)/engines - $(TARGET_RM) $(TARGET_bindir)/c_rehash - $(TARGET_RM) $(TARGET_sysconfdir)/ssl/misc/{CA.pl,tsget} -ifeq ($(BOXSERIES),$(filter $(BOXSERIES),hd1 hd2)) - $(TARGET_RM) $(TARGET_bindir)/openssl - $(TARGET_RM) $(TARGET_sysconfdir)/ssl/misc/{CA.*,c_*} -endif - chmod 0755 $(TARGET_libdir)/lib{crypto,ssl}.so.* - for version in 0.9.7 0.9.8 1.0.2; do \ - ln -sf libcrypto.so.1.0.0 $(TARGET_libdir)/libcrypto.so.$$version; \ - ln -sf libssl.so.1.0.0 $(TARGET_libdir)/libssl.so.$$version; \ - done - $(REMOVE)/$(PKG_DIR) - $(TOUCH) + $(MAKE) install_sw install_ssldirs DESTDIR=$(TARGET_DIR) + $(call TARGET_FOLLOWUP) diff --git a/package/openssl/patches/0000-Configure-align-O-flag.patch b/package/openssl/patches/0000-Configure-align-O-flag.patch deleted file mode 100644 index 70fe3697..00000000 --- a/package/openssl/patches/0000-Configure-align-O-flag.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Configure b/Configure -index 3846c91..1a52843 100755 ---- a/Configure -+++ b/Configure -@@ -404,7 +404,7 @@ my %table=( - # - # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8 - # --"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -+"linux-armv4", "gcc: -O2 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - "linux-aarch64","gcc: -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - # Configure script adds minimally required -march for assembly support, - # if no -march was specified at command line. mips32 and mips64 below