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://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
31 #Source1: http://ftp.linux-vserver.org/pub/utils/util-vserver/%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
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} \
176 --with-initscripts=sysv
178 %__make %{?_smp_mflags} all
179 %{!?_without_doc:%__make %{?_smp_mflags} doc}
183 rm -rf $RPM_BUILD_ROOT
184 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
186 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
188 MANIFEST_CONFIG='%config' \
189 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
190 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
198 rm -rf $RPM_BUILD_ROOT
202 test -d /vservers || mkdir -m0000 /vservers
203 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
205 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
206 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
207 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
209 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
213 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
216 %post lib -p /sbin/ldconfig
217 %postun lib -p /sbin/ldconfig
221 %chkconfig --add vservers-default
222 %chkconfig --add vprocunhide
223 %chkconfig --add util-vserver
228 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
230 test "$1" != 0 || %chkconfig --del vprocunhide
231 test "$1" != 0 || %chkconfig --del vservers-default
232 test "$1" != 0 || %chkconfig --del util-vserver
236 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
239 %triggerin build -- fedora-release, centos-release
246 test -r "$i" || continue
248 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
252 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
253 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
254 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
258 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
260 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
261 ln -s /vservers/.hash "$f"/00
263 %_sbindir/setattr --barrier /vservers/.hash || :
267 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
270 ## Temporary workaround to remove old v_* files; it will conflict
271 ## somehow with the -legacy package but can be fixed by reinstalling
273 ## TODO: remove me in the final .spec file
274 %define v_services httpd named portmap sendmail smb sshd xinetd gated
275 %triggerun sysv -- util-vserver-sysv < 0.30.198
276 for i in %v_services; do
277 %chkconfig --del v_$i || :
282 %chkconfig --add rebootmgr
283 %chkconfig --add vservers-legacy
285 for i in %v_services; do
286 %chkconfig --add v_$i
291 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
293 test "$1" != 0 || for i in %v_services; do
294 %chkconfig --del v_$i
297 test "$1" != 0 || %chkconfig --del rebootmgr
298 test "$1" != 0 || %chkconfig --del vservers-legacy
301 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
304 %files -f %name-base.list
305 %defattr(-,root,root,-)
306 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
307 %doc doc/*.html doc/*.css
311 %dir %confdefaultdir/apps
312 %dir %confdefaultdir/files
313 %dir %pkglibdir/defaults
314 %ghost %confdefaultdir/cachebase
315 %ghost %confdefaultdir/vdirbase
316 %ghost %confdefaultdir/run.rev
318 %dir %_localstatedir/cache/vservers
319 %dir %_localstatedir/run/vservers
320 %dir %_localstatedir/run/vservers.rev
321 %dir %_localstatedir/run/vshelper
324 %files lib -f %name-lib.list
325 %files sysv -f %name-sysv.list
328 %files core -f %name-core.list
329 %defattr(-,root,root,-)
333 %files build -f %name-build.list
334 %defattr(-,root,root,-)
335 %doc contrib/yum*.patch
336 %dir %confdir/.distributions
337 %dir %confdir/.distributions/*
338 %dir %confdir/.distributions/*/apt
339 %dir %confdir/.distributions/.common
340 %dir %confdir/.distributions/.common/pubkeys
341 %dir %confdefaultdir/apps/vunify
342 %dir %confdefaultdir/apps/vunify/hash
345 %files legacy -f %name-legacy.list
346 %defattr(-,root,root,-)
347 %dir %pkglibdir/legacy
350 %files devel -f %name-devel.list
351 %defattr(-,root,root,-)
352 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
353 %{!?_without_doc:%doc lib/apidoc/html}
357 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
359 - get rid of e2fsprogs requirement
361 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
362 - add --with legacy and --without doc switches
363 - add util-vserver initscript
365 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
366 - do not require 'xalan' anymore by default
367 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
368 - removed 'chattr' leftovers
369 - create the '/etc/vservers/.defaults/cachebase' symlink
370 - added /var/cache/vservers and the needed support
371 - set barrier attribute on /vservers/.pkg and /vservers/.hash
372 - added 'centos-release' to the list of packages in the copy-the-keys
374 - create '/vservers/.hash' and add initial configuration for it
376 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
380 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
383 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
385 - require the -lib subpackage by -devel
386 - copy GPG keys from /etc/pki/rpm-gpg/
388 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
389 - added patches to make yum work in chroot environments
392 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
393 - added some %%descriptions
394 - copy GPG keys from the system into the confdir
395 - buildrequire dietlibc-0.25
396 - BuildRequire beecrypt-devel
398 - use %%global instead of %%define
399 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
401 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
402 - updated BuildRequires:
403 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
404 - moved the v_* initscripts to legacy
405 - do not ship the /vservers directory itself; as it is immutable, the
406 extraction will fail else
408 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
409 - documented switches for 'rpmbuild'
411 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
412 - (re)added the MANIFEST_* variables which were lost some time ago;
413 this will preserve %%config files...
415 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
416 - use file-list for sysv scripts also
418 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
419 - added vprocunhide-service support
420 - added doxygen support
423 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0