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 URL: http://savannah.nongnu.org/projects/util-vserver/
30 BuildRequires: autoconf
31 BuildRequires: automake >= 1.9
32 BuildRequires: beecrypt-devel
33 %{?with_dietlibc:BuildRequires: dietlibc-static >= 2:0.29}
34 BuildRequires: libstdc++-devel
36 BuildRequires: doxygen
37 BuildRequires: graphviz
38 BuildRequires: libxslt-progs
39 BuildRequires: tetex-format-pdflatex
40 BuildRequires: tetex-makeindex
41 %{?with_xalan:BuildRequires: xalan-j}
44 Requires(post,preun): /sbin/chkconfig
45 Requires: %{name}-core = %{version}-%{release}
46 Requires: %{name}-lib = %{version}-%{release}
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 This package provides the components and a framework to setup virtual
51 servers. A virtual server runs inside a Linux server. It is
52 nevertheless highly independent. As such, you can run various services
53 with normal configuration. The various vservers can't interact with
54 each other and can't interact with services in the main server.
56 This requires a special kernel supporting the new new_s_context and
57 set_ipv4root system call.
60 Ten pakiet dostarcza sk³adniki i szkielet do tworzenia wirtualnych
61 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
62 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
63 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
64 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
66 Wymaga to specjalnego j±dra obs³uguj±cego nowe wywo³ania systemowe
67 new_s_context i set_ipv4root.
70 Summary: Development files for Linux vserver libraries
71 Summary(pl): Pliki programistyczne dla bibliotek linuksowego vserwera
72 Group: Development/Libraries
73 Requires: %{name}-lib = %{version}-%{release}
76 This package contains the development files necessary for developing
77 programs which use vserver library.
79 %description devel -l pl
80 Ten pakiet zawiera pliki programistyczne konieczne do rozwijania
81 programów u¿ywaj±cych biblioteki vserver.
84 Summary: Static vserver library
85 Summary(pl): Biblioteka statyczna vservera
86 Group: Development/Libraries
87 Requires: %{name}-devel = %{version}-%{release}
90 This package contains the static version of vserver library.
92 %description static -l pl
93 Ten pakiet zawiera statyczn± wersjê biblioteki vservera.
96 Summary: Dynamic libraries for util-vserver
97 Summary(pl): Biblioteki dynamiczne dla pakietu util-vserver
101 util-vserver provides the components and a framework to setup virtual
102 servers. A virtual server runs inside a linux server. It is
103 nevertheless highly independent. As such, you can run various services
104 with normal configuration. The various vservers can't interact with
105 each other and can't interact with services in the main server.
107 This package contains the shared libraries needed by all other
108 'util-vserver' subpackages.
110 %description lib -l pl
111 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
112 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
113 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
114 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
115 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
117 Ten pakiet zawiera biblioteki wspó³dzielone wymagane przez wszystkie
118 podpakiety util-vserver.
121 Summary: The core-utilities for util-vserver
122 Summary(pl): Podstawowe narzêdzia dla util-vserver
123 Group: Applications/System
125 Requires: %{name} = %{version}-%{release}
128 util-vserver provides the components and a framework to setup virtual
129 servers. A virtual server runs inside a linux server. It is
130 nevertheless highly independent. As such, you can run various services
131 with normal configuration. The various vservers can't interact with
132 each other and can't interact with services in the main server.
134 This package contains utilities which are required to communicate with
135 the Linux-Vserver enabled kernel.
137 %description core -l pl
138 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
139 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
140 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
141 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
142 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
144 Ten pakiet zawiera narzêdzia wymagane do komunikacji z j±drem z
145 w³±czonym mechanizmem Linux-Vserver.
148 Summary: Tools which can be used to build vservers
149 Summary(pl): Narzêdzia do budowania vserverów
150 Group: Applications/System
156 Conflicts: poldek < 0.18.8-6
157 # remove the following when poldek 0.19 will have --rpmcmd oprion
158 Conflicts: poldek >= 0.19
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!
271 install %{SOURCE7} package-menagament.txt
277 --with-initrddir=/etc/rc.d/init.d \
279 %{?with_dietlibc:--enable-dietlibc} \
280 %{!?with_dietlibc:--disable-dietlibc} \
286 IPTABLES=/usr/sbin/iptables \
287 MODPROBE=/sbin/modprobe \
288 NAMEIF=/sbin/nameif \
290 VCONFIG=/sbin/vconfig \
294 %{?with_doc:%{__make} doc}
297 rm -rf $RPM_BUILD_ROOT
298 install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d},/dev/pts}
300 %{__make} install install-distribution \
301 DESTDIR=$RPM_BUILD_ROOT
303 chmod -R +rX $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/*
305 install -d $RPM_BUILD_ROOT/etc/vservices
306 install -d $RPM_BUILD_ROOT/vservers/.pkg
307 ln -s /vservers $RPM_BUILD_ROOT%{_sysconfdir}/vservers/vdirbase
308 ln -s %{_localstatedir}/run/vservers.rev $RPM_BUILD_ROOT%{_sysconfdir}/vservers/run.rev
310 for i in $RPM_BUILD_ROOT/etc/rc.d/init.d/v_* ; do
311 s=`basename $i | sed s/v_//`
312 cat >$RPM_BUILD_ROOT/etc/vservices/$s << EOF
313 # IP addresses/interfaces to bound $s service to
319 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vprocunhide
320 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-default
321 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-legacy
322 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rebootmgr
323 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/vservers-default
324 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/vservers-legacy
326 ln -sf /dev/null $RPM_BUILD_ROOT/dev/initctl
329 rm -rf $RPM_BUILD_ROOT
332 %{_sbindir}/setattr --barrier /vservers || :
334 %post lib -p /sbin/ldconfig
335 %postun lib -p /sbin/ldconfig
338 /sbin/chkconfig --add vservers-default
339 /sbin/chkconfig --add vprocunhide
340 #if [ -r /var/lock/subsys/vprocunhide ]; then
341 # /etc/rc.d/init.d/vprocunhide restart >&2
343 #if [ -r /var/lock/subsys/vservers-default ]; then
344 # /etc/rc.d/init.d/vservers-default restart >&2
348 if [ "$1" = "0" ]; then
349 if [ -r /var/lock/subsys/vprocunhide ]; then
350 /etc/rc.d/init.d/vprocunhide stop >&2
352 if [ -r /var/lock/subsys/vservers-default ]; then
353 /etc/rc.d/init.d/vservers-default stop >&2
355 /sbin/chkconfig --del vprocunhide
356 /sbin/chkconfig --del vservers-default
360 /sbin/chkconfig --add rebootmgr
361 /sbin/chkconfig --add vservers-legacy
362 #if [ -r /var/lock/subsys/rebootmgr ] ; then
363 # /etc/rc.d/init.d/rebootmgr restart >&2
365 #if [ -r /var/lock/subsys/vservers-legacy ] ; then
366 # /etc/rc.d/init.d/vservers-legacy restart >&2
370 if [ "$1" = "0" ]; then
371 if [ -r /var/lock/subsys/rebootmgr ] ; then
372 /etc/rc.d/init.d/rebootmgr stop >&2
374 if [ -r /var/lock/subsys/vservers-legacy ] ; then
375 /etc/rc.d/init.d/vservers-legacy stop >&2
377 /sbin/chkconfig --del rebootmgr
378 /sbin/chkconfig --del vservers-legacy
382 %defattr(644,root,root,755)
383 %doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt
384 %{?with_doc:%doc doc/*.html}
385 %dir %{_sysconfdir}/vservers
386 %dir %{_sysconfdir}/vservers/.defaults
387 %dir %{_sysconfdir}/vservers/.defaults/apps
388 %dir %{_sysconfdir}/vservers/.defaults/files
389 %{_sysconfdir}/vservers/.defaults/vdirbase
390 %{_sysconfdir}/vservers/.defaults/run.rev
391 %{_sysconfdir}/vservers/vdirbase
392 %{_sysconfdir}/vservers/run.rev
394 %attr(755,root,root) %{_sbindir}/exec-cd
395 %attr(755,root,root) %{_sbindir}/vdu
396 %attr(755,root,root) %{_sbindir}/vps
397 %attr(755,root,root) %{_sbindir}/vpstree
398 %attr(755,root,root) %{_sbindir}/vserver
399 %attr(755,root,root) %{_sbindir}/vserver-stat
400 %attr(755,root,root) %{_sbindir}/vsomething
401 %attr(755,root,root) %{_sbindir}/vtop
402 %dir %{_libdir}/%{name}
403 %dir %{_libdir}/%{name}/defaults
404 %{_libdir}/%{name}/defaults/*
405 %attr(755,root,root) %{_libdir}/%{name}/capchroot
406 %attr(755,root,root) %{_libdir}/%{name}/chain-echo
407 %attr(755,root,root) %{_libdir}/%{name}/check-unixfile
408 %attr(755,root,root) %{_libdir}/%{name}/chroot-*
409 %attr(755,root,root) %{_libdir}/%{name}/exec-ulimit
410 %attr(755,root,root) %{_libdir}/%{name}/fakerunlevel
411 %attr(755,root,root) %{_libdir}/%{name}/filetime
412 %{_libdir}/%{name}/functions
413 %attr(755,root,root) %{_libdir}/%{name}/keep-ctx-alive
414 %attr(755,root,root) %{_libdir}/%{name}/lockfile
415 %attr(755,root,root) %{_libdir}/%{name}/mask2prefix
416 %attr(755,root,root) %{_libdir}/%{name}/readlink
417 %attr(755,root,root) %{_libdir}/%{name}/save_ctxinfo
418 %attr(755,root,root) %{_libdir}/%{name}/secure-mount
419 %attr(755,root,root) %{_libdir}/%{name}/sigexec
420 %attr(755,root,root) %{_libdir}/%{name}/start-vservers
421 %attr(755,root,root) %{_libdir}/%{name}/vprocunhide
422 %{_libdir}/%{name}/vserver.*
423 %attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh
424 %attr(755,root,root) %{_libdir}/%{name}/vshelper
425 %attr(755,root,root) %{_libdir}/%{name}/vshelper-sync
427 %attr(0,root,root) %dir /vservers
428 %attr(755,root,root) %dir /vservers/.pkg
429 %dir %{_localstatedir}/run/vservers
430 %dir %{_localstatedir}/run/vservers.rev
431 %dir %{_localstatedir}/run/vshelper
434 %defattr(644,root,root,755)
435 %{?with_doc:%doc lib/apidoc/latex/refman.pdf lib/apidoc/html}
436 %attr(755,root,root) %{_libdir}/lib*.so
438 %{_includedir}/vserver.h
439 %{_pkgconfigdir}/*.pc
442 %defattr(644,root,root,755)
443 %{_libdir}/libvserver.a
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
450 %defattr(644,root,root,755)
451 %attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper
452 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-default
453 %attr(754,root,root) /etc/rc.d/init.d/vprocunhide
454 %attr(754,root,root) /etc/rc.d/init.d/vservers-default
457 %defattr(644,root,root,755)
458 %dir %{_libdir}/%{name}
459 %{_libdir}/%{name}/FEATURES.txt
460 %{_libdir}/%{name}/util-vserver-vars
461 %attr(755,root,root) %{_libdir}/%{name}/chcontext-compat
462 %attr(755,root,root) %{_sbindir}/chbind
463 %attr(755,root,root) %{_sbindir}/chcontext
464 %attr(755,root,root) %{_sbindir}/chxid
465 %attr(755,root,root) %{_sbindir}/lsxid
466 %attr(755,root,root) %{_sbindir}/reducecap
467 %attr(755,root,root) %{_sbindir}/setattr
468 %attr(755,root,root) %{_sbindir}/showattr
469 %attr(755,root,root) %{_sbindir}/vattribute
470 %attr(755,root,root) %{_sbindir}/vcontext
471 %attr(755,root,root) %{_sbindir}/vdlimit
472 %attr(755,root,root) %{_sbindir}/vnamespace
473 %attr(755,root,root) %{_sbindir}/vkill
474 %attr(755,root,root) %{_sbindir}/vlimit
475 %attr(755,root,root) %{_sbindir}/vrsetup
476 %attr(755,root,root) %{_sbindir}/vsched
477 %attr(755,root,root) %{_sbindir}/vserver-info
478 %attr(755,root,root) %{_sbindir}/vuname
479 %{_mandir}/man8/chbind*
480 %{_mandir}/man8/chcontext*
481 %{_mandir}/man8/reducecap*
484 %defattr(644,root,root,755)
485 %doc contrib/yum*.patch package-menagament.txt
486 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify
487 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify/hash
488 %dir %{_sysconfdir}/vservers/.distributions
489 %dir %{_sysconfdir}/vservers/.distributions/.common
490 %dir %{_sysconfdir}/vservers/.distributions/.common/pubkeys
491 %dir %{_sysconfdir}/vservers/.distributions/[frs]*
492 %dir %{_sysconfdir}/vservers/.distributions/[frs]*/apt
493 %dir %{_sysconfdir}/vservers/.distributions/pld2.0
494 %dir %{_sysconfdir}/vservers/.distributions/pld2.0/poldek
495 %{_sysconfdir}/vservers/.distributions/pld1.99
496 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/[frs]*/apt/sources.list
497 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/pld2.0/poldek/poldek.conf
498 %attr(755,root,root) %{_libdir}/%{name}/rpm-fake*
499 %dir %{_libdir}/%{name}/distributions
500 %attr(-, root, root) %{_libdir}/%{name}/distributions/*
501 %{_libdir}/%{name}/vserver-build.*
502 %{_libdir}/%{name}/vserver-setup.functions
503 %{_libdir}/%{name}/defaults/fstab
504 %{_libdir}/%{name}/defaults/debootstrap.uri
505 %{_libdir}/%{name}/defaults/vunify-exclude
506 %attr(755,root,root) %{_libdir}/%{name}/pkgmgmt
507 %attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker
508 %attr(755,root,root) %{_libdir}/%{name}/vbuild
509 %attr(755,root,root) %{_libdir}/%{name}/vcheck
510 %attr(755,root,root) %{_libdir}/%{name}/vcopy
511 %attr(755,root,root) %{_libdir}/%{name}/vhashify
512 %attr(755,root,root) %{_libdir}/%{name}/vpkg
513 %attr(755,root,root) %{_libdir}/%{name}/vpoldek-worker
514 %attr(755,root,root) %{_libdir}/%{name}/vrpm-*
515 %attr(755,root,root) %{_libdir}/%{name}/vserver-build
516 %attr(755,root,root) %{_libdir}/%{name}/vunify
517 %attr(755,root,root) %{_libdir}/%{name}/vyum-worker
518 %attr(755,root,root) %{_sbindir}/vapt-get
519 %attr(755,root,root) %{_sbindir}/vfiles
520 %attr(755,root,root) %{_sbindir}/vpoldek
521 %attr(755,root,root) %{_sbindir}/vrpm
522 %attr(755,root,root) %{_sbindir}/vyum
523 %{_mandir}/man8/vserver-copy*
526 %defattr(644,root,root,755)
529 %dir %{_libdir}/%{name}/legacy
530 %attr(755,root,root) %{_libdir}/%{name}/legacy/*
531 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-legacy
532 %attr(754,root,root) /etc/rc.d/init.d/v_*
533 %attr(754,root,root) /etc/rc.d/init.d/rebootmgr
534 %attr(754,root,root) /etc/rc.d/init.d/vservers-legacy
535 %attr(755,root,root) %{_sbindir}/vserver-copy
536 %{_mandir}/man8/distrib-info*
537 %{_mandir}/man8/rebootmgr*
538 %{_mandir}/man8/vps.*
540 %files -n vserver-dev
541 %defattr(644,root,root,755)
543 %dev(c,1,7) %attr(666,root,root) /dev/full
544 %dev(c,1,3) %attr(666,root,root) /dev/null
545 %dev(c,5,2) %attr(666,root,root) /dev/ptmx
546 %dev(c,1,8) %attr(644,root,root) /dev/random
547 %dev(c,5,0) %attr(666,root,root) /dev/tty
548 %dev(c,1,9) %attr(644,root,root) /dev/urandom
549 %dev(c,1,5) %attr(666,root,root) /dev/zero