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 @VERSION@
21 %global ver %( echo %fullver | sed 's/-.*//' )
22 %global subver %( s=`echo %fullver | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
25 %{!?release_func:%global release_func() %1%{?dist}}
27 Summary: Linux virtual server utilities
30 Release: %release_func 0%subver
32 Group: System Environment/Base
33 URL: http://savannah.nongnu.org/projects/util-vserver/
34 Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
35 #Source1: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2.asc
36 BuildRoot: %_tmppath/%name-%version-%release-root
38 Requires: %name-core = %version-%release
39 Requires: %name-lib = %version-%release
40 Requires: diffutils mktemp sed
41 Provides: vserver = %version-%release
42 Obsoletes: vserver < %version
43 BuildRequires: mount vconfig gawk iproute iptables
44 BuildRequires: gcc-c++ wget which diffutils
45 BuildRequires: e2fsprogs-devel e2fsprogs
46 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
47 %{?_without_beecrypt:BuildRequires: nss-devel}
48 BuildRequires: e2fsprogs
49 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
50 %{!?_without_python:BuildRequires: python python-devel ctags}
51 Requires(post): %name-core
52 Requires(pre): %pkglibdir
53 Requires(postun): %pkglibdir
54 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
55 %{?_with_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
70 Requires: %name = %version-%release
71 Requires(pre): %confdir
72 Requires(postun): %confdir
73 Requires(post): %name-core
76 Summary: SysV-initscripts for vserver
77 Group: System Environment/Base
78 Provides: init(%name) = sysv
79 Requires: make diffutils
81 Requires: %name = %version-%release
82 Requires(post): %chkconfig
83 Requires(preun): %chkconfig
84 Requires(pre): %_initrddir %pkglibdir
85 requires(postun): %_initrddir %pkglibdir
88 Summary: Legacy utilities for util-vserver
89 Group: Applications/System
90 Requires: %name = %version-%release
91 Requires(post): %chkconfig
92 Requires(preun): %chkconfig
93 Requires(pre): %_initrddir %pkglibdir
94 requires(postun): %_initrddir %pkglibdir
97 Summary: Header-files and libraries needed to develop vserver based applications
98 Group: Development/Libraries
100 Requires: %name-lib = %version-%release
103 Summary: Python bindings to develop vserver-based applications
104 Group: Development/Libraries
105 Requires: %name-lib = %version-%release
109 util-vserver provides the components and a framework to setup virtual
110 servers. A virtual server runs inside a linux server. It is nevertheless
111 highly independent. As such, you can run various services with normal
112 configuration. The various vservers can't interact with each other and
113 can't interact with services in the main server.
115 This requires a special kernel supporting the new new_s_context and
116 set_ipv4root system call.
119 util-vserver provides the components and a framework to setup virtual
120 servers. A virtual server runs inside a linux server. It is nevertheless
121 highly independent. As such, you can run various services with normal
122 configuration. The various vservers can't interact with each other and
123 can't interact with services in the main server.
125 This package contains the shared libraries needed by all other
126 'util-vserver' subpackages.
129 util-vserver provides the components and a framework to setup virtual
130 servers. A virtual server runs inside a linux server. It is nevertheless
131 highly independent. As such, you can run various services with normal
132 configuration. The various vservers can't interact with each other and
133 can't interact with services in the main server.
135 This package contains utilities which are required to communicate with
136 the Linux-Vserver enabled kernel.
140 util-vserver provides the components and a framework to setup virtual
141 servers. A virtual server runs inside a linux server. It is nevertheless
142 highly independent. As such, you can run various services with normal
143 configuration. The various vservers can't interact with each other and
144 can't interact with services in the main server.
146 This package contains utilities which assist in building Vservers.
149 util-vserver provides the components and a framework to setup virtual
150 servers. A virtual server runs inside a linux server. It is nevertheless
151 highly independent. As such, you can run various services with normal
152 configuration. The various vservers can't interact with each other and
153 can't interact with services in the main server.
155 This package contains the SysV initscripts which start and stop
156 VServers and related tools.
160 util-vserver provides the components and a framework to setup virtual
161 servers. A virtual server runs inside a linux server. It is nevertheless
162 highly independent. As such, you can run various services with normal
163 configuration. The various vservers can't interact with each other and
164 can't interact with services in the main server.
166 This package contains the tools which are needed to work with VServers
167 having an old-style configuration.
171 util-vserver provides the components and a framework to setup virtual
172 servers. A virtual server runs inside a linux server. It is nevertheless
173 highly independent. As such, you can run various services with normal
174 configuration. The various vservers can't interact with each other and
175 can't interact with services in the main server.
177 This package contains header files and libraries which are needed to
178 develop VServer related applications.
181 util-vserver provides the components and a framework to setup virtual
182 servers. A virtual server runs inside a linux server. It is nevertheless
183 highly independent. As such, you can run various services with normal
184 configuration. The various vservers can't interact with each other and
185 can't interact with services in the main server.
187 This package contains the files needed to interface with the
188 Linux-VServer API from Python.
192 %setup -q -n %name-%fullver
196 %configure --with-initrddir=%_initrddir --enable-release \
197 %{?_without_dietlibc:--disable-dietlibc} \
198 %{?_with_legacy:--enable-apis=NOLEGACY} \
199 --with-initscripts=sysv \
200 %{?_without_python:--without-python}
202 %__make %{?_smp_mflags} all
203 %{!?_without_doc:%__make %{?_smp_mflags} doc}
207 rm -rf $RPM_BUILD_ROOT
208 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
210 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
212 MANIFEST_CONFIG='%config' \
213 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
214 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
222 rm -rf $RPM_BUILD_ROOT
226 test -d /vservers || mkdir -m0000 /vservers
227 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
229 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
230 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
231 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
233 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
237 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
240 %post lib -p /sbin/ldconfig
241 %postun lib -p /sbin/ldconfig
245 %chkconfig --add vservers-default
246 %chkconfig --add vprocunhide
247 %chkconfig --add util-vserver
252 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
254 test "$1" != 0 || %chkconfig --del vprocunhide
255 test "$1" != 0 || %chkconfig --del vservers-default
256 test "$1" != 0 || %chkconfig --del util-vserver
260 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
263 %triggerin build -- fedora-release, centos-release
270 test -r "$i" || continue
272 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
276 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
277 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
278 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
282 x="%_libdir/util-vserver/distributions/etch"
283 test -d "$x" && mv "$x" "$x.rpmsave" || :
287 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
289 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
290 ln -s /vservers/.hash "$f"/00
292 %_sbindir/setattr --barrier /vservers/.hash || :
296 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
299 ## Temporary workaround to remove old v_* files; it will conflict
300 ## somehow with the -legacy package but can be fixed by reinstalling
302 ## TODO: remove me in the final .spec file
303 %define v_services httpd named portmap sendmail smb sshd xinetd gated
304 %triggerun sysv -- util-vserver-sysv < 0.30.198
305 for i in %v_services; do
306 %chkconfig --del v_$i || :
311 %chkconfig --add rebootmgr
312 %chkconfig --add vservers-legacy
314 for i in %v_services; do
315 %chkconfig --add v_$i
320 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
322 test "$1" != 0 || for i in %v_services; do
323 %chkconfig --del v_$i
326 test "$1" != 0 || %chkconfig --del rebootmgr
327 test "$1" != 0 || %chkconfig --del vservers-legacy
330 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
333 %files -f %name-base.list
334 %defattr(-,root,root,-)
335 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
336 %doc doc/*.html doc/*.css
340 %dir %confdefaultdir/apps
341 %dir %confdefaultdir/files
342 %dir %pkglibdir/defaults
343 %ghost %confdefaultdir/cachebase
344 %ghost %confdefaultdir/vdirbase
345 %ghost %confdefaultdir/run.rev
347 %dir %_localstatedir/cache/vservers
348 %dir %_localstatedir/run/vservers
349 %dir %_localstatedir/run/vservers.rev
350 %dir %_localstatedir/run/vshelper
353 %files lib -f %name-lib.list
354 %files sysv -f %name-sysv.list
357 %files core -f %name-core.list
358 %defattr(-,root,root,-)
362 %files build -f %name-build.list
363 %defattr(-,root,root,-)
364 %doc contrib/yum*.patch
365 %dir %confdir/.distributions
366 %dir %confdir/.distributions/*
367 %dir %confdir/.distributions/*/apt
368 %dir %confdir/.distributions/.common
369 %dir %confdir/.distributions/.common/pubkeys
370 %dir %confdefaultdir/apps/vunify
371 %dir %confdefaultdir/apps/vunify/hash
374 %files legacy -f %name-legacy.list
375 %defattr(-,root,root,-)
376 %dir %pkglibdir/legacy
379 %files devel -f %name-devel.list
380 %defattr(-,root,root,-)
381 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
382 %{!?_without_doc:%doc lib/apidoc/html}
386 %defattr(-,root,root,-)
387 %{!?_without_python:%{python_sitearch}/*}
391 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
393 - get rid of e2fsprogs requirement
395 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
396 - add --with legacy and --without doc switches
397 - add util-vserver initscript
399 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
400 - do not require 'xalan' anymore by default
401 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
402 - removed 'chattr' leftovers
403 - create the '/etc/vservers/.defaults/cachebase' symlink
404 - added /var/cache/vservers and the needed support
405 - set barrier attribute on /vservers/.pkg and /vservers/.hash
406 - added 'centos-release' to the list of packages in the copy-the-keys
408 - create '/vservers/.hash' and add initial configuration for it
410 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
414 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
417 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
419 - require the -lib subpackage by -devel
420 - copy GPG keys from /etc/pki/rpm-gpg/
422 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
423 - added patches to make yum work in chroot environments
426 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
427 - added some %%descriptions
428 - copy GPG keys from the system into the confdir
429 - buildrequire dietlibc-0.25
430 - BuildRequire beecrypt-devel
432 - use %%global instead of %%define
433 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
435 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
436 - updated BuildRequires:
437 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
438 - moved the v_* initscripts to legacy
439 - do not ship the /vservers directory itself; as it is immutable, the
440 extraction will fail else
442 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
443 - documented switches for 'rpmbuild'
445 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
446 - (re)added the MANIFEST_* variables which were lost some time ago;
447 this will preserve %%config files...
449 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
450 - use file-list for sysv scripts also
452 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
453 - added vprocunhide-service support
454 - added doxygen support
457 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0