mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
net/mgmt/zabbix22-server: Update to 2.2.3 [1]
- Use optionsNG - Drop OracleDB support - Add iODBC support next to unixODBC support - Fix staging with JAVAGW enabled - Drop unused ZABBIX_REQUIRE variable From myself: - Unmute installation commands - Drop patches merged upstream PR: ports/189135 [1] Submitted by: Danilo G. Baio <dbaio@bsd.com.br> Approved by: maintainer timeout (Pakhom Golynga <pakhom706@gmail.com>) (13 days)
This commit is contained in:
parent
c185ab658f
commit
53bc05e5b4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355546
@ -2,8 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= zabbix22
|
||||
PORTVERSION= 2.2.2
|
||||
PORTREVISION?= 1
|
||||
PORTVERSION= 2.2.3
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
|
||||
PKGNAMESUFFIX?= -server
|
||||
@ -70,7 +69,8 @@ CONFIGURE_ARGS+= --with-net-snmp
|
||||
OPTIONSFILE= ${PORT_DBDIR}/${PORTNAME}${PKGNAMESUFFIX}/options
|
||||
|
||||
OPTIONS_DEFINE= IPV6 FPING JABBER CURL LDAP IPMI SSH NMAP JAVAGW LIBXML2
|
||||
OPTIONS_DEFAULT= MYSQL IPV6 FPING JABBER CURL
|
||||
OPTIONS_DEFAULT= MYSQL IPV6 FPING JABBER CURL UNIXODBC
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
CURL_DESC= Support for web monitoring
|
||||
FPING_DESC= Build/install fping for ping checks
|
||||
@ -83,91 +83,55 @@ 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
|
||||
OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE ORACLE ODBC
|
||||
OPTIONS_SINGLE= DB ODBC
|
||||
OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE
|
||||
OPTIONS_SINGLE_ODBC= IODBC UNIXODBC
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
MYSQL_CONFIGURE_WITH= mysql
|
||||
MYSQL_USE= MYSQL=yes
|
||||
|
||||
.if ${PORT_OPTIONS:MMYSQL}
|
||||
ZABBIX_REQUIRE= " mysql"
|
||||
USE_MYSQL= yes
|
||||
CONFIGURE_ARGS+= --with-mysql
|
||||
.endif
|
||||
PGSQL_CONFIGURE_WITH= postgresql
|
||||
PGSQL_USES= PGSQL
|
||||
|
||||
.if ${PORT_OPTIONS:MPGSQL}
|
||||
ZABBIX_REQUIRE= " postgresql"
|
||||
USE_PGSQL= yes
|
||||
CONFIGURE_ARGS+= --with-postgresql
|
||||
.endif
|
||||
SQLITE_CONFIGURE_WITH= sqlite3
|
||||
SQLITE_USE= SQLITE=3
|
||||
|
||||
.if ${PORT_OPTIONS:MSQLITE}
|
||||
ZABBIX_REQUIRE= " sqlite"
|
||||
USE_SQLITE= 3
|
||||
CONFIGURE_ARGS+= --with-sqlite3
|
||||
.endif
|
||||
CURL_CONFIGURE_WITH= libcurl
|
||||
CURL_LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
|
||||
|
||||
.if ${PORT_OPTIONS:MORACLE}
|
||||
ZABBIX_REQUIRE=
|
||||
CONFIGURE_ARGS+= --with-oracle
|
||||
.endif
|
||||
LDAP_CONFIGURE_WITH= ldap
|
||||
LDAP_USE= OPENLDAP=yes
|
||||
|
||||
.if ${PORT_OPTIONS:MCURL}
|
||||
LIB_DEPENDS+= libcurl.so:${PORTSDIR}/ftp/curl
|
||||
CONFIGURE_ARGS+= --with-libcurl
|
||||
.endif
|
||||
IPMI_CONFIGURE_WITH= openipmi
|
||||
IPMI_LIB_DEPENDS= libOpenIPMI.so:${PORTSDIR}/sysutils/openipmi
|
||||
|
||||
.if ${PORT_OPTIONS:MLDAP}
|
||||
USE_OPENLDAP= yes
|
||||
CONFIGURE_ARGS+= --with-ldap
|
||||
.endif
|
||||
JABBER_CONFIGURE_WITH= jabber
|
||||
JABBER_LIB_DEPENDS= libiksemel.so:${PORTSDIR}/textproc/iksemel
|
||||
|
||||
.if ${PORT_OPTIONS:MIPMI}
|
||||
LIB_DEPENDS+= libOpenIPMI.so:${PORTSDIR}/sysutils/openipmi
|
||||
CONFIGURE_ARGS+= --with-openipmi
|
||||
.endif
|
||||
FPING_RUN_DEPENDS= fping:${PORTSDIR}/net/fping
|
||||
|
||||
.if ${PORT_OPTIONS:MJABBER}
|
||||
LIB_DEPENDS+= libiksemel.so:${PORTSDIR}/textproc/iksemel
|
||||
CONFIGURE_ARGS+= --with-jabber
|
||||
.endif
|
||||
SSH_CONFIGURE_WITH= ssh2
|
||||
SSH_LIB_DEPENDS= libssh2.so:${PORTSDIR}/security/libssh2
|
||||
|
||||
.if ${PORT_OPTIONS:MFPING}
|
||||
RUN_DEPENDS+= fping:${PORTSDIR}/net/fping
|
||||
.endif
|
||||
IODBC_CONFIGURE_WITH= iodbc
|
||||
IODBC_LIB_DEPENDS= libiodbc.so:${PORTSDIR}/databases/libiodbc
|
||||
|
||||
.if ${PORT_OPTIONS:MSSH}
|
||||
LIB_DEPENDS+= libssh2.so:${PORTSDIR}/security/libssh2
|
||||
CONFIGURE_ARGS+= --with-ssh2
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MODBC}
|
||||
LIB_DEPENDS+= libodbc.so:${PORTSDIR}/databases/unixODBC
|
||||
CONFIGURE_ARGS+= --with-unixodbc
|
||||
.endif
|
||||
UNIXODBC_CONFIGURE_WITH= unixodbc
|
||||
UNIXODBC_LIB_DEPENDS= libodbc.so:${PORTSDIR}/databases/unixODBC
|
||||
.endif # if ${ZABBIX_BUILD} != "agent"
|
||||
|
||||
.if ${PORT_OPTIONS:MIPV6}
|
||||
CONFIGURE_ARGS+= --enable-ipv6
|
||||
.endif
|
||||
IPV6_CONFIGURE_ENABLE= ipv6
|
||||
|
||||
.if ${PORT_OPTIONS:MNMAP}
|
||||
RUN_DEPENDS+= nmap:${PORTSDIR}/security/nmap \
|
||||
NMAP_RUN_DEPENDS= nmap:${PORTSDIR}/security/nmap \
|
||||
sudo:${PORTSDIR}/security/sudo
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MJAVAGW}
|
||||
USE_JAVA= yes
|
||||
CONFIGURE_ARGS+= --enable-java
|
||||
PLIST_SUB+= ZABBIX_JAVA="sbin/zabbix_java"
|
||||
PLIST_SUB+= JAVAGW=""
|
||||
.else
|
||||
PLIST_SUB+= JAVAGW="@comment "
|
||||
.endif
|
||||
JAVAGW_CONFIGURE_ENABLE= java
|
||||
JAVAGW_USE= JAVA=yes
|
||||
|
||||
.if ${PORT_OPTIONS:MLIBXML2}
|
||||
LIB_DEPENDS+= libxml2.so:${PORTSDIR}/textproc/libxml2
|
||||
CONFIGURE_ARGS+= --with-libxml2
|
||||
.endif
|
||||
LIBXML2_CONFIGURE_WITH= libxml2
|
||||
LIBXML2_LIB_DEPENDS= libxml2.so:${PORTSDIR}/textproc/libxml2
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
post-patch:
|
||||
@${GREP} -rl "/etc/zabbix" ${WRKSRC} \
|
||||
@ -175,7 +139,7 @@ post-patch:
|
||||
@${REINPLACE_CMD} -e 's#/usr/sbin/fping#${LOCALBASE}/sbin/fping#g' ${WRKSRC}/conf/zabbix_*.conf
|
||||
|
||||
.if ${ZABBIX_BUILD} != "agent"
|
||||
.if empty(PORT_OPTIONS:MFPING)
|
||||
.if ! ${PORT_OPTIONS:MFPING}
|
||||
.endif
|
||||
.for d in mysql oracle postgresql sqlite3
|
||||
@${REINPLACE_CMD} -e 's|/bin/ping|/sbin/ping|g; \
|
||||
@ -189,15 +153,14 @@ post-patch:
|
||||
@${FIND} ${WRKSRC} -type f \( -name '*.bak' -or -name '*.orig' \) -exec ${RM} -f {} +
|
||||
|
||||
post-install:
|
||||
|
||||
.if defined(WITH_JAVAGW)
|
||||
.if ${PORT_OPTIONS:MJAVAGW}
|
||||
@${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} != "agent"
|
||||
@${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/
|
||||
${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/
|
||||
.endif
|
||||
.endif # if ${ZABBIX_BUILD} != "frontend"
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (zabbix-2.2.2.tar.gz) = e00ef9a1d667284a2bc2ce04966204ee094ade2c0bc6a94efb9436a9aa5cb2be
|
||||
SIZE (zabbix-2.2.2.tar.gz) = 14595839
|
||||
SHA256 (zabbix-2.2.3.tar.gz) = 12a75762d474227f9af8b44abe48dd2660a76713335a37fc8147aca3c79844c1
|
||||
SIZE (zabbix-2.2.3.tar.gz) = 14649686
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- src/zabbix_java/shutdown.sh.orig 2013-11-12 10:07:23.000000000 +0400
|
||||
+++ src/zabbix_java/shutdown.sh 2013-12-04 16:37:38.000000000 +0400
|
||||
@@ -1,7 +1,7 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
cd $(dirname $0)
|
||||
-source settings.sh
|
||||
+. settings.sh
|
||||
|
||||
if [ -n "$PID_FILE" ]; then
|
||||
if [ -e "$PID_FILE" ]; then
|
@ -1,32 +0,0 @@
|
||||
--- src/zabbix_java/startup.sh.orig 2013-11-12 10:07:23.000000000 +0400
|
||||
+++ src/zabbix_java/startup.sh 2013-12-04 16:37:05.000000000 +0400
|
||||
@@ -1,7 +1,7 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
cd $(dirname $0)
|
||||
-source settings.sh
|
||||
+. settings.sh
|
||||
|
||||
if [ -n "$PID_FILE" -a -e "$PID_FILE" ]; then
|
||||
echo "Zabbix Java Gateway is already running"
|
||||
@@ -16,8 +16,8 @@
|
||||
fi
|
||||
|
||||
CLASSPATH="lib"
|
||||
-for jar in {lib,bin}/*.jar; do
|
||||
- if [[ $jar != *junit* ]]; then
|
||||
+for jar in lib/*.jar bin/*.jar; do
|
||||
+ if [ "$jar" != "*junit*" ]; then
|
||||
CLASSPATH="$CLASSPATH:$jar"
|
||||
fi
|
||||
done
|
||||
@@ -39,7 +39,7 @@
|
||||
COMMAND_LINE="$JAVA $JAVA_OPTIONS -classpath $CLASSPATH $ZABBIX_OPTIONS com.zabbix.gateway.JavaGateway"
|
||||
|
||||
if [ -n "$PID_FILE" ]; then
|
||||
- PID=$(/bin/bash -c "$COMMAND_LINE > /dev/null 2>&1 & echo \$!")
|
||||
+ PID=$(/bin/sh -c "$COMMAND_LINE > /dev/null 2>&1 & echo \$!")
|
||||
if ps -p $PID > /dev/null 2>&1; then
|
||||
echo $PID > $PID_FILE
|
||||
else
|
@ -33,19 +33,19 @@ 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%%%%ZABBIX_JAVA%%/shutdown.sh
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/lib/logback-console.xml
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/lib/logback-core-0.9.27.jar
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/lib/org-json-2010-12-28.jar
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/lib/logback-classic-0.9.27.jar
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/lib/logback.xml
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/lib/slf4j-api-1.6.1.jar
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/settings.sh.sample
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/startup.sh
|
||||
%%JAVAGW%%%%ZABBIX_JAVA%%/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
|
||||
%%JAVAGW%%@dirrmtry %%ZABBIX_JAVA%%/lib
|
||||
%%JAVAGW%%@dirrmtry %%ZABBIX_JAVA%%/bin
|
||||
%%JAVAGW%%@dirrmtry %%ZABBIX_JAVA%%
|
||||
%%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/org-json-2010-12-28.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
|
||||
%%JAVAGW%%@dirrmtry sbin/zabbix_java/lib
|
||||
%%JAVAGW%%@dirrmtry sbin/zabbix_java/bin
|
||||
%%JAVAGW%%@dirrmtry sbin/zabbix_java
|
||||
@dirrm %%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/2.2
|
||||
@dirrm %%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/2.0/ibm_db2
|
||||
@dirrm %%DATADIR%%/%%ZABBIX_BUILD%%/upgrades/dbpatches/2.0/postgresql
|
||||
|
Loading…
Reference in New Issue
Block a user