Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Aug 2019 11:56:05 +0000 (UTC)
From:      "Danilo G. Baio" <dbaio@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r510263 - in head/net-mgmt/zabbix4-server: . files
Message-ID:  <201908301156.x7UBu5Lo080051@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dbaio
Date: Fri Aug 30 11:56:05 2019
New Revision: 510263
URL: https://svnweb.freebsd.org/changeset/ports/510263

Log:
  net-mgmt/zabbix4-*: Update to 4.0.12
  
  Include upstream patch to fix daemon termination.
  https://support.zabbix.com/browse/ZBX-16460 [1]
  
  Changelog:	https://www.zabbix.com/rn/rn4.0.12
  
  PR:		239746 [1]
  PR:		240194
  Reported by:	Christian Ullrich <chris@chrullrich.net> [1]
  Approved by:	Pakhom Golynga <pg@pakhom.spb.ru> (maintainer)

Added:
  head/net-mgmt/zabbix4-server/files/patch-ZBX-16460-fixed-Zabbix-daemon-termination-on-.patch   (contents, props changed)
Modified:
  head/net-mgmt/zabbix4-server/Makefile
  head/net-mgmt/zabbix4-server/distinfo
  head/net-mgmt/zabbix4-server/files/pkg-message.in
  head/net-mgmt/zabbix4-server/pkg-plist.frontend

Modified: head/net-mgmt/zabbix4-server/Makefile
==============================================================================
--- head/net-mgmt/zabbix4-server/Makefile	Fri Aug 30 11:55:37 2019	(r510262)
+++ head/net-mgmt/zabbix4-server/Makefile	Fri Aug 30 11:56:05 2019	(r510263)
@@ -2,8 +2,8 @@
 # $FreeBSD$
 
 PORTNAME=	zabbix4
-PORTVERSION=	4.0.11
-PORTREVISION?=	1
+PORTVERSION=	4.0.12
+PORTREVISION?=	0
 CATEGORIES=	net-mgmt
 MASTER_SITES=	SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
 PKGNAMESUFFIX?=	-server

Modified: head/net-mgmt/zabbix4-server/distinfo
==============================================================================
--- head/net-mgmt/zabbix4-server/distinfo	Fri Aug 30 11:55:37 2019	(r510262)
+++ head/net-mgmt/zabbix4-server/distinfo	Fri Aug 30 11:56:05 2019	(r510263)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1564495156
-SHA256 (zabbix-4.0.11.tar.gz) = b0af25c31c622d14cb7780db5941d76579b9f9a6ee449613d847b0b505628409
-SIZE (zabbix-4.0.11.tar.gz) = 17174772
+TIMESTAMP = 1567035208
+SHA256 (zabbix-4.0.12.tar.gz) = 5c5e728a6f2903e20aea5fdd67a14099630725eba7b1c6628f92fd0c3efd8bca
+SIZE (zabbix-4.0.12.tar.gz) = 17138671

Added: head/net-mgmt/zabbix4-server/files/patch-ZBX-16460-fixed-Zabbix-daemon-termination-on-.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/zabbix4-server/files/patch-ZBX-16460-fixed-Zabbix-daemon-termination-on-.patch	Fri Aug 30 11:56:05 2019	(r510263)
@@ -0,0 +1,212 @@
+From a62b1cfefc184b0c5b6d70e2d6a3de0284b31ffd Mon Sep 17 00:00:00 2001
+From: Vladislavs Sokurenko <vladislavs.sokurenko@zabbix.com>
+Date: Thu, 29 Aug 2019 17:02:29 +0300
+Subject: [PATCH 3/4] ...G...PS. [ZBX-16460] fixed Zabbix daemon termination on
+ FreeBSD
+
+* commit '7eb515175340160a502a58eacb719d6eaf522340':
+  ...G...PS. [ZBX-16460] fixed Zabbix daemon termination on FreeBSD
+  .......... [ZBX-16460] fixed Zabbix daemon exit on FreeBSD
+
+(cherry picked from commit 10aee49918fbf54655d4c479689c7f62a8a1b45d)
+(cherry picked from commit 890ef645e5fd678ececfeba1feb3144509d1cbd5)
+---
+ ChangeLog.d/bugfix/ZBX-16460           |  1 +
+ include/threads.h                      |  2 +-
+ src/libs/zbxcrypto/tls.c               | 18 +++++++++---------
+ src/libs/zbxlog/log.c                  |  2 +-
+ src/libs/zbxnix/fatal.c                |  2 +-
+ src/libs/zbxnix/sighandler.c           |  8 ++++----
+ src/libs/zbxsys/threads.c              |  2 +-
+ src/zabbix_get/zabbix_get.c            |  2 +-
+ src/zabbix_sender/zabbix_sender.c      |  2 +-
+ src/zabbix_server/poller/checks_snmp.c |  2 +-
+ 10 files changed, 21 insertions(+), 20 deletions(-)
+ create mode 100644 ChangeLog.d/bugfix/ZBX-16460
+
+diff --git ChangeLog.d/bugfix/ZBX-16460 ChangeLog.d/bugfix/ZBX-16460
+new file mode 100644
+index 0000000000..c40d5d5ac3
+--- /dev/null
++++ ChangeLog.d/bugfix/ZBX-16460
+@@ -0,0 +1 @@
++...G...PS. [ZBX-16460] fixed Zabbix daemon termination on FreeBSD (vso)
+diff --git include/threads.h include/threads.h
+index 2c8fef6196..c3b6d451ea 100644
+--- include/threads.h
++++ include/threads.h
+@@ -73,7 +73,7 @@
+ 	#define zbx_sleep(sec) sleep((sec))
+ 
+ 	#define zbx_thread_kill(h) kill(h, SIGUSR2)
+-	#define zbx_thread_kill_fatal(h) kill(h, SIGABRT)
++	#define zbx_thread_kill_fatal(h) kill(h, SIGHUP)
+ #endif	/* _WINDOWS */
+ 
+ typedef struct
+diff --git src/libs/zbxcrypto/tls.c src/libs/zbxcrypto/tls.c
+index eef77e6575..7bf9515ad4 100644
+--- src/libs/zbxcrypto/tls.c
++++ src/libs/zbxcrypto/tls.c
+@@ -2710,12 +2710,12 @@ void	zbx_tls_init_child(void)
+ 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
+ 
+ #ifndef _WINDOWS
+-	/* Invalid TLS parameters will cause exit. Once one process exits the parent process will send SIGABRT to */
++	/* Invalid TLS parameters will cause exit. Once one process exits the parent process will send SIGHUP to */
+ 	/* child processes which may be on their way to exit on their own - do not interrupt them, block signal */
+-	/* SIGABRT and unblock it when TLS parameters are good and libraries are initialized. */
++	/* SIGHUP and unblock it when TLS parameters are good and libraries are initialized. */
+ 	sigemptyset(&mask);
+ 	sigaddset(&mask, SIGTERM);
+-	sigaddset(&mask, SIGABRT);
++	sigaddset(&mask, SIGHUP);
+ 	sigaddset(&mask, SIGUSR2);
+ 	sigaddset(&mask, SIGQUIT);
+ 	sigprocmask(SIG_BLOCK, &mask, &orig_mask);
+@@ -2905,12 +2905,12 @@ void	zbx_tls_init_child(void)
+ 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
+ 
+ #ifndef _WINDOWS
+-	/* Invalid TLS parameters will cause exit. Once one process exits the parent process will send SIGABRT to */
++	/* Invalid TLS parameters will cause exit. Once one process exits the parent process will send SIGHUP to */
+ 	/* child processes which may be on their way to exit on their own - do not interrupt them, block signal */
+-	/* SIGABRT and unblock it when TLS parameters are good and libraries are initialized. */
++	/* SIGHUP and unblock it when TLS parameters are good and libraries are initialized. */
+ 	sigemptyset(&mask);
+ 	sigaddset(&mask, SIGTERM);
+-	sigaddset(&mask, SIGABRT);
++	sigaddset(&mask, SIGHUP);
+ 	sigaddset(&mask, SIGUSR2);
+ 	sigaddset(&mask, SIGQUIT);
+ 	sigprocmask(SIG_BLOCK, &mask, &orig_mask);
+@@ -3194,12 +3194,12 @@ void	zbx_tls_init_child(void)
+ 	zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__);
+ 
+ #ifndef _WINDOWS
+-	/* Invalid TLS parameters will cause exit. Once one process exits the parent process will send SIGABRT to */
++	/* Invalid TLS parameters will cause exit. Once one process exits the parent process will send SIGHUP to */
+ 	/* child processes which may be on their way to exit on their own - do not interrupt them, block signal */
+-	/* SIGABRT and unblock it when TLS parameters are good and libraries are initialized. */
++	/* SIGHUP and unblock it when TLS parameters are good and libraries are initialized. */
+ 	sigemptyset(&mask);
+ 	sigaddset(&mask, SIGTERM);
+-	sigaddset(&mask, SIGABRT);
++	sigaddset(&mask, SIGHUP);
+ 	sigaddset(&mask, SIGUSR2);
+ 	sigaddset(&mask, SIGQUIT);
+ 	sigprocmask(SIG_BLOCK, &mask, &orig_mask);
+diff --git src/libs/zbxlog/log.c src/libs/zbxlog/log.c
+index 916d7fb232..2e63ce8eb9 100644
+--- src/libs/zbxlog/log.c
++++ src/libs/zbxlog/log.c
+@@ -239,7 +239,7 @@ static void	lock_log(void)
+ 	sigaddset(&mask, SIGTERM);
+ 	sigaddset(&mask, SIGINT);
+ 	sigaddset(&mask, SIGQUIT);
+-	sigaddset(&mask, SIGABRT);
++	sigaddset(&mask, SIGHUP);
+ 
+ 	if (0 > sigprocmask(SIG_BLOCK, &mask, &orig_mask))
+ 		zbx_error("cannot set sigprocmask to block the user signal");
+diff --git src/libs/zbxnix/fatal.c src/libs/zbxnix/fatal.c
+index bda471d164..7ea6918e96 100644
+--- src/libs/zbxnix/fatal.c
++++ src/libs/zbxnix/fatal.c
+@@ -58,7 +58,7 @@ const char	*get_signal_name(int sig)
+ 		case SIGSEGV:	return "SIGSEGV";
+ 		case SIGBUS:	return "SIGBUS";
+ 		case SIGQUIT:	return "SIGQUIT";
+-		case SIGABRT:	return "SIGABRT";
++		case SIGHUP:	return "SIGHUP";
+ 		case SIGINT:	return "SIGINT";
+ 		case SIGTERM:	return "SIGTERM";
+ 		case SIGPIPE:	return "SIGPIPE";
+diff --git src/libs/zbxnix/sighandler.c src/libs/zbxnix/sighandler.c
+index d244c5cc7b..96aa86c32b 100644
+--- src/libs/zbxnix/sighandler.c
++++ src/libs/zbxnix/sighandler.c
+@@ -95,7 +95,7 @@ static void	alarm_signal_handler(int sig, siginfo_t *siginfo, void *context)
+  *                                                                            *
+  * Function: terminate_signal_handler                                         *
+  *                                                                            *
+- * Purpose: handle terminate signals: SIGABRT, SIGINT, SIGTERM, SIGUSR2       *
++ * Purpose: handle terminate signals: SIGHUP, SIGINT, SIGTERM, SIGUSR2        *
+  *                                                                            *
+  ******************************************************************************/
+ static void	terminate_signal_handler(int sig, siginfo_t *siginfo, void *context)
+@@ -103,8 +103,8 @@ static void	terminate_signal_handler(int sig, siginfo_t *siginfo, void *context)
+ 	if (!SIG_PARENT_PROCESS)
+ 	{
+ 		/* the parent process can either politely ask a child process to finish it's work and perform cleanup */
+-		/* by sending SIGUSR2 or terminate child process immediately without cleanup by sending SIGABRT       */
+-		if (SIGABRT == sig)
++		/* by sending SIGUSR2 or terminate child process immediately without cleanup by sending SIGHUP        */
++		if (SIGHUP == sig)
+ 			exit_with_failure();
+ 
+ 		if (SIGUSR2 == sig)
+@@ -180,7 +180,7 @@ void	zbx_set_common_signal_handlers(void)
+ 	phan.sa_sigaction = terminate_signal_handler;
+ 	sigaction(SIGINT, &phan, NULL);
+ 	sigaction(SIGQUIT, &phan, NULL);
+-	sigaction(SIGABRT, &phan, NULL);
++	sigaction(SIGHUP, &phan, NULL);
+ 	sigaction(SIGTERM, &phan, NULL);
+ 	sigaction(SIGUSR2, &phan, NULL);
+ 
+diff --git src/libs/zbxsys/threads.c src/libs/zbxsys/threads.c
+index 16fcc3f90b..aedd12ccba 100644
+--- src/libs/zbxsys/threads.c
++++ src/libs/zbxsys/threads.c
+@@ -61,7 +61,7 @@ void	zbx_child_fork(pid_t *pid)
+ 	sigemptyset(&mask);
+ 	sigaddset(&mask, SIGTERM);
+ 	sigaddset(&mask, SIGUSR2);
+-	sigaddset(&mask, SIGABRT);
++	sigaddset(&mask, SIGHUP);
+ 	sigaddset(&mask, SIGINT);
+ 	sigaddset(&mask, SIGQUIT);
+ 	sigaddset(&mask, SIGCHLD);
+diff --git src/zabbix_get/zabbix_get.c src/zabbix_get/zabbix_get.c
+index fe3152d7e2..9f3cfc6ebb 100644
+--- src/zabbix_get/zabbix_get.c
++++ src/zabbix_get/zabbix_get.c
+@@ -458,7 +458,7 @@ int	main(int argc, char **argv)
+ 	signal(SIGINT, get_signal_handler);
+ 	signal(SIGQUIT, get_signal_handler);
+ 	signal(SIGTERM, get_signal_handler);
+-	signal(SIGABRT, get_signal_handler);
++	signal(SIGHUP, get_signal_handler);
+ 	signal(SIGALRM, get_signal_handler);
+ 	signal(SIGPIPE, get_signal_handler);
+ #endif
+diff --git src/zabbix_sender/zabbix_sender.c src/zabbix_sender/zabbix_sender.c
+index fdbdfc2a97..7440bcab66 100644
+--- src/zabbix_sender/zabbix_sender.c
++++ src/zabbix_sender/zabbix_sender.c
+@@ -511,7 +511,7 @@ static	ZBX_THREAD_ENTRY(send_value, args)
+ 	signal(SIGINT, send_signal_handler);
+ 	signal(SIGQUIT, send_signal_handler);
+ 	signal(SIGTERM, send_signal_handler);
+-	signal(SIGABRT, send_signal_handler);
++	signal(SIGHUP, send_signal_handler);
+ 	signal(SIGALRM, send_signal_handler);
+ #endif
+ 	switch (configured_tls_connect_mode)
+diff --git src/zabbix_server/poller/checks_snmp.c src/zabbix_server/poller/checks_snmp.c
+index 08ecf71d86..68411321c1 100644
+--- src/zabbix_server/poller/checks_snmp.c
++++ src/zabbix_server/poller/checks_snmp.c
+@@ -2124,7 +2124,7 @@ void	zbx_init_snmp(void)
+ 	sigemptyset(&mask);
+ 	sigaddset(&mask, SIGTERM);
+ 	sigaddset(&mask, SIGUSR2);
+-	sigaddset(&mask, SIGABRT);
++	sigaddset(&mask, SIGHUP);
+ 	sigaddset(&mask, SIGQUIT);
+ 	sigprocmask(SIG_BLOCK, &mask, &orig_mask);
+ 
+-- 
+2.23.0
+

Modified: head/net-mgmt/zabbix4-server/files/pkg-message.in
==============================================================================
--- head/net-mgmt/zabbix4-server/files/pkg-message.in	Fri Aug 30 11:55:37 2019	(r510262)
+++ head/net-mgmt/zabbix4-server/files/pkg-message.in	Fri Aug 30 11:56:05 2019	(r510263)
@@ -41,4 +41,20 @@ Zabbix Life Cycle & Release Policy:
 https://www.zabbix.com/life_cycle_and_release_policy
 EOM
 }
+{
+  type: upgrade
+  maximum_version: "4.0.12"
+  minimum_version: "4.0.10"
+  message: <<EOM
+A change in Zabbix 4.0.11 is causing trouble when stopping the agent, proxy, and
+server daemons. If you are using the default rc script and facing this issue,
+you'll need to send the kill signal to the daemon in order to stop it:
+
+  # killall -9 zabbix_process_name
+
+More details at:
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239746
+https://support.zabbix.com/browse/ZBX-16460
+EOM
+}
 ]

Modified: head/net-mgmt/zabbix4-server/pkg-plist.frontend
==============================================================================
--- head/net-mgmt/zabbix4-server/pkg-plist.frontend	Fri Aug 30 11:55:37 2019	(r510262)
+++ head/net-mgmt/zabbix4-server/pkg-plist.frontend	Fri Aug 30 11:56:05 2019	(r510263)
@@ -174,13 +174,6 @@
 %%WWWDIR%%/assets/styles/dark-theme.css
 %%WWWDIR%%/assets/styles/hc-dark.css
 %%WWWDIR%%/assets/styles/hc-light.css
-%%WWWDIR%%/audio/alarm_average.wav
-%%WWWDIR%%/audio/alarm_disaster.wav
-%%WWWDIR%%/audio/alarm_high.wav
-%%WWWDIR%%/audio/alarm_information.wav
-%%WWWDIR%%/audio/alarm_ok.wav
-%%WWWDIR%%/audio/alarm_warning.wav
-%%WWWDIR%%/audio/no_sound.wav
 %%WWWDIR%%/auditacts.php
 %%WWWDIR%%/auditlogs.php
 %%WWWDIR%%/browserwarning.php
@@ -796,7 +789,6 @@
 %%WWWDIR%%/js/class.cdate.js
 %%WWWDIR%%/js/class.cdebug.js
 %%WWWDIR%%/js/class.cmap.js
-%%WWWDIR%%/js/class.cmessages.js
 %%WWWDIR%%/js/class.cnavtree.js
 %%WWWDIR%%/js/class.cookie.js
 %%WWWDIR%%/js/class.coverride.js
@@ -934,6 +926,23 @@
 %%WWWDIR%%/usergrps.php
 %%WWWDIR%%/users.php
 %%WWWDIR%%/zabbix.php
+%%WWWDIR%%/app/controllers/CControllerNotificationsGet.php
+%%WWWDIR%%/app/controllers/CControllerNotificationsMute.php
+%%WWWDIR%%/app/controllers/CControllerNotificationsRead.php
+%%WWWDIR%%/audio/alarm_average.mp3
+%%WWWDIR%%/audio/alarm_disaster.mp3
+%%WWWDIR%%/audio/alarm_high.mp3
+%%WWWDIR%%/audio/alarm_information.mp3
+%%WWWDIR%%/audio/alarm_ok.mp3
+%%WWWDIR%%/audio/alarm_warning.mp3
+%%WWWDIR%%/audio/no_sound.mp3
+%%WWWDIR%%/js/class.browsertab.js
+%%WWWDIR%%/js/class.localstorage.js
+%%WWWDIR%%/js/class.notification.collection.js
+%%WWWDIR%%/js/class.notification.js
+%%WWWDIR%%/js/class.notifications.audio.js
+%%WWWDIR%%/js/class.notifications.js
+%%WWWDIR%%/js/class.promise.js
 @dir %%WWWDIR%%/local/app/controllers
 @dir %%WWWDIR%%/local/app/views
 @dir %%WWWDIR%%/local/conf



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908301156.x7UBu5Lo080051>