Date: Fri, 15 Feb 2013 14:00:02 GMT From: Mark Linimon <linimon@lonesome.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/176106: net-mgmt/collect5 port update Message-ID: <201302151400.r1FE02Pv011884@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/176106; it has been noted by GNATS. From: Mark Linimon <linimon@lonesome.com> To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/176106: net-mgmt/collect5 port update Date: Fri, 15 Feb 2013 07:55:13 -0600 ----- Forwarded message from Krzysztof Stryjek <ports@bsdserwis.com> ----- Date: Fri, 15 Feb 2013 10:42:05 +0100 From: Krzysztof Stryjek <ports@bsdserwis.com> To: miwi@FreeBSD.org Cc: freebsd-ports-bugs@FreeBSD.org, ports@bsdserwis.com Subject: Re: ports/176106: net-mgmt/collect5 port update User-Agent: Mutt/1.5.21 (2010-09-15) Hello, On Thu, Feb 14, 2013 at 08:12:54AM +0000, miwi@FreeBSD.org wrote: > Synopsis: net-mgmt/collect5 port update > > State-Changed-From-To: open->feedback > State-Changed-By: miwi > State-Changed-When: Thu Feb 14 08:12:54 UTC 2013 > State-Changed-Why: > Build failes > http://miwibox.org/tb/index.php?action=describe_port&id=1692 > > http://www.freebsd.org/cgi/query-pr.cgi?pr=176106 > I've checked port once again. I've tested it via tinderbox. I receive no errors, so hope that everything will pass all tests. New patch for port attached. Greetings, -- Krzysztof Stryjek UNIX administrator/Juniper Networks Specialist email: wtp (at) bsdserwis (dot) com http://www.linkedin.com/in/KrzysztofStryjek GPG fingerprint: 8BD7 40CE 8994 0BBE CE6C 91CD 1292 8959 DC61 0E76 In theory, there is no difference between theory and practice. In practice, there is. diff -ruN collectd5/Makefile collectd5.new/Makefile --- collectd5/Makefile 2013-01-16 05:20:25.000000000 +0100 +++ collectd5.new/Makefile 2013-02-15 10:38:53.000000000 +0100 @@ -1,8 +1,7 @@ # Created by: Matt Peterson <matt@peterson.org> # $FreeBSD: ports/net-mgmt/collectd5/Makefile,v 1.49 2013/01/13 22:45:03 svnexp Exp $ PORTNAME= collectd -PORTVERSION= 5.1.0 -PORTREVISION= 5 +PORTVERSION= 5.1.2 CATEGORIES= net-mgmt MASTER_SITES= http://collectd.org/files/ @@ -22,7 +21,7 @@ OPTIONS_GROUP_INPUT= APACHE APCUPS CURL CURL_JSON CURL_XML DBI DISK GCRYPT \ NUTUPS INTERFACE IPMI MBMON MEMCACHED MYSQL NGINX \ OPENVPN PDNS PGSQL PING PYTHON ROUTEROS SNMP TABLE \ - TOKYOTYRANT VARNISH XMMS + TOKYOTYRANT VARNISH XMMS ZFS_ARC OPTIONS_DEFAULT= BIND INTERFACE PING SNMP RRDTOOL RRDCACHED @@ -58,6 +57,7 @@ TOKYOTYRANT_DESC= Tokyotyrant database VARNISH_DESC= Varnish plugin XMMS_DESC= XMMS +ZFS_ARC_DESC= ZFS ARC plugin # OUTPUT RRDTOOL_DESC= RRDTool RRDCACHED_DESC= RRDTool Cached (requires RRDTOOL) @@ -140,8 +140,6 @@ --disable-wireless \ --without-perl-bindings \ --without-librabbitmq \ - --disable-varnish \ - --without-libvarnish \ --without-libcredis \ --without-libganglia \ --without-libupsclient \ @@ -469,6 +467,14 @@ PLIST_SUB+= XMMS="@comment " .endif +.if ${PORT_OPTIONS:MZFS_ARC} +CONFIGURE_ARGS+=--enable-zfs_arc +PLIST_SUB+= ZFS_ARC="" +.else +CONFIGURE_ARGS+=--disable-zfs_arc +PLIST_SUB+= ZFS_ARC="@comment " +.endif + AUTOTOOLSFILES= aclocal.m4 post-patch: diff -ruN collectd5/distinfo collectd5.new/distinfo --- collectd5/distinfo 2012-04-13 05:20:13.000000000 +0200 +++ collectd5.new/distinfo 2013-02-15 10:38:53.000000000 +0100 @@ -1,2 +1,2 @@ -SHA256 (collectd-5.1.0.tar.gz) = 8e06c03c5467f3021565570fc86c931a43579aa6dad25ca5999d66850cd19927 -SIZE (collectd-5.1.0.tar.gz) = 1630323 +SHA256 (collectd-5.1.2.tar.gz) = a4833a3337eaaf781e3232cba0823ca589e7583cee57c559ada6bccea2bb3ba9 +SIZE (collectd-5.1.2.tar.gz) = 1714146 diff -ruN collectd5/files/patch-configure.in collectd5.new/files/patch-configure.in --- collectd5/files/patch-configure.in 2013-01-16 05:20:26.000000000 +0100 +++ collectd5.new/files/patch-configure.in 2013-02-15 10:38:53.000000000 +0100 @@ -1,81 +1,15 @@ ---- configure.in.orig 2012-04-02 08:04:58.000000000 +0000 -+++ configure.in 2012-11-23 22:00:22.424129087 +0000 -@@ -67,6 +67,9 @@ - *openbsd*) - ac_system="OpenBSD" - ;; -+ *freebsd*) -+ ac_system="FreeBSD" -+ ;; - *aix*) - AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel]) - ac_system="AIX" -@@ -98,7 +101,7 @@ - fi - - # Where to install .pc files. --pkgconfigdir="${libdir}/pkgconfig" -+pkgconfigdir="${prefix}/libdata/pkgconfig" - AC_SUBST(pkgconfigdir) - - # Check for standards compliance mode -@@ -1378,6 +1381,7 @@ - then - AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], []) - fi -+ - if test "x$with_kstat" = "xyes" - then - AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], []) -@@ -1387,6 +1391,8 @@ - then - AC_DEFINE(HAVE_LIBKSTAT, 1, - [Define to 1 if you have the 'kstat' library (-lkstat)]) -+ BUILD_WITH_LIBKSTAT_LIBS="-lkstat" -+ AC_SUBST(BUILD_WITH_LIBKSTAT_LIBS) - fi - AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes") - AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes") -@@ -1807,9 +1813,6 @@ - [with_libgcrypt="yes"], - [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"]) - -- if test "$with_libgcrypt" != "no"; then -- AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)") -- fi - fi - - CPPFLAGS="$SAVE_CPPFLAGS" -@@ -3297,7 +3300,7 @@ - if test "x$with_python" = "xyes" - then - 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_flags" = "x" -@@ -3312,7 +3315,7 @@ - if test "x$with_python" = "xyes" - 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"], ---- configure.in.orig 2013-01-03 17:07:22.000000000 +0000 -+++ configure.in 2013-01-03 17:07:58.000000000 +0000 -@@ -4057,7 +4057,7 @@ +--- configure.in.orig 2013-02-14 09:19:13.000000000 +0100 ++++ configure.in 2013-02-14 09:24:19.000000000 +0100 +@@ -4136,7 +4136,7 @@ then AC_MSG_NOTICE([Not checking for libvarnish: Manually configured]) with_libvarnish_cflags="-I$withval/include" -- with_libvarnish_libs="-L$withval/lib -lvarnish -lvarnishcompat -lvarnishapi" -+ with_libvarnish_libs="-L$withval/lib/varnish -lvarnish -lvarnishcompat -lvarnishapi" +- with_libvarnish_libs="-L$withval/lib -lvarnishapi" ++ with_libvarnish_libs="-L$withval/lib/varnish -lvarnishapi" with_libvarnish="yes" fi; fi; fi ], -@@ -4580,6 +4583,12 @@ +@@ -4659,6 +4659,12 @@ plugin_zfs_arc="yes" fi diff -ruN collectd5/files/patch-src__network.c collectd5.new/files/patch-src__network.c --- collectd5/files/patch-src__network.c 2011-07-15 04:38:07.000000000 +0200 +++ collectd5.new/files/patch-src__network.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ ---- src/network.c.orig 2011-07-14 15:41:32.000000000 +0200 -+++ src/network.c 2011-07-14 15:41:37.000000000 +0200 -@@ -58,7 +58,9 @@ - #endif - - #if HAVE_LIBGCRYPT -+#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - # include <gcrypt.h> -+#pragma GCC diagnostic warning "-Wdeprecated-declarations" - GCRY_THREAD_OPTION_PTHREAD_IMPL; - #endif - diff -ruN collectd5/files/patch-src__zfs_arc.c collectd5.new/files/patch-src__zfs_arc.c --- collectd5/files/patch-src__zfs_arc.c 2012-12-30 23:12:16.000000000 +0100 +++ collectd5.new/files/patch-src__zfs_arc.c 2013-02-15 10:38:53.000000000 +0100 @@ -1,6 +1,6 @@ ---- src/zfs_arc.c.orig 2012-04-02 08:04:58.000000000 +0000 -+++ src/zfs_arc.c 2012-11-24 17:54:21.715129054 +0000 -@@ -25,11 +25,57 @@ +--- src/zfs_arc.c.orig 2013-01-27 14:41:49.746768000 +0100 ++++ src/zfs_arc.c 2013-02-14 13:17:58.000000000 +0100 +@@ -25,12 +25,59 @@ #include "common.h" #include "plugin.h" @@ -11,7 +11,7 @@ /* * Global variables */ --static kstat_t *ksp; + +#if defined(HAVE_LIBKSTAT) extern kstat_ctl_t *kc; +#endif @@ -37,7 +37,7 @@ +#endif + return 0; +} -+ + +static long long za_get_value(struct za_context *ctx, const char* name) +{ +#if defined(HAVE_LIBKSTAT) @@ -56,10 +56,11 @@ + return result; +#endif +} - ++ static void za_submit (const char* type, const char* type_instance, value_t* values, int values_len) { -@@ -54,13 +100,13 @@ + value_list_t vl = VALUE_LIST_INIT; +@@ -54,13 +101,13 @@ za_submit (type, type_instance, &vv, 1); } @@ -70,16 +71,13 @@ long long tmp; value_t v; -- tmp = get_kstat_value (ksp, kstat_value); +- tmp = get_kstat_value (ksp, (char *)kstat_value); + tmp = za_get_value (ctx, (char *)kstat_value); if (tmp == -1LL) { ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_value); -@@ -69,15 +115,16 @@ - - v.derive = (derive_t) tmp; - za_submit (type, type_instance, /* values = */ &v, /* values_num = */ 1); -+ return (0); +@@ -72,13 +119,13 @@ + return (0); } -static int za_read_gauge (kstat_t *ksp, const char *kstat_value, @@ -89,16 +87,13 @@ long long tmp; value_t v; -- tmp = get_kstat_value (ksp, kstat_value); +- tmp = get_kstat_value (ksp, (char *)kstat_value); + tmp = za_get_value (ctx, (char *)kstat_value); if (tmp == -1LL) { ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_value); -@@ -86,18 +133,14 @@ - - v.gauge = (gauge_t) tmp; - za_submit (type, type_instance, /* values = */ &v, /* values_num = */ 1); -+ return (0); +@@ -90,74 +137,68 @@ + return (0); } -static void za_submit_ratio (const char* type_instance, gauge_t hits, gauge_t misses) @@ -116,13 +111,15 @@ ratio = hits / (hits + misses); za_submit_gauge ("cache_ratio", type_instance, ratio); -@@ -105,56 +148,55 @@ ++ return (0); + } static int za_read (void) { - gauge_t arc_hits, arc_misses, l2_hits, l2_misses; -+ long long arc_hits, arc_misses, l2_hits, l2_misses; ++ long long arc_hits, arc_misses, l2_hits, l2_misses; value_t l2_io[2]; +- kstat_t *ksp = NULL; + struct za_context ctx; - get_kstat (&ksp, "zfs", 0, "arcstats"); @@ -136,36 +133,22 @@ /* Sizes */ - za_read_gauge (ksp, "size", "cache_size", "arc"); - za_read_gauge (ksp, "l2_size", "cache_size", "L2"); -+ za_read_gauge (&ctx, "size", "cache_size", "arc"); -+ za_read_gauge (&ctx, "l2_size", "cache_size", "L2"); - +- - /* Operations */ - za_read_derive (ksp, "allocated","cache_operation", "allocated"); - za_read_derive (ksp, "deleted", "cache_operation", "deleted"); - za_read_derive (ksp, "stolen", "cache_operation", "stolen"); - - /* Issue indicators */ -- za_read_derive (ksp, "mutex_miss", "mutex_operation", "miss"); +- za_read_derive (ksp, "mutex_miss", "mutex_operations", "miss"); - za_read_derive (ksp, "hash_collisions", "hash_collisions", ""); -+ /* Operations */ -+ za_read_derive (&ctx, "allocated","cache_operation", "allocated"); -+ za_read_derive (&ctx, "deleted", "cache_operation", "deleted"); -+ za_read_derive (&ctx, "stolen", "cache_operation", "stolen"); -+ -+ /* Issue indicators */ -+ za_read_derive (&ctx, "mutex_miss", "mutex_operation", "miss"); -+ za_read_derive (&ctx, "hash_collisions", "hash_collisions", ""); - +- - /* Evictions */ - za_read_derive (ksp, "evict_l2_cached", "cache_eviction", "cached"); - za_read_derive (ksp, "evict_l2_eligible", "cache_eviction", "eligible"); - za_read_derive (ksp, "evict_l2_ineligible", "cache_eviction", "ineligible"); -+ /* Evictions */ -+ za_read_derive (&ctx, "evict_l2_cached", "cache_eviction", "cached"); -+ za_read_derive (&ctx, "evict_l2_eligible", "cache_eviction", "eligible"); -+ za_read_derive (&ctx, "evict_l2_ineligible", "cache_eviction", "ineligible"); - - /* Hits / misses */ +- +- /* Hits / misses */ - za_read_derive (ksp, "demand_data_hits", "cache_result", "demand_data-hit"); - za_read_derive (ksp, "demand_metadata_hits", "cache_result", "demand_metadata-hit"); - za_read_derive (ksp, "prefetch_data_hits", "cache_result", "prefetch_data-hit"); @@ -174,6 +157,37 @@ - za_read_derive (ksp, "demand_metadata_misses", "cache_result", "demand_metadata-miss"); - za_read_derive (ksp, "prefetch_data_misses", "cache_result", "prefetch_data-miss"); - za_read_derive (ksp, "prefetch_metadata_misses", "cache_result", "prefetch_metadata-miss"); +- +- /* Ratios */ +- arc_hits = (gauge_t) get_kstat_value(ksp, "hits"); +- arc_misses = (gauge_t) get_kstat_value(ksp, "misses"); +- l2_hits = (gauge_t) get_kstat_value(ksp, "l2_hits"); +- l2_misses = (gauge_t) get_kstat_value(ksp, "l2_misses"); +- +- za_submit_ratio ("arc", arc_hits, arc_misses); +- za_submit_ratio ("L2", l2_hits, l2_misses); +- +- /* I/O */ +- l2_io[0].derive = get_kstat_value(ksp, "l2_read_bytes"); +- l2_io[1].derive = get_kstat_value(ksp, "l2_write_bytes"); ++ za_read_gauge (&ctx, "size", "cache_size", "arc"); ++ za_read_gauge (&ctx, "l2_size", "cache_size", "L2"); ++ ++ /* Operations */ ++ za_read_derive (&ctx, "allocated","cache_operation", "allocated"); ++ za_read_derive (&ctx, "deleted", "cache_operation", "deleted"); ++ za_read_derive (&ctx, "stolen", "cache_operation", "stolen"); ++ ++ /* Issue indicators */ ++ za_read_derive (&ctx, "mutex_miss", "mutex_operation", "miss"); ++ za_read_derive (&ctx, "hash_collisions", "hash_collisions", ""); ++ ++ /* Evictions */ ++ za_read_derive (&ctx, "evict_l2_cached", "cache_eviction", "cached"); ++ za_read_derive (&ctx, "evict_l2_eligible", "cache_eviction", "eligible"); ++ za_read_derive (&ctx, "evict_l2_ineligible", "cache_eviction", "ineligible"); ++ ++ /* Hits / misses */ + za_read_derive (&ctx, "demand_data_hits", "cache_result", "demand_data-hit"); + za_read_derive (&ctx, "demand_metadata_hits", "cache_result", "demand_metadata-hit"); + za_read_derive (&ctx, "prefetch_data_hits", "cache_result", "prefetch_data-hit"); @@ -182,34 +196,26 @@ + za_read_derive (&ctx, "demand_metadata_misses", "cache_result", "demand_metadata-miss"); + za_read_derive (&ctx, "prefetch_data_misses", "cache_result", "prefetch_data-miss"); + za_read_derive (&ctx, "prefetch_metadata_misses", "cache_result", "prefetch_metadata-miss"); - - /* Ratios */ -- arc_hits = (gauge_t) get_kstat_value(ksp, "hits"); -- arc_misses = (gauge_t) get_kstat_value(ksp, "misses"); -- l2_hits = (gauge_t) get_kstat_value(ksp, "l2_hits"); -- l2_misses = (gauge_t) get_kstat_value(ksp, "l2_misses"); ++ ++ /* Ratios */ + arc_hits = za_get_value (&ctx, "hits"); + arc_misses = za_get_value (&ctx, "misses"); + l2_hits = za_get_value (&ctx, "l2_hits"); + l2_misses = za_get_value (&ctx, "l2_misses"); - - za_submit_ratio ("arc", arc_hits, arc_misses); - za_submit_ratio ("L2", l2_hits, l2_misses); - - /* I/O */ -- l2_io[0].derive = get_kstat_value(ksp, "l2_read_bytes"); -- l2_io[1].derive = get_kstat_value(ksp, "l2_write_bytes"); ++ ++ za_submit_ratio ("arc", arc_hits, arc_misses); ++ za_submit_ratio ("L2", l2_hits, l2_misses); ++ ++ /* I/O */ + l2_io[0].derive = za_get_value (&ctx, "l2_read_bytes"); + l2_io[1].derive = za_get_value (&ctx, "l2_write_bytes"); za_submit ("io_octets", "L2", l2_io, /* num values = */ 2); -@@ -163,14 +205,23 @@ +@@ -166,12 +207,23 @@ static int za_init (void) /* {{{ */ { -- ksp = NULL; -- +#if defined(HAVE_LIBKSTAT) /* kstats chain already opened by update_kstat (using *kc), verify everything went fine. */ if (kc == NULL) diff -ruN collectd5/files/patch-version-gen.sh collectd5.new/files/patch-version-gen.sh --- collectd5/files/patch-version-gen.sh 2012-04-12 07:56:09.000000000 +0200 +++ collectd5.new/files/patch-version-gen.sh 2013-02-15 10:38:54.000000000 +0100 @@ -1,11 +1,12 @@ ---- version-gen.sh.orig 2012-04-09 20:04:16.130293641 -0500 -+++ version-gen.sh 2012-04-09 20:05:04.927297496 -0500 -@@ -1,17 +1,3 @@ +--- version-gen.sh.orig 2013-01-27 14:41:49.746768000 +0100 ++++ version-gen.sh 2013-02-14 13:21:19.000000000 +0100 +@@ -1,13 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh --DEFAULT_VERSION="5.1.0.git" -- +-DEFAULT_VERSION="5.1.2.git" ++echo -n "5.1.2.git" + -VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`" - -if test -z "$VERSION"; then @@ -14,9 +15,4 @@ - -VERSION="`echo \"$VERSION\" | sed -e 's/-/./g'`" - --if test "x`uname -s`" = "xAIX" ; then -- echo "$VERSION\c" --else -- echo -n "$VERSION" --fi -+echo -n "5.1.0.git" +-echo -n "$VERSION" diff -ruN collectd5/pkg-plist collectd5.new/pkg-plist --- collectd5/pkg-plist 2013-01-16 05:20:26.000000000 +0100 +++ collectd5.new/pkg-plist 2013-02-15 10:38:54.000000000 +0100 @@ -119,8 +119,8 @@ %%VIRT%%lib/collectd/libvirt.so %%WRITE_GRAPHITE%%lib/collectd/write_graphite.so %%WRITE_GRAPHITE%%lib/collectd/write_graphite.la -lib/collectd/zfs_arc.la -lib/collectd/zfs_arc.so +%%ZFS_ARC%%lib/collectd/zfs_arc.la +%%ZFS_ARC%%lib/collectd/zfs_arc.so lib/libcollectdclient.la lib/libcollectdclient.so lib/libcollectdclient.so.0 _______________________________________________ freebsd-ports-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org" ----- End forwarded message -----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302151400.r1FE02Pv011884>