aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authortz <tz@FreeBSD.org>2016-09-14 21:17:24 +0800
committertz <tz@FreeBSD.org>2016-09-14 21:17:24 +0800
commita9315fee3b075eec4eed94c8cd967dde03493877 (patch)
tree007bf39db1d1dd03bddde716f2ff82e744af2a16 /net-mgmt
parent411e47e27b0a0bd24bc28de39111e6703edbcd70 (diff)
downloadfreebsd-ports-gnome-a9315fee3b075eec4eed94c8cd967dde03493877.tar.gz
freebsd-ports-gnome-a9315fee3b075eec4eed94c8cd967dde03493877.tar.zst
freebsd-ports-gnome-a9315fee3b075eec4eed94c8cd967dde03493877.zip
net-mgmt/zabbix22-server: Update from 2.2.12 to 2.2.14
- http://www.zabbix.com/rn2.2.13.php - http://www.zabbix.com/rn2.2.14.php Also: - Fix default path to PID - Fix rc.d scripts to correct use PID file - Remove IGNORE_WITH_PHP and IGNORE_WITH_MYSQL because the ignored versions no longer exists PR: 209891 Submitted by: pg@pakhom.spb.ru (maintainer) Approved by: pi (mentor)
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/zabbix22-server/Makefile43
-rw-r--r--net-mgmt/zabbix22-server/distinfo5
-rw-r--r--net-mgmt/zabbix22-server/files/patch-src_zabbix__agent_zabbix__agentd.c11
-rw-r--r--net-mgmt/zabbix22-server/files/patch-src_zabbix__proxy_proxy.c11
-rw-r--r--net-mgmt/zabbix22-server/files/patch-src_zabbix__server_server.c11
-rw-r--r--net-mgmt/zabbix22-server/files/pkg-message.in2
-rw-r--r--net-mgmt/zabbix22-server/files/zabbix_agentd.in27
-rw-r--r--net-mgmt/zabbix22-server/files/zabbix_proxy.in29
-rw-r--r--net-mgmt/zabbix22-server/files/zabbix_server.in29
9 files changed, 109 insertions, 59 deletions
diff --git a/net-mgmt/zabbix22-server/Makefile b/net-mgmt/zabbix22-server/Makefile
index 7c0e026a930d..a6c55db40ca3 100644
--- a/net-mgmt/zabbix22-server/Makefile
+++ b/net-mgmt/zabbix22-server/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= zabbix22
-PORTVERSION= 2.2.12
-PORTREVISION= 0
+PORTVERSION= 2.2.14
CATEGORIES= net-mgmt
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
PKGNAMESUFFIX?= -server
@@ -14,14 +13,8 @@ COMMENT= Enterprise-class open source distributed monitoring (${PKGNAMESUFFIX:S/
LICENSE= GPLv2
-CONFLICTS= ${PKGBASE}-1.[0-8]*
-
-IGNORE_WITH_PHP= 52
-IGNORE_WITH_MYSQL= 41
-
-.if ${PKGNAMESUFFIX} != "-agent"
-CONFLICTS+= ${PORTNAME}-1.[0-8]*
-.endif
+CONFLICTS= zabbix2${PKGNAMESUFFIX}-[0-9]* zabbix24${PKGNAMESUFFIX}[0-9]* zabbix3${PKGNAMESUFFIX}-[0-9]*
+LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
ZABBIX_BUILD= ${PKGNAMESUFFIX:S/^-//}
@@ -60,7 +53,6 @@ CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
--with-iconv=${ICONV_PREFIX}
.if ${ZABBIX_BUILD} != "agent"
-LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
USES+= execinfo
CPPFLAGS+= ${EXECINFO_CPPFLAGS}
@@ -71,7 +63,7 @@ SUB_FILES= pkg-message
CONFIGURE_ARGS+= --with-net-snmp
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW LIBXML2
-OPTIONS_DEFAULT= MYSQL FPING JABBER CURL UNIXODBC
+OPTIONS_DEFAULT= MYSQL IPV6 FPING JABBER CURL UNIXODBC
OPTIONS_SUB= yes
CURL_DESC= Support for web monitoring
@@ -90,13 +82,13 @@ OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE ORACLE
OPTIONS_SINGLE_ODBC= IODBC UNIXODBC
MYSQL_CONFIGURE_WITH= mysql
-MYSQL_USE= MYSQL=yes
+USES+= mysql
PGSQL_CONFIGURE_WITH= postgresql
-PGSQL_USES= pgsql
+USES+= pgsql
SQLITE_CONFIGURE_WITH= sqlite3
-SQLITE_USES= sqlite:3
+USES+= sqlite:3
ORACLE_CONFIGURE_WITH= oracle
@@ -156,9 +148,19 @@ post-patch:
${WRKSRC}/src/zabbix_${ZABBIX_BUILD}/Makefile.in
@${FIND} ${WRKSRC} -type f \( -name '*.bak' -or -name '*.orig' \) -exec ${RM} -f {} +
-post-install:
-.if ${PORT_OPTIONS:MJAVAGW}
- @${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
+.if ${ZABBIX_BUILD} == "server"
+ @${REINPLACE_CMD} -e 's#PidFile=/tmp/zabbix_server.pid#PidFile=/var/run/zabbix/zabbix_server.pid#g' \
+ ${WRKSRC}/conf/zabbix_server*.conf
+.endif
+
+.if ${ZABBIX_BUILD} == "proxy"
+ @${REINPLACE_CMD} -e 's#PidFile=/tmp/zabbix_proxy.pid#PidFile=/var/run/zabbix/zabbix_proxy.pid#g' \
+ ${WRKSRC}/conf/zabbix_proxy*.conf
+.endif
+
+.if ${ZABBIX_BUILD} == "agent"
+ @${REINPLACE_CMD} -e 's#PidFile=/tmp/zabbix_agentd.pid#PidFile=/var/run/zabbix/zabbix_agentd.pid#g' \
+ ${WRKSRC}/conf/zabbix_agentd.conf
.endif
.if ${ZABBIX_BUILD} != "agent"
@@ -168,4 +170,9 @@ post-install:
.endif
.endif
+post-install:
+.if ${PORT_OPTIONS:MJAVAGW}
+ @${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
+.endif
+
.include <bsd.port.mk>
diff --git a/net-mgmt/zabbix22-server/distinfo b/net-mgmt/zabbix22-server/distinfo
index 4efff2cc0053..ac4c74f5ff1d 100644
--- a/net-mgmt/zabbix22-server/distinfo
+++ b/net-mgmt/zabbix22-server/distinfo
@@ -1,2 +1,3 @@
-SHA256 (zabbix-2.2.12.tar.gz) = 7481021c2d62fa7d090f8401c87e99107c3e0227e5b10406380c4ac5a768e9e9
-SIZE (zabbix-2.2.12.tar.gz) = 15467504
+TIMESTAMP = 1473858962
+SHA256 (zabbix-2.2.14.tar.gz) = 76fa3f45168946b9fb4a22840b4b06054f1a09da93c910969eacd04217fa21c8
+SIZE (zabbix-2.2.14.tar.gz) = 15481807
diff --git a/net-mgmt/zabbix22-server/files/patch-src_zabbix__agent_zabbix__agentd.c b/net-mgmt/zabbix22-server/files/patch-src_zabbix__agent_zabbix__agentd.c
new file mode 100644
index 000000000000..c39037eafd42
--- /dev/null
+++ b/net-mgmt/zabbix22-server/files/patch-src_zabbix__agent_zabbix__agentd.c
@@ -0,0 +1,11 @@
+--- src/zabbix_agent/zabbix_agentd.c.orig 2016-09-13 16:27:58 UTC
++++ src/zabbix_agent/zabbix_agentd.c
+@@ -271,7 +271,7 @@ static void set_defaults(void)
+
+ #ifdef USE_PID_FILE
+ if (NULL == CONFIG_PID_FILE)
+- CONFIG_PID_FILE = "/tmp/zabbix_agentd.pid";
++ CONFIG_PID_FILE = "/var/run/zabbix/zabbix_agentd.pid";
+ #endif
+ }
+
diff --git a/net-mgmt/zabbix22-server/files/patch-src_zabbix__proxy_proxy.c b/net-mgmt/zabbix22-server/files/patch-src_zabbix__proxy_proxy.c
new file mode 100644
index 000000000000..363ec2ec72d6
--- /dev/null
+++ b/net-mgmt/zabbix22-server/files/patch-src_zabbix__proxy_proxy.c
@@ -0,0 +1,11 @@
+--- src/zabbix_proxy/proxy.c.orig 2016-09-13 16:28:16 UTC
++++ src/zabbix_proxy/proxy.c
+@@ -256,7 +256,7 @@ static void zbx_set_defaults()
+ CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
+
+ if (NULL == CONFIG_PID_FILE)
+- CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_proxy.pid");
++ CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_proxy.pid");
+
+ if (NULL == CONFIG_TMPDIR)
+ CONFIG_TMPDIR = zbx_strdup(CONFIG_TMPDIR, "/tmp");
diff --git a/net-mgmt/zabbix22-server/files/patch-src_zabbix__server_server.c b/net-mgmt/zabbix22-server/files/patch-src_zabbix__server_server.c
new file mode 100644
index 000000000000..b26fa305d327
--- /dev/null
+++ b/net-mgmt/zabbix22-server/files/patch-src_zabbix__server_server.c
@@ -0,0 +1,11 @@
+--- src/zabbix_server/server.c.orig 2016-09-13 16:28:31 UTC
++++ src/zabbix_server/server.c
+@@ -226,7 +226,7 @@ static void zbx_set_defaults()
+ CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
+
+ if (NULL == CONFIG_PID_FILE)
+- CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_server.pid");
++ CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_server.pid");
+
+ if (NULL == CONFIG_ALERT_SCRIPTS_PATH)
+ CONFIG_ALERT_SCRIPTS_PATH = zbx_strdup(CONFIG_ALERT_SCRIPTS_PATH, DATADIR "/zabbix/alertscripts");
diff --git a/net-mgmt/zabbix22-server/files/pkg-message.in b/net-mgmt/zabbix22-server/files/pkg-message.in
index a0bc55e63244..9b28577cd1d6 100644
--- a/net-mgmt/zabbix22-server/files/pkg-message.in
+++ b/net-mgmt/zabbix22-server/files/pkg-message.in
@@ -39,7 +39,7 @@ Upgrade notes for 2.2.0
Accepted data limit when using Zabbix protocol was changed from 128MB to 64MB.
New upgrade procedure
-There are no upgrade SQL scripts anymore - database upgrade is performed by the Zabbix server.
+There are no upgrade SQL scripts anymore - database upgrade is performed by the Zabbix server.
To upgrade an existing database, see the scripts in
Upgrade notes for 2.2.0 https://www.zabbix.com/documentation/2.2/manual/installation/upgrade_notes_220
diff --git a/net-mgmt/zabbix22-server/files/zabbix_agentd.in b/net-mgmt/zabbix22-server/files/zabbix_agentd.in
index ddff711848b5..7937923e8324 100644
--- a/net-mgmt/zabbix22-server/files/zabbix_agentd.in
+++ b/net-mgmt/zabbix22-server/files/zabbix_agentd.in
@@ -9,10 +9,10 @@
#
# zabbix_agentd_enable (bool): Set to NO by default. Set it to YES to
# enable zabbix_agentd.
-# zabbix_agentd_paths (string): Set to standard path by default. Set a search
-# if you have custom userparams that need binaries elsewhere.
# zabbix_agentd_config (string): Set to the standard config file path by
# default.
+# zabbix_agentd_pidfile (string): Location of the zabbix_agentd pid file
+# Default is /var/run/zabbix/zabbix_agentd.pid
#
. /etc/rc.subr
@@ -22,22 +22,27 @@ rcvar=zabbix_agentd_enable
load_rc_config $name
-: ${zabbix_agentd_enable="NO"}
-: ${zabbix_agentd_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
-: ${zabbix_agentd_config="%%ETCDIR%%/${name}.conf"}
+: ${zabbix_agentd_enable:=NO}
+: ${zabbix_agentd_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_agentd_pidfile:=/var/run/zabbix/zabbix_agentd.pid}
command="%%PREFIX%%/sbin/${name}"
required_files="${zabbix_agentd_config}"
-start_precmd="find_pidfile"
-status_precmd="find_pidfile"
-stop_precmd="find_pidfile"
-find_pidfile()
+start_precmd=zabbix_agentd_precmd
+status_precmd=zabbix_agentd_precmd
+stop_precmd=zabbix_agentd_precmd
+
+zabbix_agentd_precmd()
{
if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
pidfile="$_pidfile_from_conf"
else
- pidfile="/tmp/${name}.pid"
+ pidfile=${zabbix_agentd_pidfile}
+ local rundir=${zabbix_agentd_pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0755 -o zabbix -g zabbix $rundir
+ fi
fi
# This shouldn't be necessary with pidfile, but empirically it was the
@@ -47,6 +52,4 @@ find_pidfile()
rc_pid=$(check_pidfile ${pidfile} ${command})
}
-export PATH="${zabbix_agentd_paths}"
-
run_rc_command "$1"
diff --git a/net-mgmt/zabbix22-server/files/zabbix_proxy.in b/net-mgmt/zabbix22-server/files/zabbix_proxy.in
index 324e7ce31537..d990d2338bba 100644
--- a/net-mgmt/zabbix22-server/files/zabbix_proxy.in
+++ b/net-mgmt/zabbix22-server/files/zabbix_proxy.in
@@ -11,10 +11,10 @@
#
# zabbix_proxy_enable (bool): Set to NO by default. Set it to YES to
# enable zabbix_proxy.
-# zabbix_proxy_paths (string): Set to standard path by default. Set a search
-# if you have custom externals that need binaries elsewhere.
# zabbix_proxy_config (string): Set to the standard config file path by
# default.
+# zabbix_proxy_pidfile (string): Location of the zabbix_proxy pid file
+# Default is /var/run/zabbix/zabbix_proxy.pid
#
. /etc/rc.subr
@@ -24,22 +24,27 @@ rcvar=zabbix_proxy_enable
load_rc_config $name
-: ${zabbix_proxy_enable="NO"}
-: ${zabbix_proxy_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
-: ${zabbix_proxy_config="%%ETCDIR%%/${name}.conf"}
+: ${zabbix_proxy_enable:=NO}
+: ${zabbix_proxy_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_proxy_pidfile:=/var/run/zabbix/zabbix_proxy.pid}
command="%%PREFIX%%/sbin/${name}"
required_files="${zabbix_proxy_config}"
-start_precmd="find_pidfile"
-status_precmd="find_pidfile"
-stop_precmd="find_pidfile"
-find_pidfile()
+start_precmd=zabbix_proxy_precmd
+status_precmd=zabbix_proxy_precmd
+stop_precmd=zabbix_proxy_precmd
+
+zabbix_proxy_precmd()
{
- if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
+ if get_pidfile_from_conf PidFile ${zabbix_proxy_config}; then
pidfile="$_pidfile_from_conf"
else
- pidfile="/tmp/${name}.pid"
+ pidfile=${zabbix_proxy_pidfile}
+ local rundir=${zabbix_proxy_pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0755 -o zabbix -g zabbix $rundir
+ fi
fi
# This shouldn't be necessary with pidfile, but empirically it was the
@@ -49,6 +54,4 @@ find_pidfile()
rc_pid=$(check_pidfile ${pidfile} ${command})
}
-export PATH="${zabbix_proxy_paths}"
-
run_rc_command "$1"
diff --git a/net-mgmt/zabbix22-server/files/zabbix_server.in b/net-mgmt/zabbix22-server/files/zabbix_server.in
index 18908e708846..eb79cb37e8cb 100644
--- a/net-mgmt/zabbix22-server/files/zabbix_server.in
+++ b/net-mgmt/zabbix22-server/files/zabbix_server.in
@@ -11,10 +11,10 @@
#
# zabbix_server_enable (bool): Set to NO by default. Set it to YES to
# enable zabbix_server.
-# zabbix_server_paths (string): Set to standard path by default. Set a search
-# if you have custom externals that need binaries elsewhere.
# zabbix_server_config (string): Set to the standard config file path by
# default.
+# zabbix_server_pidfile (string): Location of the zabbix_server pid file
+# Default is /var/run/zabbix/zabbix_server.pid
#
. /etc/rc.subr
@@ -24,22 +24,27 @@ rcvar=zabbix_server_enable
load_rc_config $name
-: ${zabbix_server_enable="NO"}
-: ${zabbix_server_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
-: ${zabbix_server_config="%%ETCDIR%%/${name}.conf"}
+: ${zabbix_server_enable:=NO}
+: ${zabbix_server_config:=%%ETCDIR%%/${name}.conf}
+: ${zabbix_server_pidfile:=/var/run/zabbix/zabbix_server.pid}
command="%%PREFIX%%/sbin/${name}"
required_files="${zabbix_server_config}"
-start_precmd="find_pidfile"
-status_precmd="find_pidfile"
-stop_precmd="find_pidfile"
-find_pidfile()
+start_precmd=zabbix_server_precmd
+status_precmd=zabbix_server_precmd
+stop_precmd=zabbix_server_precmd
+
+zabbix_server_precmd()
{
- if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
+ if get_pidfile_from_conf PidFile ${zabbix_server_config}; then
pidfile="$_pidfile_from_conf"
else
- pidfile="/tmp/${name}.pid"
+ pidfile=${zabbix_server_pidfile}
+ local rundir=${zabbix_server_pidfile%/*}
+ if [ ! -d $rundir ] ; then
+ install -d -m 0755 -o zabbix -g zabbix $rundir
+ fi
fi
# This shouldn't be necessary with pidfile, but empirically it was the
@@ -49,6 +54,4 @@ find_pidfile()
rc_pid=$(check_pidfile ${pidfile} ${command})
}
-export PATH="${zabbix_server_paths}"
-
run_rc_command "$1"