diff -uNr zabbix3-server.orig/Makefile zabbix3-server/Makefile --- zabbix3-server.orig/Makefile 2016-06-18 11:53:59.420084277 +0300 +++ zabbix3-server/Makefile 2016-06-18 11:45:14.279113731 +0300 @@ -1,8 +1,8 @@ # Created by: Pakhom Golynga -# $FreeBSD: head/net-mgmt/zabbix3-server/Makefile 416966 2016-06-16 13:23:13Z mat $ +# $FreeBSD: head/net-mgmt/zabbix3-server/Makefile 414097 2016-04-27 10:44:40Z robak $ PORTNAME= zabbix3 -PORTVERSION= 3.0.2 +PORTVERSION= 3.0.3 PORTREVISION?= 0 CATEGORIES= net-mgmt MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION} @@ -15,6 +15,7 @@ LICENSE= GPLv2 CONFLICTS= ${PKGBASE}-1.[0-8]* +LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp IGNORE_WITH_PHP= 52 IGNORE_WITH_MYSQL= 41 @@ -60,7 +61,6 @@ --with-iconv=${ICONV_PREFIX} .if ${ZABBIX_BUILD} != "agent" -LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp USES+= execinfo CPPFLAGS+= ${EXECINFO_CPPFLAGS} @@ -73,7 +73,7 @@ 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 JABBER CURL UNIXODBC MYSQL SSH OPENSSL OPTIONS_SUB= yes CURL_DESC= Support for web monitoring @@ -126,8 +126,8 @@ 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,19 +141,19 @@ LIBXML2_CONFIGURE_WITH= libxml2 LIBXML2_LIB_DEPENDS= libxml2.so:textproc/libxml2 -OPENSSL_CONFIGURE_WITH= openssl -OPENSSL_USE= OPENSSL=yes +OPENSSL_CONFIGURE_WITH= openssl +OPENSSL_USE= OPENSSL=yes 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 -.include +.include -.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && ${SSL_DEFAULT} == base -IGNORE= OpenSSL from the base system is too old, add DEFAULT_VERSIONS+=ssl=openssl to your /etc/make.conf and rebuild everything that needs SSL. +.if ${PORT_OPTIONS:MOPENSSL} && ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && !defined(WITH_OPENSSL_PORT) +IGNORE= openSSL from the base system is too old, add WITH_OPENSSL_PORT to your /etc/make.conf and rebuild everything that needs SSL .endif post-patch: @@ -162,6 +162,21 @@ @${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} \ @@ -192,8 +207,6 @@ ${COPYTREE_SHARE} "ibm_db2 mysql oracle postgresql sqlite3" \ ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/database/) .endif -.else # frontend -.include .endif -.include +.include diff -uNr zabbix3-server.orig/distinfo zabbix3-server/distinfo --- zabbix3-server.orig/distinfo 2016-05-13 15:22:54.898419297 +0300 +++ zabbix3-server/distinfo 2016-06-18 11:37:00.991146575 +0300 @@ -1,2 +1,2 @@ -SHA256 (zabbix-3.0.2.tar.gz) = e432fc86ea16956d52a9d8754b1b84456d11d96e1534fe1006f055a87208bff5 -SIZE (zabbix-3.0.2.tar.gz) = 15391497 +SHA256 (zabbix-3.0.3.tar.gz) = 1a42ce537580913268f1ece673208b49ca241fb067f8ea1ad497ce07455c10e0 +SIZE (zabbix-3.0.3.tar.gz) = 15407273 diff -uNr zabbix3-server.orig/files/patch-src-zabbix_agent_zabbix_agentd.c zabbix3-server/files/patch-src-zabbix_agent_zabbix_agentd.c --- zabbix3-server.orig/files/patch-src-zabbix_agent_zabbix_agentd.c 1970-01-01 03:00:00.000000000 +0300 +++ zabbix3-server/files/patch-src-zabbix_agent_zabbix_agentd.c 2016-05-13 14:51:12.786550000 +0300 @@ -0,0 +1,11 @@ +--- src/zabbix_agent/zabbix_agentd.c.orig 2016-05-13 14:37:25.696606000 +0300 ++++ src/zabbix_agent/zabbix_agentd.c 2016-05-13 14:49:45.011554761 +0300 +@@ -521,7 +521,7 @@ + CONFIG_LOAD_MODULE_PATH = zbx_strdup(CONFIG_LOAD_MODULE_PATH, LIBDIR "/modules"); + + if (NULL == CONFIG_PID_FILE) +- CONFIG_PID_FILE = "/tmp/zabbix_agentd.pid"; ++ CONFIG_PID_FILE = "/var/run/zabbix/zabbix_agentd.pid"; + #endif + if (NULL == CONFIG_LOG_TYPE_STR) + CONFIG_LOG_TYPE_STR = zbx_strdup(CONFIG_LOG_TYPE_STR, ZBX_OPTION_LOGTYPE_FILE); diff -uNr zabbix3-server.orig/files/patch-src-zabbix_proxy_proxy.c zabbix3-server/files/patch-src-zabbix_proxy_proxy.c --- zabbix3-server.orig/files/patch-src-zabbix_proxy_proxy.c 1970-01-01 03:00:00.000000000 +0300 +++ zabbix3-server/files/patch-src-zabbix_proxy_proxy.c 2016-05-13 14:47:29.182567000 +0300 @@ -0,0 +1,11 @@ +--- src/zabbix_proxy/proxy.c.orig 2016-04-20 12:51:20.000000000 +0300 ++++ src/zabbix_proxy/proxy.c 2016-05-13 14:46:44.193569184 +0300 +@@ -389,7 +389,7 @@ + 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 -uNr zabbix3-server.orig/files/patch-src-zabbix_server_server.c zabbix3-server/files/patch-src-zabbix_server_server.c --- zabbix3-server.orig/files/patch-src-zabbix_server_server.c 1970-01-01 03:00:00.000000000 +0300 +++ zabbix3-server/files/patch-src-zabbix_server_server.c 2016-05-13 14:28:09.669645000 +0300 @@ -0,0 +1,11 @@ +--- src/zabbix_server/server.c.orig 2016-04-20 12:51:20.000000000 +0300 ++++ src/zabbix_server/server.c 2016-05-13 14:20:17.603677788 +0300 +@@ -369,7 +369,7 @@ + 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 -uNr zabbix3-server.orig/files/zabbix_agentd.in zabbix3-server/files/zabbix_agentd.in --- zabbix3-server.orig/files/zabbix_agentd.in 2016-05-13 15:22:54.871419012 +0300 +++ zabbix3-server/files/zabbix_agentd.in 2016-05-13 15:05:56.061488000 +0300 @@ -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 asterisk 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 @@ rc_pid=$(check_pidfile ${pidfile} ${command}) } -export PATH="${zabbix_agentd_paths}" - run_rc_command "$1" diff -uNr zabbix3-server.orig/files/zabbix_proxy.in zabbix3-server/files/zabbix_proxy.in --- zabbix3-server.orig/files/zabbix_proxy.in 2016-05-13 15:22:54.868419807 +0300 +++ zabbix3-server/files/zabbix_proxy.in 2016-05-13 14:44:17.197578000 +0300 @@ -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 asterisk pid file +# Default is /var/run/zabbix/zabbix_proxy.pid # . /etc/rc.subr @@ -24,23 +24,27 @@ 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 @@ rc_pid=$(check_pidfile ${pidfile} ${command}) } -export PATH="${zabbix_proxy_paths}" - run_rc_command "$1" diff -uNr zabbix3-server.orig/files/zabbix_server.in zabbix3-server/files/zabbix_server.in --- zabbix3-server.orig/files/zabbix_server.in 2016-05-13 15:22:54.876419455 +0300 +++ zabbix3-server/files/zabbix_server.in 2016-05-13 14:26:40.145651000 +0300 @@ -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 asterisk pid file +# Default is /var/run/zabbix/zabbix_server.pid # . /etc/rc.subr @@ -24,22 +24,27 @@ 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 @@ rc_pid=$(check_pidfile ${pidfile} ${command}) } -export PATH="${zabbix_server_paths}" - run_rc_command "$1" diff -uNr zabbix3-server.orig/pkg-plist.frontend zabbix3-server/pkg-plist.frontend --- zabbix3-server.orig/pkg-plist.frontend 2016-05-13 15:22:54.887418872 +0300 +++ zabbix3-server/pkg-plist.frontend 2016-06-18 11:52:32.917084000 +0300 @@ -397,6 +397,7 @@ %%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/server/CZabbixServer.php %%WWWDIR%%/include/classes/services/CServicesSlaCalculator.php %%WWWDIR%%/include/classes/setup/CFrontendSetup.php