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-6
159 # remove the following when poldek 0.19 will have --rpmcmd oprion
160 Conflicts: poldek >= 0.19
161 Requires: %{name} = %{version}-%{release}
164 util-vserver provides the components and a framework to setup virtual
165 servers. A virtual server runs inside a linux server. It is
166 nevertheless highly independent. As such, you can run various services
167 with normal configuration. The various vservers can't interact with
168 each other and can't interact with services in the main server.
170 This package contains utilities which assist in building Vservers.
172 %description build -l pl
173 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
174 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
175 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
176 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
177 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
179 Ten pakiet zawiera narzêdzia pomagaj±ce przy budowaniu Vserwerów.
182 Summary: initscripts for vserver
183 Summary(pl): Skrypty inicjalizuj±ce dla vserwera
185 Requires(post,preun): /sbin/chkconfig
186 Requires: %{name} = %{version}-%{release}
187 Requires: %{name}-core = %{version}-%{release}
193 util-vserver provides the components and a framework to setup virtual
194 servers. A virtual server runs inside a linux server. It is
195 nevertheless highly independent. As such, you can run various services
196 with normal configuration. The various vservers can't interact with
197 each other and can't interact with services in the main server.
199 This package contains the SysV initscripts which start and stop
200 Vservers and related tools.
202 %description init -l pl
203 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
204 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
205 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
206 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
207 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
209 Ten pakiet zawiera skrypty inicjalizuj±ce SysV uruchamiaj±ce i
210 zatrzymuj±ce Vserwery oraz powi±zane narzêdzia.
213 Summary: Legacy utilities for util-vserver
214 Summary(pl): Stare narzêdzia dla util-vserver
215 Group: Applications/System
216 Requires(post,preun): /sbin/chkconfig
217 Requires: %{name} = %{version}-%{release}
218 Requires: %{name}-core = %{version}-%{release}
222 util-vserver provides the components and a framework to setup virtual
223 servers. A virtual server runs inside a linux server. It is
224 nevertheless highly independent. As such, you can run various services
225 with normal configuration. The various vservers can't interact with
226 each other and can't interact with services in the main server.
228 This package contains the tools which are needed to work with Vservers
229 having an old-style configuration.
231 %description legacy -l pl
232 util-vserver dostarcza sk³adniki i szkielet do tworzenia wirtualnych
233 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
234 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
235 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
236 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
238 Ten pakiet zawiera narzêdzia potrzebne do pracy z Vserwerami maj±cymi
239 konfiguracjê w starym stylu.
241 %package -n vserver-dev
242 Summary: /dev entries for systems in Vservers
243 Summary(pl): Pliki specjalne /dev/* dla systemów w Vserwerach
245 PreReq: setup >= 2.4.1-2
246 Provides: dev = 2.9.0-19
250 %description -n vserver-dev
251 Unix and unix like systems (including Linux) use file system entries
252 to represent devices attached to the machine. All of these entries are
253 in the /dev tree (though they don't have to be), and this package
254 contains only entries needed for a system running inside Vserver.
256 DO NOT install this package for a normal system!
258 %description -n vserver-dev -l pl
259 Wszystkie systemy klasy unices, w tym Linux, u¿ywaj± plików do
260 przedstawiania urz±dzeñ pod³±czonych do komputera. Wszystkie te pliki
261 znajduj± siê zwykle w katalogu /dev. Pakiet ten wy³±cznie te pliki
262 specjalne które s± potrzebne do uruchomienia systemu w Vserwerze.
264 NIE INSTALUJ tego pakietu na zwyk³ym systemie!
274 install %{SOURCE7} package-menagament.txt
276 cp -a compat.h vserver-compat.h
282 --with-initrddir=/etc/rc.d/init.d \
284 %{?with_dietlibc:--enable-dietlibc} \
285 %{!?with_dietlibc:--disable-dietlibc} \
291 IPTABLES=/usr/sbin/iptables \
292 MODPROBE=/sbin/modprobe \
293 NAMEIF=/sbin/nameif \
295 VCONFIG=/sbin/vconfig \
299 %{?with_doc:%{__make} doc}
302 rm -rf $RPM_BUILD_ROOT
303 install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d},/dev/pts}
305 %{__make} install install-distribution \
306 DESTDIR=$RPM_BUILD_ROOT
308 install vserver-compat.h $RPM_BUILD_ROOT%{_includedir}/
310 chmod -R +rX $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/*
312 install -d $RPM_BUILD_ROOT/etc/vservices
313 install -d $RPM_BUILD_ROOT/vservers/.pkg
314 ln -s /vservers $RPM_BUILD_ROOT%{_sysconfdir}/vservers/vdirbase
315 ln -s %{_localstatedir}/run/vservers.rev $RPM_BUILD_ROOT%{_sysconfdir}/vservers/run.rev
317 for i in $RPM_BUILD_ROOT/etc/rc.d/init.d/v_* ; do
318 s=`basename $i | sed s/v_//`
319 cat >$RPM_BUILD_ROOT/etc/vservices/$s << EOF
320 # IP addresses/interfaces to bound $s service to
326 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vprocunhide
327 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-default
328 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-legacy
329 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rebootmgr
330 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/vservers-default
331 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/vservers-legacy
333 ln -sf /dev/null $RPM_BUILD_ROOT/dev/initctl
336 rm -rf $RPM_BUILD_ROOT
339 %{_sbindir}/setattr --barrier /vservers || :
341 %post lib -p /sbin/ldconfig
342 %postun lib -p /sbin/ldconfig
345 /sbin/chkconfig --add vservers-default
346 /sbin/chkconfig --add vprocunhide
347 #if [ -r /var/lock/subsys/vprocunhide ]; then
348 # /etc/rc.d/init.d/vprocunhide restart >&2
350 #if [ -r /var/lock/subsys/vservers-default ]; then
351 # /etc/rc.d/init.d/vservers-default restart >&2
355 if [ "$1" = "0" ]; then
356 if [ -r /var/lock/subsys/vprocunhide ]; then
357 /etc/rc.d/init.d/vprocunhide stop >&2
359 if [ -r /var/lock/subsys/vservers-default ]; then
360 /etc/rc.d/init.d/vservers-default stop >&2
362 /sbin/chkconfig --del vprocunhide
363 /sbin/chkconfig --del vservers-default
367 /sbin/chkconfig --add rebootmgr
368 /sbin/chkconfig --add vservers-legacy
369 #if [ -r /var/lock/subsys/rebootmgr ] ; then
370 # /etc/rc.d/init.d/rebootmgr restart >&2
372 #if [ -r /var/lock/subsys/vservers-legacy ] ; then
373 # /etc/rc.d/init.d/vservers-legacy restart >&2
377 if [ "$1" = "0" ]; then
378 if [ -r /var/lock/subsys/rebootmgr ] ; then
379 /etc/rc.d/init.d/rebootmgr stop >&2
381 if [ -r /var/lock/subsys/vservers-legacy ] ; then
382 /etc/rc.d/init.d/vservers-legacy stop >&2
384 /sbin/chkconfig --del rebootmgr
385 /sbin/chkconfig --del vservers-legacy
389 %defattr(644,root,root,755)
390 %doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt
391 %{?with_doc:%doc doc/*.html}
392 %dir %{_sysconfdir}/vservers
393 %dir %{_sysconfdir}/vservers/.defaults
394 %dir %{_sysconfdir}/vservers/.defaults/apps
395 %dir %{_sysconfdir}/vservers/.defaults/files
396 %{_sysconfdir}/vservers/.defaults/vdirbase
397 %{_sysconfdir}/vservers/.defaults/run.rev
398 %{_sysconfdir}/vservers/vdirbase
399 %{_sysconfdir}/vservers/run.rev
401 %attr(755,root,root) %{_sbindir}/exec-cd
402 %attr(755,root,root) %{_sbindir}/vdu
403 %attr(755,root,root) %{_sbindir}/vps
404 %attr(755,root,root) %{_sbindir}/vpstree
405 %attr(755,root,root) %{_sbindir}/vserver
406 %attr(755,root,root) %{_sbindir}/vserver-stat
407 %attr(755,root,root) %{_sbindir}/vsomething
408 %attr(755,root,root) %{_sbindir}/vtop
409 %dir %{_libdir}/%{name}
410 %dir %{_libdir}/%{name}/defaults
411 %{_libdir}/%{name}/defaults/*
412 %attr(755,root,root) %{_libdir}/%{name}/capchroot
413 %attr(755,root,root) %{_libdir}/%{name}/chain-echo
414 %attr(755,root,root) %{_libdir}/%{name}/check-unixfile
415 %attr(755,root,root) %{_libdir}/%{name}/chroot-*
416 %attr(755,root,root) %{_libdir}/%{name}/exec-ulimit
417 %attr(755,root,root) %{_libdir}/%{name}/fakerunlevel
418 %attr(755,root,root) %{_libdir}/%{name}/filetime
419 %{_libdir}/%{name}/functions
420 %attr(755,root,root) %{_libdir}/%{name}/keep-ctx-alive
421 %attr(755,root,root) %{_libdir}/%{name}/lockfile
422 %attr(755,root,root) %{_libdir}/%{name}/mask2prefix
423 %attr(755,root,root) %{_libdir}/%{name}/readlink
424 %attr(755,root,root) %{_libdir}/%{name}/save_ctxinfo
425 %attr(755,root,root) %{_libdir}/%{name}/secure-mount
426 %attr(755,root,root) %{_libdir}/%{name}/sigexec
427 %attr(755,root,root) %{_libdir}/%{name}/start-vservers
428 %attr(755,root,root) %{_libdir}/%{name}/vprocunhide
429 %{_libdir}/%{name}/vserver.*
430 %attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh
431 %attr(755,root,root) %{_libdir}/%{name}/vshelper
432 %attr(755,root,root) %{_libdir}/%{name}/vshelper-sync
434 %attr(0,root,root) %dir /vservers
435 %attr(755,root,root) %dir /vservers/.pkg
436 %dir %{_localstatedir}/run/vservers
437 %dir %{_localstatedir}/run/vservers.rev
438 %dir %{_localstatedir}/run/vshelper
441 %defattr(644,root,root,755)
442 %{?with_doc:%doc lib/apidoc/latex/refman.pdf lib/apidoc/html}
443 %attr(755,root,root) %{_libdir}/lib*.so
445 %{_includedir}/vserver*.h
446 %{_pkgconfigdir}/*.pc
449 %defattr(644,root,root,755)
450 %{_libdir}/libvserver.a
453 %defattr(644,root,root,755)
454 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper
459 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-default
460 %attr(754,root,root) /etc/rc.d/init.d/vprocunhide
461 %attr(754,root,root) /etc/rc.d/init.d/vservers-default
464 %defattr(644,root,root,755)
465 %dir %{_libdir}/%{name}
466 %{_libdir}/%{name}/FEATURES.txt
467 %{_libdir}/%{name}/util-vserver-vars
468 %attr(755,root,root) %{_libdir}/%{name}/chcontext-compat
469 %attr(755,root,root) %{_sbindir}/chbind
470 %attr(755,root,root) %{_sbindir}/chcontext
471 %attr(755,root,root) %{_sbindir}/chxid
472 %attr(755,root,root) %{_sbindir}/lsxid
473 %attr(755,root,root) %{_sbindir}/reducecap
474 %attr(755,root,root) %{_sbindir}/setattr
475 %attr(755,root,root) %{_sbindir}/showattr
476 %attr(755,root,root) %{_sbindir}/vattribute
477 %attr(755,root,root) %{_sbindir}/vcontext
478 %attr(755,root,root) %{_sbindir}/vdlimit
479 %attr(755,root,root) %{_sbindir}/vnamespace
480 %attr(755,root,root) %{_sbindir}/vkill
481 %attr(755,root,root) %{_sbindir}/vlimit
482 %attr(755,root,root) %{_sbindir}/vrsetup
483 %attr(755,root,root) %{_sbindir}/vsched
484 %attr(755,root,root) %{_sbindir}/vserver-info
485 %attr(755,root,root) %{_sbindir}/vuname
486 %{_mandir}/man8/chbind*
487 %{_mandir}/man8/chcontext*
488 %{_mandir}/man8/reducecap*
491 %defattr(644,root,root,755)
492 %doc contrib/yum*.patch package-menagament.txt
493 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify
494 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify/hash
495 %dir %{_sysconfdir}/vservers/.distributions
496 %dir %{_sysconfdir}/vservers/.distributions/.common
497 %dir %{_sysconfdir}/vservers/.distributions/.common/pubkeys
498 %dir %{_sysconfdir}/vservers/.distributions/[frs]*
499 %dir %{_sysconfdir}/vservers/.distributions/[frs]*/apt
500 %dir %{_sysconfdir}/vservers/.distributions/pld2.0
501 %dir %{_sysconfdir}/vservers/.distributions/pld2.0/poldek
502 %{_sysconfdir}/vservers/.distributions/pld1.99
503 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/[frs]*/apt/sources.list
504 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/vservers/.distributions/pld2.0/poldek/poldek.conf
505 %attr(755,root,root) %{_libdir}/%{name}/rpm-fake*
506 %dir %{_libdir}/%{name}/distributions
507 %attr(-, root, root) %{_libdir}/%{name}/distributions/*
508 %{_libdir}/%{name}/vserver-build.*
509 %{_libdir}/%{name}/vserver-setup.functions
510 %{_libdir}/%{name}/defaults/fstab
511 %{_libdir}/%{name}/defaults/debootstrap.uri
512 %{_libdir}/%{name}/defaults/vunify-exclude
513 %attr(755,root,root) %{_libdir}/%{name}/pkgmgmt
514 %attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker
515 %attr(755,root,root) %{_libdir}/%{name}/vbuild
516 %attr(755,root,root) %{_libdir}/%{name}/vcheck
517 %attr(755,root,root) %{_libdir}/%{name}/vcopy
518 %attr(755,root,root) %{_libdir}/%{name}/vhashify
519 %attr(755,root,root) %{_libdir}/%{name}/vpkg
520 %attr(755,root,root) %{_libdir}/%{name}/vpoldek-worker
521 %attr(755,root,root) %{_libdir}/%{name}/vrpm-*
522 %attr(755,root,root) %{_libdir}/%{name}/vserver-build
523 %attr(755,root,root) %{_libdir}/%{name}/vunify
524 %attr(755,root,root) %{_libdir}/%{name}/vyum-worker
525 %attr(755,root,root) %{_sbindir}/vapt-get
526 %attr(755,root,root) %{_sbindir}/vfiles
527 %attr(755,root,root) %{_sbindir}/vpoldek
528 %attr(755,root,root) %{_sbindir}/vrpm
529 %attr(755,root,root) %{_sbindir}/vyum
530 %{_mandir}/man8/vserver-copy*
533 %defattr(644,root,root,755)
536 %dir %{_libdir}/%{name}/legacy
537 %attr(755,root,root) %{_libdir}/%{name}/legacy/*
538 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-legacy
539 %attr(754,root,root) /etc/rc.d/init.d/v_*
540 %attr(754,root,root) /etc/rc.d/init.d/rebootmgr
541 %attr(754,root,root) /etc/rc.d/init.d/vservers-legacy
542 %attr(755,root,root) %{_sbindir}/vserver-copy
543 %{_mandir}/man8/distrib-info*
544 %{_mandir}/man8/rebootmgr*
545 %{_mandir}/man8/vps.*
547 %files -n vserver-dev
548 %defattr(644,root,root,755)
550 %dev(c,1,7) %attr(666,root,root) /dev/full
551 %dev(c,1,3) %attr(666,root,root) /dev/null
552 %dev(c,5,2) %attr(666,root,root) /dev/ptmx
553 %dev(c,1,8) %attr(644,root,root) /dev/random
554 %dev(c,5,0) %attr(666,root,root) /dev/tty
555 %dev(c,1,9) %attr(644,root,root) /dev/urandom
556 %dev(c,1,5) %attr(666,root,root) /dev/zero