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 ver %( echo %fullver | sed 's/-.*//' )
22 %global subver %( s=`echo %fullver | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
25 %global module_version_varname fullver
28 %{!?release_func:%global release_func() %1%{?dist}}
30 Summary: Linux virtual server utilities
35 Group: System Environment/Base
36 URL: http://savannah.nongnu.org/projects/util-vserver/
37 Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
38 #Source1: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2.asc
39 BuildRoot: %_tmppath/%name-%version-%release-root
41 Requires: %name-core = %version-%release
42 Requires: %name-lib = %version-%release
43 Requires: diffutils mktemp sed
44 Provides: vserver = %version-%release
45 Obsoletes: vserver < %version
46 BuildRequires: mount vconfig gawk /sbin/ip iptables
47 BuildRequires: gcc-c++ wget which diffutils
48 BuildRequires: e2fsprogs-devel e2fsprogs
49 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
50 %{?_without_beecrypt:BuildRequires: nss-devel}
51 BuildRequires: e2fsprogs
52 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
53 %{!?_without_python:BuildRequires: python python-devel ctags}
54 Requires(post): %name-core
55 Requires(pre): %pkglibdir
56 Requires(postun): %pkglibdir
57 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
58 %{?_with_xalan:BuildRequires: xalan-j}
61 Summary: Dynamic libraries for util-vserver
62 Group: System Environment/Libraries
65 Summary: The core-utilities for util-vserver
66 Group: Applications/System
70 Summary: Tools which can be used to build vservers
71 Group: Applications/System
72 Requires: rpm wget binutils tar
73 Requires: %name = %version-%release
74 Requires(pre): %confdir
75 Requires(postun): %confdir
76 Requires(post): %name-core
79 Summary: SysV-initscripts for vserver
80 Group: System Environment/Base
81 Provides: init(%name) = sysv
82 Requires: make diffutils
84 Requires: %name = %version-%release
85 Requires(post): %chkconfig
86 Requires(preun): %chkconfig
87 Requires(pre): %_initrddir %pkglibdir
88 requires(postun): %_initrddir %pkglibdir
91 Summary: Legacy utilities for util-vserver
92 Group: Applications/System
93 Requires: %name = %version-%release
94 Requires(post): %chkconfig
95 Requires(preun): %chkconfig
96 Requires(pre): %_initrddir %pkglibdir
97 requires(postun): %_initrddir %pkglibdir
100 Summary: Header-files and libraries needed to develop vserver based applications
101 Group: Development/Libraries
103 Requires: %name-lib = %version-%release
106 Summary: Python bindings to develop vserver-based applications
107 Group: Development/Libraries
108 Requires: %name-lib = %version-%release
112 util-vserver provides the components and a framework to setup virtual
113 servers. A virtual server runs inside a linux server. It is nevertheless
114 highly independent. As such, you can run various services with normal
115 configuration. The various vservers can't interact with each other and
116 can't interact with services in the main server.
118 This requires a special kernel supporting the new new_s_context and
119 set_ipv4root system call.
122 util-vserver provides the components and a framework to setup virtual
123 servers. A virtual server runs inside a linux server. It is nevertheless
124 highly independent. As such, you can run various services with normal
125 configuration. The various vservers can't interact with each other and
126 can't interact with services in the main server.
128 This package contains the shared libraries needed by all other
129 'util-vserver' subpackages.
132 util-vserver provides the components and a framework to setup virtual
133 servers. A virtual server runs inside a linux server. It is nevertheless
134 highly independent. As such, you can run various services with normal
135 configuration. The various vservers can't interact with each other and
136 can't interact with services in the main server.
138 This package contains utilities which are required to communicate with
139 the Linux-Vserver enabled kernel.
143 util-vserver provides the components and a framework to setup virtual
144 servers. A virtual server runs inside a linux server. It is nevertheless
145 highly independent. As such, you can run various services with normal
146 configuration. The various vservers can't interact with each other and
147 can't interact with services in the main server.
149 This package contains utilities which assist in building Vservers.
152 util-vserver provides the components and a framework to setup virtual
153 servers. A virtual server runs inside a linux server. It is nevertheless
154 highly independent. As such, you can run various services with normal
155 configuration. The various vservers can't interact with each other and
156 can't interact with services in the main server.
158 This package contains the SysV initscripts which start and stop
159 VServers and related tools.
163 util-vserver provides the components and a framework to setup virtual
164 servers. A virtual server runs inside a linux server. It is nevertheless
165 highly independent. As such, you can run various services with normal
166 configuration. The various vservers can't interact with each other and
167 can't interact with services in the main server.
169 This package contains the tools which are needed to work with VServers
170 having an old-style configuration.
174 util-vserver provides the components and a framework to setup virtual
175 servers. A virtual server runs inside a linux server. It is nevertheless
176 highly independent. As such, you can run various services with normal
177 configuration. The various vservers can't interact with each other and
178 can't interact with services in the main server.
180 This package contains header files and libraries which are needed to
181 develop VServer related applications.
184 util-vserver provides the components and a framework to setup virtual
185 servers. A virtual server runs inside a linux server. It is nevertheless
186 highly independent. As such, you can run various services with normal
187 configuration. The various vservers can't interact with each other and
188 can't interact with services in the main server.
190 This package contains the files needed to interface with the
191 Linux-VServer API from Python.
195 %setup -q -n %name-%fullver
199 %configure --with-initrddir=%_initrddir --enable-release \
200 %{?_without_dietlibc:--disable-dietlibc} \
201 %{?_with_legacy:--enable-apis=NOLEGACY} \
202 --with-initscripts=sysv \
203 %{?_without_python:--without-python}
205 %__make %{?_smp_mflags} all
206 %{!?_without_doc:%__make %{?_smp_mflags} doc}
210 rm -rf $RPM_BUILD_ROOT
211 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
213 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
215 MANIFEST_CONFIG='%config' \
216 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
217 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
225 rm -rf $RPM_BUILD_ROOT
229 test -d /vservers || mkdir -m0000 /vservers
230 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
232 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
233 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
234 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
236 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
240 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
243 %post lib -p /sbin/ldconfig
244 %postun lib -p /sbin/ldconfig
248 %chkconfig --add vservers-default
249 %chkconfig --add vprocunhide
250 %chkconfig --add util-vserver
251 %chkconfig util-vserver on
255 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
257 test "$1" != 0 || %chkconfig --del vprocunhide
258 test "$1" != 0 || %chkconfig --del vservers-default
259 test "$1" != 0 || %chkconfig --del util-vserver
263 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
266 %triggerin build -- fedora-release, centos-release
273 test -r "$i" || continue
275 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
279 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
280 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
281 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
285 x="%_libdir/util-vserver/distributions/etch"
286 test -d "$x" && mv "$x" "$x.rpmsave" || :
290 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
292 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
293 ln -s /vservers/.hash "$f"/00
295 %_sbindir/setattr --barrier /vservers/.hash || :
299 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
302 ## Temporary workaround to remove old v_* files; it will conflict
303 ## somehow with the -legacy package but can be fixed by reinstalling
305 ## TODO: remove me in the final .spec file
306 %define v_services httpd named portmap sendmail smb sshd xinetd gated
307 %triggerun sysv -- util-vserver-sysv < 0.30.198
308 for i in %v_services; do
309 %chkconfig --del v_$i || :
314 %chkconfig --add rebootmgr
315 %chkconfig --add vservers-legacy
317 for i in %v_services; do
318 %chkconfig --add v_$i
323 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
325 test "$1" != 0 || for i in %v_services; do
326 %chkconfig --del v_$i
329 test "$1" != 0 || %chkconfig --del rebootmgr
330 test "$1" != 0 || %chkconfig --del vservers-legacy
333 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
336 %files -f %name-base.list
337 %defattr(-,root,root,-)
338 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
339 %doc doc/*.html doc/*.css
343 %dir %confdefaultdir/apps
344 %dir %confdefaultdir/files
345 %dir %pkglibdir/defaults
346 %ghost %confdefaultdir/cachebase
347 %ghost %confdefaultdir/vdirbase
348 %ghost %confdefaultdir/run.rev
350 %dir %_localstatedir/cache/vservers
351 %dir %_localstatedir/run/vservers
352 %dir %_localstatedir/run/vservers.rev
353 %dir %_localstatedir/run/vshelper
356 %files lib -f %name-lib.list
357 %files sysv -f %name-sysv.list
360 %files core -f %name-core.list
361 %defattr(-,root,root,-)
365 %files build -f %name-build.list
366 %defattr(-,root,root,-)
367 %doc contrib/yum*.patch
368 %dir %confdir/.distributions
369 %dir %confdir/.distributions/*
370 %dir %confdir/.distributions/*/apt
371 %dir %confdir/.distributions/.common
372 %dir %confdir/.distributions/.common/pubkeys
373 %dir %confdefaultdir/apps/vunify
374 %dir %confdefaultdir/apps/vunify/hash
377 %files legacy -f %name-legacy.list
378 %defattr(-,root,root,-)
379 %dir %pkglibdir/legacy
382 %files devel -f %name-devel.list
383 %defattr(-,root,root,-)
384 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
385 %{!?_without_doc:%doc lib/apidoc/html}
389 %defattr(-,root,root,-)
390 %{!?_without_python:%{python_sitearch}/*}
394 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
396 - get rid of e2fsprogs requirement
398 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
399 - add --with legacy and --without doc switches
400 - add util-vserver initscript
402 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
403 - do not require 'xalan' anymore by default
404 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
405 - removed 'chattr' leftovers
406 - create the '/etc/vservers/.defaults/cachebase' symlink
407 - added /var/cache/vservers and the needed support
408 - set barrier attribute on /vservers/.pkg and /vservers/.hash
409 - added 'centos-release' to the list of packages in the copy-the-keys
411 - create '/vservers/.hash' and add initial configuration for it
413 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
417 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
420 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
422 - require the -lib subpackage by -devel
423 - copy GPG keys from /etc/pki/rpm-gpg/
425 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
426 - added patches to make yum work in chroot environments
429 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
430 - added some %%descriptions
431 - copy GPG keys from the system into the confdir
432 - buildrequire dietlibc-0.25
433 - BuildRequire beecrypt-devel
435 - use %%global instead of %%define
436 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
438 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
439 - updated BuildRequires:
440 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
441 - moved the v_* initscripts to legacy
442 - do not ship the /vservers directory itself; as it is immutable, the
443 extraction will fail else
445 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
446 - documented switches for 'rpmbuild'
448 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
449 - (re)added the MANIFEST_* variables which were lost some time ago;
450 this will preserve %%config files...
452 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
453 - use file-list for sysv scripts also
455 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
456 - added vprocunhide-service support
457 - added doxygen support
460 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0