pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils zabbix50: Update to 5.0.30



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4e37877ac2c1
branches:  trunk
changeset: 391084:4e37877ac2c1
user:      otis <otis%pkgsrc.org@localhost>
date:      Tue Jan 03 13:59:14 2023 +0000

description:
zabbix50: Update to 5.0.30

Changelog for 5.0.30:

New features:
  - Added JSONPath optimizations

Bug fixes:
  - Removed the ability to import a graph with an empty name and added graph
    name length validation up to 128 characters
  - Fixed the "i" icon alignment in the Info column in Problems section with
    compact view
  - Improved history syncer performance
  - Fixed vfs.fs.inode and vfs.fs.get to handle file systems with zero total
    inodes count
  - Fixed Zabbix JS (zabbix_js) crash when parsing short version of "timeout"
    option -t
  - Fixed script in OPSgenie media
  - Fixed spoofing X-Forwarded-For request header allows to access Frontend in
    maintenace mode

For details see https://www.zabbix.com/rn/rn5.0.30

And while here, also:
- Consolidate and deduplicate patches (move all of them into
  zabbix50-server/patches)
- Allow only one of the database to be selected (mysql or pgsql)
- Regenerate NetBSD-specific patch

diffstat:

 sysutils/zabbix50-agent/Makefile                                        |    5 +-
 sysutils/zabbix50-agent/distinfo                                        |   14 +-
 sysutils/zabbix50-agent/patches/patch-configure                         |   15 -
 sysutils/zabbix50-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c  |  203 ----------
 sysutils/zabbix50-agent/patches/patch-src_zabbix__agent_Makefile.in     |   15 -
 sysutils/zabbix50-frontend/PLIST                                        |   18 +-
 sysutils/zabbix50-frontend/distinfo                                     |    8 +-
 sysutils/zabbix50-java/Makefile                                         |    6 +-
 sysutils/zabbix50-java/PLIST                                            |    8 +-
 sysutils/zabbix50-java/distinfo                                         |   14 +-
 sysutils/zabbix50-java/patches/patch-configure                          |   15 -
 sysutils/zabbix50-proxy/Makefile                                        |   11 +-
 sysutils/zabbix50-proxy/distinfo                                        |   11 +-
 sysutils/zabbix50-proxy/options.mk                                      |    6 +-
 sysutils/zabbix50-proxy/patches/patch-m4_ax__lib__mysql.m4              |   15 -
 sysutils/zabbix50-proxy/patches/patch-m4_libssh.m4                      |   40 -
 sysutils/zabbix50-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c  |  203 ----------
 sysutils/zabbix50-proxy/patches/patch-src_zabbix__proxy_Makefile.am     |   12 -
 sysutils/zabbix50-server/Makefile                                       |    9 +-
 sysutils/zabbix50-server/Makefile.common                                |    6 +-
 sysutils/zabbix50-server/distinfo                                       |   13 +-
 sysutils/zabbix50-server/options.mk                                     |    8 +-
 sysutils/zabbix50-server/patches/patch-configure                        |   15 +
 sysutils/zabbix50-server/patches/patch-src_libs_zbxsysinfo_netbsd_net.c |  110 ++--
 sysutils/zabbix50-server/patches/patch-src_zabbix__agent_Makefile.in    |   15 +
 sysutils/zabbix50-server/patches/patch-src_zabbix__proxy_Makefile.am    |   12 +
 26 files changed, 181 insertions(+), 626 deletions(-)

diffs (truncated from 1149 to 300 lines):

diff -r 85777fa51aed -r 4e37877ac2c1 sysutils/zabbix50-agent/Makefile
--- a/sysutils/zabbix50-agent/Makefile  Tue Jan 03 13:56:51 2023 +0000
+++ b/sysutils/zabbix50-agent/Makefile  Tue Jan 03 13:59:14 2023 +0000
@@ -1,11 +1,12 @@
-# $NetBSD: Makefile,v 1.13 2022/12/23 12:34:05 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2023/01/03 13:59:14 otis Exp $
 
-PKGREVISION= 4
 .include "../../sysutils/zabbix50-server/Makefile.common"
 
 PKGNAME=       ${DISTNAME:S/-/-agent-/}
 COMMENT=       Enterprise-class Monitoring Solution for Everyone
 
+PATCHDIR=      ${.CURDIR}/../../sysutils/zabbix50-server/patches
+
 CONFLICTS+=    zabbix-[0-9]*
 CONFLICTS+=    zabbix-agent-[0-9]*
 
diff -r 85777fa51aed -r 4e37877ac2c1 sysutils/zabbix50-agent/distinfo
--- a/sysutils/zabbix50-agent/distinfo  Tue Jan 03 13:56:51 2023 +0000
+++ b/sysutils/zabbix50-agent/distinfo  Tue Jan 03 13:59:14 2023 +0000
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.8 2022/12/23 11:03:13 wiz Exp $
+$NetBSD: distinfo,v 1.9 2023/01/03 13:59:14 otis Exp $
 
-BLAKE2s (zabbix-5.0.17.tar.gz) = 7b5d674d79c41a0c9d9f6a8431408deaea101c5fe32034c115b3cb0350b9d647
-SHA512 (zabbix-5.0.17.tar.gz) = f7a23b51c3d2fb5f80ec888dc9eaf592dd13de3a61b9d065e6d54e1bb406e18ffef1b8e9d3ef516b2034d94fb7330bd80c2cb7b7d22eed7e57021bc66e1ee159
-Size (zabbix-5.0.17.tar.gz) = 21326776 bytes
+BLAKE2s (zabbix-5.0.30.tar.gz) = f4d7efd99353063d457be0887570fe03b27acdf5e24836035c92a9f054a5ed13
+SHA512 (zabbix-5.0.30.tar.gz) = 2f744fc1ba42ea0602cc90c91342f531c55cb1f76eda47c6e928e74dc595f7bd885f69abb52c6eb1b20e65bd6c3c46c299d6cfee2c3442db137561060386a31e
+Size (zabbix-5.0.30.tar.gz) = 21505195 bytes
 SHA1 (patch-configure) = cf647b9ee52a96882d31f8783ac19b66e3e65105
-SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 468f2112a3d65b0a73f371194ae15ce0df0ad71c
+SHA1 (patch-m4_ax__lib__mysql.m4) = 9786c6bff3d22334263921c201bf241a207a46bc
+SHA1 (patch-m4_libssh.m4) = 8b4ac3964caf94bb0e4939d265dcefc08a07a0df
+SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = bc928301fc099d907b83127e2670abf1d6c33553
 SHA1 (patch-src_zabbix__agent_Makefile.in) = efbd804ecee4b99db36db5f4fd61583b2ef96a86
+SHA1 (patch-src_zabbix__proxy_Makefile.am) = 9d2c3d5ca06e676154653b70f0931ed2ea281cf5
+SHA1 (patch-src_zabbix__server_Makefile.am) = d139b4fedf8f443fbe9966256e98374d5e5cdb67
diff -r 85777fa51aed -r 4e37877ac2c1 sysutils/zabbix50-agent/patches/patch-configure
--- a/sysutils/zabbix50-agent/patches/patch-configure   Tue Jan 03 13:56:51 2023 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-configure,v 1.1 2020/11/03 22:46:23 otis Exp $
-
-Fix bash-ism.
-
---- configure.orig     2020-07-13 07:56:36.000000000 +0000
-+++ configure
-@@ -8494,7 +8494,7 @@ fi
- rm -f core conftest.err conftest.$ac_objext \
-     conftest$ac_exeext conftest.$ac_ext
- 
--            if test "$found_mysql_tls" == "yes"; then
-+            if test "$found_mysql_tls" = "yes"; then
- 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TLS ciphersuites in MySQL library" >&5
- $as_echo_n "checking for TLS ciphersuites in MySQL library... " >&6; }
diff -r 85777fa51aed -r 4e37877ac2c1 sysutils/zabbix50-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
--- a/sysutils/zabbix50-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c    Tue Jan 03 13:56:51 2023 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-$NetBSD: patch-src_libs_zbxsysinfo_netbsd_net.c,v 1.1 2020/11/03 22:46:23 otis Exp $
-
-Rework interface statistics code from using kvm to using sysctl interface.
-
---- src/libs/zbxsysinfo/netbsd/net.c.orig      2020-08-24 09:42:55.000000000 +0000
-+++ src/libs/zbxsysinfo/netbsd/net.c
-@@ -22,6 +22,9 @@
- #include "zbxjson.h"
- #include "log.h"
- 
-+#include <net/route.h>
-+#include <net/if_dl.h>
-+
- static struct nlist kernel_symbols[] =
- {
-       {"_ifnet", N_UNDF, 0, 0, 0},
-@@ -31,43 +34,91 @@ static struct nlist kernel_symbols[] =
- 
- #define IFNET_ID 0
- 
-+static void
-+get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
-+{
-+    int i;
-+
-+    for (i = 0; i < RTAX_MAX; i++) {
-+        if (addrs & (1 << i)) {
-+            rti_info[i] = sa;
-+            sa = (struct sockaddr *)((char *)(sa) +
-+                RT_ROUNDUP(sa->sa_len));
-+        } else
-+            rti_info[i] = NULL;
-+    }
-+}
-+
-+
- static int    get_ifdata(const char *if_name,
-               zbx_uint64_t *ibytes, zbx_uint64_t *ipackets, zbx_uint64_t *ierrors, zbx_uint64_t *idropped,
-               zbx_uint64_t *obytes, zbx_uint64_t *opackets, zbx_uint64_t *oerrors,
-               zbx_uint64_t *tbytes, zbx_uint64_t *tpackets, zbx_uint64_t *terrors,
-               zbx_uint64_t *icollisions, char **error)
- {
--      struct ifnet_head       head;
--      struct ifnet            *ifp;
--      struct ifnet            v;
--
--      kvm_t   *kp;
--      int     len = 0;
--      int     ret = SYSINFO_RET_FAIL;
-+      struct  if_msghdr *ifm;
-+      int             mib[6] = { CTL_NET, AF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
-+      char    *buf = NULL;
-+      char    *lim, *next;
-+      struct  rt_msghdr *rtm;
-+      struct  if_data *ifd = NULL;
-+      struct  sockaddr *sa, *rti_info[RTAX_MAX];
-+      struct  sockaddr_dl *sdl;
-+
-+      size_t  len = 0;
-+      size_t  olen = 0;
-+      int             ret = SYSINFO_RET_FAIL;
-+
-+      static char name[IFNAMSIZ];
- 
-       if (NULL == if_name || '\0' == *if_name)
-       {
-               *error = zbx_strdup(NULL, "Network interface name cannot be empty.");
--              return FAIL;
-+              ret = FAIL;
-+              goto out;
-       }
- 
--      if (NULL == (kp = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL))) /* requires root privileges */
--      {
--              *error = zbx_strdup(NULL, "Cannot obtain a descriptor to access kernel virtual memory.");
--              return FAIL;
--      }
--
--      if (N_UNDF == kernel_symbols[IFNET_ID].n_type)
--              if (0 != kvm_nlist(kp, &kernel_symbols[0]))
--                      kernel_symbols[IFNET_ID].n_type = N_UNDF;
--
--      if (N_UNDF != kernel_symbols[IFNET_ID].n_type)
--      {
--              len = sizeof(struct ifnet_head);
--
--              if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
--              {
--                      len = sizeof(struct ifnet);
-+    if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) {
-+        *error = zbx_strdup(NULL, "Failed to read network interfaces data");
-+              ret = FAIL;
-+              goto out;
-+      }
-+
-+    if (len > olen) {
-+        free(buf);
-+        if ((buf = zbx_malloc(NULL, len)) == NULL) {
-+                      *error = zbx_strdup(NULL, "Failed to allocate buffer for network interfaces data");
-+                      ret = FAIL;
-+                      goto out;
-+              }
-+        olen = len;
-+    }
-+    if (sysctl(mib, 6, buf, &len, NULL, 0) == -1) {
-+              *error = zbx_strdup(NULL, "Failed to allocate buffer for network interfaces data");
-+              ret = FAIL;
-+              goto out;
-+      }
-+
-+      lim = buf + len;
-+    for (next = buf; next < lim; next += rtm->rtm_msglen) {
-+        rtm = (struct rt_msghdr *)next;
-+        if ((rtm->rtm_version == RTM_VERSION) &&
-+                (rtm->rtm_type == RTM_IFINFO)) {
-+            ifm = (struct if_msghdr *)next;
-+            ifd = &ifm->ifm_data;
-+
-+            sa = (struct sockaddr *)(ifm + 1);
-+            get_rtaddrs(ifm->ifm_addrs, sa, rti_info);
-+
-+            sdl = (struct sockaddr_dl *)rti_info[RTAX_IFP];
-+            if (sdl == NULL || sdl->sdl_family != AF_LINK) {
-+                continue;
-+            }
-+            bzero(name, sizeof(name));
-+            if (sdl->sdl_nlen >= IFNAMSIZ)
-+                memcpy(name, sdl->sdl_data, IFNAMSIZ - 1);
-+            else if (sdl->sdl_nlen > 0)
-+                memcpy(name, sdl->sdl_data, sdl->sdl_nlen);
- 
-                       /* if_ibytes;           total number of octets received */
-                       /* if_ipackets;         packets received on interface */
-@@ -101,42 +152,38 @@ static int       get_ifdata(const char *if_nam
-                       if (icollisions)
-                               *icollisions = 0;
- 
--                      for (ifp = head.tqh_first; ifp; ifp = v.if_list.tqe_next)
-+                      if (0 == strcmp(if_name, name))
-                       {
--                              if (kvm_read(kp, (u_long)ifp, &v, len) < len)
--                                      break;
--
--                              if (0 == strcmp(if_name, v.if_xname))
--                              {
--                                      if (ibytes)
--                                              *ibytes += v.if_ibytes;
--                                      if (ipackets)
--                                              *ipackets += v.if_ipackets;
--                                      if (ierrors)
--                                              *ierrors += v.if_ierrors;
--                                      if (idropped)
--                                              *idropped += v.if_iqdrops;
--                                      if (obytes)
--                                              *obytes += v.if_obytes;
--                                      if (opackets)
--                                              *opackets += v.if_opackets;
--                                      if (oerrors)
--                                              *oerrors += v.if_oerrors;
--                                      if (tbytes)
--                                              *tbytes += v.if_ibytes + v.if_obytes;
--                                      if (tpackets)
--                                              *tpackets += v.if_ipackets + v.if_opackets;
--                                      if (terrors)
--                                              *terrors += v.if_ierrors + v.if_oerrors;
--                                      if (icollisions)
--                                              *icollisions += v.if_collisions;
--                                      ret = SYSINFO_RET_OK;
--                              }
-+                              if (ibytes)
-+                                      *ibytes += ifd->ifi_ibytes;
-+                              if (ipackets)
-+                                      *ipackets += ifd->ifi_ipackets;
-+                              if (ierrors)
-+                                      *ierrors += ifd->ifi_ierrors;
-+                              if (idropped)
-+                                      *idropped += ifd->ifi_iqdrops;
-+                              if (obytes)
-+                                      *obytes += ifd->ifi_obytes;
-+                              if (opackets)
-+                                      *opackets += ifd->ifi_opackets;
-+                              if (oerrors)
-+                                      *oerrors += ifd->ifi_oerrors;
-+                              if (tbytes)
-+                                      *tbytes += ifd->ifi_ibytes + ifd->ifi_obytes;
-+                              if (tpackets)
-+                                      *tpackets += ifd->ifi_ipackets + ifd->ifi_opackets;
-+                              if (terrors)
-+                                      *terrors += ifd->ifi_ierrors + ifd->ifi_oerrors;
-+                              if (icollisions)
-+                                      *icollisions += ifd->ifi_collisions;
-+                              ret = SYSINFO_RET_OK;
-+                              goto out;
-                       }
-               }
-       }
- 
--      kvm_close(kp);
-+out:
-+      free(buf);
- 
-       if (SYSINFO_RET_FAIL == ret)
-       {
diff -r 85777fa51aed -r 4e37877ac2c1 sysutils/zabbix50-agent/patches/patch-src_zabbix__agent_Makefile.in
--- a/sysutils/zabbix50-agent/patches/patch-src_zabbix__agent_Makefile.in       Tue Jan 03 13:56:51 2023 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_zabbix__agent_Makefile.in,v 1.1 2020/11/03 22:46:23 otis Exp $
-
-Install config file to component's example directory.
-
---- src/zabbix_agent/Makefile.in.orig  2020-08-24 09:43:03.000000000 +0000
-+++ src/zabbix_agent/Makefile.in
-@@ -1113,7 +1113,7 @@ uninstall-am: uninstall-sbinPROGRAMS
- install-data-hook:
-       $(MKDIR_P) "$(DESTDIR)$(AGENT_CONFIG_FILE).d"
-       $(MKDIR_P) "$(DESTDIR)$(LOAD_MODULE_PATH)"
--      test -f "$(DESTDIR)$(AGENT_CONFIG_FILE)" || cp "../../conf/zabbix_agentd.conf" "$(DESTDIR)$(AGENT_CONFIG_FILE)"
-+      $(INSTALL_DATA) "../../conf/zabbix_agentd.conf" "$(DESTDIR)/${PREFIX}/share/examples/%%PKGBASE%%"
- 
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
diff -r 85777fa51aed -r 4e37877ac2c1 sysutils/zabbix50-frontend/PLIST
--- a/sysutils/zabbix50-frontend/PLIST  Tue Jan 03 13:56:51 2023 +0000
+++ b/sysutils/zabbix50-frontend/PLIST  Tue Jan 03 13:59:14 2023 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2021/11/13 20:41:09 otis Exp $
+@comment $NetBSD: PLIST,v 1.4 2023/01/03 13:59:15 otis Exp $
 share/examples/${PKGBASE}/httpd-zabbix.conf
 share/examples/${PKGBASE}/php-fpm-zabbix.conf
 share/zabbix/actionconf.php
@@ -101,7 +101,9 @@
 share/zabbix/app/controllers/CControllerPopupTestTriggerExpr.php
 share/zabbix/app/controllers/CControllerPopupTriggerExpr.php
 share/zabbix/app/controllers/CControllerPopupTriggerWizard.php
+share/zabbix/app/controllers/CControllerProblem.php
 share/zabbix/app/controllers/CControllerProblemView.php
+share/zabbix/app/controllers/CControllerProblemViewRefresh.php



Home | Main Index | Thread Index | Old Index