From owner-svn-ports-head@freebsd.org Fri Sep 16 19:10:50 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2A6CBDDAF3; Fri, 16 Sep 2016 19:10:50 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1389ED6; Fri, 16 Sep 2016 19:10:50 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8GJAnC0065269; Fri, 16 Sep 2016 19:10:49 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8GJAnCt065262; Fri, 16 Sep 2016 19:10:49 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201609161910.u8GJAnCt065262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Fri, 16 Sep 2016 19:10:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r422263 - in head/net-mgmt: zabbix3-frontend zabbix3-server zabbix3-server/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 19:10:50 -0000 Author: pi Date: Fri Sep 16 19:10:49 2016 New Revision: 422263 URL: https://svnweb.freebsd.org/changeset/ports/422263 Log: 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 (maintainer) Modified: head/net-mgmt/zabbix3-frontend/Makefile head/net-mgmt/zabbix3-server/Makefile head/net-mgmt/zabbix3-server/distinfo head/net-mgmt/zabbix3-server/files/zabbix_agentd.in head/net-mgmt/zabbix3-server/files/zabbix_proxy.in head/net-mgmt/zabbix3-server/files/zabbix_server.in head/net-mgmt/zabbix3-server/pkg-plist.frontend Modified: head/net-mgmt/zabbix3-frontend/Makefile ============================================================================== --- head/net-mgmt/zabbix3-frontend/Makefile Fri Sep 16 18:48:04 2016 (r422262) +++ head/net-mgmt/zabbix3-frontend/Makefile Fri Sep 16 19:10:49 2016 (r422263) @@ -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 @@ -40,7 +46,7 @@ USE_PHP+= sqlite3 .if ${PORT_OPTIONS:MORACLE} ZABBIX_REQUIRE= -CONFIGURE_ARGS+= --with-oracle +CONFIGURE_ARGS+= --with-oracle .endif do-install: Modified: head/net-mgmt/zabbix3-server/Makefile ============================================================================== --- head/net-mgmt/zabbix3-server/Makefile Fri Sep 16 18:48:04 2016 (r422262) +++ head/net-mgmt/zabbix3-server/Makefile Fri Sep 16 19:10:49 2016 (r422263) @@ -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 di 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 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 .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} \ Modified: head/net-mgmt/zabbix3-server/distinfo ============================================================================== --- head/net-mgmt/zabbix3-server/distinfo Fri Sep 16 18:48:04 2016 (r422262) +++ head/net-mgmt/zabbix3-server/distinfo Fri Sep 16 19:10:49 2016 (r422263) @@ -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 Modified: head/net-mgmt/zabbix3-server/files/zabbix_agentd.in ============================================================================== --- head/net-mgmt/zabbix3-server/files/zabbix_agentd.in Fri Sep 16 18:48:04 2016 (r422262) +++ head/net-mgmt/zabbix3-server/files/zabbix_agentd.in Fri Sep 16 19:10:49 2016 (r422263) @@ -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" Modified: head/net-mgmt/zabbix3-server/files/zabbix_proxy.in ============================================================================== --- head/net-mgmt/zabbix3-server/files/zabbix_proxy.in Fri Sep 16 18:48:04 2016 (r422262) +++ head/net-mgmt/zabbix3-server/files/zabbix_proxy.in Fri Sep 16 19:10:49 2016 (r422263) @@ -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" Modified: head/net-mgmt/zabbix3-server/files/zabbix_server.in ============================================================================== --- head/net-mgmt/zabbix3-server/files/zabbix_server.in Fri Sep 16 18:48:04 2016 (r422262) +++ head/net-mgmt/zabbix3-server/files/zabbix_server.in Fri Sep 16 19:10:49 2016 (r422263) @@ -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" Modified: head/net-mgmt/zabbix3-server/pkg-plist.frontend ============================================================================== --- head/net-mgmt/zabbix3-server/pkg-plist.frontend Fri Sep 16 18:48:04 2016 (r422262) +++ head/net-mgmt/zabbix3-server/pkg-plist.frontend Fri Sep 16 19:10:49 2016 (r422263) @@ -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