1 | %bcond_with systemd |
---|
2 | |
---|
3 | %define only_agent 0 |
---|
4 | |
---|
5 | %if %{only_agent} |
---|
6 | %bcond_with server |
---|
7 | %bcond_with proxy |
---|
8 | %bcond_with frontend |
---|
9 | %else |
---|
10 | %bcond_without server |
---|
11 | %bcond_without proxy |
---|
12 | %bcond_without frontend |
---|
13 | %endif |
---|
14 | |
---|
15 | %bcond_without agent |
---|
16 | |
---|
17 | Summary: The Enterprise-class Monitoring Solution for Everyone |
---|
18 | Name: zabbix |
---|
19 | Version: 4.0.19 |
---|
20 | Release: 2%{?_dist_release}%{?with_systemd:.systemd} |
---|
21 | Group: Applications/Services |
---|
22 | Vendor: Project Vine |
---|
23 | Distribution: Vine Linux |
---|
24 | Packager: iwaim |
---|
25 | |
---|
26 | License: GPLv2 |
---|
27 | URL: https://www.zabbix.com/ |
---|
28 | Source0: https://cdn.zabbix.com/stable/%{version}/%{name}-%{version}.tar.gz |
---|
29 | Source1: zabbix_server.init |
---|
30 | Source2: zabbix_proxy.init |
---|
31 | Source3: zabbix_agentd.init |
---|
32 | Source4: zabbix_server.logrotate |
---|
33 | Source5: zabbix_proxy.logrotate |
---|
34 | Source6: zabbix_agentd.logrotate |
---|
35 | |
---|
36 | Source9: %{name}-tmpfiles-zabbix.conf |
---|
37 | # systemd units -- Alternatives switches between them (they state their dependencies) |
---|
38 | # https://support.zabbix.com/browse/ZBXNEXT-1593 |
---|
39 | Source10: %{name}-agent.service |
---|
40 | Source11: %{name}-proxy-mysql.service |
---|
41 | Source12: %{name}-proxy-pgsql.service |
---|
42 | Source14: %{name}-server-mysql.service |
---|
43 | Source15: %{name}-server-pgsql.service |
---|
44 | Source17: %{name}-tmpfiles-zabbixsrv.conf |
---|
45 | |
---|
46 | Patch1: 0001-change-the-font-for-Vine-Linux.patch |
---|
47 | Patch2: 0002-modified-config-files-for-Vine-Linux.patch |
---|
48 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
---|
49 | %if %{with server}%{with proxy} |
---|
50 | BuildRequires: libpq-devel |
---|
51 | BuildRequires: libmariadb-devel |
---|
52 | %endif |
---|
53 | BuildRequires: libevent-devel |
---|
54 | BuildRequires: pcre-devel |
---|
55 | BuildRequires: curl-devel |
---|
56 | BuildRequires: net-snmp-devel |
---|
57 | BuildRequires: OpenIPMI-devel |
---|
58 | BuildRequires: unixODBC-devel |
---|
59 | BuildRequires: libssh2-devel |
---|
60 | Requires(pre): glibc-common |
---|
61 | Requires(pre): shadow-utils |
---|
62 | %if %{with systemd} |
---|
63 | BuildRequires: systemd |
---|
64 | %endif |
---|
65 | |
---|
66 | %description |
---|
67 | The Enterprise-class Monitoring Solution for Everyone. |
---|
68 | |
---|
69 | %if %{with server} |
---|
70 | %package server-common |
---|
71 | Summary: common files for Zabbix Server |
---|
72 | Requires: %{name} == %{version}-%{release} |
---|
73 | %if %{with systemd} |
---|
74 | %{?systemd_requires} |
---|
75 | %else |
---|
76 | Requires(post,preun): chkconfig |
---|
77 | Requires(preun,postun): initscripts |
---|
78 | %endif |
---|
79 | |
---|
80 | %description server-common |
---|
81 | This package include common files for Zabbix Server. |
---|
82 | |
---|
83 | %package server-mysql |
---|
84 | Summary: Zabbix Server for MySQL/MariaDB |
---|
85 | Provides: %{name}-server |
---|
86 | Requires: %{name}-server-common == %{version}-%{release} |
---|
87 | |
---|
88 | %description server-mysql |
---|
89 | Zabbix Server for MySQL/MariaDB |
---|
90 | |
---|
91 | %package server-postgresql |
---|
92 | Summary: Zabbix Server for PostgreSQL |
---|
93 | Provides: %{name}-server |
---|
94 | Requires: %{name}-server-common == %{version}-%{release} |
---|
95 | |
---|
96 | %description server-postgresql |
---|
97 | Zabbix Server for PostgreSQL |
---|
98 | |
---|
99 | %endif |
---|
100 | |
---|
101 | %if %{with agent} |
---|
102 | %package agent |
---|
103 | Summary: Zabbix Agent |
---|
104 | Requires: %{name} == %{version}-%{release} |
---|
105 | %if %{with systemd} |
---|
106 | %{?systemd_requires} |
---|
107 | %else |
---|
108 | Requires(post,preun): chkconfig |
---|
109 | Requires(preun,postun): initscripts |
---|
110 | %endif |
---|
111 | |
---|
112 | %description agent |
---|
113 | Zabbix Agent |
---|
114 | |
---|
115 | %endif |
---|
116 | |
---|
117 | %if %{with proxy} |
---|
118 | %package proxy-common |
---|
119 | Summary: common files for Zabbix Proxy |
---|
120 | Requires: %{name} == %{version}-%{release} |
---|
121 | %if %{with systemd} |
---|
122 | %{?systemd_requires} |
---|
123 | %else |
---|
124 | Requires(post,preun): chkconfig |
---|
125 | Requires(preun,postun): initscripts |
---|
126 | %endif |
---|
127 | |
---|
128 | %description proxy-common |
---|
129 | This package include common files for Zabbix Proxy |
---|
130 | |
---|
131 | %package proxy-mysql |
---|
132 | Summary: Zabbix Proxy for MySQL/MariaDB |
---|
133 | Provides: %{name}-proxy |
---|
134 | Requires: %{name}-proxy-common == %{version}-%{release} |
---|
135 | |
---|
136 | %description proxy-mysql |
---|
137 | Zabbix Proxy for MySQL/MariaDB |
---|
138 | |
---|
139 | %package proxy-postgresql |
---|
140 | Summary: Zabbix Proxy for PostgreSQL |
---|
141 | Provides: %{name}-proxy |
---|
142 | Requires: %{name}-proxy-common == %{version}-%{release} |
---|
143 | |
---|
144 | %description proxy-postgresql |
---|
145 | Zabbix Proxy for PostgreSQL |
---|
146 | |
---|
147 | %endif |
---|
148 | |
---|
149 | %if %{with frontend} |
---|
150 | %package frontend-php |
---|
151 | Summary: Zabbix web frontend with PHP |
---|
152 | Group: Applications/Internet |
---|
153 | Requires: php74 |
---|
154 | Requires: TrueType-vlgothic |
---|
155 | |
---|
156 | %description frontend-php |
---|
157 | Zabbix web frontend with PHP. |
---|
158 | |
---|
159 | %package frontend-php-mysql |
---|
160 | Summary: Zabbix web frontend with PHP and MySQL/MariaDB |
---|
161 | Group: Applications/Internet |
---|
162 | Provides: %{name}-frontend-php == %{version}-%{release} |
---|
163 | Requires: php74-mysql |
---|
164 | |
---|
165 | %description frontend-php-mysql |
---|
166 | Zabbix web frontend with PHP and MySQL/MariaDB. |
---|
167 | |
---|
168 | %package frontend-php-postgresql |
---|
169 | Summary: Zabbix web frontend with PHP and PostgreSQL |
---|
170 | Group: Applications/Internet |
---|
171 | Provides: %{name}-frontend-php == %{version}-%{release} |
---|
172 | Requires: php74-pgsql |
---|
173 | |
---|
174 | %description frontend-php-postgresql |
---|
175 | Zabbix web frontend with PHP and PostgreSQL. |
---|
176 | |
---|
177 | %endif |
---|
178 | |
---|
179 | %prep |
---|
180 | %setup -q -T -a 0 -c -n zabbix-%{version} |
---|
181 | mv zabbix-%{version} zabbix_mysql |
---|
182 | pushd zabbix_mysql |
---|
183 | %patch1 -p 1 |
---|
184 | %patch2 -p 1 |
---|
185 | popd |
---|
186 | |
---|
187 | %if %{with server}%{with proxy} |
---|
188 | %setup -q -D -T -a 0 -n zabbix-%{version} |
---|
189 | mv zabbix-%{version} zabbix_pgsql |
---|
190 | pushd zabbix_pgsql |
---|
191 | %patch1 -p 1 |
---|
192 | %patch2 -p 1 |
---|
193 | popd |
---|
194 | %endif |
---|
195 | |
---|
196 | %if %{with systemd} |
---|
197 | # Specific |
---|
198 | for v in mysql pgsql; do |
---|
199 | pushd zabbix_$v |
---|
200 | sed -i \ |
---|
201 | -e '\|^# PidFile=.*|a PidFile=/run/zabbix/zabbix_agentd.pid' \ |
---|
202 | -e 's|^LogFile=.*|LogFile=%{_localstatedir}/log/zabbix/zabbix_agentd.log|' \ |
---|
203 | conf/zabbix_agentd.conf |
---|
204 | |
---|
205 | sed -i \ |
---|
206 | -e '\|^# PidFile=.*|a PidFile=/run/zabbix/zabbix_proxy.pid' \ |
---|
207 | -e 's|^LogFile=.*|LogFile=%{_localstatedir}/log/zabbix/zabbix_proxy.log|' \ |
---|
208 | conf/zabbix_proxy.conf |
---|
209 | |
---|
210 | sed -i \ |
---|
211 | -e '\|^# PidFile=.*|a PidFile=/run/zabbix/zabbix_server.pid' \ |
---|
212 | -e 's|^LogFile=.*|LogFile=%{_localstatedir}/log/zabbix/zabbix_server.log|' \ |
---|
213 | conf/zabbix_server.conf |
---|
214 | popd |
---|
215 | done |
---|
216 | |
---|
217 | %endif |
---|
218 | |
---|
219 | %build |
---|
220 | |
---|
221 | Build() |
---|
222 | { |
---|
223 | perl -pi -e 's|/usr/bin/traceroute|/bin/traceroute|' \ |
---|
224 | ./database/{ibm_db2,mysql,oracle,postgresql,sqlite3}/data.sql |
---|
225 | |
---|
226 | %configure \ |
---|
227 | %{?with_server:--enable-server} \ |
---|
228 | %{?with_proxy:--enable-proxy} \ |
---|
229 | %{?with_agent:--enable-agent} \ |
---|
230 | --enable-ipv6 \ |
---|
231 | --sysconfdir=%{_sysconfdir}/zabbix \ |
---|
232 | --with-libcurl \ |
---|
233 | --with-openipmi \ |
---|
234 | --with-net-snmp \ |
---|
235 | --with-unixodbc \ |
---|
236 | --with-ssh2 \ |
---|
237 | $@ |
---|
238 | |
---|
239 | %__make |
---|
240 | } |
---|
241 | |
---|
242 | %if %{with server}%{with proxy} |
---|
243 | pushd zabbix_mysql |
---|
244 | Build --with-mysql |
---|
245 | popd |
---|
246 | |
---|
247 | pushd zabbix_pgsql |
---|
248 | Build --with-postgresql |
---|
249 | popd |
---|
250 | %else |
---|
251 | pushd zabbix_mysql |
---|
252 | Build |
---|
253 | popd |
---|
254 | %endif |
---|
255 | |
---|
256 | %install |
---|
257 | %__rm -rf %{buildroot} |
---|
258 | pushd zabbix_mysql |
---|
259 | make DESTDIR=%{buildroot} install |
---|
260 | |
---|
261 | %if %{with server} |
---|
262 | mv -f %{buildroot}%{_sbindir}/zabbix_server %{buildroot}%{_sbindir}/zabbix_server.mysql |
---|
263 | %endif |
---|
264 | %if %{with proxy} |
---|
265 | mv -f %{buildroot}%{_sbindir}/zabbix_proxy %{buildroot}%{_sbindir}/zabbix_proxy.mysql |
---|
266 | %endif |
---|
267 | |
---|
268 | # make directories |
---|
269 | %__mkdir_p %{buildroot}%{_localstatedir}/{log,run}/%{name} |
---|
270 | |
---|
271 | # DB |
---|
272 | %__mkdir_p %{buildroot}%{_datadir}/zabbix |
---|
273 | %if %{with server}%{with proxy} |
---|
274 | %__cp -a database/postgresql %{buildroot}%{_datadir}/zabbix/ |
---|
275 | %__cp -a database/mysql %{buildroot}%{_datadir}/zabbix/ |
---|
276 | %endif |
---|
277 | |
---|
278 | %if %{with systemd} |
---|
279 | # unit files |
---|
280 | %__mkdir_p %{buildroot}%{_unitdir} |
---|
281 | # Install different systemd units because of the requirements for DBMS daemons |
---|
282 | install -m 0644 -p %{SOURCE10} %{buildroot}%{_unitdir}/zabbix-agent.service |
---|
283 | install -m 0644 -p %{SOURCE11} %{buildroot}%{_unitdir}/zabbix-proxy-mysql.service |
---|
284 | install -m 0644 -p %{SOURCE12} %{buildroot}%{_unitdir}/zabbix-proxy-pgsql.service |
---|
285 | install -m 0644 -p %{SOURCE14} %{buildroot}%{_unitdir}/zabbix-server-mysql.service |
---|
286 | install -m 0644 -p %{SOURCE15} %{buildroot}%{_unitdir}/zabbix-server-pgsql.service |
---|
287 | |
---|
288 | # systemd tmpfiles |
---|
289 | mkdir -p %{buildroot}%{_prefix}/lib/tmpfiles.d |
---|
290 | install -m 0644 -p %{SOURCE9} %{buildroot}%{_prefix}/lib/tmpfiles.d/zabbix.conf |
---|
291 | |
---|
292 | %else |
---|
293 | # init.d |
---|
294 | %__mkdir_p %{buildroot}%{_initddir} |
---|
295 | %if %{with server} |
---|
296 | %__cp %{SOURCE1} %{buildroot}%{_initddir}/zabbix_server |
---|
297 | %endif |
---|
298 | %if %{with proxy} |
---|
299 | %__cp %{SOURCE2} %{buildroot}%{_initddir}/zabbix_proxy |
---|
300 | %endif |
---|
301 | %if %{with agent} |
---|
302 | %__cp %{SOURCE3} %{buildroot}%{_initddir}/zabbix_agentd |
---|
303 | %endif |
---|
304 | %endif |
---|
305 | |
---|
306 | # logrotate |
---|
307 | %__mkdir_p %{buildroot}%{_sysconfdir}/logrotate.d |
---|
308 | %if %{with server} |
---|
309 | %__cp %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/zabbix_server |
---|
310 | %endif |
---|
311 | %if %{with proxy} |
---|
312 | %__cp %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/zabbix_proxy |
---|
313 | %endif |
---|
314 | %if %{with agent} |
---|
315 | %__cp %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/zabbix_agentd |
---|
316 | %endif |
---|
317 | |
---|
318 | %if %{with frontend} |
---|
319 | # frontend-php |
---|
320 | %__mkdir_p %{buildroot}%{_datadir}/zabbix-frontend |
---|
321 | %__cp -a frontends/php %{buildroot}%{_datadir}/zabbix-frontend/ |
---|
322 | %__rm -f %{buildroot}%{_datadir}/zabbix-frontend/php/assets/fonts/DejaVuSans.ttf |
---|
323 | |
---|
324 | ln -s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf \ |
---|
325 | %{buildroot}%{_datadir}/zabbix-frontend/php/assets/fonts/ |
---|
326 | %endif |
---|
327 | |
---|
328 | %if %{with proxy} |
---|
329 | # proxy |
---|
330 | mkdir -p %{buildroot}%{_datadir}/zabbix-proxy |
---|
331 | ln -sf ../zabbix/mysql %{buildroot}%{_datadir}/zabbix-proxy/ |
---|
332 | ln -sf ../zabbix/postgresql %{buildroot}%{_datadir}/zabbix-proxy/ |
---|
333 | %endif |
---|
334 | |
---|
335 | popd |
---|
336 | |
---|
337 | %if %{with server}%{with proxy} |
---|
338 | pushd zabbix_pgsql |
---|
339 | install -m755 src/zabbix_server/zabbix_server %{buildroot}%{_sbindir}/zabbix_server.pgsql |
---|
340 | install -m755 src/zabbix_proxy/zabbix_proxy %{buildroot}%{_sbindir}/zabbix_proxy.pgsql |
---|
341 | popd |
---|
342 | %endif |
---|
343 | |
---|
344 | %clean |
---|
345 | %__rm -rf %{buildroot} |
---|
346 | |
---|
347 | %pre |
---|
348 | getent group zabbix >/dev/null || groupadd -r zabbix |
---|
349 | getent passwd zabbix >/dev/null || \ |
---|
350 | useradd -r -g zabbix -d %{_sysconfdir}/zabbix -s /sbin/nologin \ |
---|
351 | -c "Zabbix Monitoring Solution" zabbix |
---|
352 | exit 0 |
---|
353 | |
---|
354 | %if %{with server} |
---|
355 | %post server-mysql |
---|
356 | %if %{with systemd} |
---|
357 | %systemd_post zabbix-server-mysql.service |
---|
358 | %else |
---|
359 | /sbin/update-alternatives --install /usr/sbin/zabbix_server \ |
---|
360 | zabbix_server /usr/sbin/zabbix_server.mysql 10 |
---|
361 | %endif |
---|
362 | |
---|
363 | %post server-postgresql |
---|
364 | %if %{with systemd} |
---|
365 | %systemd_post zabbix-server-pgsql.service |
---|
366 | %else |
---|
367 | /sbin/update-alternatives --install /usr/sbin/zabbix_server \ |
---|
368 | zabbix_server /usr/sbin/zabbix_server.pgsql 10 |
---|
369 | /sbin/chkconfig --add zabbix_server |
---|
370 | %endif |
---|
371 | %endif |
---|
372 | |
---|
373 | %if %{with proxy} |
---|
374 | %post proxy-mysql |
---|
375 | %if %{with systemd} |
---|
376 | %systemd_post zabbix-proxy-mysql.service |
---|
377 | %else |
---|
378 | /sbin/update-alternatives --install /usr/sbin/zabbix_proxy \ |
---|
379 | zabbix_proxy /usr/sbin/zabbix_proxy.mysql 10 |
---|
380 | /sbin/chkconfig --add zabbix_proxy |
---|
381 | %endif |
---|
382 | |
---|
383 | %post proxy-postgresql |
---|
384 | %if %{with systemd} |
---|
385 | %systemd_post zabbix-proxy-pgsql.service |
---|
386 | %else |
---|
387 | /sbin/update-alternatives --install /usr/sbin/zabbix_proxy \ |
---|
388 | zabbix_proxy /usr/sbin/zabbix_proxy.pgsql 10 |
---|
389 | /sbin/chkconfig --add zabbix_proxy |
---|
390 | %endif |
---|
391 | %endif |
---|
392 | |
---|
393 | %if %{with agent} |
---|
394 | %post agent |
---|
395 | %if %{with systemd} |
---|
396 | %systemd_post zabbix-agent.service |
---|
397 | %else |
---|
398 | /sbin/chkconfig --add zabbix_agentd |
---|
399 | %endif |
---|
400 | |
---|
401 | %endif |
---|
402 | |
---|
403 | %if %{with server} |
---|
404 | %preun server-mysql |
---|
405 | %if %{with systemd} |
---|
406 | %systemd_preun zabbix-server-mysql.service |
---|
407 | %else |
---|
408 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
409 | /sbin/service zabbix_server stop >/dev/null 2>&1 |
---|
410 | /sbin/chkconfig --del zabbix_server |
---|
411 | /sbin/update-alternatives --remove zabbix_server \ |
---|
412 | /usr/sbin/zabbix_server.mysql |
---|
413 | fi |
---|
414 | %endif |
---|
415 | |
---|
416 | %preun server-postgresql |
---|
417 | %if %{with systemd} |
---|
418 | %systemd_preun zabbix-server-pgysql.service |
---|
419 | %else |
---|
420 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
421 | /sbin/service zabbix_server stop >/dev/null 2>&1 |
---|
422 | /sbin/chkconfig --del zabbix_server |
---|
423 | /sbin/update-alternatives --remove zabbix_server \ |
---|
424 | /usr/sbin/zabbix_server.pgsql |
---|
425 | fi |
---|
426 | %endif |
---|
427 | %endif |
---|
428 | |
---|
429 | %if %{with proxy} |
---|
430 | %preun proxy-mysql |
---|
431 | %if %{with systemd} |
---|
432 | %systemd_preun zabbix-proxy-mysql.service |
---|
433 | %else |
---|
434 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
435 | /sbin/service zabbix_proxy stop >/dev/null 2>&1 |
---|
436 | /sbin/chkconfig --del zabbix_proxy |
---|
437 | /sbin/update-alternatives --remove zabbix_proxy \ |
---|
438 | /usr/sbin/zabbix_proxy.mysql |
---|
439 | fi |
---|
440 | %endif |
---|
441 | |
---|
442 | %preun proxy-postgresql |
---|
443 | %if %{with systemd} |
---|
444 | %systemd_preun zabbix-proxy-pgsql.service |
---|
445 | %else |
---|
446 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
447 | /sbin/service zabbix_proxy stop >/dev/null 2>&1 |
---|
448 | /sbin/chkconfig --del zabbix_proxy |
---|
449 | /sbin/update-alternatives --remove zabbix_proxy \ |
---|
450 | /usr/sbin/zabbix_proxy.pgsql |
---|
451 | fi |
---|
452 | %endif |
---|
453 | %endif |
---|
454 | |
---|
455 | %if %{with agent} |
---|
456 | %preun agent |
---|
457 | %systemd_preun zabbix-agent.service |
---|
458 | %if %{with systemd} |
---|
459 | %else |
---|
460 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
461 | /sbin/service zabbix_agentd stop >/dev/null 2>&1 |
---|
462 | /sbin/chkconfig --del zabbix_agentd |
---|
463 | fi |
---|
464 | %endif |
---|
465 | %endif |
---|
466 | |
---|
467 | %if %{with server} |
---|
468 | %postun server-mysql |
---|
469 | %if %{with systemd} |
---|
470 | %systemd_postun_with_restart zabbix-server-mysql.service |
---|
471 | %else |
---|
472 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
473 | /sbin/service zabbix_server condrestart >/dev/null 2>&1 || : |
---|
474 | fi |
---|
475 | %endif |
---|
476 | |
---|
477 | %postun server-postgresql |
---|
478 | %if %{with systemd} |
---|
479 | %systemd_postun_with_restart zabbix-server-pgsql.service |
---|
480 | %else |
---|
481 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
482 | /sbin/service zabbix_server condrestart >/dev/null 2>&1 || : |
---|
483 | fi |
---|
484 | %endif |
---|
485 | %endif |
---|
486 | |
---|
487 | %if %{with proxy} |
---|
488 | %postun proxy-mysql |
---|
489 | %if %{with systemd} |
---|
490 | %systemd_postun_with_restart zabbix-proxy-mysql.service |
---|
491 | %else |
---|
492 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
493 | /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || : |
---|
494 | fi |
---|
495 | %endif |
---|
496 | |
---|
497 | %postun proxy-postgresql |
---|
498 | %if %{with systemd} |
---|
499 | %systemd_postun_with_restart zabbix-proxy-pgsql.service |
---|
500 | %else |
---|
501 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
502 | /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || : |
---|
503 | fi |
---|
504 | %endif |
---|
505 | |
---|
506 | %postun agent |
---|
507 | %if %{with systemd} |
---|
508 | %systemd_postun_with_restart zabbix-agent.service |
---|
509 | %else |
---|
510 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
511 | /sbin/service zabbix_agentd condrestart >/dev/null 2>&1 || : |
---|
512 | fi |
---|
513 | %endif |
---|
514 | |
---|
515 | %endif |
---|
516 | |
---|
517 | %files |
---|
518 | %defattr(-,root,root,-) |
---|
519 | %license zabbix_mysql/COPYING |
---|
520 | %doc zabbix_mysql/AUTHORS zabbix_mysql/ChangeLog zabbix_mysql/NEWS zabbix_mysql/README |
---|
521 | %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/%{name} |
---|
522 | %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/%{name} |
---|
523 | %dir %{_datadir}/zabbix |
---|
524 | %if %{with server}%{with proxy} |
---|
525 | %{_datadir}/zabbix/mysql |
---|
526 | %{_datadir}/zabbix/postgresql |
---|
527 | %endif |
---|
528 | %if %{with systemd} |
---|
529 | %{_prefix}/lib/tmpfiles.d/zabbix.conf |
---|
530 | %endif |
---|
531 | |
---|
532 | %if %{with server} |
---|
533 | %files server-common |
---|
534 | %defattr(-,root,root,-) |
---|
535 | %dir %{_sysconfdir}/zabbix |
---|
536 | %config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf |
---|
537 | %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_server |
---|
538 | %if !%{with systemd} |
---|
539 | %{_initddir}/zabbix_server* |
---|
540 | %endif |
---|
541 | %{_mandir}/man8/zabbix_server.8* |
---|
542 | |
---|
543 | %files server-mysql |
---|
544 | %defattr(-,root,root,-) |
---|
545 | %{_sbindir}/zabbix_server.mysql |
---|
546 | %if %{with systemd} |
---|
547 | %{_unitdir}/zabbix-server-mysql.service |
---|
548 | %endif |
---|
549 | |
---|
550 | %files server-postgresql |
---|
551 | %defattr(-,root,root,-) |
---|
552 | %{_sbindir}/zabbix_server.pgsql |
---|
553 | %if %{with systemd} |
---|
554 | %{_unitdir}/zabbix-server-pgsql.service |
---|
555 | %endif |
---|
556 | |
---|
557 | %endif |
---|
558 | |
---|
559 | %if %{with agent} |
---|
560 | %files agent |
---|
561 | %defattr(-,root,root,-) |
---|
562 | %dir %{_sysconfdir}/zabbix |
---|
563 | %config(noreplace) %{_sysconfdir}/zabbix/zabbix_agentd.conf |
---|
564 | %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_agentd |
---|
565 | %{_bindir}/zabbix_get |
---|
566 | %{_bindir}/zabbix_sender |
---|
567 | %{_sbindir}/zabbix_agentd |
---|
568 | %if %{with systemd} |
---|
569 | %{_unitdir}/zabbix-agent.service |
---|
570 | %else |
---|
571 | %{_initddir}/zabbix_agentd |
---|
572 | %endif |
---|
573 | %{_mandir}/man1/zabbix_get.1* |
---|
574 | %{_mandir}/man1/zabbix_sender.1* |
---|
575 | %{_mandir}/man8/zabbix_agentd.8* |
---|
576 | |
---|
577 | %endif |
---|
578 | |
---|
579 | %if %{with proxy} |
---|
580 | %files proxy-common |
---|
581 | %defattr(-,root,root,-) |
---|
582 | %dir %{_sysconfdir}/zabbix |
---|
583 | %config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf |
---|
584 | %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_proxy |
---|
585 | %if !%{with systemd} |
---|
586 | %{_initddir}/zabbix_proxy |
---|
587 | %endif |
---|
588 | %{_mandir}/man8/zabbix_proxy.8* |
---|
589 | %{_datadir}/zabbix-proxy |
---|
590 | |
---|
591 | %files proxy-mysql |
---|
592 | %defattr(-,root,root,-) |
---|
593 | %{_sbindir}/zabbix_proxy.mysql |
---|
594 | %if %{with systemd} |
---|
595 | %{_unitdir}/zabbix-proxy-mysql.service |
---|
596 | %endif |
---|
597 | |
---|
598 | %files proxy-postgresql |
---|
599 | %defattr(-,root,root,-) |
---|
600 | %{_sbindir}/zabbix_proxy.pgsql |
---|
601 | %if %{with systemd} |
---|
602 | %{_unitdir}/zabbix-proxy-pgsql.service |
---|
603 | %endif |
---|
604 | |
---|
605 | %endif |
---|
606 | |
---|
607 | %if %{with frontend} |
---|
608 | %files frontend-php |
---|
609 | %defattr(-,root,root,-) |
---|
610 | %license zabbix_mysql/COPYING |
---|
611 | %doc zabbix_mysql/AUTHORS zabbix_mysql/ChangeLog zabbix_mysql/NEWS zabbix_mysql/README |
---|
612 | %dir %{_datadir}/zabbix-frontend |
---|
613 | %{_datadir}/zabbix-frontend/php |
---|
614 | |
---|
615 | %files frontend-php-mysql |
---|
616 | |
---|
617 | %files frontend-php-postgresql |
---|
618 | |
---|
619 | %endif |
---|
620 | |
---|
621 | %changelog |
---|
622 | * Wed Apr 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.19-2 |
---|
623 | - rebuilt with libevent-2.1.11. |
---|
624 | |
---|
625 | * Mon Apr 06 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.19-1 |
---|
626 | - new upstream release. |
---|
627 | - dropped Patch3: fixed in upstream. |
---|
628 | - changed R:php5 to R:php74. |
---|
629 | - added systemd support (disabled as default). |
---|
630 | |
---|
631 | * Thu Dec 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.15-1 |
---|
632 | - new upstream release. |
---|
633 | - imported Patch13 from upstream to support php74. |
---|
634 | |
---|
635 | * Thu Oct 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.13-1 |
---|
636 | - new upstream release. |
---|
637 | - updated patches. |
---|
638 | |
---|
639 | * Wed May 08 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.7-1 |
---|
640 | - new upstream release. |
---|
641 | - switched to 4.0 LTS. |
---|
642 | - dropped Patch0: made to get same effect by another method. |
---|
643 | - updated Patch1 and 2. |
---|
644 | |
---|
645 | * Wed Nov 07 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.23-1 |
---|
646 | - new upstream release. |
---|
647 | |
---|
648 | * Tue Jun 12 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 3.0.13-2 |
---|
649 | - accept building only agent |
---|
650 | |
---|
651 | * Thu Dec 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.13-1 |
---|
652 | - new upstream release. |
---|
653 | |
---|
654 | * Fri Apr 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.8-1 |
---|
655 | - new upstream release. |
---|
656 | |
---|
657 | * Fri Mar 18 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.1-1 |
---|
658 | - new upstream release. |
---|
659 | - disabled jabber support. |
---|
660 | |
---|
661 | * Wed Sep 9 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.6-1 |
---|
662 | - new upstream release. |
---|
663 | |
---|
664 | * Sat Apr 11 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.9-1 |
---|
665 | - new upstream release. |
---|
666 | |
---|
667 | * Sun Jul 6 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.4-1 |
---|
668 | - new upstream release. |
---|
669 | - built with both of mysql and postgresql. |
---|
670 | |
---|
671 | * Mon Oct 07 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.8-1 |
---|
672 | - update to 2.0.8 |
---|
673 | |
---|
674 | * Wed Feb 20 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.5-2 |
---|
675 | - use %%bcond_with mysql to build with mysql |
---|
676 | |
---|
677 | * Tue Feb 19 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.5-1 |
---|
678 | - update to 2.0.5 |
---|
679 | - add using MySQL client library switch: default no |
---|
680 | - define use_postfix and use_mysql |
---|
681 | - add BuildRequires: MySQL-devel |
---|
682 | - add configure option: --with-mysql |
---|
683 | |
---|
684 | * Thu Feb 7 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.4-1 |
---|
685 | - initial build for Vine Linux |
---|