1 # $Id: util-vserver.spec.in 2807 2008-10-30 01:59:52Z dhozac $
3 %if "%{?_without_python:1}" != "1"
4 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
7 ## This package understands the following switches:
8 ## --without dietlibc ... disable usage of dietlibc
9 ## --with xalan ... require/use the xalan xslt processor
10 ## --without doc ... disable doc generation
11 ## --with legacy ... enable the legacy APIs
13 %global confdir %_sysconfdir/vservers
14 %global confdefaultdir %confdir/.defaults
15 %global pkglibdir %_libdir/%name
16 %global chkconfig /sbin/chkconfig
18 %global _localstatedir %_var
20 %global fullver 0.30.216-pre2883
21 %global modulever 0.30.216
22 %global ver %( echo %fullver | sed 's/-.*//' )
23 %global subver %( s=`echo %fullver | grep -- - | sed 's/.*-/./'`; echo ${s:-.1} )
26 %global module_version_varname modulever
29 %{!?release_func:%global release_func() %1%{?dist}}
31 Summary: Linux virtual server utilities
36 Group: System Environment/Base
37 URL: http://savannah.nongnu.org/projects/util-vserver/
38 Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2
39 #Source1: http://ftp.linux-vserver.org/pub/utils/util-vserver/%name-%fullver.tar.bz2.asc
41 Patch2: remove-tmpfs.patch
42 BuildRoot: %_tmppath/%name-%version-%release-root
44 Requires: %name-core = %version-%release
45 Requires: %name-lib = %version-%release
46 Requires: diffutils mktemp sed
47 Provides: vserver = %version-%release
48 Obsoletes: vserver < %version
49 BuildRequires: mount vconfig gawk /sbin/ip iptables
50 BuildRequires: gcc-c++ wget which diffutils
51 BuildRequires: e2fsprogs-devel e2fsprogs
52 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
53 %{?_without_beecrypt:BuildRequires: nss-devel}
54 BuildRequires: e2fsprogs
55 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
56 %{!?_without_python:BuildRequires: python python-devel ctags}
57 Requires(post): %name-core
58 Requires(pre): %pkglibdir
59 Requires(postun): %pkglibdir
60 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
61 %{?_with_xalan:BuildRequires: xalan-j}
64 Summary: Dynamic libraries for util-vserver
65 Group: System Environment/Libraries
68 Summary: The core-utilities for util-vserver
69 Group: Applications/System
73 Summary: Tools which can be used to build vservers
74 Group: Applications/System
75 Requires: rpm wget binutils tar
76 Requires: %name = %version-%release
77 Requires(pre): %confdir
78 Requires(postun): %confdir
79 Requires(post): %name-core
82 Summary: SysV-initscripts for vserver
83 Group: System Environment/Base
84 Provides: init(%name) = sysv
85 Requires: make diffutils
87 Requires: %name = %version-%release
88 Requires(post): %chkconfig
89 Requires(preun): %chkconfig
90 Requires(pre): %_initrddir %pkglibdir
91 requires(postun): %_initrddir %pkglibdir
94 Summary: Legacy utilities for util-vserver
95 Group: Applications/System
96 Requires: %name = %version-%release
97 Requires(post): %chkconfig
98 Requires(preun): %chkconfig
99 Requires(pre): %_initrddir %pkglibdir
100 requires(postun): %_initrddir %pkglibdir
103 Summary: Header-files and libraries needed to develop vserver based applications
104 Group: Development/Libraries
106 Requires: %name-lib = %version-%release
109 Summary: Python bindings to develop vserver-based applications
110 Group: Development/Libraries
111 Requires: %name-lib = %version-%release
115 util-vserver provides the components and a framework to setup virtual
116 servers. A virtual server runs inside a linux server. It is nevertheless
117 highly independent. As such, you can run various services with normal
118 configuration. The various vservers can't interact with each other and
119 can't interact with services in the main server.
121 This requires a special kernel supporting the new new_s_context and
122 set_ipv4root system call.
125 util-vserver provides the components and a framework to setup virtual
126 servers. A virtual server runs inside a linux server. It is nevertheless
127 highly independent. As such, you can run various services with normal
128 configuration. The various vservers can't interact with each other and
129 can't interact with services in the main server.
131 This package contains the shared libraries needed by all other
132 'util-vserver' subpackages.
135 util-vserver provides the components and a framework to setup virtual
136 servers. A virtual server runs inside a linux server. It is nevertheless
137 highly independent. As such, you can run various services with normal
138 configuration. The various vservers can't interact with each other and
139 can't interact with services in the main server.
141 This package contains utilities which are required to communicate with
142 the Linux-Vserver enabled kernel.
146 util-vserver provides the components and a framework to setup virtual
147 servers. A virtual server runs inside a linux server. It is nevertheless
148 highly independent. As such, you can run various services with normal
149 configuration. The various vservers can't interact with each other and
150 can't interact with services in the main server.
152 This package contains utilities which assist in building Vservers.
155 util-vserver provides the components and a framework to setup virtual
156 servers. A virtual server runs inside a linux server. It is nevertheless
157 highly independent. As such, you can run various services with normal
158 configuration. The various vservers can't interact with each other and
159 can't interact with services in the main server.
161 This package contains the SysV initscripts which start and stop
162 VServers and related tools.
166 util-vserver provides the components and a framework to setup virtual
167 servers. A virtual server runs inside a linux server. It is nevertheless
168 highly independent. As such, you can run various services with normal
169 configuration. The various vservers can't interact with each other and
170 can't interact with services in the main server.
172 This package contains the tools which are needed to work with VServers
173 having an old-style configuration.
177 util-vserver provides the components and a framework to setup virtual
178 servers. A virtual server runs inside a linux server. It is nevertheless
179 highly independent. As such, you can run various services with normal
180 configuration. The various vservers can't interact with each other and
181 can't interact with services in the main server.
183 This package contains header files and libraries which are needed to
184 develop VServer related applications.
187 util-vserver provides the components and a framework to setup virtual
188 servers. A virtual server runs inside a linux server. It is nevertheless
189 highly independent. As such, you can run various services with normal
190 configuration. The various vservers can't interact with each other and
191 can't interact with services in the main server.
193 This package contains the files needed to interface with the
194 Linux-VServer API from Python.
198 %setup -q -n %name-%fullver
204 %configure --with-initrddir=%_initrddir --enable-release \
205 %{?_without_dietlibc:--disable-dietlibc} \
206 %{?_with_legacy:--enable-apis=NOLEGACY} \
207 --with-initscripts=sysv \
208 %{?_without_python:--without-python}
210 %__make %{?_smp_mflags} all
211 %{!?_without_doc:%__make %{?_smp_mflags} doc}
215 rm -rf $RPM_BUILD_ROOT
216 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
218 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
220 MANIFEST_CONFIG='%config' \
221 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
222 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
230 rm -rf $RPM_BUILD_ROOT
234 test -d /vservers || mkdir -m0000 /vservers
235 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
237 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
238 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
239 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
241 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
245 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
248 %post lib -p /sbin/ldconfig
249 %postun lib -p /sbin/ldconfig
253 %chkconfig --add vservers-default
254 %chkconfig --add vprocunhide
255 %chkconfig --add util-vserver
256 %chkconfig util-vserver on
257 service util-vserver restart
260 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
262 test "$1" != 0 || %chkconfig --del vprocunhide
263 test "$1" != 0 || %chkconfig --del vservers-default
264 test "$1" != 0 || %chkconfig --del util-vserver
268 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
271 %triggerin build -- fedora-release, centos-release
278 test -r "$i" || continue
280 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
284 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
285 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
286 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
290 x="%_libdir/util-vserver/distributions/etch"
291 test -d "$x" && mv "$x" "$x.rpmsave" || :
295 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
297 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
298 ln -s /vservers/.hash "$f"/00
300 %_sbindir/setattr --barrier /vservers/.hash || :
304 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
307 ## Temporary workaround to remove old v_* files; it will conflict
308 ## somehow with the -legacy package but can be fixed by reinstalling
310 ## TODO: remove me in the final .spec file
311 %define v_services httpd named portmap sendmail smb sshd xinetd gated
312 %triggerun sysv -- util-vserver-sysv < 0.30.198
313 for i in %v_services; do
314 %chkconfig --del v_$i || :
319 %chkconfig --add rebootmgr
320 %chkconfig --add vservers-legacy
322 for i in %v_services; do
323 %chkconfig --add v_$i
328 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
330 test "$1" != 0 || for i in %v_services; do
331 %chkconfig --del v_$i
334 test "$1" != 0 || %chkconfig --del rebootmgr
335 test "$1" != 0 || %chkconfig --del vservers-legacy
338 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
341 %files -f %name-base.list
342 %defattr(-,root,root,-)
343 %doc AUTHORS COPYING ChangeLog NEWS README THANKS
344 %doc doc/*.html doc/*.css
348 %dir %confdefaultdir/apps
349 %dir %confdefaultdir/files
350 %dir %pkglibdir/defaults
351 %ghost %confdefaultdir/cachebase
352 %ghost %confdefaultdir/vdirbase
353 %ghost %confdefaultdir/run.rev
355 %dir %_localstatedir/cache/vservers
356 %dir %_localstatedir/run/vservers
357 %dir %_localstatedir/run/vservers.rev
358 %dir %_localstatedir/run/vshelper
361 %files lib -f %name-lib.list
362 %files sysv -f %name-sysv.list
365 %files core -f %name-core.list
366 %defattr(-,root,root,-)
370 %files build -f %name-build.list
371 %defattr(-,root,root,-)
372 %doc contrib/yum*.patch
373 %dir %confdir/.distributions
374 %dir %confdir/.distributions/*
375 %dir %confdir/.distributions/*/apt
376 %dir %confdir/.distributions/.common
377 %dir %confdir/.distributions/.common/pubkeys
378 %dir %confdefaultdir/apps/vunify
379 %dir %confdefaultdir/apps/vunify/hash
382 %files legacy -f %name-legacy.list
383 %defattr(-,root,root,-)
384 %dir %pkglibdir/legacy
387 %files devel -f %name-devel.list
388 %defattr(-,root,root,-)
389 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
390 %{!?_without_doc:%doc lib/apidoc/html}
394 %defattr(-,root,root,-)
395 %{!?_without_python:%{python_sitearch}/*}
399 * Tue Jun 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-2
400 - remove tmpfs mounted /tmp from fstab template
402 * Tue May 11 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-1
404 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
406 - get rid of e2fsprogs requirement
408 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
409 - add --with legacy and --without doc switches
410 - add util-vserver initscript
412 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
413 - do not require 'xalan' anymore by default
414 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
415 - removed 'chattr' leftovers
416 - create the '/etc/vservers/.defaults/cachebase' symlink
417 - added /var/cache/vservers and the needed support
418 - set barrier attribute on /vservers/.pkg and /vservers/.hash
419 - added 'centos-release' to the list of packages in the copy-the-keys
421 - create '/vservers/.hash' and add initial configuration for it
423 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
427 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
430 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
432 - require the -lib subpackage by -devel
433 - copy GPG keys from /etc/pki/rpm-gpg/
435 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
436 - added patches to make yum work in chroot environments
439 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
440 - added some %%descriptions
441 - copy GPG keys from the system into the confdir
442 - buildrequire dietlibc-0.25
443 - BuildRequire beecrypt-devel
445 - use %%global instead of %%define
446 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
448 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
449 - updated BuildRequires:
450 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
451 - moved the v_* initscripts to legacy
452 - do not ship the /vservers directory itself; as it is immutable, the
453 extraction will fail else
455 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
456 - documented switches for 'rpmbuild'
458 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
459 - (re)added the MANIFEST_* variables which were lost some time ago;
460 this will preserve %%config files...
462 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
463 - use file-list for sysv scripts also
465 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
466 - added vprocunhide-service support
467 - added doxygen support
470 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0