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
39 #Source1: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2.asc
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 /sbin/ip iptables
49 BuildRequires: gcc-c++ wget which diffutils
50 BuildRequires: e2fsprogs-devel e2fsprogs
51 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
52 %{?_without_beecrypt:BuildRequires: nss-devel}
53 BuildRequires: e2fsprogs
54 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
55 %{!?_without_python:BuildRequires: python python-devel ctags}
56 Requires(post): %name-core
57 Requires(pre): %pkglibdir
58 Requires(postun): %pkglibdir
59 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
60 %{?_with_xalan:BuildRequires: xalan-j}
63 Summary: Dynamic libraries for util-vserver
64 Group: System Environment/Libraries
67 Summary: The core-utilities for util-vserver
68 Group: Applications/System
72 Summary: Tools which can be used to build vservers
73 Group: Applications/System
74 Requires: rpm wget binutils tar
75 Requires: %name = %version-%release
76 Requires(pre): %confdir
77 Requires(postun): %confdir
78 Requires(post): %name-core
81 Summary: SysV-initscripts for vserver
82 Group: System Environment/Base
83 Provides: init(%name) = sysv
84 Requires: make diffutils
86 Requires: %name = %version-%release
87 Requires(post): %chkconfig
88 Requires(preun): %chkconfig
89 Requires(pre): %_initrddir %pkglibdir
90 requires(postun): %_initrddir %pkglibdir
93 Summary: Legacy utilities for util-vserver
94 Group: Applications/System
95 Requires: %name = %version-%release
96 Requires(post): %chkconfig
97 Requires(preun): %chkconfig
98 Requires(pre): %_initrddir %pkglibdir
99 requires(postun): %_initrddir %pkglibdir
102 Summary: Header-files and libraries needed to develop vserver based applications
103 Group: Development/Libraries
105 Requires: %name-lib = %version-%release
108 Summary: Python bindings to develop vserver-based applications
109 Group: Development/Libraries
110 Requires: %name-lib = %version-%release
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.
186 util-vserver provides the components and a framework to setup virtual
187 servers. A virtual server runs inside a linux server. It is nevertheless
188 highly independent. As such, you can run various services with normal
189 configuration. The various vservers can't interact with each other and
190 can't interact with services in the main server.
192 This package contains the files needed to interface with the
193 Linux-VServer API from Python.
197 %setup -q -n %name-%fullver
202 %configure --with-initrddir=%_initrddir --enable-release \
203 %{?_without_dietlibc:--disable-dietlibc} \
204 %{?_with_legacy:--enable-apis=NOLEGACY} \
205 --with-initscripts=sysv \
206 %{?_without_python:--without-python}
208 %__make %{?_smp_mflags} all
209 %{!?_without_doc:%__make %{?_smp_mflags} doc}
213 rm -rf $RPM_BUILD_ROOT
214 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
216 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
218 MANIFEST_CONFIG='%config' \
219 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
220 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
228 rm -rf $RPM_BUILD_ROOT
232 test -d /vservers || mkdir -m0000 /vservers
233 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
235 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
236 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
237 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
239 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
243 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
246 %post lib -p /sbin/ldconfig
247 %postun lib -p /sbin/ldconfig
251 %chkconfig --add vservers-default
252 %chkconfig --add vprocunhide
253 %chkconfig --add util-vserver
254 %chkconfig util-vserver on
258 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
260 test "$1" != 0 || %chkconfig --del vprocunhide
261 test "$1" != 0 || %chkconfig --del vservers-default
262 test "$1" != 0 || %chkconfig --del util-vserver
266 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
269 %triggerin build -- fedora-release, centos-release
276 test -r "$i" || continue
278 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
282 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
283 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
284 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
288 x="%_libdir/util-vserver/distributions/etch"
289 test -d "$x" && mv "$x" "$x.rpmsave" || :
293 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
295 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
296 ln -s /vservers/.hash "$f"/00
298 %_sbindir/setattr --barrier /vservers/.hash || :
302 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
305 ## Temporary workaround to remove old v_* files; it will conflict
306 ## somehow with the -legacy package but can be fixed by reinstalling
308 ## TODO: remove me in the final .spec file
309 %define v_services httpd named portmap sendmail smb sshd xinetd gated
310 %triggerun sysv -- util-vserver-sysv < 0.30.198
311 for i in %v_services; do
312 %chkconfig --del v_$i || :
317 %chkconfig --add rebootmgr
318 %chkconfig --add vservers-legacy
320 for i in %v_services; do
321 %chkconfig --add v_$i
326 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
328 test "$1" != 0 || for i in %v_services; do
329 %chkconfig --del v_$i
332 test "$1" != 0 || %chkconfig --del rebootmgr
333 test "$1" != 0 || %chkconfig --del vservers-legacy
336 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
339 %files -f %name-base.list
340 %defattr(-,root,root,-)
341 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
342 %doc doc/*.html doc/*.css
346 %dir %confdefaultdir/apps
347 %dir %confdefaultdir/files
348 %dir %pkglibdir/defaults
349 %ghost %confdefaultdir/cachebase
350 %ghost %confdefaultdir/vdirbase
351 %ghost %confdefaultdir/run.rev
353 %dir %_localstatedir/cache/vservers
354 %dir %_localstatedir/run/vservers
355 %dir %_localstatedir/run/vservers.rev
356 %dir %_localstatedir/run/vshelper
359 %files lib -f %name-lib.list
360 %files sysv -f %name-sysv.list
363 %files core -f %name-core.list
364 %defattr(-,root,root,-)
368 %files build -f %name-build.list
369 %defattr(-,root,root,-)
370 %doc contrib/yum*.patch
371 %dir %confdir/.distributions
372 %dir %confdir/.distributions/*
373 %dir %confdir/.distributions/*/apt
374 %dir %confdir/.distributions/.common
375 %dir %confdir/.distributions/.common/pubkeys
376 %dir %confdefaultdir/apps/vunify
377 %dir %confdefaultdir/apps/vunify/hash
380 %files legacy -f %name-legacy.list
381 %defattr(-,root,root,-)
382 %dir %pkglibdir/legacy
385 %files devel -f %name-devel.list
386 %defattr(-,root,root,-)
387 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
388 %{!?_without_doc:%doc lib/apidoc/html}
392 %defattr(-,root,root,-)
393 %{!?_without_python:%{python_sitearch}/*}
397 * Tue May 11 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-1
399 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
401 - get rid of e2fsprogs requirement
403 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
404 - add --with legacy and --without doc switches
405 - add util-vserver initscript
407 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
408 - do not require 'xalan' anymore by default
409 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
410 - removed 'chattr' leftovers
411 - create the '/etc/vservers/.defaults/cachebase' symlink
412 - added /var/cache/vservers and the needed support
413 - set barrier attribute on /vservers/.pkg and /vservers/.hash
414 - added 'centos-release' to the list of packages in the copy-the-keys
416 - create '/vservers/.hash' and add initial configuration for it
418 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
422 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
425 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
427 - require the -lib subpackage by -devel
428 - copy GPG keys from /etc/pki/rpm-gpg/
430 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
431 - added patches to make yum work in chroot environments
434 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
435 - added some %%descriptions
436 - copy GPG keys from the system into the confdir
437 - buildrequire dietlibc-0.25
438 - BuildRequire beecrypt-devel
440 - use %%global instead of %%define
441 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
443 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
444 - updated BuildRequires:
445 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
446 - moved the v_* initscripts to legacy
447 - do not ship the /vservers directory itself; as it is immutable, the
448 extraction will fail else
450 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
451 - documented switches for 'rpmbuild'
453 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
454 - (re)added the MANIFEST_* variables which were lost some time ago;
455 this will preserve %%config files...
457 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
458 - use file-list for sysv scripts also
460 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
461 - added vprocunhide-service support
462 - added doxygen support
465 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0