View | Details | Raw Unified | Return to bug 209893 | Differences between
and this patch

Collapse All | Expand All

(-)zabbix3-server/Makefile (-15 / +28 lines)
Lines 1-8 Link Here
1
# Created by: Pakhom Golynga <pg@pakhom.spb.ru>
1
# Created by: Pakhom Golynga <pg@pakhom.spb.ru>
2
# $FreeBSD: head/net-mgmt/zabbix3-server/Makefile 416966 2016-06-16 13:23:13Z mat $
2
# $FreeBSD: head/net-mgmt/zabbix3-server/Makefile 414097 2016-04-27 10:44:40Z robak $
3
3
4
PORTNAME=	zabbix3
4
PORTNAME=	zabbix3
5
PORTVERSION=	3.0.2
5
PORTVERSION=	3.0.3
6
PORTREVISION?=	0
6
PORTREVISION?=	0
7
CATEGORIES=	net-mgmt
7
CATEGORIES=	net-mgmt
8
MASTER_SITES=	SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
8
MASTER_SITES=	SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
Lines 15-20 Link Here
15
LICENSE=	GPLv2
15
LICENSE=	GPLv2
16
16
17
CONFLICTS=	${PKGBASE}-1.[0-8]*
17
CONFLICTS=	${PKGBASE}-1.[0-8]*
18
LIB_DEPENDS=	libnetsnmp.so:net-mgmt/net-snmp
18
19
19
IGNORE_WITH_PHP=	52
20
IGNORE_WITH_PHP=	52
20
IGNORE_WITH_MYSQL=	41
21
IGNORE_WITH_MYSQL=	41
Lines 60-66 Link Here
60
			--with-iconv=${ICONV_PREFIX}
61
			--with-iconv=${ICONV_PREFIX}
61
62
62
.if ${ZABBIX_BUILD} != "agent"
63
.if ${ZABBIX_BUILD} != "agent"
63
LIB_DEPENDS=	libnetsnmp.so:net-mgmt/net-snmp
64
USES+=		execinfo
64
USES+=		execinfo
65
65
66
CPPFLAGS+=	${EXECINFO_CPPFLAGS}
66
CPPFLAGS+=	${EXECINFO_CPPFLAGS}
Lines 73-79 Link Here
73
OPTIONS_DEFINE=		IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW \
73
OPTIONS_DEFINE=		IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW \
74
			LIBXML2
74
			LIBXML2
75
75
76
OPTIONS_DEFAULT=	FPING JABBER CURL UNIXODBC MYSQL SSH OPENSSL
76
OPTIONS_DEFAULT=	IPV6 FPING JABBER CURL UNIXODBC MYSQL SSH OPENSSL
77
OPTIONS_SUB=		yes
77
OPTIONS_SUB=		yes
78
78
79
CURL_DESC=		Support for web monitoring
79
CURL_DESC=		Support for web monitoring
Lines 126-133 Link Here
126
UNIXODBC_CONFIGURE_WITH=unixodbc
126
UNIXODBC_CONFIGURE_WITH=unixodbc
127
UNIXODBC_LIB_DEPENDS=	libodbc.so:databases/unixODBC
127
UNIXODBC_LIB_DEPENDS=	libodbc.so:databases/unixODBC
128
.else
128
.else
129
OPTIONS_SINGLE=         SSL
129
OPTIONS_SINGLE=	SSL
130
OPTIONS_SINGLE_SSL=     OPENSSL GNUTLS POLARSSL
130
OPTIONS_SINGLE_SSL=	OPENSSL GNUTLS POLARSSL
131
.endif # if ${ZABBIX_BUILD} != "agent"
131
.endif # if ${ZABBIX_BUILD} != "agent"
132
132
133
IPV6_CONFIGURE_ENABLE=	ipv6
133
IPV6_CONFIGURE_ENABLE=	ipv6
Lines 141-159 Link Here
141
LIBXML2_CONFIGURE_WITH=	libxml2
141
LIBXML2_CONFIGURE_WITH=	libxml2
142
LIBXML2_LIB_DEPENDS=	libxml2.so:textproc/libxml2
142
LIBXML2_LIB_DEPENDS=	libxml2.so:textproc/libxml2
143
143
144
OPENSSL_CONFIGURE_WITH= openssl
144
OPENSSL_CONFIGURE_WITH=	openssl
145
OPENSSL_USE=            OPENSSL=yes
145
OPENSSL_USE=	OPENSSL=yes
146
146
147
GNUTLS_CONFIGURE_WITH=	gnutls
147
GNUTLS_CONFIGURE_WITH=	gnutls
148
GNUTLS_LIB_DEPENDS=     libgnutls.so:security/gnutls
148
GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
149
149
150
POLARSSL_CONFIGURE_WITH=mbedtls
150
POLARSSL_CONFIGURE_WITH=mbedtls
151
POLARSSL_LIB_DEPENDS=	libmbedtls.so:security/polarssl13
151
POLARSSL_LIB_DEPENDS=	libmbedtls.so:security/polarssl13
152
152
153
.include <bsd.port.pre.mk>
153
.include <bsd.port.options.mk>
154
154
155
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && ${SSL_DEFAULT} == base
155
.if ${PORT_OPTIONS:MOPENSSL} && ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && !defined(WITH_OPENSSL_PORT)
156
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.
156
IGNORE=	openSSL from the base system is too old, add WITH_OPENSSL_PORT to your /etc/make.conf and rebuild everything that needs SSL
157
.endif
157
.endif
158
158
159
post-patch:
159
post-patch:
Lines 162-167 Link Here
162
	@${REINPLACE_CMD} -e 's#/usr/sbin/fping#${LOCALBASE}/sbin/fping#g' \
162
	@${REINPLACE_CMD} -e 's#/usr/sbin/fping#${LOCALBASE}/sbin/fping#g' \
163
		${WRKSRC}/conf/zabbix_*.conf
163
		${WRKSRC}/conf/zabbix_*.conf
164
164
165
.if ${ZABBIX_BUILD} == "server"
166
	@${REINPLACE_CMD} -e 's#PidFile=/tmp/zabbix_server.pid#PidFile=/var/run/zabbix/zabbix_server.pid#g' \
167
		${WRKSRC}/conf/zabbix_server*.conf
168
.endif
169
170
.if ${ZABBIX_BUILD} == "proxy"
171
	@${REINPLACE_CMD} -e 's#PidFile=/tmp/zabbix_proxy.pid#PidFile=/var/run/zabbix/zabbix_proxy.pid#g' \
172
		${WRKSRC}/conf/zabbix_proxy*.conf
173
.endif
174
175
.if ${ZABBIX_BUILD} == "agent"
176
	@${REINPLACE_CMD} -e 's#PidFile=/tmp/zabbix_agentd.pid#PidFile=/var/run/zabbix/zabbix_agentd.pid#g' \
177
		${WRKSRC}/conf/zabbix_agentd*.conf
178
.endif
179
165
.if ${ZABBIX_BUILD} != "agent"
180
.if ${ZABBIX_BUILD} != "agent"
166
.  for d in mysql oracle postgresql sqlite3
181
.  for d in mysql oracle postgresql sqlite3
167
	@${REINPLACE_CMD} \
182
	@${REINPLACE_CMD} \
Lines 192-199 Link Here
192
		${COPYTREE_SHARE} "ibm_db2 mysql oracle postgresql sqlite3" \
207
		${COPYTREE_SHARE} "ibm_db2 mysql oracle postgresql sqlite3" \
193
		${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/database/)
208
		${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/database/)
194
.endif
209
.endif
195
.else # frontend
196
.include <bsd.port.pre.mk>
197
.endif
210
.endif
198
211
199
.include <bsd.port.post.mk>
212
.include <bsd.port.mk>
(-)zabbix3-server/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (zabbix-3.0.2.tar.gz) = e432fc86ea16956d52a9d8754b1b84456d11d96e1534fe1006f055a87208bff5
1
SHA256 (zabbix-3.0.3.tar.gz) = 1a42ce537580913268f1ece673208b49ca241fb067f8ea1ad497ce07455c10e0
2
SIZE (zabbix-3.0.2.tar.gz) = 15391497
2
SIZE (zabbix-3.0.3.tar.gz) = 15407273
(-)zabbix3-server/files/patch-src-zabbix_agent_zabbix_agentd.c (+11 lines)
Line 0 Link Here
1
--- src/zabbix_agent/zabbix_agentd.c.orig	2016-05-13 14:37:25.696606000 +0300
2
+++ src/zabbix_agent/zabbix_agentd.c	2016-05-13 14:49:45.011554761 +0300
3
@@ -521,7 +521,7 @@
4
 		CONFIG_LOAD_MODULE_PATH = zbx_strdup(CONFIG_LOAD_MODULE_PATH, LIBDIR "/modules");
5
 
6
 	if (NULL == CONFIG_PID_FILE)
7
-		CONFIG_PID_FILE = "/tmp/zabbix_agentd.pid";
8
+		CONFIG_PID_FILE = "/var/run/zabbix/zabbix_agentd.pid";
9
 #endif
10
 	if (NULL == CONFIG_LOG_TYPE_STR)
11
 		CONFIG_LOG_TYPE_STR = zbx_strdup(CONFIG_LOG_TYPE_STR, ZBX_OPTION_LOGTYPE_FILE);
(-)zabbix3-server/files/patch-src-zabbix_proxy_proxy.c (+11 lines)
Line 0 Link Here
1
--- src/zabbix_proxy/proxy.c.orig	2016-04-20 12:51:20.000000000 +0300
2
+++ src/zabbix_proxy/proxy.c	2016-05-13 14:46:44.193569184 +0300
3
@@ -389,7 +389,7 @@
4
 		CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
5
 
6
 	if (NULL == CONFIG_PID_FILE)
7
-		CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_proxy.pid");
8
+		CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_proxy.pid");
9
 
10
 	if (NULL == CONFIG_TMPDIR)
11
 		CONFIG_TMPDIR = zbx_strdup(CONFIG_TMPDIR, "/tmp");
(-)zabbix3-server/files/patch-src-zabbix_server_server.c (+11 lines)
Line 0 Link Here
1
--- src/zabbix_server/server.c.orig	2016-04-20 12:51:20.000000000 +0300
2
+++ src/zabbix_server/server.c	2016-05-13 14:20:17.603677788 +0300
3
@@ -369,7 +369,7 @@
4
 		CONFIG_SNMPTRAP_FILE = zbx_strdup(CONFIG_SNMPTRAP_FILE, "/tmp/zabbix_traps.tmp");
5
 
6
 	if (NULL == CONFIG_PID_FILE)
7
-		CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/tmp/zabbix_server.pid");
8
+		CONFIG_PID_FILE = zbx_strdup(CONFIG_PID_FILE, "/var/run/zabbix/zabbix_server.pid");
9
 
10
 	if (NULL == CONFIG_ALERT_SCRIPTS_PATH)
11
 		CONFIG_ALERT_SCRIPTS_PATH = zbx_strdup(CONFIG_ALERT_SCRIPTS_PATH, DATADIR "/zabbix/alertscripts");
(-)zabbix3-server/files/zabbix_agentd.in (-15 / +15 lines)
Lines 9-18 Link Here
9
#
9
#
10
# zabbix_agentd_enable (bool): Set to NO by default.  Set it to YES to
10
# zabbix_agentd_enable (bool): Set to NO by default.  Set it to YES to
11
#         enable zabbix_agentd.
11
#         enable zabbix_agentd.
12
# zabbix_agentd_paths (string): Set to standard path by default.  Set a search
13
#         if you have custom userparams that need binaries elsewhere.
14
# zabbix_agentd_config (string): Set to the standard config file path by
12
# zabbix_agentd_config (string): Set to the standard config file path by
15
#         default.
13
#         default.
14
# zabbix_agentd_pidfile (string):    Location of the asterisk pid file
15
#                               Default is /var/run/zabbix/zabbix_agentd.pid
16
#
16
#
17
17
18
. /etc/rc.subr
18
. /etc/rc.subr
Lines 20-46 Link Here
20
name="zabbix_agentd"
20
name="zabbix_agentd"
21
rcvar=zabbix_agentd_enable
21
rcvar=zabbix_agentd_enable
22
22
23
command="%%PREFIX%%/sbin/${name}"
24
required_files="%%ETCDIR%%/${name}.conf"
25
26
load_rc_config $name
23
load_rc_config $name
27
24
28
: ${zabbix_agentd_enable="NO"}
25
: ${zabbix_agentd_enable:=NO}
29
: ${zabbix_agentd_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
26
: ${zabbix_agentd_config:=%%ETCDIR%%/${name}.conf}
30
: ${zabbix_agentd_config="%%ETCDIR%%/${name}.conf"}
27
: ${zabbix_agentd_pidfile:=/var/run/zabbix/zabbix_agentd.pid}
31
28
32
command="%%PREFIX%%/sbin/${name}"
29
command="%%PREFIX%%/sbin/${name}"
33
required_files="${zabbix_agentd_config}"
30
required_files="${zabbix_agentd_config}"
34
start_precmd="find_pidfile"
35
status_precmd="find_pidfile"
36
stop_precmd="find_pidfile"
37
31
38
find_pidfile()
32
start_precmd=zabbix_agentd_precmd 
33
status_precmd=zabbix_agentd_precmd
34
stop_precmd=zabbix_agentd_precmd
35
36
zabbix_agentd_precmd()
39
{
37
{
40
	if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
38
	if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
41
		pidfile="$_pidfile_from_conf"
39
		pidfile="$_pidfile_from_conf"
42
	else
40
	else
43
		pidfile="/tmp/${name}.pid"
41
		pidfile=${zabbix_agentd_pidfile}
42
		local rundir=${zabbix_agentd_pidfile%/*}
43
		if [ ! -d $rundir ] ; then
44
			install -d -m 0755 -o zabbix -g zabbix $rundir
45
		fi
44
	fi
46
	fi
45
47
46
	# This shouldn't be necessary with pidfile, but empirically it was the
48
	# This shouldn't be necessary with pidfile, but empirically it was the
Lines 50-55 Link Here
50
	rc_pid=$(check_pidfile ${pidfile} ${command})
52
	rc_pid=$(check_pidfile ${pidfile} ${command})
51
}
53
}
52
54
53
export PATH="${zabbix_agentd_paths}"
54
55
run_rc_command "$1"
55
run_rc_command "$1"
(-)zabbix3-server/files/zabbix_proxy.in (-13 / +15 lines)
Lines 11-20 Link Here
11
#
11
#
12
# zabbix_proxy_enable (bool): Set to NO by default.  Set it to YES to
12
# zabbix_proxy_enable (bool): Set to NO by default.  Set it to YES to
13
#         enable zabbix_proxy.
13
#         enable zabbix_proxy.
14
# zabbix_proxy_paths (string): Set to standard path by default.  Set a search
15
#         if you have custom externals that need binaries elsewhere.
16
# zabbix_proxy_config (string): Set to the standard config file path by
14
# zabbix_proxy_config (string): Set to the standard config file path by
17
#         default.
15
#         default.
16
# zabbix_proxy_pidfile (string):    Location of the asterisk pid file
17
#                               Default is /var/run/zabbix/zabbix_proxy.pid
18
#
18
#
19
19
20
. /etc/rc.subr
20
. /etc/rc.subr
Lines 24-46 Link Here
24
24
25
load_rc_config $name
25
load_rc_config $name
26
26
27
: ${zabbix_proxy_enable="NO"}
27
: ${zabbix_proxy_enable:=NO}
28
: ${zabbix_proxy_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
28
: ${zabbix_proxy_config:=%%ETCDIR%%/${name}.conf}
29
: ${zabbix_proxy_config="%%ETCDIR%%/${name}.conf"}
29
: ${zabbix_proxy_pidfile:=/var/run/zabbix/zabbix_proxy.pid}
30
30
31
command="%%PREFIX%%/sbin/${name}"
31
command="%%PREFIX%%/sbin/${name}"
32
required_files="${zabbix_proxy_config}"
32
required_files="${zabbix_proxy_config}"
33
start_precmd="find_pidfile"
34
status_precmd="find_pidfile"
35
stop_precmd="find_pidfile"
36
33
34
start_precmd=zabbix_proxy_precmd 
35
status_precmd=zabbix_proxy_precmd
36
stop_precmd=zabbix_proxy_precmd
37
37
38
find_pidfile()
38
zabbix_proxy_precmd()
39
{
39
{
40
	if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
40
	if get_pidfile_from_conf PidFile ${zabbix_proxy_config}; then
41
		pidfile="$_pidfile_from_conf"
41
		pidfile="$_pidfile_from_conf"
42
	else
42
	else
43
		pidfile="/tmp/${name}.pid"
43
		pidfile=${zabbix_proxy_pidfile}
44
		local rundir=${zabbix_proxy_pidfile%/*}
45
		if [ ! -d $rundir ] ; then
46
			install -d -m 0755 -o zabbix -g zabbix $rundir
47
		fi
44
	fi
48
	fi
45
49
46
	# This shouldn't be necessary with pidfile, but empirically it was the
50
	# This shouldn't be necessary with pidfile, but empirically it was the
Lines 50-55 Link Here
50
	rc_pid=$(check_pidfile ${pidfile} ${command})
54
	rc_pid=$(check_pidfile ${pidfile} ${command})
51
}
55
}
52
56
53
export PATH="${zabbix_proxy_paths}"
54
55
run_rc_command "$1"
57
run_rc_command "$1"
(-)zabbix3-server/files/zabbix_server.in (-12 / +15 lines)
Lines 11-20 Link Here
11
#
11
#
12
# zabbix_server_enable (bool): Set to NO by default.  Set it to YES to
12
# zabbix_server_enable (bool): Set to NO by default.  Set it to YES to
13
#         enable zabbix_server.
13
#         enable zabbix_server.
14
# zabbix_server_paths (string): Set to standard path by default.  Set a search
15
#         if you have custom externals that need binaries elsewhere.
16
# zabbix_server_config (string): Set to the standard config file path by
14
# zabbix_server_config (string): Set to the standard config file path by
17
#         default.
15
#         default.
16
# zabbix_server_pidfile (string):    Location of the asterisk pid file
17
#                               Default is /var/run/zabbix/zabbix_server.pid
18
#
18
#
19
19
20
. /etc/rc.subr
20
. /etc/rc.subr
Lines 24-45 Link Here
24
24
25
load_rc_config $name
25
load_rc_config $name
26
26
27
: ${zabbix_server_enable="NO"}
27
: ${zabbix_server_enable:=NO}
28
: ${zabbix_server_paths=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin}
28
: ${zabbix_server_config:=%%ETCDIR%%/${name}.conf}
29
: ${zabbix_server_config="%%ETCDIR%%/${name}.conf"}
29
: ${zabbix_server_pidfile:=/var/run/zabbix/zabbix_server.pid}
30
30
31
command="%%PREFIX%%/sbin/${name}"
31
command="%%PREFIX%%/sbin/${name}"
32
required_files="${zabbix_server_config}"
32
required_files="${zabbix_server_config}"
33
start_precmd="find_pidfile"
34
status_precmd="find_pidfile"
35
stop_precmd="find_pidfile"
36
33
37
find_pidfile()
34
start_precmd=zabbix_server_precmd 
35
status_precmd=zabbix_server_precmd
36
stop_precmd=zabbix_server_precmd
37
38
zabbix_server_precmd()
38
{
39
{
39
	if get_pidfile_from_conf PidFile ${zabbix_server_config}; then
40
	if get_pidfile_from_conf PidFile ${zabbix_server_config}; then
40
		pidfile="$_pidfile_from_conf"
41
		pidfile="$_pidfile_from_conf"
41
	else
42
	else
42
		pidfile="/tmp/${name}.pid"
43
		pidfile=${zabbix_server_pidfile}
44
		local rundir=${zabbix_server_pidfile%/*}
45
		if [ ! -d $rundir ] ; then
46
			install -d -m 0755 -o zabbix -g zabbix $rundir
47
		fi
43
	fi
48
	fi
44
49
45
	# This shouldn't be necessary with pidfile, but empirically it was the
50
	# This shouldn't be necessary with pidfile, but empirically it was the
Lines 49-54 Link Here
49
	rc_pid=$(check_pidfile ${pidfile} ${command})
54
	rc_pid=$(check_pidfile ${pidfile} ${command})
50
}
55
}
51
56
52
export PATH="${zabbix_server_paths}"
53
54
run_rc_command "$1"
57
run_rc_command "$1"
(-)zabbix3-server/pkg-plist.frontend (+1 lines)
Lines 397-402 Link Here
397
%%WWWDIR%%/include/classes/screens/CScreenTriggersInfo.php
397
%%WWWDIR%%/include/classes/screens/CScreenTriggersInfo.php
398
%%WWWDIR%%/include/classes/screens/CScreenTriggersOverview.php
398
%%WWWDIR%%/include/classes/screens/CScreenTriggersOverview.php
399
%%WWWDIR%%/include/classes/screens/CScreenUrl.php
399
%%WWWDIR%%/include/classes/screens/CScreenUrl.php
400
%%WWWDIR%%/include/classes/screens/CScreenDiscovery.php
400
%%WWWDIR%%/include/classes/server/CZabbixServer.php
401
%%WWWDIR%%/include/classes/server/CZabbixServer.php
401
%%WWWDIR%%/include/classes/services/CServicesSlaCalculator.php
402
%%WWWDIR%%/include/classes/services/CServicesSlaCalculator.php
402
%%WWWDIR%%/include/classes/setup/CFrontendSetup.php
403
%%WWWDIR%%/include/classes/setup/CFrontendSetup.php

Return to bug 209893