]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - somewhy empty /var/cache/vservers is needed when building pld vserver | |
3 | # - make build create /dev/std{in,out,err} links | |
4 | # - reject install in %pre if /proc/virtual/info has incompatible version | |
5 | # | |
6 | # m68k and mips are the only not supported archs | |
7 | # | |
8 | # Conditional build: | |
9 | %bcond_without dietlibc # don't use dietlibc (ask for troubles) | |
10 | %bcond_without doc # don't build documentation which needed LaTeX | |
11 | %bcond_without no_dynamic_context # disable enforcement of disabled dynamic context | |
12 | %bcond_with xalan # use the xalan xslt processor | |
13 | # | |
14 | %define _vproc_version 0.01 | |
15 | # diet compile fails with ccache in %{__cc} | |
16 | %undefine with_ccache | |
17 | # | |
18 | Summary: Linux virtual server utilities | |
19 | Summary(pl.UTF-8): Narzędzia dla linuksowych serwerów wirtualnych | |
20 | Name: util-vserver | |
21 | Version: 0.30.213 | |
22 | Release: 1.1 | |
23 | License: GPL | |
24 | Group: Applications/System | |
25 | Source0: http://ftp.linux-vserver.org/pub/utils/util-vserver/%{name}-%{version}.tar.bz2 | |
26 | # Source0-md5: 2a444e725f7789f751ade259a38553ed | |
27 | Source1: vprocunhide.init | |
28 | Source2: vservers.init | |
29 | Source3: vservers-legacy.init | |
30 | Source4: rebootmgr.init | |
31 | Source5: vservers.sysconfig | |
32 | Source6: vservers-legacy.sysconfig | |
33 | Source7: vrootdevices.init | |
34 | Source8: vrootdevices.sysconfig | |
35 | # A bit of documentation explaining package management | |
36 | # http://www.paul.sladen.org/vserver/archives/200505/0078.html | |
37 | Source9: %{name}-pkgmgmt.txt | |
38 | Source10: %{name}-initpost.sh | |
39 | Source11: http://www.13thfloor.at/vserver/s_release/v1.2.10/vproc-%{_vproc_version}.tar.bz2 | |
40 | # Source11-md5: 1d030717bdbc958ea4b35fd2410dad85 | |
41 | Source12: %{name}-vhashify.cron | |
42 | Patch0: %{name}-vsysvwrapper.patch | |
43 | Patch1: %{name}-pld.patch | |
44 | Patch2: %{name}-vrpm.patch | |
45 | Patch3: %{name}-include.patch | |
46 | Patch4: %{name}-m4-diet.patch | |
47 | Patch6: %{name}-build-umask.patch | |
48 | Patch7: %{name}-utmpx.patch | |
49 | Patch8: %{name}-vprocunhide.patch | |
50 | Patch9: %{name}-dev.patch | |
51 | Patch10: %{name}-no-dynamic-ctx.patch | |
52 | Patch11: %{name}-more-ip.patch | |
53 | Patch12: %{name}-rpm-fake-resolver-badperm-errorlogging.patch | |
54 | URL: http://savannah.nongnu.org/projects/util-vserver/ | |
55 | BuildRequires: autoconf | |
56 | BuildRequires: automake >= 1.9 | |
57 | BuildRequires: beecrypt-devel | |
58 | %{?with_dietlibc:BuildRequires: dietlibc-static >= 2:0.29} | |
59 | BuildRequires: e2fsprogs-devel | |
60 | BuildRequires: libstdc++-devel | |
61 | BuildRequires: libtool >= 1.5.14 | |
62 | %ifarch %{x8664} | |
63 | BuildRequires: sed >= 4.0 | |
64 | %endif | |
65 | BuildRequires: rpmbuild(macros) >= 1.268 | |
66 | %if %{with doc} | |
67 | BuildRequires: doxygen | |
68 | BuildRequires: graphviz | |
69 | BuildRequires: libxslt-progs | |
70 | BuildRequires: tetex-format-pdflatex | |
71 | BuildRequires: tetex-makeindex | |
72 | # To be removed when tetex-format-pdflatex, tetex-pdftex... | |
73 | # ...and graphviz packages get fixed | |
74 | BuildRequires: ghostscript | |
75 | BuildRequires: ghostscript-fonts-std | |
76 | BuildRequires: tetex-fonts-jknappen | |
77 | BuildRequires: tetex-metafont | |
78 | %{?with_xalan:BuildRequires: xalan-j} | |
79 | %endif | |
80 | Requires(post,preun): /sbin/chkconfig | |
81 | Requires: %{name}-lib = %{version}-%{release} | |
82 | Requires: issue | |
83 | Requires: mktemp >= 1.5-18 | |
84 | Requires: rc-scripts | |
85 | Requires: util-linux | |
86 | Obsoletes: util-vserver-core | |
87 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
88 | ||
89 | # for adapter | |
90 | %define _usrbin /usr/bin | |
91 | %define _usrsbin /usr/sbin | |
92 | %define _usrlib /usr/lib | |
93 | ||
94 | %description | |
95 | This package provides the components and a framework to setup virtual | |
96 | servers. A virtual server runs inside a Linux server. It is | |
97 | nevertheless highly independent. As such, you can run various services | |
98 | with normal configuration. The various vservers can't interact with | |
99 | each other and can't interact with services in the main server. | |
100 | ||
101 | This requires a special kernel supporting the new new_s_context and | |
102 | set_ipv4root system call. | |
103 | ||
104 | This package contains utilities which are required to communicate with | |
105 | the Linux-Vserver enabled kernel. | |
106 | ||
107 | %description -l pl.UTF-8 | |
108 | Ten pakiet dostarcza składniki i szkielet do tworzenia wirtualnych | |
109 | serwerów. Wirtualny serwer działa wewnątrz serwera linuksowego, lecz | |
110 | jest od niego w dużym stopniu niezależny. Jako taki może uruchamiać | |
111 | różne usługi z normalną konfiguracją. Różne vserwery nie mogą wchodzić | |
112 | w interakcję z innymi ani z usługami na głównym serwerze. | |
113 | ||
114 | Wymaga to specjalnego jądra obsługującego nowe wywołania systemowe | |
115 | new_s_context i set_ipv4root. | |
116 | ||
117 | Ten pakiet zawiera narzędzia wymagane do komunikacji z jądrem z | |
118 | włączonym mechanizmem Linux-Vserver. | |
119 | ||
120 | %package devel | |
121 | Summary: Development files for Linux vserver libraries | |
122 | Summary(pl.UTF-8): Pliki programistyczne dla bibliotek linuksowego vserwera | |
123 | Group: Development/Libraries | |
124 | Requires: %{name}-lib = %{version}-%{release} | |
125 | ||
126 | %description devel | |
127 | This package contains the development files necessary for developing | |
128 | programs which use vserver library. | |
129 | ||
130 | %description devel -l pl.UTF-8 | |
131 | Ten pakiet zawiera pliki programistyczne konieczne do rozwijania | |
132 | programów używających biblioteki vserver. | |
133 | ||
134 | %package static | |
135 | Summary: Static vserver library | |
136 | Summary(pl.UTF-8): Biblioteka statyczna vservera | |
137 | Group: Development/Libraries | |
138 | Requires: %{name}-devel = %{version}-%{release} | |
139 | ||
140 | %description static | |
141 | This package contains the static version of vserver library. | |
142 | ||
143 | %description static -l pl.UTF-8 | |
144 | Ten pakiet zawiera statyczną wersję biblioteki vservera. | |
145 | ||
146 | %package lib | |
147 | Summary: Dynamic libraries for util-vserver | |
148 | Summary(pl.UTF-8): Biblioteki dynamiczne dla pakietu util-vserver | |
149 | Group: Libraries | |
150 | ||
151 | %description lib | |
152 | util-vserver provides the components and a framework to setup virtual | |
153 | servers. A virtual server runs inside a linux server. It is | |
154 | nevertheless highly independent. As such, you can run various services | |
155 | pith normal configuration. The various vservers can't interact with | |
156 | each other and can't interact with services in the main server. | |
157 | ||
158 | This package contains the shared libraries needed by all other | |
159 | 'util-vserver' subpackages. | |
160 | ||
161 | %description lib -l pl.UTF-8 | |
162 | util-vserver dostarcza składniki i szkielet do tworzenia wirtualnych | |
163 | serwerów. Wirtualny serwer działa wewnątrz serwera linuksowego, lecz | |
164 | jest od niego w dużym stopniu niezależny. Jako taki może uruchamiać | |
165 | różne usługi z normalną konfiguracją. Różne vserwery nie mogą wchodzić | |
166 | w interakcję z innymi ani z usługami na głównym serwerze. | |
167 | ||
168 | Ten pakiet zawiera biblioteki współdzielone wymagane przez wszystkie | |
169 | podpakiety util-vserver. | |
170 | ||
171 | %package build | |
172 | Summary: Tools which can be used to build vservers | |
173 | Summary(pl.UTF-8): Narzędzia do budowania vserverów | |
174 | Group: Applications/System | |
175 | Requires: %{name} = %{version}-%{release} | |
176 | Requires: /etc/pld-release | |
177 | Requires: e2fsprogs | |
178 | Requires: which | |
179 | Conflicts: poldek < 0.18.8-10 | |
180 | ||
181 | %description build | |
182 | util-vserver provides the components and a framework to setup virtual | |
183 | servers. A virtual server runs inside a linux server. It is | |
184 | nevertheless highly independent. As such, you can run various services | |
185 | with normal configuration. The various vservers can't interact with | |
186 | each other and can't interact with services in the main server. | |
187 | ||
188 | This package contains utilities which assist in building Vservers. | |
189 | ||
190 | %description build -l pl.UTF-8 | |
191 | util-vserver dostarcza składniki i szkielet do tworzenia wirtualnych | |
192 | serwerów. Wirtualny serwer działa wewnątrz serwera linuksowego, lecz | |
193 | jest od niego w dużym stopniu niezależny. Jako taki może uruchamiać | |
194 | różne usługi z normalną konfiguracją. Różne vserwery nie mogą wchodzić | |
195 | w interakcję z innymi ani z usługami na głównym serwerze. | |
196 | ||
197 | Ten pakiet zawiera narzędzia pomagające przy budowaniu Vserwerów. | |
198 | ||
199 | %package -n vserver-distro-fedora | |
200 | Summary: VServer build templates for Fedora Core | |
201 | Summary(pl.UTF-8): Szablony do tworzenia VServerów dla dystrybucji Fedora Core | |
202 | Group: Applications/System | |
203 | Requires: %{name}-build = %{version}-%{release} | |
204 | Requires: binutils | |
205 | Requires: e2fsprogs | |
206 | Requires: rpm | |
207 | Requires: tar | |
208 | Requires: wget | |
209 | ||
210 | %description -n vserver-distro-fedora | |
211 | VServer build templates for Fedora Core 1,2,3,4. | |
212 | ||
213 | %description -n vserver-distro-fedora -l pl.UTF-8 | |
214 | Szablony do tworzenia VServerów dla dystrybucji Fedora Core 1,2,3,4. | |
215 | ||
216 | %package -n vserver-distro-redhat | |
217 | Summary: VServer build template for Red Hat Linux 9 | |
218 | Summary(pl.UTF-8): Szablon do tworzenia VServerów dla dystrybucji Red Hat Linux 9 | |
219 | Group: Applications/System | |
220 | Requires: %{name}-build = %{version}-%{release} | |
221 | Requires: binutils | |
222 | Requires: e2fsprogs | |
223 | Requires: rpm | |
224 | Requires: tar | |
225 | Requires: wget | |
226 | ||
227 | %description -n vserver-distro-redhat | |
228 | VServer build template for RedHat Linux 9. | |
229 | ||
230 | %description -n vserver-distro-redhat -l pl.UTF-8 | |
231 | Szablon do tworzenia VServerów dla dystrybucji Red Hat Linux 9. | |
232 | ||
233 | %package -n vserver-distro-suse | |
234 | Summary: VServer build template for SuSE 9.1 | |
235 | Summary(pl.UTF-8): Szablon do tworzenia VServerów dla dystrybucji SuSE 9.1 | |
236 | Group: Applications/System | |
237 | Requires: %{name}-build = %{version}-%{release} | |
238 | Requires: binutils | |
239 | Requires: e2fsprogs | |
240 | Requires: rpm | |
241 | Requires: tar | |
242 | Requires: wget | |
243 | ||
244 | %description -n vserver-distro-suse | |
245 | VServer build template for SuSE Linux 9.1. | |
246 | ||
247 | %description -n vserver-distro-suse -l pl.UTF-8 | |
248 | Szablon do tworzenia VServerów dla dystrybucji SuSE 9.1. | |
249 | ||
250 | %package -n vserver-distro-centos | |
251 | Summary: VServer build template for CentOS 4.2 | |
252 | Summary(pl.UTF-8): Szablon budowania VServera dla CentOS 4.2 | |
253 | Group: Applications/System | |
254 | Requires: %{name}-build = %{version}-%{release} | |
255 | Requires: yum | |
256 | ||
257 | %description -n vserver-distro-centos | |
258 | VServer build template for CentOS 4. | |
259 | ||
260 | %description -n vserver-distro-centos -l pl.UTF-8 | |
261 | Szablon budowania VServera dla CentOS 4. | |
262 | ||
263 | %package -n vserver-distro-gentoo | |
264 | Summary: VServer build template for Gentoo | |
265 | Summary(pl.UTF-8): Szablon budowania VServera dla Gentoo | |
266 | Group: Applications/System | |
267 | Requires: %{name}-build = %{version}-%{release} | |
268 | ||
269 | %description -n vserver-distro-gentoo | |
270 | VServer build template for Gentoo. | |
271 | ||
272 | %description -n vserver-distro-gentoo -l pl.UTF-8 | |
273 | Szablon budowania VServera dla Gentoo. | |
274 | ||
275 | %package init | |
276 | Summary: initscripts for vserver | |
277 | Summary(pl.UTF-8): Skrypty inicjalizujące dla vserwera | |
278 | Group: Applications/System | |
279 | Requires(post,preun): /sbin/chkconfig | |
280 | Requires: %{name} = %{version}-%{release} | |
281 | Requires: diffutils | |
282 | Requires: make | |
283 | Requires: rc-scripts | |
284 | ||
285 | %description init | |
286 | util-vserver provides the components and a framework to setup virtual | |
287 | servers. A virtual server runs inside a linux server. It is | |
288 | nevertheless highly independent. As such, you can run various services | |
289 | with normal configuration. The various vservers can't interact with | |
290 | each other and can't interact with services in the main server. | |
291 | ||
292 | This package contains the SysV initscripts which start and stop | |
293 | Vservers and related tools. | |
294 | ||
295 | %description init -l pl.UTF-8 | |
296 | util-vserver dostarcza składniki i szkielet do tworzenia wirtualnych | |
297 | serwerów. Wirtualny serwer działa wewnątrz serwera linuksowego, lecz | |
298 | jest od niego w dużym stopniu niezależny. Jako taki może uruchamiać | |
299 | różne usługi z normalną konfiguracją. Różne vserwery nie mogą wchodzić | |
300 | w interakcję z innymi ani z usługami na głównym serwerze. | |
301 | ||
302 | Ten pakiet zawiera skrypty inicjalizujące SysV uruchamiające i | |
303 | zatrzymujące Vserwery oraz powiązane narzędzia. | |
304 | ||
305 | %package legacy | |
306 | Summary: Legacy utilities for util-vserver | |
307 | Summary(pl.UTF-8): Stare narzędzia dla util-vserver | |
308 | Group: Applications/System | |
309 | Requires(post,preun): /sbin/chkconfig | |
310 | Requires: %{name} = %{version}-%{release} | |
311 | Requires: rc-scripts | |
312 | ||
313 | %description legacy | |
314 | util-vserver provides the components and a framework to setup virtual | |
315 | servers. A virtual server runs inside a linux server. It is | |
316 | nevertheless highly independent. As such, you can run various services | |
317 | with normal configuration. The various vservers can't interact with | |
318 | each other and can't interact with services in the main server. | |
319 | ||
320 | This package contains the tools which are needed to work with Vservers | |
321 | having an old-style configuration. | |
322 | ||
323 | %description legacy -l pl.UTF-8 | |
324 | util-vserver dostarcza składniki i szkielet do tworzenia wirtualnych | |
325 | serwerów. Wirtualny serwer działa wewnątrz serwera linuksowego, lecz | |
326 | jest od niego w dużym stopniu niezależny. Jako taki może uruchamiać | |
327 | różne usługi z normalną konfiguracją. Różne vserwery nie mogą wchodzić | |
328 | w interakcję z innymi ani z usługami na głównym serwerze. | |
329 | ||
330 | Ten pakiet zawiera narzędzia potrzebne do pracy z Vserwerami mającymi | |
331 | konfigurację w starym stylu. | |
332 | ||
333 | %prep | |
334 | %setup -q -a11 | |
335 | %patch0 -p1 | |
336 | %patch1 -p1 | |
337 | %patch2 -p1 | |
338 | %patch3 -p1 | |
339 | %patch4 -p1 | |
340 | %patch6 -p1 | |
341 | %patch7 -p1 | |
342 | %patch8 -p1 | |
343 | %patch9 -p1 | |
344 | %{?with_no_dynamic_context:%patch10 -p1} | |
345 | %patch11 -p1 | |
346 | %patch12 -p1 | |
347 | ||
348 | install %{SOURCE9} package-management.txt | |
349 | ||
350 | cp -a compat.h vserver-compat.h | |
351 | ||
352 | %build | |
353 | unset LD_SYMBOLIC_FUNCTIONS || : | |
354 | ||
355 | %if %{with dietlibc} | |
356 | CFLAGS="%{rpmcflags} -D__GLIBC__ -D__KERNEL_STRICT_NAMES=1" | |
357 | %endif | |
358 | %{__aclocal} -I m4 | |
359 | %{__automake} | |
360 | %{__autoconf} | |
361 | %configure \ | |
362 | --with-initrddir=/etc/rc.d/init.d \ | |
363 | --enable-release \ | |
364 | --enable-apis=NOLEGACY \ | |
365 | --with-initscripts=sysv \ | |
366 | --%{?with_dietlibc:en}%{!?with_dietlibc:dis}able-dietlibc \ | |
367 | MKTEMP=/bin/mktemp \ | |
368 | MOUNT=/bin/mount \ | |
369 | PS=/bin/ps \ | |
370 | UMOUNT=/bin/umount \ | |
371 | IP=/sbin/ip \ | |
372 | IPTABLES=%{_usrsbin}/iptables \ | |
373 | MODPROBE=/sbin/modprobe \ | |
374 | NAMEIF=/sbin/nameif \ | |
375 | RMMOD=/sbin/rmmod \ | |
376 | VCONFIG=/sbin/vconfig \ | |
377 | WGET=%{_usrbin}/wget \ | |
378 | ||
379 | %{__make} all | |
380 | %{?with_doc:%{__make} doc} | |
381 | ||
382 | %{__make} -C vproc-%{_vproc_version} \ | |
383 | CC="%{__cc}" \ | |
384 | CFLAGS="%{rpmcflags}" | |
385 | ||
386 | %install | |
387 | rm -rf $RPM_BUILD_ROOT | |
388 | install -d $RPM_BUILD_ROOT{/vservers,/etc/{sysconfig,rc.d/init.d,cron.d},/dev/pts} \ | |
389 | $RPM_BUILD_ROOT{%{_sysconfdir}/vservices,/vservers/.pkg} | |
390 | ||
391 | %{__make} -j1 install install-distribution \ | |
392 | DESTDIR=$RPM_BUILD_ROOT | |
393 | ||
394 | cp -a vserver-compat.h $RPM_BUILD_ROOT%{_includedir} | |
395 | ||
396 | chmod -R +rX $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/* | |
397 | ||
398 | ln -s /vservers $RPM_BUILD_ROOT%{_sysconfdir}/vservers/vdirbase | |
399 | ln -s %{_localstatedir}/run/vservers.rev $RPM_BUILD_ROOT%{_sysconfdir}/vservers/run.rev | |
400 | ||
401 | for i in $RPM_BUILD_ROOT/etc/rc.d/init.d/v_* ; do | |
402 | s=`basename $i | sed s/v_//` | |
403 | cat >$RPM_BUILD_ROOT%{_sysconfdir}/vservices/$s << EOF | |
404 | # IP addresses/interfaces to bound $s service to | |
405 | #IP=10.0.0.1 | |
406 | #IP=eth0 | |
407 | EOF | |
408 | done | |
409 | ||
410 | sed 's|%{_usrlib}/util-vserver|%{_libdir}/%{name}|g' %{SOURCE1} > \ | |
411 | $RPM_BUILD_ROOT/etc/rc.d/init.d/vprocunhide | |
412 | sed 's|%{_usrlib}/util-vserver|%{_libdir}/%{name}|g' %{SOURCE2} > \ | |
413 | $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers | |
414 | sed 's|%{_usrlib}/util-vserver|%{_libdir}/%{name}|g' %{SOURCE3} > \ | |
415 | $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-legacy | |
416 | sed 's|%{_usrlib}/util-vserver|%{_libdir}/%{name}|g' %{SOURCE4} > \ | |
417 | $RPM_BUILD_ROOT/etc/rc.d/init.d/rebootmgr | |
418 | sed 's|%{_usrlib}/util-vserver|%{_libdir}/%{name}|g' %{SOURCE5} > \ | |
419 | $RPM_BUILD_ROOT/etc/sysconfig/vservers | |
420 | ||
421 | install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/vservers-legacy | |
422 | ||
423 | install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/vrootdevices | |
424 | install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/vrootdevices | |
425 | install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-ac/initpost | |
426 | install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-th/initpost | |
427 | install vproc-%{_vproc_version}/vproc $RPM_BUILD_ROOT%{_sbindir} | |
428 | install %{SOURCE12} $RPM_BUILD_ROOT%{_libdir}/%{name}/vhashify.cron | |
429 | ||
430 | cat > $RPM_BUILD_ROOT/etc/cron.d/vservers << EOF | |
431 | 02 2 * * 0 root %{_libdir}/%{name}/vhashify.cron | |
432 | EOF | |
433 | ||
434 | ln -sf null $RPM_BUILD_ROOT/dev/initctl | |
435 | ||
436 | %ifarch %{x8664} | |
437 | # ac i686 | |
438 | cp -a $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-ac \ | |
439 | $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-ac-i686 | |
440 | cp -a $RPM_BUILD_ROOT%{_sysconfdir}/vservers/.distributions/pld-ac \ | |
441 | $RPM_BUILD_ROOT%{_sysconfdir}/vservers/.distributions/pld-ac-i686 | |
442 | sed -i 's/x86_64/i686/g' $RPM_BUILD_ROOT%{_sysconfdir}/vservers/.distributions/pld-ac-i686/poldek/*.conf | |
443 | ||
444 | # th i686 | |
445 | cp -a $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-th \ | |
446 | $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-th-i686 | |
447 | cp -a $RPM_BUILD_ROOT%{_sysconfdir}/vservers/.distributions/pld-th \ | |
448 | $RPM_BUILD_ROOT%{_sysconfdir}/vservers/.distributions/pld-th-i686 | |
449 | sed -i 's/x86_64/i686/g' $RPM_BUILD_ROOT%{_sysconfdir}/vservers/.distributions/pld-th-i686/poldek/*.conf | |
450 | ||
451 | # ac x86_64 | |
452 | sed -i 's/^glibc$/glibc64/' $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-ac/pkgs/01 | |
453 | sed -i 's/glibc\-\[0\-9\]\*\.rpm/glibc64\-\[0\-9\]\*\.rpm/' $RPM_BUILD_ROOT%{_libdir}/%{name}/distributions/pld-ac/rpmlist.d/00.lst | |
454 | sed -i 's/x86_64/amd64/g' $RPM_BUILD_ROOT%{_sysconfdir}/vservers/.distributions/pld-ac/poldek/*.conf | |
455 | %endif | |
456 | %ifarch i486 | |
457 | sed -i 's/i486/i386/g' $RPM_BUILD_ROOT%{_sysconfdir}/vservers/.distributions/pld-ac/poldek/*.conf | |
458 | %endif | |
459 | ||
460 | # XXX baggins check this: needed but seems unused | |
461 | install -d $RPM_BUILD_ROOT/var/cache/vservers | |
462 | ||
463 | # we have our own initscript which does the same | |
464 | rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/vservers-default | |
465 | rm -f $RPM_BUILD_ROOT/usr/lib/util-vserver/vserver-wrapper | |
466 | # probaly the part of them | |
467 | rm -f $RPM_BUILD_ROOT/etc/vservers.conf | |
468 | ||
469 | %clean | |
470 | rm -rf $RPM_BUILD_ROOT | |
471 | ||
472 | %post | |
473 | %{_sbindir}/setattr --barrier /vservers || : | |
474 | ||
475 | %post lib -p /sbin/ldconfig | |
476 | %postun lib -p /sbin/ldconfig | |
477 | ||
478 | %post init | |
479 | /sbin/chkconfig --add vrootdevices | |
480 | /sbin/chkconfig --add vprocunhide | |
481 | /sbin/chkconfig --add vservers | |
482 | if [ ! -f /var/lock/subsys/vrootdevices ]; then | |
483 | echo "Type \"/sbin/service vrootdevices start\" to assign virtual root devices" 1>&2 | |
484 | fi | |
485 | if [ ! -f /var/lock/subsys/vprocunhide ]; then | |
486 | echo "Type \"/sbin/service vprocunhide start\" to set /proc visibility for vservers" 1>&2 | |
487 | fi | |
488 | if [ ! -f /var/lock/subsys/vservers ]; then | |
489 | echo "Type \"/sbin/service vservers start\" to start vservers" 1>&2 | |
490 | fi | |
491 | ||
492 | %preun init | |
493 | if [ "$1" = "0" ]; then | |
494 | %service vservers stop | |
495 | %service vprocunhide stop | |
496 | %service vrootdevices stop | |
497 | /sbin/chkconfig --del vservers | |
498 | /sbin/chkconfig --del vprocunhide | |
499 | /sbin/chkconfig --del vrootdevices | |
500 | fi | |
501 | ||
502 | %post legacy | |
503 | /sbin/chkconfig --add rebootmgr | |
504 | /sbin/chkconfig --add vservers-legacy | |
505 | if [ ! -f /var/lock/subsys/rebootmgr ] ; then | |
506 | echo "Type \"/sbin/service rebootmgr start\" to start reboot manager for legacy vservers" 1>&2 | |
507 | fi | |
508 | if [ ! -f /var/lock/subsys/vservers-legacy ] ; then | |
509 | echo "Type \"/sbin/service vservers-legacy start\" to start legacy vservers" 1>&2 | |
510 | fi | |
511 | ||
512 | %preun legacy | |
513 | if [ "$1" = "0" ]; then | |
514 | %service rebootmgr stop | |
515 | %service vservers-legacy stop | |
516 | /sbin/chkconfig --del rebootmgr | |
517 | /sbin/chkconfig --del vservers-legacy | |
518 | fi | |
519 | ||
520 | %triggerpostun build -- %{name}-build < 0.30.210-5.2 | |
521 | if [ -f /etc/vservers/.distributions/pld2.0/poldek/poldek.conf.rpmsave ]; then | |
522 | mv -f /etc/vservers/.distributions/{pld2.0,pld-ac}/poldek/poldek.conf.rpmsave | |
523 | fi | |
524 | ||
525 | # kill old vserver specific package ignores which are no longer needed | |
526 | l=`egrep '^ignore.*(basesystem|SysVinit|rc-scripts)' /etc/vservers/*/apps/pkgmgmt/base/poldek/etc/poldek.conf -l 2>/dev/null` | |
527 | if [ "$l" ]; then | |
528 | %{__sed} -i -e '/^ignore/s, \(basesystem\|SysVinit\|rc-scripts\),,g' $l | |
529 | fi | |
530 | ||
531 | %files | |
532 | %defattr(644,root,root,755) | |
533 | %doc AUTHORS ChangeLog NEWS THANKS doc/intro.txt | |
534 | %{?with_doc:%doc doc/*.html} | |
535 | %dir %{_sysconfdir}/vservers | |
536 | %dir %{_sysconfdir}/vservers/.defaults | |
537 | %dir %{_sysconfdir}/vservers/.defaults/apps | |
538 | %dir %{_sysconfdir}/vservers/.defaults/files | |
539 | %{_sysconfdir}/vservers/.defaults/vdirbase | |
540 | %{_sysconfdir}/vservers/.defaults/run.rev | |
541 | %{_sysconfdir}/vservers/vdirbase | |
542 | %{_sysconfdir}/vservers/run.rev | |
543 | /sbin/vshelper | |
544 | %attr(755,root,root) %{_sbindir}/chbind | |
545 | %attr(755,root,root) %{_sbindir}/chcontext | |
546 | %attr(755,root,root) %{_sbindir}/chxid | |
547 | %attr(755,root,root) %{_sbindir}/exec-cd | |
548 | %attr(755,root,root) %{_sbindir}/lsxid | |
549 | %attr(755,root,root) %{_sbindir}/naddress | |
550 | %attr(755,root,root) %{_sbindir}/nattribute | |
551 | %attr(755,root,root) %{_sbindir}/ncontext | |
552 | %attr(755,root,root) %{_sbindir}/reducecap | |
553 | %attr(755,root,root) %{_sbindir}/setattr | |
554 | %attr(755,root,root) %{_sbindir}/showattr | |
555 | %attr(755,root,root) %{_sbindir}/vattribute | |
556 | %attr(755,root,root) %{_sbindir}/vcontext | |
557 | %attr(755,root,root) %{_sbindir}/vdlimit | |
558 | %attr(755,root,root) %{_sbindir}/vnamespace | |
559 | %attr(755,root,root) %{_sbindir}/vkill | |
560 | %attr(755,root,root) %{_sbindir}/vlimit | |
561 | %attr(755,root,root) %{_sbindir}/vdevmap | |
562 | %attr(755,root,root) %{_sbindir}/vdu | |
563 | %attr(755,root,root) %{_sbindir}/vproc | |
564 | %attr(755,root,root) %{_sbindir}/vps | |
565 | %attr(755,root,root) %{_sbindir}/vpstree | |
566 | %attr(755,root,root) %{_sbindir}/vrsetup | |
567 | %attr(755,root,root) %{_sbindir}/vsched | |
568 | %attr(755,root,root) %{_sbindir}/vserver | |
569 | %attr(755,root,root) %{_sbindir}/vserver-info | |
570 | %attr(755,root,root) %{_sbindir}/vserver-stat | |
571 | %attr(755,root,root) %{_sbindir}/vsomething | |
572 | %attr(755,root,root) %{_sbindir}/vtop | |
573 | %attr(755,root,root) %{_sbindir}/vuname | |
574 | %attr(755,root,root) %{_sbindir}/vwait | |
575 | %dir %{_libdir}/%{name} | |
576 | %dir %{_libdir}/%{name}/defaults | |
577 | %{_libdir}/%{name}/FEATURES.txt | |
578 | %{_libdir}/%{name}/util-vserver-vars | |
579 | %{_libdir}/%{name}/defaults/* | |
580 | %attr(755,root,root) %{_libdir}/%{name}/capchroot | |
581 | %attr(755,root,root) %{_libdir}/%{name}/chain-echo | |
582 | %attr(755,root,root) %{_libdir}/%{name}/chbind-compat | |
583 | %attr(755,root,root) %{_libdir}/%{name}/check-unixfile | |
584 | %attr(755,root,root) %{_libdir}/%{name}/chcontext-compat | |
585 | %attr(755,root,root) %{_libdir}/%{name}/chroot-sh | |
586 | %attr(755,root,root) %{_libdir}/%{name}/exec-ulimit | |
587 | %attr(755,root,root) %{_libdir}/%{name}/fakerunlevel | |
588 | %attr(755,root,root) %{_libdir}/%{name}/filetime | |
589 | %{_libdir}/%{name}/functions | |
590 | %attr(755,root,root) %{_libdir}/%{name}/keep-ctx-alive | |
591 | %attr(755,root,root) %{_libdir}/%{name}/lockfile | |
592 | %attr(755,root,root) %{_libdir}/%{name}/mask2prefix | |
593 | %attr(755,root,root) %{_libdir}/%{name}/readlink | |
594 | %attr(755,root,root) %{_libdir}/%{name}/save_ctxinfo | |
595 | %attr(755,root,root) %{_libdir}/%{name}/secure-mount | |
596 | %attr(755,root,root) %{_libdir}/%{name}/sigexec | |
597 | %attr(755,root,root) %{_libdir}/%{name}/start-vservers | |
598 | %attr(755,root,root) %{_libdir}/%{name}/vprocunhide | |
599 | %{_libdir}/%{name}/vserver.* | |
600 | %{_libdir}/%{name}/vserver-setup.* | |
601 | %attr(755,root,root) %{_libdir}/%{name}/vserver-build | |
602 | %{_libdir}/%{name}/vserver-build.* | |
603 | %attr(755,root,root) %{_libdir}/%{name}/vservers.grabinfo.sh | |
604 | %attr(755,root,root) %{_libdir}/%{name}/vhashify | |
605 | %attr(755,root,root) %{_libdir}/%{name}/vhashify.cron | |
606 | %attr(755,root,root) %{_libdir}/%{name}/vshelper | |
607 | %attr(755,root,root) %{_libdir}/%{name}/vshelper-sync | |
608 | %attr(755,root,root) %{_libdir}/%{name}/vsysctl | |
609 | %{_mandir}/man8/chbind.8* | |
610 | %{_mandir}/man8/chcontext.8* | |
611 | %{_mandir}/man8/reducecap.8* | |
612 | %{_mandir}/man8/vps.8* | |
613 | %{_mandir}/man8/vpstree.8* | |
614 | %{_mandir}/man8/vserver-stat.8* | |
615 | %{_mandir}/man8/vserver.8* | |
616 | %{_mandir}/man8/vtop.8* | |
617 | %attr(000,root,root) %dir /vservers | |
618 | %dir /vservers/.pkg | |
619 | %dir %{_localstatedir}/run/vservers | |
620 | %dir %{_localstatedir}/run/vservers.rev | |
621 | %dir %{_localstatedir}/run/vshelper | |
622 | %dir /var/cache/vservers | |
623 | ||
624 | %files devel | |
625 | %defattr(644,root,root,755) | |
626 | %{?with_doc:%doc lib/apidoc/latex/refman.pdf lib/apidoc/html} | |
627 | %attr(755,root,root) %{_libdir}/lib*.so | |
628 | %{_libdir}/lib*.la | |
629 | %{_includedir}/vserver*.h | |
630 | %{_pkgconfigdir}/*.pc | |
631 | ||
632 | %files static | |
633 | %defattr(644,root,root,755) | |
634 | %{_libdir}/libvserver.a | |
635 | ||
636 | %files lib | |
637 | %defattr(644,root,root,755) | |
638 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* | |
639 | ||
640 | %files init | |
641 | %defattr(644,root,root,755) | |
642 | %attr(755,root,root) %{_libdir}/%{name}/vsysvwrapper | |
643 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vrootdevices | |
644 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers | |
645 | %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/vservers | |
646 | %attr(754,root,root) /etc/rc.d/init.d/vprocunhide | |
647 | %attr(754,root,root) /etc/rc.d/init.d/vrootdevices | |
648 | %attr(754,root,root) /etc/rc.d/init.d/vservers | |
649 | ||
650 | %files build | |
651 | %defattr(644,root,root,755) | |
652 | %doc contrib/yum*.patch package-management.txt | |
653 | %dir %{_sysconfdir}/vservers/.defaults/apps/vunify | |
654 | %dir %{_sysconfdir}/vservers/.defaults/apps/vunify/hash | |
655 | %dir %{_sysconfdir}/vservers/.distributions | |
656 | %dir %{_sysconfdir}/vservers/.distributions/.common | |
657 | %dir %{_sysconfdir}/vservers/.distributions/.common/pubkeys | |
658 | %dir %{_sysconfdir}/vservers/.distributions/pld-ac | |
659 | %dir %{_sysconfdir}/vservers/.distributions/pld-ac/poldek | |
660 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vservers/.distributions/pld-ac/poldek/*.conf | |
661 | %dir %{_sysconfdir}/vservers/.distributions/pld-ac-i686 | |
662 | %dir %{_sysconfdir}/vservers/.distributions/pld-ac-i686/poldek | |
663 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vservers/.distributions/pld-ac-i686/poldek/*.conf | |
664 | %dir %{_sysconfdir}/vservers/.distributions/pld-th | |
665 | %dir %{_sysconfdir}/vservers/.distributions/pld-th/poldek | |
666 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vservers/.distributions/pld-th/poldek/*.conf | |
667 | %dir %{_sysconfdir}/vservers/.distributions/pld-th-i686 | |
668 | %dir %{_sysconfdir}/vservers/.distributions/pld-th-i686/poldek | |
669 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vservers/.distributions/pld-th-i686/poldek/*.conf | |
670 | %attr(755,root,root) %{_libdir}/%{name}/rpm-fake* | |
671 | %dir %{_libdir}/%{name}/distributions | |
672 | %attr(-,root,root) %{_libdir}/%{name}/distributions/defaults | |
673 | %attr(-,root,root) %{_libdir}/%{name}/distributions/pld* | |
674 | %dir %{_libdir}/%{name}/distributions/template | |
675 | %attr(755,root,root) %{_libdir}/%{name}/distributions/template/init* | |
676 | %attr(-,root,root) %{_libdir}/%{name}/distributions/redhat | |
677 | %{_libdir}/%{name}/magic.mime | |
678 | %{_libdir}/%{name}/vserver-build.* | |
679 | %{_libdir}/%{name}/vserver-setup.functions | |
680 | %{_libdir}/%{name}/defaults/fstab | |
681 | %{_libdir}/%{name}/defaults/debootstrap.uri | |
682 | %{_libdir}/%{name}/defaults/vunify-exclude | |
683 | %attr(755,root,root) %{_libdir}/%{name}/pkgmgmt | |
684 | %attr(755,root,root) %{_libdir}/%{name}/vapt-get-worker | |
685 | %attr(755,root,root) %{_libdir}/%{name}/vclone | |
686 | %attr(755,root,root) %{_libdir}/%{name}/vcopy | |
687 | %attr(755,root,root) %{_libdir}/%{name}/vpkg | |
688 | %attr(755,root,root) %{_libdir}/%{name}/vpoldek-worker | |
689 | %attr(755,root,root) %{_libdir}/%{name}/vrpm-* | |
690 | %attr(755,root,root) %{_libdir}/%{name}/vserver-build | |
691 | %attr(755,root,root) %{_libdir}/%{name}/vunify | |
692 | %attr(755,root,root) %{_libdir}/%{name}/vyum-worker | |
693 | %attr(755,root,root) %{_sbindir}/vapt-get | |
694 | %attr(755,root,root) %{_sbindir}/vpoldek | |
695 | %attr(755,root,root) %{_sbindir}/vrpm | |
696 | %attr(755,root,root) %{_sbindir}/vyum | |
697 | ||
698 | %files -n vserver-distro-fedora | |
699 | %defattr(644,root,root,755) | |
700 | %dir %{_sysconfdir}/vservers/.distributions/fc* | |
701 | %dir %{_sysconfdir}/vservers/.distributions/fc*/apt | |
702 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vservers/.distributions/fc*/apt/sources.list | |
703 | %{_libdir}/%{name}/distributions/fc* | |
704 | ||
705 | %files -n vserver-distro-redhat | |
706 | %defattr(644,root,root,755) | |
707 | %dir %{_sysconfdir}/vservers/.distributions/rh* | |
708 | %dir %{_sysconfdir}/vservers/.distributions/rh*/apt | |
709 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vservers/.distributions/rh*/apt/sources.list | |
710 | %{_libdir}/%{name}/distributions/rh* | |
711 | ||
712 | %files -n vserver-distro-suse | |
713 | %defattr(644,root,root,755) | |
714 | %dir %{_sysconfdir}/vservers/.distributions/suse* | |
715 | %dir %{_sysconfdir}/vservers/.distributions/suse*/apt | |
716 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vservers/.distributions/suse*/apt/sources.list | |
717 | %{_libdir}/%{name}/distributions/suse* | |
718 | ||
719 | %files -n vserver-distro-centos | |
720 | %defattr(644,root,root,755) | |
721 | %{_libdir}/util-vserver/distributions/centos4 | |
722 | ||
723 | %files -n vserver-distro-gentoo | |
724 | %defattr(644,root,root,755) | |
725 | %dir %{_libdir}/util-vserver/distributions/gentoo | |
726 | %attr(755,root,root) %{_libdir}/util-vserver/distributions/gentoo/* | |
727 | %attr(755,root,root) %{_sbindir}/vdispatch-conf | |
728 | %attr(755,root,root) %{_sbindir}/vemerge | |
729 | %attr(755,root,root) %{_sbindir}/vesync | |
730 | %attr(755,root,root) %{_sbindir}/vupdateworld | |
731 | ||
732 | %files legacy | |
733 | %defattr(644,root,root,755) | |
734 | %dir %{_sysconfdir}/vservices | |
735 | %{_sysconfdir}/vservices/* | |
736 | %dir %{_libdir}/%{name}/legacy | |
737 | %attr(755,root,root) %{_libdir}/%{name}/legacy/* | |
738 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/vservers-legacy | |
739 | %attr(754,root,root) /etc/rc.d/init.d/v_* | |
740 | %attr(754,root,root) /etc/rc.d/init.d/rebootmgr | |
741 | %attr(754,root,root) /etc/rc.d/init.d/vservers-legacy | |
742 | %attr(755,root,root) %{_sbindir}/vserver-copy | |
743 | %{_mandir}/man8/distrib-info.8* | |
744 | %{_mandir}/man8/rebootmgr.8* | |
745 | %{_mandir}/man8/vserver-copy.8* |