1 %if "%{?_without_python:1}" != "1"
2 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
5 ## This package understands the following switches:
6 ## --without dietlibc ... disable usage of dietlibc
7 ## --with xalan ... require/use the xalan xslt processor
8 ## --without doc ... disable doc generation
9 ## --with legacy ... enable the legacy APIs
10 ## --without python ... disable the Python bindings
12 %global confdir %_sysconfdir/vservers
13 %global confdefaultdir %confdir/.defaults
14 %global pkglibdir %_libdir/%name
15 %global chkconfig /sbin/chkconfig
17 %global _localstatedir %_var
19 %global fullver 0.30.216-pre2926
20 %global ver %( echo %fullver | sed 's/-.*//' )
21 %global subver %( s=`echo %fullver | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
22 %global release %( echo %subver | sed -e 's,\.,,' )
25 # Mandriva does funky stuff that break us.
26 %if %{?mandriva_release:1}%{!?mandriva_release:0}
28 %global _disable_libtoolize 1
29 %global _disable_ld_as_needed 1
30 %global _disable_ld_no_undefined 1
31 %global before_configure \
32 %setup_compile_flags \
33 CONFIGURE_TOP="${CONFIGURE_TOP:-.}"
37 Summary: Linux virtual server utilities
42 Group: System Environment/Base
43 URL: http://savannah.nongnu.org/projects/util-vserver/
44 Source0: http://people.linux-vserver.org/~dhozac/t/uv-testing/%name-%version-%release.tar.bz2
45 #Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
46 #Source1: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2.asc
47 BuildRoot: %_tmppath/%name-%version-%release-root
49 Requires: %name-core = %version-%release
50 Requires: %name-lib = %version-%release
51 Requires: diffutils mktemp sed
52 Provides: vserver = %version-%release
53 Obsoletes: vserver < %version
54 BuildRequires: mount vconfig gawk /sbin/ip iptables
55 BuildRequires: gcc-c++ wget which diffutils
56 BuildRequires: e2fsprogs-devel e2fsprogs
57 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
58 %{?_without_beecrypt:BuildRequires: nss-devel}
59 BuildRequires: e2fsprogs
60 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
61 %{!?_without_python:BuildRequires: python python-devel ctags}
62 Requires(post): %name-core
63 Requires(pre): %pkglibdir
64 Requires(postun): %pkglibdir
65 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
66 %{?_with_xalan:BuildRequires: xalan-j}
69 Summary: Dynamic libraries for util-vserver
70 Group: System Environment/Libraries
73 Summary: The core-utilities for util-vserver
74 Group: Applications/System
78 Summary: Tools which can be used to build vservers
79 Group: Applications/System
80 Requires: rpm wget binutils tar
81 Requires: %name = %version-%release
82 Requires(pre): %confdir
83 Requires(postun): %confdir
84 Requires(post): %name-core
87 Summary: SysV-initscripts for vserver
88 Group: System Environment/Base
89 Provides: init(%name) = sysv
90 Requires: make diffutils
92 Requires: %name = %version-%release
93 Requires(post): %chkconfig
94 Requires(preun): %chkconfig
95 Requires(pre): %_initrddir %pkglibdir
96 requires(postun): %_initrddir %pkglibdir
99 Summary: Legacy utilities for util-vserver
100 Group: Applications/System
101 Requires: %name = %version-%release
102 Requires(post): %chkconfig
103 Requires(preun): %chkconfig
104 Requires(pre): %_initrddir %pkglibdir
105 requires(postun): %_initrddir %pkglibdir
108 Summary: Header-files and libraries needed to develop vserver based applications
109 Group: Development/Libraries
111 Requires: %name-lib = %version-%release
114 Summary: Python bindings to develop vserver-based applications
115 Group: Development/Libraries
116 Requires: %name-lib = %version-%release
120 util-vserver provides the components and a framework to setup virtual
121 servers. A virtual server runs inside a linux server. It is nevertheless
122 highly independent. As such, you can run various services with normal
123 configuration. The various vservers can't interact with each other and
124 can't interact with services in the main server.
126 This requires a special kernel supporting the new new_s_context and
127 set_ipv4root system call.
130 util-vserver provides the components and a framework to setup virtual
131 servers. A virtual server runs inside a linux server. It is nevertheless
132 highly independent. As such, you can run various services with normal
133 configuration. The various vservers can't interact with each other and
134 can't interact with services in the main server.
136 This package contains the shared libraries needed by all other
137 'util-vserver' subpackages.
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 are required to communicate with
147 the Linux-Vserver enabled kernel.
151 util-vserver provides the components and a framework to setup virtual
152 servers. A virtual server runs inside a linux server. It is nevertheless
153 highly independent. As such, you can run various services with normal
154 configuration. The various vservers can't interact with each other and
155 can't interact with services in the main server.
157 This package contains utilities which assist in building Vservers.
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 SysV initscripts which start and stop
167 VServers and related tools.
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 the tools which are needed to work with VServers
178 having an old-style configuration.
182 util-vserver provides the components and a framework to setup virtual
183 servers. A virtual server runs inside a linux server. It is nevertheless
184 highly independent. As such, you can run various services with normal
185 configuration. The various vservers can't interact with each other and
186 can't interact with services in the main server.
188 This package contains header files and libraries which are needed to
189 develop VServer related applications.
192 util-vserver provides the components and a framework to setup virtual
193 servers. A virtual server runs inside a linux server. It is nevertheless
194 highly independent. As such, you can run various services with normal
195 configuration. The various vservers can't interact with each other and
196 can't interact with services in the main server.
198 This package contains the files needed to interface with the
199 Linux-VServer API from Python.
203 %setup -q -n %name-%fullver
208 %configure --with-initrddir=%_initrddir --enable-release \
209 %{?_without_dietlibc:--disable-dietlibc} \
210 %{?_with_legacy:--enable-apis=NOLEGACY} \
211 --with-initscripts=sysv \
212 %{?_without_python:--without-python}
214 %__make %{?_smp_mflags} all
215 %{!?_without_doc:%__make %{?_smp_mflags} doc}
219 rm -rf $RPM_BUILD_ROOT
220 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
222 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
224 MANIFEST_CONFIG='%config' \
225 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
226 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
234 rm -rf $RPM_BUILD_ROOT
238 test -d /vservers || mkdir -m0000 /vservers
239 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
241 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
242 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
243 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
245 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
249 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
252 %post lib -p /sbin/ldconfig
253 %postun lib -p /sbin/ldconfig
257 %chkconfig --add vservers-default
258 %chkconfig --add vprocunhide
259 %chkconfig --add util-vserver
264 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
266 test "$1" != 0 || %chkconfig --del vprocunhide
267 test "$1" != 0 || %chkconfig --del vservers-default
268 test "$1" != 0 || %chkconfig --del util-vserver
272 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
275 %triggerin build -- fedora-release, centos-release
282 test -r "$i" || continue
284 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
288 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
289 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
290 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
294 x="%_libdir/util-vserver/distributions/etch"
295 test -d "$x" && mv "$x" "$x.rpmsave" || :
299 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
301 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
302 ln -s /vservers/.hash "$f"/00
304 %_sbindir/setattr --barrier /vservers/.hash || :
308 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
311 ## Temporary workaround to remove old v_* files; it will conflict
312 ## somehow with the -legacy package but can be fixed by reinstalling
314 ## TODO: remove me in the final .spec file
315 %define v_services httpd named portmap sendmail smb sshd xinetd gated
316 %triggerun sysv -- util-vserver-sysv < 0.30.198
317 for i in %v_services; do
318 %chkconfig --del v_$i || :
323 %chkconfig --add rebootmgr
324 %chkconfig --add vservers-legacy
326 for i in %v_services; do
327 %chkconfig --add v_$i
332 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
334 test "$1" != 0 || for i in %v_services; do
335 %chkconfig --del v_$i
338 test "$1" != 0 || %chkconfig --del rebootmgr
339 test "$1" != 0 || %chkconfig --del vservers-legacy
342 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
345 %files -f %name-base.list
346 %defattr(-,root,root,-)
347 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
348 %doc doc/*.html doc/*.css
351 %dir %confdefaultdir/apps
352 %dir %confdefaultdir/files
353 %dir %pkglibdir/defaults
354 %ghost %confdefaultdir/cachebase
355 %ghost %confdefaultdir/vdirbase
356 %ghost %confdefaultdir/run.rev
358 %dir %_localstatedir/cache/vservers
359 %dir %_localstatedir/run/vservers
360 %dir %_localstatedir/run/vservers.rev
361 %dir %_localstatedir/run/vshelper
364 %files lib -f %name-lib.list
365 %files sysv -f %name-sysv.list
368 %files core -f %name-core.list
369 %defattr(-,root,root,-)
373 %files build -f %name-build.list
374 %defattr(-,root,root,-)
375 %doc contrib/yum*.patch
376 %dir %confdir/.distributions
377 %dir %confdir/.distributions/*
378 %dir %confdir/.distributions/*/apt
379 %dir %confdir/.distributions/.common
380 %dir %confdir/.distributions/.common/pubkeys
381 %dir %confdefaultdir/apps/vunify
382 %dir %confdefaultdir/apps/vunify/hash
385 %files legacy -f %name-legacy.list
386 %defattr(-,root,root,-)
387 %dir %pkglibdir/legacy
390 %files devel -f %name-devel.list
391 %defattr(-,root,root,-)
392 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
393 %{!?_without_doc:%doc lib/apidoc/html}
396 %if 0%{!?_without_python:1}
397 %files python -f %name-python.list
398 %defattr(-,root,root,-)
403 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
405 - get rid of e2fsprogs requirement
407 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
408 - add --with legacy and --without doc switches
409 - add util-vserver initscript
411 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
412 - do not require 'xalan' anymore by default
413 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
414 - removed 'chattr' leftovers
415 - create the '/etc/vservers/.defaults/cachebase' symlink
416 - added /var/cache/vservers and the needed support
417 - set barrier attribute on /vservers/.pkg and /vservers/.hash
418 - added 'centos-release' to the list of packages in the copy-the-keys
420 - create '/vservers/.hash' and add initial configuration for it
422 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
426 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
429 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
431 - require the -lib subpackage by -devel
432 - copy GPG keys from /etc/pki/rpm-gpg/
434 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
435 - added patches to make yum work in chroot environments
438 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
439 - added some %%descriptions
440 - copy GPG keys from the system into the confdir
441 - buildrequire dietlibc-0.25
442 - BuildRequire beecrypt-devel
444 - use %%global instead of %%define
445 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
447 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
448 - updated BuildRequires:
449 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
450 - moved the v_* initscripts to legacy
451 - do not ship the /vservers directory itself; as it is immutable, the
452 extraction will fail else
454 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
455 - documented switches for 'rpmbuild'
457 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
458 - (re)added the MANIFEST_* variables which were lost some time ago;
459 this will preserve %%config files...
461 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
462 - use file-list for sysv scripts also
464 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
465 - added vprocunhide-service support
466 - added doxygen support
469 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0