6 %define name util-vserver-pl
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
12 %define python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
14 Summary: PlanetLab extensions to util-vserver
19 Group: System Environment/Base
20 Source0: %{name}-%{version}.tar.bz2
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
24 Packager: PlanetLab Central <support@planet-lab.org>
25 Distribution: PlanetLab %{plrelease}
26 URL: %(echo %{url} | cut -d ' ' -f 2)
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
37 This package contains all PlanetLab extensions to util-vserver.
51 make DESTDIR=%{buildroot} install
53 mkdir %{buildroot}/bin
54 ln -s ..%{_sbindir}/vsh %{buildroot}/bin/vsh
56 rm -f %{buildroot}%{python_sitearch}/vserverimpl.a
57 rm -f %{buildroot}%{python_sitearch}/vserverimpl.la
59 # Generate file list for python package
60 find "%{buildroot}" -name '*.py' | { while read FILE; do
61 f="${FILE#%{buildroot}}"
63 # need to touch these files, as they are not produced on FC4 or below
68 done } > %name-python.list
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
77 /usr/sbin/bwlimit init
79 # Migrate old style vservers to new style
81 for i in `ls /etc/vservers`
83 if grep -rq "^0\.0\.0\.0" "$i/interfaces/"; then
85 echo "persistent,lback_allow" > $i/nflags
86 /usr/sbin/nattribute --set --nid `cat $i/context` --flag lback_allow
89 echo -e "persistent\n~info_init" > $i/cflags
90 /usr/sbin/vattribute --set --xid `cat $i/context` --flag ~sched_hard
95 # remove 16mb tmp restrictions
96 sed -i -e '/tmpfs\tsize=16m/d' $i/fstab
98 # enable mount namespaces
101 # enable IP forwarding
103 echo net.ipv4.ip_forward > $i/sysctl/0/setting
104 echo 1 > $i/sysctl/0/value
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
111 mkdir -p $i/interfaces/1
112 echo -e "127.0.0.1" > $i/interfaces/1/ip
113 touch $i/interfaces/1/nodev
119 # 0 = erase, 1 = upgrade
120 if [ "$1" = 0 ] ; then
121 perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells
129 %files -f %name-python.list
130 %defattr(-,root,root,-)
132 %{_sbindir}/disklimit
135 %{python_sitearch}/vserverimpl.so
136 %{_sbindir}/vip6-autod
137 %{_sysconfdir}/init.d/vip6-autod
139 %attr(4755,root,root) %{_sbindir}/vsh
141 %{_mandir}/man8/vsh.8*
144 * Thu Mar 10 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-pl-0.4-24
145 - * associate SSH processes with the appropriate cgroup
146 - * migrate only when neccessary
148 * Wed Mar 02 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-pl-0.4-23
149 - remove hardcoded nproc.hard limit as it shouldn't be hardcoded
151 * Wed Feb 02 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-22
152 - pass device to bwlimit
154 * Wed Dec 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-21
155 - force remove nonamespace
157 * Tue Oct 12 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-20
158 - Fix the segfault caused by existing TUN device
160 * Fri Aug 13 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-19
163 * Mon Aug 09 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-18
164 - migrate old style interface files to new style
166 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-17
167 - Some dead code removed from repository
169 * Mon Jul 19 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-16
170 - * use system-wide umask
171 - * enable set_ipaddresses_config function
172 - * set more default values
174 * Mon Jul 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-15
175 - new constant VC_LIM_INFINITY
177 * Tue Jul 06 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-14
178 - fix setting cpu_share for slices
180 * Thu Jun 24 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-13
181 - start to use mount namespaces
183 * Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-12
184 - initscripts are ignored - handled by nodemanager and triggered by rc
186 * Thu Jun 17 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-11
187 - sliver name as the last argument to initscript
189 * Tue Jun 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-10
190 - remove tmpfs mounted /tmp
192 * Fri May 14 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-9
193 - change flags without restarting the vservers
195 * Thu May 13 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-8
196 - Migrate old style vservers to new style
198 * Thu May 13 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-7
201 * Wed May 12 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-6
202 - fix initscript issues
204 * Mon May 10 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-5
206 * Mon May 10 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-4
207 - merged trellis branch to trunk
209 * Wed Feb 24 2010 Marc Fiuczynski <mef@cs.princeton.edu> - util-vserver-pl-0.3-27
210 - Need to print the exception string as part of the self.log, or else we
211 - get a wrong number of argument error.
213 * Wed Feb 24 2010 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-26
214 - This is outputted for some reason.
216 * Tue Feb 23 2010 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-25
217 - Don't set bwlimits if they're disabled.
218 - Don't cleanup /var of running slivers.
220 * Tue Feb 23 2010 Marc Fiuczynski <mef@cs.princeton.edu> - util-vserver-pl-0.3-24
223 * Tue Feb 16 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.3-23
224 - call bwlimit init in postinstall.
226 * Fri Jan 29 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.3-22
227 - move the HTB tree one level down for DRL
229 * Mon Jan 25 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.3-21
230 - logging policy only; use /var/log/nm instead of boot.log, and give more details with (un)setdlimit
232 * Thu Nov 19 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-20
233 - Log the error as well.
235 * Wed Oct 28 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-19
236 - Set ulimits for NM too.
238 * Tue Oct 20 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.3-18
239 - bwlimit.set() now accepts the device and don't assume that it's eth0
241 * Tue Aug 04 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-17
242 - Fix runlevel clean up after reboot.
243 - Fix runlevel setup to reflect proper runlevel.
245 * Thu Jan 29 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-16
246 - supports disabling htbs.
248 * Wed Oct 29 2008 Marc E. Fiuczynski <mef@cs.princeton.edu> - util-vserver-pl-0.3-15
249 - added in support for rlimit MEM_LOCK
250 - fixed bug in reading -1 value from VSERVERCONF/<guest>/rlimits/memlock.hard file
251 - reduced compilation warnings
253 * Tue Sep 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.3-14
254 - configure/make check the version of libnl and can cope with either 1.1 or 1.0-pre6
255 - as centos does not have any of these, do build vip6-autod on fedora only
257 * Wed Sep 17 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-13
258 - Remove current bw limit checks before issuing tc.
260 * Fri Aug 29 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-12
263 * Thu Aug 28 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.3-11
264 - reads /etc/vservers/<name>/personality and behaves accordingly
265 - nicer formatting for byte rates
267 * Sun Aug 17 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-10
270 * Fri Aug 01 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-9
271 - Check running values before issuing set or on. If same, disregard to save on forks.
273 * Fri Jul 25 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-8
274 - 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).
276 * Tue Jul 22 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-7
277 - Init exempt flows into "mangle" table.
279 * Fri Jun 27 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-6
280 - Optimized the case where it's already running.
282 * Thu Jun 26 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - util-vserver-pl-0.3-5
283 - Ignore ESRCH for setname.
284 - Always create the home directory, regardless of configuration settings.
286 * Fri May 09 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - util-vserver-pl-0.3-4
289 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - util-vserver-pl-0.3-3
290 - Added support for vc_{set|get}_vhi_name() via util-vserver-pl.
291 - Adding a tag to include in the 4.2rc2
294 * Wed Apr 16 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - util-vserver-pl-0.3-2
296 - * Can write vcVHI_CONTEXT
297 - * CAP_NET_BIND_SERVICE is special, in all cases.
298 - * Check if already mounted before mounting fs in vserver
299 - * Optimized 0.0.0.0 case
300 - * Removed vcached. DEPRECATED
303 * Fri Nov 30 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.1-1
306 %define module_current_branch 0.3