From 9b10f6127af9ed4b20c504da544de011672c62fd Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Sep 15 2022 08:01:23 +0000 Subject: import upstream 5.0.27 release Signed-off-by: Fabian Arrotin --- diff --git a/.zabbix.metadata b/.zabbix.metadata index df700b7..8b449e1 100644 --- a/.zabbix.metadata +++ b/.zabbix.metadata @@ -1 +1 @@ -8ecea0563e439e4bc4ff32c52e8c8a2d8c8e707a SOURCES/zabbix-5.0.19.tar.gz +c9763fd79d63619740ed98157085ff7e2cc5ee94 SOURCES/zabbix-5.0.27.tar.gz diff --git a/SOURCES/frontend.patch b/SOURCES/frontend.patch index 81acdb1..8805a42 100644 --- a/SOURCES/frontend.patch +++ b/SOURCES/frontend.patch @@ -34,8 +34,8 @@ diff -urN 5.0.19.orig/ui/include/classes/core/ZBase.php 5.0.19/ui/include/classe diff -urN 5.0.19.orig/ui/include/classes/setup/CSetupWizard.php 5.0.19/ui/include/classes/setup/CSetupWizard.php --- 5.0.19.orig/ui/include/classes/setup/CSetupWizard.php 2021-12-23 12:38:22.759316509 +0200 +++ 5.0.19/ui/include/classes/setup/CSetupWizard.php 2021-12-23 12:39:28.253777545 +0200 -@@ -443,7 +443,7 @@ - +@@ -430,7 +430,7 @@ + private function stage5(): array { $this->setConfig('ZBX_CONFIG_FILE_CORRECT', true); - $config_file_name = APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH; 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-agent2.init b/SOURCES/zabbix-agent2.init index e7a0224..d866bac 100644 --- a/SOURCES/zabbix-agent2.init +++ b/SOURCES/zabbix-agent2.init @@ -47,7 +47,7 @@ lockfile=/var/lock/subsys/zabbix-agent2 start() { echo -n $"Starting Zabbix agent 2: " - daemon $user_conf $exec -c $conf & + daemon $user_conf $exec -c $conf &>/dev/null & rv=$? echo [ $rv -eq 0 ] && touch $lockfile diff --git a/SOURCES/zabbix-proxy.service b/SOURCES/zabbix-proxy.service index 549830d..8e44e7a 100644 --- a/SOURCES/zabbix-proxy.service +++ b/SOURCES/zabbix-proxy.service @@ -14,6 +14,7 @@ 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" diff --git a/SOURCES/zabbix-server.service b/SOURCES/zabbix-server.service index 11f83a6..e06e0d2 100644 --- a/SOURCES/zabbix-server.service +++ b/SOURCES/zabbix-server.service @@ -14,6 +14,7 @@ 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" diff --git a/SPECS/zabbix.spec b/SPECS/zabbix.spec index 110e8e6..d957f6a 100644 --- a/SPECS/zabbix.spec +++ b/SPECS/zabbix.spec @@ -1,6 +1,6 @@ Name: zabbix -Version: 5.0.19 -Release: %{?alphatag:0.}2%{?alphatag}%{?dist} +Version: 5.0.27 +Release: %{?alphatag:0.}1%{?alphatag}%{?dist} Summary: The Enterprise-class open source monitoring solution Group: Applications/Internet License: GPLv2+ @@ -30,18 +30,22 @@ Source23: zabbix-php-fpm.conf.rhel-7 Patch0: frontend.patch Patch1: fping3-sourceip-option.patch Patch2: conf.patch +Patch3: rhel6-go11.6.patch Buildroot: %{_tmppath}/zabbix-%{version}-%{release}-root-%(%{__id_u} -n) %{!?build_agent: %global build_agent 1} +%if 0%{?rhel} <= 8 %if 0%{?rhel} >= 6 %ifarch x86_64 -%{!?build_agent2: %global build_agent2 0} +%{!?build_agent2: %global build_agent2 1} +%endif %endif %endif +%if 0%{?rhel} <= 8 %if 0%{?rhel} >= 7 %{!?build_proxy: %global build_proxy 1} %{!?build_java_gateway: %global build_java_gateway 1} @@ -52,6 +56,7 @@ Buildroot: %{_tmppath}/zabbix-%{version}-%{release}-root-%(%{__id_u} -n) %{!?build_with_pgsql: %global build_with_pgsql 1} %{!?build_with_sqlite: %global build_with_sqlite 1} %endif +%endif %if 0%{?build_with_mysql} == 0 && 0%{?build_with_pgsql} == 0 %global build_server 0 @@ -60,8 +65,8 @@ Buildroot: %{_tmppath}/zabbix-%{version}-%{release}-root-%(%{__id_u} -n) %endif %endif -# FIXME: Building debuginfo is broken on RHEL-8. Disabled for now. -%if 0%{?rhel} == 8 +# FIXME: Building debuginfo is broken on RHEL 8 & 9. Disabled for now. +%if 0%{?rhel} >= 8 %define debug_package %{nil} %endif @@ -81,7 +86,6 @@ BuildRequires: sqlite-devel %endif BuildRequires: net-snmp-devel BuildRequires: openldap-devel -BuildRequires: gnutls-devel BuildRequires: unixODBC-devel BuildRequires: curl-devel >= 7.13.1 BuildRequires: OpenIPMI-devel >= 2 @@ -89,9 +93,13 @@ BuildRequires: java-devel >= 1.6.0 BuildRequires: libxml2-devel BuildRequires: pcre-devel BuildRequires: libevent-devel +%if 0%{?rhel} >= 9 +BuildRequires: gnutls-devel +%else %if 0%{?rhel} >= 6 BuildRequires: openssl-devel >= 1.0.1 %endif +%endif %description Zabbix is the ultimate enterprise-level software designed for @@ -99,7 +107,7 @@ real-time monitoring of millions of metrics collected from tens of thousands of servers, virtual machines and network devices. %package agent -Summary: Old Zabbix Agent +Summary: Zabbix agent Group: Applications/Internet Requires: logrotate Requires(pre): /usr/sbin/useradd @@ -113,7 +121,9 @@ Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service %endif +%if 0%{?rhel} <= 8 Obsoletes: zabbix +%endif %if 0%{?build_agent2} != 1 %description agent @@ -125,7 +135,7 @@ Old implementation of zabbix agent. To be installed on monitored systems. %package agent2 -Summary: New Zabbix Agent +Summary: Zabbix agent 2 Group: Applications/Internet Requires: logrotate %if 0%{?rhel} >= 7 @@ -138,7 +148,9 @@ Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service %endif +%if 0%{?rhel} <= 8 Obsoletes: zabbix +%endif %description agent2 New implementation of zabbix agent. @@ -146,14 +158,14 @@ To be installed on monitored systems. %endif %package get -Summary: Zabbix Get +Summary: Zabbix get Group: Applications/Internet %description get Zabbix get command line utility. %package sender -Summary: Zabbix Sender +Summary: Zabbix sender Group: Applications/Internet %description sender @@ -161,7 +173,7 @@ Zabbix sender command line utility. %if 0%{?rhel} >= 7 %package js -Summary: Zabbix JS +Summary: Zabbix js Group: Applications/Internet %description js @@ -176,8 +188,10 @@ Requires(preun): systemd Requires(postun): systemd Provides: zabbix-proxy = %{version}-%{release} Provides: zabbix-proxy-implementation = %{version}-%{release} +%if 0%{?rhel} <= 8 Obsoletes: zabbix Obsoletes: zabbix-proxy +%endif %description proxy-mysql Zabbix proxy with MySQL or MariaDB database support. @@ -191,8 +205,10 @@ Requires(preun): systemd Requires(postun): systemd Provides: zabbix-proxy = %{version}-%{release} Provides: zabbix-proxy-implementation = %{version}-%{release} +%if 0%{?rhel} <= 8 Obsoletes: zabbix Obsoletes: zabbix-proxy +%endif %description proxy-pgsql Zabbix proxy with PostgreSQL database support. @@ -206,8 +222,10 @@ Requires(preun): systemd Requires(postun): systemd Provides: zabbix-proxy = %{version}-%{release} Provides: zabbix-proxy-implementation = %{version}-%{release} +%if 0%{?rhel} <= 8 Obsoletes: zabbix Obsoletes: zabbix-proxy +%endif %description proxy-sqlite3 Zabbix proxy with SQLite3 database support. @@ -221,8 +239,10 @@ Requires(preun): systemd Requires(postun): systemd Provides: zabbix-server = %{version}-%{release} Provides: zabbix-server-implementation = %{version}-%{release} +%if 0%{?rhel} <= 8 Obsoletes: zabbix Obsoletes: zabbix-server +%endif %description server-mysql Zabbix server with MySQL or MariaDB database support. @@ -236,8 +256,11 @@ Requires(preun): systemd Requires(postun): systemd Provides: zabbix-server = %{version}-%{release} Provides: zabbix-server-implementation = %{version}-%{release} +%if 0%{?rhel} <= 8 Obsoletes: zabbix Obsoletes: zabbix-server +%endif + %description server-pgsql Zabbix server with PostgresSQL database support. @@ -486,7 +509,9 @@ Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service %endif +%if 0%{?rhel} <= 8 Obsoletes: zabbix +%endif %description java-gateway Zabbix java gateway @@ -557,6 +582,12 @@ sed -i -e 's|/tmp/zabbix_java.log|/var/log/zabbix/zabbix_java_gateway.log|g' src # update config files %patch2 -p1 +%if 0%{?build_agent2} +%if 0%{?rhel} == 6 +%patch3 -p1 +%endif +%endif + # Build consists of 1-3 configure/make passes, one for each database. # pass 1: is sqlite proxy, may be omitted. @@ -582,9 +613,13 @@ build_conf_common=" --with-libxml2 --with-libevent --with-libpcre +%if 0%{?rhel} >= 9 + --with-gnutls +%else %if 0%{?rhel} >= 6 --with-openssl %endif +%endif " # setup pass 3 @@ -939,7 +974,9 @@ getent passwd zabbix > /dev/null || \ : %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 @@ -947,6 +984,7 @@ if [ $1 == 1 ] && [ ! -f %{_localstatedir}/log/zabbix/zabbix_agent2.log ]; then fi : +%if 0%{?rhel} >= 7 %preun agent2 %systemd_preun zabbix-agent2.service : @@ -955,6 +993,7 @@ fi %systemd_postun_with_restart zabbix-agent2.service : %endif +%endif %if 0%{?build_server} || 0%{?build_proxy} @@ -1358,8 +1397,33 @@ fi # %changelog -* Fri Dec 24 2021 Fabian Arrotin - 5.0.19-2 -- disabling agent2 build due to missing BuildRequires (not fetching GO from internet) +* Mon Aug 29 2022 Zabbix Packager - 5.0.27-1 +- update to 5.0.27 + +* Mon Jul 25 2022 Zabbix Packager - 5.0.26-1 +- update to 5.0.26 + +* Mon Jun 27 2022 Zabbix Packager - 5.0.25-1 +- update to 5.0.25 +- fixed bogus systemd scriptlet for agent2 on rhel < 7 +- silencing agent2 interactive output on rhel 6 (ZBX-20456) + +* Mon May 30 2022 Zabbix Packager - 5.0.24-1 +- update to 5.0.24 +- added After=postgresql-14.service to server and proxy systemd service files + +* Mon May 02 2022 Zabbix Packager - 5.0.23-1 +- update to 5.0.23 +- added rhel6-go11.6.patch + +* Mon Apr 04 2022 Zabbix Packager - 5.0.22-1 +- update to 5.0.22 + +* Mon Feb 28 2022 Zabbix Packager - 5.0.21-1 +- update to 5.0.21 + +* Mon Jan 31 2022 Zabbix Packager - 5.0.20-1 +- update to 5.0.20 * Thu Dec 23 2021 Zabbix Packager - 5.0.19-1 - update to 5.0.19