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-pre2912
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
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
224 install -c -m 755 %{SOURCE1} %{buildroot}/%pkglibdir/defaults/fstab
231 rm -rf $RPM_BUILD_ROOT
235 test -d /vservers || mkdir -m0000 /vservers
236 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
238 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
239 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
240 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
242 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
246 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
249 %post lib -p /sbin/ldconfig
250 %postun lib -p /sbin/ldconfig
254 %chkconfig --add vservers-default
255 %chkconfig --add vprocunhide
256 %chkconfig --add util-vserver
257 %chkconfig util-vserver on
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 NEWS README THANKS
344 #%doc AUTHORS COPYING ChangeLog NEWS README THANKS
345 #%doc doc/*.html doc/*.css
349 %dir %confdefaultdir/apps
350 %dir %confdefaultdir/files
351 %dir %pkglibdir/defaults
352 %ghost %confdefaultdir/cachebase
353 %ghost %confdefaultdir/vdirbase
354 %ghost %confdefaultdir/run.rev
356 %dir %_localstatedir/cache/vservers
357 %dir %_localstatedir/run/vservers
358 %dir %_localstatedir/run/vservers.rev
359 %dir %_localstatedir/run/vshelper
362 %files lib -f %name-lib.list
363 %files sysv -f %name-sysv.list
366 %files core -f %name-core.list
367 %defattr(-,root,root,-)
371 %files build -f %name-build.list
372 %defattr(-,root,root,-)
373 %doc contrib/yum*.patch
374 %dir %confdir/.distributions
375 %dir %confdir/.distributions/*
376 %dir %confdir/.distributions/*/apt
377 %dir %confdir/.distributions/.common
378 %dir %confdir/.distributions/.common/pubkeys
379 %dir %confdefaultdir/apps/vunify
380 %dir %confdefaultdir/apps/vunify/hash
383 %files legacy -f %name-legacy.list
384 %defattr(-,root,root,-)
385 %dir %pkglibdir/legacy
388 %files devel -f %name-devel.list
389 %defattr(-,root,root,-)
390 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
391 %{!?_without_doc:%doc lib/apidoc/html}
395 %defattr(-,root,root,-)
396 %{!?_without_python:%{python_sitearch}/*}
400 * Mon Aug 09 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-6
401 - Sync with upstream revision 2908
403 * Thu Jul 29 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-5
406 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-4
407 - Sync with upstream revision 2902
409 * Tue Jun 08 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-3
410 - Do not restart util-vserver service on upgrades
412 * Tue Jun 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-2
413 - remove tmpfs mounted /tmp from fstab template
415 * Tue May 11 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-1
417 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
419 - get rid of e2fsprogs requirement
421 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
422 - add --with legacy and --without doc switches
423 - add util-vserver initscript
425 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
426 - do not require 'xalan' anymore by default
427 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
428 - removed 'chattr' leftovers
429 - create the '/etc/vservers/.defaults/cachebase' symlink
430 - added /var/cache/vservers and the needed support
431 - set barrier attribute on /vservers/.pkg and /vservers/.hash
432 - added 'centos-release' to the list of packages in the copy-the-keys
434 - create '/vservers/.hash' and add initial configuration for it
436 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
440 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
443 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
445 - require the -lib subpackage by -devel
446 - copy GPG keys from /etc/pki/rpm-gpg/
448 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
449 - added patches to make yum work in chroot environments
452 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
453 - added some %%descriptions
454 - copy GPG keys from the system into the confdir
455 - buildrequire dietlibc-0.25
456 - BuildRequire beecrypt-devel
458 - use %%global instead of %%define
459 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
461 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
462 - updated BuildRequires:
463 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
464 - moved the v_* initscripts to legacy
465 - do not ship the /vservers directory itself; as it is immutable, the
466 extraction will fail else
468 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
469 - documented switches for 'rpmbuild'
471 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
472 - (re)added the MANIFEST_* variables which were lost some time ago;
473 this will preserve %%config files...
475 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
476 - use file-list for sysv scripts also
478 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
479 - added vprocunhide-service support
480 - added doxygen support
483 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0