Update the cleanup for expired rules.
[ipfw.git] / planetlab / ipfwroot.spec
1 #
2 # $Id: ipfwroot.spec 16174 2009-12-15 13:38:15Z marta $
3 #
4 # TODO:
5 # restart crond
6 # modprobe ipfw_mod.ko (depmod ?)
7 #
8 %define url $URL:$
9
10 # Marta Carbone <marta.carbone@iet.unipi.it>
11 # 2009 - Universita` di Pisa
12 # License is BSD.
13
14 # kernel_release, kernel_version and kernel_arch are expected to be set by the build to e.g.
15 # kernel_release : vs2.3.0.29.1.planetlab
16 # kernel_version : 2.6.22.14
17
18 %define name ipfwroot
19 %define version 0.9
20 %define taglevel 7
21
22 %define release %{kernel_version}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
23 %define kernel_id_arch %{kernel_version}-%{kernel_release}-%{kernel_arch}
24 %define kernel_id %{kernel_version}-%{kernel_release}
25
26 Summary: ipfw and dummynet for Linux
27 Name: %{name}
28 Version: %{version}
29 Release: %{release}
30 License: BSD
31 Group: System Environment/Kernel
32 Source0: %{name}-%{version}.tar.bz2
33 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
34 Requires: vixie-cron
35
36 Vendor: unipi
37 Packager: PlanetLab <marta@onelab2.iet.unipi.it>
38 # XXX ask 
39 Distribution: PlanetLab %{plrelease}
40 URL: %(echo %{url} | cut -d ' ' -f 2)
41
42 %description
43 ipfw is the Linux port of the FreeBSD ipfw and dummynet packages
44
45 %prep
46 %setup
47
48 %build
49 # clean the rpm build directory
50 rm -rf $RPM_BUILD_ROOT
51
52 # with the new build, we use the kernel-devel rpm for building
53 %define kernelpath /usr/src/kernels/%{kernel_id_arch}
54
55 %__make KERNELPATH=%kernelpath clean
56 %__make KERNELPATH=%kernelpath IPFW_PLANETLAB=1
57
58 %install
59 install -D -m 755 dummynet/ipfw_mod.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
60 install -D -m 755 ipfw/ipfw $RPM_BUILD_ROOT/sbin/ipfw
61 install -D -m 755 planetlab/ipfw-cleanup $RPM_BUILD_ROOT/usr/bin/ipfw-cleanup
62 install -D -m 644 planetlab/ipfw.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/ipfw.cron
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 # here there is a list of the final installation directories
68 %files
69 %defattr(-,root,root)
70 %dir /lib/modules/%{kernel_id}
71 /lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
72 /sbin/ipfw
73 /usr/bin/ipfw-cleanup
74 %{_sysconfdir}/cron.d/ipfw.cron
75
76 %postun
77 # unload the module if present
78 LOADED=`cat /proc/modules | grep ^ipfw_mod`; if [ -n "$LOADED" ] ; then rmmod ipfw_mod; fi
79
80 %changelog
81 * Tue Dec 15 2009 Marta Carbone <marta.carbone@iet.unipi.it>
82 - more work on the radix code, added sysctl read/write support
83
84 * Sun Nov 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-7
85 - added missing qsort.c - tag 0.9-6 was broken
86
87 * Thu Nov 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-6
88 - root: removed goto into the main ipfw switch, enabled slice_id matching
89 - slice: completely move netconfig checks into the backend
90
91 * Mon Nov 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-5
92 - additional features on matching packets, including uid match
93
94 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-4
95 - on behalf of Marta Carbone, more options and features
96
97 * Thu Jul 23 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-3
98 - fixed memory usage issue
99
100 * Wed Jul 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-2
101 - patch for building on x86_64
102
103 * Thu Jun 25 2009 Marta Carbone <marta.carbone@iet.unipi.it>
104 - post installation removed for deployment, moved manpages to the slice package
105
106 * Fri Apr 17 2009 Marta Carbone <marta.carbone@iet.unipi.it>
107 - Initial release