From: Marc Fournier Date: Tue, 27 Oct 2015 09:20:31 +0000 (+0100) Subject: add patch to let varnish plugin build against libvarnishapi 4.1 X-Git-Tag: collectd-5.5.0-4~1^2~1^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ec5f7407fa14d819a405b39455166c6bd96f41b5;p=pkg-collectd.git add patch to let varnish plugin build against libvarnishapi 4.1 --- diff --git a/debian/changelog b/debian/changelog index 6dc09d7..265ac20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ collectd (5.5.0-4) UNRELEASED; urgency=medium * debian/rules: - Strip out non-deterministic bits out of generated jar files. - Remove RTLD_GLOBAL workaround, which was fixed upstream. + * debian/patches: + - Add bts802249_varnish_41.patch (Closes: #802249) -- Marc Fournier Tue, 06 Oct 2015 21:27:57 +0200 diff --git a/debian/patches/bts802249_varnish_41.patch b/debian/patches/bts802249_varnish_41.patch new file mode 100644 index 0000000..a46c2aa --- /dev/null +++ b/debian/patches/bts802249_varnish_41.patch @@ -0,0 +1,70 @@ +Author: Marc Fournier +Description: disable metrics which have been removed from varnish 4.1.0. This +is a temporary fix to allow the build to succeed. Proper support for recent +varnish version is expected in a future collectd release. +https://github.com/collectd/collectd/issues/1302 keeps track of this problem. +--- a/src/varnish.c ++++ b/src/varnish.c +@@ -200,7 +200,7 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */ + /* Backend conn. reuses */ + varnish_submit_derive (conf->instance, "backend", "connections", "reuses" , stats->backend_reuse); + /* Backend conn. was closed */ +- varnish_submit_derive (conf->instance, "backend", "connections", "was-closed" , stats->backend_toolate); ++ //varnish_submit_derive (conf->instance, "backend", "connections", "was-closed" , stats->backend_toolate); + /* Backend conn. recycles */ + varnish_submit_derive (conf->instance, "backend", "connections", "recycled" , stats->backend_recycle); + #if HAVE_VARNISH_V2 +@@ -229,11 +229,11 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */ + /* Fetch bad headers */ + varnish_submit_derive (conf->instance, "fetch", "http_requests", "bad_headers", stats->fetch_bad); + /* Fetch wanted close */ +- varnish_submit_derive (conf->instance, "fetch", "http_requests", "close" , stats->fetch_close); ++ //varnish_submit_derive (conf->instance, "fetch", "http_requests", "close" , stats->fetch_close); + /* Fetch pre HTTP/1.1 closed */ +- varnish_submit_derive (conf->instance, "fetch", "http_requests", "oldhttp" , stats->fetch_oldhttp); ++ //varnish_submit_derive (conf->instance, "fetch", "http_requests", "oldhttp" , stats->fetch_oldhttp); + /* Fetch zero len */ +- varnish_submit_derive (conf->instance, "fetch", "http_requests", "zero" , stats->fetch_zero); ++ //varnish_submit_derive (conf->instance, "fetch", "http_requests", "zero" , stats->fetch_zero); + /* Fetch failed */ + varnish_submit_derive (conf->instance, "fetch", "http_requests", "failed" , stats->fetch_failed); + #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 +@@ -348,7 +348,7 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */ + /* Session Closed */ + varnish_submit_derive (conf->instance, "session", "total_operations", "closed", stats->sess_closed); + /* Session Pipeline */ +- varnish_submit_derive (conf->instance, "session", "total_operations", "pipeline", stats->sess_pipeline); ++ //varnish_submit_derive (conf->instance, "session", "total_operations", "pipeline", stats->sess_pipeline); + /* Session Read Ahead */ + varnish_submit_derive (conf->instance, "session", "total_operations", "readahead", stats->sess_readahead); + #if HAVE_VARNISH_V4 +@@ -359,7 +359,7 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */ + /* Sessions accept failure */ + varnish_submit_derive (conf->instance, "session", "total_operations", "failed", stats->sess_fail); + /* Sessions pipe overflow */ +- varnish_submit_derive (conf->instance, "session", "total_operations", "overflow", stats->sess_pipe_overflow); ++ //varnish_submit_derive (conf->instance, "session", "total_operations", "overflow", stats->sess_pipe_overflow); + /* Sessions queued for thread */ + varnish_submit_derive (conf->instance, "session", "total_operations", "queued", stats->sess_queued); + #else +@@ -415,15 +415,15 @@ static void varnish_monitor (const user_config_t *conf, /* {{{ */ + if (conf->collect_sms) + { + /* SMS allocator requests */ +- varnish_submit_derive (conf->instance, "sms", "total_requests", "allocator", stats->sms_nreq); ++ //varnish_submit_derive (conf->instance, "sms", "total_requests", "allocator", stats->sms_nreq); + /* SMS outstanding allocations */ +- varnish_submit_gauge (conf->instance, "sms", "requests", "outstanding", stats->sms_nobj); ++ //varnish_submit_gauge (conf->instance, "sms", "requests", "outstanding", stats->sms_nobj); + /* SMS outstanding bytes */ +- varnish_submit_gauge (conf->instance, "sms", "bytes", "outstanding", stats->sms_nbytes); ++ //varnish_submit_gauge (conf->instance, "sms", "bytes", "outstanding", stats->sms_nbytes); + /* SMS bytes allocated */ +- varnish_submit_derive (conf->instance, "sms", "total_bytes", "allocated", stats->sms_balloc); ++ //varnish_submit_derive (conf->instance, "sms", "total_bytes", "allocated", stats->sms_balloc); + /* SMS bytes freed */ +- varnish_submit_derive (conf->instance, "sms", "total_bytes", "free", stats->sms_bfree); ++ //varnish_submit_derive (conf->instance, "sms", "total_bytes", "free", stats->sms_bfree); + } + + if (conf->collect_struct) diff --git a/debian/patches/series b/debian/patches/series index 5e9e15a..86e1cf0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ rrd_filter_path.patch collection_conf_path.patch myplugin_includes.patch +bts802249_varnish_41.patch