1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-19 08:13:21 +00:00

Add Zabbix Java Gateway ports

This update separates Java Gateway componentes from the Zabbix Server port,
creating an additional slave port for each version.

This way is possible to deploy a Java Gateway without the need to install
Zabbix Server components.

In the current state there wasn't an rcfile for the Java Gateway. [1]

PR:		217777
Reported by:	Juan Garcia <juan@ish.com.au> [1]
Approved by:	Pakhom Golynga <pg@pakhom.spb.ru> (maintainer)
This commit is contained in:
Danilo G. Baio 2018-08-04 12:37:18 +00:00
parent 81e9c78c7e
commit a895a93def
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=476352
27 changed files with 339 additions and 106 deletions

View File

@ -5,6 +5,18 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20180804:
AFFECTS: net-mgmt/zabbix*-server
AUTHOR: dbaio@FreeBSD.org
The JAVAGW option was removed from the Zabbix Server and an additional slave
port was created, zabbix*-java, it installs only Zabbix Java Gateway files,
this way is possible to deploy a Zabbix Java Gateway without the need to
install Zabbix Server components.
If you are using the JAVAGW option on Zabbix Server, please, install now the
new zabbix*-java port.
20180803
AFFECTS: users of net/openntpd
AUTHOR: naddy@FreeBSD.org

View File

@ -399,22 +399,27 @@
SUBDIR += yaf
SUBDIR += zabbix2-agent
SUBDIR += zabbix2-frontend
SUBDIR += zabbix2-java
SUBDIR += zabbix2-proxy
SUBDIR += zabbix2-server
SUBDIR += zabbix22-agent
SUBDIR += zabbix22-frontend
SUBDIR += zabbix22-java
SUBDIR += zabbix22-proxy
SUBDIR += zabbix22-server
SUBDIR += zabbix3-agent
SUBDIR += zabbix3-frontend
SUBDIR += zabbix3-java
SUBDIR += zabbix3-proxy
SUBDIR += zabbix3-server
SUBDIR += zabbix32-agent
SUBDIR += zabbix32-frontend
SUBDIR += zabbix32-java
SUBDIR += zabbix32-proxy
SUBDIR += zabbix32-server
SUBDIR += zabbix34-agent
SUBDIR += zabbix34-frontend
SUBDIR += zabbix34-java
SUBDIR += zabbix34-proxy
SUBDIR += zabbix34-server

View File

@ -0,0 +1,14 @@
# $FreeBSD$
PORTNAME= zabbix2
CATEGORIES= net-mgmt
PKGNAMESUFFIX= -java
MASTERDIR= ${.CURDIR}/../zabbix2-server
PLIST= ${PKGDIR}/pkg-plist.java
OPTIONS_DEFINE= IPV6
USE_JAVA= yes
.include "${MASTERDIR}/Makefile"

View File

@ -3,7 +3,7 @@
PORTNAME= zabbix2
PORTVERSION= 2.0.21
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
PKGNAMESUFFIX?= -server
@ -57,12 +57,12 @@ CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
--sysconfdir=${ETCDIR} \
--datadir=${ETCDIR}
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
SUB_FILES= pkg-message
CONFIGURE_ARGS+= --with-net-snmp
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP
OPTIONS_DEFAULT= MYSQL FPING JABBER CURL UNIXODBC
OPTIONS_SUB= yes
@ -73,7 +73,6 @@ JABBER_DESC= Support for Jabber media type
LDAP_DESC= Support for LDAP server checks
NMAP_DESC= Build/install nmap for o/s detection
SSH_DESC= Support for SSH-based checks
JAVAGW_DESC= Support for Java gateway
ODBC_DESC= Support for database checks via ODBC
OPTIONS_SINGLE= DB ODBC
@ -113,16 +112,13 @@ IODBC_LIB_DEPENDS= libiodbc.so:databases/libiodbc
UNIXODBC_CONFIGURE_WITH= unixodbc
UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
.endif # if ${ZABBIX_BUILD} != "agent"
.endif # if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
IPV6_CONFIGURE_ENABLE= ipv6
NMAP_RUN_DEPENDS= nmap:security/nmap \
sudo:security/sudo
JAVAGW_CONFIGURE_ENABLE= java
JAVAGW_USE= JAVA=yes
.include <bsd.port.options.mk>
post-patch:
@ -133,6 +129,10 @@ post-patch:
${WRKSRC}/src/zabbix_proxy/proxy.c \
${WRKSRC}/src/zabbix_server/server.c
.if ${ZABBIX_BUILD} == "java"
@${REINPLACE_CMD} -e 's#PID_FILE="/tmp/zabbix_java.pid"#PID_FILE="/var/run/zabbix/zabbix_java.pid"#g' \
${WRKSRC}/src/zabbix_java/settings.sh
.endif
.if ${ZABBIX_BUILD} != "agent"
.for d in mysql oracle postgresql sqlite3
@ -147,11 +147,12 @@ post-patch:
@${FIND} ${WRKSRC} -type f \( -name '*.bak' -or -name '*.orig' \) -exec ${RM} {} +
post-install:
.if ${PORT_OPTIONS:MJAVAGW}
.if ${ZABBIX_BUILD} == "java"
@${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
@${MKDIR} ${STAGEDIR}/var/run/zabbix
.endif
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
@${MKDIR} "${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/database"
@cd ${WRKSRC}/upgrades/ && ${COPYTREE_SHARE} dbpatches ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/upgrades/
@cd ${WRKSRC}/database/ && ${COPYTREE_SHARE} "ibm_db2 mysql oracle postgresql sqlite3" ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/database/

View File

@ -0,0 +1,27 @@
#!/bin/sh
# PROVIDE: zabbix_java
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Options to configure zabbix_java via /etc/rc.conf:
#
# zabbix_java_enable (bool):
# Enable service on boot.
# Default: NO
#
. /etc/rc.subr
name="zabbix_java"
rcvar=zabbix_java_enable
load_rc_config $name
: ${zabbix_java_enable:=NO}
start_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/startup.sh"
stop_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/shutdown.sh"
run_rc_command "$1"

View File

@ -32,16 +32,6 @@ sbin/zabbix_%%ZABBIX_BUILD%%
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/postgresql/patch.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/oracle/patch.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/mysql/patch.sql
%%JAVAGW%%sbin/zabbix_java/shutdown.sh
%%JAVAGW%%sbin/zabbix_java/lib/logback-console.xml
%%JAVAGW%%sbin/zabbix_java/lib/logback-core-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback-classic-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback.xml
%%JAVAGW%%sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
%%JAVAGW%%sbin/zabbix_java/settings.sh.sample
%%JAVAGW%%sbin/zabbix_java/startup.sh
%%JAVAGW%%sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
%%SERVER%%@dir %%ETCDIR%%/zabbix/alertscripts
@dir %%ETCDIR%%/zabbix/externalscripts
@dir %%ETCDIR%%/zabbix_%%ZABBIX_BUILD%%.conf.d

View File

@ -0,0 +1,11 @@
sbin/zabbix_java/shutdown.sh
sbin/zabbix_java/lib/logback-console.xml
sbin/zabbix_java/lib/logback-core-0.9.27.jar
sbin/zabbix_java/lib/logback-classic-0.9.27.jar
sbin/zabbix_java/lib/logback.xml
sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
@sample sbin/zabbix_java/settings.sh.sample
sbin/zabbix_java/startup.sh
sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
@dir(zabbix,zabbix,755) /var/run/zabbix

View File

@ -0,0 +1,14 @@
# $FreeBSD$
PORTNAME= zabbix22
CATEGORIES= net-mgmt
PKGNAMESUFFIX= -java
MASTERDIR= ${.CURDIR}/../zabbix22-server
PLIST= ${PKGDIR}/pkg-plist.java
OPTIONS_DEFINE= IPV6
USE_JAVA= yes
.include "${MASTERDIR}/Makefile"

View File

@ -3,7 +3,7 @@
PORTNAME= zabbix22
PORTVERSION= 2.2.22
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
PKGNAMESUFFIX?= -server
@ -55,12 +55,12 @@ CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
--datadir=${ETCDIR} \
--with-iconv=${ICONV_PREFIX}
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
SUB_FILES= pkg-message
CONFIGURE_ARGS+= --with-net-snmp
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW LIBXML2
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP LIBXML2
OPTIONS_DEFAULT= MYSQL FPING JABBER CURL UNIXODBC
OPTIONS_SUB= yes
@ -72,7 +72,6 @@ LDAP_DESC= Support for LDAP server checks
NMAP_DESC= Build/install Nmap for OS detection
SSH_DESC= Support for SSH-based checks
ODBC_DESC= Support for database checks via ODBC
JAVAGW_DESC= Support for Java gateway
LIBXML2_DESC= Support for libxml2 (required by monitoring VMware)
OPTIONS_SINGLE= DB ODBC
@ -112,16 +111,13 @@ IODBC_LIB_DEPENDS= libiodbc.so:databases/libiodbc
UNIXODBC_CONFIGURE_WITH= unixodbc
UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
.endif # if ${ZABBIX_BUILD} != "agent"
.endif # if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
IPV6_CONFIGURE_ENABLE= ipv6
NMAP_RUN_DEPENDS= nmap:security/nmap \
sudo:security/sudo
JAVAGW_CONFIGURE_ENABLE= java
JAVAGW_USE= JAVA=yes
LIBXML2_CONFIGURE_WITH= libxml2
LIBXML2_LIB_DEPENDS= libxml2.so:textproc/libxml2
@ -135,6 +131,11 @@ post-patch:
${WRKSRC}/src/zabbix_proxy/proxy.c \
${WRKSRC}/src/zabbix_server/server.c
.if ${ZABBIX_BUILD} == "java"
@${REINPLACE_CMD} -e 's#PID_FILE="/tmp/zabbix_java.pid"#PID_FILE="/var/run/zabbix/zabbix_java.pid"#g' \
${WRKSRC}/src/zabbix_java/settings.sh
.endif
.if ${ZABBIX_BUILD} != "agent"
.if ! ${PORT_OPTIONS:MFPING}
.endif
@ -164,7 +165,7 @@ post-patch:
${WRKSRC}/conf/zabbix_agentd.conf
.endif
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
${MKDIR} "${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/database"
cd ${WRKSRC}/upgrades/ && ${COPYTREE_SHARE} dbpatches ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/upgrades/
cd ${WRKSRC}/database/ && ${COPYTREE_SHARE} "ibm_db2 mysql oracle postgresql sqlite3" ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD}/database/
@ -172,8 +173,9 @@ post-patch:
.endif
post-install:
.if ${PORT_OPTIONS:MJAVAGW}
.if ${ZABBIX_BUILD} == "java"
@${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
@${MKDIR} ${STAGEDIR}/var/run/zabbix
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,27 @@
#!/bin/sh
# PROVIDE: zabbix_java
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Options to configure zabbix_java via /etc/rc.conf:
#
# zabbix_java_enable (bool):
# Enable service on boot.
# Default: NO
#
. /etc/rc.subr
name="zabbix_java"
rcvar=zabbix_java_enable
load_rc_config $name
: ${zabbix_java_enable:=NO}
start_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/startup.sh"
stop_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/shutdown.sh"
run_rc_command "$1"

View File

@ -33,16 +33,6 @@ sbin/zabbix_%%ZABBIX_BUILD%%
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/postgresql/patch.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/oracle/patch.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/mysql/patch.sql
%%JAVAGW%%sbin/zabbix_java/shutdown.sh
%%JAVAGW%%sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback-console.xml
%%JAVAGW%%sbin/zabbix_java/lib/logback-core-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback-classic-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback.xml
%%JAVAGW%%sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
%%JAVAGW%%sbin/zabbix_java/settings.sh.sample
%%JAVAGW%%sbin/zabbix_java/startup.sh
%%JAVAGW%%sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
%%SERVER%%@dir %%ETCDIR%%/zabbix/alertscripts
@dir %%ETCDIR%%/zabbix/externalscripts
@dir %%ETCDIR%%/zabbix_%%ZABBIX_BUILD%%.conf.d

View File

@ -0,0 +1,11 @@
sbin/zabbix_java/shutdown.sh
sbin/zabbix_java/lib/logback-console.xml
sbin/zabbix_java/lib/logback-core-0.9.27.jar
sbin/zabbix_java/lib/logback-classic-0.9.27.jar
sbin/zabbix_java/lib/logback.xml
sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
@sample sbin/zabbix_java/settings.sh.sample
sbin/zabbix_java/startup.sh
sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
@dir(zabbix,zabbix,755) /var/run/zabbix

View File

@ -0,0 +1,14 @@
# $FreeBSD$
PORTNAME= zabbix3
CATEGORIES= net-mgmt
PKGNAMESUFFIX= -java
MASTERDIR= ${.CURDIR}/../zabbix3-server
PLIST= ${PKGDIR}/pkg-plist.java
OPTIONS_DEFINE= IPV6
USE_JAVA= yes
.include "${MASTERDIR}/Makefile"

View File

@ -3,7 +3,7 @@
PORTNAME= zabbix3
PORTVERSION= 3.0.19
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
PKGNAMESUFFIX?= -server
@ -53,7 +53,7 @@ CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
--datadir=${ETCDIR} \
--with-iconv=${ICONV_PREFIX}
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
CPPFLAGS+= -I${LOCALBASE}/include
@ -62,8 +62,7 @@ SUB_FILES= pkg-message
CONFIGURE_ARGS+= --with-net-snmp
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW \
LIBXML2
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP LIBXML2
OPTIONS_DEFAULT= FPING CURL UNIXODBC MYSQL OPENSSL
OPTIONS_SUB= yes
@ -76,7 +75,6 @@ LDAP_DESC= Support for LDAP server checks
NMAP_DESC= Build/install nmap for o/s detection
SSH_DESC= Support for SSH-based checks
ODBC_DESC= Support for database checks via ODBC
JAVAGW_DESC= Support for Java gateway
LIBXML2_DESC= Support for libxml2 (required by monitoring VMware)
OPTIONS_SINGLE= DB ODBC SSL
@ -117,19 +115,16 @@ IODBC_LIB_DEPENDS= libiodbc.so:databases/libiodbc
UNIXODBC_CONFIGURE_WITH=unixodbc
UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
.else
.elif ${ZABBIX_BUILD} == "agent"
OPTIONS_SINGLE= SSL
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS
.endif # if ${ZABBIX_BUILD} != "agent"
.endif # if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
IPV6_CONFIGURE_ENABLE= ipv6
NMAP_RUN_DEPENDS= nmap:security/nmap \
sudo:security/sudo
JAVAGW_CONFIGURE_ENABLE=java
JAVAGW_USE= JAVA=yes
LIBXML2_CONFIGURE_WITH= libxml2
LIBXML2_LIB_DEPENDS= libxml2.so:textproc/libxml2
@ -172,6 +167,11 @@ post-patch:
${WRKSRC}/conf/zabbix_agentd*.conf
.endif
.if ${ZABBIX_BUILD} == "java"
@${REINPLACE_CMD} -e 's#PID_FILE="/tmp/zabbix_java.pid"#PID_FILE="/var/run/zabbix/zabbix_java.pid"#g' \
${WRKSRC}/src/zabbix_java/settings.sh
.endif
.if ${ZABBIX_BUILD} != "agent"
. for d in mysql oracle postgresql sqlite3
@${REINPLACE_CMD} \
@ -189,12 +189,13 @@ post-patch:
post-install:
.if ${PORT_OPTIONS:MJAVAGW}
.if ${ZABBIX_BUILD} == "java"
${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh \
${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
@${MKDIR} ${STAGEDIR}/var/run/zabbix
.endif
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
${MKDIR} ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/database
(cd ${WRKSRC}/upgrades/ && ${COPYTREE_SHARE} dbpatches \
${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/upgrades/)

View File

@ -0,0 +1,27 @@
#!/bin/sh
# PROVIDE: zabbix_java
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Options to configure zabbix_java via /etc/rc.conf:
#
# zabbix_java_enable (bool):
# Enable service on boot.
# Default: NO
#
. /etc/rc.subr
name="zabbix_java"
rcvar=zabbix_java_enable
load_rc_config $name
: ${zabbix_java_enable:=NO}
start_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/startup.sh"
stop_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/shutdown.sh"
run_rc_command "$1"

View File

@ -33,16 +33,6 @@ sbin/zabbix_%%ZABBIX_BUILD%%
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/postgresql/patch.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/oracle/patch.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/mysql/patch.sql
%%JAVAGW%%sbin/zabbix_java/shutdown.sh
%%JAVAGW%%sbin/zabbix_java/lib/logback-console.xml
%%JAVAGW%%sbin/zabbix_java/lib/logback-core-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback-classic-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback.xml
%%JAVAGW%%sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
%%JAVAGW%%sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
%%JAVAGW%%sbin/zabbix_java/settings.sh.sample
%%JAVAGW%%sbin/zabbix_java/startup.sh
%%JAVAGW%%sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
%%SERVER%%@dir %%ETCDIR%%/zabbix/alertscripts
@dir %%ETCDIR%%/zabbix/externalscripts
%%PROXY%%@dir %%ETCDIR%%/zabbix_proxy.conf.d

View File

@ -0,0 +1,11 @@
sbin/zabbix_java/shutdown.sh
sbin/zabbix_java/lib/logback-console.xml
sbin/zabbix_java/lib/logback-core-0.9.27.jar
sbin/zabbix_java/lib/logback-classic-0.9.27.jar
sbin/zabbix_java/lib/logback.xml
sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
@sample sbin/zabbix_java/settings.sh.sample
sbin/zabbix_java/startup.sh
sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
@dir(zabbix,zabbix,755) /var/run/zabbix

View File

@ -0,0 +1,14 @@
# $FreeBSD$
PORTNAME= zabbix32
CATEGORIES= net-mgmt
PKGNAMESUFFIX= -java
MASTERDIR= ${.CURDIR}/../zabbix32-server
PLIST= ${PKGDIR}/pkg-plist.java
OPTIONS_DEFINE= IPV6
USE_JAVA= yes
.include "${MASTERDIR}/Makefile"

View File

@ -3,7 +3,7 @@
PORTNAME= zabbix32
PORTVERSION= 3.2.11
PORTREVISION?= 1
PORTREVISION?= 2
CATEGORIES= net-mgmt
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
PKGNAMESUFFIX?= -server
@ -57,7 +57,7 @@ CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
--datadir=${ETCDIR} \
--with-iconv=${ICONV_PREFIX}
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp
CPPFLAGS+= -I${LOCALBASE}/include
@ -66,8 +66,7 @@ SUB_FILES= pkg-message
CONFIGURE_ARGS+= --with-net-snmp
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW \
LIBXML2
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP LIBXML2
OPTIONS_DEFAULT= FPING CURL UNIXODBC MYSQL OPENSSL
OPTIONS_SUB= yes
@ -80,7 +79,6 @@ LDAP_DESC= Support for LDAP server checks
NMAP_DESC= Build/install nmap for o/s detection
SSH_DESC= Support for SSH-based checks
ODBC_DESC= Support for database checks via ODBC
JAVAGW_DESC= Support for Java gateway
LIBXML2_DESC= Support for libxml2 (required by monitoring VMware)
OPTIONS_SINGLE= DB ODBC SSL
@ -121,19 +119,16 @@ IODBC_LIB_DEPENDS= libiodbc.so:databases/libiodbc
UNIXODBC_CONFIGURE_WITH=unixodbc
UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
.else
.elif ${ZABBIX_BUILD} == "agent"
OPTIONS_SINGLE= SSL
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS
.endif # if ${ZABBIX_BUILD} != "agent"
.endif # if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
IPV6_CONFIGURE_ENABLE= ipv6
NMAP_RUN_DEPENDS= nmap:security/nmap \
sudo:security/sudo
JAVAGW_CONFIGURE_ENABLE=java
JAVAGW_USE= JAVA=yes
LIBXML2_CONFIGURE_WITH= libxml2
LIBXML2_LIB_DEPENDS= libxml2.so:textproc/libxml2
@ -177,6 +172,11 @@ post-patch:
${WRKSRC}/conf/zabbix_agentd*.conf
.endif
.if ${ZABBIX_BUILD} == "java"
@${REINPLACE_CMD} -e 's#PID_FILE="/tmp/zabbix_java.pid"#PID_FILE="/var/run/zabbix/zabbix_java.pid"#g' \
${WRKSRC}/src/zabbix_java/settings.sh
.endif
.if ${ZABBIX_BUILD} != "agent"
. for d in mysql oracle postgresql sqlite3
@${REINPLACE_CMD} \
@ -194,12 +194,13 @@ post-patch:
post-install:
.if ${PORT_OPTIONS:MJAVAGW}
.if ${ZABBIX_BUILD} == "java"
${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh \
${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
@${MKDIR} ${STAGEDIR}/var/run/zabbix
.endif
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
${MKDIR} ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/database
(cd ${WRKSRC}/upgrades/ && ${COPYTREE_SHARE} dbpatches \
${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/upgrades/)

View File

@ -0,0 +1,27 @@
#!/bin/sh
# PROVIDE: zabbix_java
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Options to configure zabbix_java via /etc/rc.conf:
#
# zabbix_java_enable (bool):
# Enable service on boot.
# Default: NO
#
. /etc/rc.subr
name="zabbix_java"
rcvar=zabbix_java_enable
load_rc_config $name
: ${zabbix_java_enable:=NO}
start_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/startup.sh"
stop_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/shutdown.sh"
run_rc_command "$1"

View File

@ -33,16 +33,6 @@ sbin/zabbix_%%ZABBIX_BUILD%%
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/postgresql/patch.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/oracle/patch.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/1.6/mysql/patch.sql
%%JAVAGW%%sbin/zabbix_java/shutdown.sh
%%JAVAGW%%sbin/zabbix_java/lib/logback-console.xml
%%JAVAGW%%sbin/zabbix_java/lib/logback-core-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback-classic-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback.xml
%%JAVAGW%%sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
%%JAVAGW%%sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
%%JAVAGW%%sbin/zabbix_java/settings.sh.sample
%%JAVAGW%%sbin/zabbix_java/startup.sh
%%JAVAGW%%sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
%%SERVER%%@dir %%ETCDIR%%/zabbix/alertscripts
@dir %%ETCDIR%%/zabbix/externalscripts
%%PROXY%%@dir %%ETCDIR%%/zabbix_proxy.conf.d

View File

@ -0,0 +1,11 @@
sbin/zabbix_java/shutdown.sh
sbin/zabbix_java/lib/logback-console.xml
sbin/zabbix_java/lib/logback-core-0.9.27.jar
sbin/zabbix_java/lib/logback-classic-0.9.27.jar
sbin/zabbix_java/lib/logback.xml
sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
@sample sbin/zabbix_java/settings.sh.sample
sbin/zabbix_java/startup.sh
sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
@dir(zabbix,zabbix,755) /var/run/zabbix

View File

@ -0,0 +1,14 @@
# $FreeBSD$
PORTNAME= zabbix34
CATEGORIES= net-mgmt
PKGNAMESUFFIX= -java
MASTERDIR= ${.CURDIR}/../zabbix34-server
PLIST= ${PKGDIR}/pkg-plist.java
OPTIONS_DEFINE= IPV6
USE_JAVA= yes
.include "${MASTERDIR}/Makefile"

View File

@ -3,7 +3,7 @@
PORTNAME= zabbix34
PORTVERSION= 3.4.11
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
PKGNAMESUFFIX?= -server
@ -59,7 +59,7 @@ CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
--datadir=${ETCDIR} \
--with-iconv=${ICONV_PREFIX}
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
LIB_DEPENDS+= libnetsnmp.so:net-mgmt/net-snmp
CPPFLAGS+= -I${LOCALBASE}/include
@ -68,8 +68,7 @@ SUB_FILES= pkg-message
CONFIGURE_ARGS+= --with-net-snmp
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW \
LIBXML2
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP LIBXML2
OPTIONS_DEFAULT= FPING CURL UNIXODBC MYSQL OPENSSL
OPTIONS_SUB= yes
@ -82,7 +81,6 @@ LDAP_DESC= Support for LDAP server checks
NMAP_DESC= Build/install nmap for o/s detection
SSH_DESC= Support for SSH-based checks
ODBC_DESC= Support for database checks via ODBC
JAVAGW_DESC= Support for Java gateway
LIBXML2_DESC= Support for libxml2 (required by monitoring VMware)
OPTIONS_SINGLE= DB ODBC SSL
@ -123,19 +121,16 @@ IODBC_LIB_DEPENDS= libiodbc.so:databases/libiodbc
UNIXODBC_CONFIGURE_WITH=unixodbc
UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
.else
.elif ${ZABBIX_BUILD} == "agent"
OPTIONS_SINGLE= SSL
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS
.endif # if ${ZABBIX_BUILD} != "agent"
.endif # if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
IPV6_CONFIGURE_ENABLE= ipv6
NMAP_RUN_DEPENDS= nmap:security/nmap \
sudo:security/sudo
JAVAGW_CONFIGURE_ENABLE=java
JAVAGW_USE= JAVA=yes
LIBXML2_CONFIGURE_WITH= libxml2
LIBXML2_LIB_DEPENDS= libxml2.so:textproc/libxml2
@ -178,6 +173,11 @@ post-patch:
${WRKSRC}/conf/zabbix_agentd*.conf
.endif
.if ${ZABBIX_BUILD} == "java"
@${REINPLACE_CMD} -e 's#PID_FILE="/tmp/zabbix_java.pid"#PID_FILE="/var/run/zabbix/zabbix_java.pid"#g' \
${WRKSRC}/src/zabbix_java/settings.sh
.endif
.if ${ZABBIX_BUILD} != "agent"
. for d in mysql oracle postgresql sqlite3
@${REINPLACE_CMD} \
@ -195,12 +195,13 @@ post-patch:
post-install:
.if ${PORT_OPTIONS:MJAVAGW}
.if ${ZABBIX_BUILD} == "java"
${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh \
${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
@${MKDIR} ${STAGEDIR}/var/run/zabbix
.endif
.if ${ZABBIX_BUILD} != "agent"
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
${MKDIR} ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/database
(cd ${WRKSRC}/upgrades/ && ${COPYTREE_SHARE} dbpatches \
${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/upgrades/)

View File

@ -0,0 +1,27 @@
#!/bin/sh
# PROVIDE: zabbix_java
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Options to configure zabbix_java via /etc/rc.conf:
#
# zabbix_java_enable (bool):
# Enable service on boot.
# Default: NO
#
. /etc/rc.subr
name="zabbix_java"
rcvar=zabbix_java_enable
load_rc_config $name
: ${zabbix_java_enable:=NO}
start_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/startup.sh"
stop_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/shutdown.sh"
run_rc_command "$1"

View File

@ -31,16 +31,6 @@
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/2.0/postgresql/rc4_rc5.sql
%%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/2.2/README
%%ETCDIR%%/zabbix_%%ZABBIX_BUILD%%.conf.sample
%%JAVAGW%%sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
%%JAVAGW%%sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback-classic-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback-console.xml
%%JAVAGW%%sbin/zabbix_java/lib/logback-core-0.9.27.jar
%%JAVAGW%%sbin/zabbix_java/lib/logback.xml
%%JAVAGW%%sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
%%JAVAGW%%sbin/zabbix_java/settings.sh.sample
%%JAVAGW%%sbin/zabbix_java/shutdown.sh
%%JAVAGW%%sbin/zabbix_java/startup.sh
%%PROXY%%@dir %%ETCDIR%%/zabbix_proxy.conf.d
%%SERVER%%@dir %%ETCDIR%%/zabbix_server.conf.d
%%SERVER%%@dir %%ETCDIR%%/zabbix/alertscripts

View File

@ -0,0 +1,11 @@
sbin/zabbix_java/shutdown.sh
sbin/zabbix_java/lib/logback-console.xml
sbin/zabbix_java/lib/logback-core-0.9.27.jar
sbin/zabbix_java/lib/logback-classic-0.9.27.jar
sbin/zabbix_java/lib/logback.xml
sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
@sample sbin/zabbix_java/settings.sh.sample
sbin/zabbix_java/startup.sh
sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
@dir(zabbix,zabbix,755) /var/run/zabbix