From 213f482d30d9c91b52d8ec3b20fa313d711cc3fd Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 28 Jul 2018 15:31:42 -0700 Subject: [PATCH] emailrelay: Update to 2.0 Signed-off-by: Rosen Penev --- mail/emailrelay/Makefile | 25 +++++------ mail/emailrelay/patches/010-openssl-1.1.patch | 43 +++++++++++++++++++ mail/emailrelay/patches/010-ssl3-fix.patch | 13 ------ 3 files changed, 56 insertions(+), 25 deletions(-) create mode 100644 mail/emailrelay/patches/010-openssl-1.1.patch delete mode 100644 mail/emailrelay/patches/010-ssl3-fix.patch diff --git a/mail/emailrelay/Makefile b/mail/emailrelay/Makefile index b9b595fe4..b85917173 100644 --- a/mail/emailrelay/Makefile +++ b/mail/emailrelay/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=emailrelay -PKG_VERSION:=1.9 -PKG_RELEASE:=5 +PKG_VERSION:=2.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION) -PKG_HASH:=869a3e2d053237d7f63784acc25e748af2dbf2d9b9c5c48e4a5269d4e4b5bda0 +PKG_HASH:=0b3a98edfdc8deaf2b3d14e2d2a7fa8402f6703d83ac7458653994124de6a587 PKG_MAINTAINER:=Federico Di Marco PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) @@ -74,22 +74,24 @@ endef CONFIGURE_ARGS += \ - --with-pam=no \ - --enable-testing=no - -CONFIGURE_VARS += \ - CXXFLAGS="$$$$CXXFLAGS -fno-rtti" - + --without-doxygen \ + --without-man2html \ + --without-mbedtls \ + --without-pam \ + --disable-bsd \ + --disable-gui \ + --disable-mac \ + --disable-testing \ + --disable-windows ifeq ($(CONFIG_EMAILRELAY_SSL),y) CONFIGURE_ARGS += \ --with-openssl else CONFIGURE_ARGS += \ - --with-openssl=no + --without-openssl endif - ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y) CONFIGURE_ARGS += \ --enable-debug=yes @@ -105,7 +107,6 @@ define Package/emailrelay/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-poke $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/ diff --git a/mail/emailrelay/patches/010-openssl-1.1.patch b/mail/emailrelay/patches/010-openssl-1.1.patch new file mode 100644 index 000000000..fb745e59e --- /dev/null +++ b/mail/emailrelay/patches/010-openssl-1.1.patch @@ -0,0 +1,43 @@ +diff --git a/src/gssl/gssl_openssl.cpp b/src/gssl/gssl_openssl.cpp +index 0e9b73b..49927db 100644 +--- a/src/gssl/gssl_openssl.cpp ++++ b/src/gssl/gssl_openssl.cpp +@@ -52,10 +52,14 @@ GSsl::OpenSSL::LibraryImp::LibraryImp( G::StringArray & library_config , Library + m_verbose(verbose) , + m_config(library_config) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + SSL_load_error_strings() ; + SSL_library_init() ; +- int rc = RAND_status() ; G_IGNORE_VARIABLE(rc) ; + OpenSSL_add_all_digests() ; ++#else ++ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL) ; ++#endif ++ int rc = RAND_status() ; G_IGNORE_VARIABLE(rc) ; + + // allocate a slot for a pointer from SSL to ProtocolImp + m_index = SSL_get_ex_new_index( 0 , nullptr , nullptr , nullptr , nullptr ) ; +@@ -73,15 +77,21 @@ GSsl::OpenSSL::LibraryImp::~LibraryImp() + + void GSsl::OpenSSL::LibraryImp::cleanup() + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + // ffs... + ERR_free_strings() ; + RAND_cleanup() ; +- CRYPTO_cleanup_all_ex_data(); ++ CRYPTO_cleanup_all_ex_data() ; ++#endif + } + + std::string GSsl::OpenSSL::LibraryImp::sid() + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + return G::Str::printable( SSLeay_version(SSLEAY_VERSION) ) ; ++#else ++ return G::Str::printable( OpenSSL_version(OPENSSL_VERSION) ) ; ++#endif + } + + std::string GSsl::OpenSSL::LibraryImp::id() const diff --git a/mail/emailrelay/patches/010-ssl3-fix.patch b/mail/emailrelay/patches/010-ssl3-fix.patch deleted file mode 100644 index d0e82f518..000000000 --- a/mail/emailrelay/patches/010-ssl3-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/gssl/gssl_openssl.cpp -+++ b/src/gssl/gssl_openssl.cpp -@@ -292,8 +292,10 @@ GSsl::Context::Context( const std::strin - { - if( (flags&3U) == 2U ) - m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ; -+#ifdef SSL3_SUPPORT - else if( (flags&3U) == 3U ) - m_ssl_ctx = SSL_CTX_new(SSLv3_method()) ; -+#endif - else - m_ssl_ctx = SSL_CTX_new(TLSv1_method()) ; -