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
37 BuildRequires: doxygen
38 BuildRequires: graphviz
39 BuildRequires: libxslt-progs
40 BuildRequires: tetex-format-pdflatex
41 BuildRequires: tetex-makeindex
42 %{?with_xalan:BuildRequires: xalan-j}
45 Requires(post,preun): /sbin/chkconfig
46 Requires: %{name}-core = %{version}-%{release}
47 Requires: %{name}-lib = %{version}-%{release}
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 This package provides the components and a framework to setup virtual
52 servers. A virtual server runs inside a Linux server. It is
53 nevertheless highly independent. As such, you can run various services
54 with normal configuration. The various vservers can't interact with
55 each other and can't interact with services in the main server.
57 This requires a special kernel supporting the new new_s_context and
58 set_ipv4root system call.
61 Ten pakiet dostarcza sk³adniki i szkielet do tworzenia wirtualnych
62 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
63 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
64 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
65 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
67 Wymaga to specjalnego j±dra obs³uguj±cego nowe wywo³ania systemowe
68 new_s_context i set_ipv4root.
71 Summary: Development files for Linux vserver libraries
72 Summary(pl): Pliki programistyczne dla bibliotek linuksowego vserwera
73 Group: Development/Libraries
74 Requires: %{name}-lib = %{version}-%{release}
77 This package contains the development files necessary for developing
78 programs which use vserver library.
80 %description devel -l pl
81 Ten pakiet zawiera pliki programistyczne konieczne do rozwijania
82 programów u¿ywaj±cych biblioteki vserver.
85 Summary: Static vserver library
86 Summary(pl): Biblioteka statyczna vservera
87 Group: Development/Libraries
88 Requires: %{name}-devel = %{version}-%{release}
91 This package contains the static version of vserver library.
93 %description static -l pl
94 Ten pakiet zawiera statyczn± wersjê biblioteki vservera.
97 Summary: Dynamic libraries for util-vserver
98 Summary(pl): Biblioteki dynamiczne dla pakietu util-vserver
102 util-vserver provides the components and a framework to setup virtual
103 servers. A virtual server runs inside a linux server. It is
104 nevertheless highly independent. As such, you can run various services
105 with normal configuration. The various vservers can't interact with
106 each other and can't interact with services in the main server.
108 This package contains the shared libraries needed by all other
109 'util-vserver' subpackages.
111 %description lib -l pl
112 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
113 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
114 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
115 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
116 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
118 Ten pakiet zawiera biblioteki wspó³dzielone wymagane przez wszystkie
119 podpakiety util-vserver.
122 Summary: The core-utilities for util-vserver
123 Summary(pl): Podstawowe narzêdzia dla util-vserver
124 Group: Applications/System
126 Requires: %{name} = %{version}-%{release}
129 util-vserver provides the components and a framework to setup virtual
130 servers. A virtual server runs inside a linux server. It is
131 nevertheless highly independent. As such, you can run various services
132 with normal configuration. The various vservers can't interact with
133 each other and can't interact with services in the main server.
135 This package contains utilities which are required to communicate with
136 the Linux-Vserver enabled kernel.
138 %description core -l pl
139 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
140 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
141 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
142 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
143 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
145 Ten pakiet zawiera narzêdzia wymagane do komunikacji z j±drem z
146 w³±czonym mechanizmem Linux-Vserver.
149 Summary: Tools which can be used to build vservers
150 Summary(pl): Narzêdzia do budowania vserverów
151 Group: Applications/System
157 Conflicts: poldek < 0.18.8-6
158 # remove the following when poldek 0.19 will have --rpmcmd oprion
159 Conflicts: poldek >= 0.19
160 Requires: %{name} = %{version}-%{release}
163 util-vserver provides the components and a framework to setup virtual
164 servers. A virtual server runs inside a linux server. It is
165 nevertheless highly independent. As such, you can run various services
166 with normal configuration. The various vservers can't interact with
167 each other and can't interact with services in the main server.
169 This package contains utilities which assist in building Vservers.
171 %description build -l pl
172 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
173 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
174 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
175 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
176 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
178 Ten pakiet zawiera narzêdzia pomagaj±ce przy budowaniu Vserwerów.
181 Summary: initscripts for vserver
182 Summary(pl): Skrypty inicjalizuj±ce dla vserwera
184 Requires(post,preun): /sbin/chkconfig
185 Requires: %{name} = %{version}-%{release}
186 Requires: %{name}-core = %{version}-%{release}
192 util-vserver provides the components and a framework to setup virtual
193 servers. A virtual server runs inside a linux server. It is
194 nevertheless highly independent. As such, you can run various services
195 with normal configuration. The various vservers can't interact with
196 each other and can't interact with services in the main server.
198 This package contains the SysV initscripts which start and stop
199 Vservers and related tools.
201 %description init -l pl
202 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
203 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
204 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
205 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
206 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
208 Ten pakiet zawiera skrypty inicjalizuj±ce SysV uruchamiaj±ce i
209 zatrzymuj±ce Vserwery oraz powi±zane narzêdzia.
212 Summary: Legacy utilities for util-vserver
213 Summary(pl): Stare narzêdzia dla util-vserver
214 Group: Applications/System
215 Requires(post,preun): /sbin/chkconfig
216 Requires: %{name} = %{version}-%{release}
217 Requires: %{name}-core = %{version}-%{release}
221 util-vserver provides the components and a framework to setup virtual
222 servers. A virtual server runs inside a linux server. It is
223 nevertheless highly independent. As such, you can run various services
224 with normal configuration. The various vservers can't interact with
225 each other and can't interact with services in the main server.
227 This package contains the tools which are needed to work with Vservers
228 having an old-style configuration.
230 %description legacy -l pl
231 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
232 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
233 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
234 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
235 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
237 Ten pakiet zawiera narzêdzia potrzebne do pracy z Vserwerami maj±cymi
238 konfiguracjê w starym stylu.
240 %package -n vserver-dev
241 Summary: /dev entries for systems in Vservers
242 Summary(pl): Pliki specjalne /dev/* dla systemów w Vserwerach
244 PreReq: setup >= 2.4.1-2
245 Provides: dev = 2.9.0-19
249 %description -n vserver-dev
250 Unix and unix like systems (including Linux) use file system entries
251 to represent devices attached to the machine. All of these entries are
252 in the /dev tree (though they don't have to be), and this package
253 contains only entries needed for a system running inside Vserver.
255 DO NOT install this package for a normal system!
257 %description -n vserver-dev -l pl
258 Wszystkie systemy klasy unices, w tym Linux, u¿ywaj± plików do
259 przedstawiania urz±dzeñ pod³±czonych do komputera. Wszystkie te pliki
260 znajduj± siê zwykle w katalogu /dev. Pakiet ten wy³±cznie te pliki
261 specjalne które s± potrzebne do uruchomienia systemu w Vserwerze.
263 NIE INSTALUJ tego pakietu na zwyk³ym systemie!
273 install %{SOURCE7} package-menagament.txt
275 cp -a compat.h vserver-compat.h
281 --with-initrddir=/etc/rc.d/init.d \
283 %{?with_dietlibc:--enable-dietlibc} \
284 %{!?with_dietlibc:--disable-dietlibc} \
290 IPTABLES=/usr/sbin/iptables \
291 MODPROBE=/sbin/modprobe \
292 NAMEIF=/sbin/nameif \
294 VCONFIG=/sbin/vconfig \
298 %{?with_doc:%{__make} doc}
301 rm -rf $RPM_BUILD_ROOT
302 install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d},/dev/pts}
304 %{__make} install install-distribution \
305 DESTDIR=$RPM_BUILD_ROOT
307 install vserver-compat.h $RPM_BUILD_ROOT%{_includedir}/
309 chmod -R +rX $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/*
311 install -d $RPM_BUILD_ROOT/etc/vservices
312 install -d $RPM_BUILD_ROOT/vservers/.pkg
313 ln -s /vservers $RPM_BUILD_ROOT%{_sysconfdir}/vservers/vdirbase
314 ln -s %{_localstatedir}/run/vservers.rev $RPM_BUILD_ROOT%{_sysconfdir}/vservers/run.rev
316 for i in $RPM_BUILD_ROOT/etc/rc.d/init.d/v_* ; do
317 s=`basename $i | sed s/v_//`
318 cat >$RPM_BUILD_ROOT/etc/vservices/$s << EOF
319 # IP addresses/interfaces to bound $s service to
325 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vprocunhide
326 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-default
327 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-legacy
328 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rebootmgr
329 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/vservers-default
330 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/vservers-legacy
332 ln -sf /dev/null $RPM_BUILD_ROOT/dev/initctl
335 rm -rf $RPM_BUILD_ROOT
338 %{_sbindir}/setattr --barrier /vservers || :
340 %post lib -p /sbin/ldconfig
341 %postun lib -p /sbin/ldconfig
344 /sbin/chkconfig --add vservers-default
345 /sbin/chkconfig --add vprocunhide
346 #if [ -r /var/lock/subsys/vprocunhide ]; then
347 # /etc/rc.d/init.d/vprocunhide restart >&2
349 #if [ -r /var/lock/subsys/vservers-default ]; then
350 # /etc/rc.d/init.d/vservers-default restart >&2
354 if [ "$1" = "0" ]; then
355 if [ -r /var/lock/subsys/vprocunhide ]; then
356 /etc/rc.d/init.d/vprocunhide stop >&2
358 if [ -r /var/lock/subsys/vservers-default ]; then
359 /etc/rc.d/init.d/vservers-default stop >&2
361 /sbin/chkconfig --del vprocunhide
362 /sbin/chkconfig --del vservers-default
366 /sbin/chkconfig --add rebootmgr
367 /sbin/chkconfig --add vservers-legacy
368 #if [ -r /var/lock/subsys/rebootmgr ] ; then
369 # /etc/rc.d/init.d/rebootmgr restart >&2
371 #if [ -r /var/lock/subsys/vservers-legacy ] ; then
372 # /etc/rc.d/init.d/vservers-legacy restart >&2
376 if [ "$1" = "0" ]; then
377 if [ -r /var/lock/subsys/rebootmgr ] ; then
378 /etc/rc.d/init.d/rebootmgr stop >&2
380 if [ -r /var/lock/subsys/vservers-legacy ] ; then
381 /etc/rc.d/init.d/vservers-legacy stop >&2
383 /sbin/chkconfig --del rebootmgr
384 /sbin/chkconfig --del vservers-legacy
388 %defattr(644,root,root,755)
389 %doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt
390 %{?with_doc:%doc doc/*.html}
391 %dir %{_sysconfdir}/vservers
392 %dir %{_sysconfdir}/vservers/.defaults
393 %dir %{_sysconfdir}/vservers/.defaults/apps
394 %dir %{_sysconfdir}/vservers/.defaults/files
395 %{_sysconfdir}/vservers/.defaults/vdirbase
396 %{_sysconfdir}/vservers/.defaults/run.rev
397 %{_sysconfdir}/vservers/vdirbase
398 %{_sysconfdir}/vservers/run.rev
400 %attr(755,root,root) %{_sbindir}/exec-cd
401 %attr(755,root,root) %{_sbindir}/vdu
402 %attr(755,root,root) %{_sbindir}/vps
403 %attr(755,root,root) %{_sbindir}/vpstree
404 %attr(755,root,root) %{_sbindir}/vserver
405 %attr(755,root,root) %{_sbindir}/vserver-stat
406 %attr(755,root,root) %{_sbindir}/vsomething
407 %attr(755,root,root) %{_sbindir}/vtop
408 %dir %{_libdir}/%{name}
409 %dir %{_libdir}/%{name}/defaults
410 %{_libdir}/%{name}/defaults/*
411 %attr(755,root,root) %{_libdir}/%{name}/capchroot
412 %attr(755,root,root) %{_libdir}/%{name}/chain-echo
413 %attr(755,root,root) %{_libdir}/%{name}/check-unixfile
414 %attr(755,root,root) %{_libdir}/%{name}/chroot-*
415 %attr(755,root,root) %{_libdir}/%{name}/exec-ulimit
416 %attr(755,root,root) %{_libdir}/%{name}/fakerunlevel
417 %attr(755,root,root) %{_libdir}/%{name}/filetime
418 %{_libdir}/%{name}/functions
419 %attr(755,root,root) %{_libdir}/%{name}/keep-ctx-alive
420 %attr(755,root,root) %{_libdir}/%{name}/lockfile
421 %attr(755,root,root) %{_libdir}/%{name}/mask2prefix
422 %attr(755,root,root) %{_libdir}/%{name}/readlink
423 %attr(755,root,root) %{_libdir}/%{name}/save_ctxinfo
424 %attr(755,root,root) %{_libdir}/%{name}/secure-mount
425 %attr(755,root,root) %{_libdir}/%{name}/sigexec
426 %attr(755,root,root) %{_libdir}/%{name}/start-vservers
427 %attr(755,root,root) %{_libdir}/%{name}/vprocunhide
428 %{_libdir}/%{name}/vserver.*
429 %attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh
430 %attr(755,root,root) %{_libdir}/%{name}/vshelper
431 %attr(755,root,root) %{_libdir}/%{name}/vshelper-sync
433 %attr(0,root,root) %dir /vservers
434 %attr(755,root,root) %dir /vservers/.pkg
435 %dir %{_localstatedir}/run/vservers
436 %dir %{_localstatedir}/run/vservers.rev
437 %dir %{_localstatedir}/run/vshelper
440 %defattr(644,root,root,755)
441 %{?with_doc:%doc lib/apidoc/latex/refman.pdf lib/apidoc/html}
442 %attr(755,root,root) %{_libdir}/lib*.so
444 %{_includedir}/vserver*.h
445 %{_pkgconfigdir}/*.pc
448 %defattr(644,root,root,755)
449 %{_libdir}/libvserver.a
452 %defattr(644,root,root,755)
453 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
456 %defattr(644,root,root,755)
457 %attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper
458 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-default
459 %attr(754,root,root) /etc/rc.d/init.d/vprocunhide
460 %attr(754,root,root) /etc/rc.d/init.d/vservers-default
463 %defattr(644,root,root,755)
464 %dir %{_libdir}/%{name}
465 %{_libdir}/%{name}/FEATURES.txt
466 %{_libdir}/%{name}/util-vserver-vars
467 %attr(755,root,root) %{_libdir}/%{name}/chcontext-compat
468 %attr(755,root,root) %{_sbindir}/chbind
469 %attr(755,root,root) %{_sbindir}/chcontext
470 %attr(755,root,root) %{_sbindir}/chxid
471 %attr(755,root,root) %{_sbindir}/lsxid
472 %attr(755,root,root) %{_sbindir}/reducecap
473 %attr(755,root,root) %{_sbindir}/setattr
474 %attr(755,root,root) %{_sbindir}/showattr
475 %attr(755,root,root) %{_sbindir}/vattribute
476 %attr(755,root,root) %{_sbindir}/vcontext
477 %attr(755,root,root) %{_sbindir}/vdlimit
478 %attr(755,root,root) %{_sbindir}/vnamespace
479 %attr(755,root,root) %{_sbindir}/vkill
480 %attr(755,root,root) %{_sbindir}/vlimit
481 %attr(755,root,root) %{_sbindir}/vrsetup
482 %attr(755,root,root) %{_sbindir}/vsched
483 %attr(755,root,root) %{_sbindir}/vserver-info
484 %attr(755,root,root) %{_sbindir}/vuname
485 %{_mandir}/man8/chbind*
486 %{_mandir}/man8/chcontext*
487 %{_mandir}/man8/reducecap*
490 %defattr(644,root,root,755)
491 %doc contrib/yum*.patch package-menagament.txt
492 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify
493 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify/hash
494 %dir %{_sysconfdir}/vservers/.distributions
495 %dir %{_sysconfdir}/vservers/.distributions/.common
496 %dir %{_sysconfdir}/vservers/.distributions/.common/pubkeys
497 %dir %{_sysconfdir}/vservers/.distributions/[frs]*
498 %dir %{_sysconfdir}/vservers/.distributions/[frs]*/apt
499 %dir %{_sysconfdir}/vservers/.distributions/pld2.0
500 %dir %{_sysconfdir}/vservers/.distributions/pld2.0/poldek
501 %{_sysconfdir}/vservers/.distributions/pld1.99
502 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/[frs]*/apt/sources.list
503 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/pld2.0/poldek/poldek.conf
504 %attr(755,root,root) %{_libdir}/%{name}/rpm-fake*
505 %dir %{_libdir}/%{name}/distributions
506 %attr(-, root, root) %{_libdir}/%{name}/distributions/*
507 %{_libdir}/%{name}/vserver-build.*
508 %{_libdir}/%{name}/vserver-setup.functions
509 %{_libdir}/%{name}/defaults/fstab
510 %{_libdir}/%{name}/defaults/debootstrap.uri
511 %{_libdir}/%{name}/defaults/vunify-exclude
512 %attr(755,root,root) %{_libdir}/%{name}/pkgmgmt
513 %attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker
514 %attr(755,root,root) %{_libdir}/%{name}/vbuild
515 %attr(755,root,root) %{_libdir}/%{name}/vcheck
516 %attr(755,root,root) %{_libdir}/%{name}/vcopy
517 %attr(755,root,root) %{_libdir}/%{name}/vhashify
518 %attr(755,root,root) %{_libdir}/%{name}/vpkg
519 %attr(755,root,root) %{_libdir}/%{name}/vpoldek-worker
520 %attr(755,root,root) %{_libdir}/%{name}/vrpm-*
521 %attr(755,root,root) %{_libdir}/%{name}/vserver-build
522 %attr(755,root,root) %{_libdir}/%{name}/vunify
523 %attr(755,root,root) %{_libdir}/%{name}/vyum-worker
524 %attr(755,root,root) %{_sbindir}/vapt-get
525 %attr(755,root,root) %{_sbindir}/vfiles
526 %attr(755,root,root) %{_sbindir}/vpoldek
527 %attr(755,root,root) %{_sbindir}/vrpm
528 %attr(755,root,root) %{_sbindir}/vyum
529 %{_mandir}/man8/vserver-copy*
532 %defattr(644,root,root,755)
535 %dir %{_libdir}/%{name}/legacy
536 %attr(755,root,root) %{_libdir}/%{name}/legacy/*
537 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-legacy
538 %attr(754,root,root) /etc/rc.d/init.d/v_*
539 %attr(754,root,root) /etc/rc.d/init.d/rebootmgr
540 %attr(754,root,root) /etc/rc.d/init.d/vservers-legacy
541 %attr(755,root,root) %{_sbindir}/vserver-copy
542 %{_mandir}/man8/distrib-info*
543 %{_mandir}/man8/rebootmgr*
544 %{_mandir}/man8/vps.*
546 %files -n vserver-dev
547 %defattr(644,root,root,755)
549 %dev(c,1,7) %attr(666,root,root) /dev/full
550 %dev(c,1,3) %attr(666,root,root) /dev/null
551 %dev(c,5,2) %attr(666,root,root) /dev/ptmx
552 %dev(c,1,8) %attr(644,root,root) /dev/random
553 %dev(c,5,0) %attr(666,root,root) /dev/tty
554 %dev(c,1,9) %attr(644,root,root) /dev/urandom
555 %dev(c,1,5) %attr(666,root,root) /dev/zero