bump version to 2022.02.9

add miyoo_defconfig
This commit is contained in:
tiopex
2023-01-31 13:11:45 +01:00
parent 1fa746c353
commit dcdaa3599c
8423 changed files with 184305 additions and 91107 deletions

View File

@@ -0,0 +1,44 @@
From 3e810c0804ec40ad6e111a9791cdb2033ecdad71 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 25 Feb 2022 23:30:19 +0100
Subject: [PATCH] m4/netsnmp.m4: fix shared netsnmp build
Since commit fe391e8689c523d3c7ea6b173d25aa5dba3a6902, the build fails
with the following error if the user provides the path of
net-snmp-config through the --with-net-snmp option:
configure: error: "libnetsnmp.a static library was not found in /home/buildroot/autobuild/instance-0/output-1/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/bin/../../usr/lib"
However, the assumption that a static library will be provided by the
system is just plain wrong so replace AC_MSG_ERROR by AC_MSG_WARN
Fixes:
- http://autobuild.buildroot.org/results/0f541e45d1fa27b3302968683bf64949131ec1c9
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/zabbix/zabbix/pull/61]
---
m4/netsnmp.m4 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/m4/netsnmp.m4 b/m4/netsnmp.m4
index 5e84d84303..87e21a67e6 100644
--- a/m4/netsnmp.m4
+++ b/m4/netsnmp.m4
@@ -140,8 +140,11 @@ AC_HELP_STRING([--with-net-snmp@<:@=ARG@:>@],
test [ "x$static_linking_support" = "xno" -o -z "$static_linking_support" ] -a -z "$_libsnmp_dir_lib" && AC_MSG_ERROR(["Compiler not support statically linked libs from default folders"])
if test "x$static_linking_support" = "xno" -o -z "$static_linking_support"; then
- test -f $_libsnmp_dir_lib/libnetsnmp.a || AC_MSG_ERROR(["libnetsnmp.a static library was not found in $_libsnmp_dir_lib"])
- SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s|-lnetsnmp|$_libsnmp_dir_lib/libnetsnmp.a|g"`
+ if test -f $_libsnmp_dir_lib/libnetsnmp.a; then
+ SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s|-lnetsnmp|$_libsnmp_dir_lib/libnetsnmp.a|g"`
+ else
+ AC_MSG_WARN(["libnetsnmp.a static library was not found in $_libsnmp_dir_lib"])
+ fi
else
SNMP_LIBS=`echo "$SNMP_LIBS"|sed "s/-lnetsnmp/${static_linking_support}static -lnetsnmp ${static_linking_support}dynamic/g"`
fi
--
2.34.1

83
package/zabbix/Config.in Normal file
View File

@@ -0,0 +1,83 @@
config BR2_PACKAGE_ZABBIX
bool "zabbix"
depends on BR2_TOOLCHAIN_USES_GLIBC
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.
https://zabbix.com
comment "zabbix need glibc"
depends on !BR2_TOOLCHAIN_USES_GLIBC
if BR2_PACKAGE_ZABBIX
comment "zabbix server needs C++ and threads or wchar and dynamic libs"
depends on BR2_USE_MMU
depends on \
!(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) && \
!(BR2_USE_WCHAR && !BR2_STATIC_LIBS)
config BR2_PACKAGE_ZABBIX_SERVER
bool "zabbix server"
depends on BR2_USE_MMU # mysql, postgresql
depends on \
(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) || \
(BR2_USE_WCHAR && !BR2_STATIC_LIBS)
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_INSTALL_LIBSTDCPP # mysql
depends on BR2_TOOLCHAIN_HAS_THREADS # mysql
select BR2_PACKAGE_MYSQL
config BR2_PACKAGE_ZABBIX_SERVER_POSTGRESQL
bool "postgresql"
depends on BR2_USE_WCHAR # postgresql
depends on !BR2_STATIC_LIBS # postgresql
depends on !BR2_OPTIMIZE_FAST # postgresql
select BR2_PACKAGE_POSTGRESQL
endchoice
config BR2_PACKAGE_ZABBIX_SERVER_COPY_DUMPS
bool "install SQL dumps"
help
Copy initial database dumps to /var/lib/zabbix/schema
These still need to be imported into the database by hand.
config BR2_PACKAGE_ZABBIX_SERVER_COPY_FRONTEND
bool "install web UI to target"
depends on BR2_PACKAGE_PHP # runtime
select BR2_PACKAGE_PHP_EXT_MYSQLI if BR2_PACKAGE_ZABBIX_SERVER_MYSQL
select BR2_PACKAGE_PHP_EXT_PGSQL if BR2_PACKAGE_ZABBIX_SERVER_POSTGRESQL
select BR2_PACKAGE_PHP_EXT_BCMATH
select BR2_PACKAGE_PHP_EXT_SOCKETS
select BR2_PACKAGE_PHP_EXT_MBSTRING
select BR2_PACKAGE_PHP_EXT_GD
select BR2_PACKAGE_PHP_EXT_LIBXML2
select BR2_PACKAGE_PHP_EXT_CTYPE
select BR2_PACKAGE_PHP_EXT_SESSION
select BR2_PACKAGE_PHP_EXT_XMLREADER
select BR2_PACKAGE_PHP_EXT_XMLWRITER
help
Copy web-UI to /var/www/zabbix. You need to set up a web
server to access it.
comment "zabbix web UI requires PHP"
depends on !BR2_PACKAGE_PHP
endif
endif

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,4 @@
# Locally computed
sha256 19686628df76e8d5ef7c2ed2975b258c7ca3ec7d151b1bb59d7e132f9fc7c941 zabbix-5.4.9.tar.gz
sha256 10d68ec3abacc29222c07748fc5e5cb9474fd7cd9ccdde1b92ff941ded946b78 README
sha256 444fe54aecc95ac0f3314289c300afc73b3946a4dc9fbd7e022709b3e0924dd0 COPYING

136
package/zabbix/zabbix.mk Normal file
View File

@@ -0,0 +1,136 @@
################################################################################
#
# zabbix
#
################################################################################
ZABBIX_VERSION_MAJOR = 5.4
ZABBIX_VERSION = $(ZABBIX_VERSION_MAJOR).9
ZABBIX_SITE = https://cdn.zabbix.com/zabbix/sources/stable/$(ZABBIX_VERSION_MAJOR)
ZABBIX_LICENSE = GPL-2.0+
ZABBIX_LICENSE_FILES = README COPYING
ZABBIX_CPE_ID_VENDOR = zabbix
# We're patching m4/netsnmp.m4
ZABBIX_AUTORECONF = YES
ZABBIX_DEPENDENCIES = pcre
ZABBIX_CONF_OPTS = \
--with-libpcre=$(STAGING_DIR)/usr/bin/ \
--without-sqlite3 \
--enable-agent \
--disable-agent2 \
--disable-java \
--disable-proxy \
--disable-webservice
define ZABBIX_USERS
zabbix -1 zabbix -1 * /var/lib/zabbix - - zabbix user
endef
ZABBIX_SYSTEMD_UNITS += zabbix-agent.service
define ZABBIX_CHANGE_PIDFILE_LOCATION
$(SED) 's%\#\ PidFile=/tmp/zabbix\(.*\).pid%PidFile=/run/zabbix/zabbix\1.pid%g' $(@D)/conf/zabbix_*.conf
endef
ZABBIX_POST_PATCH_HOOKS += ZABBIX_CHANGE_PIDFILE_LOCATION
ifeq ($(BR2_PACKAGE_OPENIPMI),y)
ZABBIX_CONF_OPTS += --with-openipmi=$(STAGING_DIR)/usr
ZABBIX_DEPENDENCIES += openipmi
else
ZABBIX_CONF_OPTS += --without-openipmi
endif
ifeq ($(BR2_PACKAGE_LIBCURL),y)
ZABBIX_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr/bin/curl-config
ZABBIX_DEPENDENCIES += libcurl
else
ZABBIX_CONF_OPTS += --without-libcurl
endif
ifeq ($(BR2_PACKAGE_LIBXML2),y)
ZABBIX_CONF_OPTS += --with-libxml2=$(STAGING_DIR)/usr/bin/xml2-config
ZABBIX_DEPENDENCIES += libxml2
else
ZABBIX_CONF_OPTS += --without-libxml2
endif
ifeq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS),y)
ZABBIX_CONF_OPTS += --with-net-snmp=$(STAGING_DIR)/usr/bin/net-snmp-config
ZABBIX_DEPENDENCIES += netsnmp
else
ZABBIX_CONF_OPTS += --without-net-snmp
endif
ifeq ($(BR2_PACKAGE_OPENLDAP),y)
ZABBIX_CONF_OPTS += --with-ldap=$(STAGING_DIR)/usr
ZABBIX_DEPENDENCIES += openldap
else
ZABBIX_CONF_OPTS += --without-ldap
endif
ifeq ($(BR2_PACKAGE_LIBSSH2),y)
ZABBIX_CONF_OPTS += --with-ssh2=$(STAGING_DIR)/usr
ZABBIX_DEPENDENCIES += libssh2
else
ZABBIX_CONF_OPTS += --without-ssh2
endif
# Only one of openssl or gnutls should be enabled
ifeq ($(BR2_PACKAGE_OPENSSL),y)
ZABBIX_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr --without-gnutls
ZABBIX_DEPENDENCIES += openssl
else ifeq ($(BR2_PACKAGE_GNUTLS),y)
ZABBIX_CONF_OPTS += --with-gnutls=$(STAGING_DIR)/usr --without-openssl
ZABBIX_DEPENDENCIES += gnutls
else
ZABBIX_CONF_OPTS += --without-gnutls --without-openssl
endif
ifeq ($(BR2_PACKAGE_ZABBIX_SERVER),y)
ZABBIX_DEPENDENCIES += libevent zlib
ZABBIX_CONF_OPTS += \
--enable-server \
--with-libevent=$(STAGING_DIR)/usr \
--with-libpthread=$(STAGING_DIR)/usr \
--with-zlib=$(STAGING_DIR)/usr
ZABBIX_SYSTEMD_UNITS += zabbix-server.service
ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_COPY_FRONTEND),y)
define ZABBIX_SERVER_COPY_FRONTEND
mkdir -p $(TARGET_DIR)/var/www/zabbix/
cp -dpfr $(@D)/ui/* $(TARGET_DIR)/var/www/zabbix/
endef
ZABBIX_POST_INSTALL_TARGET_HOOKS += ZABBIX_SERVER_COPY_FRONTEND
endif
ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_MYSQL),y)
ZABBIX_DEPENDENCIES += mysql
ZABBIX_CONF_OPTS += --with-mysql=$(STAGING_DIR)/usr/bin/mysql_config --without-postgresql
ZABBIX_DATABASE = mysql
else ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_POSTGRESQL),y)
ZABBIX_DEPENDENCIES += postgresql
ZABBIX_CONF_OPTS += --with-postgresql=$(STAGING_DIR)/usr/bin/pg_config --without-mysql
ZABBIX_DATABASE = postgresql
endif
ifeq ($(BR2_PACKAGE_ZABBIX_SERVER_COPY_DUMPS),y)
define ZABBIX_SERVER_COPY_DUMPS
mkdir -p $(TARGET_DIR)/var/lib/zabbix/schema/
install -m 644 $(@D)/database/$(ZABBIX_DATABASE)/*.sql $(TARGET_DIR)/var/lib/zabbix/schema/
endef
ZABBIX_POST_INSTALL_TARGET_HOOKS += ZABBIX_SERVER_COPY_DUMPS
endif
endif # BR2_PACKAGE_ZABBIX_SERVER
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
$(eval $(autotools-package))