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