1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

net-mgmt/zabbix5-server: Update to 5.0.15

Summary:
- Update to 5.0.15
- Reformat a bit according to portclippy and portfmt
- Rework pidfile and logfile handling (now under /var/{run,log}/zabbix)
- Provide sample config for agentd
- Changelog: https://www.zabbix.com/rn/rn5.0.15

PR:		258076
Reviewed by:	pg@pakhom.spb.ru (maintainer)
Differential Revision: https://reviews.freebsd.org/D31845
This commit is contained in:
Juraj Lutter 2021-09-05 17:11:28 +02:00
parent 7737d5d3b1
commit eeb45e075e
12 changed files with 61 additions and 41 deletions

View File

@ -6,24 +6,23 @@ PKGNAMESUFFIX= -frontend
MASTERDIR= ${.CURDIR}/../zabbix5-server
NO_BUILD= yes
NO_ARCH= yes
USES+= php:web
USE_PHP= bcmath ctype dom fileinfo filter gd gettext hash json ldap \
mbstring pcre session simplexml snmp sockets xml xmlreader \
xmlwriter
PATCHDIR=
NO_ARCH= yes
NO_BUILD= yes
PLIST= ${PKGDIR}/pkg-plist.frontend
USE_PHP= bcmath ctype dom fileinfo filter gd gettext hash json ldap mbstring \
pcre session simplexml snmp sockets xml xmlreader xmlwriter
USES+= php:web
OPTIONS_DEFINE= MYSQLI PGSQL ORACLE
OPTIONS_DEFINE= MYSQLI ORACLE PGSQL
OPTIONS_DEFAULT= MYSQLI
MYSQLI_DESC= MySQLI backend
MYSQLI_USE= PHP=mysqli
PGSQL_USE= PHP=pgsql
MYSQLI_USE= PHP=mysqli
ORACLE_CONFIGURE_WITH= oracle
PGSQL_USE= PHP=pgsql
do-install:
@${MKDIR} ${STAGEDIR}${WWWDIR}

View File

@ -3,10 +3,11 @@ CATEGORIES= net-mgmt
PKGNAMESUFFIX= -java
MASTERDIR= ${.CURDIR}/../zabbix5-server
PLIST= ${PKGDIR}/pkg-plist.java
OPTIONS_DEFINE= IPV6
USE_JAVA= yes
PLIST= ${PKGDIR}/pkg-plist.java
OPTIONS_DEFINE= IPV6
.include "${MASTERDIR}/Makefile"

View File

@ -6,6 +6,6 @@ PKGNAMESUFFIX= -proxy
MASTERDIR= ${.CURDIR}/../zabbix5-server
OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE ORACLE
OPTIONS_SINGLE_DB= MYSQL ORACLE PGSQL SQLITE
.include "${MASTERDIR}/Makefile"

View File

@ -1,7 +1,7 @@
# Created by: Pakhom Golynga <pg@pakhom.spb.ru>
PORTNAME= zabbix5
DISTVERSION= 5.0.14
DISTVERSION= 5.0.15
PORTREVISION?= 0
CATEGORIES= net-mgmt
MASTER_SITES= https://cdn.zabbix.com/zabbix/sources/stable/${DISTVERSION:R}/
@ -148,18 +148,24 @@ post-patch:
@${REINPLACE_CMD} -e 's#/tmp/zabbix_server.pid#/var/run/zabbix/zabbix_server.pid#g' \
${WRKSRC}/conf/zabbix_server.conf \
${WRKSRC}/src/zabbix_server/server.c
@${REINPLACE_CMD} -e 's#/tmp/zabbix_server.log#/var/log/zabbix/zabbix_server.log#g' \
${WRKSRC}/conf/zabbix_server.conf
.endif
.if ${ZABBIX_BUILD} == "proxy"
@${REINPLACE_CMD} -e 's#/tmp/zabbix_proxy.pid#/var/run/zabbix/zabbix_proxy.pid#g' \
${WRKSRC}/conf/zabbix_proxy.conf \
${WRKSRC}/src/zabbix_proxy/proxy.c
@${REINPLACE_CMD} -e 's#/tmp/zabbix_proxy.log#/var/log/zabbix/zabbix_proxy.log#g' \
${WRKSRC}/conf/zabbix_proxy.conf
.endif
.if ${ZABBIX_BUILD} == "agent"
@${REINPLACE_CMD} -e 's#/tmp/zabbix_agentd.pid#/var/run/zabbix/zabbix_agentd.pid#g' \
${WRKSRC}/conf/zabbix_agentd.conf \
${WRKSRC}/src/zabbix_agent/zabbix_agentd.c
@${REINPLACE_CMD} -e 's#/tmp/zabbix_agentd.log#/var/log/zabbix/zabbix_agentd.log#g' \
${WRKSRC}/conf/zabbix_agentd.conf
.endif
.if ${ZABBIX_BUILD} == "java"

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1626699270
SHA256 (zabbix-5.0.14.tar.gz) = 156c6ac9cc3307c24427dcf42f421a0dd6af37ff612f3e2cfff54e0cf7b0f507
SIZE (zabbix-5.0.14.tar.gz) = 21159722
TIMESTAMP = 1630853536
SHA256 (zabbix-5.0.15.tar.gz) = 9c179ea139c62497a27928af8242255fc32be7eae8deac2a4e7cc8f67be43de1
SIZE (zabbix-5.0.15.tar.gz) = 21297290

View File

@ -1,6 +1,9 @@
[
{ type: install
message: <<EOM
Log files are now under /var/log/zabbix directory instead of /tmp as it was
previously.
For Zabbix server and proxy daemons, as well as Zabbix frontend, a database is
required. It is not needed to run Zabbix agent.

View File

@ -39,15 +39,18 @@ stop_precmd=zabbix_agentd_precmd
zabbix_agentd_precmd()
{
pidfile=${zabbix_agentd_pidfile}
if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
pidfile="$_pidfile_from_conf"
else
pidfile=${zabbix_agentd_pidfile}
local rundir=${zabbix_agentd_pidfile%/*}
if [ ! -d $rundir ] ; then
install -d -m 0755 -o zabbix -g zabbix $rundir
fi
fi
logfile=/var/log/zabbix/zabbix_agentd.log
if get_pidfile_from_conf LogFile ${zabbix_agentd_config}; then
logfile="$_pidfile_from_conf"
fi
local rundir=${pidfile%/*}
local logdir=${logfile%/*}
[ -d $rundir ] || install -d -m 0755 -o zabbix -g zabbix $rundir
[ -d $logdir ] || install -d -m 0755 -o zabbix -g zabbix $logdir
# This shouldn't be necessary with pidfile, but empirically it was the
# only way to reap the parent PID instead of all PIDs from

View File

@ -40,15 +40,18 @@ stop_precmd=zabbix_proxy_precmd
zabbix_proxy_precmd()
{
pidfile=${zabbix_proxy_pidfile}
if get_pidfile_from_conf PidFile ${zabbix_proxy_config}; then
pidfile="$_pidfile_from_conf"
else
pidfile=${zabbix_proxy_pidfile}
local rundir=${zabbix_proxy_pidfile%/*}
if [ ! -d $rundir ] ; then
install -d -m 0755 -o zabbix -g zabbix $rundir
fi
fi
logfile=/var/log/zabbix/zabbix_proxy.log
if get_pidfile_from_conf LogFile ${zabbix_proxy_config}; then
logfile="$_pidfile_from_conf"
fi
local rundir=${pidfile%/*}
local logdir=${logfile%/*}
[ -d $rundir ] || install -d -m 0755 -o zabbix -g zabbix $rundir
[ -d $logdir ] || install -d -m 0755 -o zabbix -g zabbix $logdir
# This shouldn't be necessary with pidfile, but empirically it was the
# only way to reap the parent PID instead of all PIDs from

View File

@ -41,15 +41,18 @@ stop_precmd=zabbix_server_precmd
zabbix_server_precmd()
{
pidfile=${zabbix_server_pidfile}
if get_pidfile_from_conf PidFile ${zabbix_server_config}; then
pidfile="$_pidfile_from_conf"
else
pidfile=${zabbix_server_pidfile}
local rundir=${zabbix_server_pidfile%/*}
if [ ! -d $rundir ] ; then
install -d -m 0755 -o zabbix -g zabbix $rundir
fi
fi
logfile=/var/log/zabbix/zabbix_server.log
if get_pidfile_from_conf LogFile ${zabbix_server_config}; then
logfile="$_pidfile_from_conf"
fi
local rundir=${pidfile%/*}
local logdir=${logfile%/*}
[ -d $rundir ] || install -d -m 0755 -o zabbix -g zabbix $rundir
[ -d $logdir ] || install -d -m 0755 -o zabbix -g zabbix $logdir
# This shouldn't be necessary with pidfile, but empirically it was the
# only way to reap the parent PID instead of all PIDs from

View File

@ -14,11 +14,11 @@
%%DATADIR%%/%%ZABBIX_BUILD%%/database/sqlite3/data.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/database/sqlite3/images.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/database/sqlite3/schema.sql
%%ETCDIR%%/zabbix_%%ZABBIX_BUILD%%.conf.sample
%%PROXY%%@dir %%ETCDIR%%/zabbix_proxy.conf.d
%%SERVER%%@dir %%ETCDIR%%/zabbix_server.conf.d
%%SERVER%%@dir %%ETCDIR%%/zabbix/alertscripts
man/man8/zabbix_%%ZABBIX_BUILD%%.8.gz
sbin/zabbix_%%ZABBIX_BUILD%%
@sample %%ETCDIR%%/zabbix_%%ZABBIX_BUILD%%.conf.sample
@dir %%ETCDIR%%/zabbix/externalscripts
@dir lib/modules

View File

@ -1,9 +1,9 @@
%%ETCDIR%%/zabbix_agentd.conf.sample
bin/zabbix_get
bin/zabbix_sender
man/man1/zabbix_get.1.gz
man/man1/zabbix_sender.1.gz
man/man8/zabbix_%%ZABBIX_BUILD%%d.8.gz
sbin/zabbix_agentd
@sample %%ETCDIR%%/zabbix_agentd.conf.sample
@dir %%ETCDIR%%/zabbix_agentd.conf.d
@dir lib/modules

View File

@ -31,13 +31,14 @@
%%WWWDIR%%/app/controllers/CControllerFavouriteDelete.php
%%WWWDIR%%/app/controllers/CControllerGuiEdit.php
%%WWWDIR%%/app/controllers/CControllerGuiUpdate.php
%%WWWDIR%%/app/controllers/CControllerHintboxActionlist.php
%%WWWDIR%%/app/controllers/CControllerHintboxEventlist.php
%%WWWDIR%%/app/controllers/CControllerHost.php
%%WWWDIR%%/app/controllers/CControllerHostMacrosList.php
%%WWWDIR%%/app/controllers/CControllerHostView.php
%%WWWDIR%%/app/controllers/CControllerHostViewRefresh.php
%%WWWDIR%%/app/controllers/CControllerHousekeepingEdit.php
%%WWWDIR%%/app/controllers/CControllerHousekeepingUpdate.php
%%WWWDIR%%/app/controllers/CControllerHintBox.php
%%WWWDIR%%/app/controllers/CControllerIconMapCreate.php
%%WWWDIR%%/app/controllers/CControllerIconMapDelete.php
%%WWWDIR%%/app/controllers/CControllerIconMapEdit.php
@ -231,8 +232,9 @@
%%WWWDIR%%/app/views/administration.workingtime.edit.php
%%WWWDIR%%/app/views/dashboard.properties.edit.php
%%WWWDIR%%/app/views/dashboard.sharing.edit.php
%%WWWDIR%%/app/views/hintbox.actionlist.php
%%WWWDIR%%/app/views/hintbox.eventlist.php
%%WWWDIR%%/app/views/hostmacros.list.php
%%WWWDIR%%/app/views/hint.box.php
%%WWWDIR%%/app/views/js/administration.image.list.js.php
%%WWWDIR%%/app/views/js/administration.user.list.js.php
%%WWWDIR%%/app/views/js/administration.authentication.edit.js.php