Setting tag ipfw-0.9-15
[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 #
7 %define url $URL$
8
9 # Marta Carbone <marta.carbone@iet.unipi.it>
10 # 2009 - Universita` di Pisa
11 # License is BSD.
12
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
16
17 %define name ipfwroot
18 %define version 0.9
19 %define taglevel 15
20
21 %define release %{kernel_version}.%{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
22 %define kernel_id_arch %{kernel_version}-%{kernel_release}-%{kernel_arch}
23 %define kernel_id %{kernel_version}-%{kernel_release}
24
25 Summary: ipfw and dummynet for Linux
26 Name: %{name}
27 Version: %{version}
28 Release: %{release}
29 License: BSD
30 Group: System Environment/Kernel
31 Source0: %{name}-%{version}.tar.bz2
32 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
33 Requires: vixie-cron
34 Requires: vsys-scripts
35 Obsoletes: ipfw
36
37 Vendor: unipi
38 Packager: PlanetLab <marta@onelab2.iet.unipi.it>
39 # XXX ask 
40 Distribution: PlanetLab %{plrelease}
41 URL: %(echo %{url} | cut -d ' ' -f 2)
42
43 %description
44 ipfw is the Linux port of the FreeBSD ipfw and dummynet packages
45
46 %prep
47 %setup
48
49 %build
50 # clean the rpm build directory
51 rm -rf $RPM_BUILD_ROOT
52
53 # with the new build, we use the kernel-devel rpm for building
54 %define kernelpath /usr/src/kernels/%{kernel_id_arch}
55
56 %__make KERNELPATH=%kernelpath clean
57 %__make KERNELPATH=%kernelpath IPFW_PLANETLAB=1
58
59 %install
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 644 planetlab/ipfw.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/ipfw.cron
63 install -D -m 755 planetlab/ipfw $RPM_BUILD_ROOT/etc/rc.d/init.d/ipfw
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 ### this script is also triggered while the node image is being created at build-time
70 # some parts of the script do not make sense in this context
71 # this is why the build exports PL_BOOTCD=1 in such cases
72 depmod -a
73 /sbin/chkconfig --add ipfw
74 # start the service if not building
75 [ -z "$PL_BOOTCD" ] && service ipfw start
76
77 %postun
78 # stop the service if not building
79 [ -z "$PL_BOOTCD" ] && service ipfw stop
80
81 # here there is a list of the final installation directories
82 %files
83 %defattr(-,root,root)
84 %dir /lib/modules/%{kernel_id}
85 /lib/modules/%{kernel_id}/net/netfilter/ipfw_mod.ko
86 /sbin/ipfw
87 %{_sysconfdir}/cron.d/ipfw.cron
88 /etc/rc.d/init.d/ipfw
89
90 %changelog
91 * Wed May 12 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-15
92 - tagging for obsoletes
93
94 * Tue Apr 27 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-13
95 - Update to the ipfw3 version of the dummynet code.
96
97 * Mon Apr 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-11
98 - add ipfw initialization script to chkconfig
99
100 * Wed Mar 03 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - ipfw-0.9-10
101 - - Load module at installation - Marta
102
103 * Mon Jan 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-9
104 - consistent with vsys-scripts-0.95-13
105
106 * Mon Jan 11 2010 Marta Carbone <marta.carbone@iet.unipi.it>
107 - Integrated the ipfw rules cleanup into the backend
108
109 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-8
110 - builds on 2.6.22 & 2.6.27 - for 32 and 64 bits
111
112 * Wed Jan 06 2010 Marta Carbone <marta.carbone@iet.unipi.it>
113 - move to dummynet2, added support for table lookup
114 - added the vsys-script dependencies and the ipfw initialization
115
116 * Tue Dec 15 2009 Marta Carbone <marta.carbone@iet.unipi.it>
117 - more work on the radix code, added sysctl read/write support
118
119 * Sun Nov 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-7
120 - added missing qsort.c - tag 0.9-6 was broken
121
122 * Thu Nov 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-6
123 - root: removed goto into the main ipfw switch, enabled slice_id matching
124 - slice: completely move netconfig checks into the backend
125
126 * Mon Nov 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-5
127 - additional features on matching packets, including uid match
128
129 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-4
130 - on behalf of Marta Carbone, more options and features
131
132 * Thu Jul 23 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-3
133 - fixed memory usage issue
134
135 * Wed Jul 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - ipfw-0.9-2
136 - patch for building on x86_64
137
138 * Thu Jun 25 2009 Marta Carbone <marta.carbone@iet.unipi.it>
139 - post installation removed for deployment, moved manpages to the slice package
140
141 * Fri Apr 17 2009 Marta Carbone <marta.carbone@iet.unipi.it>
142 - Initial release