Bug 479208 - collectd is built without iptables plugin
Summary: collectd is built without iptables plugin
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: collectd
Version: 10
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Alan Pevec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 462207
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-08 00:15 UTC by Joel Uckelman
Modified: 2009-03-04 16:29 UTC (History)
7 users (show)

Fixed In Version: 4.5.3-1.fc10
Clone Of:
Environment:
Last Closed: 2009-03-04 16:29:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to update libip6tc.c for newer def of in6_addr in <netinet/in.h> (408 bytes, patch)
2009-01-09 13:40 UTC, Joel Uckelman
no flags Details | Diff

Description Joel Uckelman 2009-01-08 00:15:22 UTC
Description of problem:

The iptables plugin is missing from the collectd package.


Version-Release number of selected component (if applicable):

collectd-4.5.1-2.1.fc10.x86_64


How reproducible:

Always

Steps to Reproduce:
1. Install collectd.
2. Notice that /usr/lib64/collectd/iptables.so doesn't exist.
  
Actual results:

/usr/lib64/collectd/iptables.so is missing.

Expected results:

/usr/lib64/collectd/iptables.so should be there.

Additional info:

The changelog says that the iptables plugin was disabled, but then reenabled again:

* Mon Jun 09 2008 Alan Pevec <apevec> 4.4.1-1
- New upstream version 4.4.1.
- plugin changes: reenable iptables, disable ascent

* Tue May 27 2008 Alan Pevec <apevec> 4.4.0-2
- disable iptables/libiptc

Comment 1 Matthias Saou 2009-01-09 12:11:06 UTC
I can confirm this. Looking at configure.in, the iptables plugin requires libiptc.h, so I'm guessing that the plugin disappeared because of bug #462207 (filed against F-9, but I can confirm that it's the same on F-10).

For this to not go unnoticed from now on, you might want to explicitly list all of the expected plugins in the %files section of the spec file. I would definitely do that if I were the owner of the package :-)

Comment 2 Joel Uckelman 2009-01-09 13:40:04 UTC
Created attachment 328543 [details]
patch to update libip6tc.c for newer def of in6_addr in <netinet/in.h>

Comment 3 Joel Uckelman 2009-01-09 13:41:52 UTC
(In reply to comment #1)
> I can confirm this. Looking at configure.in, the iptables plugin requires
> libiptc.h, so I'm guessing that the plugin disappeared because of bug #462207
> (filed against F-9, but I can confirm that it's the same on F-10).

The collectd source comes with its own libiptc.h, so I think that's not the problem.

If I change '--without-libiptc' to '--with-libiptc' (or simply remove it) in the spec file, the build blows up on me:

 gcc -DHAVE_CONFIG_H -I. -I../../src -DIPTABLES_VERSION=\"1.4.0\" -I/lib/modules/2.6.27.9-159.fc10.x86_64/source/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c libip4tc.c  -fPIC -DPIC -o .libs/libiptc_la-libip4tc.o
libip6tc.c: In function 'ipv6_prefix_length':
libip6tc.c:141: error: 'const struct in6_addr' has no member named 'in6_u'
libip6tc.c:145: error: 'const struct in6_addr' has no member named 'in6_u'
make[3]: *** [libiptc_la-libip6tc.lo] Error 1


The problem appears to be that the definition of in6_addr in <netinet/in.h> changed sometime after collectd started shipping its own copy of the libiptc source.

For a discussion of the problem, see here

  https://wiki.edubuntu.org/DidierRoche/MOTU/bugsaction

under the heading "backport ufw 0.22/iptable to hardy. Bug #268931".

There appears to be a simple solution, viz., replacing 'in6_u.u6_addr32' with 's6_addr32' in src/libiptc/libip6tc.c.

I've attached a patch for this. This change is sufficient for getting the source RPM to build an iptables.so plugin. (I haven't tested the plugin yet, however, so I can't say whether this change is sufficient for building a *working* iptables.so plugin, though.)

Comment 4 Joel Uckelman 2009-01-09 13:43:22 UTC
Also, changes to the spec file:

Remove '--without-libiptc', add '--enable-iptables'.

Comment 5 Joel Uckelman 2009-01-09 14:08:53 UTC
(In reply to comment #3)
> (I haven't tested the plugin yet,
> however, so I can't say whether this change is sufficient for building a
> *working* iptables.so plugin, though.)

I'm collecting some data with it now, so, yes, my patch does appear to work.

Comment 6 Alan Pevec 2009-03-02 23:38:40 UTC
patched upstream a30f785e3411091fceb2f5c850beb5067c18396d

rebasing to 4.5.3 which includes it

Comment 7 Fedora Update System 2009-03-03 23:08:57 UTC
collectd-4.5.3-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/collectd-4.5.3-1.fc10

Comment 8 Fedora Update System 2009-03-04 16:29:42 UTC
collectd-4.5.3-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.