1 |
jpp |
1.15 |
# $Id: smeserver-zabbix-server.spec,v 1.14 2022/08/01 18:30:06 jpp Exp $ |
2 |
brianr |
1.1 |
# Authority: vip-ire |
3 |
|
|
# Name: Daniel Berteaud |
4 |
|
|
|
5 |
|
|
%define name smeserver-zabbix-server |
6 |
|
|
%define version 0.1 |
7 |
jpp |
1.12 |
%define release 30 |
8 |
brianr |
1.1 |
Summary: sme server integration of zabbix server and web front-end |
9 |
|
|
Name: %{name} |
10 |
|
|
Version: %{version} |
11 |
|
|
Release: %{release}%{?dist} |
12 |
|
|
License: GNU GPL version 2 |
13 |
|
|
URL: http://www.zabbix.com/ |
14 |
|
|
Group: SMEserver/addon |
15 |
|
|
Source: %{name}-%{version}.tar.gz |
16 |
|
|
|
17 |
|
|
Patch0: smeserver-zabbix-server-0.1-sendxmpp_template.patch |
18 |
|
|
Patch1: smeserver-zabbix-server-0.1-sendxmpp_shell_script_header.patch |
19 |
|
|
Patch2: smeserver-zabbix-server-0.1-disable_web_access.patch |
20 |
|
|
Patch3: smeserver-zabbix-server-0.1-mysql_db_pass.patch |
21 |
|
|
Patch4: smeserver-zabbix-server-0.1-script_and_tmp_location.patch |
22 |
|
|
Patch5: smeserver-zabbix-server-0.1-event_zabbix-server-update.patch |
23 |
|
|
Patch6: smeserver-zabbix-server-0.1-enable_db_cache.patch |
24 |
|
|
Patch7: smeserver-zabbix-server-0.1-adjust_masq.patch |
25 |
|
|
Patch8: smeserver-zabbix-server-0.1-sendxmpprc.patch |
26 |
|
|
Patch9: smeserver-zabbix-server-0.1-sendxmpprc_template_fix.patch |
27 |
|
|
Patch10: smeserver-zabbix-server-0.1-path2sendxmpprc.patch |
28 |
|
|
Patch11: smeserver-zabbix-server-0.1-multiple_dbpatches.patch |
29 |
|
|
Patch12: smeserver-zabbix-server-0.1-use_global_tz.patch |
30 |
|
|
Patch13: smeserver-zabbix-server-0.1-php_mem_limit.patch |
31 |
|
|
Patch14: smeserver-zabbix-server-0.1-sme9db.patch |
32 |
|
|
Patch15: smeserver-zabbix-server-0.1-sme9zabb3.2.4.patch |
33 |
|
|
Patch16: smeserver-zabbix-server-0.1-SME10458-SenderFrequency.deprecated.patch |
34 |
|
|
Patch17: smeserver-zabbix-server-0.1-zabbix4.4.6.patch |
35 |
brianr |
1.2 |
Patch18: smeserver-zabbix-server-0.1-Update-httpd-createlinks-and-adduser.ini.patch |
36 |
brianr |
1.3 |
Patch19: smeserver-zabbix-server-0.1-Template-user-dot-ini-and-override-service-file-change-pid-in-conf-file.patch |
37 |
brianr |
1.4 |
Patch20: smeserver-zabbix-server-0.1-Add-in-zabbix-conf-expansion-to-createlinks.patch |
38 |
brianr |
1.7 |
Patch21: smeserver-zabbix-server-0.1-Switch-to-specific-php-fpm.patch |
39 |
jpp |
1.8 |
Patch22: smeserver-zabbix-server-0.1-bz11232-installSME10.patch |
40 |
jpp |
1.10 |
Patch23: smeserver-zabbix-server-0.1-bz10802-checkcert-telegram.patch |
41 |
jpp |
1.11 |
Patch24: smeserver-zabbix-server-0.1-bz11749-adminpass.patch |
42 |
jpp |
1.12 |
Patch25: smeserver-zabbix-server-0.1-bz12068-httpd24.patch |
43 |
jpp |
1.13 |
Patch26: smeserver-zabbix-server-0.1-bz12031-backup.patch |
44 |
brianr |
1.1 |
|
45 |
|
|
BuildArchitectures: noarch |
46 |
|
|
BuildRequires: e-smith-devtools |
47 |
|
|
BuildRoot: /var/tmp/%{name}-%{version} |
48 |
jpp |
1.14 |
Requires: e-smith-release >= 10.0 |
49 |
|
|
Requires: e-smith-apache >= 2.6.0-19 |
50 |
|
|
Requires: smeserver-php >= 3.0.0-43 |
51 |
brianr |
1.1 |
Requires: fping |
52 |
|
|
Requires: zabbix-server-mysql >= 4.4.6 |
53 |
|
|
Requires: zabbix-web-mysql >= 4.4.6 |
54 |
|
|
Requires: zabbix-web >= 4.4.6 |
55 |
|
|
Requires: sendxmpp |
56 |
|
|
Requires: smeserver-remoteuseraccess |
57 |
jpp |
1.10 |
# for telegram bot |
58 |
|
|
Requires: python2-pysocks python-requests python2-requests-oauthlib |
59 |
jpp |
1.14 |
Obsoletes: zabbix-server |
60 |
|
|
Conflicts: smeserver-zabbix-proxy |
61 |
|
|
AutoReqProv: no |
62 |
|
|
|
63 |
jpp |
1.10 |
#for zabbix=>50 |
64 |
|
|
#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 |
65 |
jpp |
1.15 |
#Provides: zabbix-web-database-scl-php73 = %{version}-%{release} |
66 |
|
|
#Provides: zabbix-web-deps-scl = %{version}-%{release} |
67 |
|
|
#Provides: zabbix-web-deps-scl-php73 = %{version}-%{release} |
68 |
|
|
#Requires: zabbix-web = %{version}-%{release} |
69 |
|
|
#Requires: php73-php-mysqlnd php73 php73-php-gd php73-php-bcmath php73-php-mbstring php73-php-xml php73-php-ldap php73-php-fpm php73-php-mysqlnd |
70 |
|
|
|
71 |
brianr |
1.1 |
|
72 |
|
|
%description |
73 |
|
|
smserver integration of zabbix server and web front-end. |
74 |
jpp |
1.10 |
Zabbix is an entreprise-class open source distributed monitoring |
75 |
brianr |
1.1 |
solution |
76 |
|
|
|
77 |
|
|
%changelog |
78 |
jpp |
1.12 |
* Mon Aug 01 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-30.sme |
79 |
|
|
- update to httpd 2.4 access syntax [SME: 12068] |
80 |
|
|
thanks to Vasarhelyi Zsolt |
81 |
jpp |
1.13 |
- add to core backup [SME: 12031] |
82 |
|
|
non rpm owned files in /etc/zabbix, /etc/zabbix/zabbix_agentd.conf.d/ |
83 |
|
|
and /var/lib/zabbix/bin/ |
84 |
jpp |
1.12 |
|
85 |
jpp |
1.11 |
* Tue Nov 09 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-29.sme |
86 |
|
|
- set random password to Admin i fuser exists and password is zabbix [SME: 11749] |
87 |
|
|
|
88 |
jpp |
1.10 |
* Mon Nov 08 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-28.sme |
89 |
|
|
- add check cert scripts and telegram [SME: 10802] |
90 |
|
|
no template provided to use with |
91 |
|
|
|
92 |
jpp |
1.9 |
* Sun Nov 07 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-27.sme |
93 |
|
|
- fix init sql, typo and reload deamon [SME: 11232] |
94 |
|
|
|
95 |
jpp |
1.8 |
* Sun Nov 07 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-26.sme |
96 |
|
|
- fix session and log issue [SME: 11232] |
97 |
|
|
fix mysql-init not launched |
98 |
|
|
|
99 |
brianr |
1.7 |
* Mon Nov 01 2021 BogusDateBot |
100 |
|
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
101 |
|
|
by assuming the date is correct and changing the weekday. |
102 |
|
|
Tue Mar 02 2009 --> Tue Feb 24 2009 or Mon Mar 02 2009 or Tue Mar 03 2009 or .... |
103 |
|
|
Wed Feb 07 2016 --> Wed Feb 03 2016 or Sun Feb 07 2016 or Wed Feb 10 2016 or .... |
104 |
|
|
|
105 |
|
|
* Mon Nov 01 2021 Brian Read <brianr@bjsystems.co.uk> 0.1-25.sme |
106 |
|
|
- Switch-to-specific-php-fpm [SME: 11232] |
107 |
|
|
|
108 |
brianr |
1.6 |
* Mon Nov 01 2021 Brian Read <brianr@bjsystems.co.uk> 0.1-24.sme |
109 |
|
|
- Remove post and postun command in spec file [SME: 11232] |
110 |
|
|
|
111 |
brianr |
1.5 |
* Thu Dec 10 2020 Brian Read <brianr@bjsystems.co.uk> 0.1-23.sme |
112 |
|
|
- Add in post instructions to spec for SQL db creation [SME: 11232] |
113 |
|
|
|
114 |
brianr |
1.4 |
* Tue Dec 08 2020 Brian Read <brianr@bjsystems.co.uk> 0.1-22.sme |
115 |
|
|
- Add expand zabbix-server.conf and .user.ini to creatlinks update event [SME:11232] |
116 |
|
|
|
117 |
brianr |
1.3 |
* Tue Dec 08 2020 Brian Read <brianr@bjsystems.co.uk> 0.1-21.sme |
118 |
|
|
- Template-user-dot-ini-and-override-service-file-change-pid-in-conf-file [SME: 11232] |
119 |
|
|
|
120 |
brianr |
1.2 |
* Mon Dec 07 2020 Brian Read <brianr@bjsystems.co.uk> 0.1-20.sme |
121 |
|
|
- Import to SME10 tree [SME: 11232] |
122 |
|
|
- Update createlinks for systemd |
123 |
|
|
- Update httpd.conf for php-fpw |
124 |
|
|
- Add .user.ini for php-admin-flags that where in httpd.conf |
125 |
|
|
|
126 |
brianr |
1.1 |
* Sun May 10 2020 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-19.sme |
127 |
|
|
- adapt for zabbix 4.4.6 [SME: 10944] |
128 |
|
|
|
129 |
|
|
* Thu Sep 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-17.sme |
130 |
|
|
- remove deprecated option preventing from starting service [SME: 10458] |
131 |
|
|
|
132 |
|
|
* Wed Mar 29 2017 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-16.sme |
133 |
|
|
- fix sql init not finding default sql dump to import [SME: 9569] |
134 |
|
|
- NodeID support droped as per zabbix 2.4.0 and higher |
135 |
|
|
- requires smeserver-php-scl as Zabbix-server 3.2.4 requires php 5.4 or higher |
136 |
|
|
|
137 |
|
|
* Mon Jun 13 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1-15.sme |
138 |
|
|
- finitial import [SME: 9569] |
139 |
|
|
- fix php requirement |
140 |
|
|
- fix add path to new db |
141 |
|
|
|
142 |
brianr |
1.7 |
* Sun Feb 07 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 0.1-14.sme |
143 |
|
|
Wed Feb 07 2016 --> Wed Feb 03 2016 or Sun Feb 07 2016 or Wed Feb 10 2016 or .... |
144 |
brianr |
1.1 |
- New roll for sme9 |
145 |
|
|
|
146 |
|
|
* Mon Apr 29 2013 Daniel B. <daniel@firewall-services.com> 0.1-13 |
147 |
|
|
- Increase PHP mem limit to 128M |
148 |
|
|
|
149 |
|
|
* Mon Mar 8 2010 Daniel B. <daniel@firewall-services.com> 0.1-12 |
150 |
|
|
- Use global TimeZone |
151 |
|
|
|
152 |
|
|
* Wed Dec 2 2009 Daniel B. <daniel@firewall-services.com> 0.1-11 |
153 |
|
|
- Support several mysql DB patches |
154 |
|
|
|
155 |
|
|
* Tue Mar 02 2009 Daniel B. <daniel@firewall-services.com> 0.1-10 |
156 |
|
|
- Add smeserver-remoteuseraccess as a dependencie (sudoers template problem) |
157 |
|
|
|
158 |
|
|
* Mon Mar 02 2009 Daniel B. <daniel@firewall-services.com> 0.1-9 |
159 |
|
|
- specify path to .sendxmpprc file in the script sendxmpp |
160 |
|
|
|
161 |
|
|
* Mon Mar 02 2009 Daniel B. <daniel@firewall-services.com> 0.1-8 |
162 |
|
|
- move .sendxmpprc template to the correct directory |
163 |
|
|
|
164 |
|
|
* Mon Mar 02 2009 Daniel B. <daniel@firewall-services.com> 0.1-7 |
165 |
|
|
- Move jabber account informations to xmpprc |
166 |
|
|
|
167 |
|
|
* Mon Mar 02 2009 Daniel B. <daniel@firewall-services.com> 0.1-6 |
168 |
|
|
- Adjust service masq during zabbix-server-update event |
169 |
|
|
- Enable DB cache module with StartDBSyncers directive |
170 |
|
|
|
171 |
|
|
* Sun Mar 01 2009 Daniel B. <daniel@firewall-services.com> 0.1-5 |
172 |
|
|
- Fix permissions on /var/lib/zabbix/tmp |
173 |
|
|
|
174 |
|
|
* Tue Feb 17 2009 Daniel B. <daniel@firewall-services.com> 0.1-4 |
175 |
|
|
- rename event zabbix-update to zabbix-server-update |
176 |
|
|
|
177 |
|
|
* Wed Feb 11 2009 Daniel B. <daniel@firewall-services.com> 0.1-3 |
178 |
|
|
- disable web access (usefull for distributed monitoring) |
179 |
|
|
- Use stronger password for mysql database |
180 |
|
|
- Use /var/lib/zabbix/bin as default location for scripts |
181 |
|
|
- Use /var/lib/zabbix/tmp for temp dir |
182 |
|
|
|
183 |
|
|
* Fri Feb 06 2009 Daniel B. <daniel@firewall-services.com> 0.1-2 |
184 |
|
|
- Link template-begin-shell to template-begin for sendxmpp script |
185 |
|
|
|
186 |
|
|
* Fri Feb 06 2009 Daniel B. <daniel@firewall-services.com> 0.1-1 |
187 |
|
|
- templatize sendxmpp as zabbix user doesn't have access to SME db |
188 |
|
|
- Add JabberTLS option in the db |
189 |
|
|
|
190 |
|
|
* Mon Feb 02 2009 Daniel B. <daniel@firewall-services.com> 0.1-0 |
191 |
|
|
- initial release |
192 |
|
|
|
193 |
|
|
%prep |
194 |
|
|
%setup |
195 |
|
|
%patch0 -p1 |
196 |
|
|
%patch1 -p1 |
197 |
|
|
%patch2 -p1 |
198 |
|
|
%patch3 -p1 |
199 |
|
|
%patch4 -p1 |
200 |
|
|
%patch5 -p1 |
201 |
|
|
%patch6 -p1 |
202 |
|
|
%patch7 -p1 |
203 |
|
|
%patch8 -p1 |
204 |
|
|
%patch9 -p1 |
205 |
|
|
%patch10 -p1 |
206 |
|
|
%patch11 -p1 |
207 |
|
|
%patch12 -p1 |
208 |
|
|
%patch13 -p1 |
209 |
|
|
%patch14 -p1 |
210 |
|
|
%patch15 -p1 |
211 |
|
|
%patch16 -p1 |
212 |
|
|
%patch17 -p1 |
213 |
brianr |
1.2 |
%patch18 -p1 |
214 |
brianr |
1.3 |
%patch19 -p1 |
215 |
brianr |
1.4 |
%patch20 -p1 |
216 |
brianr |
1.7 |
%patch21 -p1 |
217 |
jpp |
1.8 |
%patch22 -p1 |
218 |
jpp |
1.10 |
%patch23 -p1 |
219 |
jpp |
1.11 |
%patch24 -p1 |
220 |
jpp |
1.12 |
%patch25 -p1 |
221 |
jpp |
1.13 |
%patch26 -p1 |
222 |
brianr |
1.1 |
|
223 |
|
|
%build |
224 |
|
|
perl ./createlinks |
225 |
|
|
%{__mkdir_p} root/var/lib/zabbix/tmp |
226 |
brianr |
1.7 |
#%{__mkdir_p} root/var/log/zabbix - conflict with zabbix-server-mysql |
227 |
|
|
%{__mkdir_p} root/var/log/php/zabbix |
228 |
|
|
%{__mkdir_p} root/var/lib/php/zabbix/{tmp,wsdlcache,opcache,session} |
229 |
|
|
|
230 |
brianr |
1.1 |
|
231 |
|
|
%install |
232 |
|
|
rm -rf $RPM_BUILD_ROOT |
233 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
234 |
|
|
rm -f %{name}-%{version}-filelist |
235 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
236 |
|
|
--file /var/lib/zabbix/bin/fping 'attr(0750,root,zabbix)' \ |
237 |
|
|
--file /var/lib/zabbix/bin/fping6 'attr(0750,root,zabbix)' \ |
238 |
jpp |
1.8 |
--dir /var/lib/zabbix/tmp 'attr(0750,zabbix,zabbix)' \ |
239 |
|
|
--dir /var/log/php/zabbix 'attr(0770,www,www)' \ |
240 |
|
|
--dir /var/lib/php/zabbix 'attr(0755,root,www)' \ |
241 |
|
|
--dir /var/lib/php/zabbix/tmp 'attr(0770,root,www)' \ |
242 |
|
|
--dir /var/lib/php/zabbix/opcache 'attr(0770,root,www)' \ |
243 |
|
|
--dir /var/lib/php/zabbix/session 'attr(0770,root,www)' \ |
244 |
jpp |
1.10 |
|grep -v '.pyc'|grep -v '.pyo' \ |
245 |
brianr |
1.1 |
> %{name}-%{version}-filelist |
246 |
|
|
|
247 |
|
|
%files -f %{name}-%{version}-filelist |
248 |
|
|
%defattr(-,root,root) |
249 |
|
|
|
250 |
|
|
%clean |
251 |
|
|
rm -rf $RPM_BUILD_ROOT |
252 |
|
|
|
253 |
brianr |
1.5 |
%post |
254 |
brianr |
1.6 |
#/sbin/e-smith/expand-template /etc/e-smith/sql/init/80zabbix-server |
255 |
|
|
#/etc/rc.d/init.d/mysql.init start |
256 |
brianr |
1.1 |
|
257 |
|
|
%postun |
258 |
|
|
#uninstall |
259 |
brianr |
1.6 |
#if [ $1 = 0 ] ; then |
260 |
|
|
# /sbin/e-smith/db configuration setprop zabbix-server status disabled |
261 |
|
|
# /etc/init.d/zabbix-server stop |
262 |
|
|
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
263 |
|
|
# /usr/bin/sv h /service/httpd-e-smith |
264 |
|
|
#fi |
265 |
brianr |
1.1 |
|
266 |
|
|
true |