commit 787ef0d2ce5402f28ad93aaa2b78cffc62c6f3fd Author: Andrew Lukoshko Date: Mon Nov 21 21:37:02 2022 +0100 Initial import of 6.0.9-release1.el8 diff --git a/.zabbix.metadata b/.zabbix.metadata new file mode 100644 index 0000000..c4e5987 --- /dev/null +++ b/.zabbix.metadata @@ -0,0 +1 @@ +7f2bd26f4bd2438fc1cdb5f165764f5409d0963e SOURCES/zabbix-6.0.9.tar.gz diff --git a/SOURCES/agent2.conf.patch b/SOURCES/agent2.conf.patch new file mode 100644 index 0000000..212a5e3 --- /dev/null +++ b/SOURCES/agent2.conf.patch @@ -0,0 +1,39 @@ +diff -urN zabbix-6.0.0alpha5.orig/src/go/conf/zabbix_agent2.conf zabbix-6.0.0alpha5/src/go/conf/zabbix_agent2.conf +--- zabbix-6.0.0alpha5.orig/src/go/conf/zabbix_agent2.conf 2021-10-11 13:30:51.773826173 +0300 ++++ zabbix-6.0.0alpha5/src/go/conf/zabbix_agent2.conf 2021-10-11 13:35:07.332846424 +0300 +@@ -10,6 +10,8 @@ + # Default: + # PidFile=/tmp/zabbix_agent2.pid + ++PidFile=/run/zabbix/zabbix_agent2.pid ++ + ### Option: LogType + # Specifies where log messages are written to: + # system - syslog +@@ -27,6 +29,8 @@ + # Default: + # LogFile=/tmp/zabbix_agent2.log + ++LogFile=/var/log/zabbix/zabbix_agent2.log ++ + ### Option: LogFileSize + # Maximum size of log file in MB. + # 0 - disable automatic log rotation. +@@ -36,6 +40,8 @@ + # Default: + # LogFileSize=1 + ++LogFileSize=0 ++ + ### Option: DebugLevel + # Specifies debug level: + # 0 - basic information about starting and stopping of Zabbix processes +@@ -259,6 +265,8 @@ + # Default: + # Include= + ++Include=/etc/zabbix/zabbix_agent2.d/*.conf ++ + # Include=/usr/local/etc/zabbix_agent2.userparams.conf + # Include=/usr/local/etc/zabbix_agent2.conf.d/ + # Include=/usr/local/etc/zabbix_agent2.conf.d/*.conf diff --git a/SOURCES/agent2.conf.var.run.patch b/SOURCES/agent2.conf.var.run.patch new file mode 100644 index 0000000..84c2996 --- /dev/null +++ b/SOURCES/agent2.conf.var.run.patch @@ -0,0 +1,12 @@ +diff -urN zabbix-6.2.0rc1.orig/src/go/conf/zabbix_agent2.conf zabbix-6.2.0rc1/src/go/conf/zabbix_agent2.conf +--- zabbix-6.2.0rc1.orig/src/go/conf/zabbix_agent2.conf 2022-06-17 15:12:53.347314289 +0300 ++++ zabbix-6.2.0rc1/src/go/conf/zabbix_agent2.conf 2022-06-17 15:13:18.402810532 +0300 +@@ -10,7 +10,7 @@ + # Default: + # PidFile=/tmp/zabbix_agent2.pid + +-PidFile=/run/zabbix/zabbix_agent2.pid ++PidFile=/var/run/zabbix/zabbix_agent2.pid + + ### Option: LogType + # Specifies where log messages are written to: diff --git a/SOURCES/conf.patch b/SOURCES/conf.patch new file mode 100644 index 0000000..13cb79c --- /dev/null +++ b/SOURCES/conf.patch @@ -0,0 +1,191 @@ +diff -urN zabbix-5.4.0/conf/zabbix_agentd.conf zabbix-5.4.0-patched/conf/zabbix_agentd.conf +--- zabbix-5.4.0/conf/zabbix_agentd.conf 2021-04-26 18:52:41.000000000 +0300 ++++ zabbix-5.4.0-patched/conf/zabbix_agentd.conf 2021-06-03 13:50:48.085656485 +0300 +@@ -10,6 +10,8 @@ + # Default: + # PidFile=/tmp/zabbix_agentd.pid + ++PidFile=/run/zabbix/zabbix_agentd.pid ++ + ### Option: LogType + # Specifies where log messages are written to: + # system - syslog +@@ -27,7 +29,7 @@ + # Default: + # LogFile= + +-LogFile=/tmp/zabbix_agentd.log ++LogFile=/var/log/zabbix/zabbix_agentd.log + + ### Option: LogFileSize + # Maximum size of log file in MB. +@@ -38,6 +40,8 @@ + # Default: + # LogFileSize=1 + ++LogFileSize=0 ++ + ### Option: DebugLevel + # Specifies debug level: + # 0 - basic information about starting and stopping of Zabbix processes +@@ -293,6 +297,7 @@ + # Mandatory: no + # Default: + # User=zabbix ++# NOTE: This option is overriden by settings in systemd service file! + + ### Option: Include + # You may include individual files or all files in a directory in the configuration file. +@@ -302,6 +307,8 @@ + # Default: + # Include= + ++Include=/etc/zabbix/zabbix_agentd.d/*.conf ++ + # Include=/usr/local/etc/zabbix_agentd.userparams.conf + # Include=/usr/local/etc/zabbix_agentd.conf.d/ + # Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf +diff -urN zabbix-5.4.0/conf/zabbix_proxy.conf zabbix-5.4.0-patched/conf/zabbix_proxy.conf +--- zabbix-5.4.0/conf/zabbix_proxy.conf 2021-04-26 18:52:41.000000000 +0300 ++++ zabbix-5.4.0-patched/conf/zabbix_proxy.conf 2021-06-03 13:36:33.849788003 +0300 +@@ -88,7 +88,7 @@ + # Default: + # LogFile= + +-LogFile=/tmp/zabbix_proxy.log ++LogFile=/var/log/zabbix/zabbix_proxy.log + + ### Option: LogFileSize + # Maximum size of log file in MB. +@@ -99,6 +99,8 @@ + # Default: + # LogFileSize=1 + ++LogFileSize=0 ++ + ### Option: DebugLevel + # Specifies debug level: + # 0 - basic information about starting and stopping of Zabbix processes +@@ -138,6 +140,8 @@ + # Default: + # PidFile=/tmp/zabbix_proxy.pid + ++PidFile=/run/zabbix/zabbix_proxy.pid ++ + ### Option: SocketDir + # IPC socket directory. + # Directory to store IPC sockets used by internal Zabbix services. +@@ -146,6 +150,8 @@ + # Default: + # SocketDir=/tmp + ++SocketDir=/run/zabbix ++ + ### Option: DBHost + # Database host name. + # If set to localhost, socket is used for MySQL. +@@ -414,6 +420,8 @@ + # Default: + # SNMPTrapperFile=/tmp/zabbix_traps.tmp + ++SNMPTrapperFile=/var/log/snmptrap/snmptrap.log ++ + ### Option: StartSNMPTrapper + # If 1, SNMP trapper process is started. + # +@@ -529,7 +537,7 @@ + # + # Mandatory: no + # Default: +-# ExternalScripts=${datadir}/zabbix/externalscripts ++# ExternalScripts=/usr/lib/zabbix/externalscripts + + ### Option: FpingLocation + # Location of fping. +diff -urN zabbix-5.4.0/conf/zabbix_server.conf zabbix-5.4.0-patched/conf/zabbix_server.conf +--- zabbix-5.4.0/conf/zabbix_server.conf 2021-04-26 18:52:41.000000000 +0300 ++++ zabbix-5.4.0-patched/conf/zabbix_server.conf 2021-06-03 13:37:11.324270989 +0300 +@@ -35,7 +35,7 @@ + # Default: + # LogFile= + +-LogFile=/tmp/zabbix_server.log ++LogFile=/var/log/zabbix/zabbix_server.log + + ### Option: LogFileSize + # Maximum size of log file in MB. +@@ -46,6 +46,8 @@ + # Default: + # LogFileSize=1 + ++LogFileSize=0 ++ + ### Option: DebugLevel + # Specifies debug level: + # 0 - basic information about starting and stopping of Zabbix processes +@@ -67,6 +69,8 @@ + # Default: + # PidFile=/tmp/zabbix_server.pid + ++PidFile=/run/zabbix/zabbix_server.pid ++ + ### Option: SocketDir + # IPC socket directory. + # Directory to store IPC sockets used by internal Zabbix services. +@@ -75,6 +79,8 @@ + # Default: + # SocketDir=/tmp + ++SocketDir=/run/zabbix ++ + ### Option: DBHost + # Database host name. + # If set to localhost, socket is used for MySQL. +@@ -373,6 +379,8 @@ + # Default: + # SNMPTrapperFile=/tmp/zabbix_traps.tmp + ++SNMPTrapperFile=/var/log/snmptrap/snmptrap.log ++ + ### Option: StartSNMPTrapper + # If 1, SNMP trapper process is started. + # +@@ -538,7 +546,7 @@ + # + # Mandatory: no + # Default: +-# AlertScriptsPath=${datadir}/zabbix/alertscripts ++# AlertScriptsPath=/usr/lib/zabbix/alertscripts + + ### Option: ExternalScripts + # Full path to location of external scripts. +@@ -547,7 +555,7 @@ + # + # Mandatory: no + # Default: +-# ExternalScripts=${datadir}/zabbix/externalscripts ++# ExternalScripts=/usr/lib/zabbix/externalscripts + + ### Option: FpingLocation + # Location of fping. +diff -urN zabbix-5.4.0/src/go/conf/zabbix_web_service.conf zabbix-5.4.0-patched/src/go/conf/zabbix_web_service.conf +--- zabbix-5.4.0/src/go/conf/zabbix_web_service.conf 2021-04-26 18:52:41.000000000 +0300 ++++ zabbix-5.4.0-patched/src/go/conf/zabbix_web_service.conf 2021-06-03 13:39:04.704416798 +0300 +@@ -20,6 +20,8 @@ + # Default: + # LogFile=/tmp/zabbix_web_service.log + ++LogFile=/var/log/zabbix/zabbix_web_service.log ++ + ### Option: LogFileSize + # Maximum size of log file in MB. + # 0 - disable automatic log rotation. +@@ -29,6 +31,8 @@ + # Default: + # LogFileSize=1 + ++LogFileSize=0 ++ + ### Option: DebugLevel + # Specifies debug level: + # 0 - basic information about starting and stopping of Zabbix processes diff --git a/SOURCES/conf.var.run.patch b/SOURCES/conf.var.run.patch new file mode 100644 index 0000000..08065f6 --- /dev/null +++ b/SOURCES/conf.var.run.patch @@ -0,0 +1,54 @@ +diff -urN zabbix-6.2.0rc1.orig/conf/zabbix_agentd.conf zabbix-6.2.0rc1/conf/zabbix_agentd.conf +--- zabbix-6.2.0rc1.orig/conf/zabbix_agentd.conf 2022-06-17 15:08:20.256831191 +0300 ++++ zabbix-6.2.0rc1/conf/zabbix_agentd.conf 2022-06-17 15:08:43.660356151 +0300 +@@ -10,7 +10,7 @@ + # Default: + # PidFile=/tmp/zabbix_agentd.pid + +-PidFile=/run/zabbix/zabbix_agentd.pid ++PidFile=/var/run/zabbix/zabbix_agentd.pid + + ### Option: LogType + # Specifies where log messages are written to: +diff -urN zabbix-6.2.0rc1.orig/conf/zabbix_proxy.conf zabbix-6.2.0rc1/conf/zabbix_proxy.conf +--- zabbix-6.2.0rc1.orig/conf/zabbix_proxy.conf 2022-06-17 15:08:20.256831191 +0300 ++++ zabbix-6.2.0rc1/conf/zabbix_proxy.conf 2022-06-17 15:09:55.866893477 +0300 +@@ -133,7 +133,7 @@ + # Default: + # PidFile=/tmp/zabbix_proxy.pid + +-PidFile=/run/zabbix/zabbix_proxy.pid ++PidFile=/var/run/zabbix/zabbix_proxy.pid + + ### Option: SocketDir + # IPC socket directory. +@@ -143,7 +143,7 @@ + # Default: + # SocketDir=/tmp + +-SocketDir=/run/zabbix ++SocketDir=/var/run/zabbix + + ### Option: DBHost + # Database host name. +diff -urN zabbix-6.2.0rc1.orig/conf/zabbix_server.conf zabbix-6.2.0rc1/conf/zabbix_server.conf +--- zabbix-6.2.0rc1.orig/conf/zabbix_server.conf 2022-06-17 15:08:20.256831191 +0300 ++++ zabbix-6.2.0rc1/conf/zabbix_server.conf 2022-06-17 15:09:29.379429530 +0300 +@@ -69,7 +69,7 @@ + # Default: + # PidFile=/tmp/zabbix_server.pid + +-PidFile=/run/zabbix/zabbix_server.pid ++PidFile=/var/run/zabbix/zabbix_server.pid + + ### Option: SocketDir + # IPC socket directory. +@@ -79,7 +79,7 @@ + # Default: + # SocketDir=/tmp + +-SocketDir=/run/zabbix ++SocketDir=/var/run/zabbix + + ### Option: DBHost + # Database host name. diff --git a/SOURCES/fping3-sourceip-option.patch b/SOURCES/fping3-sourceip-option.patch new file mode 100644 index 0000000..f1a21e5 --- /dev/null +++ b/SOURCES/fping3-sourceip-option.patch @@ -0,0 +1,39 @@ +diff -urN zabbix-5.0.14.orig/src/libs/zbxicmpping/icmpping.c zabbix-5.0.14/src/libs/zbxicmpping/icmpping.c +--- zabbix-5.0.14.orig/src/libs/zbxicmpping/icmpping.c 2021-07-16 18:09:40.807727222 +0300 ++++ zabbix-5.0.14/src/libs/zbxicmpping/icmpping.c 2021-07-16 18:11:43.121350484 +0300 +@@ -53,34 +53,7 @@ + + static void get_source_ip_option(const char *fping, const char **option, unsigned char *checked) + { +- FILE *f; +- char *p, tmp[MAX_STRING_LEN]; +- +- zbx_snprintf(tmp, sizeof(tmp), "%s -h 2>&1", fping); +- +- if (NULL == (f = popen(tmp, "r"))) +- return; +- +- while (NULL != zbx_fgets(tmp, sizeof(tmp), f)) +- { +- for (p = tmp; isspace(*p); p++) +- ; +- +- if ('-' == p[0] && 'I' == p[1] && (isspace(p[2]) || ',' == p[2])) +- { +- *option = "-I"; +- continue; +- } +- +- if ('-' == p[0] && 'S' == p[1] && (isspace(p[2]) || ',' == p[2])) +- { +- *option = "-S"; +- break; +- } +- } +- +- pclose(f); +- ++ *option = "-S"; + *checked = 1; + } + diff --git a/SOURCES/frontend.patch b/SOURCES/frontend.patch new file mode 100644 index 0000000..d5fd55c --- /dev/null +++ b/SOURCES/frontend.patch @@ -0,0 +1,54 @@ +diff -urN zabbix-6.0.0alpha5.orig/ui/include/classes/core/CConfigFile.php zabbix-6.0.0alpha5/ui/include/classes/core/CConfigFile.php +--- zabbix-6.0.0alpha5.orig/ui/include/classes/core/CConfigFile.php 2021-10-25 13:53:56.255241288 +0300 ++++ zabbix-6.0.0alpha5/ui/include/classes/core/CConfigFile.php 2021-10-25 13:55:17.469626565 +0300 +@@ -25,7 +25,7 @@ + const CONFIG_ERROR = 2; + const CONFIG_VAULT_ERROR = 3; + +- const CONFIG_FILE_PATH = '/conf/zabbix.conf.php'; ++ const CONFIG_FILE_PATH = '/etc/zabbix/web/zabbix.conf.php'; + + private static $supported_db_types = [ + ZBX_DB_MYSQL => true, +diff -urN zabbix-6.0.0alpha5.orig/ui/include/classes/core/ZBase.php zabbix-6.0.0alpha5/ui/include/classes/core/ZBase.php +--- zabbix-6.0.0alpha5.orig/ui/include/classes/core/ZBase.php 2021-10-25 13:53:56.255241288 +0300 ++++ zabbix-6.0.0alpha5/ui/include/classes/core/ZBase.php 2021-10-25 13:56:49.379799191 +0300 +@@ -368,7 +368,7 @@ + * @throws Exception + */ + protected function setMaintenanceMode() { +- require_once 'conf/maintenance.inc.php'; ++ require_once '/etc/zabbix/web/maintenance.inc.php'; + + if (defined('ZBX_DENY_GUI_ACCESS')) { + if (!isset($ZBX_GUI_ACCESS_IP_RANGE) || !in_array(CWebUser::getIp(), $ZBX_GUI_ACCESS_IP_RANGE)) { +@@ -381,7 +381,7 @@ + * Load zabbix config file. + */ + protected function loadConfigFile() { +- $configFile = $this->getRootDir().CConfigFile::CONFIG_FILE_PATH; ++ $configFile = CConfigFile::CONFIG_FILE_PATH; + $config = new CConfigFile($configFile); + $this->config = $config->load(); + } +diff -urN zabbix-6.0.0alpha5.orig/ui/include/classes/setup/CSetupWizard.php zabbix-6.0.0alpha5/ui/include/classes/setup/CSetupWizard.php +--- zabbix-6.0.0alpha5.orig/ui/include/classes/setup/CSetupWizard.php 2021-10-25 13:53:56.255241288 +0300 ++++ zabbix-6.0.0alpha5/ui/include/classes/setup/CSetupWizard.php 2021-10-25 14:00:03.899931721 +0300 +@@ -259,7 +259,7 @@ + // make zabbix.conf.php downloadable + header('Content-Type: application/x-httpd-php'); + header('Content-Disposition: attachment; filename="'.basename(CConfigFile::CONFIG_FILE_PATH).'"'); +- $config = new CConfigFile(APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH); ++ $config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH); + $config->config = [ + 'DB' => [ + 'TYPE' => $this->getConfig('DB_TYPE'), +@@ -793,7 +793,7 @@ + + $this->setConfig('ZBX_CONFIG_FILE_CORRECT', true); + +- $config_file_name = APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH; ++ $config_file_name = CConfigFile::CONFIG_FILE_PATH; + $config = new CConfigFile($config_file_name); + $config->config = [ + 'DB' => [ diff --git a/SOURCES/java-gateway.patch b/SOURCES/java-gateway.patch new file mode 100644 index 0000000..d4ed997 --- /dev/null +++ b/SOURCES/java-gateway.patch @@ -0,0 +1,79 @@ +diff -urN 5.4.orig/src/zabbix_java/lib/logback.xml 5.4/src/zabbix_java/lib/logback.xml +--- 5.4.orig/src/zabbix_java/lib/logback.xml 2021-02-03 14:46:36.510530149 +0200 ++++ 5.4/src/zabbix_java/lib/logback.xml 2021-02-03 16:08:48.139648517 +0200 +@@ -2,10 +2,10 @@ + + + +- /tmp/zabbix_java.log ++ /var/log/zabbix/zabbix_java_gateway.log + + +- /tmp/zabbix_java.log.%i ++ /var/log/zabbix/zabbix_java_gateway.log.%i + 1 + 3 + +diff -urN 5.4.orig/src/zabbix_java/settings.sh 5.4/src/zabbix_java/settings.sh +--- 5.4.orig/src/zabbix_java/settings.sh 2021-02-03 14:46:36.510530149 +0200 ++++ 5.4/src/zabbix_java/settings.sh 2021-02-03 17:30:37.637881653 +0200 +@@ -24,7 +24,7 @@ + # Default: + # PID_FILE= + +-PID_FILE="/tmp/zabbix_java.pid" ++PID_FILE="/var/run/zabbix/zabbix_java_gateway.pid" + + ### Option: zabbix.startPollers + # Number of worker threads to start. +diff -urN 5.4.orig/src/zabbix_java/shutdown.sh 5.4/src/zabbix_java/shutdown.sh +--- 5.4.orig/src/zabbix_java/shutdown.sh 2021-02-03 14:46:36.510530149 +0200 ++++ 5.4/src/zabbix_java/shutdown.sh 2021-02-03 14:54:19.090352858 +0200 +@@ -1,7 +1,14 @@ + #!/bin/sh + +-cd `dirname $0` +-. ./settings.sh ++if [ -r /etc/zabbix/zabbix_java_gateway.conf ]; then ++ . /etc/zabbix/zabbix_java_gateway.conf ++fi ++ ++if [ -z $GATEWAY_HOME ]; then ++ GATEWAY_HOME="/usr/share/zabbix-java-gateway" ++fi ++ ++cd $GATEWAY_HOME + + if [ -n "$PID_FILE" ]; then + if [ -f "$PID_FILE" ]; then +diff -urN 5.4.orig/src/zabbix_java/startup.sh 5.4/src/zabbix_java/startup.sh +--- 5.4.orig/src/zabbix_java/startup.sh 2021-02-03 14:46:36.510530149 +0200 ++++ 5.4/src/zabbix_java/startup.sh 2021-02-03 15:51:17.466224873 +0200 +@@ -1,7 +1,12 @@ + #!/bin/sh + +-cd `dirname $0` +-. ./settings.sh ++if [ -r /etc/zabbix/zabbix_java_gateway.conf ]; then ++ . /etc/zabbix/zabbix_java_gateway.conf ++fi ++ ++if [ -z $GATEWAY_HOME ]; then ++ GATEWAY_HOME="/usr/share/zabbix-java-gateway" ++fi + + if [ -n "$PID_FILE" -a -f "$PID_FILE" ]; then + PID=`cat "$PID_FILE"` +@@ -15,9 +20,9 @@ + JAVA=${JAVA:-java} + + JAVA_OPTIONS="$JAVA_OPTIONS -server" +-if [ -z "$PID_FILE" ]; then +- JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=logback-console.xml" +-fi ++JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=/etc/zabbix/zabbix_java_gateway_logback.xml" ++ ++cd $GATEWAY_HOME + + CLASSPATH="lib" + for jar in lib/*.jar bin/*.jar; do diff --git a/SOURCES/rhel6-go11.6.patch b/SOURCES/rhel6-go11.6.patch new file mode 100644 index 0000000..623e3f3 --- /dev/null +++ b/SOURCES/rhel6-go11.6.patch @@ -0,0 +1,9 @@ +diff -urN zabbix-6.0.4.orig/src/go/pkg/zbxcmd/zbxcmd_nix.go zabbix-6.0.4/src/go/pkg/zbxcmd/zbxcmd_nix.go +--- zabbix-6.0.4.orig/src/go/pkg/zbxcmd/zbxcmd_nix.go 2022-04-11 15:19:08.372205383 +0300 ++++ zabbix-6.0.4/src/go/pkg/zbxcmd/zbxcmd_nix.go 2022-04-11 15:19:59.055215492 +0300 +@@ -1,4 +1,4 @@ +-//go:build !windows ++// +build !windows + + /* + ** Zabbix diff --git a/SOURCES/zabbix-agent.init b/SOURCES/zabbix-agent.init new file mode 100644 index 0000000..7a2a6cb --- /dev/null +++ b/SOURCES/zabbix-agent.init @@ -0,0 +1,97 @@ +#!/bin/sh +# +# chkconfig: - 86 14 +# description: Zabbix agent daemon +# processname: zabbix_agentd +# config: /etc/zabbix/zabbix_agentd.conf +# + +### BEGIN INIT INFO +# Provides: zabbix-agent +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Should-Start: zabbix zabbix-proxy +# Should-Stop: zabbix zabbix-proxy +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 +# Short-Description: Start and stop Zabbix agent +# Description: Zabbix agent +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +if [ -x /usr/sbin/zabbix_agentd ]; then + exec=/usr/sbin/zabbix_agentd +else + exit 5 +fi + +prog=${exec##*/} +conf=/etc/zabbix/zabbix_agentd.conf +pidfile=$(grep -e "^PidFile=.*$" $conf | cut -d= -f2 | tr -d '\r') +timeout=10 + +if [ -f /etc/sysconfig/zabbix-agent ]; then + . /etc/sysconfig/zabbix-agent +fi + +if [ -n "$ZABBIX_AGENT_USER" ]; then + user_conf="--user=$ZABBIX_AGENT_USER" +else + user_conf='' +fi + +lockfile=/var/lock/subsys/zabbix-agent + +start() +{ + echo -n $"Starting Zabbix agent: " + daemon $user_conf $exec -c $conf + rv=$? + echo + [ $rv -eq 0 ] && touch $lockfile + return $rv +} + +stop() +{ + echo -n $"Shutting down Zabbix agent: " + killproc -p $pidfile -d $timeout $prog + rv=$? + echo + [ $rv -eq 0 ] && rm -f $lockfile + return $rv +} + +restart() +{ + stop + start +} + +case "$1" in + start|stop|restart) + $1 + ;; + force-reload) + restart + ;; + status) + status -p $pidfile $prog + ;; + try-restart|condrestart) + if status $prog >/dev/null ; then + restart + fi + ;; + reload) + action $"Service ${0##*/} does not support the reload action: " /bin/false + exit 3 + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}" + exit 2 + ;; +esac + diff --git a/SOURCES/zabbix-agent.service b/SOURCES/zabbix-agent.service new file mode 100644 index 0000000..64a7dd0 --- /dev/null +++ b/SOURCES/zabbix-agent.service @@ -0,0 +1,20 @@ +[Unit] +Description=Zabbix Agent +After=syslog.target +After=network.target + +[Service] +Environment="CONFFILE=/etc/zabbix/zabbix_agentd.conf" +EnvironmentFile=-/etc/sysconfig/zabbix-agent +Type=forking +Restart=on-failure +PIDFile=/run/zabbix/zabbix_agentd.pid +KillMode=control-group +ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE +ExecStop=/bin/kill -SIGTERM $MAINPID +RestartSec=10s +User=zabbix +Group=zabbix + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/zabbix-agent.sysconfig b/SOURCES/zabbix-agent.sysconfig new file mode 100644 index 0000000..6ebb06b --- /dev/null +++ b/SOURCES/zabbix-agent.sysconfig @@ -0,0 +1,4 @@ +# Configuration file for /etc/init.d/zabbix-agent service + +# User to run zabbix agent as +ZABBIX_AGENT_USER=zabbix diff --git a/SOURCES/zabbix-agent2.init b/SOURCES/zabbix-agent2.init new file mode 100644 index 0000000..d866bac --- /dev/null +++ b/SOURCES/zabbix-agent2.init @@ -0,0 +1,97 @@ +#!/bin/sh +# +# chkconfig: - 86 14 +# description: Zabbix agent 2 daemon +# processname: zabbix_agent2 +# config: /etc/zabbix/zabbix_agent2.conf +# + +### BEGIN INIT INFO +# Provides: zabbix-agent2 +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Should-Start: zabbix zabbix-proxy +# Should-Stop: zabbix zabbix-proxy +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 +# Short-Description: Start and stop Zabbix agent 2 +# Description: Zabbix agent 2 +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +if [ -x /usr/sbin/zabbix_agent2 ]; then + exec=/usr/sbin/zabbix_agent2 +else + exit 5 +fi + +prog=${exec##*/} +conf=/etc/zabbix/zabbix_agent2.conf +pidfile=$(grep -e "^PidFile=.*$" $conf | cut -d= -f2 | tr -d '\r') +timeout=10 + +if [ -f /etc/sysconfig/zabbix-agent2 ]; then + . /etc/sysconfig/zabbix-agent2 +fi + +if [ -n "$ZABBIX_AGENT_USER" ]; then + user_conf="--user=$ZABBIX_AGENT_USER" +else + user_conf='' +fi + +lockfile=/var/lock/subsys/zabbix-agent2 + +start() +{ + echo -n $"Starting Zabbix agent 2: " + daemon $user_conf $exec -c $conf &>/dev/null & + rv=$? + echo + [ $rv -eq 0 ] && touch $lockfile + return $rv +} + +stop() +{ + echo -n $"Shutting down Zabbix agent 2: " + killproc -p $pidfile -d $timeout $prog + rv=$? + echo + [ $rv -eq 0 ] && rm -f $lockfile + return $rv +} + +restart() +{ + stop + start +} + +case "$1" in + start|stop|restart) + $1 + ;; + force-reload) + restart + ;; + status) + status -p $pidfile $prog + ;; + try-restart|condrestart) + if status $prog >/dev/null ; then + restart + fi + ;; + reload) + action $"Service ${0##*/} does not support the reload action: " /bin/false + exit 3 + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}" + exit 2 + ;; +esac + diff --git a/SOURCES/zabbix-agent2.service b/SOURCES/zabbix-agent2.service new file mode 100644 index 0000000..c7d0288 --- /dev/null +++ b/SOURCES/zabbix-agent2.service @@ -0,0 +1,20 @@ +[Unit] +Description=Zabbix Agent 2 +After=syslog.target +After=network.target + +[Service] +Environment="CONFFILE=/etc/zabbix/zabbix_agent2.conf" +EnvironmentFile=-/etc/sysconfig/zabbix-agent2 +Type=simple +Restart=on-failure +PIDFile=/run/zabbix/zabbix_agent2.pid +KillMode=control-group +ExecStart=/usr/sbin/zabbix_agent2 -c $CONFFILE +ExecStop=/bin/kill -SIGTERM $MAINPID +RestartSec=10s +User=zabbix +Group=zabbix + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/zabbix-agent2.sysconfig b/SOURCES/zabbix-agent2.sysconfig new file mode 100644 index 0000000..900743c --- /dev/null +++ b/SOURCES/zabbix-agent2.sysconfig @@ -0,0 +1,4 @@ +# Configuration file for /etc/init.d/zabbix-agent2 service + +# User to run zabbix agent as +ZABBIX_AGENT_USER=zabbix diff --git a/SOURCES/zabbix-java-gateway.init b/SOURCES/zabbix-java-gateway.init new file mode 100644 index 0000000..6c1b55e --- /dev/null +++ b/SOURCES/zabbix-java-gateway.init @@ -0,0 +1,134 @@ +#! /bin/sh +# +# chkconfig: - 85 15 +# description: zabbix java gateway +# + +### BEGIN INIT INFO +# Provides: zabbix +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 +# Short-Description: start and stop zabbix java gateway +# Description: Zabbix Java Gateway +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Source Zabbix Java Gateway configuration +. /etc/zabbix/zabbix_java_gateway.conf + +if [ -r "/etc/sysconfig/zabbix-java-gateway" ]; then + . /etc/sysconfig/zabbix-java-gateway +fi + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +RETVAL=0 +EXECDIR=/usr/sbin/zabbix_java + +case "$1" in + start) + echo -n "Starting zabbix java gateway: " + if [ -n "$PID_FILE" -a -e "$PID_FILE" ]; then + echo "zabbix java gateway is already running" + exit 1 + fi + + JAVA=${JAVA:-java} + + JAVA_OPTIONS="-server $JAVA_OPTIONS" + if [ -z "$PID_FILE" ]; then + JAVA_OPTIONS="$JAVA_OPTIONS -Dlogback.configurationFile=logback-console.xml" + fi + + cd $EXECDIR + + CLASSPATH="lib" + for jar in {lib,bin}/*.jar; do + if [[ $jar != *junit* ]]; then + CLASSPATH="$CLASSPATH:$jar" + fi + done + + if [ -n "$PID_FILE" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.pidFile=$PID_FILE" + fi + if [ -n "$LISTEN_IP" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenIP=$LISTEN_IP" + fi + if [ -n "$LISTEN_PORT" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.listenPort=$LISTEN_PORT" + fi + if [ -n "$START_POLLERS" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.startPollers=$START_POLLERS" + fi + if [ -n "$TIMEOUT" ]; then + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dzabbix.timeout=$TIMEOUT" + fi + + tcp_timeout=${TIMEOUT:=3}000 + ZABBIX_OPTIONS="$ZABBIX_OPTIONS -Dsun.rmi.transport.tcp.responseTimeout=$tcp_timeout" + + COMMAND_LINE="$JAVA $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway" + + if [ -n "$PID_FILE" ]; then + PID=$(su -s /bin/bash -c "$COMMAND_LINE > /dev/null 2>&1 & echo \$!" zabbix) + if ps -p $PID > /dev/null 2>&1; then + echo $PID > $PID_FILE + else + echo "zabbix java gateway did not start" + exit 1 + fi + else + exec $COMMAND_LINE + RETVAL=$? + fi + ;; + stop) + echo -n "Shutting down zabbix java gateway: " + if [ -n "$PID_FILE" ]; then + if [ -e "$PID_FILE" ]; then + kill `cat $PID_FILE` && rm $PID_FILE + else + echo "zabbix java gateway is not running" + exit 1 + fi + else + echo "zabbix java gateway is not configured as a daemon: variable \$PID_FILE is not set" + exit 1 + fi + ;; + restart) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart) + if [ -n "$PID_FILE" -a -e "$PID_FILE" ]; then + $0 stop + $0 start + fi + RETVAL=$? + ;; + status) + status -p $PID_FILE $0 + RETVAL=$? + exit $RETVAL + ;; + *) + echo "Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 + ;; +esac + +[ "$RETVAL" -eq 0 ] && success $"$base startup" || failure $"$base startup" +echo +exit $RETVAL + diff --git a/SOURCES/zabbix-java-gateway.service b/SOURCES/zabbix-java-gateway.service new file mode 100644 index 0000000..75437e8 --- /dev/null +++ b/SOURCES/zabbix-java-gateway.service @@ -0,0 +1,17 @@ +[Unit] +Description=Zabbix Java Gateway +After=syslog.target +After=network.target + +[Service] +Type=forking +KillMode=process +PIDFile=/run/zabbix/zabbix_java_gateway.pid +ExecStart=/usr/sbin/zabbix_java_gateway_startup +ExecStop=/usr/sbin/zabbix_java_gateway_shutdown +SuccessExitStatus=143 +User=zabbix +Group=zabbix + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/zabbix-logrotate.in b/SOURCES/zabbix-logrotate.in new file mode 100644 index 0000000..01cf6e2 --- /dev/null +++ b/SOURCES/zabbix-logrotate.in @@ -0,0 +1,9 @@ +/var/log/zabbix/zabbix_COMPONENT.log { + weekly + rotate 12 + compress + delaycompress + missingok + notifempty + create 0664 zabbix zabbix +} diff --git a/SOURCES/zabbix-nginx.conf b/SOURCES/zabbix-nginx.conf new file mode 100644 index 0000000..dee1961 --- /dev/null +++ b/SOURCES/zabbix-nginx.conf @@ -0,0 +1,61 @@ +server { +# listen 8080; +# server_name example.com; + + root /usr/share/zabbix; + + index index.php; + + location = /favicon.ico { + log_not_found off; + } + + location / { + try_files $uri $uri/ =404; + } + + location /assets { + access_log off; + expires 10d; + } + + location ~ /\.ht { + deny all; + } + + location ~ /(api\/|conf[^\.]|include|locale) { + deny all; + return 404; + } + + location /vendor { + deny all; + return 404; + } + + location ~ [^/]\.php(/|$) { + fastcgi_pass unix:/run/php-fpm/zabbix.sock; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_index index.php; + + fastcgi_param DOCUMENT_ROOT /usr/share/zabbix; + fastcgi_param SCRIPT_FILENAME /usr/share/zabbix$fastcgi_script_name; + fastcgi_param PATH_TRANSLATED /usr/share/zabbix$fastcgi_script_name; + + include fastcgi_params; + fastcgi_param QUERY_STRING $query_string; + fastcgi_param REQUEST_METHOD $request_method; + fastcgi_param CONTENT_TYPE $content_type; + fastcgi_param CONTENT_LENGTH $content_length; + + fastcgi_intercept_errors on; + fastcgi_ignore_client_abort off; + fastcgi_connect_timeout 60; + fastcgi_send_timeout 180; + fastcgi_read_timeout 180; + fastcgi_buffer_size 128k; + fastcgi_buffers 4 256k; + fastcgi_busy_buffers_size 256k; + fastcgi_temp_file_write_size 256k; + } +} diff --git a/SOURCES/zabbix-php-fpm.conf b/SOURCES/zabbix-php-fpm.conf new file mode 100644 index 0000000..84e2488 --- /dev/null +++ b/SOURCES/zabbix-php-fpm.conf @@ -0,0 +1,24 @@ +[zabbix] +user = apache +group = apache + +listen = /run/php-fpm/zabbix.sock +listen.acl_users = apache,nginx +listen.allowed_clients = 127.0.0.1 + +pm = dynamic +pm.max_children = 50 +pm.start_servers = 5 +pm.min_spare_servers = 5 +pm.max_spare_servers = 35 +pm.max_requests = 200 + +php_value[session.save_handler] = files +php_value[session.save_path] = /var/lib/php/session + +php_value[max_execution_time] = 300 +php_value[memory_limit] = 128M +php_value[post_max_size] = 16M +php_value[upload_max_filesize] = 2M +php_value[max_input_time] = 300 +php_value[max_input_vars] = 10000 diff --git a/SOURCES/zabbix-proxy.init b/SOURCES/zabbix-proxy.init new file mode 100644 index 0000000..d5741fa --- /dev/null +++ b/SOURCES/zabbix-proxy.init @@ -0,0 +1,88 @@ +#!/bin/sh +# +# chkconfig: - 85 15 +# description: Zabbix proxy daemon +# config: /etc/zabbix/zabbix_proxy.conf +# + +### BEGIN INIT INFO +# Provides: zabbix-proxy +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 +# Short-Description: Start and stop Zabbix proxy +# Description: Zabbix proxy +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +if [ -x /usr/sbin/zabbix_proxy ]; then + exec=/usr/sbin/zabbix_proxy +else + exit 5 +fi + +prog=${exec##*/} +conf=/etc/zabbix/zabbix_proxy.conf +pidfile=$(grep -e "^PidFile=.*$" $conf | cut -d= -f2 | tr -d '\r') +timeout=10 + +if [ -f /etc/sysconfig/zabbix-proxy ]; then + . /etc/sysconfig/zabbix-proxy +fi + +lockfile=/var/lock/subsys/zabbix-proxy + +start() +{ + echo -n $"Starting Zabbix proxy: " + daemon $exec -c $conf + rv=$? + echo + [ $rv -eq 0 ] && touch $lockfile + return $rv +} + +stop() +{ + echo -n $"Shutting down Zabbix proxy: " + killproc -p $pidfile -d $timeout $prog + rv=$? + echo + [ $rv -eq 0 ] && rm -f $lockfile + return $rv +} + +restart() +{ + stop + start +} + +case "$1" in + start|stop|restart) + $1 + ;; + force-reload) + restart + ;; + status) + status -p $pidfile $prog + ;; + try-restart|condrestart) + if status $prog >/dev/null ; then + restart + fi + ;; + reload) + action $"Service ${0##*/} does not support the reload action: " /bin/false + exit 3 + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}" + exit 2 + ;; +esac + diff --git a/SOURCES/zabbix-proxy.service b/SOURCES/zabbix-proxy.service new file mode 100644 index 0000000..8e44e7a --- /dev/null +++ b/SOURCES/zabbix-proxy.service @@ -0,0 +1,32 @@ +[Unit] +Description=Zabbix Proxy +After=syslog.target +After=network.target +After=mysql.service +After=mysqld.service +After=mariadb.service +After=postgresql.service +After=pgbouncer.service +After=postgresql-9.4.service +After=postgresql-9.5.service +After=postgresql-9.6.service +After=postgresql-10.service +After=postgresql-11.service +After=postgresql-12.service +After=postgresql-13.service +After=postgresql-14.service + +[Service] +Environment="CONFFILE=/etc/zabbix/zabbix_proxy.conf" +EnvironmentFile=-/etc/sysconfig/zabbix-proxy +Type=forking +Restart=on-failure +PIDFile=/run/zabbix/zabbix_proxy.pid +KillMode=control-group +ExecStart=/usr/sbin/zabbix_proxy -c $CONFFILE +ExecStop=/bin/kill -SIGTERM $MAINPID +RestartSec=10s +TimeoutSec=0 + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/zabbix-server.init b/SOURCES/zabbix-server.init new file mode 100644 index 0000000..b227b2c --- /dev/null +++ b/SOURCES/zabbix-server.init @@ -0,0 +1,88 @@ +#!/bin/sh +# +# chkconfig: - 85 15 +# description: Zabbix server daemon +# config: /etc/zabbix/zabbix_server.conf +# + +### BEGIN INIT INFO +# Provides: zabbix +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Start: +# Default-Stop: 0 1 2 3 4 5 6 +# Short-Description: Start and stop Zabbix server +# Description: Zabbix server +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +if [ -x /usr/sbin/zabbix_server ]; then + exec=/usr/sbin/zabbix_server +else + exit 5 +fi + +prog=${exec##*/} +conf=/etc/zabbix/zabbix_server.conf +pidfile=$(grep -e "^PidFile=.*$" $conf | cut -d= -f2 | tr -d '\r') +timeout=10 + +if [ -f /etc/sysconfig/zabbix-server ]; then + . /etc/sysconfig/zabbix-server +fi + +lockfile=/var/lock/subsys/zabbix-server + +start() +{ + echo -n $"Starting Zabbix server: " + daemon $exec -c $conf + rv=$? + echo + [ $rv -eq 0 ] && touch $lockfile + return $rv +} + +stop() +{ + echo -n $"Shutting down Zabbix server: " + killproc -p $pidfile -d $timeout $prog + rv=$? + echo + [ $rv -eq 0 ] && rm -f $lockfile + return $rv +} + +restart() +{ + stop + start +} + +case "$1" in + start|stop|restart) + $1 + ;; + force-reload) + restart + ;; + status) + status -p $pidfile $prog + ;; + try-restart|condrestart) + if status $prog >/dev/null ; then + restart + fi + ;; + reload) + action $"Service ${0##*/} does not support the reload action: " /bin/false + exit 3 + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}" + exit 2 + ;; +esac + diff --git a/SOURCES/zabbix-server.service b/SOURCES/zabbix-server.service new file mode 100644 index 0000000..e06e0d2 --- /dev/null +++ b/SOURCES/zabbix-server.service @@ -0,0 +1,32 @@ +[Unit] +Description=Zabbix Server +After=syslog.target +After=network.target +After=mysql.service +After=mysqld.service +After=mariadb.service +After=postgresql.service +After=pgbouncer.service +After=postgresql-9.4.service +After=postgresql-9.5.service +After=postgresql-9.6.service +After=postgresql-10.service +After=postgresql-11.service +After=postgresql-12.service +After=postgresql-13.service +After=postgresql-14.service + +[Service] +Environment="CONFFILE=/etc/zabbix/zabbix_server.conf" +EnvironmentFile=-/etc/sysconfig/zabbix-server +Type=forking +Restart=on-failure +PIDFile=/run/zabbix/zabbix_server.pid +KillMode=control-group +ExecStart=/usr/sbin/zabbix_server -c $CONFFILE +ExecStop=/bin/kill -SIGTERM $MAINPID +RestartSec=10s +TimeoutSec=0 + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/zabbix-tmpfiles.conf b/SOURCES/zabbix-tmpfiles.conf new file mode 100644 index 0000000..815ca92 --- /dev/null +++ b/SOURCES/zabbix-tmpfiles.conf @@ -0,0 +1 @@ +d /run/zabbix 0755 zabbix zabbix - - diff --git a/SOURCES/zabbix-web-fcgi.conf b/SOURCES/zabbix-web-fcgi.conf new file mode 100644 index 0000000..09fca03 --- /dev/null +++ b/SOURCES/zabbix-web-fcgi.conf @@ -0,0 +1,41 @@ +# +# Zabbix monitoring system php web frontend +# + +Alias /zabbix /usr/share/zabbix + +ProxyTimeout 300 + + + Options FollowSymLinks + AllowOverride None + Require all granted + + + DirectoryIndex index.php + + + + SetHandler "proxy:unix:/run/php-fpm/zabbix.sock|fcgi://localhost" + + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + diff --git a/SOURCES/zabbix-web-service.service b/SOURCES/zabbix-web-service.service new file mode 100644 index 0000000..2b13a7e --- /dev/null +++ b/SOURCES/zabbix-web-service.service @@ -0,0 +1,19 @@ +[Unit] +Description=Zabbix Web Service +After=syslog.target +After=network.target + +[Service] +Environment="CONFFILE=/etc/zabbix/zabbix_web_service.conf" +EnvironmentFile=-/etc/sysconfig/zabbix_web_service +Type=simple +Restart=on-failure +KillMode=control-group +ExecStart=/usr/sbin/zabbix_web_service -c $CONFFILE +ExecStop=/bin/kill -SIGTERM $MAINPID +RestartSec=10s +User=zabbix +Group=zabbix + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/zabbix-web22.conf b/SOURCES/zabbix-web22.conf new file mode 100644 index 0000000..6388fa6 --- /dev/null +++ b/SOURCES/zabbix-web22.conf @@ -0,0 +1,59 @@ +# +# Zabbix monitoring system php web frontend +# + +Alias /zabbix /usr/share/zabbix + + + Options FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all + + + php_value max_execution_time 300 + php_value memory_limit 128M + php_value post_max_size 16M + php_value upload_max_filesize 2M + php_value max_input_time 300 + php_value max_input_vars 10000 + php_value always_populate_raw_post_data -1 + # php_value date.timezone Europe/Riga + + + + + Order deny,allow + Deny from all + + Order deny,allow + Deny from all + + + + + Order deny,allow + Deny from all + + Order deny,allow + Deny from all + + + + + Order deny,allow + Deny from all + + Order deny,allow + Deny from all + + + + + Order deny,allow + Deny from all + + Order deny,allow + Deny from all + + diff --git a/SOURCES/zabbix-web24.conf b/SOURCES/zabbix-web24.conf new file mode 100644 index 0000000..110d6e2 --- /dev/null +++ b/SOURCES/zabbix-web24.conf @@ -0,0 +1,38 @@ +# +# Zabbix monitoring system php web frontend +# + +Alias /zabbix /usr/share/zabbix + + + Options FollowSymLinks + AllowOverride None + Require all granted + + + php_value max_execution_time 300 + php_value memory_limit 128M + php_value post_max_size 16M + php_value upload_max_filesize 2M + php_value max_input_time 300 + php_value max_input_vars 10000 + php_value always_populate_raw_post_data -1 + # php_value date.timezone Europe/Riga + + + + + Require all denied + + + + Require all denied + + + + Require all denied + + + + Require all denied + diff --git a/SOURCES/zabbix_policy.te b/SOURCES/zabbix_policy.te new file mode 100644 index 0000000..3c34570 --- /dev/null +++ b/SOURCES/zabbix_policy.te @@ -0,0 +1,22 @@ +module zabbix_policy 1.2; + +require { + type zabbix_t; + type zabbix_port_t; + type zabbix_var_run_t; + type postgresql_port_t; + type httpd_t; + class tcp_socket name_connect; + class sock_file { create unlink }; + class unix_stream_socket connectto; +} + +#============= zabbix_t ============== +allow zabbix_t self:unix_stream_socket connectto; +allow zabbix_t zabbix_port_t:tcp_socket name_connect; +allow zabbix_t zabbix_var_run_t:sock_file create; +allow zabbix_t zabbix_var_run_t:sock_file unlink; +allow httpd_t zabbix_port_t:tcp_socket name_connect; + +#============= httpd_t ============== +allow httpd_t postgresql_port_t:tcp_socket name_connect; diff --git a/SPECS/zabbix.spec b/SPECS/zabbix.spec new file mode 100644 index 0000000..e9e65af --- /dev/null +++ b/SPECS/zabbix.spec @@ -0,0 +1,1886 @@ +Name: zabbix +Version: 6.0.9 +Release: %{?alphatag:%{?alphatag}.}release1%{?dist} +Summary: The Enterprise-class open source monitoring solution +Group: Applications/Internet +License: GPLv2+ +URL: http://www.zabbix.com/ +Source0: https://cdn.zabbix.com/zabbix/sources/development/6.0/%{name}-%{version}%{?alphatag}.tar.gz +Source1: zabbix-web22.conf +Source2: zabbix-web24.conf +Source3: zabbix-logrotate.in +Source4: zabbix-java-gateway.init +Source5: zabbix-agent.init +Source6: zabbix-server.init +Source7: zabbix-proxy.init +Source10: zabbix-agent.service +Source11: zabbix-server.service +Source12: zabbix-proxy.service +Source13: zabbix-java-gateway.service +Source15: zabbix-tmpfiles.conf +Source16: zabbix-php-fpm.conf +Source17: zabbix-web-fcgi.conf +Source18: zabbix-nginx.conf +Source19: zabbix-agent2.service +Source20: zabbix-agent.sysconfig +Source21: zabbix-agent2.init +Source22: zabbix-agent2.sysconfig +Source23: zabbix-web-service.service +Source24: zabbix_policy.te +Patch0: frontend.patch +Patch1: fping3-sourceip-option.patch +Patch2: java-gateway.patch +Patch3: conf.patch +Patch4: agent2.conf.patch +Patch5: rhel6-go11.6.patch +Patch6: conf.var.run.patch +Patch7: agent2.conf.var.run.patch + +BuildRequires: gcc +Buildrequires: golang +BuildRequires: selinux-policy-devel + +Buildroot: %{_tmppath}/zabbix-%{version}-%{release}-root-%(%{__id_u} -n) + +%{!?build_agent: %global build_agent 1} + + +%{!?build_agent2: %global build_agent2 1} + +%if 0%{?rhel} >= 8 +%{!?build_web_service: %global build_web_service 1} +%endif + +%if 0%{?rhel} >= 7 +%{!?build_proxy: %global build_proxy 1} +%{!?build_java_gateway: %global build_java_gateway 1} +%endif + +%if 0%{?rhel} >= 8 +%{!?build_server: %global build_server 1} +%{!?build_frontend: %global build_frontend 1} +%endif + +%{!?build_with_mysql: %global build_with_mysql 1} +%{!?build_with_pgsql: %global build_with_pgsql 1} +%{!?build_with_sqlite: %global build_with_sqlite 1} + +%{!?zabbix_script_dir: %global zabbix_script_dir /usr/lib/zabbix} + +%if 0%{build_with_mysql} == 0 && 0%{build_with_pgsql} == 0 +%global build_server 0 +%if 0%{build_with_sqlite} == 0 +%global build_proxy 0 +%endif +%endif + +%if 0%{?rhel} >= 7 +%{!?build_selinux_policy: %global build_selinux_policy 1} +%endif + +# FIXME: Building debuginfo is broken on RHEL 5 & 8. Disabled for now. +%if 0%{?rhel} <= 5 || 0%{?rhel} >= 8 +%define debug_package %{nil} +%endif + +# Enable hardening +%if 0%{?rhel} >= 8 +%global _hardened_build 1 +%endif + +BuildRequires: make +%if 0%{?rhel} >= 8 +BuildRequires: mariadb-connector-c-devel +BuildRequires: postgresql-devel >= 12.0 +BuildRequires: sqlite-devel +BuildRequires: net-snmp-devel +BuildRequires: openldap-devel +BuildRequires: gnutls-devel +BuildRequires: unixODBC-devel +BuildRequires: curl-devel >= 7.13.1 +BuildRequires: OpenIPMI-devel >= 2 +BuildRequires: libssh-devel >= 0.9.0 +BuildRequires: java-devel >= 1.6.0 +BuildRequires: libxml2-devel +BuildRequires: libevent-devel +%endif +%if 0%{?rhel} >= 7 +BuildRequires: pcre2-devel +%else +BuildRequires: pcre-devel +%endif +%if 0%{?rhel} >= 6 +BuildRequires: openssl-devel >= 1.0.1 +%endif +%if 0%{?rhel} >= 7 +BuildRequires: systemd +%endif +%if 0%{?build_selinux_policy} +BuildRequires: policycoreutils-devel +%endif + +%description +Zabbix is the ultimate enterprise-level software designed for +real-time monitoring of millions of metrics collected from tens of +thousands of servers, virtual machines and network devices. + +%if 0%{?build_agent} +%package agent +Summary: Zabbix agent +Group: Applications/Internet +Requires: logrotate +Requires(pre): /usr/sbin/useradd +%if 0%{?rhel} >= 7 +Requires(post): systemd +Requires(preun): systemd +Requires(preun): systemd +%else +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service +%endif +%endif + +%if 0%{?build_agent2} != 1 +%if 0%{?build_agent} +%description agent +Zabbix agent to be installed on monitored systems. +%endif + +%else +%if 0%{?build_agent} +%description agent +Old implementation of zabbix agent. +To be installed on monitored systems. +%endif + +%package agent2 +Summary: Zabbix agent 2 +Group: Applications/Internet +Requires: logrotate +%if 0%{?rhel} >= 7 +Requires(post): systemd +Requires(preun): systemd +Requires(preun): systemd +%else +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service +%endif + +%description agent2 +New implementation of zabbix agent. +To be installed on monitored systems. +%endif + +%if 0%{?build_web_service} +%package web-service +Summary: Zabbix web service +Group: Applications/Internet +Requires: logrotate +Requires(post): systemd +Requires(preun): systemd +Requires(preun): systemd + +%description web-service +Zabbix web servce for performing various tasks using headless web browser. +%endif + +%if 0%{?build_agent} +%package get +Summary: Zabbix get +Group: Applications/Internet + +%description get +Zabbix get command line utility. + +%package sender +Summary: Zabbix sender +Group: Applications/Internet + +%description sender +Zabbix sender command line utility. +%endif + +%if 0%{?build_server} || 0%{?build_proxy} +%package js +Summary: Zabbix js +Group: Applications/Internet + +%description js +Zabbix js command line utility. + +%package sql-scripts +Summary: Zabbix database sql scripts +Group: Applications/Internet +BuildArch: noarch + +%description sql-scripts +SQL files needed to setup Zabbix server or proxy databases +%endif + +%if 0%{?build_proxy} +%package proxy-mysql +Summary: Zabbix proxy for MySQL or MariaDB database +Group: Applications/Internet +Requires: fping +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Provides: zabbix-proxy = %{version}-%{release} +Provides: zabbix-proxy-implementation = %{version}-%{release} + +%description proxy-mysql +Zabbix proxy with MySQL or MariaDB database support. + +%package proxy-pgsql +Summary: Zabbix proxy for PostgreSQL database +Group: Applications/Internet +Requires: fping +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Provides: zabbix-proxy = %{version}-%{release} +Provides: zabbix-proxy-implementation = %{version}-%{release} + +%description proxy-pgsql +Zabbix proxy with PostgreSQL database support. + +%package proxy-sqlite3 +Summary: Zabbix proxy for SQLite3 database +Group: Applications/Internet +Requires: fping +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Provides: zabbix-proxy = %{version}-%{release} +Provides: zabbix-proxy-implementation = %{version}-%{release} + +%description proxy-sqlite3 +Zabbix proxy with SQLite3 database support. +%endif + +%if 0%{?build_server} +%package server-mysql +Summary: Zabbix server for MySQL or MariaDB database +Group: Applications/Internet +Requires: fping +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Provides: zabbix-server = %{version}-%{release} +Provides: zabbix-server-implementation = %{version}-%{release} + +%description server-mysql +Zabbix server with MySQL or MariaDB database support. + +%package server-pgsql +Summary: Zabbix server for PostgresSQL database +Group: Applications/Internet +Requires: fping +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Provides: zabbix-server = %{version}-%{release} +Provides: zabbix-server-implementation = %{version}-%{release} +%description server-pgsql +Zabbix server with PostgresSQL database support. +%endif + +%if 0%{?build_frontend} +%package web +Summary: Zabbix web frontend common package +Group: Application/Internet +BuildArch: noarch +Requires: dejavu-sans-fonts +Requires(post): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives + +%description web +Zabbix web frontend common package + +%package web-deps +Summary: PHP dependencies metapackage for frontend +Group: Application/Internet +BuildArch: noarch +Requires: zabbix-web = %{version}-%{release} +Requires: php-gd >= 7.2 +Requires: php-bcmath >= 7.2 +Requires: php-mbstring >= 7.2 +Requires: php-xml >= 7.2 +Requires: php-ldap >= 7.2 +Requires: php-json >= 7.2 +Requires: php-fpm >= 7.2 +Requires: zabbix-web = %{version}-%{release} +Requires: zabbix-web-database = %{version}-%{release} + +%description web-deps +PHP dependencies metapackage for frontend + +%package web-mysql +Summary: Zabbix web frontend for MySQL +Group: Applications/Internet +BuildArch: noarch +Requires: zabbix-web = %{version}-%{release} +Requires: zabbix-web-deps = %{version}-%{release} +Requires: php-mysqlnd +Provides: zabbix-web-database = %{version}-%{release} + +%description web-mysql +Zabbix web frontend for MySQL + +%package web-pgsql +Summary: Zabbix web frontend for PostgreSQL +Group: Applications/Internet +BuildArch: noarch +Requires: zabbix-web = %{version}-%{release} +Requires: zabbix-web-deps = %{version}-%{release} +Requires: php-pgsql +Provides: zabbix-web-database = %{version}-%{release} + +%description web-pgsql +Zabbix web frontend for PostgreSQL + +%package apache-conf +Summary: Automatic zabbix frontend configuration with apache +Group: Applications/Internet +BuildArch: noarch +Requires: zabbix-web-deps = %{version}-%{release} +Requires: httpd + +%description apache-conf +Zabbix frontend configuration for apache + +%package nginx-conf +Summary: Zabbix frontend configuration for nginx and php-fpm +Group: Applications/Internet +BuildArch: noarch +Requires: zabbix-web-deps = %{version}-%{release} +Requires: nginx + +%description nginx-conf +Zabbix frontend configuration for nginx and php-fpm + +%package web-japanese +Summary: Japanese font settings for Zabbix frontend +Group: Applications/Internet +BuildArch: noarch +Requires: google-noto-sans-cjk-ttc-fonts +Requires: glibc-langpack-ja +Requires: zabbix-web = %{version}-%{release} +Requires(post): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives + +%description web-japanese +Japanese font configuration for Zabbix web frontend +%endif + +%if 0%{?build_java_gateway} +%package java-gateway +Summary: Zabbix java gateway +Group: Applications/Internet +Requires: java-headless >= 1.6.0 +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description java-gateway +Zabbix java gateway +%endif + +%if 0%{?build_selinux_policy} +%package selinux-policy +Summary: Zabbix SELinux policy +Group: Applications/Internet +Requires(post): %{_sbindir}/semodule +Requires(preun): %{_sbindir}/semodule + +%description selinux-policy +Zabbix SELinux policy +%endif + + + +# +# prep +# + +%prep +%setup0 -q -n %{name}-%{version}%{?alphatag} + +%if 0%{?build_frontend} +%patch0 -p1 + +## remove font file +rm -f ui/assets/fonts/DejaVuSans.ttf + +# replace font in defines.inc.php +sed -i -r "s/(define\(.*_FONT_NAME.*)DejaVuSans/\1graphfont/" \ + ui/include/defines.inc.php + +# remove .htaccess files +rm -f ui/app/.htaccess +rm -f ui/conf/.htaccess +rm -f ui/include/.htaccess +rm -f ui/local/.htaccess + +# remove translation source files and scripts +find ui/locale -name '*.po' | xargs rm -f +find ui/locale -name '*.sh' | xargs rm -f +%endif + +%if 0%{?build_server} || 0%{?build_proxy} || 0%{?build_agent} || 0%{?build_agent2} +%patch1 -p1 +%endif + +%if 0%{?build_server} || 0%{?build_proxy} +# traceroute command path for global script +sed -i -e 's|/usr/bin/traceroute|/bin/traceroute|' database/mysql/data.sql +sed -i -e 's|/usr/bin/traceroute|/bin/traceroute|' database/postgresql/data.sql +sed -i -e 's|/usr/bin/traceroute|/bin/traceroute|' database/sqlite3/data.sql +%endif + +%if 0%{?build_server} +# sql files for servers +cat database/mysql/schema.sql > database/mysql/server.sql +cat database/mysql/images.sql >> database/mysql/server.sql +cat database/mysql/data.sql >> database/mysql/server.sql +gzip database/mysql/server.sql + +cat database/postgresql/schema.sql > database/postgresql/server.sql +cat database/postgresql/images.sql >> database/postgresql/server.sql +cat database/postgresql/data.sql >> database/postgresql/server.sql +gzip database/postgresql/server.sql +%endif + +%if 0%{?build_proxy} +# sql files for proxies +mv database/mysql/schema.sql database/mysql/proxy.sql +mv database/postgresql/schema.sql database/postgresql/proxy.sql +mv database/sqlite3/schema.sql database/sqlite3/proxy.sql +%endif + +%if 0%{?build_java_gateway} +%patch2 -p1 +%endif + +# update config files +%patch3 -p1 + +%if 0%{?build_agent2} +%patch4 -p1 +%if 0%{?rhel} == 6 +%patch5 -p1 +%endif +%endif + +%if 0%{?rhel} <= 6 +%patch6 -p1 +%if 0%{?build_agent2} +%patch7 -p1 +%endif +%endif + +%build +# Build consists of 1-3 configure/make passes, one for each database. +# pass 1: is sqlite proxy, may be omitted. +# pass 2: is pqsql server/proxy, may be omitted. +# pass 3: If only one database is enabled, then it must occur with pass 3. + +build_conf_common=" + --enable-dependency-tracking + --sysconfdir=/etc/zabbix + --libdir=%{_libdir}/zabbix + --enable-ipv6 + --with-net-snmp + --with-ldap + --with-libcurl + --with-openipmi + --with-unixodbc +%if 0%{?rhel} >= 8 + --with-ssh +%else + --with-ssh2 +%endif + --with-libxml2 + --with-libevent +%if 0%{?rhel} >= 7 + --with-libpcre2 +%else + --with-libpcre +%endif +%if 0%{?rhel} >= 6 + --with-openssl +%endif +" + +# setup pass 3 +%if 0%{?build_with_mysql} && ( 0%{?build_server} || 0%{?build_proxy} ) +build_conf_3=" +%if 0%{?build_server} + --enable-server +%endif +%if 0%{?build_proxy} + --enable-proxy +%endif + --with-mysql +" + +build_db_3=mysql +%endif + + +# setup pass 2 +%if 0%{?build_with_pgsql} && ( 0%{?build_server} || 0%{?build_proxy} ) +build_conf_2=" +%if 0%{?build_server} + --enable-server +%endif +%if 0%{?build_proxy} + --enable-proxy +%endif + --with-postgresql +" + +if [ -z "$build_conf_3" ]; then + build_conf_3="$build_conf_2" + build_conf_2="" + build_db_3="pgsql" +fi +%endif + + +# setup pass 1 +%if 0%{?build_with_sqlite} && 0%{?build_proxy} +build_conf_1="--enable-proxy --with-sqlite3" + +if [ -z "$build_conf_3" ]; then + build_conf_3="$build_conf_1" + build_conf_1="" + build_db_3=sqlite3 +fi +%endif + + +# add agents, web-service and java-gateway to pass 3 +build_conf_3=" +%if 0%{?build_agent} + --enable-agent +%endif +%if 0%{?build_agent2} + --enable-agent2 +%endif +%if 0%{?build_java_gateway} + --enable-java +%endif +%if 0%{?build_web_service} + --enable-webservice +%endif + $build_conf_3 +" + + +%if 0%{?build_server} || 0%{?build_proxy} +make_flags="EXTERNAL_SCRIPTS_PATH=/usr/lib/zabbix/externalscripts" +%endif + +%if 0%{?build_server} +make_flags="$make_flags ALERT_SCRIPTS_PATH=/usr/lib/zabbix/alertscripts" +%endif + +# pass 1 +if [ -n "$build_conf_1" ]; then + %configure $build_conf_common $build_conf_1 + make $make_flags + mv src/zabbix_proxy/zabbix_proxy src/zabbix_proxy/zabbix_proxy_sqlite3 +fi + + +# pass 2 +if [ -n "$build_conf_2" ]; then + %configure $build_conf_common $build_conf_2 + make $make_flags +%if 0%{?build_server} + mv src/zabbix_server/zabbix_server src/zabbix_server/zabbix_server_pgsql +%endif +%if 0%{?build_proxy} + mv src/zabbix_proxy/zabbix_proxy src/zabbix_proxy/zabbix_proxy_pgsql +%endif +fi + + +# pass 3 +if [ -n "$build_conf_3" ]; then + %configure $build_conf_common $build_conf_3 + make $make_flags +%if 0%{?build_server} + mv src/zabbix_server/zabbix_server "src/zabbix_server/zabbix_server_$build_db_3" +%endif +%if 0%{?build_proxy} + mv src/zabbix_proxy/zabbix_proxy "src/zabbix_proxy/zabbix_proxy_$build_db_3" +%endif +fi + + +# build selinux policy +%if 0%{?build_selinux_policy} +cp %{SOURCE24} . +make -f /usr/share/selinux/devel/Makefile zabbix_policy.pp +%endif + + +# +# install +# + +%install + +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/zabbix +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/zabbix +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zabbix +mkdir -p $RPM_BUILD_ROOT%{_datadir} +mkdir -p $RPM_BUILD_ROOT%{_datadir}/man/man8 +mkdir -p $RPM_BUILD_ROOT%{_datadir}/zabbix +mkdir -p $RPM_BUILD_ROOT%{_sbindir} + + +%if 0%{?build_agent2} || 0%{?build_web_service} +make DESTDIR=$RPM_BUILD_ROOT GOBIN=$RPM_BUILD_ROOT%{_sbindir} install +%else +make DESTDIR=$RPM_BUILD_ROOT install +%endif + + +%if 0%{?build_agent} +mv $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_agentd.conf.d $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_agentd.d +install -dm 755 $RPM_BUILD_ROOT%{_docdir}/zabbix-agent-%{version} +cat %{SOURCE3} | sed \ + -e 's|COMPONENT|agentd|g' \ + > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-agent +%if 0%{?rhel} >= 7 +install -Dm 0644 -p %{SOURCE10} $RPM_BUILD_ROOT%{_unitdir}/zabbix-agent.service +install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_tmpfilesdir}/zabbix-agent.conf +%else +install -Dm 0755 -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/zabbix-agent +install -Dm 0644 -p %{SOURCE20} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zabbix-agent +%endif +%else +%if 0%{?build_agent2} +rm $RPM_BUILD_ROOT%{_sbindir}/zabbix_agentd +rm $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_agentd.conf +%endif +%endif + + +%if 0%{?build_agent2} +cat %{SOURCE3} | sed \ + -e 's|COMPONENT|agent2|g' \ + > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-agent2 +cp man/zabbix_agent2.man $RPM_BUILD_ROOT%{_mandir}/man8/zabbix_agent2.8 +%if 0%{?rhel} >= 7 +install -Dm 0644 -p %{SOURCE19} $RPM_BUILD_ROOT%{_unitdir}/zabbix-agent2.service +install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_tmpfilesdir}/zabbix_agent2.conf +%else +install -Dm 0755 -p %{SOURCE21} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/zabbix-agent2 +install -Dm 0644 -p %{SOURCE22} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/zabbix-agent2 +%endif +%endif + + +%if 0%{?build_web_service} +cat %{SOURCE3} | sed \ + -e 's|COMPONENT|web-service|g' \ + > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-web-service +cp man/zabbix_web_service.man $RPM_BUILD_ROOT%{_mandir}/man8/zabbix_web_service.8 +install -Dm 0644 -p %{SOURCE23} $RPM_BUILD_ROOT%{_unitdir}/zabbix-web-service.service +install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_tmpfilesdir}/zabbix_web_service.conf +%endif + + +%if 0%{?build_server} || 0%{?build_proxy} +mkdir -p $RPM_BUILD_ROOT%{zabbix_script_dir} +mv $RPM_BUILD_ROOT%{_datadir}/zabbix/externalscripts $RPM_BUILD_ROOT%{zabbix_script_dir} + + +# +# install sql files +# +%if 0%{?build_with_mysql} +mkdir -p $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/mysql +%if 0%{?build_proxy} +cp database/mysql/proxy.sql $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/mysql +%endif +%if 0%{?build_server} +cp database/mysql/server.sql.gz $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/mysql +cp database/mysql/double.sql $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/mysql +cp database/mysql/history_pk_prepare.sql $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/mysql +%endif +%endif + +%if 0%{?build_with_pgsql} +mkdir -p $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/postgresql +%if 0%{?build_proxy} +cp database/postgresql/proxy.sql $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/postgresql +%endif +%if 0%{?build_server} +cp database/postgresql/server.sql.gz $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/postgresql +cp database/postgresql/timescaledb.sql $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/postgresql +cp database/postgresql/double.sql $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/postgresql +cp database/postgresql/history_pk_prepare.sql $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/postgresql +%endif +cp -R database/postgresql/tsdb_history_pk_upgrade_no_compression $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/postgresql +cp -R database/postgresql/tsdb_history_pk_upgrade_with_compression $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/postgresql +%endif + +%if 0%{?build_with_sqlite} && 0%{?build_proxy} +mkdir -p $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/sqlite3 +cp database/sqlite3/proxy.sql $RPM_BUILD_ROOT%{_datadir}/zabbix-sql-scripts/sqlite3 +%endif +%endif + + +%if 0%{?build_proxy} +mv $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_proxy.conf.d $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_proxy.d +install -m 0755 -p src/zabbix_proxy/zabbix_proxy_* $RPM_BUILD_ROOT%{_sbindir}/ +rm $RPM_BUILD_ROOT%{_sbindir}/zabbix_proxy +cat %{SOURCE3} | sed \ + -e 's|COMPONENT|proxy|g' \ + > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-proxy +install -Dm 0644 -p %{SOURCE12} $RPM_BUILD_ROOT%{_unitdir}/zabbix-proxy.service +install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_tmpfilesdir}/zabbix-proxy.conf +%endif + + +%if 0%{?build_server} +mv $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_server.conf.d $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_server.d +install -m 0755 -p src/zabbix_server/zabbix_server_* $RPM_BUILD_ROOT%{_sbindir}/ +rm $RPM_BUILD_ROOT%{_sbindir}/zabbix_server +mv $RPM_BUILD_ROOT%{_datadir}/zabbix/alertscripts $RPM_BUILD_ROOT%{zabbix_script_dir} +cat %{SOURCE3} | sed \ + -e 's|COMPONENT|server|g' \ + > $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-server +install -Dm 0644 -p %{SOURCE11} $RPM_BUILD_ROOT%{_unitdir}/zabbix-server.service +install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_tmpfilesdir}/zabbix-server.conf +%endif + + +%if 0%{?build_frontend} +find ui -name '*.orig' | xargs rm -f +cp -a ui/* $RPM_BUILD_ROOT%{_datadir}/zabbix +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/web +touch $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/web/zabbix.conf.php +mv $RPM_BUILD_ROOT%{_datadir}/zabbix/conf/maintenance.inc.php $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/web/ +install -Dm 0644 -p %{SOURCE16} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/zabbix.conf +install -Dm 0644 -p %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/zabbix.conf +install -Dm 0644 -p %{SOURCE18} $RPM_BUILD_ROOT%{_sysconfdir}/nginx/conf.d/zabbix.conf +%endif + + +%if 0%{?build_java_gateway} +mv $RPM_BUILD_ROOT%{_sbindir}/zabbix_java/startup.sh $RPM_BUILD_ROOT%{_sbindir}/zabbix_java_gateway_startup +mv $RPM_BUILD_ROOT%{_sbindir}/zabbix_java/shutdown.sh $RPM_BUILD_ROOT%{_sbindir}/zabbix_java_gateway_shutdown +mv $RPM_BUILD_ROOT%{_sbindir}/zabbix_java/settings.sh $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_java_gateway.conf +mv $RPM_BUILD_ROOT%{_sbindir}/zabbix_java/lib/logback.xml $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_java_gateway_logback.xml +rm $RPM_BUILD_ROOT%{_sbindir}/zabbix_java/lib/logback-console.xml +mv $RPM_BUILD_ROOT%{_sbindir}/zabbix_java $RPM_BUILD_ROOT%{_datadir}/zabbix-java-gateway +install -Dm 0644 -p %{SOURCE13} $RPM_BUILD_ROOT%{_unitdir}/zabbix-java-gateway.service +install -Dm 0644 -p %{SOURCE15} $RPM_BUILD_ROOT%{_tmpfilesdir}/zabbix-java-gateway.conf +%endif + + +%if 0%{?build_selinux_policy} +mkdir -p $RPM_BUILD_ROOT%{_datadir}/selinux/packages/zabbix +mv zabbix_policy.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/zabbix +%endif + + +%clean +rm -rf $RPM_BUILD_ROOT + + +# +# files & scriptlets +# + + +%if 0%{?build_agent} + +%files agent +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README conf/zabbix_agentd/userparameter_mysql.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agentd.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-agent +%dir %{_sysconfdir}/zabbix/zabbix_agentd.d +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_sbindir}/zabbix_agentd +%{_mandir}/man8/zabbix_agentd.8* +%if 0%{?rhel} >= 7 +%{_unitdir}/zabbix-agent.service +%{_tmpfilesdir}/zabbix-agent.conf +%else +%{_sysconfdir}/init.d/zabbix-agent +%config(noreplace) %{_sysconfdir}/sysconfig/zabbix-agent +%endif + +%files get +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_bindir}/zabbix_get +%{_mandir}/man1/zabbix_get.1* + +%files sender +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_bindir}/zabbix_sender +%{_mandir}/man1/zabbix_sender.1* + +%pre agent +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post agent +%if 0%{?rhel} >= 7 +%systemd_post zabbix-agent.service +%else +/sbin/chkconfig --add zabbix-agent || : +%endif + +%preun agent +if [ "$1" = 0 ]; then +%if 0%{?rhel} >= 7 +%systemd_preun zabbix-agent.service +%else +/sbin/service zabbix-agent stop >/dev/null 2>&1 +/sbin/chkconfig --del zabbix-agent +%endif +fi +: + +%postun agent +%if 0%{?rhel} >= 7 +%systemd_postun_with_restart zabbix-agent.service +%else +if [ $1 -ge 1 ]; then +/sbin/service zabbix-agent try-restart >/dev/null 2>&1 || : +fi +%endif + +%posttrans agent +# preserve old userparameter_mysql.conf file during upgrade +if [ -f %{_sysconfdir}/zabbix/zabbix_agentd.d/userparameter_mysql.conf.rpmsave ] && [ ! -f %{_sysconfdir}/zabbix/zabbix_agentd.d/userparameter_mysql.conf ]; then + cp -vn %{_sysconfdir}/zabbix/zabbix_agentd.d/userparameter_mysql.conf.rpmsave %{_sysconfdir}/zabbix/zabbix_agentd.d/userparameter_mysql.conf +fi +: +%endif + + + +%if 0%{?build_agent2} +%files agent2 +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.conf +%dir %{_sysconfdir}/zabbix/zabbix_agent2.d +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/ceph.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/docker.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/memcached.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/mysql.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/oracle.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/postgres.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/redis.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/smart.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/modbus.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_agent2.d/plugins.d/mqtt.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-agent2 +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_sbindir}/zabbix_agent2 +%{_mandir}/man8/zabbix_agent2.8* +%if 0%{?rhel} >= 7 +%{_unitdir}/zabbix-agent2.service +%{_tmpfilesdir}/zabbix_agent2.conf +%else +%{_sysconfdir}/init.d/zabbix-agent2 +%config(noreplace) %{_sysconfdir}/sysconfig/zabbix-agent2 +%endif + +%pre agent2 +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post agent2 +%if 0%{?rhel} >= 7 +%systemd_post zabbix-agent2.service +%endif +# make sure that agent2 log file is create with proper attributes (ZBX-18243) +if [ $1 == 1 ] && [ ! -f %{_localstatedir}/log/zabbix/zabbix_agent2.log ]; then + touch %{_localstatedir}/log/zabbix/zabbix_agent2.log + chown zabbix:zabbix %{_localstatedir}/log/zabbix/zabbix_agent2.log +fi +: + +%if 0%{?rhel} >= 7 +%preun agent2 +%systemd_preun zabbix-agent2.service +: + +%postun agent2 +%systemd_postun_with_restart zabbix-agent2.service +%endif +%endif + + +%if 0%{?build_web_service} +%files web-service +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_sbindir}/zabbix_web_service +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_web_service.conf +%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-web-service +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_unitdir}/zabbix-web-service.service +%{_tmpfilesdir}/zabbix_web_service.conf +%{_mandir}/man8/zabbix_web_service.8* + +%pre web-service +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post web-service +%systemd_post zabbix-web-service.service +: + +%preun web-service +%systemd_preun zabbix-web-service.service +: + +%postun web-service +%systemd_postun_with_restart zabbix-web-service.service +%endif + + +%if 0%{?build_server} || 0%{?build_proxy} +%files js +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_bindir}/zabbix_js + +%files sql-scripts +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%if 0%{?build_server} +%{_datadir}/zabbix-sql-scripts/mysql/server.sql.gz +%{_datadir}/zabbix-sql-scripts/mysql/double.sql +%{_datadir}/zabbix-sql-scripts/mysql/history_pk_prepare.sql +%{_datadir}/zabbix-sql-scripts/postgresql/server.sql.gz +%{_datadir}/zabbix-sql-scripts/postgresql/timescaledb.sql +%{_datadir}/zabbix-sql-scripts/postgresql/double.sql +%{_datadir}/zabbix-sql-scripts/postgresql/history_pk_prepare.sql +%endif +%if 0%{?build_proxy} +%{_datadir}/zabbix-sql-scripts/mysql/proxy.sql +%{_datadir}/zabbix-sql-scripts/postgresql/proxy.sql +%{_datadir}/zabbix-sql-scripts/sqlite3/proxy.sql +%endif +%if 0%{?build_server} || 0%{?build_proxy} +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_no_compression/history_pk_log.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_no_compression/history_pk.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_no_compression/history_pk_str.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_no_compression/history_pk_text.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_no_compression/history_pk_uint.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_with_compression/history_pk_log.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_with_compression/history_pk.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_with_compression/history_pk_str.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_with_compression/history_pk_text.sql +%{_datadir}/zabbix-sql-scripts/postgresql/tsdb_history_pk_upgrade_with_compression/history_pk_uint.sql +%endif +%endif + + +%if 0%{?build_proxy} +%if 0%{?build_with_mysql} +%files proxy-mysql +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%attr(0600,root,zabbix) %config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf +%dir %{zabbix_script_dir}/externalscripts +%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-proxy +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_mandir}/man8/zabbix_proxy.8* +%{_unitdir}/zabbix-proxy.service +%{_tmpfilesdir}/zabbix-proxy.conf +%{_sbindir}/zabbix_proxy_mysql + +%pre proxy-mysql +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post proxy-mysql +%systemd_post zabbix-proxy.service +/usr/sbin/update-alternatives --install %{_sbindir}/zabbix_proxy \ + zabbix-proxy %{_sbindir}/zabbix_proxy_mysql 10 +: + +%preun proxy-mysql +if [ "$1" = 0 ]; then +%systemd_preun zabbix-proxy.service +/usr/sbin/update-alternatives --remove zabbix-proxy \ +%{_sbindir}/zabbix_proxy_mysql +fi +: + +%postun proxy-mysql +%systemd_postun_with_restart zabbix-proxy.service +: +%endif + + +%if 0%{?build_with_pgsql} +%files proxy-pgsql +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%attr(0600,root,zabbix) %config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf +%dir %{zabbix_script_dir}/externalscripts +%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-proxy +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_mandir}/man8/zabbix_proxy.8* +%{_unitdir}/zabbix-proxy.service +%{_tmpfilesdir}/zabbix-proxy.conf +%{_sbindir}/zabbix_proxy_pgsql + +%pre proxy-pgsql +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post proxy-pgsql +%systemd_post zabbix-proxy.service +/usr/sbin/update-alternatives --install %{_sbindir}/zabbix_proxy \ + zabbix-proxy %{_sbindir}/zabbix_proxy_pgsql 10 +: + +%preun proxy-pgsql +if [ "$1" = 0 ]; then +%systemd_preun zabbix-proxy.service +/usr/sbin/update-alternatives --remove zabbix-proxy \ + %{_sbindir}/zabbix_proxy_pgsql +fi +: + +%postun proxy-pgsql +%systemd_postun_with_restart zabbix-proxy.service +: +%endif + + +%if 0%{?build_with_sqlite} +%files proxy-sqlite3 +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%attr(0640,root,zabbix) %config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf +%dir %{zabbix_script_dir}/externalscripts +%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-proxy +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_mandir}/man8/zabbix_proxy.8* +%{_unitdir}/zabbix-proxy.service +%{_tmpfilesdir}/zabbix-proxy.conf +%{_sbindir}/zabbix_proxy_sqlite3 + +%pre proxy-sqlite3 +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post proxy-sqlite3 +%systemd_post zabbix-proxy.service +/usr/sbin/update-alternatives --install %{_sbindir}/zabbix_proxy \ + zabbix-proxy %{_sbindir}/zabbix_proxy_sqlite3 10 +: + +%preun proxy-sqlite3 +if [ "$1" = 0 ]; then +%systemd_preun zabbix-proxy.service +/usr/sbin/update-alternatives --remove zabbix-proxy \ + %{_sbindir}/zabbix_proxy_sqlite3 +fi +: + +%postun proxy-sqlite3 +%systemd_postun_with_restart zabbix-proxy.service +: +%endif +%endif + + +%if 0%{?build_server} +%if 0%{?build_with_mysql} +%files server-mysql +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%attr(0600,root,zabbix) %config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf +%dir %{zabbix_script_dir}/alertscripts +%dir %{zabbix_script_dir}/externalscripts +%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-server +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_mandir}/man8/zabbix_server.8* +%{_unitdir}/zabbix-server.service +%{_tmpfilesdir}/zabbix-server.conf +%{_sbindir}/zabbix_server_mysql + +%pre server-mysql +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post server-mysql +%systemd_post zabbix-server.service +/usr/sbin/update-alternatives --install %{_sbindir}/zabbix_server \ + zabbix-server %{_sbindir}/zabbix_server_mysql 10 +: + +%preun server-mysql +if [ "$1" = 0 ]; then +%systemd_preun zabbix-server.service +/usr/sbin/update-alternatives --remove zabbix-server \ + %{_sbindir}/zabbix_server_mysql +fi +: + +%postun server-mysql +%systemd_postun_with_restart zabbix-server.service +: +%endif + + +%if 0%{?build_with_pgsql} +%files server-pgsql +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%attr(0600,root,zabbix) %config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf +%dir %{zabbix_script_dir}/alertscripts +%dir %{zabbix_script_dir}/externalscripts +%config(noreplace) %{_sysconfdir}/logrotate.d/zabbix-server +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_mandir}/man8/zabbix_server.8* +%{_unitdir}/zabbix-server.service +%{_tmpfilesdir}/zabbix-server.conf +%{_sbindir}/zabbix_server_pgsql + +%pre server-pgsql +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post server-pgsql +%systemd_post zabbix-server.service +/usr/sbin/update-alternatives --install %{_sbindir}/zabbix_server \ + zabbix-server %{_sbindir}/zabbix_server_pgsql 10 +: + +%preun server-pgsql +if [ "$1" = 0 ]; then +%systemd_preun zabbix-server.service +/usr/sbin/update-alternatives --remove zabbix-server \ + %{_sbindir}/zabbix_server_pgsql +fi +: + +%postun server-pgsql +%systemd_postun_with_restart zabbix-server.service +: +%endif +%endif + + +%if 0%{?build_frontend} +%files web +%defattr(-,root,root,-) +%dir %{_sysconfdir}/zabbix/web +%ghost %config(noreplace) %{_sysconfdir}/zabbix/web/zabbix.conf.php +%doc AUTHORS ChangeLog COPYING NEWS README +%config(noreplace) %{_sysconfdir}/zabbix/web/maintenance.inc.php +%{_datadir}/zabbix + +%files web-deps +%config(noreplace) %{_sysconfdir}/php-fpm.d/zabbix.conf + +%files web-japanese +%defattr(-,root,root,-) + +%files web-mysql +%defattr(-,root,root,-) + +%files web-pgsql +%defattr(-,root,root,-) + +%files apache-conf +%defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/httpd/conf.d/zabbix.conf + +%files nginx-conf +%defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/nginx/conf.d/zabbix.conf + +%post web +# The fonts directory was moved into assets subdirectory at one point. +# +# This broke invocation of update-alternatives command below, because the target link for zabbix-web-font changed +# from zabbix/fonts/graphfont.ttf to zabbix/assets/fonts/graphfont.ttf +# +# We handle this movement by deleting /var/lib/alternatives/zabbix-web-font file if it contains the old target link. +# We also remove symlink at zabbix/fonts/graphfont.ttf to have the old fonts directory be deleted during update. +if [ -f /var/lib/alternatives/zabbix-web-font ] && \ + [ -z "$(grep %{_datadir}/zabbix/assets/fonts/graphfont.ttf /var/lib/alternatives/zabbix-web-font)" ] +then + rm /var/lib/alternatives/zabbix-web-font + if [ -h %{_datadir}/zabbix/fonts/graphfont.ttf ]; then + rm %{_datadir}/zabbix/fonts/graphfont.ttf + fi +fi +%if 0%{?rhel} >= 9 +# remove bad link to fonts/dejavu/DejaVuSans.ttf during upgrade on rhel 9 +if [ "$1" = 2 ]; then + /usr/sbin/update-alternatives --remove zabbix-web-font \ + %{_datadir}/fonts/dejavu/DejaVuSans.ttf +fi +%endif +/usr/sbin/update-alternatives --install %{_datadir}/zabbix/assets/fonts/graphfont.ttf \ +%if 0%{?rhel} >= 9 + zabbix-web-font %{_datadir}/fonts/dejavu-sans-fonts/DejaVuSans.ttf 10 +%else + zabbix-web-font %{_datadir}/fonts/dejavu/DejaVuSans.ttf 10 +%endif +: + +%post web-japanese +/usr/sbin/update-alternatives --install %{_datadir}/zabbix/assets/fonts/graphfont.ttf zabbix-web-font \ + %{_datadir}/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc 20 +: + +# The user apache must be available for these to work. +# It is provided by httpd or php-fpm packages. +%post apache-conf +if [ -d /etc/zabbix/web ]; then + chown apache:apache /etc/zabbix/web/ +fi +: + +%post nginx-conf +if [ -d /etc/zabbix/web ]; then + chown apache:apache /etc/zabbix/web/ +fi +: + +%preun web +if [ "$1" = 0 ]; then +%if 0%{?rhel} >= 9 +/usr/sbin/update-alternatives --remove zabbix-web-font \ + %{_datadir}/fonts/dejavu-sans-fonts/DejaVuSans.ttf +%else +/usr/sbin/update-alternatives --remove zabbix-web-font \ + %{_datadir}/fonts/dejavu/DejaVuSans.ttf +%endif +fi +: + +%preun web-japanese +if [ "$1" = 0 ]; then +/usr/sbin/update-alternatives --remove zabbix-web-font \ + %{_datadir}/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc +fi +: +%endif + + +%if 0%{?build_java_gateway} +%files java-gateway +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_java_gateway.conf +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/zabbix +%attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/zabbix +%{_datadir}/zabbix-java-gateway +%{_sbindir}/zabbix_java_gateway_startup +%{_sbindir}/zabbix_java_gateway_shutdown +%{_unitdir}/zabbix-java-gateway.service +%{_tmpfilesdir}/zabbix-java-gateway.conf +%config(noreplace) %{_sysconfdir}/zabbix/zabbix_java_gateway_logback.xml + +%pre java-gateway +getent group zabbix > /dev/null || groupadd -r zabbix +getent passwd zabbix > /dev/null || \ + useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ + -c "Zabbix Monitoring System" zabbix +: + +%post java-gateway +%systemd_post zabbix-java-gateway.service +: + +%preun java-gateway +if [ $1 -eq 0 ]; then +%systemd_preun zabbix-java-gateway.service +fi +: + +%postun java-gateway +%systemd_postun_with_restart zabbix-java-gateway.service +: +%endif + + +%if 0%{?build_selinux_policy} +%files selinux-policy +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING NEWS README +%{_datadir}/selinux/packages/zabbix/zabbix_policy.pp + + +%post selinux-policy +semodule -i %{_datadir}/selinux/packages/zabbix/zabbix_policy.pp +: + +%postun selinux-policy +if [ $1 = 0 ] && semodule -l | grep -q zabbix_policy; then semodule -r zabbix_policy; fi +: +%endif + + +%changelog +* Wed Sep 21 2022 Zabbix Packager - 6.0.9-release1 +- update to 6.0.9 + +* Mon Sep 19 2022 Zabbix Packager - 6.0.9-rc2.release1 +- update to 6.0.9rc2 + +* Wed Sep 14 2022 Zabbix Packager - 6.0.9-rc1.release1 +- update to 6.0.9rc1 +- moved zabbix-sql-scripts contents out of system documentation and into data directory +- added new postgresql files to sql-scripts package + +* Tue Aug 30 2022 Zabbix Packager - 6.0.8-release2 +- second release of 6.0.8 for rhel-9 +- fixed path to DejaVuSans font + +* Mon Aug 29 2022 Zabbix Packager - 6.0.8-release1 +- update to 6.0.8 +- added "release" prefix to package version + +* Mon Jul 25 2022 Zabbix Packager - 6.0.7-1 +- update to 6.0.7 + +* Wed Jun 29 2022 Zabbix Packager - 6.0.6-2 +- fixed postun selinux-policy scriptlet + +* Mon Jun 27 2022 Zabbix Packager - 6.0.6-1 +- update to 6.0.6 +- removed mongodb from agent2, expecting to use external plugin +- reverted /run to /var/run in conf files using patches 6 & 7 for rhel <= 6 +- fixed bogus systemd scriptlet for agent2 on rhel < 7 +- silencing agent2 interactive output on rhel 6 (ZBX-20456) + +* Mon May 30 2022 Zabbix Packager - 6.0.5-1 +- update to 6.0.5 +- added After=postgresql-14.service to server and proxy systemd service files + +* Tue May 03 2022 Zabbix Packager - 6.0.4-1 +- update to 6.0.4 +- added rhel6-go11.6.patch +- replaced /var/run with /run +- updated selinux-policy to allow web servers connecting to postgres via socket +- fixed selinux-policy postun scriptlet + +* Mon Apr 04 2022 Zabbix Packager - 6.0.3-1 +- update to 6.0.3 + +* Mon Mar 14 2022 Zabbix Packager - 6.0.2-1 +- update to 6.0.2 + +* Tue Mar 01 2022 Zabbix Packager - 6.0.1-1 +- update to 6.0.1 +- fixed EnvironmentFile setting in web-service systemd service file + +* Mon Feb 14 2022 Zabbix Packager - 6.0.0-1 +- update to 6.0.0 + +* Fri Feb 04 2022 Zabbix Packager - 6.0.0-0.12rc2 +- update to 6.0.0rc2 + +* Tue Feb 01 2022 Zabbix Packager - 6.0.0-0.11rc1 +- update to 6.0.0rc1 + +* Tue Jan 25 2022 Zabbix Packager - 6.0.0-0.10beta3 +- update to 6.0.0beta3 + +* Tue Jan 11 2022 Zabbix Packager - 6.0.0-0.9beta2 +- update to 6.0.0beta2 +- using pcre2 on rhel >= 7 +- added history_pk_prepare.sql to sql-scripts package + +* Mon Dec 13 2021 Zabbix Packager - 6.0.0-0.8beta1 +- update to 6.0.0beta1 +- removed erronious references to tmpfiles.d on rhel < 7 and fixed _tmpfilesdir macro usage +- removed "Obsoletes: zabbix" for web-servce sub-package +- renamed create.sql.gz to server.sql.gz +- renamed schema.sql to proxy.sql +- compressing only server.sql.gz + +* Mon Nov 22 2021 Zabbix Packager - 6.0.0-0.7alpha7 +- update to 6.0.0alpha7 + +* Tue Nov 09 2021 Zabbix Packager - 6.0.0-0.6alpha6 +- update to 6.0.0alpha6 + +* Mon Oct 25 2021 Zabbix Packager - 6.0.0-0.5alpha5 +- update to 6.0.0alpha5 +- separated agent2 plugin conf files (ZBXNEXT-6428) +- updated php-fpm conf files (ZBX-20106) + +* Wed Oct 06 2021 Zabbix Packager - 6.0.0-0.4alpha4 +- update to 6.0.0alpha4 + +* Mon Sep 20 2021 Zabbix Packager - 6.0.0-0.3alpha3 +- update to 6.0.0alpha3 + +* Mon Sep 06 2021 Zabbix Packager - 6.0.0-0.2alpha2 +- update to 6.0.0alpha2 + +* Wed Aug 25 2021 Zabbix Packager - 6.0.0-0.1alpha1 +- update to 6.0.0alpha1 +- added selinux-policy package (rhel 7+) + +* Wed Jul 21 2021 Zabbix Packager - 5.4.3-1 +- update to 5.4.3 + +* Mon Jun 28 2021 Zabbix Packager - 5.4.2-1 +- update to 5.4.2 + +* Mon Jun 07 2021 Zabbix Packager - 5.4.1-1 +- update to 5.4.1 +- removed bogus PIDFile from zabbix-web-service.service file +- using conditionals around sub-package definition blocks; fixed wrong arch in rhel-5 package names +- denying web server access to vendor subdir in /usr/share/zabbix +- renamed config.patch to frontend.patch +- replaced conf file sed substitutions with patches + +* Thu May 27 2021 Zabbix Packager - 5.4.0-9 +- second build of 5.4.0 agent2 +- fixed LogFile path substitution for agent2 + +* Fri May 14 2021 Zabbix Packager - 5.4.0-8 +- update to 5.4.0 +- setting EXTERNAL_SCRIPTS_PATH and ALERT_SCRIPTS_PATH make variables to /usr/lib/zabbix/* + +* Thu May 13 2021 Zabbix Packager - 5.4.0-0.8rc2 +- update to 5.4.0rc2 + +* Tue May 11 2021 Zabbix Packager - 5.4.0-0.7rc1 +- update to 5.4.0rc1 + +* Mon Apr 26 2021 Zabbix Packager - 5.4.0-0.6beta3 +- update to 5.4.0beta3 +- added zabbix-web-service package (ZBXNEXT-6480) + +* Thu Mar 11 2021 Zabbix Packager - 5.4.0-0.5beta2 +- update to 5.4.0beta2 +- fixed errors and warnings reported by rpmlint +- added ProxyTimeout 300 to apache config, when running with php-fpm +- removed database subdir from sql-scripts package +- added After=postgresql-13.service to server & proxy service files + +* Mon Mar 01 2021 Zabbix Packager - 5.4.0-0.4beta1 +- update to 5.4.0beta1 + +* Thu Feb 18 2021 Zabbix Packager - 5.4.0-0.3alpha2 +- update to 5.4.0alpha2 +- updated java-gateway package to use startup and shutdown scripts from zabbix sources + +* Thu Jan 28 2021 Zabbix Packager - 5.4.0-0.2alpha1 +- second build of 5.4.0alpha1 +- fixed BuildArch and files section for zabbix-sql-scripts package + +* Thu Jan 28 2021 Zabbix Packager - 5.4.0-0.1alpha1 +- update to 5.4.0alpha1 +- reworked spec file to allow selecting which packages are being built via macros (ZBX-18826) + +* Mon Dec 21 2020 Zabbix Packager - 5.2.3-1 +- update to 5.2.3 + +* Mon Nov 30 2020 Zabbix Packager - 5.2.2-1 +- update to 5.2.2 +- added proxy and java-gateway to rhel-7 + +* Fri Oct 30 2020 Zabbix Packager - 5.2.1-1 +- update to 5.2.1 + +* Mon Oct 26 2020 Zabbix Packager - 5.2.0-1 +- update to 5.2.0 + +* Thu Oct 22 2020 Zabbix Packager - 5.2.0-0.7rc2 +- update to 5.2.0rc2 + +* Tue Oct 20 2020 Zabbix Packager - 5.2.0-0.6rc1 +- update to 5.2.0rc1 + +* Mon Oct 12 2020 Zabbix Packager - 5.2.0-0.5beta2 +- update to 5.2.0beta2 + +* Mon Sep 28 2020 Zabbix Packager - 5.2.0-0.4beta1 +- update to 5.2.0beta1 +- added User=zabbix & Group=zabbix to all service files + +* Mon Sep 14 2020 Zabbix Packager - 5.2.0-0.3alpha3 +- update to 5.2.0alpha3 +- added separate zabbix-web-deps package +- doing hardened builds on rhel >= 8 +- removed libyaml.patch +- overriding ExternalScripts & AlertScriptsPath in binaries instead of config files (ZBX-17983) + +* Mon Aug 31 2020 Zabbix Packager - 5.2.0-0.2alpha2 +- update to 5.2.0alpha2 +- building only agent, sender & get packages on rhel <= 7 +- creating empty log file for agent2 (ZBX-18243) + +* Mon Aug 17 2020 Zabbix Packager - 5.2.0-0.1alpha1 +- update to 5.2.0alpha1 +- building server and proxy with mysql 8 & postgresql 12 on rhel/centos 7 (ZBX-18221) +- added various After=postgresql* directives to server & proxy service files (ZBX-17492) + +* Mon Jul 13 2020 Zabbix Packager - 5.0.2-1 +- update to 5.0.2 +- removed ZBX-17801 patch +- added "if build_agent2" around zabbix_agent2.conf installation (ZBX-17818) + +* Thu May 28 2020 Zabbix Packager - 5.0.1-1 +- update to 5.0.1 +- changed mysql build dependency on rhel/centos-8 from mysql-devel to mariadb-connector-c-devel (ZBX-17738) +- added patch that fixes (ZBX-17801) + +* Mon May 11 2020 Zabbix Packager - 5.0.0-1 +- update to 5.0.0 + +* Tue May 05 2020 Zabbix Packager - 5.0.0-0.7rc1 +- update to 5.0.0rc1 +- moved frontends/php to ui directory + +* Mon Apr 27 2020 Zabbix Packager - 5.0.0-0.6beta2 +- update to 5.0.0beta2 + +* Tue Apr 14 2020 Zabbix Packager - 5.0.0-0.5beta1 +- update to 5.0.0beta1 +- added agent2 on rhel/centos 7 + +* Mon Mar 30 2020 Zabbix Packager - 5.0.0-0.4alpha4 +- update to 5.0.0alpha4 +- removed proxy, java-gateway & js packages on rhel 5 & 6 due to minimum supported database version increase + +* Mon Mar 16 2020 Zabbix Packager - 5.0.0-0.3alpha3 +- update to 5.0.0alpha3 +- using libssh instead of libssh2 (rhel/centos 8) +- removed explicit dependency on php from zabbix-web (rhel/centos 8) +- removed explicit dependency on httpd from zabbix-web (rhel/centos 7) +- added zabbix-apache-conf (rhel/centos 7) +- using zabbix-web-database-scl as zabbix-(apache/nginx)-conf package dependency (rhel/centos 7) + +* Mon Feb 17 2020 Zabbix Packager - 5.0.0-0.2alpha2 +- update to 5.0.0alpha2 +- fixed font configuration in pre/post scriptlets on rhel-8 + +* Wed Feb 05 2020 Zabbix Packager - 5.0.0-0.2alpha1 +- added *-scl packages to help with resolving php7.2+ and nginx dependencies of zabbix frontend on rhel/centos 7 +- added posttrans script that preserves /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf file +- added config(noreplace) to /etc/sysconfig/zabbix-agent +- added explicit version to php-module dependencies in zabbix-web package on rhel/centos 8 + +* Mon Jan 27 2020 Zabbix Packager - 5.0.0-0.1alpha1 +- update to 5.0.0alpha1 + +* Tue Jan 07 2020 Zabbix Packager - 4.4.4-2 +- build of rhel-5 packages to be resigned with gpg version 3 + +* Thu Dec 19 2019 Zabbix Packager - 4.4.4-1 +- update to 4.4.4 +- added After=.service directives to server and proxy service files + +* Wed Nov 27 2019 Zabbix Packager - 4.4.3-1 +- update to 4.4.3 +- added User=zabbix and Group=zabbix directives to agent service file + +* Mon Nov 25 2019 Zabbix Packager - 4.4.2-1 +- update to 4.4.2 + +* Mon Oct 28 2019 Zabbix Packager - 4.4.1-1 +- update to 4.4.1 + +* Mon Oct 07 2019 Zabbix Packager 4.4.0-1 +- update to 4.4.0 + +* Thu Oct 03 2019 Zabbix Packager - 4.4.0-0.5rc1 +- update to 4.4.0rc1 + +* Tue Sep 24 2019 Zabbix Packager - 4.4.0-0.4beta1 +- update to 4.4.0beta1 +- added zabbix-agent2 package + +* Wed Sep 18 2019 Zabbix Packager - 4.4.0-0.3alpha3 +- update to 4.4.0alpha3 + +* Thu Aug 15 2019 Zabbix Packager - 4.4.0-0.2alpha2 +- update to 4.4.0alpha2 +- using google-noto-sans-cjk-ttc-fonts for graphfont in web-japanese package on rhel-8 +- added php-fpm as dependency of zabbix-web packages on rhel-8 + +* Wed Jul 17 2019 Zabbix Packager - 4.4.0-0.1alpha1 +- update to 4.4.0alpha1 +- removed apache config from zabbix-web package +- added dedicated zabbix-apache-conf and zabbix-nginx-conf packages + +* Fri Mar 29 2019 Zabbix Packager - 4.2.0-1 +- update to 4.2.0 +- removed jabber notifications support and dependency on iksemel library + +* Tue Mar 26 2019 Zabbix Packager - 4.2.0-0.6rc2 +- update to 4.2.0rc2 + +* Mon Mar 18 2019 Zabbix Packager - 4.2.0-0.5rc1 +- update to 4.2.0rc1 + +* Mon Mar 04 2019 Zabbix Packager - 4.2.0-0.4beta2 +- update to 4.2.0beta2 + +* Mon Feb 18 2019 Zabbix Packager - 4.2.0-0.1beta1 +- update to 4.2.0beta1 + +* Tue Feb 05 2019 Zabbix Packager - 4.2.0-0.3alpha3 +- build of 4.2.0alpha3 with *.mo files + +* Wed Jan 30 2019 Zabbix Packager - 4.2.0-0.2alpha3 +- added timescaledb.sql.gz to zabbix-server-pgsql package + +* Mon Jan 28 2019 Zabbix Packager - 4.2.0-0.1alpha3 +- update to 4.2.0alpha3 + +* Fri Dec 21 2018 Zabbix Packager - 4.2.0-0.2alpha2 +- update to 4.2.0alpha2 + +* Tue Nov 27 2018 Zabbix Packager - 4.2.0-0.1alpha1 +- update to 4.2.0alpha1 + +* Mon Oct 29 2018 Zabbix Packager - 4.0.1-1 +- update to 4.0.1 + +* Mon Oct 01 2018 Zabbix Packager - 4.0.0-2 +- update to 4.0.0 + +* Fri Sep 28 2018 Zabbix Packager - 4.0.0-1.1rc3 +- update to 4.0.0rc3 + +* Tue Sep 25 2018 Zabbix Packager - 4.0.0-1.1rc2 +- update to 4.0.0rc2 + +* Wed Sep 19 2018 Zabbix Packager - 4.0.0-1.1rc1 +- update to 4.0.0rc1 + +* Mon Sep 10 2018 Zabbix Packager - 4.0.0-1.1beta2 +- update to 4.0.0beta2 + +* Tue Aug 28 2018 Zabbix Packager - 4.0.0-1.1beta1 +- update to 4.0.0beta1 + +* Mon Jul 23 2018 Zabbix Packager - 4.0.0-1.1alpha9 +- update to 4.0.0alpha9 +- add PHP variable max_input_vars = 10000, overriding default 1000 + +* Mon Jun 18 2018 Zabbix Packager - 4.0.0-1.1alpha8 +- update to 4.0.0alpha8 + +* Wed May 30 2018 Zabbix Packager - 4.0.0-1.1alpha7 +- update to 4.0.0alpha7 + +* Fri Apr 27 2018 Zabbix Packager - 4.0.0-1.1alpha6 +- update to 4.0.0alpha6 +- add support for Ubuntu 18.04 (Bionic) +- move enabling JMX interface on Zabbix java gateway to zabbix_java_gateway.conf + +* Mon Mar 26 2018 Vladimir Levijev - 4.0.0-1.1alpha5 +- update to 4.0.0alpha5 + +* Tue Feb 27 2018 Vladimir Levijev - 4.0.0-1.1alpha4 +- update to 4.0.0alpha4 + +* Mon Feb 05 2018 Vladimir Levijev - 4.0.0-1.1alpha3 +- update to 4.0.0alpha3 + +* Tue Jan 09 2018 Vladimir Levijev - 4.0.0-1.1alpha2 +- update to 4.0.0alpha2 + +* Tue Dec 19 2017 Vladimir Levijev - 4.0.0-1alpha1 +- update to 4.0.0alpha1 + +* Thu Nov 09 2017 Vladimir Levijev - 3.4.4-2 +- add missing translation (.mo) files + +* Tue Nov 07 2017 Vladimir Levijev - 3.4.4-1 +- update to 3.4.4 +- fix issue with new line character in pid file that resulted in failure when shutting down daemons on RHEL 5 + +* Tue Oct 17 2017 Vladimir Levijev - 3.4.3-1 +- update to 3.4.3 + +* Mon Sep 25 2017 Vladimir Levijev - 3.4.2-1 +- update to 3.4.2 + +* Mon Aug 28 2017 Vladimir Levijev - 3.4.1-1 +- update to 3.4.1 +- change SocketDir to /var/run/zabbix + +* Mon Aug 21 2017 Vladimir Levijev - 3.4.0-1 +- update to 3.4.0 + +* Wed Apr 26 2017 Kodai Terashima - 3.4.0-1alpha1 +- update to 3.4.0alpla1 r68116 +- add libpcre and libevent for compile option + +* Sun Apr 23 2017 Kodai Terashima - 3.2.5-1 +- update to 3.2.5 +- add TimeoutSec=0 to systemd service file + +* Thu Mar 02 2017 Kodai Terashima - 3.2.4-2 +- remove TimeoutSec for systemd + +* Mon Feb 27 2017 Kodai Terashima - 3.2.4-1 +- update to 3.2.4 +- add TimeoutSec for systemd service file + +* Wed Dec 21 2016 Kodai Terashima - 3.2.3-1 +- update to 3.2.3 + +* Thu Dec 08 2016 Kodai Terashima - 3.2.2-1 +- update to 3.2.2 + +* Sun Oct 02 2016 Kodai Terashima - 3.2.1-1 +- update to 3.2.1 +- use zabbix user and group for Java Gateway +- add SuccessExitStatus=143 for Java Gateway servie file + +* Tue Sep 13 2016 Kodai Terashima - 3.2.0-1 +- update to 3.2.0 +- add *.conf for Include parameter in agent configuration file + +* Mon Sep 12 2016 Kodai Terashima - 3.2.0rc2-1 +- update to 3.2.0rc2 + +* Fri Sep 09 2016 Kodai Terashima - 3.2.0rc1-1 +- update to 3.2.0rc1 + +* Thu Sep 01 2016 Kodai Terashima - 3.2.0beta2-1 +- update to 3.2.0beta2 + +* Fri Aug 26 2016 Kodai Terashima - 3.2.0beta1-1 +- update to 3.2.0beta1 + +* Fri Aug 12 2016 Kodai Terashima - 3.2.0alpha1-1 +- update to 3.2.0alpha1 + +* Sun Jul 24 2016 Kodai Terashima - 3.0.4-1 +- update to 3.0.4 + +* Sun May 22 2016 Kodai Terashima - 3.0.3-1 +- update to 3.0.3 +- fix java gateway systemd script to use java options + +* Wed Apr 20 2016 Kodai Terashima - 3.0.2-1 +- update to 3.0.2 +- remove ZBX-10459.patch + +* Sat Apr 02 2016 Kodai Terashima - 3.0.1-2 +- fix proxy packges doesn't have schema.sql.gz +- add server and web packages for RHEL6 +- add ZBX-10459.patch + +* Sun Feb 28 2016 Kodai Terashima - 3.0.1-1 +- update to 3.0.1 +- remove DBSocker parameter + +* Sat Feb 20 2016 Kodai Terashima - 3.0.0-2 +- agent, proxy and java-gateway for RHEL 5 and 6 + +* Mon Feb 15 2016 Kodai Terashima - 3.0.0-1 +- update to 3.0.0 + +* Thu Feb 11 2016 Kodai Terashima - 3.0.0rc2 +- update to 3.0.0rc2 +- add TIMEOUT parameter for java gateway conf + +* Thu Feb 04 2016 Kodai Terashima - 3.0.0rc1 +- update to 3.0.0rc1 + +* Sat Jan 30 2016 Kodai Terashima - 3.0.0beta2 +- update to 3.0.0beta2 + +* Thu Jan 21 2016 Kodai Terashima - 3.0.0beta1 +- update to 3.0.0beta1 + +* Thu Jan 14 2016 Kodai Terashima - 3.0.0alpha6 +- update to 3.0.0alpla6 +- remove zabbix_agent conf and binary + +* Wed Jan 13 2016 Kodai Terashima - 3.0.0alpha5 +- update to 3.0.0alpha5 + +* Fri Nov 13 2015 Kodai Terashima - 3.0.0alpha4-1 +- update to 3.0.0alpha4 + +* Thu Oct 29 2015 Kodai Terashima - 3.0.0alpha3-2 +- fix web-pgsql package dependency +- add --with-openssl option + +* Mon Oct 19 2015 Kodai Terashima - 3.0.0alpha3-1 +- update to 3.0.0alpha3 + +* Tue Sep 29 2015 Kodai Terashima - 3.0.0alpha2-3 +- add IfModule for mod_php5 in apache configuration file +- fix missing proxy_mysql alternatives symlink +- chagne snmptrap log filename +- remove include dir from server and proxy conf + +* Fri Sep 18 2015 Kodai Terashima - 3.0.0alpha2-2 +- fix create.sql doesn't contain schema.sql & images.sql + +* Tue Sep 15 2015 Kodai Terashima - 3.0.0alpha2-1 +- update to 3.0.0alpha2 + +* Sat Aug 22 2015 Kodai Terashima - 2.5.0-1 +- create spec file from scratch +- update to 2.5.0