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-pre2926
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
40 Source2: vprocunhide-files
41 BuildRoot: %_tmppath/%name-%version-%release-root
43 Requires: %name-core = %version-%release
44 Requires: %name-lib = %version-%release
45 Requires: diffutils mktemp sed
46 Provides: vserver = %version-%release
47 Obsoletes: vserver < %version
48 BuildRequires: mount vconfig gawk /sbin/ip iptables
49 BuildRequires: gcc-c++ wget which diffutils
50 BuildRequires: e2fsprogs-devel e2fsprogs
51 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
52 %{?_without_beecrypt:BuildRequires: nss-devel}
53 BuildRequires: e2fsprogs
54 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
55 %{!?_without_python:BuildRequires: python python-devel ctags}
56 Requires(post): %name-core
57 Requires(pre): %pkglibdir
58 Requires(postun): %pkglibdir
59 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
60 %{?_with_xalan:BuildRequires: xalan-j}
63 Summary: Dynamic libraries for util-vserver
64 Group: System Environment/Libraries
67 Summary: The core-utilities for util-vserver
68 Group: Applications/System
72 Summary: Tools which can be used to build vservers
73 Group: Applications/System
74 Requires: rpm wget binutils tar
75 Requires: %name = %version-%release
76 Requires(pre): %confdir
77 Requires(postun): %confdir
78 Requires(post): %name-core
81 Summary: SysV-initscripts for vserver
82 Group: System Environment/Base
83 Provides: init(%name) = sysv
84 Requires: make diffutils
86 Requires: %name = %version-%release
87 Requires(post): %chkconfig
88 Requires(preun): %chkconfig
89 Requires(pre): %_initrddir %pkglibdir
90 requires(postun): %_initrddir %pkglibdir
93 Summary: Legacy utilities for util-vserver
94 Group: Applications/System
95 Requires: %name = %version-%release
96 Requires(post): %chkconfig
97 Requires(preun): %chkconfig
98 Requires(pre): %_initrddir %pkglibdir
99 requires(postun): %_initrddir %pkglibdir
102 Summary: Header-files and libraries needed to develop vserver based applications
103 Group: Development/Libraries
105 Requires: %name-lib = %version-%release
108 Summary: Python bindings to develop vserver-based applications
109 Group: Development/Libraries
110 Requires: %name-lib = %version-%release
114 util-vserver provides the components and a framework to setup virtual
115 servers. A virtual server runs inside a linux server. It is nevertheless
116 highly independent. As such, you can run various services with normal
117 configuration. The various vservers can't interact with each other and
118 can't interact with services in the main server.
120 This requires a special kernel supporting the new new_s_context and
121 set_ipv4root system call.
124 util-vserver provides the components and a framework to setup virtual
125 servers. A virtual server runs inside a linux server. It is nevertheless
126 highly independent. As such, you can run various services with normal
127 configuration. The various vservers can't interact with each other and
128 can't interact with services in the main server.
130 This package contains the shared libraries needed by all other
131 'util-vserver' subpackages.
134 util-vserver provides the components and a framework to setup virtual
135 servers. A virtual server runs inside a linux server. It is nevertheless
136 highly independent. As such, you can run various services with normal
137 configuration. The various vservers can't interact with each other and
138 can't interact with services in the main server.
140 This package contains utilities which are required to communicate with
141 the Linux-Vserver enabled kernel.
145 util-vserver provides the components and a framework to setup virtual
146 servers. A virtual server runs inside a linux server. It is nevertheless
147 highly independent. As such, you can run various services with normal
148 configuration. The various vservers can't interact with each other and
149 can't interact with services in the main server.
151 This package contains utilities which assist in building Vservers.
154 util-vserver provides the components and a framework to setup virtual
155 servers. A virtual server runs inside a linux server. It is nevertheless
156 highly independent. As such, you can run various services with normal
157 configuration. The various vservers can't interact with each other and
158 can't interact with services in the main server.
160 This package contains the SysV initscripts which start and stop
161 VServers and related tools.
165 util-vserver provides the components and a framework to setup virtual
166 servers. A virtual server runs inside a linux server. It is nevertheless
167 highly independent. As such, you can run various services with normal
168 configuration. The various vservers can't interact with each other and
169 can't interact with services in the main server.
171 This package contains the tools which are needed to work with VServers
172 having an old-style configuration.
176 util-vserver provides the components and a framework to setup virtual
177 servers. A virtual server runs inside a linux server. It is nevertheless
178 highly independent. As such, you can run various services with normal
179 configuration. The various vservers can't interact with each other and
180 can't interact with services in the main server.
182 This package contains header files and libraries which are needed to
183 develop VServer related applications.
186 util-vserver provides the components and a framework to setup virtual
187 servers. A virtual server runs inside a linux server. It is nevertheless
188 highly independent. As such, you can run various services with normal
189 configuration. The various vservers can't interact with each other and
190 can't interact with services in the main server.
192 This package contains the files needed to interface with the
193 Linux-VServer API from Python.
197 %setup -q -n %name-%fullver
201 %configure --with-initrddir=%_initrddir --enable-release \
202 %{?_without_dietlibc:--disable-dietlibc} \
203 %{?_with_legacy:--enable-apis=NOLEGACY} \
204 --with-initscripts=sysv \
205 %{?_without_python:--without-python}
207 %__make %{?_smp_mflags} all
208 %{!?_without_doc:%__make %{?_smp_mflags} doc}
212 rm -rf $RPM_BUILD_ROOT
213 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
215 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
217 MANIFEST_CONFIG='%config' \
218 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
219 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
221 install -c -m 644 %{SOURCE1} %{buildroot}/%pkglibdir/defaults/fstab
222 install -c -m 644 %{SOURCE2} %{buildroot}/%pkglibdir/defaults/vprocunhide-files
229 rm -rf $RPM_BUILD_ROOT
233 test -d /vservers || mkdir -m0000 /vservers
234 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
236 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
237 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
238 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
240 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
244 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
247 %post lib -p /sbin/ldconfig
248 %postun lib -p /sbin/ldconfig
252 %chkconfig --add vservers-default
253 %chkconfig --add vprocunhide
254 %chkconfig --add util-vserver
255 %chkconfig vprocunhide on
256 %chkconfig util-vserver on
259 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
261 test "$1" != 0 || %chkconfig --del vprocunhide
262 test "$1" != 0 || %chkconfig --del vservers-default
263 test "$1" != 0 || %chkconfig --del util-vserver
267 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
270 %triggerin build -- fedora-release, centos-release
277 test -r "$i" || continue
279 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
283 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
284 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
285 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
289 x="%_libdir/util-vserver/distributions/etch"
290 test -d "$x" && mv "$x" "$x.rpmsave" || :
294 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
296 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
297 ln -s /vservers/.hash "$f"/00
299 %_sbindir/setattr --barrier /vservers/.hash || :
303 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
306 ## Temporary workaround to remove old v_* files; it will conflict
307 ## somehow with the -legacy package but can be fixed by reinstalling
309 ## TODO: remove me in the final .spec file
310 %define v_services httpd named portmap sendmail smb sshd xinetd gated
311 %triggerun sysv -- util-vserver-sysv < 0.30.198
312 for i in %v_services; do
313 %chkconfig --del v_$i || :
318 %chkconfig --add rebootmgr
319 %chkconfig --add vservers-legacy
321 for i in %v_services; do
322 %chkconfig --add v_$i
327 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
329 test "$1" != 0 || for i in %v_services; do
330 %chkconfig --del v_$i
333 test "$1" != 0 || %chkconfig --del rebootmgr
334 test "$1" != 0 || %chkconfig --del vservers-legacy
337 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
340 %files -f %name-base.list
341 %defattr(-,root,root,-)
342 %doc AUTHORS COPYING NEWS README THANKS
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 * Wed Dec 08 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-10
400 - Enable vprocunhide service
402 * Wed Dec 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-9
403 - Sync with upstream revision 2926
405 * Tue Nov 16 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-8
406 - Sync with upstream revision 2924
408 * Thu Aug 12 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-7
409 - Sync with upstream revision 2912
411 * Mon Aug 09 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-6
412 - Sync with upstream revision 2908
414 * Thu Jul 29 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-5
417 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-4
418 - Sync with upstream revision 2902
420 * Tue Jun 08 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-3
421 - Do not restart util-vserver service on upgrades
423 * Tue Jun 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-2
424 - remove tmpfs mounted /tmp from fstab template
426 * Tue May 11 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-1
428 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
430 - get rid of e2fsprogs requirement
432 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
433 - add --with legacy and --without doc switches
434 - add util-vserver initscript
436 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
437 - do not require 'xalan' anymore by default
438 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
439 - removed 'chattr' leftovers
440 - create the '/etc/vservers/.defaults/cachebase' symlink
441 - added /var/cache/vservers and the needed support
442 - set barrier attribute on /vservers/.pkg and /vservers/.hash
443 - added 'centos-release' to the list of packages in the copy-the-keys
445 - create '/vservers/.hash' and add initial configuration for it
447 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
451 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
454 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
456 - require the -lib subpackage by -devel
457 - copy GPG keys from /etc/pki/rpm-gpg/
459 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
460 - added patches to make yum work in chroot environments
463 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
464 - added some %%descriptions
465 - copy GPG keys from the system into the confdir
466 - buildrequire dietlibc-0.25
467 - BuildRequire beecrypt-devel
469 - use %%global instead of %%define
470 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
472 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
473 - updated BuildRequires:
474 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
475 - moved the v_* initscripts to legacy
476 - do not ship the /vservers directory itself; as it is immutable, the
477 extraction will fail else
479 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
480 - documented switches for 'rpmbuild'
482 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
483 - (re)added the MANIFEST_* variables which were lost some time ago;
484 this will preserve %%config files...
486 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
487 - use file-list for sysv scripts also
489 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
490 - added vprocunhide-service support
491 - added doxygen support
494 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0