]> git.pld-linux.org Git - packages/util-vserver.git/blob - util-vserver.spec
d03929bb4fb6765e541b57b77ba1f8468147aa78
[packages/util-vserver.git] / util-vserver.spec
1 #
2 # Conditional build:
3 %bcond_with     dietlibc        # use dietlibc instead of glibc
4 %bcond_with     xalan           # use the xalan xslt processor
5
6 Summary:        Linux virtual server utilities
7 Summary(pl):    Narzêdzia dla linuksowych serwerów wirtualnych
8 Name:           util-vserver
9 Version:        0.30.207
10 Release:        0.3
11 Epoch:          0
12 License:        GPL
13 Group:          Base
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 Patch0:         %{name}-no-kernel-includes.patch
23 Patch1:         %{name}-vsysvwrapper.patch
24 URL:            http://savannah.nongnu.org/projects/util-vserver/
25 BuildRequires:  e2fsprogs-devel
26 BuildRequires:  libxslt-progs
27 BuildRequires:  vlan
28 %{?with_dietlibc:BuildRequires: dietlibc >= 0:0.25}
29 %{?with_xalan:BuildRequires:    xalan-j}
30 PreReq:         rc-scripts
31 Requires(post,preun):   /sbin/chkconfig
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 This package provides the components and a framework to setup virtual
36 servers. A virtual server runs inside a Linux server. It is
37 nevertheless highly independent. As such, you can run various services
38 with normal configuration. The various vservers can't interact with
39 each other and can't interact with services in the main server.
40
41 This requires a special kernel supporting the new new_s_context and
42 set_ipv4root system call.
43
44 %description -l pl
45 Ten pakiet dostarcza sk³adniki i szkielet do tworzenia wirtualnych
46 serwerów. Wirtualny serwer dzia³a wewn±trz serwera linuksowego, lecz
47 jest od niego w du¿ym stopniu niezale¿ny. Jako taki mo¿e uruchamiaæ
48 ró¿ne us³ugi z normaln± konfiguracj±. Ró¿ne vserwery nie mog± wchodziæ
49 w interakcjê z innymi ani z us³ugami na g³ównym serwerze.
50
51 Wymaga to specjalnego j±dra obs³uguj±cego nowe wywo³ania systemowe
52 new_s_context i set_ipv4root.
53
54 %package devel
55 Summary:        Development files for Linux vserver libraries
56 Summary(pl):    Pliki programistyczne dla bibliotek linuksowego vserwera
57 Group:          Development/Libraries
58 Requires:       %{name} = %{version}-%{release}
59
60 %description devel
61 This package contains the development files necessary for developing
62 programs which use vserver library.
63
64 %description devel -l pl
65 Ten pakiet zawiera pliki programistyczne konieczne do rozwijania
66 programów u¿ywaj±cych biblioteki vserver.
67
68 %package static
69 Summary:        Static vserver library
70 Summary(pl):    Biblioteka statyczna vservera
71 Group:          Development/Libraries
72 Requires:       %{name}-devel = %{version}-%{release}
73
74 %description static
75 This package contains the static version of vserver library.
76
77 %description static -l pl
78 Ten pakiet zawiera statyczn± wersjê biblioteki vservera.
79
80 %package lib
81 Summary:        Dynamic libraries for util-vserver
82 Group:          Libraries
83
84 %description lib
85 util-vserver provides the components and a framework to setup virtual
86 servers. A virtual server runs inside a linux server. It is
87 nevertheless highly independent. As such, you can run various services
88 with normal configuration. The various vservers can't interact with
89 each other and can't interact with services in the main server.
90
91 This package contains the shared libraries needed by all other
92 'util-vserver' subpackages.
93
94 %package core
95 Summary:        The core-utilities for util-vserver
96 Group:          Applications/System
97 Requires:       util-linux
98
99 %description core
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.
105
106 This package contains utilities which are required to communicate with
107 the Linux-Vserver enabled kernel.
108
109 %package build
110 Summary:        Tools which can be used to build vservers
111 Group:          Applications/System
112 Requires:       rpm apt wget binutils tar e2fsprogs
113 Requires:       %{name} = %{version}-%{release}
114
115 %description build
116 util-vserver provides the components and a framework to setup virtual
117 servers. A virtual server runs inside a linux server. It is
118 nevertheless highly independent. As such, you can run various services
119 with normal configuration. The various vservers can't interact with
120 each other and can't interact with services in the main server.
121
122 This package contains utilities which assist in building Vservers.
123
124 %package init
125 Summary:        initscripts for vserver
126 Group:          Base
127 Requires:       make
128 Requires:       diffutils
129 Requires:       rc-scripts
130 Requires:       %{name} = %{version}-%{release}
131 Requires:       %{name}-core = %{version}-%{release}
132 Requires(post,preun):   /sbin/chkconfig
133
134 %description init
135 util-vserver provides the components and a framework to setup virtual
136 servers. A virtual server runs inside a linux server. It is
137 nevertheless highly independent. As such, you can run various services
138 with normal configuration. The various vservers can't interact with
139 each other and can't interact with services in the main server.
140
141 This package contains the SysV initscripts which start and stop
142 VServers and related tools.
143
144 %package legacy
145 Summary:        Legacy utilities for util-vserver
146 Group:          Applications/System
147 Requires:       rc-scripts
148 Requires:       %{name} = %{version}-%{release}
149 Requires:       %{name}-core = %{version}-%{release}
150 Requires(post,preun):   /sbin/chkconfig
151
152 %description legacy
153 util-vserver provides the components and a framework to setup virtual
154 servers. A virtual server runs inside a linux server. It is
155 nevertheless highly independent. As such, you can run various services
156 with normal configuration. The various vservers can't interact with
157 each other and can't interact with services in the main server.
158
159 This package contains the tools which are needed to work with VServers
160 having an old-style configuration.
161
162 %prep
163 %setup -q
164 %patch0 -p1
165 %patch1 -p1
166
167 %build
168 %configure \
169         --with-initrddir=/etc/rc.d/init.d \
170         --enable-release \
171         %{?with_dietlibc:--enable-dietlibc} \
172         %{!?with_dietlibc:--disable-dietlibc}
173
174 %{__make} all
175 %{__make} doc
176
177 %install
178 rm -rf $RPM_BUILD_ROOT
179 install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d}}
180
181 %{__make} install install-distribution \
182         DESTDIR=$RPM_BUILD_ROOT
183
184 install -d $RPM_BUILD_ROOT/etc/vservices
185 install -d $RPM_BUILD_ROOT/vservers/.pkg
186 ln -s /vservers $RPM_BUILD_ROOT%{_sysconfdir}/vservers/vdirbase
187 ln -s %{_localstatedir}/run/vservers.rev $RPM_BUILD_ROOT%{_sysconfdir}/vservers/run.rev
188
189 for i in $RPM_BUILD_ROOT/etc/rc.d/init.d/v_* ; do
190         s=`basename $i | sed s/v_//`
191         cat >$RPM_BUILD_ROOT/etc/vservices/$s << EOF
192 # IP addresses/interfaces to bound $s service to
193 #IP=10.0.0.1
194 #IP=eth0
195 EOF
196 done
197
198 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/vprocunhide
199 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-default
200 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-legacy
201 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/rebootmgr
202 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/vservers-default
203 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/vservers-legacy
204
205 %clean
206 rm -rf $RPM_BUILD_ROOT
207
208 %post
209 %{_sbindir}/setattr --barrier /vservers || :
210
211 %post lib -p /sbin/ldconfig
212 %postun lib -p /sbin/ldconfig
213
214 %post init
215 /sbin/chkconfig --add vservers-default
216 /sbin/chkconfig --add vprocunhide
217 #if [ -r /var/lock/subsys/vprocunhide ]; then
218 #       /etc/rc.d/init.d/vprocunhide restart >&2
219 #fi
220 #if [ -r /var/lock/subsys/vservers-default ]; then
221 #       /etc/rc.d/init.d/vservers-default restart >&2
222 #fi
223
224 %preun init
225 if [ "$1" = "0" ]; then
226         if [ -r /var/lock/subsys/vprocunhide ]; then
227                 /etc/rc.d/init.d/vprocunhide stop >&2
228         fi
229         if [ -r /var/lock/subsys/vservers-default ]; then
230                 /etc/rc.d/init.d/vservers-default stop >&2
231         fi
232         /sbin/chkconfig --del vprocunhide
233         /sbin/chkconfig --del vservers-default
234 fi
235
236 %post legacy
237 /sbin/chkconfig --add rebootmgr
238 /sbin/chkconfig --add vservers-legacy
239 #if [ -r /var/lock/subsys/rebootmgr ] ; then
240 #       /etc/rc.d/init.d/rebootmgr restart >&2
241 #fi
242 #if [ -r /var/lock/subsys/vservers-legacy ] ; then
243 #       /etc/rc.d/init.d/vservers-legacy restart >&2
244 #fi
245
246 %preun legacy
247 if [ "$1" = "0" ]; then
248         if [ -r /var/lock/subsys/rebootmgr ] ; then
249                 /etc/rc.d/init.d/rebootmgr stop >&2
250         fi
251         if [ -r /var/lock/subsys/vservers-legacy ] ; then
252                 /etc/rc.d/init.d/vservers-legacy stop >&2
253         fi
254         /sbin/chkconfig --del rebootmgr
255         /sbin/chkconfig --del vservers-legacy
256 fi
257
258 %files
259 %defattr(644,root,root,755)
260 %doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt doc/*.html
261 %dir %{_sysconfdir}/vservers
262 %dir %{_sysconfdir}/vservers/.defaults
263 %dir %{_sysconfdir}/vservers/.defaults/apps
264 %dir %{_sysconfdir}/vservers/.defaults/files
265 %ghost %{_sysconfdir}/vservers/.defaults/vdirbase
266 %ghost %{_sysconfdir}/vservers/.defaults/run.rev
267 %{_sysconfdir}/vservers/vdirbase
268 %{_sysconfdir}/vservers/run.rev
269 /sbin/vshelper
270 %attr(755,root,root) %{_sbindir}/exec-cd
271 %attr(755,root,root) %{_sbindir}/vdu
272 %attr(755,root,root) %{_sbindir}/vps
273 %attr(755,root,root) %{_sbindir}/vpstree
274 %attr(755,root,root) %{_sbindir}/vserver
275 %attr(755,root,root) %{_sbindir}/vserver-stat
276 %attr(755,root,root) %{_sbindir}/vsomething
277 %attr(755,root,root) %{_sbindir}/vtop
278 %dir %{_libdir}/%{name}
279 %dir %{_libdir}/%{name}/defaults
280 %{_libdir}/%{name}/defaults/*
281 %attr(755,root,root) %{_libdir}/%{name}/capchroot
282 %attr(755,root,root) %{_libdir}/%{name}/chain-echo
283 %attr(755,root,root) %{_libdir}/%{name}/check-unixfile
284 %attr(755,root,root) %{_libdir}/%{name}/chroot-*
285 %attr(755,root,root) %{_libdir}/%{name}/exec-ulimit
286 %attr(755,root,root) %{_libdir}/%{name}/fakerunlevel
287 %attr(755,root,root) %{_libdir}/%{name}/filetime
288 %{_libdir}/%{name}/functions
289 %attr(755,root,root) %{_libdir}/%{name}/keep-ctx-alive
290 %attr(755,root,root) %{_libdir}/%{name}/lockfile
291 %attr(755,root,root) %{_libdir}/%{name}/mask2prefix
292 %attr(755,root,root) %{_libdir}/%{name}/readlink
293 %attr(755,root,root) %{_libdir}/%{name}/save_ctxinfo
294 %attr(755,root,root) %{_libdir}/%{name}/secure-mount
295 %attr(755,root,root) %{_libdir}/%{name}/sigexec
296 %attr(755,root,root) %{_libdir}/%{name}/start-vservers
297 %attr(755,root,root) %{_libdir}/%{name}/vprocunhide
298 %{_libdir}/%{name}/vserver.*
299 %attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh
300 %attr(755,root,root) %{_libdir}/%{name}/vshelper
301 %attr(755,root,root) %{_libdir}/%{name}/vshelper-sync
302 %{_mandir}/man8/*
303 %attr(0,root,root) %dir /vservers
304 %attr(755,root,root) %dir /vservers/.pkg
305 %dir %{_localstatedir}/run/vservers
306 %dir %{_localstatedir}/run/vservers.rev
307 %dir %{_localstatedir}/run/vshelper
308
309 %files devel
310 %defattr(644,root,root,755)
311 %doc lib/apidoc/latex/refman.pdf lib/apidoc/html
312 %attr(755,root,root) %{_libdir}/lib*.so
313 %{_libdir}/lib*.la
314 %{_includedir}/vserver.h
315 %{_pkgconfigdir}/*.pc
316
317 %files static
318 %defattr(644,root,root,755)
319 %{_libdir}/libvserver.a
320
321 %files lib
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
324
325 %files init
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper
328 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-default
329 %attr(754,root,root) /etc/rc.d/init.d/vprocunhide
330 %attr(754,root,root) /etc/rc.d/init.d/vservers-default
331
332 %files core
333 %defattr(644,root,root,755)
334 %dir %{_libdir}/%{name}
335 %{_libdir}/%{name}/FEATURES.txt
336 %{_libdir}/%{name}/util-vserver-vars
337 %attr(755,root,root) %{_libdir}/%{name}/chcontext-compat
338 %attr(755,root,root) %{_sbindir}/chbind
339 %attr(755,root,root) %{_sbindir}/chcontext
340 %attr(755,root,root) %{_sbindir}/chxid
341 %attr(755,root,root) %{_sbindir}/lsxid
342 %attr(755,root,root) %{_sbindir}/reducecap
343 %attr(755,root,root) %{_sbindir}/setattr
344 %attr(755,root,root) %{_sbindir}/showattr
345 %attr(755,root,root) %{_sbindir}/vattribute
346 %attr(755,root,root) %{_sbindir}/vcontext
347 %attr(755,root,root) %{_sbindir}/vdlimit
348 %attr(755,root,root) %{_sbindir}/vnamespace
349 %attr(755,root,root) %{_sbindir}/vkill
350 %attr(755,root,root) %{_sbindir}/vlimit
351 %attr(755,root,root) %{_sbindir}/vrsetup
352 %attr(755,root,root) %{_sbindir}/vsched
353 %attr(755,root,root) %{_sbindir}/vserver-info
354 %attr(755,root,root) %{_sbindir}/vuname
355 %{_mandir}/man8/chbind*
356 %{_mandir}/man8/chcontext*
357 %{_mandir}/man8/reducecap*
358
359 %files build
360 %defattr(644,root,root,755)
361 %doc contrib/yum*.patch
362 %dir %{_sysconfdir}/vservers/.distributions
363 %{_sysconfdir}/vservers/.distributions/.common
364 %{_sysconfdir}/vservers/.distributions/*
365 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify
366 %dir %{_sysconfdir}/vservers/.defaults/apps/vunify/hash
367 %attr(755,root,root) %{_libdir}/%{name}/rpm-fake*
368 %dir %{_libdir}/%{name}/distributions
369 %{_libdir}/%{name}/distributions/*
370 %{_libdir}/%{name}/vserver-build.*
371 %{_libdir}/%{name}/vserver-setup.functions
372 %{_libdir}/%{name}/defaults/fstab
373 %{_libdir}/%{name}/defaults/debootstrap.uri
374 %{_libdir}/%{name}/defaults/vunify-exclude
375 %attr(755,root,root) %{_libdir}/%{name}/pkgmgmt
376 %attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker
377 %attr(755,root,root) %{_libdir}/%{name}/vbuild
378 %attr(755,root,root) %{_libdir}/%{name}/vcheck
379 %attr(755,root,root) %{_libdir}/%{name}/vcopy
380 %attr(755,root,root) %{_libdir}/%{name}/vhashify
381 %attr(755,root,root) %{_libdir}/%{name}/vpkg
382 %attr(755,root,root) %{_libdir}/%{name}/vrpm-*
383 %attr(755,root,root) %{_libdir}/%{name}/vserver-build
384 %attr(755,root,root) %{_libdir}/%{name}/vunify
385 %attr(755,root,root) %{_libdir}/%{name}/vyum-worker
386 %attr(755,root,root) %{_sbindir}/vapt-get
387 %attr(755,root,root) %{_sbindir}/vfiles
388 %attr(755,root,root) %{_sbindir}/vrpm
389 %attr(755,root,root) %{_sbindir}/vyum
390 %{_mandir}/man8/vserver-copy*
391
392 %files legacy
393 %defattr(644,root,root,755)
394 %dir /etc/vservices
395 /etc/vservices/*
396 %dir %{_libdir}/%{name}/legacy
397 %attr(755,root,root) %{_libdir}/%{name}/legacy/*
398 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-legacy
399 %attr(754,root,root) /etc/rc.d/init.d/v_*
400 %attr(754,root,root) /etc/rc.d/init.d/rebootmgr
401 %attr(754,root,root) /etc/rc.d/init.d/vservers-legacy
402 %attr(755,root,root) %{_sbindir}/vserver-copy
403 %{_mandir}/man8/distrib-info*
404 %{_mandir}/man8/rebootmgr*
405 %{_mandir}/man8/vps.*
This page took 0.075903 seconds and 2 git commands to generate.