Merge to iptables-1.3.5
[iptables.git] / iptables.spec
1 %define name iptables
2 %define version 1.3.5
3 %define release 1%{?pldistro:.%{pldistro}}%{?date:.%{date}}
4
5 Vendor: PlanetLab
6 Packager: PlanetLab Central <support@planet-lab.org>
7 Distribution: PlanetLab 3.0
8 URL: http://cvs.planet-lab.org/cvs/iptables
9
10 %define build_devel 1
11 %define linux_header 0
12
13 Name: %{name}
14 Summary: Tools for managing Linux kernel packet filtering capabilities.
15 Version: %{version}
16 Release: %{release}
17 Source: http://www.netfilter.org/%{name}-%{version}.tar.bz2
18 %define SOURCE1 iptables.init
19 %define SOURCE2 iptables-config
20 Group: System Environment/Base
21 #URL: http://www.netfilter.org/
22 BuildRoot: %{_tmppath}/%{name}-buildroot
23 License: GPL
24 BuildPrereq: /usr/bin/perl
25 Requires: kernel >= 2.4.20
26 Requires(post,postun): chkconfig
27 Prefix: %{_prefix}
28
29 %package ipv6
30 Summary: IPv6 support for iptables.
31 Group: System Environment/Base
32 Requires: %{name} = %{version}
33
34 %if %{build_devel}
35 %package devel
36 Summary: Development package for iptables.
37 Group: System Environment/Base
38 Requires: %{name} = %{version}
39 %endif
40
41 %description
42 The iptables utility controls the network packet filtering code in the
43 Linux kernel. If you need to set up firewalls and/or IP masquerading,
44 you should install this package.
45
46 %description ipv6
47 The iptables package contains IPv6 (the next version of the IP
48 protocol) support for iptables. Iptables controls the Linux kernel
49 network packet filtering code, allowing you to set up firewalls and IP
50 masquerading. 
51
52 Install iptables-ipv6 if you need to set up firewalling for your
53 network and you are using ipv6.
54
55 %if %{build_devel}
56 %description devel
57 The iptables utility controls the network packet filtering code in the
58 Linux kernel. If you need to set up firewalls and/or IP masquerading,
59 you should install this package.
60 %endif
61
62 %prep
63 rm -rf %{buildroot}
64
65 %setup -q
66
67 # Put it to a reasonable place
68 find . -type f -exec perl -pi -e "s,/usr,%{prefix},g" {} \;
69
70 %build
71 TOPDIR=`pwd`
72 OPT="$RPM_OPT_FLAGS -I$TOPDIR/include"
73 # bootstrap to avoid BuildRequires of kernel-source
74 for KERNEL_DIR in $RPM_BUILD_DIR/linux-* /lib/modules/`uname -r`/build /usr ; do
75     if [ -f $KERNEL_DIR/include/linux/version.h ] ; then
76         break
77     fi
78 done
79 make COPT_FLAGS="$OPT" KERNEL_DIR=$KERNEL_DIR LIBDIR=/%{_lib}
80 make COPT_FLAGS="$OPT" KERNEL_DIR=$KERNEL_DIR LIBDIR=/%{_lib} iptables-save iptables-restore
81 make COPT_FLAGS="$OPT" KERNEL_DIR=$KERNEL_DIR LIBDIR=/%{_lib} ip6tables-save ip6tables-restore
82
83 %install
84 # bootstrap to avoid BuildRequires of kernel-source
85 for KERNEL_DIR in $RPM_BUILD_DIR/linux-* /lib/modules/`uname -r`/build /usr ; do
86     if [ -f $KERNEL_DIR/include/linux/version.h ] ; then
87         break
88     fi
89 done
90 make install DESTDIR=%{buildroot} KERNEL_DIR=$KERNEL_DIR BINDIR=/sbin LIBDIR=/%{_lib} MANDIR=%{_mandir}
91 %if %{build_devel}
92 make install-devel DESTDIR=%{buildroot} KERNEL_DIR=$KERNEL_DIR BINDIR=/sbin LIBDIR=%{_libdir} MANDIR=%{_mandir} INCDIR=%{_includedir}
93 %endif
94 cp ip{6,}tables-{save,restore} $RPM_BUILD_ROOT/sbin
95 cp iptables-*.8 $RPM_BUILD_ROOT%{_mandir}/man8
96 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
97 install -c -m755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/iptables
98 sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE1} > ip6tables.init
99 install -c -m755 ip6tables.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ip6tables
100 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
101 install -c -m755 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/iptables-config
102 sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE2} > ip6tables-config
103 install -c -m755 ip6tables-config $RPM_BUILD_ROOT/etc/sysconfig/ip6tables-config
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT 
107
108 %post
109 /sbin/chkconfig --add iptables
110
111 %preun
112 if [ "$1" = 0 ]; then
113         /sbin/chkconfig --del iptables
114 fi
115
116 %post ipv6
117 /sbin/chkconfig --add ip6tables
118
119 %preun ipv6
120 if [ "$1" = 0 ]; then
121         /sbin/chkconfig --del ip6tables
122 fi
123
124 %files
125 %defattr(-,root,root,0755)
126 %doc COPYING INSTALL INCOMPATIBILITIES
127 %config %attr(0755,root,root) /etc/rc.d/init.d/iptables
128 %config(noreplace) %attr(0600,root,root) /etc/sysconfig/iptables-config
129 /sbin/iptables*
130 %{_mandir}/man8/iptables*
131 %dir /%{_lib}/iptables
132 /%{_lib}/iptables/libipt*
133 /sbin/ipset*
134 %{_mandir}/man8/ipset*
135 %dir /%{_lib}/ipset
136 /%{_lib}/ipset/libipset*
137
138 %files ipv6
139 %defattr(-,root,root,0755)
140 %config %attr(0755,root,root) /etc/rc.d/init.d/ip6tables
141 %config(noreplace) %attr(0600,root,root) /etc/sysconfig/ip6tables-config
142 /sbin/ip6tables*
143 %{_mandir}/man8/ip6tables*
144 /%{_lib}/iptables/libip6t*
145
146 %if %{build_devel}
147 %files devel
148 %defattr(-,root,root,0755)
149 %{_includedir}/libipq.h
150 %{_libdir}/libipq.a
151 %{_libdir}/libiptc.a
152 %{_mandir}/man3/*
153 %endif
154
155 %changelog
156 * Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
157 - rebuilt
158
159 * Thu Feb 26 2004 Thomas Woerner <twoerner@redhat.com> 1.2.9-2.3
160 - fixed iptables-restore -c fault if there are no counters (#116421)
161
162 * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
163 - rebuilt
164
165 * Sun Jan  25 2004 Dan Walsh <dwalsh@redhat.com> 1.2.9-1.2
166 - Close File descriptors to prevent SELinux error message
167
168 * Wed Jan  7 2004 Thomas Woerner <twoerner@redhat.com> 1.2.9-1.1
169 - rebuild
170
171 * Wed Dec 17 2003 Thomas Woerner <twoerner@redhat.com> 1.2.9-1
172 - vew version 1.2.9
173 - new config options in ipXtables-config:
174   IPTABLES_MODULES_UNLOAD
175 - more documentation in ipXtables-config
176 - fix for netlink security issue in libipq (devel package)
177 - print fix for libipt_icmp (#109546)
178
179 * Thu Oct 23 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-13
180 - marked all messages in iptables init script for translation (#107462)
181 - enabled devel package (#105884, #106101)
182 - bumped build for fedora for libipt_recent.so (#106002)
183
184 * Tue Sep 23 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-12.1
185 - fixed lost udp port range in ip6tables-save (#104484)
186 - fixed non numeric multiport port output in ipXtables-savs
187
188 * Mon Sep 22 2003 Florian La Roche <Florian.LaRoche@redhat.de> 1.2.8-11
189 - do not link against -lnsl
190
191 * Wed Sep 17 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-10
192 - made variables in rmmod_r local
193
194 * Tue Jul 22 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-9
195 - fixed permission for init script
196
197 * Sat Jul 19 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-8
198 - fixed save when iptables file is missing and iptables-config permissions
199
200 * Tue Jul  8 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-7
201 - fixes for ip6tables: module unloading, setting policy only for existing 
202   tables
203
204 * Thu Jul  3 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-6
205 - IPTABLES_SAVE_COUNTER defaults to no, now
206 - install config file in /etc/sysconfig
207 - exchange unload of ip_tables and ip_conntrack
208 - fixed start function
209
210 * Wed Jul  2 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-5
211 - new config option IPTABLES_SAVE_ON_RESTART
212 - init script: new status, save and restart
213 - fixes #44905, #65389, #80785, #82860, #91040, #91560 and #91374
214
215 * Mon Jun 30 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-4
216 - new config option IPTABLES_STATUS_NUMERIC
217 - cleared IPTABLES_MODULES in iptables-config
218
219 * Mon Jun 30 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-3
220 - new init scripts
221
222 * Sat Jun 28 2003 Florian La Roche <Florian.LaRoche@redhat.de>
223 - remove check for very old kernel versions in init scripts
224 - sync up both init scripts and remove some further ugly things
225 - add some docu into rpm
226
227 * Thu Jun 26  2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-2
228 - rebuild
229
230 * Mon Jun 16 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-1
231 - update to 1.2.8
232
233 * Wed Jan 22 2003 Tim Powers <timp@redhat.com>
234 - rebuilt
235
236 * Mon Jan 13 2003 Bill Nottingham <notting@redhat.com> 1.2.7a-1
237 - update to 1.2.7a
238 - add a plethora of bugfixes courtesy Michael Schwendt <mschewndt@yahoo.com>
239
240 * Fri Dec 13 2002 Elliot Lee <sopwith@redhat.com> 1.2.6a-3
241 - Fix multilib
242
243 * Wed Aug 07 2002 Karsten Hopp <karsten@redhat.de>
244 - fixed iptables and ip6tables initscript output, based on #70511
245 - check return status of all iptables calls, not just the last one
246   in a 'for' loop.
247
248 * Mon Jul 29 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.6a-1
249 - 1.2.6a (bugfix release, #69747)
250
251 * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
252 - automated rebuild
253
254 * Thu May 23 2002 Tim Powers <timp@redhat.com>
255 - automated rebuild
256
257 * Mon Mar  4 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-3
258 - Add some fixes from CVS, fixing bug #60465
259
260 * Tue Feb 12 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-2
261 - Merge ip6tables improvements from Ian Prowell <iprowell@prowell.org>
262   #59402
263 - Update URL (#59354)
264 - Use /sbin/chkconfig rather than chkconfig in %postun script
265
266 * Fri Jan 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-1
267 - 1.2.5
268
269 * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
270 - automated rebuild
271
272 * Mon Nov  5 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.4-2
273 - Fix %preun script
274
275 * Tue Oct 30 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.4-1
276 - Update to 1.2.4 (various fixes, including security fixes; among others:
277   #42990, #50500, #53325, #54280)
278 - Fix init script (#31133)
279
280 * Mon Sep  3 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.3-1
281 - 1.2.3 (5 security fixes, some other fixes)
282 - Fix updating (#53032)
283
284 * Mon Aug 27 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-4
285 - Fix #50990
286 - Add some fixes from current CVS; should fix #52620
287
288 * Mon Jul 16 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-3
289 - Add some fixes from the current CVS tree; fixes #49154 and some IPv6
290   issues
291
292 * Tue Jun 26 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-2
293 - Fix iptables-save reject-with (#45632), Patch from Michael Schwendt
294   <mschwendt@yahoo.com>
295
296 * Tue May  8 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-1
297 - 1.2.2
298
299 * Wed Mar 21 2001 Bernhard Rosenkraenzer <bero@redhat.com>
300 - 1.2.1a, fixes #28412, #31136, #31460, #31133
301
302 * Thu Mar  1 2001 Bernhard Rosenkraenzer <bero@redhat.com>
303 - Yet another initscript fix (#30173)
304 - Fix the fixes; they fixed some issues but broke more important
305   stuff :/ (#30176)
306
307 * Tue Feb 27 2001 Bernhard Rosenkraenzer <bero@redhat.com>
308 - Fix up initscript (#27962)
309 - Add fixes from CVS to iptables-{restore,save}, fixing #28412
310
311 * Fri Feb 09 2001 Karsten Hopp <karsten@redhat.de>
312 - create /etc/sysconfig/iptables mode 600 (same problem as #24245)
313
314 * Mon Feb 05 2001 Karsten Hopp <karsten@redhat.de>
315 - fix bugzilla #25986 (initscript not marked as config file)
316 - fix bugzilla #25962 (iptables-restore)
317 - mv chkconfig --del from postun to preun
318
319 * Thu Feb  1 2001 Trond Eivind Glomsrød <teg@redhat.com>
320 - Fix check for ipchains
321
322 * Mon Jan 29 2001 Bernhard Rosenkraenzer <bero@redhat.com>
323 - Some fixes to init scripts
324
325 * Wed Jan 24 2001 Bernhard Rosenkraenzer <bero@redhat.com>
326 - Add some fixes from CVS, fixes among other things Bug #24732
327
328 * Wed Jan 17 2001 Bernhard Rosenkraenzer <bero@redhat.com>
329 - Add missing man pages, fix up init script (Bug #17676)
330
331 * Mon Jan 15 2001 Bill Nottingham <notting@redhat.com>
332 - add init script
333
334 * Mon Jan 15 2001 Bernhard Rosenkraenzer <bero@redhat.com>
335 - 1.2
336 - fix up ipv6 split
337 - add init script
338 - Move the plugins from /usr/lib/iptables to /lib/iptables.
339   This needs to work before /usr is mounted...
340 - Use -O1 on alpha (compiler bug)
341
342 * Sat Jan  6 2001 Bernhard Rosenkraenzer <bero@redhat.com>
343 - 1.1.2
344 - Add IPv6 support (in separate package)
345
346 * Thu Aug 17 2000 Bill Nottingham <notting@redhat.com>
347 - build everywhere
348
349 * Tue Jul 25 2000 Bernhard Rosenkraenzer <bero@redhat.com>
350 - 1.1.1
351
352 * Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
353 - automatic rebuild
354
355 * Tue Jun 27 2000 Preston Brown <pbrown@redhat.com>
356 - move iptables to /sbin.
357 - excludearch alpha for now, not building there because of compiler bug(?)
358
359 * Fri Jun  9 2000 Bill Nottingham <notting@redhat.com>
360 - don't obsolete ipchains either
361 - update to 1.1.0
362
363 * Mon Jun  4 2000 Bill Nottingham <notting@redhat.com>
364 - remove explicit kernel requirement
365
366 * Tue May  2 2000 Bernhard Rosenkränzer <bero@redhat.com>
367 - initial package