1 # $Id: util-vserver.spec.in,v 1.49 2005/07/15 19:06:58 ensc Exp $
3 ## This package understands the following switches:
4 ## --without dietlibc ... disable usage of dietlibc
5 ## --without xalan ... do not require/use the xalan xslt processor
7 %global confdir %_sysconfdir/vservers
8 %global confdefaultdir %confdir/.defaults
9 %global pkglibdir %_libdir/%name
10 %global __chattr /usr/bin/chattr
11 %global chkconfig /sbin/chkconfig
13 %global _localstatedir %_var
16 %{!?release_func:%global release_func() %1%{?dist}}
18 %define name util-vserver
19 %define version 0.30.208
20 %define release 10%{?pldistro:.%{pldistro}}%{?date:.%{date}}
22 %define _without_dietlibc 1
23 %define _without_xalan 1
25 # don't build debuginfo RPM
26 %define debug_package %{nil}
29 Packager: PlanetLab Central <support@planet-lab.org>
30 Distribution: PlanetLab 3.0
31 URL: http://cvs.planet-lab.org/cvs/util-vserver
33 Summary: Linux virtual server utilities
38 Group: System Environment/Base
39 #URL: http://savannah.nongnu.org/projects/util-vserver/
40 Source0: http://savannah.nongnu.org/download/util-vserver/stable.pkg/%version/%name-%version.tar.bz2
41 BuildRoot: %_tmppath/%name-%version-%release-root
43 Requires: %name-core = %version-%release
44 Requires: %name-lib = %version-%release
45 Requires: diffutils mktemp sed
46 Provides: vserver = %version-%release
47 Obsoletes: vserver < %version
48 BuildRequires: mount vconfig gawk iproute iptables
49 BuildRequires: gcc-c++ wget which diffutils
50 BuildRequires: e2fsprogs-devel beecrypt-devel
51 BuildRequires: doxygen tetex-latex
52 Requires(pre): %pkglibdir
53 Requires(postun): %pkglibdir
54 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
55 %{!?_without_xalan:BuildRequires: xalan-j}
58 Summary: Dynamic libraries for util-vserver
59 Group: System Environment/Libraries
62 Summary: The core-utilities for util-vserver
63 Group: Applications/System
67 Summary: Tools which can be used to build vservers
68 Group: Applications/System
69 Requires: rpm wget binutils tar e2fsprogs
70 Requires: %name = %version-%release
71 Requires(pre): %confdir
72 Requires(postun): %confdir
75 # Remove apt dependency, this is not available on Fedora Core
80 Summary: SysV-initscripts for vserver
81 Group: System Environment/Base
82 Provides: init(%name) = sysv
83 Requires: make diffutils
85 Requires: %name = %version-%release
86 Requires(post): %chkconfig
87 Requires(preun): %chkconfig
88 Requires(pre): %_initrddir %pkglibdir
89 requires(postun): %_initrddir %pkglibdir
92 Summary: Legacy utilities for util-vserver
93 Group: Applications/System
94 Requires: %name = %version-%release
95 Requires(post): %chkconfig
96 Requires(preun): %chkconfig
97 Requires(pre): %_initrddir %pkglibdir
98 requires(postun): %_initrddir %pkglibdir
101 Summary: Header-files and libraries needed to develop vserver based applications
102 Group: Development/Libraries
104 Requires: %name-lib = %version-%release
107 Summary: Python modules for manipulating vservers
108 Group: Applications/System
109 Requires: python util-python
110 Obsoletes: util-vserver-py23
114 util-vserver provides the components and a framework to setup virtual
115 servers. A virtual server runs inside a linux server. It is nevertheless
116 highly independent. As such, you can run various services with normal
117 configuration. The various vservers can't interact with each other and
118 can't interact with services in the main server.
120 This requires a special kernel supporting the new new_s_context and
121 set_ipv4root system call.
124 util-vserver provides the components and a framework to setup virtual
125 servers. A virtual server runs inside a linux server. It is nevertheless
126 highly independent. As such, you can run various services with normal
127 configuration. The various vservers can't interact with each other and
128 can't interact with services in the main server.
130 This package contains the shared libraries needed by all other
131 'util-vserver' subpackages.
134 util-vserver provides the components and a framework to setup virtual
135 servers. A virtual server runs inside a linux server. It is nevertheless
136 highly independent. As such, you can run various services with normal
137 configuration. The various vservers can't interact with each other and
138 can't interact with services in the main server.
140 This package contains utilities which are required to communicate with
141 the Linux-Vserver enabled kernel.
145 util-vserver provides the components and a framework to setup virtual
146 servers. A virtual server runs inside a linux server. It is nevertheless
147 highly independent. As such, you can run various services with normal
148 configuration. The various vservers can't interact with each other and
149 can't interact with services in the main server.
151 This package contains utilities which assist in building Vservers.
154 util-vserver provides the components and a framework to setup virtual
155 servers. A virtual server runs inside a linux server. It is nevertheless
156 highly independent. As such, you can run various services with normal
157 configuration. The various vservers can't interact with each other and
158 can't interact with services in the main server.
160 This package contains the SysV initscripts which start and stop
161 VServers and related tools.
165 util-vserver provides the components and a framework to setup virtual
166 servers. A virtual server runs inside a linux server. It is nevertheless
167 highly independent. As such, you can run various services with normal
168 configuration. The various vservers can't interact with each other and
169 can't interact with services in the main server.
171 This package contains the tools which are needed to work with VServers
172 having an old-style configuration.
176 util-vserver provides the components and a framework to setup virtual
177 servers. A virtual server runs inside a linux server. It is nevertheless
178 highly independent. As such, you can run various services with normal
179 configuration. The various vservers can't interact with each other and
180 can't interact with services in the main server.
182 This package contains header files and libraries which are needed to
183 develop VServer related applications.
187 Python modules for manipulating vservers. Provides a superset of the
188 functionality of the vserver script (at least will do in the future),
189 but more readily accessible from Python code.
197 automake --add-missing
200 %configure --with-initrddir=%_initrddir --enable-release \
201 %{?_without_dietlibc:--disable-dietlibc}
203 %__make %{?_smp_mflags} all
204 %__make %{?_smp_mflags} doc
209 rm -rf $RPM_BUILD_ROOT
210 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
212 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
214 MANIFEST_CONFIG='%config' \
215 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
216 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
218 # install python bindings
219 %__make -C python DESTDIR="$RPM_BUILD_ROOT" install
227 rm -rf $RPM_BUILD_ROOT
231 test -d /vservers || mkdir -m0000 /vservers
232 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
234 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
235 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
237 %_sbindir/setattr --barrier /vservers || :
239 # add /bin/vsh to list of secure shells
240 if [ ! -f /etc/shells ] || ! grep -q '^/bin/vsh$' /etc/shells ; then
241 echo /bin/vsh >> /etc/shells
246 # 0 = erase, 1 = upgrade
247 if [ "$1" = 0 ] ; then
248 perl -i -n -e 'next if /^\/bin\/vsh$/; print' /etc/shells
252 %post lib -p /sbin/ldconfig
253 %postun lib -p /sbin/ldconfig
257 #%chkconfig --add vservers-default
258 #%chkconfig --add vprocunhide
259 # PlanetLab Node Manager takes care of starting and stopping VServers
260 %chkconfig --del vservers-default
261 # PlanetLab does not require /proc security
262 %chkconfig --del vprocunhide
265 #test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
267 #test "$1" != 0 || %chkconfig --del vprocunhide
268 #test "$1" != 0 || %chkconfig --del vservers-default
272 #test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
275 %triggerin build -- fedora-release
282 test -r "$i" || continue
284 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
288 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
289 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
293 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
296 ## Temporary workaround to remove old v_* files; it will conflict
297 ## somehow with the -legacy package but can be fixed by reinstalling
299 ## TODO: remove me in the final .spec file
300 %define v_services httpd named portmap sendmail smb sshd xinetd gated
301 %triggerun sysv -- util-vserver-sysv < 0.30.198
302 for i in %v_services; do
303 %chkconfig --del v_$i || :
308 # PlanetLab Node Manager takes care of starting and stopping VServers
309 #%chkconfig --add rebootmgr
310 #%chkconfig --add vservers-legacy
312 # PlanetLab does not require these legacy services
313 #for i in %v_services; do
314 # %chkconfig --add v_$i
319 #test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
321 #test "$1" != 0 || for i in %v_services; do
322 # %chkconfig --del v_$i
325 #test "$1" != 0 || %chkconfig --del rebootmgr
326 #test "$1" != 0 || %chkconfig --del vservers-legacy
329 #test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
332 %files -f %name-base.list
333 %defattr(-,root,root,-)
334 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
335 %doc doc/*.html doc/*.css
339 %dir %confdefaultdir/apps
340 %dir %confdefaultdir/files
341 %dir %pkglibdir/defaults
342 %ghost %confdefaultdir/vdirbase
343 %ghost %confdefaultdir/run.rev
345 %dir %_localstatedir/run/vservers
346 %dir %_localstatedir/run/vservers.rev
347 %dir %_localstatedir/run/vshelper
350 %files lib -f %name-lib.list
351 %files sysv -f %name-sysv.list
354 %files core -f %name-core.list
355 %defattr(-,root,root,-)
359 %files build -f %name-build.list
360 %defattr(-,root,root,-)
361 %doc contrib/yum*.patch
362 %dir %confdir/.distributions
363 %dir %confdir/.distributions/*
364 %dir %confdir/.distributions/*/apt
365 %dir %confdir/.distributions/.common
366 %dir %confdir/.distributions/.common/pubkeys
367 %dir %confdefaultdir/apps/vunify
368 %dir %confdefaultdir/apps/vunify/hash
371 %files legacy -f %name-legacy.list
372 %defattr(-,root,root,-)
373 %dir %pkglibdir/legacy
376 %files devel -f %name-devel.list
377 %defattr(-,root,root,-)
378 %doc lib/apidoc/latex/refman.pdf
383 %defattr(0644,root,root)
384 %_libdir/python2.3/site-packages/*
388 * Fri Feb 17 2006 Steve Muir <smuir@cs.princeton.edu>
389 - add support for setting guaranteed CPU share flag in rspec
391 * Fri Jan 13 2006 Steve Muir <smuir@cs.princeton.edu>
392 - fix bug in python/vserverimpl.c where attempting to adjust CPU share
393 for a context that didn't exist would cause an error (it should be a
396 * Fri Dec 2 2005 Steve Muir <smuir@cs.princeton.edu>
397 - fix bugs in python/vserverimpl.c where exceptions were not raised when
398 they should be and thus occured later at unexpected times
399 - add support for stopping a vserver
401 * Wed Nov 9 2005 Steve Muir <smuir@cs.princeton.edu>
402 - add support for removing resource limits e.g., when a slice is deleted
404 * Mon Nov 7 2005 Steve Muir <smuir@cs.princeton.edu>
405 - fix file descriptor leak in vduimpl
406 - clean up handling of network parameters
407 - don't rely upon /etc/vservers/foo.conf to initialise vserver object
409 * Wed Nov 2 2005 Steve Muir <smuir@cs.princeton.edu>
410 - fix Python modules to handling scheduling parameters correctly
412 * Fri Oct 28 2005 Steve Muir <smuir@cs.princeton.edu>
413 - raise exception about being over disk limit after setting usage values
415 * Fri Oct 7 2005 Steve Muir <smuir@cs.princeton.edu>
416 - create common function to be used for entering a vserver and applying
419 * Thu Aug 21 2005 Mark Huang <mlhuang@cs.princeton.edu>
420 - restore build of python modules
422 * Sat Aug 20 2005 Mark Huang <mlhuang@cs.princeton.edu>
423 - upgrade to util-vserver-0.30.208
424 - forward-port vbuild and legacy support until we can find a suitable
426 - make vsh use new vc_create_context() call
428 * Thu Jul 28 2005 Steve Muir <smuir@cs.princeton.edu>
429 - add support for static vserver IDs to vuseradd and vuserdel
431 * Thu Jul 21 2005 Steve Muir <smuir@cs.princeton.edu>
432 - add bwlimit and cpulimit modules
434 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
435 - require the -lib subpackage by -devel
436 - copy GPG keys from /etc/pki/rpm-gpg/
438 * Mon Jun 20 2005 Steve Muir <smuir@cs.princeton.edu>
439 - import Marc's vdu implementation
441 * Wed Jun 15 2005 Steve Muir <smuir@cs.princeton.edu>
442 - 'vserver-init start' functionality subsumed by Node Manager
444 * Thu Jun 02 2005 Marc E. Fiuczynski <mef@cs.princeton.edu>
445 - Fixed vlimit command
447 * Wed May 25 2005 Steve Muir <smuir@cs.princeton.edu>
448 - add Python modules for manipulating vservers
450 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
451 - added patches to make yum work in chroot environments
454 * Thu Apr 7 2005 Steve Muir <smuir@cs.princeton.edu>
455 - vuserdel changes: don't shutdown vserver, just kill all processes;
456 unmount all mountpoints in vserver before deleting
458 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
459 - added some %%descriptions
460 - copy GPG keys from the system into the confdir
461 - buildrequire dietlibc-0.25
462 - BuildRequire beecrypt-devel
464 - use %%global instead of %%define
465 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
467 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
468 - updated BuildRequires:
469 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
470 - moved the v_* initscripts to legacy
471 - do not ship the /vservers directory itself; as it is immutable, the
472 extraction will fail else
474 * Fri Nov 19 2004 Mark Huang <mlhuang@cs.princeton.edu>
475 - vcached no longer runs as a daemon
476 - do not restart vservers when package is upgraded
478 * Wed Nov 17 2004 Mark Huang <mlhuang@cs.princeton.edu> 0.30-6.planetlab
481 - Both vcached and vuseradd now print a warning message when vbuild
482 succeeds but the resulting new vserver image is smaller in size than
483 the vserver-reference image.
484 - vuseradd: clean up some more junk on failure
486 * Tue Nov 16 2004 Mark Huang <mlhuang@cs.princeton.edu> 0.30-5.planetlab
488 - PL3026: This is the upgraded version of vdu that maintains an
489 internal hash table of files with a nlink count > 1. Only if vdu
490 sees all hard links to a particular inode does it add its size and
491 block count to the total.
493 * Fri Nov 12 2004 Mark Huang <mlhuang@cs.princeton.edu> 0.30-4.planetlab
494 - PL2445 Use -b option to du to avoid rounding errors.
496 * Sat Nov 6 2004 Mark Huang <mlhuang@cs.princeton.edu> 0.30-3.planetlab
498 - don't create the symbolic link /home/slice/.ssh, this is not how
501 * Mon Oct 11 2004 Marc E. Fiuczynski <mef@cs.princeton.edu>
504 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
505 - documented switches for 'rpmbuild'
507 * Wed Aug 11 2004 Mark Huang <mlhuang@cs.princeton.edu> 0.29-1.planetlab
508 - initial PlanetLab 3.0 build.
510 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
511 - (re)added the MANIFEST_* variables which were lost some time ago;
512 this will preserve %%config files...
514 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
515 - use file-list for sysv scripts also
517 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
518 - added vprocunhide-service support
519 - added doxygen support
522 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0