2 # $Id: ipfwroot.spec 16174 2009-12-15 13:38:15Z marta $
9 # Marta Carbone <marta.carbone@iet.unipi.it>
10 # 2009 - Universita` di Pisa
13 # kernel_release, kernel_version and kernel_arch are expected to be set by the build to e.g.
14 # kernel_release : vs2.3.0.29.1.planetlab
15 # kernel_version : 2.6.22.14
21 %define release %{kernel_version}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
22 # use any of these two if found
23 %define kernelpath_dash /usr/src/kernels/%{kernel_version}-%{kernel_release}-%{kernel_arch}
24 %define kernelpath_dot /usr/src/kernels/%{kernel_version}-%{kernel_release}.%{kernel_arch}
25 # the k32 kernel currently builds e.g. /lib/modules/2.6.32-0.onelab.2010.12.07-i686
26 # the extra star should address the -i686 part, that k27 does not have
27 %define kernel_id %{kernel_version}-%{kernel_release}*
29 Summary: ipfw and dummynet for Linux
34 Group: System Environment/Kernel
35 Source0: %{name}-%{version}.tar.bz2
36 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
38 Requires: vsys-scripts
42 Packager: PlanetLab <marta@onelab2.iet.unipi.it>
44 Distribution: PlanetLab %{plrelease}
45 URL: %(echo %{url} | cut -d ' ' -f 2)
48 ipfw is the Linux port of the FreeBSD ipfw and dummynet packages
54 # clean the rpm build directory
55 rm -rf $RPM_BUILD_ROOT
57 # with the new build, we use the kernel-devel rpm for building
58 # guess which convention is used; k27 and before used dash, k32 uses dot
59 %define kernelpath %( [ -d %{kernelpath_dot} ] && echo %{kernelpath_dot} || echo %{kernelpath_dash} )
61 %__make KERNELPATH=%kernelpath clean
62 %__make KERNELPATH=%kernelpath IPFW_PLANETLAB=1
65 install -D -m 755 dummynet2/ipfw_mod.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
66 install -D -m 755 ipfw/ipfw $RPM_BUILD_ROOT/sbin/ipfw
67 install -D -m 644 planetlab/ipfw.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/ipfw.cron
68 install -D -m 755 planetlab/ipfw $RPM_BUILD_ROOT/etc/rc.d/init.d/ipfw
71 rm -rf $RPM_BUILD_ROOT
74 ### this script is also triggered while the node image is being created at build-time
75 # some parts of the script do not make sense in this context
76 # this is why the build exports PL_BOOTCD=1 in such cases
78 /sbin/chkconfig --add ipfw
79 # start the service if not building
80 [ -z "$PL_BOOTCD" ] && service ipfw start
83 # stop the service if not building
84 [ -z "$PL_BOOTCD" ] && service ipfw stop
86 # here there is a list of the final installation directories
89 %dir /lib/modules/%{kernel_id}
90 /lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
92 %{_sysconfdir}/cron.d/ipfw.cron
96 * Tue Jun 15 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-17
97 - testing git only module-tag
99 * Tue Jun 15 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-16
100 - tagging ipfw to test module-tools on (pure) git
102 * Wed May 12 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-15
103 - tagging for obsoletes
105 * Tue Apr 27 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-13
106 - Update to the ipfw3 version of the dummynet code.
108 * Mon Apr 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-11
109 - add ipfw initialization script to chkconfig
111 * Wed Mar 03 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-10
112 - - Load module at installation - Marta
114 * Mon Jan 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-9
115 - consistent with vsys-scripts-0.95-13
117 * Mon Jan 11 2010 Marta Carbone <marta.carbone@iet.unipi.it>
118 - Integrated the ipfw rules cleanup into the backend
120 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-8
121 - builds on 2.6.22 & 2.6.27 - for 32 and 64 bits
123 * Wed Jan 06 2010 Marta Carbone <marta.carbone@iet.unipi.it>
124 - move to dummynet2, added support for table lookup
125 - added the vsys-script dependencies and the ipfw initialization
127 * Tue Dec 15 2009 Marta Carbone <marta.carbone@iet.unipi.it>
128 - more work on the radix code, added sysctl read/write support
130 * Sun Nov 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-7
131 - added missing qsort.c - tag 0.9-6 was broken
133 * Thu Nov 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-6
134 - root: removed goto into the main ipfw switch, enabled slice_id matching
135 - slice: completely move netconfig checks into the backend
137 * Mon Nov 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-5
138 - additional features on matching packets, including uid match
140 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-4
141 - on behalf of Marta Carbone, more options and features
143 * Thu Jul 23 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-3
144 - fixed memory usage issue
146 * Wed Jul 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-2
147 - patch for building on x86_64
149 * Thu Jun 25 2009 Marta Carbone <marta.carbone@iet.unipi.it>
150 - post installation removed for deployment, moved manpages to the slice package
152 * Fri Apr 17 2009 Marta Carbone <marta.carbone@iet.unipi.it>