Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386993 - app-admin/collectd-5.0.0-r2 - varnish plugin won't build for www-servers/varnish-3.0.1
Summary: app-admin/collectd-5.0.0-r2 - varnish plugin won't build for www-servers/varn...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 387731
  Show dependency tree
 
Reported: 2011-10-12 22:30 UTC by jon
Modified: 2011-10-24 16:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patches to build with Varnish 3. (collectd-5.0.0-r2pt1.patch,5.90 KB, patch)
2011-10-12 22:31 UTC, jon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jon 2011-10-12 22:30:35 UTC
Varnish plugin for collectd won't build against Varnish 3.x. Varnish 3 renamed and removed several of the status fields as well as changing the way the API opens and closes the SHM and gets access to the status structure.

Reproducible: Always

Steps to Reproduce:
1.Install Varnish 3+
2.Alter "make.conf" to include the varnish plugin
3.Attempt to emerge app-admin/collectd.
Actual Results:  
The gist of the resulting error was that there was a version mismatch.

Expected Results:  
A collectd which will gather Varnish 3 statistics.

I am attaching a patch for collectd that will adapt it to be able to work with Varnish 3. I'm not a varnish or collectd expert but its working for me. I don't work with the autoconf tools so there is some fixing to be done.

I patched configure.in to check for the new calls in Varnish and allow the building. I also patched the varnish plugin to be able to work with Varnish 2 or 3 based on a define. I set the define at the top of "varnish.c". Dropping this patch file in /etc/portage/patches/... allowed me to build for use with Varnish 3.
Comment 1 jon 2011-10-12 22:31:33 UTC
Created attachment 289725 [details, diff]
Patches to build with Varnish 3.
Comment 2 Johan Bergström 2011-10-18 15:23:10 UTC
Thanks a lot for the patch. Will have a look later tonight. Also notifying upstream!
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2011-10-22 17:36:40 UTC
Patch added in 5.0.1, thanks!
Comment 4 jon 2011-10-24 16:56:23 UTC
(In reply to comment #3)
> Patch added in 5.0.1, thanks!

You're welcome! So I'm curious what mechanism was added to the patch to support building for either Varnish 2 or 3? I will probably need to be prepared for that
with the next update cycle. THX!