Bug 181982

Summary: no includes for libiptc are included in -devel package
Product: [Fedora] Fedora Reporter: Ivan Keberlein <ikeberlein>
Component: iptablesAssignee: Thomas Woerner <twoerner>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-29 12:13:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch for iptables rpm spec file none

Description Ivan Keberlein 2006-02-18 10:57:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060202 Fedora/1.0.7-1.2.fc4 Firefox/1.0.7

Description of problem:
No include for libiptc files are included in -devel package. Those are:
iptables-1.3.0/include/libiptc/ipt_kernel_headers.h
iptables-1.3.0/include/libiptc/libip6tc.h
iptables-1.3.0/include/libiptc/libiptc.h


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

How reproducible:
Always

Steps to Reproduce:
1.Install iptables-devel-1.3.0-2
2.
3.
  

Actual Results:  Cann't compile programs wich use libiptc. Fail to find libiptc.h

Expected Results:  Have include filed for libiptc.a installed. 

Additional info:

Comment 1 Ivan Keberlein 2006-02-18 10:58:57 UTC
To fix this bug:
1. Add to "%files devel" in .spec file: 
%{_includedir}/ipt_kernel_headers.h
%{_includedir}/libip6tc.h
%{_includedir}/libiptc.h

Apply the next patch:
--- iptables-1.3.0/libiptc/Makefile.libiptc-include     2004-10-10
16:56:24.000000000 +0700
+++ iptables-1.3.0/libiptc/Makefile     2006-02-18 16:23:01.000000000 +0600
@@ -4,6 +4,10 @@

 DEVEL_LIBS+=libiptc/libiptc.a

+DEVEL_HEADERS+=include/libiptc/ipt_kernel_headers.h
+DEVEL_HEADERS+=include/libiptc/libip6tc.h
+DEVEL_HEADERS+=include/libiptc/libiptc.h
+
 ifndef TOPLEVEL_INCLUDED
 local:
        cd .. && $(MAKE) $(KERN_TARGETS) $(SHARED_LIBS) $(EXTRAS)


Comment 2 Ivan Keberlein 2006-02-18 11:25:00 UTC
Here is the patch for .spec file:

--- iptables.spec.orig	2005-03-18 22:40:36.000000000 +0600
+++ iptables.spec	2006-02-18 17:27:34.000000000 +0600
@@ -4,7 +4,7 @@
 Name: iptables
 Summary: Tools for managing Linux kernel packet filtering capabilities.
 Version: 1.3.0
-Release: 2
+Release: 3
 Source: http://www.netfilter.org/%{name}-%{version}.tar.bz2
 Source1: iptables.init
 Source2: iptables-config
@@ -18,6 +18,7 @@
 Patch8: iptables-1.3.0-cleanup.patch
 Patch9: iptables-1.3.0-autoload.patch
 Patch10: iptables-1.3.0-no_root.patch
+Patch11: iptables-1.3.0-libiptc_include.patch
 Group: System Environment/Base
 URL: http://www.netfilter.org/
 BuildRoot: %{_tmppath}/%{name}-buildroot
@@ -76,6 +77,7 @@
 %patch8 -p1 -b .cleanup
 %patch9 -p1 -b .autoload
 %patch10 -p1 -b .no_root
+%patch11 -p1 -b .libiptc_include
 
 # Put it to a reasonable place
 find . -type f -exec perl -pi -e "s,/usr/local,%{prefix},g" {} \;
@@ -91,6 +93,10 @@
 make install DESTDIR=%{buildroot} KERNEL_DIR=/usr BINDIR=/sbin LIBDIR=/%{_lib}
MANDIR=%{_mandir}
 %if %{build_devel}
 make install-devel DESTDIR=%{buildroot} KERNEL_DIR=/usr BINDIR=/sbin
LIBDIR=%{_libdir} MANDIR=%{_mandir}
+mkdir -p $RPM_BUILD_ROOT/usr/include/libiptc
+mv $RPM_BUILD_ROOT/usr/include/ipt_kernel_headers.h
$RPM_BUILD_ROOT/usr/include/libiptc/ipt_kernel_headers.h
+mv $RPM_BUILD_ROOT/usr/include/libip6tc.h
$RPM_BUILD_ROOT/usr/include/libiptc/libip6tc.h
+mv $RPM_BUILD_ROOT/usr/include/libiptc.h
$RPM_BUILD_ROOT/usr/include/libiptc/libiptc.h
 %endif
 cp ip{6,}tables-{save,restore} $RPM_BUILD_ROOT/sbin
 cp iptables-*.8 $RPM_BUILD_ROOT%{_mandir}/man8
@@ -144,6 +150,9 @@
 %files devel
 %defattr(-,root,root,0755)
 %{_includedir}/libipq.h
+%{_includedir}/libiptc/ipt_kernel_headers.h
+%{_includedir}/libiptc/libip6tc.h
+%{_includedir}/libiptc/libiptc.h
 %{_libdir}/libipq.a
 %{_libdir}/libiptc.a
 %{_mandir}/man3/*
@@ -348,7 +357,7 @@
 - fix bugzilla #25962 (iptables-restore)
 - mv chkconfig --del from postun to preun
 
-* Thu Feb  1 2001 Trond Eivind Glomsrd <teg>
+* Thu Feb  1 2001 Trond Eivind Glomsrd <teg>
 - Fix check for ipchains
 
 * Mon Jan 29 2001 Bernhard Rosenkraenzer <bero>
@@ -395,5 +404,5 @@
 * Mon Jun  4 2000 Bill Nottingham <notting>
 - remove explicit kernel requirement
 
-* Tue May  2 2000 Bernhard Rosenkr�zer <bero>
+* Tue May  2 2000 Bernhard Rosenkr�zer <bero>
 - initial package


Comment 3 Greg Swallow 2006-08-22 16:21:14 UTC
This bug prevents building linux-igd - they have a note in their INSTALL
document with a workaround:
http://sourceforge.net/project/showfiles.php?group_id=52728

This is not fixed in FC5 or Rawhide either.

Comment 4 Greg Swallow 2006-08-22 16:54:20 UTC
Created attachment 134650 [details]
patch for iptables rpm spec file

Comment 5 Greg Swallow 2006-08-22 16:57:21 UTC
Above patch is an alternative to patching the makefile, etc as was shown above.
Patch was made against the spec file from the iptables rpm in Rawhide (1.3.5-1.2).


Comment 6 Greg Swallow 2006-09-04 18:45:51 UTC
Someone should change the version of this bug from FC4 to FC6 or devel, as 
it's surely not going to be fixed in FC4.

Comment 7 Christian Iseli 2007-01-22 10:05:03 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

Comment 9 Thomas Woerner 2007-08-29 12:13:51 UTC
Fixed in package iptables-1.3.8-2 in rawhide and in testing packages for FC-6
and F-7.