pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
zabbix64: Streamline distinfo and patch location
Module Name: pkgsrc-wip
Committed By: Juraj Lutter <otis%NetBSD.org@localhost>
Pushed By: otis
Date: Sun Oct 1 17:37:39 2023 +0000
Changeset: 0fe049ba08c68ffc12d212ae1f4264442a94efc6
Modified Files:
zabbix64-agent/Makefile
zabbix64-frontend/Makefile
zabbix64-java/Makefile
zabbix64-proxy/Makefile
Removed Files:
zabbix64-agent/patches/patch-configure
zabbix64-agent/patches/patch-m4_pcre.m4
zabbix64-agent/patches/patch-m4_pcre2.m4
zabbix64-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
zabbix64-agent/patches/patch-src_libs_zbxsysinfo_simple_simple.c
zabbix64-agent/patches/patch-src_zabbix__agent_Makefile.in
zabbix64-java/patches/patch-configure
zabbix64-java/patches/patch-m4_pcre.m4
zabbix64-java/patches/patch-m4_pcre2.m4
zabbix64-proxy/patches/patch-m4_ax__lib__mysql.m4
zabbix64-proxy/patches/patch-m4_libssh.m4
zabbix64-proxy/patches/patch-m4_pcre.m4
zabbix64-proxy/patches/patch-m4_pcre2.m4
zabbix64-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
zabbix64-proxy/patches/patch-src_zabbix__proxy_Makefile.am
Log Message:
zabbix64: Streamline distinfo and patch location
No functional changes intended.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0fe049ba08c68ffc12d212ae1f4264442a94efc6
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
zabbix64-agent/Makefile | 3 +
zabbix64-agent/patches/patch-configure | 60 -------
zabbix64-agent/patches/patch-m4_pcre.m4 | 15 --
zabbix64-agent/patches/patch-m4_pcre2.m4 | 15 --
.../patches/patch-src_libs_zbxsysinfo_netbsd_net.c | 200 ---------------------
.../patch-src_libs_zbxsysinfo_simple_simple.c | 38 ----
.../patches/patch-src_zabbix__agent_Makefile.in | 15 --
zabbix64-frontend/Makefile | 3 +
zabbix64-java/Makefile | 3 +
zabbix64-java/patches/patch-configure | 15 --
zabbix64-java/patches/patch-m4_pcre.m4 | 15 --
zabbix64-java/patches/patch-m4_pcre2.m4 | 15 --
zabbix64-proxy/Makefile | 3 +
zabbix64-proxy/patches/patch-m4_ax__lib__mysql.m4 | 15 --
zabbix64-proxy/patches/patch-m4_libssh.m4 | 40 -----
zabbix64-proxy/patches/patch-m4_pcre.m4 | 15 --
zabbix64-proxy/patches/patch-m4_pcre2.m4 | 15 --
.../patches/patch-src_libs_zbxsysinfo_netbsd_net.c | 200 ---------------------
.../patches/patch-src_zabbix__proxy_Makefile.am | 12 --
19 files changed, 12 insertions(+), 685 deletions(-)
diffs:
diff --git a/zabbix64-agent/Makefile b/zabbix64-agent/Makefile
index ed67c75070..a174b2340c 100644
--- a/zabbix64-agent/Makefile
+++ b/zabbix64-agent/Makefile
@@ -5,6 +5,9 @@
PKGNAME= ${DISTNAME:S/-/-agent-/}
COMMENT= Enterprise-class Monitoring Solution for Everyone
+PATCHDIR= "../../wip/zabbix64-server/patches"
+DISTINFO_FILE= "../../wip/zabbix64-server/distinfo"
+
CONFLICTS+= zabbix-[0-9]*
CONFLICTS+= zabbix-agent-[0-9]*
diff --git a/zabbix64-agent/patches/patch-configure b/zabbix64-agent/patches/patch-configure
deleted file mode 100644
index 08159276b1..0000000000
--- a/zabbix64-agent/patches/patch-configure
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD: patch-configure,v 1.2 2023/08/02 22:46:23 otis Exp $
-
-Fix bash-ism.
-
---- ./configure.orig 2023-07-31 09:26:03.884829780 +0000
-+++ ./configure
-@@ -9645,7 +9645,7 @@ fi
- rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-
-- if test "$found_mysql_tls" == "yes"; then
-+ if test "$found_mysql_tls" = "yes"; then
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TLS ciphersuites in MySQL library" >&5
- printf %s "checking for TLS ciphersuites in MySQL library... " >&6; }
-@@ -16730,7 +16730,7 @@ printf "%s\n" "$as_me: WARNING: proceedi
- if test "x$enable_static" = "xyes"; then
- LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler has no direct suppor for static linkage" >&5
- printf "%s\n" "$as_me: WARNING: compiler has no direct suppor for static linkage" >&2;}
-
-@@ -17153,7 +17153,7 @@ printf "%s\n" "$as_me: WARNING: proceedi
- if test "x$enable_static" = "xyes"; then
- LIBPCRE2_LIBS=" $LIBPCRE2_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler has no direct suppor for static linkage" >&5
- printf "%s\n" "$as_me: WARNING: compiler has no direct suppor for static linkage" >&2;}
-
-@@ -17584,7 +17584,7 @@ printf "%s\n" "$as_me: WARNING: proceedi
- if test "x$enable_static" = "xyes"; then
- LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler has no direct suppor for static linkage" >&5
- printf "%s\n" "$as_me: WARNING: compiler has no direct suppor for static linkage" >&2;}
-
-@@ -18012,7 +18012,7 @@ printf "%s\n" "$as_me: WARNING: proceedi
- if test "x$enable_static" = "xyes"; then
- LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler has no direct suppor for static linkage" >&5
- printf "%s\n" "$as_me: WARNING: compiler has no direct suppor for static linkage" >&2;}
-
-@@ -18453,7 +18453,7 @@ printf "%s\n" "$as_me: WARNING: proceedi
- if test "x$enable_static" = "xyes"; then
- LIBPCRE2_LIBS=" $LIBPCRE2_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compiler has no direct suppor for static linkage" >&5
- printf "%s\n" "$as_me: WARNING: compiler has no direct suppor for static linkage" >&2;}
-
diff --git a/zabbix64-agent/patches/patch-m4_pcre.m4 b/zabbix64-agent/patches/patch-m4_pcre.m4
deleted file mode 100644
index 32d81bb941..0000000000
--- a/zabbix64-agent/patches/patch-m4_pcre.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Fix bash-isms.
-
---- m4/pcre.m4.orig 2023-08-22 08:10:21.991666838 +0000
-+++ m4/pcre.m4
-@@ -194,7 +194,7 @@ AS_HELP_STRING([--with-libpcre@<:@=DIR@:
- if test "x$enable_static" = "xyes"; then
- LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- AC_MSG_WARN([compiler has no direct suppor for static linkage])
-
- if test -n "$libpcre_lib_dir"; then
diff --git a/zabbix64-agent/patches/patch-m4_pcre2.m4 b/zabbix64-agent/patches/patch-m4_pcre2.m4
deleted file mode 100644
index 851eed6ee5..0000000000
--- a/zabbix64-agent/patches/patch-m4_pcre2.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Fix bash-isms.
-
---- m4/pcre2.m4.orig 2023-08-22 08:10:21.991666838 +0000
-+++ m4/pcre2.m4
-@@ -195,7 +195,7 @@ AS_HELP_STRING([--with-libpcre2@<:@=DIR@
- if test "x$enable_static" = "xyes"; then
- LIBPCRE2_LIBS=" $LIBPCRE2_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- AC_MSG_WARN([compiler has no direct suppor for static linkage])
-
- if test -n "$libpcre2_lib_dir"; then
diff --git a/zabbix64-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c b/zabbix64-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
deleted file mode 100644
index f17fbe5d88..0000000000
--- a/zabbix64-agent/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
+++ /dev/null
@@ -1,200 +0,0 @@
-$NetBSD: patch-src_libs_zbxsysinfo_netbsd_net.c,v 1.1 2020/11/03 22:44:43 otis Exp $
-
-Rework interface statistics code from using kvm to using sysctl interface.
-
---- ./src/libs/zbxsysinfo/netbsd/net.c.orig 2023-03-31 17:00:35.695821069 +0900
-+++ ./src/libs/zbxsysinfo/netbsd/net.c 2023-04-08 09:46:44.490286215 +0900
-@@ -23,6 +23,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},
-@@ -30,6 +33,21 @@
- {NULL, 0, 0, 0, 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,
-@@ -37,36 +55,72 @@
- zbx_uint64_t *icollisions, char **error)
- {
- #define IFNET_ID 0
-- struct ifnet_head head;
-- struct ifnet *ifp;
-- struct ifnet v;
-+ 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;
-
-- kvm_t *kp;
-- 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 (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;
- }
-
-- 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;
-+ lim = buf + len;
-+ for (next = buf; next < lim; next += rtm->rtm_msglen) {
-+ rtm = (struct rt_msghdr *)next;
-
-- if (N_UNDF != kernel_symbols[IFNET_ID].n_type)
-- {
-- int len = sizeof(struct ifnet_head);
-+ if ((rtm->rtm_version == RTM_VERSION) &&
-+ (rtm->rtm_type == RTM_IFINFO)) {
-+ ifm = (struct if_msghdr *)next;
-+ ifd = &ifm->ifm_data;
-
-- if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
-- {
-- len = sizeof(struct ifnet);
-+ 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 */
-@@ -100,42 +154,38 @@
- 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 --git a/zabbix64-agent/patches/patch-src_libs_zbxsysinfo_simple_simple.c b/zabbix64-agent/patches/patch-src_libs_zbxsysinfo_simple_simple.c
deleted file mode 100644
index 6d40da1dcb..0000000000
--- a/zabbix64-agent/patches/patch-src_libs_zbxsysinfo_simple_simple.c
+++ /dev/null
@@ -1,38 +0,0 @@
-$NetBSD$
-
-Enclose macro argument in () to ensure proper handling.
-
---- src/libs/zbxsysinfo/simple/simple.c.orig 2023-03-31 17:00:35.699821153 +0900
-+++ src/libs/zbxsysinfo/simple/simple.c 2023-04-08 09:56:30.577666918 +0900
-@@ -188,14 +188,14 @@
- "https://"), host);
- }
-
-- if (CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_USERAGENT, "Zabbix " ZABBIX_VERSION)) ||
-- CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_URL, https_host)) ||
-- CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_PORT, (long)port)) ||
-- CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_NOBODY, 1L)) ||
-- CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_SSL_VERIFYPEER, 0L)) ||
-- CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_SSL_VERIFYHOST, 0L)) ||
-- CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_TIMEOUT, (long)timeout)) ||
-- CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = ZBX_CURLOPT_ACCEPT_ENCODING, "")))
-+ if (CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = CURLOPT_USERAGENT), "Zabbix " ZABBIX_VERSION)) ||
-+ CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = CURLOPT_URL), https_host)) ||
-+ CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = CURLOPT_PORT), (long)port)) ||
-+ CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = CURLOPT_NOBODY), 1L)) ||
-+ CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = CURLOPT_SSL_VERIFYPEER), 0L)) ||
-+ CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = CURLOPT_SSL_VERIFYHOST), 0L)) ||
-+ CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = CURLOPT_TIMEOUT), (long)timeout)) ||
-+ CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = ZBX_CURLOPT_ACCEPT_ENCODING), "")))
- {
- zabbix_log(LOG_LEVEL_DEBUG, "%s: could not set cURL option [%d]: %s",
- __func__, (int)opt, curl_easy_strerror(err));
-@@ -215,7 +215,7 @@
-
- if (NULL != CONFIG_SOURCE_IP)
- {
-- if (CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_INTERFACE, CONFIG_SOURCE_IP)))
-+ if (CURLE_OK != (err = curl_easy_setopt(easyhandle, (opt = CURLOPT_INTERFACE), CONFIG_SOURCE_IP)))
- {
- zabbix_log(LOG_LEVEL_DEBUG, "%s: could not set source interface option [%d]: %s",
- __func__, (int)opt, curl_easy_strerror(err));
diff --git a/zabbix64-agent/patches/patch-src_zabbix__agent_Makefile.in b/zabbix64-agent/patches/patch-src_zabbix__agent_Makefile.in
deleted file mode 100644
index b2ba47631e..0000000000
--- a/zabbix64-agent/patches/patch-src_zabbix__agent_Makefile.in
+++ /dev/null
@@ -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 --git a/zabbix64-frontend/Makefile b/zabbix64-frontend/Makefile
index b297497544..da41c25f49 100644
--- a/zabbix64-frontend/Makefile
+++ b/zabbix64-frontend/Makefile
@@ -5,6 +5,9 @@
PKGNAME= ${DISTNAME:S/-/-frontend-${ZABBIX_DB_TYPE}-/}
COMMENT= Zabbix PHP 7.4+ frontend
+PATCHDIR= "../../wip/zabbix64-server/patches"
+DISTINFO_FILE= "../../wip/zabbix64-server/distinfo"
+
CONFLICTS+= zabbix-frontend-[0-9]*
EGDIR= share/examples/${PKGBASE}
diff --git a/zabbix64-java/Makefile b/zabbix64-java/Makefile
index f1816fa1ea..8537078917 100644
--- a/zabbix64-java/Makefile
+++ b/zabbix64-java/Makefile
@@ -5,6 +5,9 @@
PKGNAME= ${DISTNAME:S/-/-java-/}
COMMENT= Enterprise-class Monitoring Solution for Everyone
+PATCHDIR= "../../wip/zabbix64-server/patches"
+DISTINFO_FILE= "../../wip/zabbix64-server/distinfo"
+
USE_TOOLS+= pkg-config
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-java
diff --git a/zabbix64-java/patches/patch-configure b/zabbix64-java/patches/patch-configure
deleted file mode 100644
index 8afac91c6a..0000000000
--- a/zabbix64-java/patches/patch-configure
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-configure,v 1.1 2020/11/03 22:52:42 otis Exp $
-
-Fix bash-ism.
-
---- configure.orig 2023-07-31 09:26:03.884829780 +0000
-+++ configure
-@@ -9645,7 +9645,7 @@ fi
- rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-
-- if test "$found_mysql_tls" == "yes"; then
-+ if test "$found_mysql_tls" = "yes"; then
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TLS ciphersuites in MySQL library" >&5
- printf %s "checking for TLS ciphersuites in MySQL library... " >&6; }
diff --git a/zabbix64-java/patches/patch-m4_pcre.m4 b/zabbix64-java/patches/patch-m4_pcre.m4
deleted file mode 100644
index 32d81bb941..0000000000
--- a/zabbix64-java/patches/patch-m4_pcre.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Fix bash-isms.
-
---- m4/pcre.m4.orig 2023-08-22 08:10:21.991666838 +0000
-+++ m4/pcre.m4
-@@ -194,7 +194,7 @@ AS_HELP_STRING([--with-libpcre@<:@=DIR@:
- if test "x$enable_static" = "xyes"; then
- LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- AC_MSG_WARN([compiler has no direct suppor for static linkage])
-
- if test -n "$libpcre_lib_dir"; then
diff --git a/zabbix64-java/patches/patch-m4_pcre2.m4 b/zabbix64-java/patches/patch-m4_pcre2.m4
deleted file mode 100644
index 851eed6ee5..0000000000
--- a/zabbix64-java/patches/patch-m4_pcre2.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Fix bash-isms.
-
---- m4/pcre2.m4.orig 2023-08-22 08:10:21.991666838 +0000
-+++ m4/pcre2.m4
-@@ -195,7 +195,7 @@ AS_HELP_STRING([--with-libpcre2@<:@=DIR@
- if test "x$enable_static" = "xyes"; then
- LIBPCRE2_LIBS=" $LIBPCRE2_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- AC_MSG_WARN([compiler has no direct suppor for static linkage])
-
- if test -n "$libpcre2_lib_dir"; then
diff --git a/zabbix64-proxy/Makefile b/zabbix64-proxy/Makefile
index 53a5651b1a..fc6896983d 100644
--- a/zabbix64-proxy/Makefile
+++ b/zabbix64-proxy/Makefile
@@ -5,6 +5,9 @@
PKGNAME= ${DISTNAME:S/-/-proxy-${ZABBIX_DB_TYPE}-/}
COMMENT= Enterprise-class Monitoring Solution for Everyone
+PATCHDIR= "../../wip/zabbix64-server/patches"
+DISTINFO_FILE= "../../wip/zabbix64-server/distinfo"
+
CONFLICTS+= zabbix-[0-9]*
CONFLICTS+= zabbix-proxy-[0-9]*
diff --git a/zabbix64-proxy/patches/patch-m4_ax__lib__mysql.m4 b/zabbix64-proxy/patches/patch-m4_ax__lib__mysql.m4
deleted file mode 100644
index 18c2022972..0000000000
--- a/zabbix64-proxy/patches/patch-m4_ax__lib__mysql.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-m4_ax__lib__mysql.m4,v 1.1 2020/11/03 22:45:39 otis Exp $
-
-Fix bash-ism.
-
---- m4/ax_lib_mysql.m4.orig 2020-08-24 09:42:55.000000000 +0000
-+++ m4/ax_lib_mysql.m4
-@@ -236,7 +236,7 @@ AC_DEFUN([AX_LIB_MYSQL],
- LDFLAGS="${LDFLAGS} ${MYSQL_LDFLAGS}"
- LIBS="${LIBS} ${MYSQL_LIBS}"
- LIBMYSQL_TLS_TRY_LINK([no])
-- if test "$found_mysql_tls" == "yes"; then
-+ if test "$found_mysql_tls" = "yes"; then
- LIBMYSQL_TLS_CIPHERS_TRY_LINK([no])
- else
- LIBMARIADB_TLS_TRY_LINK([no])
diff --git a/zabbix64-proxy/patches/patch-m4_libssh.m4 b/zabbix64-proxy/patches/patch-m4_libssh.m4
deleted file mode 100644
index 57f3b920da..0000000000
--- a/zabbix64-proxy/patches/patch-m4_libssh.m4
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-m4_libssh.m4,v 1.1 2020/11/03 22:45:39 otis Exp $
-
-Fix libssh >= 0.9.5 detection.
-
---- m4/libssh.m4.orig 2020-05-10 17:36:06.000000000 +0000
-+++ m4/libssh.m4
-@@ -83,13 +83,19 @@ AC_HELP_STRING([--with-ssh@<:@=DIR@:>@],
- SSH_LDFLAGS=-L/usr/lib
- SSH_LIBS="-lssh"
- found_ssh="yes"
-- LIBSSH_ACCEPT_VERSION([/usr/include/libssh/libssh.h])
-+ LIBSSH_ACCEPT_VERSION([/usr/include/libssh/libssh_version.h])
-+ if test "x$accept_ssh_version" = "xno"; then
-+ LIBSSH_ACCEPT_VERSION([/usr/include/libssh/libssh.h])
-+ fi
- elif test -f /usr/local/include/libssh/libssh.h; then
- SSH_CFLAGS=-I/usr/local/include
- SSH_LDFLAGS=-L/usr/local/lib
- SSH_LIBS="-lssh"
- found_ssh="yes"
-- LIBSSH_ACCEPT_VERSION([/usr/local/include/libssh/libssh.h])
-+ LIBSSH_ACCEPT_VERSION([/usr/local/include/libssh/libssh_version.h])
-+ if test "x$accept_ssh_version" = "xno"; then
-+ LIBSSH_ACCEPT_VERSION([/usr/local/include/libssh/libssh.h])
-+ fi
- else #libraries are not found in default directories
- found_ssh="no"
- AC_MSG_RESULT(no)
-@@ -100,7 +106,10 @@ AC_HELP_STRING([--with-ssh@<:@=DIR@:>@],
- SSH_LDFLAGS=-L$_libssh_dir/lib
- SSH_LIBS="-lssh"
- found_ssh="yes"
-- LIBSSH_ACCEPT_VERSION([$_libssh_dir/include/libssh/libssh.h])
-+ LIBSSH_ACCEPT_VERSION([$_libssh_dir/include/libssh/libssh_version.h])
-+ if test "x$accept_ssh_version" = "xno"; then
-+ LIBSSH_ACCEPT_VERSION([$_libssh_dir/include/libssh/libssh.h])
-+ fi
- else #if test -f $_libssh_dir/include/libssh/libssh.h; then
- found_ssh="no"
- AC_MSG_RESULT(no)
diff --git a/zabbix64-proxy/patches/patch-m4_pcre.m4 b/zabbix64-proxy/patches/patch-m4_pcre.m4
deleted file mode 100644
index 32d81bb941..0000000000
--- a/zabbix64-proxy/patches/patch-m4_pcre.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Fix bash-isms.
-
---- m4/pcre.m4.orig 2023-08-22 08:10:21.991666838 +0000
-+++ m4/pcre.m4
-@@ -194,7 +194,7 @@ AS_HELP_STRING([--with-libpcre@<:@=DIR@:
- if test "x$enable_static" = "xyes"; then
- LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- AC_MSG_WARN([compiler has no direct suppor for static linkage])
-
- if test -n "$libpcre_lib_dir"; then
diff --git a/zabbix64-proxy/patches/patch-m4_pcre2.m4 b/zabbix64-proxy/patches/patch-m4_pcre2.m4
deleted file mode 100644
index 851eed6ee5..0000000000
--- a/zabbix64-proxy/patches/patch-m4_pcre2.m4
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Fix bash-isms.
-
---- m4/pcre2.m4.orig 2023-08-22 08:10:21.991666838 +0000
-+++ m4/pcre2.m4
-@@ -195,7 +195,7 @@ AS_HELP_STRING([--with-libpcre2@<:@=DIR@
- if test "x$enable_static" = "xyes"; then
- LIBPCRE2_LIBS=" $LIBPCRE2_LIBS -lpthread"
- elif test "x$enable_static_libs" = "xyes"; then
-- if test "x$static_linking_support" == "xno"; then
-+ if test "x$static_linking_support" = "xno"; then
- AC_MSG_WARN([compiler has no direct suppor for static linkage])
-
- if test -n "$libpcre2_lib_dir"; then
diff --git a/zabbix64-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c b/zabbix64-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
deleted file mode 100644
index f17fbe5d88..0000000000
--- a/zabbix64-proxy/patches/patch-src_libs_zbxsysinfo_netbsd_net.c
+++ /dev/null
@@ -1,200 +0,0 @@
-$NetBSD: patch-src_libs_zbxsysinfo_netbsd_net.c,v 1.1 2020/11/03 22:44:43 otis Exp $
-
-Rework interface statistics code from using kvm to using sysctl interface.
-
---- ./src/libs/zbxsysinfo/netbsd/net.c.orig 2023-03-31 17:00:35.695821069 +0900
-+++ ./src/libs/zbxsysinfo/netbsd/net.c 2023-04-08 09:46:44.490286215 +0900
-@@ -23,6 +23,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},
-@@ -30,6 +33,21 @@
- {NULL, 0, 0, 0, 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,
-@@ -37,36 +55,72 @@
- zbx_uint64_t *icollisions, char **error)
- {
- #define IFNET_ID 0
-- struct ifnet_head head;
-- struct ifnet *ifp;
-- struct ifnet v;
-+ 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;
-
-- kvm_t *kp;
-- 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 (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;
- }
-
-- 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;
-+ lim = buf + len;
-+ for (next = buf; next < lim; next += rtm->rtm_msglen) {
-+ rtm = (struct rt_msghdr *)next;
-
-- if (N_UNDF != kernel_symbols[IFNET_ID].n_type)
-- {
-- int len = sizeof(struct ifnet_head);
-+ if ((rtm->rtm_version == RTM_VERSION) &&
-+ (rtm->rtm_type == RTM_IFINFO)) {
-+ ifm = (struct if_msghdr *)next;
-+ ifd = &ifm->ifm_data;
-
-- if (kvm_read(kp, kernel_symbols[IFNET_ID].n_value, &head, len) >= len)
-- {
-- len = sizeof(struct ifnet);
-+ 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 */
-@@ -100,42 +154,38 @@
- 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 --git a/zabbix64-proxy/patches/patch-src_zabbix__proxy_Makefile.am b/zabbix64-proxy/patches/patch-src_zabbix__proxy_Makefile.am
deleted file mode 100644
index 875af04efe..0000000000
--- a/zabbix64-proxy/patches/patch-src_zabbix__proxy_Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-src_zabbix__proxy_Makefile.am,v 1.1 2020/11/03 22:45:39 otis Exp $
-
-Install config file to component's example directory.
-
---- src/zabbix_proxy/Makefile.am.orig 2020-08-24 09:42:55.000000000 +0000
-+++ src/zabbix_proxy/Makefile.am
-@@ -97,4 +97,4 @@ install-data-hook:
- $(MKDIR_P) "$(DESTDIR)$(PROXY_CONFIG_FILE).d"
- $(MKDIR_P) "$(DESTDIR)$(EXTERNAL_SCRIPTS_PATH)"
- $(MKDIR_P) "$(DESTDIR)$(LOAD_MODULE_PATH)"
-- test -f "$(DESTDIR)$(PROXY_CONFIG_FILE)" || cp "../../conf/zabbix_proxy.conf" "$(DESTDIR)$(PROXY_CONFIG_FILE)"
-+ $(INSTALL_DATA) "../../conf/zabbix_proxy.conf" "$(DESTDIR)/${PREFIX}/share/examples/%%PKGBASE%%"
Home |
Main Index |
Thread Index |
Old Index