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-pre2939
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
44 BuildRoot: %_tmppath/%name-%version-%release-root
46 Requires: %name-core = %version-%release
47 Requires: %name-lib = %version-%release
48 Requires: diffutils mktemp sed
49 Provides: vserver = %version-%release
50 Obsoletes: vserver < %version
51 BuildRequires: mount vconfig gawk /sbin/ip iptables
52 BuildRequires: gcc-c++ wget which diffutils
53 BuildRequires: e2fsprogs-devel e2fsprogs
54 %{!?_without_beecrypt:BuildRequires: beecrypt-devel}
55 %{?_without_beecrypt:BuildRequires: nss-devel}
56 BuildRequires: e2fsprogs
57 %{!?_without_doc:BuildRequires: doxygen tetex-latex}
58 %{!?_without_python:BuildRequires: python python-devel ctags}
59 Requires(post): %name-core
60 Requires(pre): %pkglibdir
61 Requires(postun): %pkglibdir
62 %{!?_without_dietlibc:BuildRequires: dietlibc >= 0:0.25}
63 %{?_with_xalan:BuildRequires: xalan-j}
66 Summary: Dynamic libraries for util-vserver
67 Group: System Environment/Libraries
70 Summary: The core-utilities for util-vserver
71 Group: Applications/System
75 Summary: Tools which can be used to build vservers
76 Group: Applications/System
77 Requires: rpm wget binutils tar
78 Requires: %name = %version-%release
79 Requires(pre): %confdir
80 Requires(postun): %confdir
81 Requires(post): %name-core
84 Summary: SysV-initscripts for vserver
85 Group: System Environment/Base
86 Provides: init(%name) = sysv
87 Requires: make diffutils
89 Requires: %name = %version-%release
90 Requires(post): %chkconfig
91 Requires(preun): %chkconfig
92 Requires(pre): %_initrddir %pkglibdir
93 requires(postun): %_initrddir %pkglibdir
96 Summary: Legacy utilities for util-vserver
97 Group: Applications/System
98 Requires: %name = %version-%release
99 Requires(post): %chkconfig
100 Requires(preun): %chkconfig
101 Requires(pre): %_initrddir %pkglibdir
102 requires(postun): %_initrddir %pkglibdir
105 Summary: Header-files and libraries needed to develop vserver based applications
106 Group: Development/Libraries
108 Requires: %name-lib = %version-%release
111 Summary: Python bindings to develop vserver-based applications
112 Group: Development/Libraries
113 Requires: %name-lib = %version-%release
117 util-vserver provides the components and a framework to setup virtual
118 servers. A virtual server runs inside a linux server. It is nevertheless
119 highly independent. As such, you can run various services with normal
120 configuration. The various vservers can't interact with each other and
121 can't interact with services in the main server.
123 This requires a special kernel supporting the new new_s_context and
124 set_ipv4root system call.
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 the shared libraries needed by all other
134 'util-vserver' subpackages.
137 util-vserver provides the components and a framework to setup virtual
138 servers. A virtual server runs inside a linux server. It is nevertheless
139 highly independent. As such, you can run various services with normal
140 configuration. The various vservers can't interact with each other and
141 can't interact with services in the main server.
143 This package contains utilities which are required to communicate with
144 the Linux-Vserver enabled kernel.
148 util-vserver provides the components and a framework to setup virtual
149 servers. A virtual server runs inside a linux server. It is nevertheless
150 highly independent. As such, you can run various services with normal
151 configuration. The various vservers can't interact with each other and
152 can't interact with services in the main server.
154 This package contains utilities which assist in building Vservers.
157 util-vserver provides the components and a framework to setup virtual
158 servers. A virtual server runs inside a linux server. It is nevertheless
159 highly independent. As such, you can run various services with normal
160 configuration. The various vservers can't interact with each other and
161 can't interact with services in the main server.
163 This package contains the SysV initscripts which start and stop
164 VServers and related tools.
168 util-vserver provides the components and a framework to setup virtual
169 servers. A virtual server runs inside a linux server. It is nevertheless
170 highly independent. As such, you can run various services with normal
171 configuration. The various vservers can't interact with each other and
172 can't interact with services in the main server.
174 This package contains the tools which are needed to work with VServers
175 having an old-style configuration.
179 util-vserver provides the components and a framework to setup virtual
180 servers. A virtual server runs inside a linux server. It is nevertheless
181 highly independent. As such, you can run various services with normal
182 configuration. The various vservers can't interact with each other and
183 can't interact with services in the main server.
185 This package contains header files and libraries which are needed to
186 develop VServer related applications.
189 util-vserver provides the components and a framework to setup virtual
190 servers. A virtual server runs inside a linux server. It is nevertheless
191 highly independent. As such, you can run various services with normal
192 configuration. The various vservers can't interact with each other and
193 can't interact with services in the main server.
195 This package contains the files needed to interface with the
196 Linux-VServer API from Python.
200 %setup -q -n %name-%fullver
207 %configure --with-initrddir=%_initrddir --enable-release \
208 %{?_without_dietlibc:--disable-dietlibc} \
209 %{?_with_legacy:--enable-apis=NOLEGACY} \
210 --with-initscripts=sysv \
211 %{?_without_python:--without-python}
213 %__make %{?_smp_mflags} all
214 %{!?_without_doc:%__make %{?_smp_mflags} doc}
218 rm -rf $RPM_BUILD_ROOT
219 %__make DESTDIR="$RPM_BUILD_ROOT" install install-distribution
221 rm -f $RPM_BUILD_ROOT/%_libdir/*.la
223 MANIFEST_CONFIG='%config' \
224 MANIFEST_CONFIG_NOREPLACE='%config(noreplace)' \
225 contrib/make-manifest %name $RPM_BUILD_ROOT contrib/manifest.dat
227 install -c -m 644 %{SOURCE1} %{buildroot}/%pkglibdir/defaults/fstab
228 install -c -m 644 %{SOURCE2} %{buildroot}/%pkglibdir/defaults/vprocunhide-files
235 rm -rf $RPM_BUILD_ROOT
239 test -d /vservers || mkdir -m0000 /vservers
240 test -d /vservers/.pkg || mkdir -m0755 /vservers/.pkg
242 f="%confdefaultdir/vdirbase"; test -L "$f" -o -e "$f" || ln -s /vservers "$f"
243 f="%confdefaultdir/run.rev"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/run/vservers.rev "$f"
244 f="%confdefaultdir/cachebase"; test -L "$f" -o -e "$f" || ln -s %_localstatedir/cache/vservers "$f"
246 %_sbindir/setattr --barrier /vservers /vservers/.pkg || :
250 test "$1" != 0 || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null || :
253 %post lib -p /sbin/ldconfig
254 %postun lib -p /sbin/ldconfig
258 %chkconfig --add vservers-default
259 %chkconfig --add vprocunhide
260 %chkconfig --add util-vserver
261 %chkconfig vprocunhide on
262 %chkconfig util-vserver on
265 test "$1" != 0 || %_initrddir/vprocunhide stop &>/dev/null || :
267 test "$1" != 0 || %chkconfig --del vprocunhide
268 test "$1" != 0 || %chkconfig --del vservers-default
269 test "$1" != 0 || %chkconfig --del util-vserver
273 test "$1" = 0 || %_initrddir/vprocunhide condrestart >/dev/null || :
276 %triggerin build -- fedora-release, centos-release
283 test -r "$i" || continue
285 target=%confdir/.distributions/.common/pubkeys/$base-$(basename "$i")
289 copy fedora /usr/share/doc/fedora-release-*/RPM-GPG-*
290 copy fedora /etc/pki/rpm-gpg/RPM-GPG-*
291 copy centos /usr/share/doc/centos-*/RPM-GPG-KEY-*
295 x="%_libdir/util-vserver/distributions/etch"
296 test -d "$x" && mv "$x" "$x.rpmsave" || :
300 test -d /vservers/.hash || mkdir -m0700 /vservers/.hash
302 f="%confdefaultdir/apps/vunify/hash"; test -e "$f"/method -o -e "$f"/00 || \
303 ln -s /vservers/.hash "$f"/00
305 %_sbindir/setattr --barrier /vservers/.hash || :
309 test "$1" != 0 || rm -f %confdir/.distributions/.common/pubkeys/fedora-*
312 ## Temporary workaround to remove old v_* files; it will conflict
313 ## somehow with the -legacy package but can be fixed by reinstalling
315 ## TODO: remove me in the final .spec file
316 %define v_services httpd named portmap sendmail smb sshd xinetd gated
317 %triggerun sysv -- util-vserver-sysv < 0.30.198
318 for i in %v_services; do
319 %chkconfig --del v_$i || :
324 %chkconfig --add rebootmgr
325 %chkconfig --add vservers-legacy
327 for i in %v_services; do
328 %chkconfig --add v_$i
333 test "$1" != 0 || %_initrddir/rebootmgr stop &>/dev/null || :
335 test "$1" != 0 || for i in %v_services; do
336 %chkconfig --del v_$i
339 test "$1" != 0 || %chkconfig --del rebootmgr
340 test "$1" != 0 || %chkconfig --del vservers-legacy
343 test "$1" = 0 || %_initrddir/rebootmgr condrestart >/dev/null || :
346 %files -f %name-base.list
347 %defattr(-,root,root,-)
348 %doc AUTHORS COPYING NEWS README THANKS
349 #%doc AUTHORS COPYING ChangeLog NEWS README THANKS
350 #%doc doc/*.html doc/*.css
354 %dir %confdefaultdir/apps
355 %dir %confdefaultdir/files
356 %dir %pkglibdir/defaults
357 %ghost %confdefaultdir/cachebase
358 %ghost %confdefaultdir/vdirbase
359 %ghost %confdefaultdir/run.rev
361 %dir %_localstatedir/cache/vservers
362 %dir %_localstatedir/run/vservers
363 %dir %_localstatedir/run/vservers.rev
364 %dir %_localstatedir/run/vshelper
367 %files lib -f %name-lib.list
368 %files sysv -f %name-sysv.list
371 %files core -f %name-core.list
372 %defattr(-,root,root,-)
376 %files build -f %name-build.list
377 %defattr(-,root,root,-)
378 %doc contrib/yum*.patch
379 %dir %confdir/.distributions
380 %dir %confdir/.distributions/*
381 %dir %confdir/.distributions/*/apt
382 %dir %confdir/.distributions/.common
383 %dir %confdir/.distributions/.common/pubkeys
384 %dir %confdefaultdir/apps/vunify
385 %dir %confdefaultdir/apps/vunify/hash
388 %files legacy -f %name-legacy.list
389 %defattr(-,root,root,-)
390 %dir %pkglibdir/legacy
393 %files devel -f %name-devel.list
394 %defattr(-,root,root,-)
395 %{!?_without_doc:%doc lib/apidoc/latex/refman.pdf}
396 %{!?_without_doc:%doc lib/apidoc/html}
400 %defattr(-,root,root,-)
401 %{!?_without_python:%{python_sitearch}/*}
405 * Thu Mar 10 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-0.30.216-15
406 - * Sync with upstream
407 - * Add SL6 as a supported distro
409 * Fri Feb 18 2011 Sapan Bhatia <sapanb@cs.princeton.edu> - util-vserver-0.30.216-14
410 - Retagging to make sure the tagging operation worked.
412 * Fri Feb 18 2011 Andy Bavier <acb@cs.princeton.edu> - util-vserver-0.30.216-13
413 - Add /proc/diskstats to vprocunhide-files
415 * Mon Jan 31 2011 Andy Bavier <acb@cs.princeton.edu> - util-vserver-0.30.216-12
416 - add files needed by CoMon to vprocunhide-files list
418 * Thu Jan 20 2011 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-11
419 - add a custom vprocunhide-files file which contains /proc/partitions
421 * Wed Dec 08 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-10
422 - Enable vprocunhide service
424 * Wed Dec 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-9
425 - Sync with upstream revision 2926
427 * Tue Nov 16 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-8
428 - Sync with upstream revision 2924
430 * Thu Aug 12 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-7
431 - Sync with upstream revision 2912
433 * Mon Aug 09 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-6
434 - Sync with upstream revision 2908
436 * Thu Jul 29 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-5
439 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-4
440 - Sync with upstream revision 2902
442 * Tue Jun 08 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-3
443 - Do not restart util-vserver service on upgrades
445 * Tue Jun 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-2
446 - remove tmpfs mounted /tmp from fstab template
448 * Tue May 11 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-0.30.216-1
450 * Mon Jun 25 2007 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.214-0
452 - get rid of e2fsprogs requirement
454 * Fri Dec 29 2006 Daniel Hokka Zakrisson <daniel@hozac.com> - 0.30.213-0
455 - add --with legacy and --without doc switches
456 - add util-vserver initscript
458 * Sun Jan 22 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.30.210-0
459 - do not require 'xalan' anymore by default
460 - removed 'Requires: apt'; apt-rpm is not maintained upstream anymore
461 - removed 'chattr' leftovers
462 - create the '/etc/vservers/.defaults/cachebase' symlink
463 - added /var/cache/vservers and the needed support
464 - set barrier attribute on /vservers/.pkg and /vservers/.hash
465 - added 'centos-release' to the list of packages in the copy-the-keys
467 - create '/vservers/.hash' and add initial configuration for it
469 * Sun Oct 30 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.209-0
473 * Sat Jul 16 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-2
476 * Fri Jul 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.208-1
478 - require the -lib subpackage by -devel
479 - copy GPG keys from /etc/pki/rpm-gpg/
481 * Fri Apr 15 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.206-1
482 - added patches to make yum work in chroot environments
485 * Thu Mar 24 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.205-0
486 - added some %%descriptions
487 - copy GPG keys from the system into the confdir
488 - buildrequire dietlibc-0.25
489 - BuildRequire beecrypt-devel
491 - use %%global instead of %%define
492 - removed 'run.rev' as a vserver-local variable and made it a system-wide setting
494 * Wed Jan 26 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.198-0.3
495 - updated BuildRequires:
496 - use 'setattr --barrier' instead of 'chattr +t' in the %%post scriptlet
497 - moved the v_* initscripts to legacy
498 - do not ship the /vservers directory itself; as it is immutable, the
499 extraction will fail else
501 * Thu Sep 9 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.30.194-0
502 - documented switches for 'rpmbuild'
504 * Wed May 26 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.215-0
505 - (re)added the MANIFEST_* variables which were lost some time ago;
506 this will preserve %%config files...
508 * Mon Mar 15 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.202-0
509 - use file-list for sysv scripts also
511 * Sat Mar 6 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.29.198-0
512 - added vprocunhide-service support
513 - added doxygen support
516 * Wed Oct 1 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0:0.23.5-0