Date: Wed, 9 Sep 2009 04:52:51 GMT From: Vladimir Korkodinov <viper@perm.raid.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/138651: [NEW PORT] net-mgmt/zabbix-proxy: 1.6.6 Message-ID: <200909090452.n894qpbs016187@www.freebsd.org> Resent-Message-ID: <200909090500.n89502KI087587@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 138651 >Category: ports >Synopsis: [NEW PORT] net-mgmt/zabbix-proxy: 1.6.6 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Sep 09 05:00:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Vladimir Korkodinov >Release: 6.4-RELEASE >Organization: >Environment: FreeBSD asterisktest 6.4-RELEASE FreeBSD 6.4-RELEASE #2: Thu Dec 4 11:29:00 YEKT 2008 root@asterisktest:/usr/obj/usr/src/sys/kernel i386 >Description: Zabbix is software for application and network monitoring. Zabbix supports both polling and trapping techniques to collect data from monitored hosts. Flexible notification mechanism allows easy and quckly configure email notifications for pre-defined events. Zabbix is freely available under the terms of the GNU General Public License (GPL). ZABBIX Proxy is a lightweight process, which collects data collection on behalf of ZABBIX Server. The proxies can be used in order to centralise monitoring of remote locations by reporting to the central server or one of ZABBIX nodes in the distributed environment. ZABBIX Proxy simplifies deployment and maintenances of the centralised distributed monitoring significantly. >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # zabbix-proxy # zabbix-proxy/Makefile # zabbix-proxy/distinfo # zabbix-proxy/pkg-descr # zabbix-proxy/pkg-install # zabbix-proxy/files # zabbix-proxy/files/pkg-message.in # zabbix-proxy/files/zabbix_proxy.sh.in # zabbix-proxy/pkg-plist # echo c - zabbix-proxy mkdir -p zabbix-proxy > /dev/null 2>&1 echo x - zabbix-proxy/Makefile sed 's/^X//' >zabbix-proxy/Makefile << 'b284ac8cbb0c0ffa9bf884932511e645' X# Ports collection makefile for: zabbix X# Date created: Jun 18 2003 X# Whom: Sergey Akifyev <asa@gascom.ru> X# X# $FreeBSD: ports/net-mgmt/zabbix/Makefile,v 1.65 2009/08/22 00:32:09 amdmi3 Exp $ X# X XPORTNAME= zabbix XPORTVERSION= 1.6.6 XPORTREVISION= 1 XPORTEPOCH= 1 XCATEGORIES= net-mgmt XMASTER_SITES= SF/${PORTNAME}/ZABBIX%20Latest%20Stable/${PORTVERSION} XPKGNAMESUFFIX= -proxy X XMAINTAINER= ports@christianserving.org XCOMMENT= Application and network monitoring solution X XLIB_DEPENDS= netsnmp.16:${PORTSDIR}/net-mgmt/net-snmp \ X iksemel.4:${PORTSDIR}/textproc/iksemel \ X curl.5:${PORTSDIR}/ftp/curl X XOPTIONS= MYSQL "Use MySQL backend" on \ X PGSQL "Use PostgreSQL backend" off \ X SQLITE "Use SQLite backend" off \ X IPV6 "Support for IPv6" on \ X FPING "Use fping for pinging hosts" on X X XUSE_GMAKE= yes XUSE_RC_SUBR= zabbix_proxy.sh XGNU_CONFIGURE= yes XCONFIGURE_ARGS= --disable-agent --disable-server --enable-proxy\ X --with-net-snmp=${LOCALBASE}/bin/net-snmp-config \ X --with-curl=${LOCALBASE}/bin/curl-config XMAKE_ARGS= ARCH=freebsd XSUB_FILES= pkg-message X X.include <bsd.port.pre.mk> X X X.ifdef WITH_IPV6 XCONFIGURE_ARGS+=--enable-ipv6 X.endif X X.ifndef WITHOUT_FPING XRUN_DEPENDS+= fping:${PORTSDIR}/net/fping X.endif X X.ifndef WITHOUT_MYSQL XUSE_MYSQL= yes XCONFIGURE_ARGS+=--with-mysql=${LOCALBASE}/bin/mysql_config X.elifdef WITH_PGSQL XUSE_PGSQL= yes XCONFIGURE_ARGS+=--with-pgsql=${LOCALBASE}/bin/pg_config X.elifdef WITH_SQLITE XUSE_SQLITE= yes XCONFIGURE_ARGS+=--with-sqlite3=${LOCALBASE} X.else XIGNORE= zabbix needs a database backend X.endif X Xpost-patch: X @${FIND} ${WRKSRC}/src/ -type f|${XARGS} \ X ${REINPLACE_CMD} -e 's|/etc/zabbix|${ETCDIR}|;s|/usr/sbin|${LOCALBASE}/sbin|' X @${REINPLACE_CMD} -e '/test.*rf/s|-rf|-f|;/LDFLAGS/s|-static||;\ X /LIBS="-lnetsnmp/s|="|="-lcrypto |;s|-lsqlite3|-lsqlite3 ${PTHREAD_LIBS}|'\ X ${WRKSRC}/configure X @cd ${WRKSRC} && ${FIND} . -name '*.orig' -exec ${RM} {} \; X X.ifdef WITHOUT_FPING X @${ECHO} 'DisablePinger=yes' >> ${WRKSRC}/misc/conf/zabbix_proxy.conf X.endif X X.if ${ARCH} == "amd64" Xpost-configure: X ${ECHO_CMD} "#define HAVE_VA_COPY 1" >> ${WRKSRC}/include/config.h X.endif X Xdo-install: X @${INSTALL_PROGRAM} ${WRKSRC}/src/zabbix_proxy/zabbix_proxy ${PREFIX}/bin/ X @${INSTALL} -d ${ETCDIR}/ X @${INSTALL_DATA} ${WRKSRC}/misc/conf/zabbix_proxy.conf\ X ${ETCDIR}/zabbix_proxy.conf.sample X @cd ${WRKSRC}/upgrades/&&${COPYTREE_SHARE} dbpatches ${DATADIR}/ X @cd ${WRKSRC}/create/&&${COPYTREE_SHARE} "data schema" ${DATADIR}/create/ X @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.post.mk> b284ac8cbb0c0ffa9bf884932511e645 echo x - zabbix-proxy/distinfo sed 's/^X//' >zabbix-proxy/distinfo << 'fe6be6eadfd7b0d847fcf550e96433a1' XMD5 (zabbix-1.6.6.tar.gz) = 52779160e71c12d47b97f7336e25c395 XSHA256 (zabbix-1.6.6.tar.gz) = 9eb7bbe99c516c11020d5c95c8f8783fb1dc1123ce9c7e2135db7bfd0ea0aa75 XSIZE (zabbix-1.6.6.tar.gz) = 8255436 fe6be6eadfd7b0d847fcf550e96433a1 echo x - zabbix-proxy/pkg-descr sed 's/^X//' >zabbix-proxy/pkg-descr << '858ee85a613ce84829b6325311cf9fbd' XZabbix is software for application and network monitoring. XZabbix supports both polling and trapping techniques to Xcollect data from monitored hosts. Flexible notification Xmechanism allows easy and quckly configure email notifications Xfor pre-defined events. Zabbix is freely available under the Xterms of the GNU General Public License (GPL). X XWWW: http://www.zabbix.com/ 858ee85a613ce84829b6325311cf9fbd echo x - zabbix-proxy/pkg-install sed 's/^X//' >zabbix-proxy/pkg-install << 'ec1b53d6df70fc555d056226548a809f' X#!/bin/sh X# Script was taken from mysql323-server port, and modified X# to suit zabbix needs X X[ -n "${PACKAGE_BUILDING}" ] && exit 0 X X[ "${2}" = "POST-INSTALL" ] && exit 0 X XPATH=/bin:/usr/sbin X XUSER=zabbix XGROUP=${USER} XUID=122 XGID=${UID} X Xif pw group show "${GROUP}" 2>/dev/null; then X echo "You already have a group \"${GROUP}\", so I will use it." Xelse X if pw groupadd ${GROUP} -g ${GID}; then X echo "Added group \"${GROUP}\"." X else X echo "Adding group \"${GROUP}\" failed..." X exit 1 X fi Xfi X Xif pw user show "${USER}" 2>/dev/null; then X echo "You already have a user \"${USER}\", so I will use it." X if pw usermod ${USER} -d /nonexistent X then X echo "Changed home directory of \"${USER}\" to /nonexistent" X else X echo "Changing home directory of \"${USER}\" to /nonexistent failed..." X exit 1 X fi Xelse X if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ X -d /nonexistent -s /sbin/nologin -c "Zabbix Sandbox" X then X echo "Added user \"${USER}\"." X else X echo "Adding user \"${USER}\" failed..." X exit 1 X fi Xfi ec1b53d6df70fc555d056226548a809f echo c - zabbix-proxy/files mkdir -p zabbix-proxy/files > /dev/null 2>&1 echo x - zabbix-proxy/files/pkg-message.in sed 's/^X//' >zabbix-proxy/files/pkg-message.in << 'd54091589aeb600cad9c5916feb5e391' X=============================================================== XYou can prepare a database for zabbix this way: X% cd %%DATADIR%%/create X% cat schema/<db>.sql data/data.sql data/images_<db>.sql\ X% | <db_client> Xwhere <db> is your preferred database engine. X=============================================================== d54091589aeb600cad9c5916feb5e391 echo x - zabbix-proxy/files/zabbix_proxy.sh.in sed 's/^X//' >zabbix-proxy/files/zabbix_proxy.sh.in << '7722c54760a4e1b5c740146309e2e741' X#!/bin/sh X# PROVIDE: zabbix_proxy X# REQUIRE: DAEMON X# KEYWORD: shutdown X X. %%RC_SUBR%% X Xname="zabbix_proxy" Xrcvar=${name}_enable Xload_rc_config $name Xeval : \${${rcvar}='NO'} X Xcommand="%%PREFIX%%/bin/${name}" Xrequired_files="%%ETCDIR%%/${name}.conf" X Xrun_rc_command "$1" 7722c54760a4e1b5c740146309e2e741 echo x - zabbix-proxy/pkg-plist sed 's/^X//' >zabbix-proxy/pkg-plist << '5763287cc26d7086c8b996cbadc47a84' Xbin/zabbix_proxy X%%ETCDIR%%/zabbix_proxy.conf.sample X%%DATADIR%%/create/data/data.sql X%%DATADIR%%/create/data/images/Hub.png X%%DATADIR%%/create/data/images/Hub_small.png X%%DATADIR%%/create/data/images/Network.png X%%DATADIR%%/create/data/images/Network_small.png X%%DATADIR%%/create/data/images/Notebook.png X%%DATADIR%%/create/data/images/Notebook_small.png X%%DATADIR%%/create/data/images/Phone.png X%%DATADIR%%/create/data/images/Phone_small.png X%%DATADIR%%/create/data/images/Printer.png X%%DATADIR%%/create/data/images/Printer_small.png X%%DATADIR%%/create/data/images/Router.png X%%DATADIR%%/create/data/images/Router_small.png X%%DATADIR%%/create/data/images/Satellite.png X%%DATADIR%%/create/data/images/Satellite_small.png X%%DATADIR%%/create/data/images/Server.png X%%DATADIR%%/create/data/images/Server_small.png X%%DATADIR%%/create/data/images/UPS.png X%%DATADIR%%/create/data/images/UPS_small.png X%%DATADIR%%/create/data/images/Workstation.png X%%DATADIR%%/create/data/images/Workstation_small.png X%%DATADIR%%/create/data/images_mysql.sql X%%DATADIR%%/create/data/images_oracle.sql X%%DATADIR%%/create/data/images_pgsql.sql X%%DATADIR%%/create/data/images_sqlite3.sql X%%DATADIR%%/create/schema/mysql.sql X%%DATADIR%%/create/schema/oracle.sql X%%DATADIR%%/create/schema/postgresql.sql X%%DATADIR%%/create/schema/sqlite.sql X%%DATADIR%%/dbpatches/1.6/mysql/patch.sql X%%DATADIR%%/dbpatches/1.6/oracle/patch.sql X%%DATADIR%%/dbpatches/1.6/postgresql/patch.sql X@dirrm %%DATADIR%%/dbpatches/1.6/postgresql X@dirrm %%DATADIR%%/dbpatches/1.6/oracle X@dirrm %%DATADIR%%/dbpatches/1.6/mysql X@dirrm %%DATADIR%%/dbpatches/1.6 X@dirrm %%DATADIR%%/dbpatches X@dirrm %%DATADIR%%/create/schema X@dirrm %%DATADIR%%/create/data/images X@dirrm %%DATADIR%%/create/data X@dirrm %%DATADIR%%/create X@dirrm %%ETCDIR%% 5763287cc26d7086c8b996cbadc47a84 exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909090452.n894qpbs016187>