xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-connectivity/zabbix/zabbix_5.4.12.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "Open-source monitoring solution for your IT infrastructure"
2DESCRIPTION = "\
3ZABBIX is software that monitors numerous parameters of a network and the \
4health and integrity of servers. ZABBIX uses a flexible notification \
5mechanism that allows users to configure e-mail based alerts for virtually \
6any event. This allows a fast reaction to server problems. ZABBIX offers \
7excellent reporting and data visualisation features based on the stored \
8data. This makes ZABBIX ideal for capacity planning. \
9\
10ZABBIX supports both polling and trapping. All ZABBIX reports and \
11statistics, as well as configuration parameters are accessed through a \
12web-based front end. A web-based front end ensures that the status of \
13your network and the health of your servers can be assessed from any \
14location. Properly configured, ZABBIX can play an important role in \
15monitoring IT infrastructure. This is equally true for small \
16organisations with a few servers and for large companies with a \
17multitude of servers."
18HOMEPAGE = "http://www.zabbix.com/"
19SECTION = "Applications/Internet"
20LICENSE = "GPL-2.0-or-later"
21LIC_FILES_CHKSUM = "file://COPYING;md5=300e938ad303147fede2294ed78fe02e"
22DEPENDS  = "libevent libpcre openldap virtual/libiconv zlib"
23
24PACKAGE_ARCH = "${MACHINE_ARCH}"
25
26SRC_URI = "https://cdn.zabbix.com/zabbix/sources/stable/5.4/${BPN}-${PV}.tar.gz \
27    file://0001-Fix-configure.ac.patch \
28    file://zabbix-agent.service \
29    file://CVE-2022-43515.patch \
30    file://CVE-2022-46768.patch \
31"
32
33SRC_URI[md5sum] = "f295fd2df86143d72f6ff26e47d9e39e"
34SRC_URI[sha256sum] = "d60d5515807c30c05d0900b83a7e6ef6479929aef7d6f248fba481c4816bacf4"
35
36inherit autotools-brokensep linux-kernel-base pkgconfig systemd useradd
37
38SYSTEMD_PACKAGES = "${PN}"
39SYSTEMD_SERVICE:${PN} = "zabbix-agent.service"
40SYSTEMD_AUTO_ENABLE = "enable"
41
42USERADD_PACKAGES = "${PN}"
43GROUPADD_PARAM:${PN} = "-r zabbix"
44USERADD_PARAM:${PN} = "-r -g zabbix -d /var/lib/zabbix \
45    -s /sbin/nologin -c \"Zabbix Monitoring System\" zabbix \
46"
47
48KERNEL_VERSION = "${@get_kernelversion_headers('${STAGING_KERNEL_DIR}')}"
49
50EXTRA_OECONF = " \
51    --enable-dependency-tracking \
52    --enable-agent \
53    --enable-ipv6 \
54    --with-net-snmp \
55    --with-ldap=${STAGING_EXECPREFIXDIR} \
56    --with-unixodbc \
57    --with-ssh2 \
58    --with-sqlite3 \
59    --with-zlib \
60    --with-libpthread \
61    --with-libevent \
62    --with-libpcre=${STAGING_EXECPREFIXDIR} \
63    --with-iconv=${STAGING_EXECPREFIXDIR} \
64"
65CFLAGS:append = " -lldap -llber -pthread"
66
67do_configure:prepend() {
68    export KERNEL_VERSION="${KERNEL_VERSION}"
69}
70
71do_install:append() {
72    if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
73        install -d ${D}${systemd_unitdir}/system
74        install -m 0644 ${WORKDIR}/zabbix-agent.service ${D}${systemd_unitdir}/system/
75        sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/zabbix-agent.service
76    fi
77}
78
79FILES:${PN} += "${libdir}"
80
81RDEPENDS:${PN} = "logrotate"
82