aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2016-09-17 03:10:49 +0800
committerpi <pi@FreeBSD.org>2016-09-17 03:10:49 +0800
commit3aa0f31ac01396a036af8d5ced6e82fe3fe33b98 (patch)
tree5a05cba3fa629d420b1a79cb0171a9a190fe0d94 /net-mgmt
parent431c0725bfeb2c10096ee07700d129a31bb6cb48 (diff)
downloadfreebsd-ports-gnome-3aa0f31ac01396a036af8d5ced6e82fe3fe33b98.tar.gz
freebsd-ports-gnome-3aa0f31ac01396a036af8d5ced6e82fe3fe33b98.tar.zst
freebsd-ports-gnome-3aa0f31ac01396a036af8d5ced6e82fe3fe33b98.zip
net-mgmt/zabbix3-{server|agent|proxy|frontend}: update to 3.0.4 and many fixes
- Fix default path to PID - Fix rc.d scripts to correct use PID file - Fix some error in the Makefile - Fix OPENSSL_USE -> USES=ssl - Fix WANT_PHP_WEB -> USES=php:web - Fix MYSQL_USE -> USES+= mysql - Fix PGSQL_USES -> USES+= pgsql - Fix SQLITE_USES -> USES+= sqlite - Change default options for -server and -frontend - Fix CONFLICTS - fixed SQL injection vulnerability in "Latest data" page; thanks to 1N3 at Early Warning Services, LLC PR: 209893 MFH: 2016Q3 Security: https://support.zabbix.com/browse/ZBX-11023 Changes: http://www.zabbix.com/rn3.0.4.php Submitted by: Pakhom Golynga <pg@pakhom.spb.ru> (maintainer)
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/zabbix3-frontend/Makefile12
-rw-r--r--net-mgmt/zabbix3-server/Makefile46
-rw-r--r--net-mgmt/zabbix3-server/distinfo5
-rw-r--r--net-mgmt/zabbix3-server/files/zabbix_agentd.in30
-rw-r--r--net-mgmt/zabbix3-server/files/zabbix_proxy.in28
-rw-r--r--net-mgmt/zabbix3-server/files/zabbix_server.in27
-rw-r--r--net-mgmt/zabbix3-server/pkg-plist.frontend2
7 files changed, 88 insertions, 62 deletions
diff --git a/net-mgmt/zabbix3-frontend/Makefile b/net-mgmt/zabbix3-frontend/Makefile
index 43e56268eb36..ecf59b8bcf9a 100644
--- a/net-mgmt/zabbix3-frontend/Makefile
+++ b/net-mgmt/zabbix3-frontend/Makefile
@@ -5,6 +5,11 @@ PORTNAME= zabbix3
CATEGORIES= net-mgmt
PKGNAMESUFFIX= -frontend
+MAINTAINER= pg@pakhom.spb.ru
+COMMENT= Enterprise-class open source distributed monitoring (${PKGNAMESUFFIX:S/^-//}) LTS
+
+LICENSE= GPLv2
+
MASTERDIR= ${.CURDIR}/../zabbix3-server
NO_BUILD= yes
@@ -14,10 +19,11 @@ PLIST= ${PKGDIR}/pkg-plist.frontend
USE_PHP= bcmath ctype gd pcre snmp sockets mbstring session dom xml \
xmlreader xmlwriter simplexml gettext ldap
-WANT_PHP_WEB= yes
+
+USES= php:web gettext
OPTIONS_DEFINE= MYSQL MYSQLI PGSQL SQLITE ORACLE
-OPTIONS_DEFAULT= MYSQL MYSQLI
+OPTIONS_DEFAULT= MYSQLI
MYSQLI_DESC= MySQLI backend
.include <bsd.port.options.mk>
@@ -40,7 +46,7 @@ USE_PHP+= sqlite3
.if ${PORT_OPTIONS:MORACLE}
ZABBIX_REQUIRE=
-CONFIGURE_ARGS+= --with-oracle
+CONFIGURE_ARGS+= --with-oracle
.endif
do-install:
diff --git a/net-mgmt/zabbix3-server/Makefile b/net-mgmt/zabbix3-server/Makefile
index 3199302b6ac4..e6773872d2fa 100644
--- a/net-mgmt/zabbix3-server/Makefile
+++ b/net-mgmt/zabbix3-server/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= zabbix3
-PORTVERSION= 3.0.2
+PORTVERSION= 3.0.4
PORTREVISION?= 0
CATEGORIES= net-mgmt
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
@@ -14,15 +14,13 @@ COMMENT= Enterprise-class open source distributed monitoring (${PKGNAMESUFFIX:S/
LICENSE= GPLv2
-CONFLICTS= ${PKGBASE}-1.[0-8]*
+LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
+
+CONFLICTS= zabbix2${PKGNAMESUFFIX}-[0-9]* zabbix22${PKGNAMESUFFIX}[0-9]* zabbix24${PKGNAMESUFFIX}-[0-9]*
IGNORE_WITH_PHP= 52
IGNORE_WITH_MYSQL= 41
-.if ${PKGNAMESUFFIX} != "-agent"
-CONFLICTS+= ${PORTNAME}-1.[0-8]*
-.endif
-
ZABBIX_BUILD= ${PKGNAMESUFFIX:S/^-//}
.if ${ZABBIX_BUILD} != "frontend" # frontend only needs the version/distribution settings
@@ -60,7 +58,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}
@@ -73,7 +70,7 @@ CONFIGURE_ARGS+= --with-net-snmp
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW \
LIBXML2
-OPTIONS_DEFAULT= FPING JABBER CURL UNIXODBC MYSQL SSH OPENSSL
+OPTIONS_DEFAULT= IPV6 FPING CURL UNIXODBC MYSQL OPENSSL
OPTIONS_SUB= yes
CURL_DESC= Support for web monitoring
@@ -93,13 +90,13 @@ OPTIONS_SINGLE_ODBC= IODBC UNIXODBC
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS POLARSSL
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
@@ -126,8 +123,8 @@ IODBC_LIB_DEPENDS= libiodbc.so:databases/libiodbc
UNIXODBC_CONFIGURE_WITH=unixodbc
UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
.else
-OPTIONS_SINGLE= SSL
-OPTIONS_SINGLE_SSL= OPENSSL GNUTLS POLARSSL
+OPTIONS_SINGLE= SSL
+OPTIONS_SINGLE_SSL= OPENSSL GNUTLS POLARSSL
.endif # if ${ZABBIX_BUILD} != "agent"
IPV6_CONFIGURE_ENABLE= ipv6
@@ -141,11 +138,11 @@ JAVAGW_USE= JAVA=yes
LIBXML2_CONFIGURE_WITH= libxml2
LIBXML2_LIB_DEPENDS= libxml2.so:textproc/libxml2
-OPENSSL_CONFIGURE_WITH= openssl
-OPENSSL_USE= OPENSSL=yes
+OPENSSL_CONFIGURE_WITH= openssl
+OPENSSL_USES= ssl
GNUTLS_CONFIGURE_WITH= gnutls
-GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
+GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
POLARSSL_CONFIGURE_WITH=mbedtls
POLARSSL_LIB_DEPENDS= libmbedtls.so:security/polarssl13
@@ -157,7 +154,7 @@ IGNORE_FreeBSD_9= Requires newer OpenSSL (set SSL_DEFAULT=openssl)
.endif
.if ${SSL_DEFAULT:Mlibressl*}
-IGNORE= Requires PSK which is unsupported by the selected LibreSSL
+IGNORE= requires PSK which is unsupported by the selected LibreSSL
.endif
post-patch:
@@ -166,6 +163,21 @@ post-patch:
@${REINPLACE_CMD} -e 's#/usr/sbin/fping#${LOCALBASE}/sbin/fping#g' \
${WRKSRC}/conf/zabbix_*.conf
+.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"
. for d in mysql oracle postgresql sqlite3
@${REINPLACE_CMD} \
diff --git a/net-mgmt/zabbix3-server/distinfo b/net-mgmt/zabbix3-server/distinfo
index 6b8e4add1467..e8c431482304 100644
--- a/net-mgmt/zabbix3-server/distinfo
+++ b/net-mgmt/zabbix3-server/distinfo
@@ -1,2 +1,3 @@
-SHA256 (zabbix-3.0.2.tar.gz) = e432fc86ea16956d52a9d8754b1b84456d11d96e1534fe1006f055a87208bff5
-SIZE (zabbix-3.0.2.tar.gz) = 15391497
+TIMESTAMP = 1474053011
+SHA256 (zabbix-3.0.4.tar.gz) = 9fa47d97843b6ca9f550d706b40ee6b35b76c5165ff32ff11ef0474f161e7700
+SIZE (zabbix-3.0.4.tar.gz) = 15403727
diff --git a/net-mgmt/zabbix3-server/files/zabbix_agentd.in b/net-mgmt/zabbix3-server/files/zabbix_agentd.in
index 7bc9982dd549..12dff564ac47 100644
--- a/net-mgmt/zabbix3-server/files/zabbix_agentd.in
+++ b/net-mgmt/zabbix3-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_agent pid file
+# Default is /var/run/zabbix/zabbix_agentd.pid
#
. /etc/rc.subr
@@ -20,27 +20,29 @@
name="zabbix_agentd"
rcvar=zabbix_agentd_enable
-command="%%PREFIX%%/sbin/${name}"
-required_files="%%ETCDIR%%/${name}.conf"
-
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
@@ -50,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/zabbix3-server/files/zabbix_proxy.in b/net-mgmt/zabbix3-server/files/zabbix_proxy.in
index 48bd69d0ddc6..d990d2338bba 100644
--- a/net-mgmt/zabbix3-server/files/zabbix_proxy.in
+++ b/net-mgmt/zabbix3-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,23 +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"
+start_precmd=zabbix_proxy_precmd
+status_precmd=zabbix_proxy_precmd
+stop_precmd=zabbix_proxy_precmd
-find_pidfile()
+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
@@ -50,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/zabbix3-server/files/zabbix_server.in b/net-mgmt/zabbix3-server/files/zabbix_server.in
index 5846853c734a..eb79cb37e8cb 100644
--- a/net-mgmt/zabbix3-server/files/zabbix_server.in
+++ b/net-mgmt/zabbix3-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_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"
diff --git a/net-mgmt/zabbix3-server/pkg-plist.frontend b/net-mgmt/zabbix3-server/pkg-plist.frontend
index 2e3ab2f84d1a..e4900e267afd 100644
--- a/net-mgmt/zabbix3-server/pkg-plist.frontend
+++ b/net-mgmt/zabbix3-server/pkg-plist.frontend
@@ -397,6 +397,8 @@
%%WWWDIR%%/include/classes/screens/CScreenTriggersInfo.php
%%WWWDIR%%/include/classes/screens/CScreenTriggersOverview.php
%%WWWDIR%%/include/classes/screens/CScreenUrl.php
+%%WWWDIR%%/include/classes/screens/CScreenDiscovery.php
+%%WWWDIR%%/include/classes/screens/CScreenHttpTest.php
%%WWWDIR%%/include/classes/server/CZabbixServer.php
%%WWWDIR%%/include/classes/services/CServicesSlaCalculator.php
%%WWWDIR%%/include/classes/setup/CFrontendSetup.php