From 9980d766ac23d1fb0fd59ada87eef1485872b512 Mon Sep 17 00:00:00 2001 From: Val Kulkov Date: Tue, 20 Aug 2019 13:44:03 -0400 Subject: [PATCH] monit: update to the latest release Remove SSL patch that has been made obsolete by upstream updates. Update monit package to the latest release: v5.26.0. This release supports TLSv1.3 and fixes a few bugs and vulnerabilities. Signed-off-by: Val Kulkov --- admin/monit/Makefile | 6 +-- .../patches/001-fix-default-piddir.patch | 20 +++++++++- .../patches/010-openssl-thread-api.patch | 40 ------------------- 3 files changed, 22 insertions(+), 44 deletions(-) delete mode 100644 admin/monit/patches/010-openssl-thread-api.patch diff --git a/admin/monit/Makefile b/admin/monit/Makefile index 346b092a5..76cf8e5a0 100644 --- a/admin/monit/Makefile +++ b/admin/monit/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=monit -PKG_VERSION:=5.25.2 -PKG_RELEASE:=3 +PKG_VERSION:=5.26.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://mmonit.com/monit/dist -PKG_HASH:=aa0ce6361d1155e43e30a86dcff00b2003d434f221c360981ced830275abc64a +PKG_HASH:=87fc4568a3af9a2be89040efb169e3a2e47b262f99e78d5ddde99dd89f02f3c2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=AGPL-3.0 diff --git a/admin/monit/patches/001-fix-default-piddir.patch b/admin/monit/patches/001-fix-default-piddir.patch index f379b7770..571c432bb 100644 --- a/admin/monit/patches/001-fix-default-piddir.patch +++ b/admin/monit/patches/001-fix-default-piddir.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -14390,14 +14390,7 @@ fi +@@ -14436,14 +14436,7 @@ fi # Find the right directory to put the root-mode PID file in { $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5 $as_echo_n "checking pid file location... " >&6; } @@ -16,3 +16,21 @@ cat >>confdefs.h <<_ACEOF +--- a/configure.ac ++++ b/configure.ac +@@ -501,14 +501,7 @@ fi + + # Find the right directory to put the root-mode PID file in + AC_MSG_CHECKING([pid file location]) +-if test -d "/run" +-then +- piddir="/run" +-elif test -d "/var/run"; then +- piddir="/var/run" +-elif test -d "/etc"; then +- piddir="/etc" +-fi ++piddir="/var/run" + + AC_DEFINE_UNQUOTED([PIDDIR], "$piddir", + [Define to the pid storage directory.]) diff --git a/admin/monit/patches/010-openssl-thread-api.patch b/admin/monit/patches/010-openssl-thread-api.patch deleted file mode 100644 index d67b6cc63..000000000 --- a/admin/monit/patches/010-openssl-thread-api.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/src/ssl/Ssl.c -+++ b/src/ssl/Ssl.c -@@ -302,8 +302,8 @@ static boolean_t _retry(int socket, int - - - #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) --static unsigned long _threadID() { -- return (unsigned long)Thread_self(); -+static void _threadID(CRYPTO_THREADID *id) { -+ CRYPTO_THREADID_set_numeric(id, (unsigned long)Thread_self()); - } - - -@@ -482,7 +482,7 @@ void Ssl_start() { - instanceMutexTable = CALLOC(locks, sizeof(Mutex_T)); - for (int i = 0; i < locks; i++) - Mutex_init(instanceMutexTable[i]); -- CRYPTO_set_id_callback(_threadID); -+ CRYPTO_THREADID_set_callback(_threadID); - CRYPTO_set_locking_callback(_mutexLock); - #endif - if (File_exist(URANDOM_DEVICE)) -@@ -496,7 +496,7 @@ void Ssl_start() { - - void Ssl_stop() { - #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) -- CRYPTO_set_id_callback(NULL); -+ CRYPTO_THREADID_set_callback(NULL); - CRYPTO_set_locking_callback(NULL); - for (int i = 0; i < CRYPTO_num_locks(); i++) - Mutex_destroy(instanceMutexTable[i]); -@@ -510,7 +510,7 @@ void Ssl_stop() { - - void Ssl_threadCleanup() { - #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) -- ERR_remove_state(0); -+ ERR_remove_thread_state(NULL); - #endif - } -