2 # $Id: iproute.spec 7668 2008-01-08 11:49:43Z thierry $
4 %define url $URL: svn+ssh://thierry@svn.planet-lab.org/svn/iproute2/trunk/iproute.spec $
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
13 Packager: PlanetLab Central <support@planet-lab.org>
14 Distribution: PlanetLab %{plrelease}
15 URL: %(echo %{url} | cut -d ' ' -f 2)
18 %define linux_header 0
20 Summary: Tools for managing Linux kernel packet filtering capabilities.
24 Source: http://www.netfilter.org/%{name}-%{version}.tar.bz2
25 %define SOURCE1 iptables.init
26 %define SOURCE2 iptables-config
27 %define SOURCE3 planetlab-config
28 Group: System Environment/Base
29 #URL: http://www.netfilter.org/
30 BuildRoot: %{_tmppath}/%{name}-buildroot
32 BuildPrereq: /usr/bin/perl
33 Requires: kernel >= 2.4.20
34 Requires(post,postun): chkconfig
36 BuildRequires: kernel-devel
39 Summary: IPv6 support for iptables.
40 Group: System Environment/Base
41 Requires: %{name} = %{version}
45 Summary: Development package for iptables.
46 Group: System Environment/Base
47 Requires: %{name} = %{version}
51 The iptables utility controls the network packet filtering code in the
52 Linux kernel. If you need to set up firewalls and/or IP masquerading,
53 you should install this package.
56 The iptables package contains IPv6 (the next version of the IP
57 protocol) support for iptables. Iptables controls the Linux kernel
58 network packet filtering code, allowing you to set up firewalls and IP
61 Install iptables-ipv6 if you need to set up firewalling for your
62 network and you are using ipv6.
66 The iptables utility controls the network packet filtering code in the
67 Linux kernel. If you need to set up firewalls and/or IP masquerading,
68 you should install this package.
76 # Put it to a reasonable place
77 find . -type f -exec perl -pi -e "s,/usr,%{prefix},g" {} \;
81 OPT="$RPM_OPT_FLAGS -I$TOPDIR/include"
83 %define KERNEL %(rpm -q --qf '%%{VERSION}-%%{RELEASE}-%%{ARCH}\\n' kernel-devel | tail -n 1 )
84 count=$(rpm -q kernel-devel| wc -l)
85 if [ $count -gt 1 ] ; then
86 echo "WARNING: choosing kernel-devel-%{KERNEL}"
87 echo " but there are other kernel-devel packages installed: $(rpm -q kernel-devel)"
90 %define KERNEL_DIR "/usr/src/kernels/%{KERNEL}"
92 make COPT_FLAGS="$OPT" KERNEL_DIR=%{KERNEL_DIR} LIBDIR=/%{_lib}
93 make COPT_FLAGS="$OPT" KERNEL_DIR=%{KERNEL_DIR} LIBDIR=/%{_lib} iptables-save iptables-restore
94 make COPT_FLAGS="$OPT" KERNEL_DIR=%{KERNEL_DIR} LIBDIR=/%{_lib} ip6tables-save ip6tables-restore
97 make install DESTDIR=%{buildroot} KERNEL_DIR=%{KERNEL_DIR} BINDIR=/sbin LIBDIR=/%{_lib} MANDIR=%{_mandir}
99 make install-devel DESTDIR=%{buildroot} KERNEL_DIR=%{KERNEL_DIR} BINDIR=/sbin LIBDIR=%{_libdir} MANDIR=%{_mandir} INCDIR=%{_includedir}
101 cp ip{6,}tables-{save,restore} $RPM_BUILD_ROOT/sbin
102 cp iptables-*.8 $RPM_BUILD_ROOT%{_mandir}/man8
103 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
104 install -c -m755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/iptables
105 sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE1} > ip6tables.init
106 install -c -m755 ip6tables.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ip6tables
107 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
108 install -c -m755 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/iptables-config
109 install -c -m755 %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/iptables
110 sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE2} > ip6tables-config
111 install -c -m755 ip6tables-config $RPM_BUILD_ROOT/etc/sysconfig/ip6tables-config
114 rm -rf $RPM_BUILD_ROOT
117 /sbin/chkconfig --add iptables
118 /sbin/service restart iptables
121 if [ "$1" = 0 ]; then
122 /sbin/chkconfig --del iptables
126 /sbin/chkconfig --add ip6tables
127 /sbin/service restart ip6tables
130 if [ "$1" = 0 ]; then
131 /sbin/chkconfig --del ip6tables
135 %defattr(-,root,root,0755)
136 %doc COPYING INSTALL INCOMPATIBILITIES
137 %config %attr(0755,root,root) /etc/rc.d/init.d/iptables
138 %config(noreplace) %attr(0600,root,root) /etc/sysconfig/iptables-config
139 %config(noreplace) %attr(0600,root,root) /etc/sysconfig/iptables
141 %{_mandir}/man8/iptables*
142 %dir /%{_lib}/iptables
143 /%{_lib}/iptables/libipt*
145 %{_mandir}/man8/ipset*
147 /%{_lib}/ipset/libipset*
150 %defattr(-,root,root,0755)
151 %config %attr(0755,root,root) /etc/rc.d/init.d/ip6tables
152 %config(noreplace) %attr(0600,root,root) /etc/sysconfig/ip6tables-config
154 %{_mandir}/man8/ip6tables*
155 /%{_lib}/iptables/libip6t*
159 %defattr(-,root,root,0755)
160 %{_includedir}/libipq.h
162 #%{_libdir}/libiptc.a
167 * Mon Jul 21 2008 Sapan Bhatia <sapanb@cs.princeton.edu> - iptables-1.3.8-4
170 * Tue Jul 15 2008 Sapan Bhatia <sapanb@cs.princeton.edu> - iptables-1.3.8-3
171 - * Load required kernel modules before configuring tun/tap devices
173 * Wed Jul 09 2008 Sapan Bhatia <sapanb@cs.princeton.edu> - iptables-1.3.8-2
174 - Added tuntap support. Let's start it in the iptables initscripts for now.
176 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - iptables-1.3.8-1
177 - Commit for latest fixes in trunk for the iptables config. This one in
178 - particular loads ip_conntrack in order to have the new vnet support ping right
182 * Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
185 * Thu Feb 26 2004 Thomas Woerner <twoerner@redhat.com> 1.2.9-2.3
186 - fixed iptables-restore -c fault if there are no counters (#116421)
188 * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
191 * Sun Jan 25 2004 Dan Walsh <dwalsh@redhat.com> 1.2.9-1.2
192 - Close File descriptors to prevent SELinux error message
194 * Wed Jan 7 2004 Thomas Woerner <twoerner@redhat.com> 1.2.9-1.1
197 * Wed Dec 17 2003 Thomas Woerner <twoerner@redhat.com> 1.2.9-1
199 - new config options in ipXtables-config:
200 IPTABLES_MODULES_UNLOAD
201 - more documentation in ipXtables-config
202 - fix for netlink security issue in libipq (devel package)
203 - print fix for libipt_icmp (#109546)
205 * Thu Oct 23 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-13
206 - marked all messages in iptables init script for translation (#107462)
207 - enabled devel package (#105884, #106101)
208 - bumped build for fedora for libipt_recent.so (#106002)
210 * Tue Sep 23 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-12.1
211 - fixed lost udp port range in ip6tables-save (#104484)
212 - fixed non numeric multiport port output in ipXtables-savs
214 * Mon Sep 22 2003 Florian La Roche <Florian.LaRoche@redhat.de> 1.2.8-11
215 - do not link against -lnsl
217 * Wed Sep 17 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-10
218 - made variables in rmmod_r local
220 * Tue Jul 22 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-9
221 - fixed permission for init script
223 * Sat Jul 19 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-8
224 - fixed save when iptables file is missing and iptables-config permissions
226 * Tue Jul 8 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-7
227 - fixes for ip6tables: module unloading, setting policy only for existing
230 * Thu Jul 3 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-6
231 - IPTABLES_SAVE_COUNTER defaults to no, now
232 - install config file in /etc/sysconfig
233 - exchange unload of ip_tables and ip_conntrack
234 - fixed start function
236 * Wed Jul 2 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-5
237 - new config option IPTABLES_SAVE_ON_RESTART
238 - init script: new status, save and restart
239 - fixes #44905, #65389, #80785, #82860, #91040, #91560 and #91374
241 * Mon Jun 30 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-4
242 - new config option IPTABLES_STATUS_NUMERIC
243 - cleared IPTABLES_MODULES in iptables-config
245 * Mon Jun 30 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-3
248 * Sat Jun 28 2003 Florian La Roche <Florian.LaRoche@redhat.de>
249 - remove check for very old kernel versions in init scripts
250 - sync up both init scripts and remove some further ugly things
251 - add some docu into rpm
253 * Thu Jun 26 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-2
256 * Mon Jun 16 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-1
259 * Wed Jan 22 2003 Tim Powers <timp@redhat.com>
262 * Mon Jan 13 2003 Bill Nottingham <notting@redhat.com> 1.2.7a-1
264 - add a plethora of bugfixes courtesy Michael Schwendt <mschewndt@yahoo.com>
266 * Fri Dec 13 2002 Elliot Lee <sopwith@redhat.com> 1.2.6a-3
269 * Wed Aug 07 2002 Karsten Hopp <karsten@redhat.de>
270 - fixed iptables and ip6tables initscript output, based on #70511
271 - check return status of all iptables calls, not just the last one
274 * Mon Jul 29 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.6a-1
275 - 1.2.6a (bugfix release, #69747)
277 * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
280 * Thu May 23 2002 Tim Powers <timp@redhat.com>
283 * Mon Mar 4 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-3
284 - Add some fixes from CVS, fixing bug #60465
286 * Tue Feb 12 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-2
287 - Merge ip6tables improvements from Ian Prowell <iprowell@prowell.org>
289 - Update URL (#59354)
290 - Use /sbin/chkconfig rather than chkconfig in %postun script
292 * Fri Jan 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-1
295 * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
298 * Mon Nov 5 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.4-2
301 * Tue Oct 30 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.4-1
302 - Update to 1.2.4 (various fixes, including security fixes; among others:
303 #42990, #50500, #53325, #54280)
304 - Fix init script (#31133)
306 * Mon Sep 3 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.3-1
307 - 1.2.3 (5 security fixes, some other fixes)
308 - Fix updating (#53032)
310 * Mon Aug 27 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-4
312 - Add some fixes from current CVS; should fix #52620
314 * Mon Jul 16 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-3
315 - Add some fixes from the current CVS tree; fixes #49154 and some IPv6
318 * Tue Jun 26 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-2
319 - Fix iptables-save reject-with (#45632), Patch from Michael Schwendt
320 <mschwendt@yahoo.com>
322 * Tue May 8 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-1
325 * Wed Mar 21 2001 Bernhard Rosenkraenzer <bero@redhat.com>
326 - 1.2.1a, fixes #28412, #31136, #31460, #31133
328 * Thu Mar 1 2001 Bernhard Rosenkraenzer <bero@redhat.com>
329 - Yet another initscript fix (#30173)
330 - Fix the fixes; they fixed some issues but broke more important
333 * Tue Feb 27 2001 Bernhard Rosenkraenzer <bero@redhat.com>
334 - Fix up initscript (#27962)
335 - Add fixes from CVS to iptables-{restore,save}, fixing #28412
337 * Fri Feb 09 2001 Karsten Hopp <karsten@redhat.de>
338 - create /etc/sysconfig/iptables mode 600 (same problem as #24245)
340 * Mon Feb 05 2001 Karsten Hopp <karsten@redhat.de>
341 - fix bugzilla #25986 (initscript not marked as config file)
342 - fix bugzilla #25962 (iptables-restore)
343 - mv chkconfig --del from postun to preun
345 * Thu Feb 1 2001 Trond Eivind Glomsrød <teg@redhat.com>
346 - Fix check for ipchains
348 * Mon Jan 29 2001 Bernhard Rosenkraenzer <bero@redhat.com>
349 - Some fixes to init scripts
351 * Wed Jan 24 2001 Bernhard Rosenkraenzer <bero@redhat.com>
352 - Add some fixes from CVS, fixes among other things Bug #24732
354 * Wed Jan 17 2001 Bernhard Rosenkraenzer <bero@redhat.com>
355 - Add missing man pages, fix up init script (Bug #17676)
357 * Mon Jan 15 2001 Bill Nottingham <notting@redhat.com>
360 * Mon Jan 15 2001 Bernhard Rosenkraenzer <bero@redhat.com>
364 - Move the plugins from /usr/lib/iptables to /lib/iptables.
365 This needs to work before /usr is mounted...
366 - Use -O1 on alpha (compiler bug)
368 * Sat Jan 6 2001 Bernhard Rosenkraenzer <bero@redhat.com>
370 - Add IPv6 support (in separate package)
372 * Thu Aug 17 2000 Bill Nottingham <notting@redhat.com>
375 * Tue Jul 25 2000 Bernhard Rosenkraenzer <bero@redhat.com>
378 * Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
381 * Tue Jun 27 2000 Preston Brown <pbrown@redhat.com>
382 - move iptables to /sbin.
383 - excludearch alpha for now, not building there because of compiler bug(?)
385 * Fri Jun 9 2000 Bill Nottingham <notting@redhat.com>
386 - don't obsolete ipchains either
389 * Mon Jun 4 2000 Bill Nottingham <notting@redhat.com>
390 - remove explicit kernel requirement
392 * Tue May 2 2000 Bernhard Rosenkränzer <bero@redhat.com>