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
12 ## --without python ... disable the Python bindings
14 %global confdir %_sysconfdir/vservers
15 %global confdefaultdir %confdir/.defaults
16 %global pkglibdir %_libdir/%name
17 %global chkconfig /sbin/chkconfig
19 %global _localstatedir %_var
21 %global fullver @VERSION@
22 %global ver %( echo %fullver | sed 's/-.*//' )
23 %global subver %( s=`echo %fullver | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
26 # Mandriva does funky stuff that break us.
27 %if %{?mandriva_release:1}%{!?mandriva_release:0}
29 %global _disable_libtoolize 1
30 %global _disable_ld_as_needed 1
31 %global _disable_ld_no_undefined 1
32 %global before_configure \
33 %setup_compile_flags \
34 CONFIGURE_TOP="${CONFIGURE_TOP:-.}"
38 %{!?release_func:%global release_func() %1%{?dist}}
40 Summary: Linux virtual server utilities
43 Release: %release_func 0%subver
45 Group: System Environment/Base
46 URL: http://savannah.nongnu.org/projects/util-vserver/
47 Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
48 #Source1: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2.asc
49 BuildRoot: %_tmppath/%name-%version-%release-root
51 Requires: %name-core = %version-%release
52 Requires: %name-lib = %version-%release
53 Requires: diffutils mktemp sed
54 Provides: vserver = %version-%release
55 Obsoletes: vserver < %version
56 BuildRequires: mount vconfig gawk /sbin/ip iptables
57 BuildRequires: gcc-c++ wget which diffutils
58 BuildRequires: e2fsprogs-devel e2fsprogs
59 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
60 %{?_without_beecrypt:BuildRequires: nss-devel}
61 BuildRequires: e2fsprogs
62 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
63 %{!?_without_python:BuildRequires: python python-devel ctags}
64 Requires(post): %name-core
65 Requires(pre): %pkglibdir
66 Requires(postun): %pkglibdir
67 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
68 %{?_with_xalan:BuildRequires: xalan-j}
71 Summary: Dynamic libraries for util-vserver
72 Group: System Environment/Libraries
75 Summary: The core-utilities for util-vserver
76 Group: Applications/System
80 Summary: Tools which can be used to build vservers
81 Group: Applications/System
82 Requires: rpm wget binutils tar
83 Requires: %name = %version-%release
84 Requires(pre): %confdir
85 Requires(postun): %confdir
86 Requires(post): %name-core
89 Summary: SysV-initscripts for vserver
90 Group: System Environment/Base
91 Provides: init(%name) = sysv
92 Requires: make diffutils
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: Legacy utilities for util-vserver
102 Group: Applications/System
103 Requires: %name = %version-%release
104 Requires(post): %chkconfig
105 Requires(preun): %chkconfig
106 Requires(pre): %_initrddir %pkglibdir
107 requires(postun): %_initrddir %pkglibdir
110 Summary: Header-files and libraries needed to develop vserver based applications
111 Group: Development/Libraries
113 Requires: %name-lib = %version-%release
116 Summary: Python bindings to develop vserver-based applications
117 Group: Development/Libraries
118 Requires: %name-lib = %version-%release
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 requires a special kernel supporting the new new_s_context and
129 set_ipv4root system call.
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 the shared libraries needed by all other
139 'util-vserver' subpackages.
142 util-vserver provides the components and a framework to setup virtual
143 servers. A virtual server runs inside a linux server. It is nevertheless
144 highly independent. As such, you can run various services with normal
145 configuration. The various vservers can't interact with each other and
146 can't interact with services in the main server.
148 This package contains utilities which are required to communicate with
149 the Linux-Vserver enabled kernel.
153 util-vserver provides the components and a framework to setup virtual
154 servers. A virtual server runs inside a linux server. It is nevertheless
155 highly independent. As such, you can run various services with normal
156 configuration. The various vservers can't interact with each other and
157 can't interact with services in the main server.
159 This package contains utilities which assist in building Vservers.
162 util-vserver provides the components and a framework to setup virtual
163 servers. A virtual server runs inside a linux server. It is nevertheless
164 highly independent. As such, you can run various services with normal
165 configuration. The various vservers can't interact with each other and
166 can't interact with services in the main server.
168 This package contains the SysV initscripts which start and stop
169 VServers and related tools.
173 util-vserver provides the components and a framework to setup virtual
174 servers. A virtual server runs inside a linux server. It is nevertheless
175 highly independent. As such, you can run various services with normal
176 configuration. The various vservers can't interact with each other and
177 can't interact with services in the main server.
179 This package contains the tools which are needed to work with VServers
180 having an old-style configuration.
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 header files and libraries which are needed to
191 develop VServer related applications.
194 util-vserver provides the components and a framework to setup virtual
195 servers. A virtual server runs inside a linux server. It is nevertheless
196 highly independent. As such, you can run various services with normal
197 configuration. The various vservers can't interact with each other and
198 can't interact with services in the main server.
200 This package contains the files needed to interface with the
201 Linux-VServer API from Python.
205 %setup -q -n %name-%fullver
209 %configure --with-initrddir=%_initrddir --enable-release \
210 %{?_without_dietlibc:--disable-dietlibc} \
211 %{?_with_legacy:--enable-apis=NOLEGACY} \
212 --with-initscripts=sysv \
213 %{?_without_python:--without-python}
215 %__make %{?_smp_mflags} all
216 %{!?_without_doc:%__make %{?_smp_mflags} doc}
220 rm -rf $RPM_BUILD_ROOT
221 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
223 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
225 MANIFEST_CONFIG='%config' \
226 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
227 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
235 rm -rf $RPM_BUILD_ROOT
239 test -d /vservers || mkdir -m0000 /vservers
240 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
242 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
243 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
244 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
246 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
250 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
253 %post lib -p /sbin/ldconfig
254 %postun lib -p /sbin/ldconfig
258 %chkconfig --add vservers-default
259 %chkconfig --add vprocunhide
260 %chkconfig --add util-vserver
265 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
267 test "$1" != 0 || %chkconfig --del vprocunhide
268 test "$1" != 0 || %chkconfig --del vservers-default
269 test "$1" != 0 || %chkconfig --del util-vserver
273 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
276 %triggerin build -- fedora-release, centos-release
283 test -r "$i" || continue
285 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
289 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
290 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
291 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
295 x="%_libdir/util-vserver/distributions/etch"
296 test -d "$x" && mv "$x" "$x.rpmsave" || :
300 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
302 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
303 ln -s /vservers/.hash "$f"/00
305 %_sbindir/setattr --barrier /vservers/.hash || :
309 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
312 ## Temporary workaround to remove old v_* files; it will conflict
313 ## somehow with the -legacy package but can be fixed by reinstalling
315 ## TODO: remove me in the final .spec file
316 %define v_services httpd named portmap sendmail smb sshd xinetd gated
317 %triggerun sysv -- util-vserver-sysv < 0.30.198
318 for i in %v_services; do
319 %chkconfig --del v_$i || :
324 %chkconfig --add rebootmgr
325 %chkconfig --add vservers-legacy
327 for i in %v_services; do
328 %chkconfig --add v_$i
333 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
335 test "$1" != 0 || for i in %v_services; do
336 %chkconfig --del v_$i
339 test "$1" != 0 || %chkconfig --del rebootmgr
340 test "$1" != 0 || %chkconfig --del vservers-legacy
343 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
346 %files -f %name-base.list
347 %defattr(-,root,root,-)
348 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
349 %doc doc/*.html doc/*.css
350 %ghost %confdefaultdir/cachebase
351 %ghost %confdefaultdir/vdirbase
352 %ghost %confdefaultdir/run.rev
355 %files lib -f %name-lib.list
356 %files sysv -f %name-sysv.list
359 %files core -f %name-core.list
360 %defattr(-,root,root,-)
363 %files build -f %name-build.list
364 %defattr(-,root,root,-)
365 %doc contrib/yum*.patch
366 %dir %confdir/.distributions/*
367 %dir %confdir/.distributions/*/apt
370 %files legacy -f %name-legacy.list
371 %defattr(-,root,root,-)
374 %files devel -f %name-devel.list
375 %defattr(-,root,root,-)
376 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
377 %{!?_without_doc:%doc lib/apidoc/html}
380 %if 0%{!?_without_python:1}
381 %files python -f %name-python.list
382 %defattr(-,root,root,-)
387 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
389 - get rid of e2fsprogs requirement
391 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
392 - add --with legacy and --without doc switches
393 - add util-vserver initscript
395 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
396 - do not require 'xalan' anymore by default
397 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
398 - removed 'chattr' leftovers
399 - create the '/etc/vservers/.defaults/cachebase' symlink
400 - added /var/cache/vservers and the needed support
401 - set barrier attribute on /vservers/.pkg and /vservers/.hash
402 - added 'centos-release' to the list of packages in the copy-the-keys
404 - create '/vservers/.hash' and add initial configuration for it
406 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
410 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
413 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
415 - require the -lib subpackage by -devel
416 - copy GPG keys from /etc/pki/rpm-gpg/
418 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
419 - added patches to make yum work in chroot environments
422 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
423 - added some %%descriptions
424 - copy GPG keys from the system into the confdir
425 - buildrequire dietlibc-0.25
426 - BuildRequire beecrypt-devel
428 - use %%global instead of %%define
429 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
431 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
432 - updated BuildRequires:
433 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
434 - moved the v_* initscripts to legacy
435 - do not ship the /vservers directory itself; as it is immutable, the
436 extraction will fail else
438 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
439 - documented switches for 'rpmbuild'
441 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
442 - (re)added the MANIFEST_* variables which were lost some time ago;
443 this will preserve %%config files...
445 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
446 - use file-list for sysv scripts also
448 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
449 - added vprocunhide-service support
450 - added doxygen support
453 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0