Skip to contentSkip to conversation

package/zabbix: update to 7.0.3

PATCH In review Waldemar Brodkorb 2 participants 4 messages Aug 29, 2024 – Sep 14, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/zabbix: update to 7.0.3

Update to maintained and stable 7.0.3 version.

Patch 0002 does no longer apply. Libressl support is not supported for our version of Libressl.

It is required to start the daemons with -f otherwise they are restarted every 30 seconds.

---
What is the correct way to disable libressl and only allow openssl?

---
 DEVELOPERS                                    |  1 +
 .../0002-fix-build-with-libressl-3.5.0.patch  | 71 -------------------
 package/zabbix/zabbix-agent.service           |  2 +-
 package/zabbix/zabbix-server.service          |  2 +-
 package/zabbix/zabbix.hash                    |  2 +-
 package/zabbix/zabbix.mk                      |  6 +-
 6 files changed, 7 insertions(+), 77 deletions(-)
 delete mode 100644 package/zabbix/0002-fix-build-with-libressl-3.5.0.patch
DEVELOPERS +1 -0
index 570f4ff115..566be87949 100644
@@ -3308,6 +3308,7 @@ F:	package/mksh/
 F:	package/ruby/
 F:	package/uclibc/
 F:	package/uclibc-ng-test/
+F:	package/zabbix/
 F:	support/testing/tests/package/test_ruby.py
 
 N:	Will Newton <[email protected]>
package/zabbix/0002-fix-build-with-libressl-3.5.0.patch deleted +0 -71

71 lines not on this page · raw message

package/zabbix/zabbix-agent.service +1 -1
index 8b4f45a4fc..7e06636a2a 100644
@@ -4,7 +4,7 @@ After=network.target
  
 [Service]
 Type=forking
-ExecStart=/usr/sbin/zabbix_agentd
+ExecStart=/usr/sbin/zabbix_agentd -f
 ExecReload=/usr/sbin/zabbix_agentd -R config_cache_reload
 RuntimeDirectory=zabbix
 PIDFile=/run/zabbix/zabbix_agentd.pid
package/zabbix/zabbix-server.service +1 -1
index b8ba0d1707..52ed5df1ea 100644
@@ -4,7 +4,7 @@ After=network.target
  
 [Service]
 Type=forking
-ExecStart=/usr/sbin/zabbix_server
+ExecStart=/usr/sbin/zabbix_server -f
 ExecReload=/usr/sbin/zabbix_server -R config_cache_reload
 RuntimeDirectory=zabbix
 PIDFile=/run/zabbix/zabbix_server.pid
package/zabbix/zabbix.hash +1 -1
index bb6127e5ec..4648ed8b71 100644
@@ -1,4 +1,4 @@
 # Locally computed
-sha256  6d423810667b948ed22052d9aa84a035e2d4b92cbe8efdb669cac529806b722d  zabbix-6.2.7.tar.gz
+sha256  173059f57f11716146da79345e5a6bc52eceee6a5c4410664b8500a955598b2a  zabbix-7.0.3.tar.gz
 sha256  f8fc3fd12521b60d53d8c5d48a883eb3c9c5ddec9de986a273e1b77f69d811db  README
 sha256  444fe54aecc95ac0f3314289c300afc73b3946a4dc9fbd7e022709b3e0924dd0  COPYING
package/zabbix/zabbix.mk +3 -3
index 76568f5a18..9c21e9621d 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-ZABBIX_VERSION_MAJOR = 6.2
-ZABBIX_VERSION = $(ZABBIX_VERSION_MAJOR).7
+ZABBIX_VERSION_MAJOR = 7.0
+ZABBIX_VERSION = $(ZABBIX_VERSION_MAJOR).3
 ZABBIX_SITE = https://cdn.zabbix.com/zabbix/sources/stable/$(ZABBIX_VERSION_MAJOR)
 ZABBIX_SELINUX_MODULES = zabbix
 ZABBIX_LICENSE = GPL-2.0+
@@ -50,7 +50,7 @@ ZABBIX_CONF_OPTS += --without-libcurl
 endif
 
 ifeq ($(BR2_PACKAGE_LIBXML2),y)
-ZABBIX_CONF_OPTS += --with-libxml2=$(STAGING_DIR)/usr/bin/xml2-config
+ZABBIX_CONF_OPTS += --with-libxml2=$(STAGING_DIR)/usr
 ZABBIX_DEPENDENCIES += libxml2
 else
 ZABBIX_CONF_OPTS += --without-libxml2
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi Waldemar,

Quoted 5 lines · Waldemar Brodkorb

Update to maintained and stable 7.0.3 version.

Patch 0002 does no longer apply. Libressl support is not supported for our version of Libressl.

Quoted 7 lines

It is required to start the daemons with -f otherwise they are restarted every 30 seconds.

---
What is the correct way to disable libressl and only allow openssl?

Try

select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL

baruch

Quoted 165 lines
---
 DEVELOPERS                                    |  1 +
 .../0002-fix-build-with-libressl-3.5.0.patch  | 71 -------------------
 package/zabbix/zabbix-agent.service           |  2 +-
 package/zabbix/zabbix-server.service          |  2 +-
 package/zabbix/zabbix.hash                    |  2 +-
 package/zabbix/zabbix.mk                      |  6 +-
 6 files changed, 7 insertions(+), 77 deletions(-)
 delete mode 100644 package/zabbix/0002-fix-build-with-libressl-3.5.0.patch
DEVELOPERS +1 -0
index 570f4ff115..566be87949 100644
@@ -3308,6 +3308,7 @@ F:	package/mksh/
 F:	package/ruby/
 F:	package/uclibc/
 F:	package/uclibc-ng-test/
+F:	package/zabbix/
 F:	support/testing/tests/package/test_ruby.py
 
 N:	Will Newton <[email protected]>
package/zabbix/0002-fix-build-with-libressl-3.5.0.patch deleted +0 -11
deleted file mode 100644
index ad6960f329..0000000000
@@ -1,71 +0,0 @@
-From 5c8511384f1d41f9c2a131604d5cb2dbc1c0aec9 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Fri, 24 Feb 2023 12:23:56 +0100
-Subject: [PATCH] fix build with libressl >= 3.5.0
-
-Fix the following build failure with libressl >= 3.5.0:
-
-tls.c:113:17: error: static declaration of 'OPENSSL_cleanup' follows non-static declaration
-  113 | static void     OPENSSL_cleanup(void)
-      |                 ^~~~~~~~~~~~~~~
-In file included from

/home/thomas/autobuild/instance-3/output-1/host/mips-buildroot-linux-gnu/sysroot/usr/include/openssl/bio.h:69,
- from /home/thomas/autobuild/instance-3/output-1/host/mips-buildroot-linux-gnu/sysroot/usr/include/openssl/evp.h:67,
- from /home/thomas/autobuild/instance-3/output-1/host/mips-buildroot-linux-gnu/sysroot/usr/include/openssl/hmac.h:67,
- from /home/thomas/autobuild/instance-3/output-1/host/mips-buildroot-linux-gnu/sysroot/usr/include/openssl/ssl.h:150,

package/zabbix/0002-fix-build-with-libressl-3.5.0.patch deleted +0 -3
-                 from ../../../include/zbxcomms.h:65,
-                 from tls.c:20:
-/home/thomas/autobuild/instance-3/output-1/host/mips-buildroot-linux-gnu/sysroot/usr/include/openssl/crypto.h:565:6:

note: previous declaration of 'OPENSSL_cleanup' with type 'void(void)'

package/zabbix/0002-fix-build-with-libressl-3.5.0.patch deleted +0 -54
-  565 | void OPENSSL_cleanup(void);
-      |      ^~~~~~~~~~~~~~~
-In file included from tls.c:20:
-tls.c: In function 'zbx_log_ciphersuites':
-../../../include/zbxcomms.h:222:75: error: invalid use of incomplete typedef 'SSL_CTX' {aka 'struct ssl_ctx_st'}
-  222 | #       define SSL_CTX_get_ciphers(ciphers)                     ((ciphers)->cipher_list)
-      |                                                                           ^~
-tls.c:1415:31: note: in expansion of macro 'SSL_CTX_get_ciphers'
- 1415 |                 cipher_list = SSL_CTX_get_ciphers(ciphers);
-      |                               ^~~~~~~~~~~~~~~~~~~
-
-Fixes:
- - http://autobuild.buildroot.org/results/acdfcb17b39d438ccf5e4621707a10f60577d233
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
-Upstream: not sent (no feedback on first patch)
----
- include/zbxcomms.h      | 3 ++-
- src/libs/zbxcomms/tls.c | 5 +++--
- 2 files changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/include/zbxcomms.h b/include/zbxcomms.h
-index e7d74dbd0f..d6efa358fe 100644
---- a/include/zbxcomms.h
-+++ b/include/zbxcomms.h
-@@ -253,7 +253,8 @@ int	zbx_telnet_execute(ZBX_SOCKET socket_fd, const char *command, AGENT_RESULT *
- /* TLS BLOCK */
- #if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL)
- 
--#if defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER)
-+#if defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER < 0x1010000fL || \
-+	defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL
- #	if !defined(LIBRESSL_VERSION_NUMBER)
- #		define OPENSSL_INIT_LOAD_SSL_STRINGS			0
- #		define OPENSSL_INIT_LOAD_CRYPTO_STRINGS		0
-diff --git a/src/libs/zbxcomms/tls.c b/src/libs/zbxcomms/tls.c
-index 54ab0a6ef4..bd4075b3e4 100644
---- a/src/libs/zbxcomms/tls.c
-+++ b/src/libs/zbxcomms/tls.c
-@@ -28,8 +28,9 @@
- #include "log.h"
- #include "zbxcrypto.h"
- 
--#if defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER < 0x1010000fL || defined(LIBRESSL_VERSION_NUMBER)
--/* for OpenSSL 1.0.1/1.0.2 (before 1.1.0) or LibreSSL */
-+#if defined(HAVE_OPENSSL) && OPENSSL_VERSION_NUMBER < 0x1010000fL || \
-+	defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL
-+/* for OpenSSL 1.0.1/1.0.2 (before 1.1.0) or LibreSSL (before 3.5.0) */
- 
- /* mutexes for multi-threaded OpenSSL (see "man 3ssl threads" and example in crypto/threads/mttest.c) */
- 
--- 
-2.39.1
-
package/zabbix/zabbix-agent.service +1 -1
index 8b4f45a4fc..7e06636a2a 100644
@@ -4,7 +4,7 @@ After=network.target
 
 [Service]
 Type=forking
-ExecStart=/usr/sbin/zabbix_agentd
+ExecStart=/usr/sbin/zabbix_agentd -f
 ExecReload=/usr/sbin/zabbix_agentd -R config_cache_reload
 RuntimeDirectory=zabbix
 PIDFile=/run/zabbix/zabbix_agentd.pid
package/zabbix/zabbix-server.service +1 -1
index b8ba0d1707..52ed5df1ea 100644
@@ -4,7 +4,7 @@ After=network.target
 
 [Service]
 Type=forking
-ExecStart=/usr/sbin/zabbix_server
+ExecStart=/usr/sbin/zabbix_server -f
 ExecReload=/usr/sbin/zabbix_server -R config_cache_reload
 RuntimeDirectory=zabbix
 PIDFile=/run/zabbix/zabbix_server.pid
package/zabbix/zabbix.hash +1 -1
index bb6127e5ec..4648ed8b71 100644
@@ -1,4 +1,4 @@
 # Locally computed
-sha256  6d423810667b948ed22052d9aa84a035e2d4b92cbe8efdb669cac529806b722d  zabbix-6.2.7.tar.gz
+sha256  173059f57f11716146da79345e5a6bc52eceee6a5c4410664b8500a955598b2a  zabbix-7.0.3.tar.gz
 sha256  f8fc3fd12521b60d53d8c5d48a883eb3c9c5ddec9de986a273e1b77f69d811db  README
 sha256  444fe54aecc95ac0f3314289c300afc73b3946a4dc9fbd7e022709b3e0924dd0  COPYING
package/zabbix/zabbix.mk +3 -3
index 76568f5a18..9c21e9621d 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-ZABBIX_VERSION_MAJOR = 6.2
-ZABBIX_VERSION = $(ZABBIX_VERSION_MAJOR).7
+ZABBIX_VERSION_MAJOR = 7.0
+ZABBIX_VERSION = $(ZABBIX_VERSION_MAJOR).3
 ZABBIX_SITE = https://cdn.zabbix.com/zabbix/sources/stable/$(ZABBIX_VERSION_MAJOR)
 ZABBIX_SELINUX_MODULES = zabbix
 ZABBIX_LICENSE = GPL-2.0+
@@ -50,7 +50,7 @@ ZABBIX_CONF_OPTS += --without-libcurl
 endif
 
 ifeq ($(BR2_PACKAGE_LIBXML2),y)
-ZABBIX_CONF_OPTS += --with-libxml2=$(STAGING_DIR)/usr/bin/xml2-config
+ZABBIX_CONF_OPTS += --with-libxml2=$(STAGING_DIR)/usr
 ZABBIX_DEPENDENCIES += libxml2
 else
 ZABBIX_CONF_OPTS += --without-libxml2
Signature · 7 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - [email protected] - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hello Baruch,

Quoted 3 lines · On Thu, 29 Aug 2024 07:32:48 +0300 Baruch Siach via buildroot…

Try

select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL

Yes when openssl is selected, but here it's an optional dependency. I've not seen other packages where we do:

select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL if BR2_PACKAGE_OPENSSL

so instead, I've used

ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)

in zabbix.mk to decide whether to enable OpenSSL support or not.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Waldemar Brodkorb
Quoted 4 lines · On Thu, 29 Aug 2024 02:16:55 +0200 Waldemar Brodkorb <[email protected]> wrote:

Update to maintained and stable 7.0.3 version.

Patch 0002 does no longer apply. Libressl support is not supported for our version of Libressl.

I've handled this by changing:

ifeq ($(BR2_PACKAGE_OPENSSL),y)

to:

ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)

in zabbix.mk.

Applied with this change, plus a follow-up commit to fix option indentation (unrelated to the version bump).

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot