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