commit: 318037cd0a754f8270f413183ed3b1a245d6a2e3
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 9 16:22:30 2022 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Mar 9 16:22:30 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=318037cd
net-analyzer/zabbix: fixed server crash in 6.0.1
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
.../files/zabbix-6.0.1-fix-server-crash.patch | 40 ++++++++++++++++++++++
...{zabbix-6.0.1.ebuild => zabbix-6.0.1-r1.ebuild} | 1 +
2 files changed, 41 insertions(+)
diff --git a/net-analyzer/zabbix/files/zabbix-6.0.1-fix-server-crash.patch
b/net-analyzer/zabbix/files/zabbix-6.0.1-fix-server-crash.patch
new file mode 100644
index 000000000000..e104fe5758f0
--- /dev/null
+++ b/net-analyzer/zabbix/files/zabbix-6.0.1-fix-server-crash.patch
@@ -0,0 +1,40 @@
+diff --git a/src/libs/zbxdbcache/dbconfig.c b/src/libs/zbxdbcache/dbconfig.c
+index f0f5f10..608c6e2 100644
+--- a/src/libs/zbxdbcache/dbconfig.c
++++ b/src/libs/zbxdbcache/dbconfig.c
+@@ -4128,6 +4128,9 @@ static void
dc_schedule_trigger_timers(zbx_hashset_t *trend_queue, int now)
+ if (NULL == (trigger = (ZBX_DC_TRIGGER
*)zbx_hashset_search(&config->triggers, &function->triggerid)))
+ continue;
+
++ if (ZBX_FLAG_DISCOVERY_PROTOTYPE == trigger->flags)
++ continue;
++
+ if (TRIGGER_STATUS_ENABLED != trigger->status ||
TRIGGER_FUNCTIONAL_TRUE != trigger->functional)
+ continue;
+
+@@ -5659,7 +5662,12 @@ static void dc_trigger_update_topology(void)
+
+ zbx_hashset_iter_reset(&config->triggers, &iter);
+ while (NULL != (trigger = (ZBX_DC_TRIGGER
*)zbx_hashset_iter_next(&iter)))
++ {
++ if (ZBX_FLAG_DISCOVERY_PROTOTYPE == trigger->flags)
++ continue;
++
+ trigger->topoindex = 1;
++ }
+
+ DCconfig_sort_triggers_topologically();
+ }
+@@ -5806,6 +5814,12 @@ static void dc_trigger_update_cache(void)
+ continue;
+ }
+
++ if (ZBX_FLAG_DISCOVERY_PROTOTYPE == trigger->flags)
++ {
++ trigger->functional = TRIGGER_FUNCTIONAL_FALSE;
++ continue;
++ }
++
+ /* cache item - trigger link */
+ if (0 != item->update_triggers)
+ {
diff --git a/net-analyzer/zabbix/zabbix-6.0.1.ebuild
b/net-analyzer/zabbix/zabbix-6.0.1-r1.ebuild
similarity index 99%
rename from net-analyzer/zabbix/zabbix-6.0.1.ebuild
rename to net-analyzer/zabbix/zabbix-6.0.1-r1.ebuild
index 2f4dde8f1762..cac6ad8a798e 100644
--- a/net-analyzer/zabbix/zabbix-6.0.1.ebuild
+++ b/net-analyzer/zabbix/zabbix-6.0.1-r1.ebuild
@@ -361,6 +361,7 @@ RESTRICT="test"
PATCHES=(
"${FILESDIR}/${PN}-4.0.18-modulepathfix.patch"
"${FILESDIR}/${PN}-3.0.30-security-disable-PidFile.patch"
+ "${FILESDIR}/${P}-fix-server-crash.patch"
)
S=${WORKDIR}/${MY_P}