3 ## This package understands the following switches:
4 ## --without dietlibc ... disable usage of dietlibc
5 ## --with xalan ... require/use the xalan xslt processor
6 ## --without doc ... disable doc generation
7 ## --with legacy ... enable the legacy APIs
9 %global confdir %_sysconfdir/vservers
10 %global confdefaultdir %confdir/.defaults
11 %global pkglibdir %_libdir/%name
12 %global chkconfig /sbin/chkconfig
14 %global _localstatedir %_var
16 %global ver %( echo @VERSION@ | sed 's/-.*//' )
17 %global subver %( s=`echo @VERSION@ | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
18 %global fullver @VERSION@
21 %{!?release_func:%global release_func() %1%{?dist}}
23 Summary: Linux virtual server utilities
26 Release: %release_func 0%subver
28 Group: System Environment/Base
29 URL: http://savannah.nongnu.org/projects/util-vserver/
30 Source0: http://www.13thfloor.at/~ensc/util-vserver/files/alpha/%name-%fullver.tar.bz2
31 #Source1: http://www.13thfloor.at/~ensc/util-vserver/files/alpha/%name-%fullver.tar.bz2.asc
32 BuildRoot: %_tmppath/%name-%version-%release-root
34 Requires: %name-core = %version-%release
35 Requires: %name-lib = %version-%release
36 Requires: diffutils mktemp sed
37 Provides: vserver = %version-%release
38 Obsoletes: vserver < %version
39 BuildRequires: mount vconfig gawk iproute iptables
40 BuildRequires: gcc-c++ wget which diffutils
41 BuildRequires: e2fsprogs-devel beecrypt-devel
42 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
43 Requires(post): %name-core
44 Requires(pre): %pkglibdir
45 Requires(postun): %pkglibdir
46 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
47 %{?_with_xalan:BuildRequires: xalan-j}
50 Summary: Dynamic libraries for util-vserver
51 Group: System Environment/Libraries
54 Summary: The core-utilities for util-vserver
55 Group: Applications/System
59 Summary: Tools which can be used to build vservers
60 Group: Applications/System
61 Requires: rpm wget binutils tar e2fsprogs
62 Requires: %name = %version-%release
63 Requires(pre): %confdir
64 Requires(postun): %confdir
65 Requires(post): %name-core
68 Summary: SysV-initscripts for vserver
69 Group: System Environment/Base
70 Provides: init(%name) = sysv
71 Requires: make diffutils
73 Requires: %name = %version-%release
74 Requires(post): %chkconfig
75 Requires(preun): %chkconfig
76 Requires(pre): %_initrddir %pkglibdir
77 requires(postun): %_initrddir %pkglibdir
80 Summary: Legacy utilities for util-vserver
81 Group: Applications/System
82 Requires: %name = %version-%release
83 Requires(post): %chkconfig
84 Requires(preun): %chkconfig
85 Requires(pre): %_initrddir %pkglibdir
86 requires(postun): %_initrddir %pkglibdir
89 Summary: Header-files and libraries needed to develop vserver based applications
90 Group: Development/Libraries
92 Requires: %name-lib = %version-%release
96 util-vserver provides the components and a framework to setup virtual
97 servers. A virtual server runs inside a linux server. It is nevertheless
98 highly independent. As such, you can run various services with normal
99 configuration. The various vservers can't interact with each other and
100 can't interact with services in the main server.
102 This requires a special kernel supporting the new new_s_context and
103 set_ipv4root system call.
106 util-vserver provides the components and a framework to setup virtual
107 servers. A virtual server runs inside a linux server. It is nevertheless
108 highly independent. As such, you can run various services with normal
109 configuration. The various vservers can't interact with each other and
110 can't interact with services in the main server.
112 This package contains the shared libraries needed by all other
113 'util-vserver' subpackages.
116 util-vserver provides the components and a framework to setup virtual
117 servers. A virtual server runs inside a linux server. It is nevertheless
118 highly independent. As such, you can run various services with normal
119 configuration. The various vservers can't interact with each other and
120 can't interact with services in the main server.
122 This package contains utilities which are required to communicate with
123 the Linux-Vserver enabled kernel.
127 util-vserver provides the components and a framework to setup virtual
128 servers. A virtual server runs inside a linux server. It is nevertheless
129 highly independent. As such, you can run various services with normal
130 configuration. The various vservers can't interact with each other and
131 can't interact with services in the main server.
133 This package contains utilities which assist in building Vservers.
136 util-vserver provides the components and a framework to setup virtual
137 servers. A virtual server runs inside a linux server. It is nevertheless
138 highly independent. As such, you can run various services with normal
139 configuration. The various vservers can't interact with each other and
140 can't interact with services in the main server.
142 This package contains the SysV initscripts which start and stop
143 VServers and related tools.
147 util-vserver provides the components and a framework to setup virtual
148 servers. A virtual server runs inside a linux server. It is nevertheless
149 highly independent. As such, you can run various services with normal
150 configuration. The various vservers can't interact with each other and
151 can't interact with services in the main server.
153 This package contains the tools which are needed to work with VServers
154 having an old-style configuration.
158 util-vserver provides the components and a framework to setup virtual
159 servers. A virtual server runs inside a linux server. It is nevertheless
160 highly independent. As such, you can run various services with normal
161 configuration. The various vservers can't interact with each other and
162 can't interact with services in the main server.
164 This package contains header files and libraries which are needed to
165 develop VServer related applications.
169 %setup -q -n %name-%fullver
173 %configure --with-initrddir=%_initrddir --enable-release \
174 %{?_without_dietlibc:--disable-dietlibc} \
175 %{?_with_legacy:--enable-apis=NOLEGACY}
177 %__make %{?_smp_mflags} all
178 %{!?_without_doc:%__make %{?_smp_mflags} doc}
182 rm -rf $RPM_BUILD_ROOT
183 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
185 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
187 MANIFEST_CONFIG='%config' \
188 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
189 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
197 rm -rf $RPM_BUILD_ROOT
201 test -d /vservers || mkdir -m0000 /vservers
202 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
204 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
205 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
206 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
208 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
212 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
215 %post lib -p /sbin/ldconfig
216 %postun lib -p /sbin/ldconfig
220 %chkconfig --add vservers-default
221 %chkconfig --add vprocunhide
222 %chkconfig --add util-vserver
227 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
229 test "$1" != 0 || %chkconfig --del vprocunhide
230 test "$1" != 0 || %chkconfig --del vservers-default
231 test "$1" != 0 || %chkconfig --del util-vserver
235 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
238 %triggerin build -- fedora-release, centos-release
245 test -r "$i" || continue
247 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
251 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
252 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
253 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
257 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
259 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
260 ln -s /vservers/.hash "$f"/00
262 %_sbindir/setattr --barrier /vservers/.hash || :
266 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
269 ## Temporary workaround to remove old v_* files; it will conflict
270 ## somehow with the -legacy package but can be fixed by reinstalling
272 ## TODO: remove me in the final .spec file
273 %define v_services httpd named portmap sendmail smb sshd xinetd gated
274 %triggerun sysv -- util-vserver-sysv < 0.30.198
275 for i in %v_services; do
276 %chkconfig --del v_$i || :
281 %chkconfig --add rebootmgr
282 %chkconfig --add vservers-legacy
284 for i in %v_services; do
285 %chkconfig --add v_$i
290 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
292 test "$1" != 0 || for i in %v_services; do
293 %chkconfig --del v_$i
296 test "$1" != 0 || %chkconfig --del rebootmgr
297 test "$1" != 0 || %chkconfig --del vservers-legacy
300 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
303 %files -f %name-base.list
304 %defattr(-,root,root,-)
305 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
306 %doc doc/*.html doc/*.css
310 %dir %confdefaultdir/apps
311 %dir %confdefaultdir/files
312 %dir %pkglibdir/defaults
313 %ghost %confdefaultdir/cachebase
314 %ghost %confdefaultdir/vdirbase
315 %ghost %confdefaultdir/run.rev
317 %dir %_localstatedir/cache/vservers
318 %dir %_localstatedir/run/vservers
319 %dir %_localstatedir/run/vservers.rev
320 %dir %_localstatedir/run/vshelper
323 %files lib -f %name-lib.list
324 %files sysv -f %name-sysv.list
327 %files core -f %name-core.list
328 %defattr(-,root,root,-)
332 %files build -f %name-build.list
333 %defattr(-,root,root,-)
334 %doc contrib/yum*.patch
335 %dir %confdir/.distributions
336 %dir %confdir/.distributions/*
337 %dir %confdir/.distributions/*/apt
338 %dir %confdir/.distributions/.common
339 %dir %confdir/.distributions/.common/pubkeys
340 %dir %confdefaultdir/apps/vunify
341 %dir %confdefaultdir/apps/vunify/hash
344 %files legacy -f %name-legacy.list
345 %defattr(-,root,root,-)
346 %dir %pkglibdir/legacy
349 %files devel -f %name-devel.list
350 %defattr(-,root,root,-)
351 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
352 %{!?_without_doc:%doc lib/apidoc/html}
356 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
357 - add --with legacy and --without doc switches
358 - add util-vserver initscript
360 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
361 - do not require 'xalan' anymore by default
362 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
363 - removed 'chattr' leftovers
364 - create the '/etc/vservers/.defaults/cachebase' symlink
365 - added /var/cache/vservers and the needed support
366 - set barrier attribute on /vservers/.pkg and /vservers/.hash
367 - added 'centos-release' to the list of packages in the copy-the-keys
369 - create '/vservers/.hash' and add initial configuration for it
371 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
375 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
378 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
380 - require the -lib subpackage by -devel
381 - copy GPG keys from /etc/pki/rpm-gpg/
383 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
384 - added patches to make yum work in chroot environments
387 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
388 - added some %%descriptions
389 - copy GPG keys from the system into the confdir
390 - buildrequire dietlibc-0.25
391 - BuildRequire beecrypt-devel
393 - use %%global instead of %%define
394 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
396 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
397 - updated BuildRequires:
398 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
399 - moved the v_* initscripts to legacy
400 - do not ship the /vservers directory itself; as it is immutable, the
401 extraction will fail else
403 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
404 - documented switches for 'rpmbuild'
406 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
407 - (re)added the MANIFEST_* variables which were lost some time ago;
408 this will preserve %%config files...
410 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
411 - use file-list for sysv scripts also
413 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
414 - added vprocunhide-service support
415 - added doxygen support
418 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0