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