package/zabbix: new package
PATCH 1/1 package/zabbix: new package
--- DEVELOPERS | 3 + package/Config.in | 1 + package/zabbix/Config.in | 122 +++++++++++++++++++++ package/zabbix/zabbix-agent.service | 17 +++ package/zabbix/zabbix-server.service | 17 +++ package/zabbix/zabbix.hash | 3 + package/zabbix/zabbix.mk | 154 +++++++++++++++++++++++++++ 7 files changed, 317 insertions(+) create mode 100644 package/zabbix/Config.in create mode 100644 package/zabbix/zabbix-agent.service create mode 100644 package/zabbix/zabbix-server.service create mode 100644 package/zabbix/zabbix.hash create mode 100644 package/zabbix/zabbix.mk
DEVELOPERS +3 -0
@@ -155,6 +155,9 @@ N: Alexey Brodkin <[email protected]> F: board/cubietech/cubieboard2/ F: configs/cubieboard2_defconfig +N: Alexey Lukyanchuk <[email protected]> +F: package/zabbix/ + N: Alistair Francis <[email protected]> F: board/sifive/ F: boot/opensbi/
package/Config.in +1 -0
@@ -2234,6 +2234,7 @@ endif source "package/xinetd/Config.in" source "package/xl2tp/Config.in" source "package/xtables-addons/Config.in" + source "package/zabbix/Config.in" source "package/znc/Config.in" endmenu
package/zabbix/Config.in new file +122 -0
122 lines not on this page · raw message
package/zabbix/zabbix-agent.service new file +17 -0
@@ -0,0 +1,17 @@ +[Unit] +Description=Zabbix Agent Daemon +After=network.target + +[Service] +Type=forking +ExecStart=/usr/sbin/zabbix_agentd +ExecReload=/usr/sbin/zabbix_agentd -R config_cache_reload +RuntimeDirectory=zabbix +PIDFile=/run/zabbix/zabbix_agentd.pid +User=zabbix +Group=zabbix +WatchdogSec=30s +Restart=on-failure + +[Install] +WantedBy=multi-user.target
package/zabbix/zabbix-server.service new file +17 -0
@@ -0,0 +1,17 @@ +[Unit] +Description=Zabbix Server Daemon +After=network.target + +[Service] +Type=forking +ExecStart=/usr/sbin/zabbix_server +ExecReload=/usr/sbin/zabbix_server -R config_cache_reload +RuntimeDirectory=zabbix +PIDFile=/run/zabbix/zabbix_server.pid +User=zabbix +Group=zabbix +WatchdogSec=30s +Restart=on-failure + +[Install] +WantedBy=multi-user.target
package/zabbix/zabbix.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed +sha256 22bb28e667424ad4688f47732853f4241df0e78a7607727b043d704ba726ae0e zabbix-4.4.6.tar.gz +sha256 a823e00bc7f0844874f90fee97136f178e7debc76bace5f09e15ee8ed55f04c3 README
package/zabbix/zabbix.mk new file +154 -0
154 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 1/1 package/zabbix: new package
Hello,
Quoted 1 line · On Thu, 23 Apr 2020 10:17:52 +0300 Alexey Lukyanchuk <[email protected]> wrote:
Signed-off-by Alexey Lukyanchuk <[email protected]>
Is this a v9 ? What are the changes compared to the v8 you posted some time ago ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/zabbix: new package
No changes. Is the previous version considered? Does it need corrections?
Also, please see the patches for cups, cups filters, qpdf and ghostscript. They really need
--?
Regards,
Alexey Lukyanchuk
skif at skif-web.ru
23.04.2020, 22:45, "Thomas Petazzoni" <[email protected]>:
Quoted 17 lines
Hello,
Quoted 1 line · On Thu, 23 Apr 2020 10:17:52 +0300 Alexey Lukyanchuk <[email protected]> wrote:
?Signed-off-by: Alexey Lukyanchuk <[email protected]>
Is this a v9 ? What are the changes compared to the v8 you posted some time ago ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Arnout Vandecappelle
AppliedQuoted 1 line · Alexey Lukyanchuk
Signed-off-by Alexey Lukyanchuk <[email protected]>
Applied to master, thanks. I made the following changes.
- BR2_TOOLCHAIN_USES_GLIBC implies the other glibc options.
- Fix wrapping in Config.in help text.
- Add upstream URL.
- Protect comments with "depends on" instead of "if".
- Select postgresl/mysql instead of depends (and propagate dependencies).
- Remove redundant condition around BR2_PACKAGE_ZABBIX_SERVER_COPY_DUMPS.
- Select PHP extensions instead of depends.
- Make optional dependencies automatic instead of Config.in.
- Improve some of the help texts.
- Bump to 5.4.9 and update hashes.
- Add COPYING as license file.
- Switch to actual upstream at zabbix.com.
- Explicitly disable all unused features.
- Disable zabbix user login with '*'.
- Don't add user to zabbix group twice.
- Do patch of zabbix_*.conf in post-patch hook and do it for all conf files in one shot.
- Remove workarounds for pending patches (which were merged).
- Put web ui in /var/www/zabbix and SQL files in /var/lib/zabbix.
Sorry it took so long, but it still took me three hours to make all of the
above fixes and maintainer time is scarce.
Regards,
Arnout
Quoted 375 lines
--- DEVELOPERS | 3 + package/Config.in | 1 + package/zabbix/Config.in | 122 +++++++++++++++++++++ package/zabbix/zabbix-agent.service | 17 +++ package/zabbix/zabbix-server.service | 17 +++ package/zabbix/zabbix.hash | 3 + package/zabbix/zabbix.mk | 154 +++++++++++++++++++++++++++ 7 files changed, 317 insertions(+)create mode 100644 package/zabbix/Config.in create mode 100644 package/zabbix/zabbix-agent.service create mode 100644 package/zabbix/zabbix-server.service create mode 100644 package/zabbix/zabbix.hash create mode 100644
package/zabbix/zabbix.mkDEVELOPERS +3
-0@@ -155,6 +155,9 @@ N: Alexey Brodkin <[email protected]> F: board/cubietech/cubieboard2/ F: configs/cubieboard2_defconfig +N: Alexey Lukyanchuk <[email protected]> +F: package/zabbix/ + N: Alistair Francis <[email protected]> F: board/sifive/ F: boot/opensbi/package/Config.in +1
-0@@ -2234,6 +2234,7 @@ endif source "package/xinetd/Config.in" source "package/xl2tp/Config.in" source "package/xtables-addons/Config.in" + source "package/zabbix/Config.in" source "package/znc/Config.in" endmenupackage/zabbix/Config.in new file +122
-0@@ -0,0 +1,122 @@ +config BR2_PACKAGE_ZABBIX + bool "zabbix" + depends on BR2_TOOLCHAIN_USES_GLIBC=y || BR2_TOOLCHAIN_EXTERNAL_GLIBC=y || BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + select BR2_PACKAGE_PCRE + help + Zabbix is an enterprise-class open source distributed + monitoring solution.Zabbix is free of cost. Zabbix + is written and distributed under the GPL General Public + License version 2. + +if (!BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_EXTERNAL_GLIBC && !BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC) +comment "zabbix need glibc" +endif + +if BR2_PACKAGE_ZABBIX + +if (!BR2_PACKAGE_POSTGRESQL && !BR2_PACKAGE_MYSQL) +comment "zabbix server needs postgresql or mysql support" +endif + +config BR2_PACKAGE_ZABBIX_SERVER + bool "zabbix server" + depends on BR2_PACKAGE_POSTGRESQL || BR2_PACKAGE_MYSQL + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBEVENT + +if BR2_PACKAGE_ZABBIX_SERVER + +choice + prompt "server database backend" + +config BR2_PACKAGE_ZABBIX_SERVER_MYSQL + bool "mysql" + depends on BR2_PACKAGE_MYSQL + +config BR2_PACKAGE_ZABBIX_SERVER_POSTGRESQL + bool "postgresql" + depends on BR2_PACKAGE_POSTGRESQL + +endchoice + +if BR2_PACKAGE_ZABBIX_SERVER_POSTGRESQL || BR2_PACKAGE_ZABBIX_SERVER_MYSQL +config BR2_PACKAGE_ZABBIX_SERVER_COPY_DUMPS + bool "install sql dumps" + help + Copy inicitial database dumps to /usr/zabbix/ +endif + +if (!BR2_PACKAGE_PHP || (!BR2_PACKAGE_PHP_EXT_MYSQLI && !BR2_PACKAGE_PHP_EXT_PGSQL) || \ + !BR2_PACKAGE_PHP_EXT_MBSTRING || !BR2_PACKAGE_PHP_EXT_BCMATH || \ + !BR2_PACKAGE_PHP_EXT_SOCKETS || !BR2_PACKAGE_PHP_EXT_GD || \ + !BR2_PACKAGE_PHP_EXT_LIBXML2 || !BR2_PACKAGE_PHP_EXT_CTYPE || \ + !BR2_PACKAGE_PHP_EXT_SESSION || !BR2_PACKAGE_PHP_EXT_XMLREADER || \ + !BR2_PACKAGE_PHP_EXT_XMLWRITER ) +comment "zabbix-frontend need php with extensions(bc, sockets, " +comment "mbstring, gd, libxml2, ctype, session, xmlreader, xmlwriter, mysql or postgresql" +endif + +choice + prompt "server ssl/tls backend" + +config BR2_PACKAGE_ZABBIX_SERVER_NOTLS + bool "none" + +config BR2_PACKAGE_ZABBIX_SERVER_OPENSSL + bool "openssl" + depends on BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_ZABBIX_SERVER_GNUTLS + bool "gnutls" + depends on BR2_PACKAGE_GNUTLS + +endchoice + +config BR2_PACKAGE_ZABBIX_SERVER_OPENIPMI + bool "openipmi support" + select BR2_PACKAGE_OPENIPMI + +config BR2_PACKAGE_ZABBIX_SERVER_LIBSSH2 + bool "libssh2 support" + select BR2_PACKAGE_LIBSSH2 + +config BR2_PACKAGE_ZABBIX_SERVER_LDAP + bool "openldap support" + select BR2_PACKAGE_OPENLDAP + +if (!BR2_USE_MMU) +comment "netsnmp support need MMU" +endif + +config BR2_PACKAGE_ZABBIX_SERVER_NETSNMP + bool "net-snmp support" + depends on BR2_USE_MMU # netsnmp + select BR2_PACKAGE_NETSNMP + +config BR2_PACKAGE_ZABBIX_SERVER_LIBCURL + bool "libcurl support" + select BR2_PACKAGE_LIBCURL + +config BR2_PACKAGE_ZABBIX_SERVER_LIBXML2 + bool "libxml2 support" + select BR2_PACKAGE_LIBXML2 + +config BR2_PACKAGE_ZABBIX_SERVER_COPY_FRONTEND + bool "copy php-frontend to target" + depends on BR2_PACKAGE_PHP + depends on BR2_PACKAGE_PHP_EXT_MYSQLI || BR2_PACKAGE_PHP_EXT_PGSQL + depends on BR2_PACKAGE_PHP_EXT_BCMATH + depends on BR2_PACKAGE_PHP_EXT_SOCKETS + depends on BR2_PACKAGE_PHP_EXT_MBSTRING + depends on BR2_PACKAGE_PHP_EXT_GD + depends on BR2_PACKAGE_PHP_EXT_LIBXML2 + depends on BR2_PACKAGE_PHP_EXT_CTYPE + depends on BR2_PACKAGE_PHP_EXT_SESSION + depends on BR2_PACKAGE_PHP_EXT_XMLREADER + depends on BR2_PACKAGE_PHP_EXT_XMLWRITER + help + copy web-frontend to /usr/zabbix/php-frontend + +endif + +endifpackage/zabbix/zabbix-agent.service new file +17
-0@@ -0,0 +1,17 @@ +[Unit] +Description=Zabbix Agent Daemon +After=network.target + +[Service] +Type=forking +ExecStart=/usr/sbin/zabbix_agentd +ExecReload=/usr/sbin/zabbix_agentd -R config_cache_reload +RuntimeDirectory=zabbix +PIDFile=/run/zabbix/zabbix_agentd.pid +User=zabbix +Group=zabbix +WatchdogSec=30s +Restart=on-failure + +[Install] +WantedBy=multi-user.targetpackage/zabbix/zabbix-server.service new file +17
-0@@ -0,0 +1,17 @@ +[Unit] +Description=Zabbix Server Daemon +After=network.target + +[Service] +Type=forking +ExecStart=/usr/sbin/zabbix_server +ExecReload=/usr/sbin/zabbix_server -R config_cache_reload +RuntimeDirectory=zabbix +PIDFile=/run/zabbix/zabbix_server.pid +User=zabbix +Group=zabbix +WatchdogSec=30s +Restart=on-failure + +[Install] +WantedBy=multi-user.targetpackage/zabbix/zabbix.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally computed +sha256 22bb28e667424ad4688f47732853f4241df0e78a7607727b043d704ba726ae0e zabbix-4.4.6.tar.gz +sha256 a823e00bc7f0844874f90fee97136f178e7debc76bace5f09e15ee8ed55f04c3 READMEpackage/zabbix/zabbix.mk new file +144
-0@@ -0,0 +1,154 @@ +################################################################################ +# +# zabbix +# +################################################################################ + +ZABBIX_VERSION = 4.4.6 +ZABBIX_SITE = https://sourceforge.net/projects/zabbix/files +ZABBIX_LICENSE = GPL-2.0 +ZABBIX_LICENSE_FILES = README + +ZABBIX_DEPENDENCIES = pcre +ZABBIX_CONF_OPTS = --with-libpcre=$(STAGING_DIR)/usr/bin/ \ + --enable-agent + +ZABBIX_POST_INSTALL_TARGET_HOOKS += ZABBIX_CLIENT_CHANGE_PIDFILE_LOCATION +ZABBIX_SYSTEMD_UNITS += zabbix-agent.service + +define ZABBIX_INSTALL_INIT_SYSTEMD + $(foreach unit,$(ZABBIX_SYSTEMD_UNITS),\ + $(INSTALL) -D -m 0644 $(ZABBIX_PKGDIR)/$(unit) $(TARGET_DIR)/usr/lib/systemd/system/$(unit) && \ + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants && \ + ln -fs -r $(TARGET_DIR)/usr/lib/systemd/system/$(unit) $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/$(unit) + ) +endef + +define ZABBIX_USERS + zabbix -1 zabbix -1 !- /var/lib/zabbix - zabbix zabbix user +endef + +define ZABBIX_CLIENT_CHANGE_PIDFILE_LOCATION + $(SED) 's%\#\ PidFile=/tmp/zabbix_agentd.pid%PidFile=/run/zabbix/zabbix_agentd.pid%g' $(TARGET_DIR)/etc/zabbix_agentd.conf +endef + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER),y) +ZABBIX_SYSTEMD_UNITS += zabbix-server.service +ZABBIX_CONF_OPTS += --enable-server \ + --with-libevent \ + --with-libpthread=$(STAGING_DIR)/usr \ + --with-zlib=$(STAGING_DIR)/usr +ZABBIX_DEPENDENCIES += libevent zlib +ZABBIX_POST_INSTALL_TARGET_HOOKS += ZABBIX_SERVER_CHANGE_PIDFILE_LOCATION + +# Need openipmi in staging dir. Patch submitted at 2019.12.16 +# Before this patch enabled, use this crutch +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_OPENIPMI),y) +ZABBIX_CONF_OPTS += --with-openipmi=$(STAGING_DIR)/usr +ZABBIX_DEPENDENCIES += openipmi +ZABBIX_PRE_CONFIGURE_HOOKS += BR2_PACKAGE_ZABBIX_SERVER_OPENIPMI_FIX_LIBS + +define BR2_PACKAGE_ZABBIX_SERVER_OPENIPMI_FIX_LIBS + if [ ! -f $(STAGING_DIR)/usr/lib/libOpenIPMI.so ]; then \ + cp -rf $(TARGET_DIR)/usr/lib/libOpenIPMI* $(STAGING_DIR)/usr/lib/ ;\ + cp -rf $(TARGET_DIR)/usr/include/OpenIPMI $(STAGING_DIR)/usr/include/ ;\ + fi +endef +endif + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_LIBCURL),y) +ZABBIX_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr/bin/curl-config +ZABBIX_DEPENDENCIES += libcurl +endif + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_LIBXML2),y) +ZABBIX_CONF_OPTS += --with-libxml2=$(STAGING_DIR)/usr/bin/xml2-config +ZABBIX_DEPENDENCIES += libxml2 +endif + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_NETSNMP),y) +ZABBIX_CONF_OPTS += --with-net-snmp=$(STAGING_DIR)/usr/bin/net-snmp-config +ZABBIX_DEPENDENCIES += netsnmp +endif + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_LDAP),y) +ZABBIX_CONF_OPTS += --with-ldap=$(STAGING_DIR)/usr +ZABBIX_DEPENDENCIES += openldap +endif + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_LIBSSH2),y) +ZABBIX_CONF_OPTS += --with-ssh2=$(STAGING_DIR)/usr +ZABBIX_DEPENDENCIES += libssh2 +endif + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_OPENSSL),y) +ZABBIX_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr +ZABBIX_DEPENDENCIES += openssl +else ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_GNUTLS),y) +ZABBIX_CONF_OPTS += --with-gnutls=$(STAGING_DIR)/usr +ZABBIX_DEPENDENCIES += gnutls +endif + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_COPY_FRONTEND),y) +ZABBIX_POST_INSTALL_TARGET_HOOKS += ZABBIX_SERVER_COPY_FRONTEND + +define ZABBIX_SERVER_COPY_FRONTEND + mkdir -p $(TARGET_DIR)/usr/zabbix/php-frontend/ + cp -r $(@D)/frontends/php/* $(TARGET_DIR)/usr/zabbix/php-frontend/ +endef + +endif + +define ZABBIX_SERVER_CHANGE_PIDFILE_LOCATION + $(SED) 's%\#\ PidFile=/tmp/zabbix_server.pid%PidFile=/run/zabbix/zabbix_server.pid%g' $(TARGET_DIR)/etc/zabbix_server.conf +endef + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_MYSQL),y) +ZABBIX_DEPENDENCIES += mysql +ZABBIX_CONF_OPTS += --with-mysql=$(STAGING_DIR)/usr/bin/mysql_config +# Need package/mariadb/0003-add-sysroot-path-to-mariadb_config.patch by Ryan Coe +# While this patch not included, use this crutch +ZABBIX_PRE_CONFIGURE_HOOKS += ZABBIX_DISABLE_MARIADB_CONFIG +ZABBIX_POST_CONFIGURE_HOOKS += ZABBIX_ENABLE_MARIADB_CONFIG + +define ZABBIX_DISABLE_MARIADB_CONFIG + if [ -f "$(STAGING_DIR)/usr/bin/mariadb_config" ]; then \ + mv $(STAGING_DIR)/usr/bin/mariadb_config $(STAGING_DIR)/usr/bin/mariadb_config_save; \ + fi +endef + +define ZABBIX_ENABLE_MARIADB_CONFIG + if [ -f "$(STAGING_DIR)/usr/bin/mariadb_confi_save" ]; then \ + mv $(STAGING_DIR)/usr/bin/mariadb_config_save $(STAGING_DIR)/usr/bin/mariadb_config; \ + fi +endef + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_COPY_DUMPS),y) +ZABBIX_POST_INSTALL_TARGET_HOOKS += ZABBIX_SERVER_PREPARE_MYSQL +endif + +define ZABBIX_SERVER_PREPARE_MYSQL + mkdir -p $(TARGET_DIR)/usr/zabbix/mysql_schema/ + cp -r $(@D) $(@D)/database/mysql/*\.sql $(TARGET_DIR)/usr/zabbix/mysql_schema/ +endef + +endif + +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_POSTGRESQL),y) +ZABBIX_DEPENDENCIES += postgresql +ZABBIX_CONF_OPTS += --with-postgresql=$(STAGING_DIR)/usr/bin/pg_config + +define ZABBIX_SERVER_PREPARE_POSTGRESQL + mkdir -p $(TARGET_DIR)/usr/zabbix/postgresql_schema + cp -r $(@D)/database/postgresql/*\.sql $(TARGET_DIR)/usr/zabbix/postgresql_schema/ +endef
package/zabbix/zabbix.mk line 154
Quoted 10 lines
package/zabbix/zabbix.mk new file +10
-0+ +ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_COPY_DUMPS),y) +ZABBIX_POST_INSTALL_TARGET_HOOKS += ZABBIX_SERVER_PREPARE_POSTGRESQL +endif + +endif + +endif + +$(eval $(autotools-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot