[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 |
---|
[12366] | 19 | Version: 4.0.19 |
---|
[12374] | 20 | Release: 2%{?_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/ |
---|
[12366] | 28 | Source0: https://cdn.zabbix.com/stable/%{version}/%{name}-%{version}.tar.gz |
---|
[7440] | 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 |
---|
[12366] | 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 | |
---|
[12073] | 46 | Patch1: 0001-change-the-font-for-Vine-Linux.patch |
---|
| 47 | Patch2: 0002-modified-config-files-for-Vine-Linux.patch |
---|
[7440] | 48 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
---|
[11716] | 49 | %if %{with server}%{with proxy} |
---|
[8748] | 50 | BuildRequires: libpq-devel |
---|
[11880] | 51 | BuildRequires: libmariadb-devel |
---|
[11716] | 52 | %endif |
---|
[12073] | 53 | BuildRequires: libevent-devel |
---|
| 54 | BuildRequires: pcre-devel |
---|
[7440] | 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 |
---|
[12366] | 62 | %if %{with systemd} |
---|
| 63 | BuildRequires: systemd |
---|
| 64 | %endif |
---|
[7440] | 65 | |
---|
| 66 | %description |
---|
| 67 | The Enterprise-class Monitoring Solution for Everyone. |
---|
| 68 | |
---|
[11716] | 69 | %if %{with server} |
---|
[8748] | 70 | %package server-common |
---|
| 71 | Summary: common files for Zabbix Server |
---|
[7440] | 72 | Requires: %{name} == %{version}-%{release} |
---|
[12366] | 73 | %if %{with systemd} |
---|
| 74 | %{?systemd_requires} |
---|
| 75 | %else |
---|
[7440] | 76 | Requires(post,preun): chkconfig |
---|
| 77 | Requires(preun,postun): initscripts |
---|
[12366] | 78 | %endif |
---|
[7440] | 79 | |
---|
[8748] | 80 | %description server-common |
---|
| 81 | This package include common files for Zabbix Server. |
---|
[7440] | 82 | |
---|
[8748] | 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 | |
---|
[11716] | 99 | %endif |
---|
| 100 | |
---|
| 101 | %if %{with agent} |
---|
[7440] | 102 | %package agent |
---|
| 103 | Summary: Zabbix Agent |
---|
| 104 | Requires: %{name} == %{version}-%{release} |
---|
[12366] | 105 | %if %{with systemd} |
---|
| 106 | %{?systemd_requires} |
---|
| 107 | %else |
---|
[7440] | 108 | Requires(post,preun): chkconfig |
---|
| 109 | Requires(preun,postun): initscripts |
---|
[12366] | 110 | %endif |
---|
[7440] | 111 | |
---|
| 112 | %description agent |
---|
| 113 | Zabbix Agent |
---|
| 114 | |
---|
[11716] | 115 | %endif |
---|
| 116 | |
---|
| 117 | %if %{with proxy} |
---|
[8748] | 118 | %package proxy-common |
---|
| 119 | Summary: common files for Zabbix Proxy |
---|
[7440] | 120 | Requires: %{name} == %{version}-%{release} |
---|
[12366] | 121 | %if %{with systemd} |
---|
| 122 | %{?systemd_requires} |
---|
| 123 | %else |
---|
[7440] | 124 | Requires(post,preun): chkconfig |
---|
| 125 | Requires(preun,postun): initscripts |
---|
[12366] | 126 | %endif |
---|
[7440] | 127 | |
---|
[8748] | 128 | %description proxy-common |
---|
| 129 | This package include common files for Zabbix Proxy |
---|
[7440] | 130 | |
---|
[8748] | 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 | |
---|
[11716] | 147 | %endif |
---|
| 148 | |
---|
| 149 | %if %{with frontend} |
---|
[7440] | 150 | %package frontend-php |
---|
| 151 | Summary: Zabbix web frontend with PHP |
---|
| 152 | Group: Applications/Internet |
---|
[12366] | 153 | Requires: php74 |
---|
[7440] | 154 | Requires: TrueType-vlgothic |
---|
| 155 | |
---|
| 156 | %description frontend-php |
---|
| 157 | Zabbix web frontend with PHP. |
---|
| 158 | |
---|
[8748] | 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} |
---|
[12366] | 163 | Requires: php74-mysql |
---|
[8748] | 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} |
---|
[12366] | 172 | Requires: php74-pgsql |
---|
[8748] | 173 | |
---|
| 174 | %description frontend-php-postgresql |
---|
| 175 | Zabbix web frontend with PHP and PostgreSQL. |
---|
| 176 | |
---|
[11716] | 177 | %endif |
---|
| 178 | |
---|
[7440] | 179 | %prep |
---|
[8748] | 180 | %setup -q -T -a 0 -c -n zabbix-%{version} |
---|
| 181 | mv zabbix-%{version} zabbix_mysql |
---|
| 182 | pushd zabbix_mysql |
---|
[7440] | 183 | %patch1 -p 1 |
---|
| 184 | %patch2 -p 1 |
---|
[8748] | 185 | popd |
---|
[7440] | 186 | |
---|
[11716] | 187 | %if %{with server}%{with proxy} |
---|
[8748] | 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 |
---|
[11716] | 194 | %endif |
---|
[8748] | 195 | |
---|
[12366] | 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 | |
---|
[7440] | 219 | %build |
---|
[8748] | 220 | |
---|
| 221 | Build() |
---|
| 222 | { |
---|
[12073] | 223 | perl -pi -e 's|/usr/bin/traceroute|/bin/traceroute|' \ |
---|
| 224 | ./database/{ibm_db2,mysql,oracle,postgresql,sqlite3}/data.sql |
---|
| 225 | |
---|
[8748] | 226 | %configure \ |
---|
[11716] | 227 | %{?with_server:--enable-server} \ |
---|
| 228 | %{?with_proxy:--enable-proxy} \ |
---|
[12277] | 229 | %{?with_agent:--enable-agent} \ |
---|
[8748] | 230 | --enable-ipv6 \ |
---|
[7440] | 231 | --sysconfdir=%{_sysconfdir}/zabbix \ |
---|
| 232 | --with-libcurl \ |
---|
| 233 | --with-openipmi \ |
---|
| 234 | --with-net-snmp \ |
---|
| 235 | --with-unixodbc \ |
---|
[8748] | 236 | --with-ssh2 \ |
---|
| 237 | $@ |
---|
[7440] | 238 | |
---|
| 239 | %__make |
---|
[8748] | 240 | } |
---|
[7440] | 241 | |
---|
[11716] | 242 | %if %{with server}%{with proxy} |
---|
[8748] | 243 | pushd zabbix_mysql |
---|
[11716] | 244 | Build --with-mysql |
---|
[8748] | 245 | popd |
---|
| 246 | |
---|
| 247 | pushd zabbix_pgsql |
---|
| 248 | Build --with-postgresql |
---|
| 249 | popd |
---|
[11716] | 250 | %else |
---|
| 251 | pushd zabbix_mysql |
---|
| 252 | Build |
---|
| 253 | popd |
---|
| 254 | %endif |
---|
[8748] | 255 | |
---|
[7440] | 256 | %install |
---|
[12366] | 257 | %__rm -rf %{buildroot} |
---|
[8748] | 258 | pushd zabbix_mysql |
---|
[12366] | 259 | make DESTDIR=%{buildroot} install |
---|
[7440] | 260 | |
---|
[11716] | 261 | %if %{with server} |
---|
[8748] | 262 | mv -f %{buildroot}%{_sbindir}/zabbix_server %{buildroot}%{_sbindir}/zabbix_server.mysql |
---|
[11716] | 263 | %endif |
---|
| 264 | %if %{with proxy} |
---|
[8748] | 265 | mv -f %{buildroot}%{_sbindir}/zabbix_proxy %{buildroot}%{_sbindir}/zabbix_proxy.mysql |
---|
[11716] | 266 | %endif |
---|
[8748] | 267 | |
---|
[7440] | 268 | # make directories |
---|
[12366] | 269 | %__mkdir_p %{buildroot}%{_localstatedir}/{log,run}/%{name} |
---|
[7440] | 270 | |
---|
| 271 | # DB |
---|
[12366] | 272 | %__mkdir_p %{buildroot}%{_datadir}/zabbix |
---|
[11716] | 273 | %if %{with server}%{with proxy} |
---|
[12366] | 274 | %__cp -a database/postgresql %{buildroot}%{_datadir}/zabbix/ |
---|
| 275 | %__cp -a database/mysql %{buildroot}%{_datadir}/zabbix/ |
---|
[11716] | 276 | %endif |
---|
[7440] | 277 | |
---|
[12366] | 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 |
---|
[7440] | 293 | # init.d |
---|
[12366] | 294 | %__mkdir_p %{buildroot}%{_initddir} |
---|
[11716] | 295 | %if %{with server} |
---|
[12366] | 296 | %__cp %{SOURCE1} %{buildroot}%{_initddir}/zabbix_server |
---|
[11716] | 297 | %endif |
---|
| 298 | %if %{with proxy} |
---|
[12366] | 299 | %__cp %{SOURCE2} %{buildroot}%{_initddir}/zabbix_proxy |
---|
[11716] | 300 | %endif |
---|
| 301 | %if %{with agent} |
---|
[12366] | 302 | %__cp %{SOURCE3} %{buildroot}%{_initddir}/zabbix_agentd |
---|
[11716] | 303 | %endif |
---|
[12366] | 304 | %endif |
---|
[7440] | 305 | |
---|
| 306 | # logrotate |
---|
[12366] | 307 | %__mkdir_p %{buildroot}%{_sysconfdir}/logrotate.d |
---|
[11716] | 308 | %if %{with server} |
---|
[12366] | 309 | %__cp %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/zabbix_server |
---|
[11716] | 310 | %endif |
---|
| 311 | %if %{with proxy} |
---|
[12366] | 312 | %__cp %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/zabbix_proxy |
---|
[11716] | 313 | %endif |
---|
| 314 | %if %{with agent} |
---|
[12366] | 315 | %__cp %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/zabbix_agentd |
---|
[11716] | 316 | %endif |
---|
[7440] | 317 | |
---|
[11716] | 318 | %if %{with frontend} |
---|
[7440] | 319 | # frontend-php |
---|
[12366] | 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 |
---|
[7440] | 323 | |
---|
| 324 | ln -s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf \ |
---|
[12366] | 325 | %{buildroot}%{_datadir}/zabbix-frontend/php/assets/fonts/ |
---|
[11716] | 326 | %endif |
---|
[7440] | 327 | |
---|
[11716] | 328 | %if %{with proxy} |
---|
[8748] | 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/ |
---|
[11716] | 333 | %endif |
---|
[8748] | 334 | |
---|
| 335 | popd |
---|
| 336 | |
---|
[11716] | 337 | %if %{with server}%{with proxy} |
---|
[8748] | 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 |
---|
[11716] | 342 | %endif |
---|
[8748] | 343 | |
---|
[7440] | 344 | %clean |
---|
[12366] | 345 | %__rm -rf %{buildroot} |
---|
[7440] | 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 | |
---|
[11716] | 354 | %if %{with server} |
---|
[8748] | 355 | %post server-mysql |
---|
[12366] | 356 | %if %{with systemd} |
---|
| 357 | %systemd_post zabbix-server-mysql.service |
---|
| 358 | %else |
---|
[8748] | 359 | /sbin/update-alternatives --install /usr/sbin/zabbix_server \ |
---|
| 360 | zabbix_server /usr/sbin/zabbix_server.mysql 10 |
---|
[12366] | 361 | %endif |
---|
[8748] | 362 | |
---|
| 363 | %post server-postgresql |
---|
[12366] | 364 | %if %{with systemd} |
---|
| 365 | %systemd_post zabbix-server-pgsql.service |
---|
| 366 | %else |
---|
[8748] | 367 | /sbin/update-alternatives --install /usr/sbin/zabbix_server \ |
---|
| 368 | zabbix_server /usr/sbin/zabbix_server.pgsql 10 |
---|
| 369 | /sbin/chkconfig --add zabbix_server |
---|
[11716] | 370 | %endif |
---|
[12366] | 371 | %endif |
---|
[11716] | 372 | |
---|
| 373 | %if %{with proxy} |
---|
[8748] | 374 | %post proxy-mysql |
---|
[12366] | 375 | %if %{with systemd} |
---|
| 376 | %systemd_post zabbix-proxy-mysql.service |
---|
| 377 | %else |
---|
[8748] | 378 | /sbin/update-alternatives --install /usr/sbin/zabbix_proxy \ |
---|
| 379 | zabbix_proxy /usr/sbin/zabbix_proxy.mysql 10 |
---|
[7440] | 380 | /sbin/chkconfig --add zabbix_proxy |
---|
[12366] | 381 | %endif |
---|
[7440] | 382 | |
---|
[8748] | 383 | %post proxy-postgresql |
---|
[12366] | 384 | %if %{with systemd} |
---|
| 385 | %systemd_post zabbix-proxy-pgsql.service |
---|
| 386 | %else |
---|
[8748] | 387 | /sbin/update-alternatives --install /usr/sbin/zabbix_proxy \ |
---|
| 388 | zabbix_proxy /usr/sbin/zabbix_proxy.pgsql 10 |
---|
| 389 | /sbin/chkconfig --add zabbix_proxy |
---|
[11716] | 390 | %endif |
---|
[12366] | 391 | %endif |
---|
[11716] | 392 | |
---|
| 393 | %if %{with agent} |
---|
[7440] | 394 | %post agent |
---|
[12366] | 395 | %if %{with systemd} |
---|
| 396 | %systemd_post zabbix-agent.service |
---|
| 397 | %else |
---|
[7440] | 398 | /sbin/chkconfig --add zabbix_agentd |
---|
[12366] | 399 | %endif |
---|
[7440] | 400 | |
---|
[11716] | 401 | %endif |
---|
| 402 | |
---|
| 403 | %if %{with server} |
---|
[8748] | 404 | %preun server-mysql |
---|
[12366] | 405 | %if %{with systemd} |
---|
| 406 | %systemd_preun zabbix-server-mysql.service |
---|
| 407 | %else |
---|
| 408 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
[7440] | 409 | /sbin/service zabbix_server stop >/dev/null 2>&1 |
---|
| 410 | /sbin/chkconfig --del zabbix_server |
---|
[8748] | 411 | /sbin/update-alternatives --remove zabbix_server \ |
---|
| 412 | /usr/sbin/zabbix_server.mysql |
---|
[7440] | 413 | fi |
---|
[12366] | 414 | %endif |
---|
[7440] | 415 | |
---|
[8748] | 416 | %preun server-postgresql |
---|
[12366] | 417 | %if %{with systemd} |
---|
| 418 | %systemd_preun zabbix-server-pgysql.service |
---|
| 419 | %else |
---|
| 420 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
[8748] | 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 |
---|
[11716] | 426 | %endif |
---|
[12366] | 427 | %endif |
---|
[11716] | 428 | |
---|
| 429 | %if %{with proxy} |
---|
[8748] | 430 | %preun proxy-mysql |
---|
[12366] | 431 | %if %{with systemd} |
---|
| 432 | %systemd_preun zabbix-proxy-mysql.service |
---|
| 433 | %else |
---|
| 434 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
[7440] | 435 | /sbin/service zabbix_proxy stop >/dev/null 2>&1 |
---|
| 436 | /sbin/chkconfig --del zabbix_proxy |
---|
[8748] | 437 | /sbin/update-alternatives --remove zabbix_proxy \ |
---|
| 438 | /usr/sbin/zabbix_proxy.mysql |
---|
[7440] | 439 | fi |
---|
[12366] | 440 | %endif |
---|
[7440] | 441 | |
---|
[8748] | 442 | %preun proxy-postgresql |
---|
[12366] | 443 | %if %{with systemd} |
---|
| 444 | %systemd_preun zabbix-proxy-pgsql.service |
---|
| 445 | %else |
---|
| 446 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
[8748] | 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 |
---|
[11716] | 452 | %endif |
---|
[12366] | 453 | %endif |
---|
[11716] | 454 | |
---|
| 455 | %if %{with agent} |
---|
[7440] | 456 | %preun agent |
---|
[12366] | 457 | %systemd_preun zabbix-agent.service |
---|
| 458 | %if %{with systemd} |
---|
| 459 | %else |
---|
[12374] | 460 | if [ "$1" -eq 0 -o -x /bin/systemctl ]; then |
---|
[7440] | 461 | /sbin/service zabbix_agentd stop >/dev/null 2>&1 |
---|
| 462 | /sbin/chkconfig --del zabbix_agentd |
---|
| 463 | fi |
---|
[11716] | 464 | %endif |
---|
[12366] | 465 | %endif |
---|
[11716] | 466 | |
---|
| 467 | %if %{with server} |
---|
[8748] | 468 | %postun server-mysql |
---|
[12366] | 469 | %if %{with systemd} |
---|
| 470 | %systemd_postun_with_restart zabbix-server-mysql.service |
---|
| 471 | %else |
---|
[12374] | 472 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
[7440] | 473 | /sbin/service zabbix_server condrestart >/dev/null 2>&1 || : |
---|
| 474 | fi |
---|
[12366] | 475 | %endif |
---|
[7440] | 476 | |
---|
[8748] | 477 | %postun server-postgresql |
---|
[12366] | 478 | %if %{with systemd} |
---|
| 479 | %systemd_postun_with_restart zabbix-server-pgsql.service |
---|
| 480 | %else |
---|
[12374] | 481 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
[8748] | 482 | /sbin/service zabbix_server condrestart >/dev/null 2>&1 || : |
---|
| 483 | fi |
---|
[11716] | 484 | %endif |
---|
[12366] | 485 | %endif |
---|
[11716] | 486 | |
---|
| 487 | %if %{with proxy} |
---|
[8748] | 488 | %postun proxy-mysql |
---|
[12366] | 489 | %if %{with systemd} |
---|
| 490 | %systemd_postun_with_restart zabbix-proxy-mysql.service |
---|
| 491 | %else |
---|
[12374] | 492 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
[7440] | 493 | /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || : |
---|
| 494 | fi |
---|
[12366] | 495 | %endif |
---|
[7440] | 496 | |
---|
[8748] | 497 | %postun proxy-postgresql |
---|
[12366] | 498 | %if %{with systemd} |
---|
| 499 | %systemd_postun_with_restart zabbix-proxy-pgsql.service |
---|
| 500 | %else |
---|
[12374] | 501 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
[8748] | 502 | /sbin/service zabbix_proxy condrestart >/dev/null 2>&1 || : |
---|
| 503 | fi |
---|
[12366] | 504 | %endif |
---|
[8748] | 505 | |
---|
[7440] | 506 | %postun agent |
---|
[12366] | 507 | %if %{with systemd} |
---|
| 508 | %systemd_postun_with_restart zabbix-agent.service |
---|
| 509 | %else |
---|
[12374] | 510 | if [ "$1" -ge "1" -a ! -x /bin/systemctl ]; then |
---|
[7440] | 511 | /sbin/service zabbix_agentd condrestart >/dev/null 2>&1 || : |
---|
| 512 | fi |
---|
[12366] | 513 | %endif |
---|
[7440] | 514 | |
---|
[11716] | 515 | %endif |
---|
| 516 | |
---|
[7440] | 517 | %files |
---|
| 518 | %defattr(-,root,root,-) |
---|
[12073] | 519 | %license zabbix_mysql/COPYING |
---|
| 520 | %doc zabbix_mysql/AUTHORS zabbix_mysql/ChangeLog zabbix_mysql/NEWS zabbix_mysql/README |
---|
[7440] | 521 | %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/log/%{name} |
---|
| 522 | %attr(0755,zabbix,zabbix) %dir %{_localstatedir}/run/%{name} |
---|
| 523 | %dir %{_datadir}/zabbix |
---|
[11716] | 524 | %if %{with server}%{with proxy} |
---|
[8748] | 525 | %{_datadir}/zabbix/mysql |
---|
[7440] | 526 | %{_datadir}/zabbix/postgresql |
---|
[11716] | 527 | %endif |
---|
[12366] | 528 | %if %{with systemd} |
---|
| 529 | %{_prefix}/lib/tmpfiles.d/zabbix.conf |
---|
| 530 | %endif |
---|
[7440] | 531 | |
---|
[11716] | 532 | %if %{with server} |
---|
[8748] | 533 | %files server-common |
---|
[7440] | 534 | %defattr(-,root,root,-) |
---|
| 535 | %dir %{_sysconfdir}/zabbix |
---|
| 536 | %config(noreplace) %{_sysconfdir}/zabbix/zabbix_server.conf |
---|
| 537 | %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_server |
---|
[12366] | 538 | %if !%{with systemd} |
---|
[7440] | 539 | %{_initddir}/zabbix_server* |
---|
[12366] | 540 | %endif |
---|
[7440] | 541 | %{_mandir}/man8/zabbix_server.8* |
---|
| 542 | |
---|
[8748] | 543 | %files server-mysql |
---|
| 544 | %defattr(-,root,root,-) |
---|
| 545 | %{_sbindir}/zabbix_server.mysql |
---|
[12366] | 546 | %if %{with systemd} |
---|
| 547 | %{_unitdir}/zabbix-server-mysql.service |
---|
| 548 | %endif |
---|
[8748] | 549 | |
---|
| 550 | %files server-postgresql |
---|
| 551 | %defattr(-,root,root,-) |
---|
| 552 | %{_sbindir}/zabbix_server.pgsql |
---|
[12366] | 553 | %if %{with systemd} |
---|
| 554 | %{_unitdir}/zabbix-server-pgsql.service |
---|
| 555 | %endif |
---|
[8748] | 556 | |
---|
[11716] | 557 | %endif |
---|
| 558 | |
---|
| 559 | %if %{with agent} |
---|
[7440] | 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 |
---|
[12366] | 568 | %if %{with systemd} |
---|
| 569 | %{_unitdir}/zabbix-agent.service |
---|
| 570 | %else |
---|
[7440] | 571 | %{_initddir}/zabbix_agentd |
---|
[12366] | 572 | %endif |
---|
[7440] | 573 | %{_mandir}/man1/zabbix_get.1* |
---|
| 574 | %{_mandir}/man1/zabbix_sender.1* |
---|
| 575 | %{_mandir}/man8/zabbix_agentd.8* |
---|
| 576 | |
---|
[11716] | 577 | %endif |
---|
| 578 | |
---|
| 579 | %if %{with proxy} |
---|
[8748] | 580 | %files proxy-common |
---|
[7440] | 581 | %defattr(-,root,root,-) |
---|
| 582 | %dir %{_sysconfdir}/zabbix |
---|
| 583 | %config(noreplace) %{_sysconfdir}/zabbix/zabbix_proxy.conf |
---|
| 584 | %config(noreplace) %{_sysconfdir}/logrotate.d/zabbix_proxy |
---|
[12366] | 585 | %if !%{with systemd} |
---|
[7440] | 586 | %{_initddir}/zabbix_proxy |
---|
[12366] | 587 | %endif |
---|
[7440] | 588 | %{_mandir}/man8/zabbix_proxy.8* |
---|
[8748] | 589 | %{_datadir}/zabbix-proxy |
---|
[7440] | 590 | |
---|
[8748] | 591 | %files proxy-mysql |
---|
| 592 | %defattr(-,root,root,-) |
---|
| 593 | %{_sbindir}/zabbix_proxy.mysql |
---|
[12366] | 594 | %if %{with systemd} |
---|
| 595 | %{_unitdir}/zabbix-proxy-mysql.service |
---|
| 596 | %endif |
---|
[8748] | 597 | |
---|
| 598 | %files proxy-postgresql |
---|
| 599 | %defattr(-,root,root,-) |
---|
| 600 | %{_sbindir}/zabbix_proxy.pgsql |
---|
[12366] | 601 | %if %{with systemd} |
---|
| 602 | %{_unitdir}/zabbix-proxy-pgsql.service |
---|
| 603 | %endif |
---|
[8748] | 604 | |
---|
[11716] | 605 | %endif |
---|
| 606 | |
---|
| 607 | %if %{with frontend} |
---|
[7440] | 608 | %files frontend-php |
---|
| 609 | %defattr(-,root,root,-) |
---|
[12073] | 610 | %license zabbix_mysql/COPYING |
---|
| 611 | %doc zabbix_mysql/AUTHORS zabbix_mysql/ChangeLog zabbix_mysql/NEWS zabbix_mysql/README |
---|
[7440] | 612 | %dir %{_datadir}/zabbix-frontend |
---|
| 613 | %{_datadir}/zabbix-frontend/php |
---|
| 614 | |
---|
[8748] | 615 | %files frontend-php-mysql |
---|
| 616 | |
---|
| 617 | %files frontend-php-postgresql |
---|
| 618 | |
---|
[11716] | 619 | %endif |
---|
| 620 | |
---|
[7440] | 621 | %changelog |
---|
[12374] | 622 | * Wed Apr 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.19-2 |
---|
| 623 | - rebuilt with libevent-2.1.11. |
---|
| 624 | |
---|
[12366] | 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 | |
---|
[12317] | 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 | |
---|
[12277] | 635 | * Thu Oct 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.13-1 |
---|
| 636 | - new upstream release. |
---|
| 637 | - updated patches. |
---|
| 638 | |
---|
[12073] | 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 | |
---|
[11880] | 645 | * Wed Nov 07 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.23-1 |
---|
| 646 | - new upstream release. |
---|
| 647 | |
---|
[11716] | 648 | * Tue Jun 12 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 3.0.13-2 |
---|
| 649 | - accept building only agent |
---|
| 650 | |
---|
[11300] | 651 | * Thu Dec 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.13-1 |
---|
| 652 | - new upstream release. |
---|
| 653 | |
---|
[11058] | 654 | * Fri Apr 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.0.8-1 |
---|
| 655 | - new upstream release. |
---|
| 656 | |
---|
[10091] | 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 | |
---|
[9746] | 661 | * Wed Sep 9 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.6-1 |
---|
| 662 | - new upstream release. |
---|
| 663 | |
---|
[9497] | 664 | * Sat Apr 11 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.9-1 |
---|
| 665 | - new upstream release. |
---|
| 666 | |
---|
[8748] | 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 | |
---|
[7879] | 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 | |
---|
[7480] | 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 | |
---|
[7440] | 684 | * Thu Feb 7 2013 IWAI, Masaharu <iwai@alib.jp> 2.0.4-1 |
---|
| 685 | - initial build for Vine Linux |
---|