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: doxygen
35 BuildRequires: graphviz
36 BuildRequires: libstdc++-devel
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}-lib = %{version}-%{release}
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 This package provides the components and a framework to setup virtual
50 servers. A virtual server runs inside a Linux server. It is
51 nevertheless highly independent. As such, you can run various services
52 with normal configuration. The various vservers can't interact with
53 each other and can't interact with services in the main server.
55 This requires a special kernel supporting the new new_s_context and
56 set_ipv4root system call.
59 Ten pakiet dostarcza sk³adniki i szkielet do tworzenia wirtualnych
60 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
61 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
62 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
63 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
65 Wymaga to specjalnego j±dra obs³uguj±cego nowe wywo³ania systemowe
66 new_s_context i set_ipv4root.
69 Summary: Development files for Linux vserver libraries
70 Summary(pl): Pliki programistyczne dla bibliotek linuksowego vserwera
71 Group: Development/Libraries
72 Requires: %{name} = %{version}-%{release}
75 This package contains the development files necessary for developing
76 programs which use vserver library.
78 %description devel -l pl
79 Ten pakiet zawiera pliki programistyczne konieczne do rozwijania
80 programów u¿ywaj±cych biblioteki vserver.
83 Summary: Static vserver library
84 Summary(pl): Biblioteka statyczna vservera
85 Group: Development/Libraries
86 Requires: %{name}-devel = %{version}-%{release}
89 This package contains the static version of vserver library.
91 %description static -l pl
92 Ten pakiet zawiera statyczn± wersjê biblioteki vservera.
95 Summary: Dynamic libraries for util-vserver
96 Summary(pl): Biblioteki dynamiczne dla pakietu util-vserver
100 util-vserver provides the components and a framework to setup virtual
101 servers. A virtual server runs inside a linux server. It is
102 nevertheless highly independent. As such, you can run various services
103 with normal configuration. The various vservers can't interact with
104 each other and can't interact with services in the main server.
106 This package contains the shared libraries needed by all other
107 'util-vserver' subpackages.
109 %description lib -l pl
110 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
111 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
112 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
113 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
114 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
116 Ten pakiet zawiera biblioteki wspó³dzielone wymagane przez wszystkie
117 podpakiety util-vserver.
120 Summary: The core-utilities for util-vserver
121 Summary(pl): Podstawowe narzêdzia dla util-vserver
122 Group: Applications/System
124 Requires: %{name} = %{version}-%{release}
127 util-vserver provides the components and a framework to setup virtual
128 servers. A virtual server runs inside a linux server. It is
129 nevertheless highly independent. As such, you can run various services
130 with normal configuration. The various vservers can't interact with
131 each other and can't interact with services in the main server.
133 This package contains utilities which are required to communicate with
134 the Linux-Vserver enabled kernel.
136 %description core -l pl
137 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
138 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
139 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
140 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
141 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
143 Ten pakiet zawiera narzêdzia wymagane do komunikacji z j±drem z
144 w³±czonym mechanizmem Linux-Vserver.
147 Summary: Tools which can be used to build vservers
148 Summary(pl): Narzêdzia do budowania vserverów
149 Group: Applications/System
155 Conflicts: poldek < 0.18.8-6
156 # remove the following when poldek 0.19 will have --rpmcmd oprion
157 Conflicts: poldek >= 0.19
158 Requires: %{name} = %{version}-%{release}
161 util-vserver provides the components and a framework to setup virtual
162 servers. A virtual server runs inside a linux server. It is
163 nevertheless highly independent. As such, you can run various services
164 with normal configuration. The various vservers can't interact with
165 each other and can't interact with services in the main server.
167 This package contains utilities which assist in building Vservers.
169 %description build -l pl
170 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
171 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
172 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
173 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
174 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
176 Ten pakiet zawiera narzêdzia pomagaj±ce przy budowaniu Vserwerów.
179 Summary: initscripts for vserver
180 Summary(pl): Skrypty inicjalizuj±ce dla vserwera
182 Requires(post,preun): /sbin/chkconfig
183 Requires: %{name} = %{version}-%{release}
184 Requires: %{name}-core = %{version}-%{release}
190 util-vserver provides the components and a framework to setup virtual
191 servers. A virtual server runs inside a linux server. It is
192 nevertheless highly independent. As such, you can run various services
193 with normal configuration. The various vservers can't interact with
194 each other and can't interact with services in the main server.
196 This package contains the SysV initscripts which start and stop
197 Vservers and related tools.
199 %description init -l pl
200 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
201 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
202 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
203 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
204 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
206 Ten pakiet zawiera skrypty inicjalizuj±ce SysV uruchamiaj±ce i
207 zatrzymuj±ce Vserwery oraz powi±zane narzêdzia.
210 Summary: Legacy utilities for util-vserver
211 Summary(pl): Stare narzêdzia dla util-vserver
212 Group: Applications/System
213 Requires(post,preun): /sbin/chkconfig
214 Requires: %{name} = %{version}-%{release}
215 Requires: %{name}-core = %{version}-%{release}
219 util-vserver provides the components and a framework to setup virtual
220 servers. A virtual server runs inside a linux server. It is
221 nevertheless highly independent. As such, you can run various services
222 with normal configuration. The various vservers can't interact with
223 each other and can't interact with services in the main server.
225 This package contains the tools which are needed to work with Vservers
226 having an old-style configuration.
228 %description legacy -l pl
229 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
230 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
231 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
232 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
233 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
235 Ten pakiet zawiera narzêdzia potrzebne do pracy z Vserwerami maj±cymi
236 konfiguracjê w starym stylu.
238 %package -n vserver-dev
239 Summary: /dev entries for systems in Vservers
240 Summary(pl): Pliki specjalne /dev/* dla systemów w Vserwerach
242 PreReq: setup >= 2.4.1-2
243 Provides: dev = 2.9.0-19
247 %description -n vserver-dev
248 Unix and unix like systems (including Linux) use file system entries
249 to represent devices attached to the machine. All of these entries are
250 in the /dev tree (though they don't have to be), and this package
251 contains only entries needed for a system running inside Vserver.
253 DO NOT install this package for a normal system!
255 %description -n vserver-dev -l pl
256 Wszystkie systemy klasy unices, w tym Linux, u¿ywaj± plików do
257 przedstawiania urz±dzeñ pod³±czonych do komputera. Wszystkie te pliki
258 znajduj± siê zwykle w katalogu /dev. Pakiet ten wy³±cznie te pliki
259 specjalne które s± potrzebne do uruchomienia systemu w Vserwerze.
261 NIE INSTALUJ tego pakietu na zwyk³ym systemie!
270 install %{SOURCE7} package-menagament.txt
276 --with-initrddir=/etc/rc.d/init.d \
278 %{?with_dietlibc:--enable-dietlibc} \
279 %{!?with_dietlibc:--disable-dietlibc} \
285 IPTABLES=/usr/sbin/iptables \
286 MODPROBE=/sbin/modprobe \
287 NAMEIF=/sbin/nameif \
289 VCONFIG=/sbin/vconfig \
293 %{?with_doc:%{__make} doc}
296 rm -rf $RPM_BUILD_ROOT
297 install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d},/dev/pts}
299 %{__make} install install-distribution \
300 DESTDIR=$RPM_BUILD_ROOT
302 chmod -R +rX $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/*
304 install -d $RPM_BUILD_ROOT/etc/vservices
305 install -d $RPM_BUILD_ROOT/vservers/.pkg
306 ln -s /vservers $RPM_BUILD_ROOT%{_sysconfdir}/vservers/vdirbase
307 ln -s %{_localstatedir}/run/vservers.rev $RPM_BUILD_ROOT%{_sysconfdir}/vservers/run.rev
309 for i in $RPM_BUILD_ROOT/etc/rc.d/init.d/v_* ; do
310 s=`basename $i | sed s/v_//`
311 cat >$RPM_BUILD_ROOT/etc/vservices/$s << EOF
312 # IP addresses/interfaces to bound $s service to
318 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vprocunhide
319 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-default
320 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-legacy
321 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rebootmgr
322 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/vservers-default
323 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/vservers-legacy
325 ln -sf /dev/null $RPM_BUILD_ROOT/dev/initctl
328 rm -rf $RPM_BUILD_ROOT
331 %{_sbindir}/setattr --barrier /vservers || :
333 %post lib -p /sbin/ldconfig
334 %postun lib -p /sbin/ldconfig
337 /sbin/chkconfig --add vservers-default
338 /sbin/chkconfig --add vprocunhide
339 #if [ -r /var/lock/subsys/vprocunhide ]; then
340 # /etc/rc.d/init.d/vprocunhide restart >&2
342 #if [ -r /var/lock/subsys/vservers-default ]; then
343 # /etc/rc.d/init.d/vservers-default restart >&2
347 if [ "$1" = "0" ]; then
348 if [ -r /var/lock/subsys/vprocunhide ]; then
349 /etc/rc.d/init.d/vprocunhide stop >&2
351 if [ -r /var/lock/subsys/vservers-default ]; then
352 /etc/rc.d/init.d/vservers-default stop >&2
354 /sbin/chkconfig --del vprocunhide
355 /sbin/chkconfig --del vservers-default
359 /sbin/chkconfig --add rebootmgr
360 /sbin/chkconfig --add vservers-legacy
361 #if [ -r /var/lock/subsys/rebootmgr ] ; then
362 # /etc/rc.d/init.d/rebootmgr restart >&2
364 #if [ -r /var/lock/subsys/vservers-legacy ] ; then
365 # /etc/rc.d/init.d/vservers-legacy restart >&2
369 if [ "$1" = "0" ]; then
370 if [ -r /var/lock/subsys/rebootmgr ] ; then
371 /etc/rc.d/init.d/rebootmgr stop >&2
373 if [ -r /var/lock/subsys/vservers-legacy ] ; then
374 /etc/rc.d/init.d/vservers-legacy stop >&2
376 /sbin/chkconfig --del rebootmgr
377 /sbin/chkconfig --del vservers-legacy
381 %defattr(644,root,root,755)
382 %doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt
383 %{?with_doc:%doc doc/*.html}
384 %dir %{_sysconfdir}/vservers
385 %dir %{_sysconfdir}/vservers/.defaults
386 %dir %{_sysconfdir}/vservers/.defaults/apps
387 %dir %{_sysconfdir}/vservers/.defaults/files
388 %{_sysconfdir}/vservers/.defaults/vdirbase
389 %{_sysconfdir}/vservers/.defaults/run.rev
390 %{_sysconfdir}/vservers/vdirbase
391 %{_sysconfdir}/vservers/run.rev
393 %attr(755,root,root) %{_sbindir}/exec-cd
394 %attr(755,root,root) %{_sbindir}/vdu
395 %attr(755,root,root) %{_sbindir}/vps
396 %attr(755,root,root) %{_sbindir}/vpstree
397 %attr(755,root,root) %{_sbindir}/vserver
398 %attr(755,root,root) %{_sbindir}/vserver-stat
399 %attr(755,root,root) %{_sbindir}/vsomething
400 %attr(755,root,root) %{_sbindir}/vtop
401 %dir %{_libdir}/%{name}
402 %dir %{_libdir}/%{name}/defaults
403 %{_libdir}/%{name}/defaults/*
404 %attr(755,root,root) %{_libdir}/%{name}/capchroot
405 %attr(755,root,root) %{_libdir}/%{name}/chain-echo
406 %attr(755,root,root) %{_libdir}/%{name}/check-unixfile
407 %attr(755,root,root) %{_libdir}/%{name}/chroot-*
408 %attr(755,root,root) %{_libdir}/%{name}/exec-ulimit
409 %attr(755,root,root) %{_libdir}/%{name}/fakerunlevel
410 %attr(755,root,root) %{_libdir}/%{name}/filetime
411 %{_libdir}/%{name}/functions
412 %attr(755,root,root) %{_libdir}/%{name}/keep-ctx-alive
413 %attr(755,root,root) %{_libdir}/%{name}/lockfile
414 %attr(755,root,root) %{_libdir}/%{name}/mask2prefix
415 %attr(755,root,root) %{_libdir}/%{name}/readlink
416 %attr(755,root,root) %{_libdir}/%{name}/save_ctxinfo
417 %attr(755,root,root) %{_libdir}/%{name}/secure-mount
418 %attr(755,root,root) %{_libdir}/%{name}/sigexec
419 %attr(755,root,root) %{_libdir}/%{name}/start-vservers
420 %attr(755,root,root) %{_libdir}/%{name}/vprocunhide
421 %{_libdir}/%{name}/vserver.*
422 %attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh
423 %attr(755,root,root) %{_libdir}/%{name}/vshelper
424 %attr(755,root,root) %{_libdir}/%{name}/vshelper-sync
426 %attr(0,root,root) %dir /vservers
427 %attr(755,root,root) %dir /vservers/.pkg
428 %dir %{_localstatedir}/run/vservers
429 %dir %{_localstatedir}/run/vservers.rev
430 %dir %{_localstatedir}/run/vshelper
433 %defattr(644,root,root,755)
434 %{?with_doc:%doc lib/apidoc/latex/refman.pdf lib/apidoc/html}
435 %attr(755,root,root) %{_libdir}/lib*.so
437 %{_includedir}/vserver.h
438 %{_pkgconfigdir}/*.pc
441 %defattr(644,root,root,755)
442 %{_libdir}/libvserver.a
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
449 %defattr(644,root,root,755)
450 %attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper
451 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-default
452 %attr(754,root,root) /etc/rc.d/init.d/vprocunhide
453 %attr(754,root,root) /etc/rc.d/init.d/vservers-default
456 %defattr(644,root,root,755)
457 %dir %{_libdir}/%{name}
458 %{_libdir}/%{name}/FEATURES.txt
459 %{_libdir}/%{name}/util-vserver-vars
460 %attr(755,root,root) %{_libdir}/%{name}/chcontext-compat
461 %attr(755,root,root) %{_sbindir}/chbind
462 %attr(755,root,root) %{_sbindir}/chcontext
463 %attr(755,root,root) %{_sbindir}/chxid
464 %attr(755,root,root) %{_sbindir}/lsxid
465 %attr(755,root,root) %{_sbindir}/reducecap
466 %attr(755,root,root) %{_sbindir}/setattr
467 %attr(755,root,root) %{_sbindir}/showattr
468 %attr(755,root,root) %{_sbindir}/vattribute
469 %attr(755,root,root) %{_sbindir}/vcontext
470 %attr(755,root,root) %{_sbindir}/vdlimit
471 %attr(755,root,root) %{_sbindir}/vnamespace
472 %attr(755,root,root) %{_sbindir}/vkill
473 %attr(755,root,root) %{_sbindir}/vlimit
474 %attr(755,root,root) %{_sbindir}/vrsetup
475 %attr(755,root,root) %{_sbindir}/vsched
476 %attr(755,root,root) %{_sbindir}/vserver-info
477 %attr(755,root,root) %{_sbindir}/vuname
478 %{_mandir}/man8/chbind*
479 %{_mandir}/man8/chcontext*
480 %{_mandir}/man8/reducecap*
483 %defattr(644,root,root,755)
484 %doc contrib/yum*.patch package-menagament.txt
485 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify
486 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify/hash
487 %dir %{_sysconfdir}/vservers/.distributions
488 %dir %{_sysconfdir}/vservers/.distributions/.common
489 %dir %{_sysconfdir}/vservers/.distributions/.common/pubkeys
490 %dir %{_sysconfdir}/vservers/.distributions/[frs]*
491 %dir %{_sysconfdir}/vservers/.distributions/[frs]*/apt
492 %dir %{_sysconfdir}/vservers/.distributions/pld2.0
493 %dir %{_sysconfdir}/vservers/.distributions/pld2.0/poldek
494 %{_sysconfdir}/vservers/.distributions/pld1.99
495 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/[frs]*/apt/sources.list
496 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/pld2.0/poldek/poldek.conf
497 %attr(755,root,root) %{_libdir}/%{name}/rpm-fake*
498 %dir %{_libdir}/%{name}/distributions
499 %attr(-, root, root) %{_libdir}/%{name}/distributions/*
500 %{_libdir}/%{name}/vserver-build.*
501 %{_libdir}/%{name}/vserver-setup.functions
502 %{_libdir}/%{name}/defaults/fstab
503 %{_libdir}/%{name}/defaults/debootstrap.uri
504 %{_libdir}/%{name}/defaults/vunify-exclude
505 %attr(755,root,root) %{_libdir}/%{name}/pkgmgmt
506 %attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker
507 %attr(755,root,root) %{_libdir}/%{name}/vbuild
508 %attr(755,root,root) %{_libdir}/%{name}/vcheck
509 %attr(755,root,root) %{_libdir}/%{name}/vcopy
510 %attr(755,root,root) %{_libdir}/%{name}/vhashify
511 %attr(755,root,root) %{_libdir}/%{name}/vpkg
512 %attr(755,root,root) %{_libdir}/%{name}/vpoldek-worker
513 %attr(755,root,root) %{_libdir}/%{name}/vrpm-*
514 %attr(755,root,root) %{_libdir}/%{name}/vserver-build
515 %attr(755,root,root) %{_libdir}/%{name}/vunify
516 %attr(755,root,root) %{_libdir}/%{name}/vyum-worker
517 %attr(755,root,root) %{_sbindir}/vapt-get
518 %attr(755,root,root) %{_sbindir}/vfiles
519 %attr(755,root,root) %{_sbindir}/vpoldek
520 %attr(755,root,root) %{_sbindir}/vrpm
521 %attr(755,root,root) %{_sbindir}/vyum
522 %{_mandir}/man8/vserver-copy*
525 %defattr(644,root,root,755)
528 %dir %{_libdir}/%{name}/legacy
529 %attr(755,root,root) %{_libdir}/%{name}/legacy/*
530 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-legacy
531 %attr(754,root,root) /etc/rc.d/init.d/v_*
532 %attr(754,root,root) /etc/rc.d/init.d/rebootmgr
533 %attr(754,root,root) /etc/rc.d/init.d/vservers-legacy
534 %attr(755,root,root) %{_sbindir}/vserver-copy
535 %{_mandir}/man8/distrib-info*
536 %{_mandir}/man8/rebootmgr*
537 %{_mandir}/man8/vps.*
539 %files -n vserver-dev
540 %defattr(644,root,root,755)
542 %dev(c,1,7) %attr(666,root,root) /dev/full
543 %dev(c,1,3) %attr(666,root,root) /dev/null
544 %dev(c,5,2) %attr(666,root,root) /dev/ptmx
545 %dev(c,1,8) %attr(644,root,root) /dev/random
546 %dev(c,5,0) %attr(666,root,root) /dev/tty
547 %dev(c,1,9) %attr(644,root,root) /dev/urandom
548 %dev(c,1,5) %attr(666,root,root) /dev/zero