# $Id: smeserver-zabbix-server.spec,v 1.9 2021/11/08 03:55:26 jpp Exp $ # Authority: vip-ire # Name: Daniel Berteaud %define name smeserver-zabbix-server %define version 0.1 %define release 28 Summary: sme server integration of zabbix server and web front-end Name: %{name} Version: %{version} Release: %{release}%{?dist} License: GNU GPL version 2 URL: http://www.zabbix.com/ Group: SMEserver/addon Source: %{name}-%{version}.tar.gz Patch0: smeserver-zabbix-server-0.1-sendxmpp_template.patch Patch1: smeserver-zabbix-server-0.1-sendxmpp_shell_script_header.patch Patch2: smeserver-zabbix-server-0.1-disable_web_access.patch Patch3: smeserver-zabbix-server-0.1-mysql_db_pass.patch Patch4: smeserver-zabbix-server-0.1-script_and_tmp_location.patch Patch5: smeserver-zabbix-server-0.1-event_zabbix-server-update.patch Patch6: smeserver-zabbix-server-0.1-enable_db_cache.patch Patch7: smeserver-zabbix-server-0.1-adjust_masq.patch Patch8: smeserver-zabbix-server-0.1-sendxmpprc.patch Patch9: smeserver-zabbix-server-0.1-sendxmpprc_template_fix.patch Patch10: smeserver-zabbix-server-0.1-path2sendxmpprc.patch Patch11: smeserver-zabbix-server-0.1-multiple_dbpatches.patch Patch12: smeserver-zabbix-server-0.1-use_global_tz.patch Patch13: smeserver-zabbix-server-0.1-php_mem_limit.patch Patch14: smeserver-zabbix-server-0.1-sme9db.patch Patch15: smeserver-zabbix-server-0.1-sme9zabb3.2.4.patch Patch16: smeserver-zabbix-server-0.1-SME10458-SenderFrequency.deprecated.patch Patch17: smeserver-zabbix-server-0.1-zabbix4.4.6.patch Patch18: smeserver-zabbix-server-0.1-Update-httpd-createlinks-and-adduser.ini.patch Patch19: smeserver-zabbix-server-0.1-Template-user-dot-ini-and-override-service-file-change-pid-in-conf-file.patch Patch20: smeserver-zabbix-server-0.1-Add-in-zabbix-conf-expansion-to-createlinks.patch Patch21: smeserver-zabbix-server-0.1-Switch-to-specific-php-fpm.patch Patch22: smeserver-zabbix-server-0.1-bz11232-installSME10.patch Patch23: smeserver-zabbix-server-0.1-bz10802-checkcert-telegram.patch BuildArchitectures: noarch BuildRequires: e-smith-devtools BuildRoot: /var/tmp/%{name}-%{version} Requires: e-smith-release >= 9.0 Requires: fping Obsoletes: zabbix-server Requires: zabbix-server-mysql >= 4.4.6 Requires: zabbix-web-mysql >= 4.4.6 Requires: zabbix-web >= 4.4.6 Requires: sendxmpp Conflicts: smeserver-zabbix-proxy Requires: smeserver-remoteuseraccess #Requires: smeserver-php-scl AutoReqProv: no # for telegram bot Requires: python2-pysocks python-requests python2-requests-oauthlib #for zabbix=>50 #Provides: rh-php72-php-fpm rh-php72-php-mbstring rh-php72 rh-php72-php-mysqlnd rh-php72-php-gd rh-php72-php-xml rh-php72-php-ldap rh-php72-php-bcmath # %description smserver integration of zabbix server and web front-end. Zabbix is an entreprise-class open source distributed monitoring solution %changelog * Mon Nov 08 2021 Jean-Philippe Pialasse 0.1-28.sme - add check cert scripts and telegram [SME: 10802] no template provided to use with * Sun Nov 07 2021 Jean-Philippe Pialasse 0.1-27.sme - fix init sql, typo and reload deamon [SME: 11232] * Sun Nov 07 2021 Jean-Philippe Pialasse 0.1-26.sme - fix session and log issue [SME: 11232] fix mysql-init not launched * Mon Nov 01 2021 BogusDateBot - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, by assuming the date is correct and changing the weekday. Tue Mar 02 2009 --> Tue Feb 24 2009 or Mon Mar 02 2009 or Tue Mar 03 2009 or .... Wed Feb 07 2016 --> Wed Feb 03 2016 or Sun Feb 07 2016 or Wed Feb 10 2016 or .... * Mon Nov 01 2021 Brian Read 0.1-25.sme - Switch-to-specific-php-fpm [SME: 11232] * Mon Nov 01 2021 Brian Read 0.1-24.sme - Remove post and postun command in spec file [SME: 11232] * Thu Dec 10 2020 Brian Read 0.1-23.sme - Add in post instructions to spec for SQL db creation [SME: 11232] * Tue Dec 08 2020 Brian Read 0.1-22.sme - Add expand zabbix-server.conf and .user.ini to creatlinks update event [SME:11232] * Tue Dec 08 2020 Brian Read 0.1-21.sme - Template-user-dot-ini-and-override-service-file-change-pid-in-conf-file [SME: 11232] * Mon Dec 07 2020 Brian Read 0.1-20.sme - Import to SME10 tree [SME: 11232] - Update createlinks for systemd - Update httpd.conf for php-fpw - Add .user.ini for php-admin-flags that where in httpd.conf * Sun May 10 2020 Jean-Philipe Pialasse 0.1-19.sme - adapt for zabbix 4.4.6 [SME: 10944] * Thu Sep 05 2019 Jean-Philipe Pialasse 0.1-17.sme - remove deprecated option preventing from starting service [SME: 10458] * Wed Mar 29 2017 Jean-Philipe Pialasse 0.1-16.sme - fix sql init not finding default sql dump to import [SME: 9569] - NodeID support droped as per zabbix 2.4.0 and higher - requires smeserver-php-scl as Zabbix-server 3.2.4 requires php 5.4 or higher * Mon Jun 13 2016 Jean-Philipe Pialasse 0.1-15.sme - finitial import [SME: 9569] - fix php requirement - fix add path to new db * Sun Feb 07 2016 stephane de Labrusse 0.1-14.sme Wed Feb 07 2016 --> Wed Feb 03 2016 or Sun Feb 07 2016 or Wed Feb 10 2016 or .... - New roll for sme9 * Mon Apr 29 2013 Daniel B. 0.1-13 - Increase PHP mem limit to 128M * Mon Mar 8 2010 Daniel B. 0.1-12 - Use global TimeZone * Wed Dec 2 2009 Daniel B. 0.1-11 - Support several mysql DB patches * Tue Mar 02 2009 Daniel B. 0.1-10 - Add smeserver-remoteuseraccess as a dependencie (sudoers template problem) * Mon Mar 02 2009 Daniel B. 0.1-9 - specify path to .sendxmpprc file in the script sendxmpp * Mon Mar 02 2009 Daniel B. 0.1-8 - move .sendxmpprc template to the correct directory * Mon Mar 02 2009 Daniel B. 0.1-7 - Move jabber account informations to xmpprc * Mon Mar 02 2009 Daniel B. 0.1-6 - Adjust service masq during zabbix-server-update event - Enable DB cache module with StartDBSyncers directive * Sun Mar 01 2009 Daniel B. 0.1-5 - Fix permissions on /var/lib/zabbix/tmp * Tue Feb 17 2009 Daniel B. 0.1-4 - rename event zabbix-update to zabbix-server-update * Wed Feb 11 2009 Daniel B. 0.1-3 - disable web access (usefull for distributed monitoring) - Use stronger password for mysql database - Use /var/lib/zabbix/bin as default location for scripts - Use /var/lib/zabbix/tmp for temp dir * Fri Feb 06 2009 Daniel B. 0.1-2 - Link template-begin-shell to template-begin for sendxmpp script * Fri Feb 06 2009 Daniel B. 0.1-1 - templatize sendxmpp as zabbix user doesn't have access to SME db - Add JabberTLS option in the db * Mon Feb 02 2009 Daniel B. 0.1-0 - initial release %prep %setup %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 %patch23 -p1 %build perl ./createlinks %{__mkdir_p} root/var/lib/zabbix/tmp #%{__mkdir_p} root/var/log/zabbix - conflict with zabbix-server-mysql %{__mkdir_p} root/var/log/php/zabbix %{__mkdir_p} root/var/lib/php/zabbix/{tmp,wsdlcache,opcache,session} %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ --file /var/lib/zabbix/bin/fping 'attr(0750,root,zabbix)' \ --file /var/lib/zabbix/bin/fping6 'attr(0750,root,zabbix)' \ --dir /var/lib/zabbix/tmp 'attr(0750,zabbix,zabbix)' \ --dir /var/log/php/zabbix 'attr(0770,www,www)' \ --dir /var/lib/php/zabbix 'attr(0755,root,www)' \ --dir /var/lib/php/zabbix/tmp 'attr(0770,root,www)' \ --dir /var/lib/php/zabbix/opcache 'attr(0770,root,www)' \ --dir /var/lib/php/zabbix/session 'attr(0770,root,www)' \ |grep -v '.pyc'|grep -v '.pyo' \ > %{name}-%{version}-filelist %files -f %{name}-%{version}-filelist %defattr(-,root,root) %clean rm -rf $RPM_BUILD_ROOT %post #/sbin/e-smith/expand-template /etc/e-smith/sql/init/80zabbix-server #/etc/rc.d/init.d/mysql.init start %postun #uninstall #if [ $1 = 0 ] ; then # /sbin/e-smith/db configuration setprop zabbix-server status disabled # /etc/init.d/zabbix-server stop # /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf # /usr/bin/sv h /service/httpd-e-smith #fi true