3 %bcond_with dietlibc # use dietlibc instead of glibc
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 URL: http://savannah.nongnu.org/projects/util-vserver/
30 BuildRequires: automake >= 1.9
31 BuildRequires: beecrypt-devel
32 %{?with_dietlibc:BuildRequires: dietlibc >= 0:0.25}
33 BuildRequires: doxygen
34 BuildRequires: libstdc++-devel
36 BuildRequires: libxslt-progs
37 BuildRequires: tetex-format-pdflatex
38 BuildRequires: tetex-makeindex
39 %{?with_xalan:BuildRequires: xalan-j}
42 Requires(post,preun): /sbin/chkconfig
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 This package provides the components and a framework to setup virtual
47 servers. A virtual server runs inside a Linux server. It is
48 nevertheless highly independent. As such, you can run various services
49 with normal configuration. The various vservers can't interact with
50 each other and can't interact with services in the main server.
52 This requires a special kernel supporting the new new_s_context and
53 set_ipv4root system call.
56 Ten pakiet dostarcza sk³adniki i szkielet do tworzenia wirtualnych
57 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
58 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
59 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
60 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
62 Wymaga to specjalnego j±dra obs³uguj±cego nowe wywo³ania systemowe
63 new_s_context i set_ipv4root.
66 Summary: Development files for Linux vserver libraries
67 Summary(pl): Pliki programistyczne dla bibliotek linuksowego vserwera
68 Group: Development/Libraries
69 Requires: %{name} = %{version}-%{release}
72 This package contains the development files necessary for developing
73 programs which use vserver library.
75 %description devel -l pl
76 Ten pakiet zawiera pliki programistyczne konieczne do rozwijania
77 programów u¿ywaj±cych biblioteki vserver.
80 Summary: Static vserver library
81 Summary(pl): Biblioteka statyczna vservera
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{version}-%{release}
86 This package contains the static version of vserver library.
88 %description static -l pl
89 Ten pakiet zawiera statyczn± wersjê biblioteki vservera.
92 Summary: Dynamic libraries for util-vserver
93 Summary(pl): Biblioteki dynamiczne dla pakietu util-vserver
97 util-vserver provides the components and a framework to setup virtual
98 servers. A virtual server runs inside a linux server. It is
99 nevertheless highly independent. As such, you can run various services
100 with normal configuration. The various vservers can't interact with
101 each other and can't interact with services in the main server.
103 This package contains the shared libraries needed by all other
104 'util-vserver' subpackages.
106 %description lib -l pl
107 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
108 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
109 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
110 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
111 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
113 Ten pakiet zawiera biblioteki wspó³dzielone wymagane przez wszystkie
114 podpakiety util-vserver.
117 Summary: The core-utilities for util-vserver
118 Summary(pl): Podstawowe narzêdzia dla util-vserver
119 Group: Applications/System
123 util-vserver provides the components and a framework to setup virtual
124 servers. A virtual server runs inside a linux server. It is
125 nevertheless highly independent. As such, you can run various services
126 with normal configuration. The various vservers can't interact with
127 each other and can't interact with services in the main server.
129 This package contains utilities which are required to communicate with
130 the Linux-Vserver enabled kernel.
132 %description core -l pl
133 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
134 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
135 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
136 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
137 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
139 Ten pakiet zawiera narzêdzia wymagane do komunikacji z j±drem z
140 w³±czonym mechanizmem Linux-Vserver.
143 Summary: Tools which can be used to build vservers
144 Summary(pl): Narzêdzia do budowania vserverów
145 Group: Applications/System
151 Requires: %{name} = %{version}-%{release}
154 util-vserver provides the components and a framework to setup virtual
155 servers. A virtual server runs inside a linux server. It is
156 nevertheless highly independent. As such, you can run various services
157 with normal configuration. The various vservers can't interact with
158 each other and can't interact with services in the main server.
160 This package contains utilities which assist in building Vservers.
162 %description build -l pl
163 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
164 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
165 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
166 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
167 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
169 Ten pakiet zawiera narzêdzia pomagaj±ce przy budowaniu Vserwerów.
172 Summary: initscripts for vserver
173 Summary(pl): Skrypty inicjalizuj±ce dla vserwera
175 Requires(post,preun): /sbin/chkconfig
176 Requires: %{name} = %{version}-%{release}
177 Requires: %{name}-core = %{version}-%{release}
183 util-vserver provides the components and a framework to setup virtual
184 servers. A virtual server runs inside a linux server. It is
185 nevertheless highly independent. As such, you can run various services
186 with normal configuration. The various vservers can't interact with
187 each other and can't interact with services in the main server.
189 This package contains the SysV initscripts which start and stop
190 Vservers and related tools.
192 %description init -l pl
193 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
194 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
195 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
196 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
197 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
199 Ten pakiet zawiera skrypty inicjalizuj±ce SysV uruchamiaj±ce i
200 zatrzymuj±ce Vserwery oraz powi±zane narzêdzia.
203 Summary: Legacy utilities for util-vserver
204 Summary(pl): Stare narzêdzia dla util-vserver
205 Group: Applications/System
206 Requires(post,preun): /sbin/chkconfig
207 Requires: %{name} = %{version}-%{release}
208 Requires: %{name}-core = %{version}-%{release}
212 util-vserver provides the components and a framework to setup virtual
213 servers. A virtual server runs inside a linux server. It is
214 nevertheless highly independent. As such, you can run various services
215 with normal configuration. The various vservers can't interact with
216 each other and can't interact with services in the main server.
218 This package contains the tools which are needed to work with Vservers
219 having an old-style configuration.
221 %description legacy -l pl
222 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
223 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
224 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
225 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
226 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
228 Ten pakiet zawiera narzêdzia potrzebne do pracy z Vserwerami maj±cymi
229 konfiguracjê w starym stylu.
231 %package -n vserver-dev
232 Summary: /dev entries for systems in Vservers
233 Summary(pl): Pliki specjalne /dev/* dla systemów w Vserwerach
235 PreReq: setup >= 2.4.1-2
236 Provides: dev = 2.9.0-19
240 %description -n vserver-dev
241 Unix and unix like systems (including Linux) use file system entries
242 to represent devices attached to the machine. All of these entries are
243 in the /dev tree (though they don't have to be), and this package
244 contains only entries needed for a system running inside Vserver.
246 DO NOT install this package for a normal system!
248 %description -n vserver-dev -l pl
249 Wszystkie systemy klasy unices, w tym Linux, u¿ywaj± plików do
250 przedstawiania urz±dzeñ pod³±czonych do komputera. Wszystkie te pliki
251 znajduj± siê zwykle w katalogu /dev. Pakiet ten wy³±cznie te pliki
252 specjalne które s± potrzebne do uruchomienia systemu w Vserwerze.
254 NIE INSTALUJ tego pakietu na zwyk³ym systemie!
263 install %{SOURCE7} package-menagament.txt
269 --with-initrddir=/etc/rc.d/init.d \
271 %{?with_dietlibc:--enable-dietlibc} \
272 %{!?with_dietlibc:--disable-dietlibc} \
277 IPTABLES=/usr/sbin/iptables \
278 MODPROBE=/sbin/modprobe \
279 NAMEIF=/sbin/nameif \
281 VCONFIG=/sbin/vconfig \
285 %{?with_doc:%{__make} doc}
288 rm -rf $RPM_BUILD_ROOT
289 install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d},/dev/pts}
291 %{__make} install install-distribution \
292 DESTDIR=$RPM_BUILD_ROOT
294 chmod -R +rX $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/*
296 install -d $RPM_BUILD_ROOT/etc/vservices
297 install -d $RPM_BUILD_ROOT/vservers/.pkg
298 ln -s /vservers $RPM_BUILD_ROOT%{_sysconfdir}/vservers/vdirbase
299 ln -s %{_localstatedir}/run/vservers.rev $RPM_BUILD_ROOT%{_sysconfdir}/vservers/run.rev
301 for i in $RPM_BUILD_ROOT/etc/rc.d/init.d/v_* ; do
302 s=`basename $i | sed s/v_//`
303 cat >$RPM_BUILD_ROOT/etc/vservices/$s << EOF
304 # IP addresses/interfaces to bound $s service to
310 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vprocunhide
311 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-default
312 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-legacy
313 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rebootmgr
314 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/vservers-default
315 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/vservers-legacy
317 ln -sf /dev/null $RPM_BUILD_ROOT/dev/initctl
320 rm -rf $RPM_BUILD_ROOT
323 %{_sbindir}/setattr --barrier /vservers || :
325 %post lib -p /sbin/ldconfig
326 %postun lib -p /sbin/ldconfig
329 /sbin/chkconfig --add vservers-default
330 /sbin/chkconfig --add vprocunhide
331 #if [ -r /var/lock/subsys/vprocunhide ]; then
332 # /etc/rc.d/init.d/vprocunhide restart >&2
334 #if [ -r /var/lock/subsys/vservers-default ]; then
335 # /etc/rc.d/init.d/vservers-default restart >&2
339 if [ "$1" = "0" ]; then
340 if [ -r /var/lock/subsys/vprocunhide ]; then
341 /etc/rc.d/init.d/vprocunhide stop >&2
343 if [ -r /var/lock/subsys/vservers-default ]; then
344 /etc/rc.d/init.d/vservers-default stop >&2
346 /sbin/chkconfig --del vprocunhide
347 /sbin/chkconfig --del vservers-default
351 /sbin/chkconfig --add rebootmgr
352 /sbin/chkconfig --add vservers-legacy
353 #if [ -r /var/lock/subsys/rebootmgr ] ; then
354 # /etc/rc.d/init.d/rebootmgr restart >&2
356 #if [ -r /var/lock/subsys/vservers-legacy ] ; then
357 # /etc/rc.d/init.d/vservers-legacy restart >&2
361 if [ "$1" = "0" ]; then
362 if [ -r /var/lock/subsys/rebootmgr ] ; then
363 /etc/rc.d/init.d/rebootmgr stop >&2
365 if [ -r /var/lock/subsys/vservers-legacy ] ; then
366 /etc/rc.d/init.d/vservers-legacy stop >&2
368 /sbin/chkconfig --del rebootmgr
369 /sbin/chkconfig --del vservers-legacy
373 %defattr(644,root,root,755)
374 %doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt
375 %{?with_doc:%doc doc/*.html}
376 %dir %{_sysconfdir}/vservers
377 %dir %{_sysconfdir}/vservers/.defaults
378 %dir %{_sysconfdir}/vservers/.defaults/apps
379 %dir %{_sysconfdir}/vservers/.defaults/files
380 %{_sysconfdir}/vservers/.defaults/vdirbase
381 %{_sysconfdir}/vservers/.defaults/run.rev
382 %{_sysconfdir}/vservers/vdirbase
383 %{_sysconfdir}/vservers/run.rev
385 %attr(755,root,root) %{_sbindir}/exec-cd
386 %attr(755,root,root) %{_sbindir}/vdu
387 %attr(755,root,root) %{_sbindir}/vps
388 %attr(755,root,root) %{_sbindir}/vpstree
389 %attr(755,root,root) %{_sbindir}/vserver
390 %attr(755,root,root) %{_sbindir}/vserver-stat
391 %attr(755,root,root) %{_sbindir}/vsomething
392 %attr(755,root,root) %{_sbindir}/vtop
393 %dir %{_libdir}/%{name}
394 %dir %{_libdir}/%{name}/defaults
395 %{_libdir}/%{name}/defaults/*
396 %attr(755,root,root) %{_libdir}/%{name}/capchroot
397 %attr(755,root,root) %{_libdir}/%{name}/chain-echo
398 %attr(755,root,root) %{_libdir}/%{name}/check-unixfile
399 %attr(755,root,root) %{_libdir}/%{name}/chroot-*
400 %attr(755,root,root) %{_libdir}/%{name}/exec-ulimit
401 %attr(755,root,root) %{_libdir}/%{name}/fakerunlevel
402 %attr(755,root,root) %{_libdir}/%{name}/filetime
403 %{_libdir}/%{name}/functions
404 %attr(755,root,root) %{_libdir}/%{name}/keep-ctx-alive
405 %attr(755,root,root) %{_libdir}/%{name}/lockfile
406 %attr(755,root,root) %{_libdir}/%{name}/mask2prefix
407 %attr(755,root,root) %{_libdir}/%{name}/readlink
408 %attr(755,root,root) %{_libdir}/%{name}/save_ctxinfo
409 %attr(755,root,root) %{_libdir}/%{name}/secure-mount
410 %attr(755,root,root) %{_libdir}/%{name}/sigexec
411 %attr(755,root,root) %{_libdir}/%{name}/start-vservers
412 %attr(755,root,root) %{_libdir}/%{name}/vprocunhide
413 %{_libdir}/%{name}/vserver.*
414 %attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh
415 %attr(755,root,root) %{_libdir}/%{name}/vshelper
416 %attr(755,root,root) %{_libdir}/%{name}/vshelper-sync
418 %attr(0,root,root) %dir /vservers
419 %attr(755,root,root) %dir /vservers/.pkg
420 %dir %{_localstatedir}/run/vservers
421 %dir %{_localstatedir}/run/vservers.rev
422 %dir %{_localstatedir}/run/vshelper
425 %defattr(644,root,root,755)
426 %{?with_doc:%doc lib/apidoc/latex/refman.pdf lib/apidoc/html}
427 %attr(755,root,root) %{_libdir}/lib*.so
429 %{_includedir}/vserver.h
430 %{_pkgconfigdir}/*.pc
433 %defattr(644,root,root,755)
434 %{_libdir}/libvserver.a
437 %defattr(644,root,root,755)
438 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper
443 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-default
444 %attr(754,root,root) /etc/rc.d/init.d/vprocunhide
445 %attr(754,root,root) /etc/rc.d/init.d/vservers-default
448 %defattr(644,root,root,755)
449 %dir %{_libdir}/%{name}
450 %{_libdir}/%{name}/FEATURES.txt
451 %{_libdir}/%{name}/util-vserver-vars
452 %attr(755,root,root) %{_libdir}/%{name}/chcontext-compat
453 %attr(755,root,root) %{_sbindir}/chbind
454 %attr(755,root,root) %{_sbindir}/chcontext
455 %attr(755,root,root) %{_sbindir}/chxid
456 %attr(755,root,root) %{_sbindir}/lsxid
457 %attr(755,root,root) %{_sbindir}/reducecap
458 %attr(755,root,root) %{_sbindir}/setattr
459 %attr(755,root,root) %{_sbindir}/showattr
460 %attr(755,root,root) %{_sbindir}/vattribute
461 %attr(755,root,root) %{_sbindir}/vcontext
462 %attr(755,root,root) %{_sbindir}/vdlimit
463 %attr(755,root,root) %{_sbindir}/vnamespace
464 %attr(755,root,root) %{_sbindir}/vkill
465 %attr(755,root,root) %{_sbindir}/vlimit
466 %attr(755,root,root) %{_sbindir}/vrsetup
467 %attr(755,root,root) %{_sbindir}/vsched
468 %attr(755,root,root) %{_sbindir}/vserver-info
469 %attr(755,root,root) %{_sbindir}/vuname
470 %{_mandir}/man8/chbind*
471 %{_mandir}/man8/chcontext*
472 %{_mandir}/man8/reducecap*
475 %defattr(644,root,root,755)
476 %doc contrib/yum*.patch package-menagament.txt
477 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify
478 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify/hash
479 %dir %{_sysconfdir}/vservers/.distributions
480 %dir %{_sysconfdir}/vservers/.distributions/.common
481 %dir %{_sysconfdir}/vservers/.distributions/.common/pubkeys
482 %dir %{_sysconfdir}/vservers/.distributions/[frs]*
483 %dir %{_sysconfdir}/vservers/.distributions/[frs]*/apt
484 %dir %{_sysconfdir}/vservers/.distributions/pld2.0
485 %dir %{_sysconfdir}/vservers/.distributions/pld2.0/poldek
486 %{_sysconfdir}/vservers/.distributions/pld1.99
487 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/[frs]*/apt/sources.list
488 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/pld2.0/poldek/poldek.conf
489 %attr(755,root,root) %{_libdir}/%{name}/rpm-fake*
490 %dir %{_libdir}/%{name}/distributions
491 %attr(-, root, root) %{_libdir}/%{name}/distributions/*
492 %{_libdir}/%{name}/vserver-build.*
493 %{_libdir}/%{name}/vserver-setup.functions
494 %{_libdir}/%{name}/defaults/fstab
495 %{_libdir}/%{name}/defaults/debootstrap.uri
496 %{_libdir}/%{name}/defaults/vunify-exclude
497 %attr(755,root,root) %{_libdir}/%{name}/pkgmgmt
498 %attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker
499 %attr(755,root,root) %{_libdir}/%{name}/vbuild
500 %attr(755,root,root) %{_libdir}/%{name}/vcheck
501 %attr(755,root,root) %{_libdir}/%{name}/vcopy
502 %attr(755,root,root) %{_libdir}/%{name}/vhashify
503 %attr(755,root,root) %{_libdir}/%{name}/vpkg
504 %attr(755,root,root) %{_libdir}/%{name}/vpoldek-worker
505 %attr(755,root,root) %{_libdir}/%{name}/vrpm-*
506 %attr(755,root,root) %{_libdir}/%{name}/vserver-build
507 %attr(755,root,root) %{_libdir}/%{name}/vunify
508 %attr(755,root,root) %{_libdir}/%{name}/vyum-worker
509 %attr(755,root,root) %{_sbindir}/vapt-get
510 %attr(755,root,root) %{_sbindir}/vfiles
511 %attr(755,root,root) %{_sbindir}/vpoldek
512 %attr(755,root,root) %{_sbindir}/vrpm
513 %attr(755,root,root) %{_sbindir}/vyum
514 %{_mandir}/man8/vserver-copy*
517 %defattr(644,root,root,755)
520 %dir %{_libdir}/%{name}/legacy
521 %attr(755,root,root) %{_libdir}/%{name}/legacy/*
522 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-legacy
523 %attr(754,root,root) /etc/rc.d/init.d/v_*
524 %attr(754,root,root) /etc/rc.d/init.d/rebootmgr
525 %attr(754,root,root) /etc/rc.d/init.d/vservers-legacy
526 %attr(755,root,root) %{_sbindir}/vserver-copy
527 %{_mandir}/man8/distrib-info*
528 %{_mandir}/man8/rebootmgr*
529 %{_mandir}/man8/vps.*
531 %files -n vserver-dev
532 %defattr(644,root,root,755)
534 %dev(c,1,7) %attr(666,root,root) /dev/full
535 %dev(c,1,3) %attr(666,root,root) /dev/null
536 %dev(c,5,2) %attr(666,root,root) /dev/ptmx
537 %dev(c,1,8) %attr(644,root,root) /dev/random
538 %dev(c,5,0) %attr(666,root,root) /dev/tty
539 %dev(c,1,9) %attr(644,root,root) /dev/urandom
540 %dev(c,1,5) %attr(666,root,root) /dev/zero