Setting tag iptables-1.3.8-11
[iptables.git] / iptables.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name iptables
7 %define version 1.3.8
8 %define taglevel 10
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 Vendor: PlanetLab
13 Packager: PlanetLab Central <support@planet-lab.org>
14 Distribution: PlanetLab %{plrelease}
15 URL: %(echo %{url} | cut -d ' ' -f 2)
16
17 %define build_devel 1
18 %define linux_header 0
19
20 Summary: Tools for managing Linux kernel packet filtering capabilities.
21 Name: %{name}
22 Version: %{version}
23 Release: %{release}
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
31 License: GPL
32 BuildPrereq: /usr/bin/perl
33 Requires: kernel >= 2.4.20
34 Requires(post,postun): chkconfig
35 Prefix: %{_prefix}
36 BuildRequires: kernel-devel
37
38 %package ipv6
39 Summary: IPv6 support for iptables.
40 Group: System Environment/Base
41 Requires: %{name} = %{version}
42
43 %if %{build_devel}
44 %package devel
45 Summary: Development package for iptables.
46 Group: System Environment/Base
47 Requires: %{name} = %{version}
48 %endif
49
50 %description
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.
54
55 %description ipv6
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
59 masquerading. 
60
61 Install iptables-ipv6 if you need to set up firewalling for your
62 network and you are using ipv6.
63
64 %if %{build_devel}
65 %description devel
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.
69 %endif
70
71 %prep
72 rm -rf %{buildroot}
73
74 %setup -q
75
76 # Put it to a reasonable place
77 find . -type f -exec perl -pi -e "s,/usr,%{prefix},g" {} \;
78
79 %build
80 TOPDIR=`pwd`
81 OPT="$RPM_OPT_FLAGS -I$TOPDIR/include"
82
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)"
88 fi
89         
90 %define KERNEL_DIR "/usr/src/kernels/%{KERNEL}"
91
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
95
96 %install
97 make install DESTDIR=%{buildroot} KERNEL_DIR=%{KERNEL_DIR} BINDIR=/sbin LIBDIR=/%{_lib} MANDIR=%{_mandir}
98 %if %{build_devel}
99 make install-devel DESTDIR=%{buildroot} KERNEL_DIR=%{KERNEL_DIR} BINDIR=/sbin LIBDIR=%{_libdir} MANDIR=%{_mandir} INCDIR=%{_includedir}
100 %endif
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
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT 
115
116 %post
117 /sbin/chkconfig --add iptables
118 if [ "$PL_BOOTCD" != "1" ] ; then
119     /sbin/service iptables restart
120 fi
121
122 %preun
123 if [ "$1" = 0 ]; then
124     /sbin/chkconfig --del iptables
125 fi
126
127 %post ipv6
128 /sbin/chkconfig --add ip6tables
129 if [ "$PL_BOOTCD" != "1" ] ; then
130     /sbin/service ip6tables restart
131 fi
132
133 %preun ipv6
134 if [ "$1" = 0 ]; then
135     /sbin/chkconfig --del ip6tables
136 fi
137
138 %files
139 %defattr(-,root,root,0755)
140 %doc COPYING INSTALL INCOMPATIBILITIES
141 %config %attr(0755,root,root) /etc/rc.d/init.d/iptables
142 %config(noreplace) %attr(0600,root,root) /etc/sysconfig/iptables-config
143 %config(noreplace) %attr(0600,root,root) /etc/sysconfig/iptables
144 /sbin/iptables*
145 %{_mandir}/man8/iptables*
146 %dir /%{_lib}/iptables
147 /%{_lib}/iptables/libipt*
148 /sbin/ipset*
149 %{_mandir}/man8/ipset*
150 %dir /%{_lib}/ipset
151 /%{_lib}/ipset/libipset*
152
153 %files ipv6
154 %defattr(-,root,root,0755)
155 %config %attr(0755,root,root) /etc/rc.d/init.d/ip6tables
156 %config(noreplace) %attr(0600,root,root) /etc/sysconfig/ip6tables-config
157 /sbin/ip6tables*
158 %{_mandir}/man8/ip6tables*
159 /%{_lib}/iptables/libip6t*
160
161 %if %{build_devel}
162 %files devel
163 %defattr(-,root,root,0755)
164 %{_includedir}/libipq.h
165 %{_libdir}/libipq.a
166 #%{_libdir}/libiptc.a
167 %{_mandir}/man3/*
168 %endif
169
170 %changelog
171 * Thu Jan 28 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - iptables-1.3.8-10
172 - tag iptables for f12 & gcc4.4 builds.
173
174 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - iptables-1.3.8-9
175 - fixes for building on f9/gcc-4.3 - no functional change
176
177 * Sat Aug 30 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - iptables-1.3.8-8
178 - use PL_BOOTCD to prevent the service from getting started at build-time
179
180 * Mon Aug 04 2008 Sapan Bhatia <sapanb@cs.princeton.edu> - iptables-1.3.8-7
181 - Codemux/PF change
182
183 * Mon Jul 28 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - iptables-1.3.8-6
184 - Syntax error in the spec file prevented this package from installing.  Fixed.
185
186 * Fri Jul 25 2008 Andy Bavier <acb@cs.princeton.edu> - iptables-1.3.8-5
187 - * --add-mark action in CLASSIFY target
188 - * Remove chkconfig from .spec file
189 - * Fix iptables-save/-restore bug for MARK with --copy-xid
190 - * Fix default PlanetLab iptables config
191
192 * Mon Jul 21 2008 Sapan Bhatia <sapanb@cs.princeton.edu> - iptables-1.3.8-4
193 - Load tun/tap
194
195 * Tue Jul 15 2008 Sapan Bhatia <sapanb@cs.princeton.edu> - iptables-1.3.8-3
196 - * Load required kernel modules before configuring tun/tap devices
197
198 * Wed Jul 09 2008 Sapan Bhatia <sapanb@cs.princeton.edu> - iptables-1.3.8-2
199 - Added tuntap support. Let's start it in the iptables initscripts for now.
200
201 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - iptables-1.3.8-1
202 - Commit for latest fixes in trunk for the iptables config.  This one in
203 - particular loads ip_conntrack in order to have the new vnet support ping right
204 - away.
205
206
207 * Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
208 - rebuilt
209
210 * Thu Feb 26 2004 Thomas Woerner <twoerner@redhat.com> 1.2.9-2.3
211 - fixed iptables-restore -c fault if there are no counters (#116421)
212
213 * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
214 - rebuilt
215
216 * Sun Jan  25 2004 Dan Walsh <dwalsh@redhat.com> 1.2.9-1.2
217 - Close File descriptors to prevent SELinux error message
218
219 * Wed Jan  7 2004 Thomas Woerner <twoerner@redhat.com> 1.2.9-1.1
220 - rebuild
221
222 * Wed Dec 17 2003 Thomas Woerner <twoerner@redhat.com> 1.2.9-1
223 - vew version 1.2.9
224 - new config options in ipXtables-config:
225   IPTABLES_MODULES_UNLOAD
226 - more documentation in ipXtables-config
227 - fix for netlink security issue in libipq (devel package)
228 - print fix for libipt_icmp (#109546)
229
230 * Thu Oct 23 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-13
231 - marked all messages in iptables init script for translation (#107462)
232 - enabled devel package (#105884, #106101)
233 - bumped build for fedora for libipt_recent.so (#106002)
234
235 * Tue Sep 23 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-12.1
236 - fixed lost udp port range in ip6tables-save (#104484)
237 - fixed non numeric multiport port output in ipXtables-savs
238
239 * Mon Sep 22 2003 Florian La Roche <Florian.LaRoche@redhat.de> 1.2.8-11
240 - do not link against -lnsl
241
242 * Wed Sep 17 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-10
243 - made variables in rmmod_r local
244
245 * Tue Jul 22 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-9
246 - fixed permission for init script
247
248 * Sat Jul 19 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-8
249 - fixed save when iptables file is missing and iptables-config permissions
250
251 * Tue Jul  8 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-7
252 - fixes for ip6tables: module unloading, setting policy only for existing 
253   tables
254
255 * Thu Jul  3 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-6
256 - IPTABLES_SAVE_COUNTER defaults to no, now
257 - install config file in /etc/sysconfig
258 - exchange unload of ip_tables and ip_conntrack
259 - fixed start function
260
261 * Wed Jul  2 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-5
262 - new config option IPTABLES_SAVE_ON_RESTART
263 - init script: new status, save and restart
264 - fixes #44905, #65389, #80785, #82860, #91040, #91560 and #91374
265
266 * Mon Jun 30 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-4
267 - new config option IPTABLES_STATUS_NUMERIC
268 - cleared IPTABLES_MODULES in iptables-config
269
270 * Mon Jun 30 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-3
271 - new init scripts
272
273 * Sat Jun 28 2003 Florian La Roche <Florian.LaRoche@redhat.de>
274 - remove check for very old kernel versions in init scripts
275 - sync up both init scripts and remove some further ugly things
276 - add some docu into rpm
277
278 * Thu Jun 26  2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-2
279 - rebuild
280
281 * Mon Jun 16 2003 Thomas Woerner <twoerner@redhat.com> 1.2.8-1
282 - update to 1.2.8
283
284 * Wed Jan 22 2003 Tim Powers <timp@redhat.com>
285 - rebuilt
286
287 * Mon Jan 13 2003 Bill Nottingham <notting@redhat.com> 1.2.7a-1
288 - update to 1.2.7a
289 - add a plethora of bugfixes courtesy Michael Schwendt <mschewndt@yahoo.com>
290
291 * Fri Dec 13 2002 Elliot Lee <sopwith@redhat.com> 1.2.6a-3
292 - Fix multilib
293
294 * Wed Aug 07 2002 Karsten Hopp <karsten@redhat.de>
295 - fixed iptables and ip6tables initscript output, based on #70511
296 - check return status of all iptables calls, not just the last one
297   in a 'for' loop.
298
299 * Mon Jul 29 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.6a-1
300 - 1.2.6a (bugfix release, #69747)
301
302 * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
303 - automated rebuild
304
305 * Thu May 23 2002 Tim Powers <timp@redhat.com>
306 - automated rebuild
307
308 * Mon Mar  4 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-3
309 - Add some fixes from CVS, fixing bug #60465
310
311 * Tue Feb 12 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-2
312 - Merge ip6tables improvements from Ian Prowell <iprowell@prowell.org>
313   #59402
314 - Update URL (#59354)
315 - Use /sbin/chkconfig rather than chkconfig in %postun script
316
317 * Fri Jan 11 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.5-1
318 - 1.2.5
319
320 * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
321 - automated rebuild
322
323 * Mon Nov  5 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.4-2
324 - Fix %preun script
325
326 * Tue Oct 30 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.4-1
327 - Update to 1.2.4 (various fixes, including security fixes; among others:
328   #42990, #50500, #53325, #54280)
329 - Fix init script (#31133)
330
331 * Mon Sep  3 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.3-1
332 - 1.2.3 (5 security fixes, some other fixes)
333 - Fix updating (#53032)
334
335 * Mon Aug 27 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-4
336 - Fix #50990
337 - Add some fixes from current CVS; should fix #52620
338
339 * Mon Jul 16 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-3
340 - Add some fixes from the current CVS tree; fixes #49154 and some IPv6
341   issues
342
343 * Tue Jun 26 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-2
344 - Fix iptables-save reject-with (#45632), Patch from Michael Schwendt
345   <mschwendt@yahoo.com>
346
347 * Tue May  8 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.2.2-1
348 - 1.2.2
349
350 * Wed Mar 21 2001 Bernhard Rosenkraenzer <bero@redhat.com>
351 - 1.2.1a, fixes #28412, #31136, #31460, #31133
352
353 * Thu Mar  1 2001 Bernhard Rosenkraenzer <bero@redhat.com>
354 - Yet another initscript fix (#30173)
355 - Fix the fixes; they fixed some issues but broke more important
356   stuff :/ (#30176)
357
358 * Tue Feb 27 2001 Bernhard Rosenkraenzer <bero@redhat.com>
359 - Fix up initscript (#27962)
360 - Add fixes from CVS to iptables-{restore,save}, fixing #28412
361
362 * Fri Feb 09 2001 Karsten Hopp <karsten@redhat.de>
363 - create /etc/sysconfig/iptables mode 600 (same problem as #24245)
364
365 * Mon Feb 05 2001 Karsten Hopp <karsten@redhat.de>
366 - fix bugzilla #25986 (initscript not marked as config file)
367 - fix bugzilla #25962 (iptables-restore)
368 - mv chkconfig --del from postun to preun
369
370 * Thu Feb  1 2001 Trond Eivind Glomsrød <teg@redhat.com>
371 - Fix check for ipchains
372
373 * Mon Jan 29 2001 Bernhard Rosenkraenzer <bero@redhat.com>
374 - Some fixes to init scripts
375
376 * Wed Jan 24 2001 Bernhard Rosenkraenzer <bero@redhat.com>
377 - Add some fixes from CVS, fixes among other things Bug #24732
378
379 * Wed Jan 17 2001 Bernhard Rosenkraenzer <bero@redhat.com>
380 - Add missing man pages, fix up init script (Bug #17676)
381
382 * Mon Jan 15 2001 Bill Nottingham <notting@redhat.com>
383 - add init script
384
385 * Mon Jan 15 2001 Bernhard Rosenkraenzer <bero@redhat.com>
386 - 1.2
387 - fix up ipv6 split
388 - add init script
389 - Move the plugins from /usr/lib/iptables to /lib/iptables.
390   This needs to work before /usr is mounted...
391 - Use -O1 on alpha (compiler bug)
392
393 * Sat Jan  6 2001 Bernhard Rosenkraenzer <bero@redhat.com>
394 - 1.1.2
395 - Add IPv6 support (in separate package)
396
397 * Thu Aug 17 2000 Bill Nottingham <notting@redhat.com>
398 - build everywhere
399
400 * Tue Jul 25 2000 Bernhard Rosenkraenzer <bero@redhat.com>
401 - 1.1.1
402
403 * Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
404 - automatic rebuild
405
406 * Tue Jun 27 2000 Preston Brown <pbrown@redhat.com>
407 - move iptables to /sbin.
408 - excludearch alpha for now, not building there because of compiler bug(?)
409
410 * Fri Jun  9 2000 Bill Nottingham <notting@redhat.com>
411 - don't obsolete ipchains either
412 - update to 1.1.0
413
414 * Mon Jun  4 2000 Bill Nottingham <notting@redhat.com>
415 - remove explicit kernel requirement
416
417 * Tue May  2 2000 Bernhard Rosenkränzer <bero@redhat.com>
418 - initial package