Date: Tue, 4 Mar 2014 12:28:10 +0100 (CET) From: Krzysztof Stryjek <ports@bsdserwis.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/187254: Update net-mgmt/collectd5 to new version; add mongodb plugin Message-ID: <20140304112810.11F282CC1899@mx1.bsdserwis.com> Resent-Message-ID: <201403041130.s24BU0ad093186@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 187254 >Category: ports >Synopsis: Update net-mgmt/collectd5 to new version; add mongodb plugin >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Mar 04 11:30:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Krzysztof Stryjek >Release: FreeBSD 8.3-RELEASE amd64 >Organization: private >Environment: System: FreeBSD cmd.bsdserwis.local 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon May 20 11:38:42 CEST 2013 toor@cmd.bsdserwis.local:/usr/obj/usr/src/sys/AQQ amd64 >Description: There is new version of collectd 5.x branch. During testing this new version entropy plugin was disabled. I've added mongodb plugin >How-To-Repeat: None. >Fix: There is patch for whole port to new version: ---------------------------------------------------- cut here ---------------------------------------------------- diff -ruN collectd5/Makefile collectd5.new/Makefile --- collectd5/Makefile 2014-01-10 09:25:34.000000000 +0100 +++ collectd5.new/Makefile 2014-03-04 12:02:16.000000000 +0100 @@ -2,8 +2,7 @@ # $FreeBSD: head/net-mgmt/collectd5/Makefile 339321 2014-01-10 08:25:34Z demon $ PORTNAME= collectd -PORTVERSION= 5.4.0 -PORTREVISION= 3 +PORTVERSION= 5.4.1 PKGNAMESUFFIX= 5 CATEGORIES= net-mgmt MASTER_SITES= http://collectd.org/files/ @@ -22,7 +21,7 @@ OPTIONS_DEFINE= CGI DEBUG GCRYPT VIRT OPTIONS_GROUP= INPUT OUTPUT OPTIONS_GROUP_OUTPUT= RRDTOOL NOTIFYEMAIL NOTIFYDESKTOP -OPTIONS_GROUP_INPUT= CURL DBI JSON MEMCACHEC MODBUS MYSQL \ +OPTIONS_GROUP_INPUT= CURL DBI JSON MEMCACHEC MODBUS MONGODB MYSQL \ NUTUPS PGSQL PING PYTHON RABBITMQ REDIS \ ROUTEROS SIGROK SNMP STATGRAB TOKYOTYRANT XML XMMS @@ -34,6 +33,7 @@ JSON_DESC= Enable JSON plugins MEMCACHEC_DESC= Enable memcachec plugin MODBUS_DESC= Enable modbus plugin +MONGODB_DESC= Enable MongoDB-based plugins MYSQL_DESC= Enable mysql-based plugins NOTIFYEMAIL_DESC= Enable notifications via email NOTIFYDESKTOP_DESC= Enable desktop notifications @@ -68,13 +68,14 @@ CONFIGURE_ARGS= --localstatedir=/var \ --disable-all-plugins \ --disable-static \ + --without-amqp \ --without-java \ + --without-libaquaero5 \ --without-libganglia \ --without-libiptc \ --without-libjvm \ --without-libkstat \ --without-libmodbus \ - --without-libmongoc \ --without-libnetlink \ --without-libnetapp \ --without-libopenipmi \ @@ -83,6 +84,8 @@ --without-libperl \ --without-libsensors \ --without-libvarnish \ + --without-lvm \ + --without-mic \ --without-oracle \ --without-perl-bindings @@ -233,6 +236,17 @@ PLIST_SUB+= MODBUS="@comment " .endif +.if ${PORT_OPTIONS:MMONGODB} +LIB_DEPENDS+= libmongoc.so:${PORTSDIR}/devel/mongo-c-driver +CONFIGURE_ARGS+=--with-libmongoc=${LOCALBASE} \ + --enable-write_mongodb +PLIST_SUB+= MONGODB="" +.else +CONFIGURE_ARGS+=--without-libcmongoc \ + --disable-write_mongodb +PLIST_SUB+= MONGODB="@comment " +.endif + .if ${PORT_OPTIONS:MMYSQL} USE_MYSQL= yes CONFIGURE_ARGS+=--with-libmysql=${LOCALBASE} --enable-mysql @@ -443,7 +457,7 @@ ${WRKSRC}/contrib/collection.conf @${REINPLACE_CMD} \ -e 's;{libdir}/pkgconfig;{prefix}/libdata/pkgconfig;' \ - ${WRKSRC}/configure.in + ${WRKSRC}/configure.ac post-install: @${MKDIR} ${STAGEDIR}/var/db/collectd diff -ruN collectd5/distinfo collectd5.new/distinfo --- collectd5/distinfo 2013-09-13 03:32:38.000000000 +0200 +++ collectd5.new/distinfo 2014-02-28 23:22:57.000000000 +0100 @@ -1,2 +1,2 @@ -SHA256 (collectd-5.4.0.tar.bz2) = 90973894a1f10775d409fe23ce7bc4d89c1b7c6f4d9918b305d160605871923e -SIZE (collectd-5.4.0.tar.bz2) = 1506520 +SHA256 (collectd-5.4.1.tar.bz2) = 75452129f271cb0aad28e57f12a49070618bbb7b6a9d64cf869e8766fa2f66e0 +SIZE (collectd-5.4.1.tar.bz2) = 1521907 diff -ruN collectd5/files/patch-configure.ac collectd5.new/files/patch-configure.ac --- collectd5/files/patch-configure.ac 2014-02-28 23:49:44.000000000 +0100 +++ collectd5.new/files/patch-configure.ac 2014-03-04 11:57:24.000000000 +0100 @@ -1,5 +1,5 @@ --- configure.ac.orig 2014-01-26 09:09:23.512559000 +0100 -+++ configure.ac 2014-02-28 23:49:11.000000000 +0100 ++++ configure.ac 2014-03-04 11:57:05.000000000 +0100 @@ -111,7 +111,7 @@ fi @@ -32,27 +32,25 @@ fi CPPFLAGS="$SAVE_CPPFLAGS" -@@ -3458,7 +3455,7 @@ +@@ -3473,7 +3470,7 @@ if test "x$with_python" = "xyes" then - AC_MSG_CHECKING([for Python LDFLAGS]) -- python_library_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0))" | "$with_python_prog" 2>&1` + AC_MSG_CHECKING([for Python LIBS]) +- python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1` + python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_var(\"LINKFORSHARED\")+\" -L\"+distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0)+\" -l\"+distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0).replace(\"lib\", \"\").replace(\".a\", \"\"))" | "$with_python_prog" 2>&1` python_config_status=$? - if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x" -@@ -3486,9 +3483,8 @@ - fi - + if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x" +@@ -3488,7 +3485,7 @@ if test "x$with_python" = "xyes" --then + then LDFLAGS="-L$python_library_path $LDFLAGS" - LIBS="$python_library_flags $LIBS" + LIBS="$python_library_flags $LIBS -lm -lpthread -lutil" AC_CHECK_FUNC(PyObject_CallFunction, [with_python="yes"], -@@ -4393,7 +4389,7 @@ +@@ -4393,7 +4390,7 @@ then AC_MSG_NOTICE([Not checking for libvarnish: Manually configured]) with_libvarnish_cflags="-I$withval/include" diff -ruN collectd5/files/patch-src-curl_xml.c collectd5.new/files/patch-src-curl_xml.c --- collectd5/files/patch-src-curl_xml.c 2014-01-02 21:28:45.000000000 +0100 +++ collectd5.new/files/patch-src-curl_xml.c 2014-02-28 23:41:46.000000000 +0100 @@ -1,11 +1,11 @@ ---- src/curl_xml.c.orig 2013-08-18 14:24:25.069973000 +0400 -+++ src/curl_xml.c 2014-01-03 00:25:17.000000000 +0400 +--- src/curl_xml.c.orig 2014-01-26 09:09:23.528559000 +0100 ++++ src/curl_xml.c 2014-02-28 23:28:54.000000000 +0100 @@ -607,7 +607,7 @@ int status; long rc; char *ptr; - char *url; + char *url = NULL; + url = db->url; db->buffer_fill = 0; - status = curl_easy_perform (curl); diff -ruN collectd5/files/patch-src-interface.c collectd5.new/files/patch-src-interface.c --- collectd5/files/patch-src-interface.c 2014-01-05 09:14:25.000000000 +0100 +++ collectd5.new/files/patch-src-interface.c 2014-02-28 23:41:46.000000000 +0100 @@ -1,36 +1,37 @@ ---- src/interface.c.orig 2014-01-05 00:36:58.000000000 +0400 -+++ src/interface.c 2014-01-05 00:45:10.000000000 +0400 -@@ -212,20 +212,19 @@ static int interface_read (void) +--- src/interface.c.orig 2014-01-26 09:09:14.860391000 +0100 ++++ src/interface.c 2014-02-28 23:32:40.000000000 +0100 +@@ -212,21 +212,19 @@ return (-1); for (if_ptr = if_list; if_ptr != NULL; if_ptr = if_ptr->ifa_next) - { -- if ((if_data = (struct IFA_DATA *) if_ptr->ifa_data) == NULL) -- continue; +- if (if_ptr->ifa_addr != NULL && if_ptr->ifa_addr->sa_family == AF_LINK) { +- if_data = (struct IFA_DATA *) if_ptr->ifa_data; - -- if_submit (if_ptr->ifa_name, "if_octets", +- if_submit (if_ptr->ifa_name, "if_octets", - if_data->IFA_RX_BYTES, - if_data->IFA_TX_BYTES); -- if_submit (if_ptr->ifa_name, "if_packets", +- if_submit (if_ptr->ifa_name, "if_packets", - if_data->IFA_RX_PACKT, - if_data->IFA_TX_PACKT); -- if_submit (if_ptr->ifa_name, "if_errors", +- if_submit (if_ptr->ifa_name, "if_errors", - if_data->IFA_RX_ERROR, - if_data->IFA_TX_ERROR); +- } - } -+ if (if_ptr->ifa_addr != NULL && if_ptr->ifa_addr->sa_family == AF_LINK) { -+ if_data = (struct IFA_DATA *) if_ptr->ifa_data; -+ -+ if_submit (if_ptr->ifa_name, "if_octets", -+ if_data->IFA_RX_BYTES, -+ if_data->IFA_TX_BYTES); -+ if_submit (if_ptr->ifa_name, "if_packets", -+ if_data->IFA_RX_PACKT, -+ if_data->IFA_TX_PACKT); -+ if_submit (if_ptr->ifa_name, "if_errors", -+ if_data->IFA_RX_ERROR, -+ if_data->IFA_TX_ERROR); -+ } ++ if (if_ptr->ifa_addr != NULL && if_ptr->ifa_addr->sa_family == AF_LINK) { ++ if_data = (struct IFA_DATA *) if_ptr->ifa_data; ++ ++ if_submit (if_ptr->ifa_name, "if_octets", ++ if_data->IFA_RX_BYTES, ++ if_data->IFA_TX_BYTES); ++ if_submit (if_ptr->ifa_name, "if_packets", ++ if_data->IFA_RX_PACKT, ++ if_data->IFA_TX_PACKT); ++ if_submit (if_ptr->ifa_name, "if_errors", ++ if_data->IFA_RX_ERROR, ++ if_data->IFA_TX_ERROR); ++ } freeifaddrs (if_list); /* #endif HAVE_GETIFADDRS */ diff -ruN collectd5/files/patch-src_modbus.c collectd5.new/files/patch-src_modbus.c --- collectd5/files/patch-src_modbus.c 2013-05-15 13:38:21.000000000 +0200 +++ collectd5.new/files/patch-src_modbus.c 2014-02-28 23:41:46.000000000 +0100 @@ -1,11 +1,11 @@ ---- src/modbus.c.orig 2013-01-27 17:47:18.246255000 +0400 -+++ src/modbus.c 2013-05-14 18:40:05.000000000 +0400 +--- src/modbus.c.orig 2014-01-26 09:09:14.876392000 +0100 ++++ src/modbus.c 2014-02-28 23:35:41.000000000 +0100 @@ -25,6 +25,9 @@ #include "plugin.h" #include "configfile.h" +/* FreeBSD needs this */ -+#include <sys/socket.h> ++#include <sys/socket.h> + #include <netdb.h> diff -ruN collectd5/files/patch-version-gen.sh collectd5.new/files/patch-version-gen.sh --- collectd5/files/patch-version-gen.sh 2013-09-13 03:32:38.000000000 +0200 +++ collectd5.new/files/patch-version-gen.sh 2014-02-28 23:41:46.000000000 +0100 @@ -1,10 +1,9 @@ ---- version-gen.sh.orig 2013-08-19 10:57:47.000000000 -0600 -+++ version-gen.sh 2013-08-19 10:58:15.000000000 -0600 -@@ -1,13 +1,3 @@ +--- version-gen.sh.orig 2014-01-26 09:09:23.540560000 +0100 ++++ version-gen.sh 2014-02-28 23:34:20.000000000 +0100 +@@ -1,13 +1,2 @@ -#!/usr/bin/env bash -+#!/bin/sh - --DEFAULT_VERSION="5.4.0.git" +- +-DEFAULT_VERSION="5.4.1.git" - -VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" - @@ -15,4 +14,5 @@ -VERSION="`echo \"$VERSION\" | sed -e 's/-/./g'`" - -echo -n "$VERSION" -+echo -n '5.4.0.git' ++#!/bin/sh ++echo -n '5.4.1.git' diff -ruN collectd5/pkg-plist collectd5.new/pkg-plist --- collectd5/pkg-plist 2014-01-10 09:25:34.000000000 +0100 +++ collectd5.new/pkg-plist 2014-03-01 00:11:27.000000000 +0100 @@ -226,6 +226,9 @@ %%CURL%%lib/collectd/write_http.a %%CURL%%lib/collectd/write_http.so %%CURL%%lib/collectd/write_http.la +%%MONGODB%%lib/collectd/write_mongodb.a +%%MONGODB%%lib/collectd/write_mongodb.so +%%MONGODB%%lib/collectd/write_mongodb.la %%REDIS%%lib/collectd/write_redis.a %%REDIS%%lib/collectd/write_redis.so %%REDIS%%lib/collectd/write_redis.la ---------------------------------------------------- cut here ---------------------------------------------------- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140304112810.11F282CC1899>