3 %bcond_without dietlibc # don't use dietlibc (ask for troubles)
4 %bcond_without doc # don't build documentation which needed LaTeX
5 %bcond_with xalan # use the xalan xslt processor
7 Summary: Linux virtual server utilities
8 Summary(pl): Narzêdzia dla linuksowych serwerów wirtualnych
14 Source0: http://www.13thfloor.at/~ensc/util-vserver/files/alpha/%{name}-%{version}.tar.bz2
15 # Source0-md5: 1c8457a687643ae8a7b1f1d34ebbdd68
16 Source1: vprocunhide.init
17 Source2: vservers-default.init
18 Source3: vservers-legacy.init
19 Source4: rebootmgr.init
20 Source5: vservers-default.sysconfig
21 Source6: vservers-legacy.sysconfig
22 # A bit of documentation explaining package menagement
23 # http://www.paul.sladen.org/vserver/archives/200505/0078.html
24 Source7: util-vserver-pkgmgmt.txt
25 Patch0: %{name}-no-kernel-includes.patch
26 Patch1: %{name}-vsysvwrapper.patch
27 Patch2: %{name}-pld.patch
28 Patch3: %{name}-build-poldek.patch
29 Patch4: %{name}-include.patch
30 URL: http://savannah.nongnu.org/projects/util-vserver/
31 BuildRequires: autoconf
32 BuildRequires: automake >= 1.9
33 BuildRequires: beecrypt-devel
34 %{?with_dietlibc:BuildRequires: dietlibc-static >= 2:0.29}
35 BuildRequires: libstdc++-devel
36 BuildRequires: libtool >= 1.5.14
38 BuildRequires: doxygen
39 BuildRequires: graphviz
40 BuildRequires: libxslt-progs
41 BuildRequires: tetex-format-pdflatex
42 BuildRequires: tetex-makeindex
43 %{?with_xalan:BuildRequires: xalan-j}
46 Requires(post,preun): /sbin/chkconfig
47 Requires: %{name}-core = %{version}-%{release}
48 Requires: %{name}-lib = %{version}-%{release}
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 This package provides the components and a framework to setup virtual
53 servers. A virtual server runs inside a Linux server. It is
54 nevertheless highly independent. As such, you can run various services
55 with normal configuration. The various vservers can't interact with
56 each other and can't interact with services in the main server.
58 This requires a special kernel supporting the new new_s_context and
59 set_ipv4root system call.
62 Ten pakiet dostarcza sk³adniki i szkielet do tworzenia wirtualnych
63 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
64 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
65 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
66 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
68 Wymaga to specjalnego j±dra obs³uguj±cego nowe wywo³ania systemowe
69 new_s_context i set_ipv4root.
72 Summary: Development files for Linux vserver libraries
73 Summary(pl): Pliki programistyczne dla bibliotek linuksowego vserwera
74 Group: Development/Libraries
75 Requires: %{name}-lib = %{version}-%{release}
78 This package contains the development files necessary for developing
79 programs which use vserver library.
81 %description devel -l pl
82 Ten pakiet zawiera pliki programistyczne konieczne do rozwijania
83 programów u¿ywaj±cych biblioteki vserver.
86 Summary: Static vserver library
87 Summary(pl): Biblioteka statyczna vservera
88 Group: Development/Libraries
89 Requires: %{name}-devel = %{version}-%{release}
92 This package contains the static version of vserver library.
94 %description static -l pl
95 Ten pakiet zawiera statyczn± wersjê biblioteki vservera.
98 Summary: Dynamic libraries for util-vserver
99 Summary(pl): Biblioteki dynamiczne dla pakietu util-vserver
103 util-vserver provides the components and a framework to setup virtual
104 servers. A virtual server runs inside a linux server. It is
105 nevertheless highly independent. As such, you can run various services
106 with normal configuration. The various vservers can't interact with
107 each other and can't interact with services in the main server.
109 This package contains the shared libraries needed by all other
110 'util-vserver' subpackages.
112 %description lib -l pl
113 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
114 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
115 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
116 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
117 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
119 Ten pakiet zawiera biblioteki wspó³dzielone wymagane przez wszystkie
120 podpakiety util-vserver.
123 Summary: The core-utilities for util-vserver
124 Summary(pl): Podstawowe narzêdzia dla util-vserver
125 Group: Applications/System
127 Requires: %{name} = %{version}-%{release}
130 util-vserver provides the components and a framework to setup virtual
131 servers. A virtual server runs inside a linux server. It is
132 nevertheless highly independent. As such, you can run various services
133 with normal configuration. The various vservers can't interact with
134 each other and can't interact with services in the main server.
136 This package contains utilities which are required to communicate with
137 the Linux-Vserver enabled kernel.
139 %description core -l pl
140 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
141 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
142 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
143 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
144 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
146 Ten pakiet zawiera narzêdzia wymagane do komunikacji z j±drem z
147 w³±czonym mechanizmem Linux-Vserver.
150 Summary: Tools which can be used to build vservers
151 Summary(pl): Narzêdzia do budowania vserverów
152 Group: Applications/System
158 Conflicts: poldek < 0.18.8-10
159 Requires: %{name} = %{version}-%{release}
162 util-vserver provides the components and a framework to setup virtual
163 servers. A virtual server runs inside a linux server. It is
164 nevertheless highly independent. As such, you can run various services
165 with normal configuration. The various vservers can't interact with
166 each other and can't interact with services in the main server.
168 This package contains utilities which assist in building Vservers.
170 %description build -l pl
171 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
172 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
173 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
174 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
175 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
177 Ten pakiet zawiera narzêdzia pomagaj±ce przy budowaniu Vserwerów.
180 Summary: initscripts for vserver
181 Summary(pl): Skrypty inicjalizuj±ce dla vserwera
183 Requires(post,preun): /sbin/chkconfig
184 Requires: %{name} = %{version}-%{release}
185 Requires: %{name}-core = %{version}-%{release}
191 util-vserver provides the components and a framework to setup virtual
192 servers. A virtual server runs inside a linux server. It is
193 nevertheless highly independent. As such, you can run various services
194 with normal configuration. The various vservers can't interact with
195 each other and can't interact with services in the main server.
197 This package contains the SysV initscripts which start and stop
198 Vservers and related tools.
200 %description init -l pl
201 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
202 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
203 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
204 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
205 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
207 Ten pakiet zawiera skrypty inicjalizuj±ce SysV uruchamiaj±ce i
208 zatrzymuj±ce Vserwery oraz powi±zane narzêdzia.
211 Summary: Legacy utilities for util-vserver
212 Summary(pl): Stare narzêdzia dla util-vserver
213 Group: Applications/System
214 Requires(post,preun): /sbin/chkconfig
215 Requires: %{name} = %{version}-%{release}
216 Requires: %{name}-core = %{version}-%{release}
220 util-vserver provides the components and a framework to setup virtual
221 servers. A virtual server runs inside a linux server. It is
222 nevertheless highly independent. As such, you can run various services
223 with normal configuration. The various vservers can't interact with
224 each other and can't interact with services in the main server.
226 This package contains the tools which are needed to work with Vservers
227 having an old-style configuration.
229 %description legacy -l pl
230 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
231 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
232 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
233 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
234 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
236 Ten pakiet zawiera narzêdzia potrzebne do pracy z Vserwerami maj±cymi
237 konfiguracjê w starym stylu.
239 %package -n vserver-dev
240 Summary: /dev entries for systems in Vservers
241 Summary(pl): Pliki specjalne /dev/* dla systemów w Vserwerach
243 PreReq: setup >= 2.4.1-2
244 Provides: dev = 2.9.0-19
248 %description -n vserver-dev
249 Unix and unix like systems (including Linux) use file system entries
250 to represent devices attached to the machine. All of these entries are
251 in the /dev tree (though they don't have to be), and this package
252 contains only entries needed for a system running inside Vserver.
254 DO NOT install this package for a normal system!
256 %description -n vserver-dev -l pl
257 Wszystkie systemy klasy unices, w tym Linux, u¿ywaj± plików do
258 przedstawiania urz±dzeñ pod³±czonych do komputera. Wszystkie te pliki
259 znajduj± siê zwykle w katalogu /dev. Pakiet ten wy³±cznie te pliki
260 specjalne które s± potrzebne do uruchomienia systemu w Vserwerze.
262 NIE INSTALUJ tego pakietu na zwyk³ym systemie!
272 install %{SOURCE7} package-menagament.txt
274 cp -a compat.h vserver-compat.h
280 --with-initrddir=/etc/rc.d/init.d \
282 %{?with_dietlibc:--enable-dietlibc} \
283 %{!?with_dietlibc:--disable-dietlibc} \
289 IPTABLES=/usr/sbin/iptables \
290 MODPROBE=/sbin/modprobe \
291 NAMEIF=/sbin/nameif \
293 VCONFIG=/sbin/vconfig \
297 %{?with_doc:%{__make} doc}
300 rm -rf $RPM_BUILD_ROOT
301 install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d},/dev/pts}
303 %{__make} install install-distribution \
304 DESTDIR=$RPM_BUILD_ROOT
306 install vserver-compat.h $RPM_BUILD_ROOT%{_includedir}/
308 chmod -R +rX $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/*
310 install -d $RPM_BUILD_ROOT/etc/vservices
311 install -d $RPM_BUILD_ROOT/vservers/.pkg
312 ln -s /vservers $RPM_BUILD_ROOT%{_sysconfdir}/vservers/vdirbase
313 ln -s %{_localstatedir}/run/vservers.rev $RPM_BUILD_ROOT%{_sysconfdir}/vservers/run.rev
315 for i in $RPM_BUILD_ROOT/etc/rc.d/init.d/v_* ; do
316 s=`basename $i | sed s/v_//`
317 cat >$RPM_BUILD_ROOT/etc/vservices/$s << EOF
318 # IP addresses/interfaces to bound $s service to
324 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vprocunhide
325 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-default
326 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-legacy
327 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rebootmgr
328 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/vservers-default
329 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/vservers-legacy
331 ln -sf /dev/null $RPM_BUILD_ROOT/dev/initctl
334 rm -rf $RPM_BUILD_ROOT
337 %{_sbindir}/setattr --barrier /vservers || :
339 %post lib -p /sbin/ldconfig
340 %postun lib -p /sbin/ldconfig
343 /sbin/chkconfig --add vservers-default
344 /sbin/chkconfig --add vprocunhide
345 #if [ -r /var/lock/subsys/vprocunhide ]; then
346 # /etc/rc.d/init.d/vprocunhide restart >&2
348 #if [ -r /var/lock/subsys/vservers-default ]; then
349 # /etc/rc.d/init.d/vservers-default restart >&2
353 if [ "$1" = "0" ]; then
354 if [ -r /var/lock/subsys/vprocunhide ]; then
355 /etc/rc.d/init.d/vprocunhide stop >&2
357 if [ -r /var/lock/subsys/vservers-default ]; then
358 /etc/rc.d/init.d/vservers-default stop >&2
360 /sbin/chkconfig --del vprocunhide
361 /sbin/chkconfig --del vservers-default
365 /sbin/chkconfig --add rebootmgr
366 /sbin/chkconfig --add vservers-legacy
367 #if [ -r /var/lock/subsys/rebootmgr ] ; then
368 # /etc/rc.d/init.d/rebootmgr restart >&2
370 #if [ -r /var/lock/subsys/vservers-legacy ] ; then
371 # /etc/rc.d/init.d/vservers-legacy restart >&2
375 if [ "$1" = "0" ]; then
376 if [ -r /var/lock/subsys/rebootmgr ] ; then
377 /etc/rc.d/init.d/rebootmgr stop >&2
379 if [ -r /var/lock/subsys/vservers-legacy ] ; then
380 /etc/rc.d/init.d/vservers-legacy stop >&2
382 /sbin/chkconfig --del rebootmgr
383 /sbin/chkconfig --del vservers-legacy
387 %defattr(644,root,root,755)
388 %doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt
389 %{?with_doc:%doc doc/*.html}
390 %dir %{_sysconfdir}/vservers
391 %dir %{_sysconfdir}/vservers/.defaults
392 %dir %{_sysconfdir}/vservers/.defaults/apps
393 %dir %{_sysconfdir}/vservers/.defaults/files
394 %{_sysconfdir}/vservers/.defaults/vdirbase
395 %{_sysconfdir}/vservers/.defaults/run.rev
396 %{_sysconfdir}/vservers/vdirbase
397 %{_sysconfdir}/vservers/run.rev
399 %attr(755,root,root) %{_sbindir}/exec-cd
400 %attr(755,root,root) %{_sbindir}/vdu
401 %attr(755,root,root) %{_sbindir}/vps
402 %attr(755,root,root) %{_sbindir}/vpstree
403 %attr(755,root,root) %{_sbindir}/vserver
404 %attr(755,root,root) %{_sbindir}/vserver-stat
405 %attr(755,root,root) %{_sbindir}/vsomething
406 %attr(755,root,root) %{_sbindir}/vtop
407 %dir %{_libdir}/%{name}
408 %dir %{_libdir}/%{name}/defaults
409 %{_libdir}/%{name}/defaults/*
410 %attr(755,root,root) %{_libdir}/%{name}/capchroot
411 %attr(755,root,root) %{_libdir}/%{name}/chain-echo
412 %attr(755,root,root) %{_libdir}/%{name}/check-unixfile
413 %attr(755,root,root) %{_libdir}/%{name}/chroot-*
414 %attr(755,root,root) %{_libdir}/%{name}/exec-ulimit
415 %attr(755,root,root) %{_libdir}/%{name}/fakerunlevel
416 %attr(755,root,root) %{_libdir}/%{name}/filetime
417 %{_libdir}/%{name}/functions
418 %attr(755,root,root) %{_libdir}/%{name}/keep-ctx-alive
419 %attr(755,root,root) %{_libdir}/%{name}/lockfile
420 %attr(755,root,root) %{_libdir}/%{name}/mask2prefix
421 %attr(755,root,root) %{_libdir}/%{name}/readlink
422 %attr(755,root,root) %{_libdir}/%{name}/save_ctxinfo
423 %attr(755,root,root) %{_libdir}/%{name}/secure-mount
424 %attr(755,root,root) %{_libdir}/%{name}/sigexec
425 %attr(755,root,root) %{_libdir}/%{name}/start-vservers
426 %attr(755,root,root) %{_libdir}/%{name}/vprocunhide
427 %{_libdir}/%{name}/vserver.*
428 %attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh
429 %attr(755,root,root) %{_libdir}/%{name}/vshelper
430 %attr(755,root,root) %{_libdir}/%{name}/vshelper-sync
432 %attr(0,root,root) %dir /vservers
433 %attr(755,root,root) %dir /vservers/.pkg
434 %dir %{_localstatedir}/run/vservers
435 %dir %{_localstatedir}/run/vservers.rev
436 %dir %{_localstatedir}/run/vshelper
439 %defattr(644,root,root,755)
440 %{?with_doc:%doc lib/apidoc/latex/refman.pdf lib/apidoc/html}
441 %attr(755,root,root) %{_libdir}/lib*.so
443 %{_includedir}/vserver*.h
444 %{_pkgconfigdir}/*.pc
447 %defattr(644,root,root,755)
448 %{_libdir}/libvserver.a
451 %defattr(644,root,root,755)
452 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
455 %defattr(644,root,root,755)
456 %attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper
457 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-default
458 %attr(754,root,root) /etc/rc.d/init.d/vprocunhide
459 %attr(754,root,root) /etc/rc.d/init.d/vservers-default
462 %defattr(644,root,root,755)
463 %dir %{_libdir}/%{name}
464 %{_libdir}/%{name}/FEATURES.txt
465 %{_libdir}/%{name}/util-vserver-vars
466 %attr(755,root,root) %{_libdir}/%{name}/chcontext-compat
467 %attr(755,root,root) %{_sbindir}/chbind
468 %attr(755,root,root) %{_sbindir}/chcontext
469 %attr(755,root,root) %{_sbindir}/chxid
470 %attr(755,root,root) %{_sbindir}/lsxid
471 %attr(755,root,root) %{_sbindir}/reducecap
472 %attr(755,root,root) %{_sbindir}/setattr
473 %attr(755,root,root) %{_sbindir}/showattr
474 %attr(755,root,root) %{_sbindir}/vattribute
475 %attr(755,root,root) %{_sbindir}/vcontext
476 %attr(755,root,root) %{_sbindir}/vdlimit
477 %attr(755,root,root) %{_sbindir}/vnamespace
478 %attr(755,root,root) %{_sbindir}/vkill
479 %attr(755,root,root) %{_sbindir}/vlimit
480 %attr(755,root,root) %{_sbindir}/vrsetup
481 %attr(755,root,root) %{_sbindir}/vsched
482 %attr(755,root,root) %{_sbindir}/vserver-info
483 %attr(755,root,root) %{_sbindir}/vuname
484 %{_mandir}/man8/chbind*
485 %{_mandir}/man8/chcontext*
486 %{_mandir}/man8/reducecap*
489 %defattr(644,root,root,755)
490 %doc contrib/yum*.patch package-menagament.txt
491 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify
492 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify/hash
493 %dir %{_sysconfdir}/vservers/.distributions
494 %dir %{_sysconfdir}/vservers/.distributions/.common
495 %dir %{_sysconfdir}/vservers/.distributions/.common/pubkeys
496 %dir %{_sysconfdir}/vservers/.distributions/[frs]*
497 %dir %{_sysconfdir}/vservers/.distributions/[frs]*/apt
498 %dir %{_sysconfdir}/vservers/.distributions/pld2.0
499 %dir %{_sysconfdir}/vservers/.distributions/pld2.0/poldek
500 %{_sysconfdir}/vservers/.distributions/pld1.99
501 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/[frs]*/apt/sources.list
502 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/pld2.0/poldek/poldek.conf
503 %attr(755,root,root) %{_libdir}/%{name}/rpm-fake*
504 %dir %{_libdir}/%{name}/distributions
505 %attr(-, root, root) %{_libdir}/%{name}/distributions/*
506 %{_libdir}/%{name}/vserver-build.*
507 %{_libdir}/%{name}/vserver-setup.functions
508 %{_libdir}/%{name}/defaults/fstab
509 %{_libdir}/%{name}/defaults/debootstrap.uri
510 %{_libdir}/%{name}/defaults/vunify-exclude
511 %attr(755,root,root) %{_libdir}/%{name}/pkgmgmt
512 %attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker
513 %attr(755,root,root) %{_libdir}/%{name}/vbuild
514 %attr(755,root,root) %{_libdir}/%{name}/vcheck
515 %attr(755,root,root) %{_libdir}/%{name}/vcopy
516 %attr(755,root,root) %{_libdir}/%{name}/vhashify
517 %attr(755,root,root) %{_libdir}/%{name}/vpkg
518 %attr(755,root,root) %{_libdir}/%{name}/vpoldek-worker
519 %attr(755,root,root) %{_libdir}/%{name}/vrpm-*
520 %attr(755,root,root) %{_libdir}/%{name}/vserver-build
521 %attr(755,root,root) %{_libdir}/%{name}/vunify
522 %attr(755,root,root) %{_libdir}/%{name}/vyum-worker
523 %attr(755,root,root) %{_sbindir}/vapt-get
524 %attr(755,root,root) %{_sbindir}/vfiles
525 %attr(755,root,root) %{_sbindir}/vpoldek
526 %attr(755,root,root) %{_sbindir}/vrpm
527 %attr(755,root,root) %{_sbindir}/vyum
528 %{_mandir}/man8/vserver-copy*
531 %defattr(644,root,root,755)
534 %dir %{_libdir}/%{name}/legacy
535 %attr(755,root,root) %{_libdir}/%{name}/legacy/*
536 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-legacy
537 %attr(754,root,root) /etc/rc.d/init.d/v_*
538 %attr(754,root,root) /etc/rc.d/init.d/rebootmgr
539 %attr(754,root,root) /etc/rc.d/init.d/vservers-legacy
540 %attr(755,root,root) %{_sbindir}/vserver-copy
541 %{_mandir}/man8/distrib-info*
542 %{_mandir}/man8/rebootmgr*
543 %{_mandir}/man8/vps.*
545 %files -n vserver-dev
546 %defattr(644,root,root,755)
548 %dev(c,1,7) %attr(666,root,root) /dev/full
549 %dev(c,1,3) %attr(666,root,root) /dev/null
550 %dev(c,5,2) %attr(666,root,root) /dev/ptmx
551 %dev(c,1,8) %attr(644,root,root) /dev/random
552 %dev(c,5,0) %attr(666,root,root) /dev/tty
553 %dev(c,1,9) %attr(644,root,root) /dev/urandom
554 %dev(c,1,5) %attr(666,root,root) /dev/zero