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