2 # $Id: ipfwroot.spec 16174 2009-12-15 13:38:15Z marta $
6 # modprobe ipfw_mod.ko (depmod ?)
10 # Marta Carbone <marta.carbone@iet.unipi.it>
11 # 2009 - Universita` di Pisa
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
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}
26 Summary: ipfw and dummynet for Linux
31 Group: System Environment/Kernel
32 Source0: %{name}-%{version}.tar.bz2
33 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
35 Requires: vsys-scripts
38 Packager: PlanetLab <marta@onelab2.iet.unipi.it>
40 Distribution: PlanetLab %{plrelease}
41 URL: %(echo %{url} | cut -d ' ' -f 2)
44 ipfw is the Linux port of the FreeBSD ipfw and dummynet packages
50 # clean the rpm build directory
51 rm -rf $RPM_BUILD_ROOT
53 # with the new build, we use the kernel-devel rpm for building
54 %define kernelpath /usr/src/kernels/%{kernel_id_arch}
56 %__make KERNELPATH=%kernelpath clean
57 %__make KERNELPATH=%kernelpath IPFW_PLANETLAB=1
60 install -D -m 755 dummynet2/ipfw_mod.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
61 install -D -m 755 ipfw/ipfw $RPM_BUILD_ROOT/sbin/ipfw
62 install -D -m 755 planetlab/ipfw-cleanup $RPM_BUILD_ROOT/usr/bin/ipfw-cleanup
63 install -D -m 644 planetlab/ipfw.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/ipfw.cron
66 rm -rf $RPM_BUILD_ROOT
68 # here there is a list of the final installation directories
71 %dir /lib/modules/%{kernel_id}
72 /lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
75 %{_sysconfdir}/cron.d/ipfw.cron
78 # unload the module if present
79 LOADED=`cat /proc/modules | grep ^ipfw_mod`; if [ -n "$LOADED" ] ; then rmmod ipfw_mod; fi
80 # clean the old database and initialize the firewall
81 echo "super dbcleanup" | /vsys/ipfw-be 0
82 echo "super init" | /vsys/ipfw-be 0
85 * Wed Jan 06 2010 Marta Carbone <marta.carbone@iet.unipi.it>
86 - move to dummynet2, added support for table lookup
87 - added the vsys-script dependencies and the ipfw initialization
89 * Tue Dec 15 2009 Marta Carbone <marta.carbone@iet.unipi.it>
90 - more work on the radix code, added sysctl read/write support
92 * Sun Nov 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-7
93 - added missing qsort.c - tag 0.9-6 was broken
95 * Thu Nov 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-6
96 - root: removed goto into the main ipfw switch, enabled slice_id matching
97 - slice: completely move netconfig checks into the backend
99 * Mon Nov 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-5
100 - additional features on matching packets, including uid match
102 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-4
103 - on behalf of Marta Carbone, more options and features
105 * Thu Jul 23 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-3
106 - fixed memory usage issue
108 * Wed Jul 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-2
109 - patch for building on x86_64
111 * Thu Jun 25 2009 Marta Carbone <marta.carbone@iet.unipi.it>
112 - post installation removed for deployment, moved manpages to the slice package
114 * Fri Apr 17 2009 Marta Carbone <marta.carbone@iet.unipi.it>