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 fullver @VERSION@
17 %global ver %( echo %fullver | sed 's/-.*//' )
18 %global subver %( s=`echo %fullver | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
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 e2fsprogs
42 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
43 %{?_without_beecrypt:BuildRequires: nss-devel}
44 BuildRequires: e2fsprogs
45 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
46 Requires(post): %name-core
47 Requires(pre): %pkglibdir
48 Requires(postun): %pkglibdir
49 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
50 %{?_with_xalan:BuildRequires: xalan-j}
53 Summary: Dynamic libraries for util-vserver
54 Group: System Environment/Libraries
57 Summary: The core-utilities for util-vserver
58 Group: Applications/System
62 Summary: Tools which can be used to build vservers
63 Group: Applications/System
64 Requires: rpm wget binutils tar
65 Requires: %name = %version-%release
66 Requires(pre): %confdir
67 Requires(postun): %confdir
68 Requires(post): %name-core
71 Summary: SysV-initscripts for vserver
72 Group: System Environment/Base
73 Provides: init(%name) = sysv
74 Requires: make diffutils
76 Requires: %name = %version-%release
77 Requires(post): %chkconfig
78 Requires(preun): %chkconfig
79 Requires(pre): %_initrddir %pkglibdir
80 requires(postun): %_initrddir %pkglibdir
83 Summary: Legacy utilities for util-vserver
84 Group: Applications/System
85 Requires: %name = %version-%release
86 Requires(post): %chkconfig
87 Requires(preun): %chkconfig
88 Requires(pre): %_initrddir %pkglibdir
89 requires(postun): %_initrddir %pkglibdir
92 Summary: Header-files and libraries needed to develop vserver based applications
93 Group: Development/Libraries
95 Requires: %name-lib = %version-%release
99 util-vserver provides the components and a framework to setup virtual
100 servers. A virtual server runs inside a linux server. It is nevertheless
101 highly independent. As such, you can run various services with normal
102 configuration. The various vservers can't interact with each other and
103 can't interact with services in the main server.
105 This requires a special kernel supporting the new new_s_context and
106 set_ipv4root system call.
109 util-vserver provides the components and a framework to setup virtual
110 servers. A virtual server runs inside a linux server. It is nevertheless
111 highly independent. As such, you can run various services with normal
112 configuration. The various vservers can't interact with each other and
113 can't interact with services in the main server.
115 This package contains the shared libraries needed by all other
116 'util-vserver' subpackages.
119 util-vserver provides the components and a framework to setup virtual
120 servers. A virtual server runs inside a linux server. It is nevertheless
121 highly independent. As such, you can run various services with normal
122 configuration. The various vservers can't interact with each other and
123 can't interact with services in the main server.
125 This package contains utilities which are required to communicate with
126 the Linux-Vserver enabled kernel.
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 utilities which assist in building Vservers.
139 util-vserver provides the components and a framework to setup virtual
140 servers. A virtual server runs inside a linux server. It is nevertheless
141 highly independent. As such, you can run various services with normal
142 configuration. The various vservers can't interact with each other and
143 can't interact with services in the main server.
145 This package contains the SysV initscripts which start and stop
146 VServers and related tools.
150 util-vserver provides the components and a framework to setup virtual
151 servers. A virtual server runs inside a linux server. It is nevertheless
152 highly independent. As such, you can run various services with normal
153 configuration. The various vservers can't interact with each other and
154 can't interact with services in the main server.
156 This package contains the tools which are needed to work with VServers
157 having an old-style configuration.
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 header files and libraries which are needed to
168 develop VServer related applications.
172 %setup -q -n %name-%fullver
176 %configure --with-initrddir=%_initrddir --enable-release \
177 %{?_without_dietlibc:--disable-dietlibc} \
178 %{?_with_legacy:--enable-apis=NOLEGACY} \
179 --with-initscripts=sysv
181 %__make %{?_smp_mflags} all
182 %{!?_without_doc:%__make %{?_smp_mflags} doc}
186 rm -rf $RPM_BUILD_ROOT
187 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
189 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
191 MANIFEST_CONFIG='%config' \
192 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
193 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
201 rm -rf $RPM_BUILD_ROOT
205 test -d /vservers || mkdir -m0000 /vservers
206 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
208 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
209 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
210 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
212 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
216 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
219 %post lib -p /sbin/ldconfig
220 %postun lib -p /sbin/ldconfig
224 %chkconfig --add vservers-default
225 %chkconfig --add vprocunhide
226 %chkconfig --add util-vserver
231 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
233 test "$1" != 0 || %chkconfig --del vprocunhide
234 test "$1" != 0 || %chkconfig --del vservers-default
235 test "$1" != 0 || %chkconfig --del util-vserver
239 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
242 %triggerin build -- fedora-release, centos-release
249 test -r "$i" || continue
251 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
255 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
256 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
257 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
261 x="%_libdir/util-vserver/distributions/etch"
262 test -d "$x" && mv "$x" "$x.rpmsave" || :
266 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
268 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
269 ln -s /vservers/.hash "$f"/00
271 %_sbindir/setattr --barrier /vservers/.hash || :
275 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
278 ## Temporary workaround to remove old v_* files; it will conflict
279 ## somehow with the -legacy package but can be fixed by reinstalling
281 ## TODO: remove me in the final .spec file
282 %define v_services httpd named portmap sendmail smb sshd xinetd gated
283 %triggerun sysv -- util-vserver-sysv < 0.30.198
284 for i in %v_services; do
285 %chkconfig --del v_$i || :
290 %chkconfig --add rebootmgr
291 %chkconfig --add vservers-legacy
293 for i in %v_services; do
294 %chkconfig --add v_$i
299 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
301 test "$1" != 0 || for i in %v_services; do
302 %chkconfig --del v_$i
305 test "$1" != 0 || %chkconfig --del rebootmgr
306 test "$1" != 0 || %chkconfig --del vservers-legacy
309 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
312 %files -f %name-base.list
313 %defattr(-,root,root,-)
314 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
315 %doc doc/*.html doc/*.css
319 %dir %confdefaultdir/apps
320 %dir %confdefaultdir/files
321 %dir %pkglibdir/defaults
322 %ghost %confdefaultdir/cachebase
323 %ghost %confdefaultdir/vdirbase
324 %ghost %confdefaultdir/run.rev
326 %dir %_localstatedir/cache/vservers
327 %dir %_localstatedir/run/vservers
328 %dir %_localstatedir/run/vservers.rev
329 %dir %_localstatedir/run/vshelper
332 %files lib -f %name-lib.list
333 %files sysv -f %name-sysv.list
336 %files core -f %name-core.list
337 %defattr(-,root,root,-)
341 %files build -f %name-build.list
342 %defattr(-,root,root,-)
343 %doc contrib/yum*.patch
344 %dir %confdir/.distributions
345 %dir %confdir/.distributions/*
346 %dir %confdir/.distributions/*/apt
347 %dir %confdir/.distributions/.common
348 %dir %confdir/.distributions/.common/pubkeys
349 %dir %confdefaultdir/apps/vunify
350 %dir %confdefaultdir/apps/vunify/hash
353 %files legacy -f %name-legacy.list
354 %defattr(-,root,root,-)
355 %dir %pkglibdir/legacy
358 %files devel -f %name-devel.list
359 %defattr(-,root,root,-)
360 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
361 %{!?_without_doc:%doc lib/apidoc/html}
365 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
367 - get rid of e2fsprogs requirement
369 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
370 - add --with legacy and --without doc switches
371 - add util-vserver initscript
373 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
374 - do not require 'xalan' anymore by default
375 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
376 - removed 'chattr' leftovers
377 - create the '/etc/vservers/.defaults/cachebase' symlink
378 - added /var/cache/vservers and the needed support
379 - set barrier attribute on /vservers/.pkg and /vservers/.hash
380 - added 'centos-release' to the list of packages in the copy-the-keys
382 - create '/vservers/.hash' and add initial configuration for it
384 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
388 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
391 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
393 - require the -lib subpackage by -devel
394 - copy GPG keys from /etc/pki/rpm-gpg/
396 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
397 - added patches to make yum work in chroot environments
400 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
401 - added some %%descriptions
402 - copy GPG keys from the system into the confdir
403 - buildrequire dietlibc-0.25
404 - BuildRequire beecrypt-devel
406 - use %%global instead of %%define
407 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
409 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
410 - updated BuildRequires:
411 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
412 - moved the v_* initscripts to legacy
413 - do not ship the /vservers directory itself; as it is immutable, the
414 extraction will fail else
416 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
417 - documented switches for 'rpmbuild'
419 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
420 - (re)added the MANIFEST_* variables which were lost some time ago;
421 this will preserve %%config files...
423 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
424 - use file-list for sysv scripts also
426 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
427 - added vprocunhide-service support
428 - added doxygen support
431 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0