7 # Marta Carbone <marta.carbone@iet.unipi.it>
8 # 2009 - Universita` di Pisa
11 # kernel_release, kernel_version and kernel_arch are expected to be set by the build to e.g.
12 # kernel_release : vs2.3.0.29.1.planetlab
13 # kernel_version : 2.6.22.14
19 %define release %{kernel_version}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
21 # guess which convention is used; k27 and before used dash, k32 uses dot
22 %define kernelpath_dash /usr/src/kernels/%{kernel_version}-%{kernel_release}-%{kernel_arch}
23 %define kernelpath_dot /usr/src/kernels/%{kernel_version}-%{kernel_release}.%{kernel_arch}
24 %define kernelpath %( [ -d %{kernelpath_dot} ] && echo %{kernelpath_dot} || echo %{kernelpath_dash} )
26 # the k32 kernel currently builds e.g. /lib/modules/2.6.32-0.onelab.2010.12.07-i686
27 # the k27 and before does not have the -i686 part
28 %define kernel_id_old %{kernel_version}-%{kernel_release}
29 %define kernel_id_new %{kernel_version}-%{kernel_release}.%{_target_cpu}
30 %define kernel_id %( [ -d %{kernelpath_dot} ] && echo %{kernel_id_new} || echo %{kernel_id_old} )
32 Summary: ipfw and dummynet for Linux
37 Group: System Environment/Kernel
38 Source0: %{name}-%{version}.tar.bz2
39 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
41 Requires: vsys-scripts
45 Packager: PlanetLab <marta@onelab2.iet.unipi.it>
47 Distribution: PlanetLab %{plrelease}
48 URL: %(echo %{url} | cut -d ' ' -f 2)
51 ipfw is the Linux port of the FreeBSD ipfw and dummynet packages
57 # clean the rpm build directory
58 rm -rf $RPM_BUILD_ROOT
60 %__make KERNELPATH=%kernelpath clean
61 %__make KERNELPATH=%kernelpath IPFW_PLANETLAB=1
64 install -D -m 755 dummynet2/ipfw_mod.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
65 install -D -m 755 ipfw/ipfw $RPM_BUILD_ROOT/sbin/ipfw
66 install -D -m 644 planetlab/ipfw.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/ipfw.cron
67 install -D -m 755 planetlab/ipfw $RPM_BUILD_ROOT/etc/rc.d/init.d/ipfw
70 rm -rf $RPM_BUILD_ROOT
73 ### this script is also triggered while the node image is being created at build-time
74 # some parts of the script do not make sense in this context
75 # this is why the build exports PL_BOOTCD=1 in such cases
77 /sbin/chkconfig --add ipfw
78 # start the service if not building
79 [ -z "$PL_BOOTCD" ] && service ipfw start
82 # stop the service if not building
83 [ -z "$PL_BOOTCD" ] && service ipfw stop
85 # here there is a list of the final installation directories
88 %dir /lib/modules/%{kernel_id}
89 /lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
91 %{_sysconfdir}/cron.d/ipfw.cron
95 * Sun Jan 23 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-20
96 - tweaks for compiling on k32/64 bits
98 * Wed Dec 08 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-19
99 - fix detection of kernel conventions
101 * Tue Dec 07 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-18
102 - guess conventions for either <=k27 or >=k32
104 * Tue Jun 15 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-17
105 - testing git only module-tag
107 * Tue Jun 15 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-16
108 - tagging ipfw to test module-tools on (pure) git
110 * Wed May 12 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-15
111 - tagging for obsoletes
113 * Tue Apr 27 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-13
114 - Update to the ipfw3 version of the dummynet code.
116 * Mon Apr 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-11
117 - add ipfw initialization script to chkconfig
119 * Wed Mar 03 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-10
120 - - Load module at installation - Marta
122 * Mon Jan 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-9
123 - consistent with vsys-scripts-0.95-13
125 * Mon Jan 11 2010 Marta Carbone <marta.carbone@iet.unipi.it>
126 - Integrated the ipfw rules cleanup into the backend
128 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-8
129 - builds on 2.6.22 & 2.6.27 - for 32 and 64 bits
131 * Wed Jan 06 2010 Marta Carbone <marta.carbone@iet.unipi.it>
132 - move to dummynet2, added support for table lookup
133 - added the vsys-script dependencies and the ipfw initialization
135 * Tue Dec 15 2009 Marta Carbone <marta.carbone@iet.unipi.it>
136 - more work on the radix code, added sysctl read/write support
138 * Sun Nov 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-7
139 - added missing qsort.c - tag 0.9-6 was broken
141 * Thu Nov 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-6
142 - root: removed goto into the main ipfw switch, enabled slice_id matching
143 - slice: completely move netconfig checks into the backend
145 * Mon Nov 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-5
146 - additional features on matching packets, including uid match
148 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-4
149 - on behalf of Marta Carbone, more options and features
151 * Thu Jul 23 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-3
152 - fixed memory usage issue
154 * Wed Jul 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-2
155 - patch for building on x86_64
157 * Thu Jun 25 2009 Marta Carbone <marta.carbone@iet.unipi.it>
158 - post installation removed for deployment, moved manpages to the slice package
160 * Fri Apr 17 2009 Marta Carbone <marta.carbone@iet.unipi.it>