1 # $Id: util-vserver.spec.in 2807 2008-10-30 01:59:52Z dhozac $
3 %if "%{?_without_python:1}" != "1"
4 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
7 ## This package understands the following switches:
8 ## --without dietlibc ... disable usage of dietlibc
9 ## --with xalan ... require/use the xalan xslt processor
10 ## --without doc ... disable doc generation
11 ## --with legacy ... enable the legacy APIs
13 %global confdir %_sysconfdir/vservers
14 %global confdefaultdir %confdir/.defaults
15 %global pkglibdir %_libdir/%name
16 %global chkconfig /sbin/chkconfig
18 %global _localstatedir %_var
20 %global fullver 0.30.216-pre2883
21 %global modulever 0.30.216
22 %global ver %( echo %fullver | sed 's/-.*//' )
23 %global subver %( s=`echo %fullver | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
26 %global module_version_varname modulever
29 %{!?release_func:%global release_func() %1%{?dist}}
31 Summary: Linux virtual server utilities
36 Group: System Environment/Base
37 URL: http://savannah.nongnu.org/projects/util-vserver/
38 Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
42 Patch3: rev2883to2896.patch
43 BuildRoot: %_tmppath/%name-%version-%release-root
45 Requires: %name-core = %version-%release
46 Requires: %name-lib = %version-%release
47 Requires: diffutils mktemp sed
48 Provides: vserver = %version-%release
49 Obsoletes: vserver < %version
50 BuildRequires: mount vconfig gawk /sbin/ip iptables
51 BuildRequires: gcc-c++ wget which diffutils
52 BuildRequires: e2fsprogs-devel e2fsprogs
53 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
54 %{?_without_beecrypt:BuildRequires: nss-devel}
55 BuildRequires: e2fsprogs
56 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
57 %{!?_without_python:BuildRequires: python python-devel ctags}
58 Requires(post): %name-core
59 Requires(pre): %pkglibdir
60 Requires(postun): %pkglibdir
61 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
62 %{?_with_xalan:BuildRequires: xalan-j}
65 Summary: Dynamic libraries for util-vserver
66 Group: System Environment/Libraries
69 Summary: The core-utilities for util-vserver
70 Group: Applications/System
74 Summary: Tools which can be used to build vservers
75 Group: Applications/System
76 Requires: rpm wget binutils tar
77 Requires: %name = %version-%release
78 Requires(pre): %confdir
79 Requires(postun): %confdir
80 Requires(post): %name-core
83 Summary: SysV-initscripts for vserver
84 Group: System Environment/Base
85 Provides: init(%name) = sysv
86 Requires: make diffutils
88 Requires: %name = %version-%release
89 Requires(post): %chkconfig
90 Requires(preun): %chkconfig
91 Requires(pre): %_initrddir %pkglibdir
92 requires(postun): %_initrddir %pkglibdir
95 Summary: Legacy utilities for util-vserver
96 Group: Applications/System
97 Requires: %name = %version-%release
98 Requires(post): %chkconfig
99 Requires(preun): %chkconfig
100 Requires(pre): %_initrddir %pkglibdir
101 requires(postun): %_initrddir %pkglibdir
104 Summary: Header-files and libraries needed to develop vserver based applications
105 Group: Development/Libraries
107 Requires: %name-lib = %version-%release
110 Summary: Python bindings to develop vserver-based applications
111 Group: Development/Libraries
112 Requires: %name-lib = %version-%release
116 util-vserver provides the components and a framework to setup virtual
117 servers. A virtual server runs inside a linux server. It is nevertheless
118 highly independent. As such, you can run various services with normal
119 configuration. The various vservers can't interact with each other and
120 can't interact with services in the main server.
122 This requires a special kernel supporting the new new_s_context and
123 set_ipv4root system call.
126 util-vserver provides the components and a framework to setup virtual
127 servers. A virtual server runs inside a linux server. It is nevertheless
128 highly independent. As such, you can run various services with normal
129 configuration. The various vservers can't interact with each other and
130 can't interact with services in the main server.
132 This package contains the shared libraries needed by all other
133 'util-vserver' subpackages.
136 util-vserver provides the components and a framework to setup virtual
137 servers. A virtual server runs inside a linux server. It is nevertheless
138 highly independent. As such, you can run various services with normal
139 configuration. The various vservers can't interact with each other and
140 can't interact with services in the main server.
142 This package contains utilities which are required to communicate with
143 the Linux-Vserver enabled kernel.
147 util-vserver provides the components and a framework to setup virtual
148 servers. A virtual server runs inside a linux server. It is nevertheless
149 highly independent. As such, you can run various services with normal
150 configuration. The various vservers can't interact with each other and
151 can't interact with services in the main server.
153 This package contains utilities which assist in building Vservers.
156 util-vserver provides the components and a framework to setup virtual
157 servers. A virtual server runs inside a linux server. It is nevertheless
158 highly independent. As such, you can run various services with normal
159 configuration. The various vservers can't interact with each other and
160 can't interact with services in the main server.
162 This package contains the SysV initscripts which start and stop
163 VServers and related tools.
167 util-vserver provides the components and a framework to setup virtual
168 servers. A virtual server runs inside a linux server. It is nevertheless
169 highly independent. As such, you can run various services with normal
170 configuration. The various vservers can't interact with each other and
171 can't interact with services in the main server.
173 This package contains the tools which are needed to work with VServers
174 having an old-style configuration.
178 util-vserver provides the components and a framework to setup virtual
179 servers. A virtual server runs inside a linux server. It is nevertheless
180 highly independent. As such, you can run various services with normal
181 configuration. The various vservers can't interact with each other and
182 can't interact with services in the main server.
184 This package contains header files and libraries which are needed to
185 develop VServer related applications.
188 util-vserver provides the components and a framework to setup virtual
189 servers. A virtual server runs inside a linux server. It is nevertheless
190 highly independent. As such, you can run various services with normal
191 configuration. The various vservers can't interact with each other and
192 can't interact with services in the main server.
194 This package contains the files needed to interface with the
195 Linux-VServer API from Python.
199 %setup -q -n %name-%fullver
206 %configure --with-initrddir=%_initrddir --enable-release \
207 %{?_without_dietlibc:--disable-dietlibc} \
208 %{?_with_legacy:--enable-apis=NOLEGACY} \
209 --with-initscripts=sysv \
210 %{?_without_python:--without-python}
212 %__make %{?_smp_mflags} all
213 %{!?_without_doc:%__make %{?_smp_mflags} doc}
217 rm -rf $RPM_BUILD_ROOT
218 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
220 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
222 MANIFEST_CONFIG='%config' \
223 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
224 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
226 install -c -m 755 %{SOURCE1} %{buildroot}/%pkglibdir/defaults/fstab
233 rm -rf $RPM_BUILD_ROOT
237 test -d /vservers || mkdir -m0000 /vservers
238 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
240 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
241 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
242 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
244 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
248 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
251 %post lib -p /sbin/ldconfig
252 %postun lib -p /sbin/ldconfig
256 %chkconfig --add vservers-default
257 %chkconfig --add vprocunhide
258 %chkconfig --add util-vserver
259 %chkconfig util-vserver on
262 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
264 test "$1" != 0 || %chkconfig --del vprocunhide
265 test "$1" != 0 || %chkconfig --del vservers-default
266 test "$1" != 0 || %chkconfig --del util-vserver
270 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
273 %triggerin build -- fedora-release, centos-release
280 test -r "$i" || continue
282 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
286 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
287 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
288 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
292 x="%_libdir/util-vserver/distributions/etch"
293 test -d "$x" && mv "$x" "$x.rpmsave" || :
297 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
299 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
300 ln -s /vservers/.hash "$f"/00
302 %_sbindir/setattr --barrier /vservers/.hash || :
306 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
309 ## Temporary workaround to remove old v_* files; it will conflict
310 ## somehow with the -legacy package but can be fixed by reinstalling
312 ## TODO: remove me in the final .spec file
313 %define v_services httpd named portmap sendmail smb sshd xinetd gated
314 %triggerun sysv -- util-vserver-sysv < 0.30.198
315 for i in %v_services; do
316 %chkconfig --del v_$i || :
321 %chkconfig --add rebootmgr
322 %chkconfig --add vservers-legacy
324 for i in %v_services; do
325 %chkconfig --add v_$i
330 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
332 test "$1" != 0 || for i in %v_services; do
333 %chkconfig --del v_$i
336 test "$1" != 0 || %chkconfig --del rebootmgr
337 test "$1" != 0 || %chkconfig --del vservers-legacy
340 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
343 %files -f %name-base.list
344 %defattr(-,root,root,-)
345 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
346 %doc doc/*.html doc/*.css
350 %dir %confdefaultdir/apps
351 %dir %confdefaultdir/files
352 %dir %pkglibdir/defaults
353 %ghost %confdefaultdir/cachebase
354 %ghost %confdefaultdir/vdirbase
355 %ghost %confdefaultdir/run.rev
357 %dir %_localstatedir/cache/vservers
358 %dir %_localstatedir/run/vservers
359 %dir %_localstatedir/run/vservers.rev
360 %dir %_localstatedir/run/vshelper
363 %files lib -f %name-lib.list
364 %files sysv -f %name-sysv.list
367 %files core -f %name-core.list
368 %defattr(-,root,root,-)
372 %files build -f %name-build.list
373 %defattr(-,root,root,-)
374 %doc contrib/yum*.patch
375 %dir %confdir/.distributions
376 %dir %confdir/.distributions/*
377 %dir %confdir/.distributions/*/apt
378 %dir %confdir/.distributions/.common
379 %dir %confdir/.distributions/.common/pubkeys
380 %dir %confdefaultdir/apps/vunify
381 %dir %confdefaultdir/apps/vunify/hash
384 %files legacy -f %name-legacy.list
385 %defattr(-,root,root,-)
386 %dir %pkglibdir/legacy
389 %files devel -f %name-devel.list
390 %defattr(-,root,root,-)
391 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
392 %{!?_without_doc:%doc lib/apidoc/html}
396 %defattr(-,root,root,-)
397 %{!?_without_python:%{python_sitearch}/*}
401 * Tue Jun 08 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-3
402 - Do not restart util-vserver service on upgrades
404 * Tue Jun 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-2
405 - remove tmpfs mounted /tmp from fstab template
407 * Tue May 11 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-1
409 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
411 - get rid of e2fsprogs requirement
413 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
414 - add --with legacy and --without doc switches
415 - add util-vserver initscript
417 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
418 - do not require 'xalan' anymore by default
419 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
420 - removed 'chattr' leftovers
421 - create the '/etc/vservers/.defaults/cachebase' symlink
422 - added /var/cache/vservers and the needed support
423 - set barrier attribute on /vservers/.pkg and /vservers/.hash
424 - added 'centos-release' to the list of packages in the copy-the-keys
426 - create '/vservers/.hash' and add initial configuration for it
428 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
432 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
435 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
437 - require the -lib subpackage by -devel
438 - copy GPG keys from /etc/pki/rpm-gpg/
440 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
441 - added patches to make yum work in chroot environments
444 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
445 - added some %%descriptions
446 - copy GPG keys from the system into the confdir
447 - buildrequire dietlibc-0.25
448 - BuildRequire beecrypt-devel
450 - use %%global instead of %%define
451 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
453 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
454 - updated BuildRequires:
455 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
456 - moved the v_* initscripts to legacy
457 - do not ship the /vservers directory itself; as it is immutable, the
458 extraction will fail else
460 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
461 - documented switches for 'rpmbuild'
463 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
464 - (re)added the MANIFEST_* variables which were lost some time ago;
465 this will preserve %%config files...
467 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
468 - use file-list for sysv scripts also
470 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
471 - added vprocunhide-service support
472 - added doxygen support
475 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0