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-pre3004
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,\.,,' )
24 %global _without_doc 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 Summary: Linux virtual server utilities
43 Group: System Environment/Base
44 URL: http://savannah.nongnu.org/projects/util-vserver/
45 Source0: http://people.linux-vserver.org/~dhozac/t/uv-testing/%name-%version-%release.tar.bz2
46 #Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
47 #Source1: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2.asc
48 BuildRoot: %_tmppath/%name-%version-%release-root
50 Requires: %name-core = %version-%release
51 Requires: %name-lib = %version-%release
52 Requires: diffutils mktemp sed
53 Provides: vserver = %version-%release
54 Obsoletes: vserver < %version
55 BuildRequires: mount vconfig gawk /sbin/ip iptables
56 BuildRequires: gcc-c++ wget which diffutils
57 BuildRequires: e2fsprogs-devel e2fsprogs
58 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
59 %{?_without_beecrypt:BuildRequires: nss-devel}
60 BuildRequires: e2fsprogs
61 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
62 %{!?_without_python:BuildRequires: python python-devel ctags}
63 Requires(post): %name-core
64 Requires(pre): %pkglibdir
65 Requires(postun): %pkglibdir
66 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
67 %{?_with_xalan:BuildRequires: xalan-j}
70 Summary: Dynamic libraries for util-vserver
71 Group: System Environment/Libraries
74 Summary: The core-utilities for util-vserver
75 Group: Applications/System
79 Summary: Tools which can be used to build vservers
80 Group: Applications/System
81 Requires: rpm wget binutils tar
82 Requires: %name = %version-%release
83 Requires(pre): %confdir
84 Requires(postun): %confdir
85 Requires(post): %name-core
88 Summary: SysV-initscripts for vserver
89 Group: System Environment/Base
90 Provides: init(%name) = sysv
91 Requires: make diffutils
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: Legacy utilities for util-vserver
101 Group: Applications/System
102 Requires: %name = %version-%release
103 Requires(post): %chkconfig
104 Requires(preun): %chkconfig
105 Requires(pre): %_initrddir %pkglibdir
106 requires(postun): %_initrddir %pkglibdir
109 Summary: Header-files and libraries needed to develop vserver based applications
110 Group: Development/Libraries
112 Requires: %name-lib = %version-%release
115 Summary: Python bindings to develop vserver-based applications
116 Group: Development/Libraries
117 Requires: %name-lib = %version-%release
121 util-vserver provides the components and a framework to setup virtual
122 servers. A virtual server runs inside a linux server. It is nevertheless
123 highly independent. As such, you can run various services with normal
124 configuration. The various vservers can't interact with each other and
125 can't interact with services in the main server.
127 This requires a special kernel supporting the new new_s_context and
128 set_ipv4root system call.
131 util-vserver provides the components and a framework to setup virtual
132 servers. A virtual server runs inside a linux server. It is nevertheless
133 highly independent. As such, you can run various services with normal
134 configuration. The various vservers can't interact with each other and
135 can't interact with services in the main server.
137 This package contains the shared libraries needed by all other
138 'util-vserver' subpackages.
141 util-vserver provides the components and a framework to setup virtual
142 servers. A virtual server runs inside a linux server. It is nevertheless
143 highly independent. As such, you can run various services with normal
144 configuration. The various vservers can't interact with each other and
145 can't interact with services in the main server.
147 This package contains utilities which are required to communicate with
148 the Linux-Vserver enabled kernel.
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 utilities which assist in building Vservers.
161 util-vserver provides the components and a framework to setup virtual
162 servers. A virtual server runs inside a linux server. It is nevertheless
163 highly independent. As such, you can run various services with normal
164 configuration. The various vservers can't interact with each other and
165 can't interact with services in the main server.
167 This package contains the SysV initscripts which start and stop
168 VServers and related tools.
172 util-vserver provides the components and a framework to setup virtual
173 servers. A virtual server runs inside a linux server. It is nevertheless
174 highly independent. As such, you can run various services with normal
175 configuration. The various vservers can't interact with each other and
176 can't interact with services in the main server.
178 This package contains the tools which are needed to work with VServers
179 having an old-style configuration.
183 util-vserver provides the components and a framework to setup virtual
184 servers. A virtual server runs inside a linux server. It is nevertheless
185 highly independent. As such, you can run various services with normal
186 configuration. The various vservers can't interact with each other and
187 can't interact with services in the main server.
189 This package contains header files and libraries which are needed to
190 develop VServer related applications.
193 util-vserver provides the components and a framework to setup virtual
194 servers. A virtual server runs inside a linux server. It is nevertheless
195 highly independent. As such, you can run various services with normal
196 configuration. The various vservers can't interact with each other and
197 can't interact with services in the main server.
199 This package contains the files needed to interface with the
200 Linux-VServer API from Python.
204 %setup -q -n %name-%fullver
208 # could not reproduce the same trick as for 2926
209 # see log for a843358da4e3f1e894dcf2efc5f5db22d5b4739f
211 #make -f Makefile.svn
212 %configure --with-initrddir=%_initrddir --enable-release \
213 %{?_without_dietlibc:--disable-dietlibc} \
214 %{?_with_legacy:--enable-apis=NOLEGACY} \
215 --with-initscripts=sysv \
216 %{?_without_python:--without-python} \
219 %__make %{?_smp_mflags} all
220 %{!?_without_doc:%__make %{?_smp_mflags} doc}
224 rm -rf $RPM_BUILD_ROOT
225 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
227 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
229 MANIFEST_CONFIG='%config' \
230 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
231 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
239 rm -rf $RPM_BUILD_ROOT
243 test -d /vservers || mkdir -m0000 /vservers
244 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
246 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
247 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
248 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
250 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
254 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
257 %post lib -p /sbin/ldconfig
258 %postun lib -p /sbin/ldconfig
262 %chkconfig --add vservers-default
263 %chkconfig --add vprocunhide
264 %chkconfig --add util-vserver
269 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
271 test "$1" != 0 || %chkconfig --del vprocunhide
272 test "$1" != 0 || %chkconfig --del vservers-default
273 test "$1" != 0 || %chkconfig --del util-vserver
277 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
280 %triggerin build -- fedora-release, centos-release
287 test -r "$i" || continue
289 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
293 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
294 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
295 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
299 x="%_libdir/util-vserver/distributions/etch"
300 test -d "$x" && mv "$x" "$x.rpmsave" || :
304 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
306 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
307 ln -s /vservers/.hash "$f"/00
309 %_sbindir/setattr --barrier /vservers/.hash || :
313 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
316 ## Temporary workaround to remove old v_* files; it will conflict
317 ## somehow with the -legacy package but can be fixed by reinstalling
319 ## TODO: remove me in the final .spec file
320 %define v_services httpd named portmap sendmail smb sshd xinetd gated
321 %triggerun sysv -- util-vserver-sysv < 0.30.198
322 for i in %v_services; do
323 %chkconfig --del v_$i || :
328 %chkconfig --add rebootmgr
329 %chkconfig --add vservers-legacy
331 for i in %v_services; do
332 %chkconfig --add v_$i
337 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
339 test "$1" != 0 || for i in %v_services; do
340 %chkconfig --del v_$i
343 test "$1" != 0 || %chkconfig --del rebootmgr
344 test "$1" != 0 || %chkconfig --del vservers-legacy
347 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
350 %files -f %name-base.list
351 %defattr(-,root,root,-)
352 # ChangeLog not in the svn tree, make is helpless to recreate...
353 #%doc AUTHORS COPYING ChangeLog NEWS README THANKS
354 %doc AUTHORS COPYING NEWS README THANKS
355 #%doc doc/*.html doc/*.css
359 %dir %confdefaultdir/apps
360 %dir %confdefaultdir/files
361 %dir %pkglibdir/defaults
362 %ghost %confdefaultdir/cachebase
363 %ghost %confdefaultdir/vdirbase
364 %ghost %confdefaultdir/run.rev
366 %dir %_localstatedir/cache/vservers
367 %dir %_localstatedir/run/vservers
368 %dir %_localstatedir/run/vservers.rev
369 %dir %_localstatedir/run/vshelper
372 %files lib -f %name-lib.list
373 %files sysv -f %name-sysv.list
376 %files core -f %name-core.list
377 %defattr(-,root,root,-)
381 %files build -f %name-build.list
382 %defattr(-,root,root,-)
383 %doc contrib/yum*.patch
384 %dir %confdir/.distributions
385 %dir %confdir/.distributions/*
386 %dir %confdir/.distributions/*/apt
387 %dir %confdir/.distributions/.common
388 %dir %confdir/.distributions/.common/pubkeys
389 %dir %confdefaultdir/apps/vunify
390 %dir %confdefaultdir/apps/vunify/hash
393 %files legacy -f %name-legacy.list
394 %defattr(-,root,root,-)
395 %dir %pkglibdir/legacy
398 %files devel -f %name-devel.list
399 %defattr(-,root,root,-)
400 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
401 %{!?_without_doc:%doc lib/apidoc/html}
404 %if 0%{!?_without_python:1}
405 %files python -f %name-python.list
406 %defattr(-,root,root,-)
411 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
413 - get rid of e2fsprogs requirement
415 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
416 - add --with legacy and --without doc switches
417 - add util-vserver initscript
419 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
420 - do not require 'xalan' anymore by default
421 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
422 - removed 'chattr' leftovers
423 - create the '/etc/vservers/.defaults/cachebase' symlink
424 - added /var/cache/vservers and the needed support
425 - set barrier attribute on /vservers/.pkg and /vservers/.hash
426 - added 'centos-release' to the list of packages in the copy-the-keys
428 - create '/vservers/.hash' and add initial configuration for it
430 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
434 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
437 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
439 - require the -lib subpackage by -devel
440 - copy GPG keys from /etc/pki/rpm-gpg/
442 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
443 - added patches to make yum work in chroot environments
446 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
447 - added some %%descriptions
448 - copy GPG keys from the system into the confdir
449 - buildrequire dietlibc-0.25
450 - BuildRequire beecrypt-devel
452 - use %%global instead of %%define
453 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
455 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
456 - updated BuildRequires:
457 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
458 - moved the v_* initscripts to legacy
459 - do not ship the /vservers directory itself; as it is immutable, the
460 extraction will fail else
462 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
463 - documented switches for 'rpmbuild'
465 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
466 - (re)added the MANIFEST_* variables which were lost some time ago;
467 this will preserve %%config files...
469 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
470 - use file-list for sysv scripts also
472 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
473 - added vprocunhide-service support
474 - added doxygen support
477 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0