Setting tag util-vserver-pl-0.4-26
[util-vserver-pl.git] / util-vserver-pl.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name    util-vserver-pl
7 %define version 0.4
8 %define taglevel 26
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 %define python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
13
14 Summary: PlanetLab extensions to util-vserver
15 Name: %{name}
16 Version: %{version}
17 Release: %{release}
18 License: GPL
19 Group: System Environment/Base
20 Source0: %{name}-%{version}.tar.bz2
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
22
23 Vendor: PlanetLab
24 Packager: PlanetLab Central <support@planet-lab.org>
25 Distribution: PlanetLab %{plrelease}
26 URL: %(echo %{url} | cut -d ' ' -f 2)
27
28 Requires: util-vserver util-vserver-core util-vserver-build util-vserver-sysv
29 Provides: util-vserver-python = %{version}-%{release}
30 Obsoletes: util-vserver-py32 resman
31 BuildRequires: libnl libnl-devel
32 BuildRequires: python python-devel
33 BuildRequires: util-vserver-core util-vserver-devel
34 BuildRequires: autoconf automake libtool
35
36 %description
37 This package contains all PlanetLab extensions to util-vserver.
38
39 %prep
40 %setup -q
41 autoreconf -fi
42
43
44 %build
45 %configure
46 make
47
48
49 %install
50 rm -fr %{buildroot}
51 make DESTDIR=%{buildroot} install
52
53 mkdir %{buildroot}/bin
54 ln -s ..%{_sbindir}/vsh %{buildroot}/bin/vsh
55
56 rm -f %{buildroot}%{python_sitearch}/vserverimpl.a
57 rm -f %{buildroot}%{python_sitearch}/vserverimpl.la
58
59 # Generate file list for python package
60 find "%{buildroot}" -name '*.py' | { while read FILE; do
61         f="${FILE#%{buildroot}}"
62         echo "${f}"
63         # need to touch these files, as they are not produced on FC4 or below
64         touch ${FILE}c
65         touch ${FILE}o
66         echo %%ghost "${f}c"
67         echo %%ghost "${f}o"
68 done } > %name-python.list
69
70
71 %post
72 # add /bin/vsh to list of secure shells
73 if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then
74         echo /bin/vsh >> /etc/shells
75 fi
76
77 /usr/sbin/bwlimit init
78
79 # Migrate old style vservers to new style
80 pushd /etc/vservers
81 for i in `ls /etc/vservers` 
82 do 
83         if grep -rq "^0\.0\.0\.0" "$i/interfaces/"; then
84                 # set nflags
85                 echo "persistent,lback_allow" > $i/nflags 
86                 /usr/sbin/nattribute --set --nid `cat $i/context` --flag lback_allow
87         
88                 # set cflags
89                 echo -e "persistent\n~info_init" > $i/cflags
90                 /usr/sbin/vattribute --set --xid `cat $i/context` --flag ~sched_hard
91         
92                 # deprecated
93                 rm -f $i/flags
94         
95                 # remove 16mb tmp restrictions
96                 sed -i -e '/tmpfs\tsize=16m/d' $i/fstab
97         
98                 # enable mount namespaces
99                 rm -f $i/nonamespace
100                 
101                 # enable IP forwarding
102                 mkdir -p $i/sysctl/0 
103                 echo net.ipv4.ip_forward > $i/sysctl/0/setting
104                 echo 1 > $i/sysctl/0/value
105
106                 # create missing interface files/directories
107                 mkdir -p $i/interfaces/0 
108                 hostname -i > $i/interfaces/0/ip
109                 touch $i/interfaces/0/nodev 
110
111                 mkdir -p $i/interfaces/1
112                 echo -e "127.0.0.1" > $i/interfaces/1/ip
113                 touch $i/interfaces/1/nodev
114         fi
115 done
116 popd
117
118 %postun
119 # 0 = erase, 1 = upgrade
120 if [ "$1" = 0 ] ; then
121         perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells
122 fi
123
124
125 %clean
126 rm -fr %{buildroot}
127
128
129 %files -f %name-python.list
130 %defattr(-,root,root,-)
131 %{_sbindir}/bwlimit
132 %{_sbindir}/disklimit
133 %{_sbindir}/vuseradd
134 %{_sbindir}/vuserdel
135 %{python_sitearch}/vserverimpl.so
136 %{_sbindir}/vip6-autod
137 %{_sysconfdir}/init.d/vip6-autod
138
139 %attr(4755,root,root) %{_sbindir}/vsh
140 /bin/vsh
141 %{_mandir}/man8/vsh.8*
142
143 %changelog
144 * Tue Jun 07 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-26
145 - added support for loopback isolation
146
147 * Wed Mar 23 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-pl-0.4-25
148 - vuserdel doesn't handle new vserver features that we are using like mount namespaces and/or cgroups, so it silently fails most of the time. Remove old code and start to use vserver provided tools
149
150 * Thu Mar 10 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-pl-0.4-24
151 - * associate SSH processes with the appropriate cgroup
152 - *  migrate only when neccessary
153
154 * Wed Mar 02 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-pl-0.4-23
155 - remove hardcoded nproc.hard limit as it shouldn't be hardcoded
156
157 * Wed Feb 02 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-22
158 - pass device to bwlimit
159
160 * Wed Dec 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-21
161 - force remove nonamespace
162
163 * Tue Oct 12 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-20
164 - Fix the segfault caused by existing TUN device
165
166 * Fri Aug 13 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-19
167 - Fix syntax error
168
169 * Mon Aug 09 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-18
170 - migrate old style interface files to new style
171
172 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-17
173 - Some dead code removed from repository
174
175 * Mon Jul 19 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-16
176 - * use system-wide umask
177 - * enable set_ipaddresses_config function
178 - * set more default values
179
180 * Mon Jul 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-15
181 - new constant VC_LIM_INFINITY
182
183 * Tue Jul 06 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-14
184 - fix setting cpu_share for slices
185
186 * Thu Jun 24 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-13
187 - start to use mount namespaces
188
189 * Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-12
190 - initscripts are ignored - handled by nodemanager and triggered by rc
191
192 * Thu Jun 17 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-11
193 - sliver name as the last argument to initscript
194
195 * Tue Jun 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-10
196 - remove tmpfs mounted /tmp
197
198 * Fri May 14 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-9
199 - change flags without restarting the vservers
200
201 * Thu May 13 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-8
202 - Migrate old style vservers to new style
203
204 * Thu May 13 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-7
205 - chroot_call fix
206
207 * Wed May 12 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-6
208 - fix initscript issues
209
210 * Mon May 10 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-5
211
212 * Mon May 10 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-4
213 - merged trellis branch to trunk
214
215 * Wed Feb 24 2010 Marc Fiuczynski <mef@cs.princeton.edu> - util-vserver-pl-0.3-27
216 - Need to print the exception string as part of the self.log, or else we
217 - get a wrong number of argument error.
218
219 * Wed Feb 24 2010 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-26
220 - This is outputted for some reason.
221
222 * Tue Feb 23 2010 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-25
223 - Don't set bwlimits if they're disabled.
224 - Don't cleanup /var of running slivers.
225
226 * Tue Feb 23 2010 Marc Fiuczynski <mef@cs.princeton.edu> - util-vserver-pl-0.3-24
227 - - openfd -> nofile
228
229 * Tue Feb 16 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.3-23
230 - call bwlimit init in postinstall.
231
232 * Fri Jan 29 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.3-22
233 - move the HTB tree one level down for DRL
234
235 * Mon Jan 25 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.3-21
236 - logging policy only; use /var/log/nm instead of boot.log, and give more details with (un)setdlimit
237
238 * Thu Nov 19 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-20
239 - Log the error as well.
240
241 * Wed Oct 28 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-19
242 - Set ulimits for NM too.
243
244 * Tue Oct 20 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.3-18
245 - bwlimit.set() now accepts the device and don't assume that it's eth0
246
247 * Tue Aug 04 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-17
248 - Fix runlevel clean up after reboot.
249 - Fix runlevel setup to reflect proper runlevel.
250
251 * Thu Jan 29 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-16
252 - supports disabling htbs.
253
254 * Wed Oct 29 2008 Marc E. Fiuczynski <mef@cs.princeton.edu> - util-vserver-pl-0.3-15
255 - added in support for rlimit MEM_LOCK
256 - fixed bug in reading -1 value from VSERVERCONF/<guest>/rlimits/memlock.hard file
257 - reduced compilation warnings
258
259 * Tue Sep 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.3-14
260 - configure/make check the version of libnl and can cope with either 1.1 or 1.0-pre6
261 - as centos does not have any of these, do build vip6-autod on fedora only
262
263 * Wed Sep 17 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-13
264 - Remove current bw limit checks before issuing tc.
265
266 * Fri Aug 29 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-12
267 - libnl 1.1 fixups.
268
269 * Thu Aug 28 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.3-11
270 - reads /etc/vservers/<name>/personality and behaves accordingly
271 - nicer formatting for byte rates
272
273 * Sun Aug 17 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-10
274 - FUSE support.
275
276 * Fri Aug 01 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-9
277 - Check running values before issuing set or on.  If same, disregard to save on forks.
278
279 * Fri Jul 25 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-8
280 - exempt_init shouldn't modify iptables rules.  Instead, only manipulate ipset.  Assume iptables rules are setup properly (now downloaded from nodeconfig/PlanetLabConf for I2 and defaulted to iptables/planetlab-config for all other nodes).
281
282 * Tue Jul 22 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-7
283 - Init exempt flows into "mangle" table.
284
285 * Fri Jun 27 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-6
286 - Optimized the case where it's already running.
287
288 * Thu Jun 26 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-5
289 - Ignore ESRCH for setname.
290 - Always create the home directory, regardless of configuration settings.
291
292 * Fri May 09 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - util-vserver-pl-0.3-4
293
294
295 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - util-vserver-pl-0.3-3
296 - Added support for vc_{set|get}_vhi_name() via util-vserver-pl.
297 - Adding a tag to include in the 4.2rc2
298
299
300 * Wed Apr 16 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-2
301
302 - * Can write vcVHI_CONTEXT
303 - * CAP_NET_BIND_SERVICE is special, in all cases. 
304 - * Check if already mounted before mounting fs in vserver
305 - * Optimized 0.0.0.0 case
306 - * Removed vcached.  DEPRECATED
307
308
309 * Fri Nov 30 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.1-1
310 - Initial release
311
312 %define module_current_branch 0.3