]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - java bindings | |
3 | # - Package SDK. | |
4 | # - Package utils (and write initscripts ?) for Guest OS. | |
5 | # - Check License of VBoxGuestAdditions_*.iso, it's probably not GPL v2. | |
6 | # If so check if it is distributable. | |
7 | # - resolve mess with subpackages? | |
8 | # - addtions: iso (containing additions/*.iso) | |
9 | # - guest: to be installed to guests (deps on x11 drivers) | |
10 | # - enable VDE networking: --enable-vde | |
11 | # | |
12 | # Conditional build: | |
13 | %bcond_without doc # don't build the documentation | |
14 | %bcond_without dist_kernel # without distribution kernel | |
15 | %bcond_without kernel # don't build kernel module | |
16 | %bcond_without userspace # don't build userspace package | |
17 | %bcond_with webservice # webservice (soap) support | |
18 | %bcond_without lightdm # lightdm greeter | |
19 | %bcond_without verbose | |
20 | %bcond_with force_userspace # force userspace build (useful if alt_kernel is set) | |
21 | ||
22 | %if %{without kernel} | |
23 | %undefine with_dist_kernel | |
24 | %endif | |
25 | %if "%{_alt_kernel}" != "%{nil}" | |
26 | %undefine with_userspace | |
27 | %endif | |
28 | %if %{with force_userspace} | |
29 | %define with_userspace 1 | |
30 | %endif | |
31 | %if %{without userspace} | |
32 | # nothing to be placed to debuginfo package | |
33 | %define _enable_debug_packages 0 | |
34 | %endif | |
35 | ||
36 | %define rel 8 | |
37 | %define pname VirtualBox | |
38 | Summary: VirtualBox - x86 hardware virtualizer | |
39 | Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86 | |
40 | Name: %{pname}%{_alt_kernel} | |
41 | Version: 4.2.12 | |
42 | Release: %{rel} | |
43 | License: GPL v2 | |
44 | Group: Applications/Emulators | |
45 | Source0: http://download.virtualbox.org/virtualbox/%{version}/%{pname}-%{version}.tar.bz2 | |
46 | # Source0-md5: 654e45054ae6589452508d37403dc800 | |
47 | Source1: http://download.virtualbox.org/virtualbox/%{version}/VBoxGuestAdditions_%{version}.iso | |
48 | # Source1-md5: 403098e688f9e7f4273de680f6734983 | |
49 | Source2: vboxservice.init | |
50 | Source3: %{pname}-vboxdrv.init | |
51 | Source4: %{pname}-vboxguest.init | |
52 | Source5: %{pname}-vboxnetflt.init | |
53 | Source6: %{pname}-vboxsf.init | |
54 | Source7: %{pname}-vboxnetadp.init | |
55 | Source8: %{pname}-vboxpci.init | |
56 | Source9: %{pname}.sh | |
57 | Source10: mount.vdi | |
58 | Source11: udev.rules | |
59 | Source12: %{pname}-vboxdrv-modules-load.conf | |
60 | Source13: %{pname}-vboxguest-modules-load.conf | |
61 | Source14: %{pname}-vboxnetflt-modules-load.conf | |
62 | Source15: %{pname}-vboxsf-modules-load.conf | |
63 | Source16: %{pname}-vboxnetadp-modules-load.conf | |
64 | Source17: %{pname}-vboxpci-modules-load.conf | |
65 | Patch0: %{pname}-configure-spaces.patch | |
66 | Patch1: %{pname}-VBoxSysInfo.patch | |
67 | Patch2: %{pname}-warning_workaround.patch | |
68 | Patch3: %{pname}-dri.patch | |
69 | Patch4: %{pname}-disable_build_NetBiosBin.patch | |
70 | Patch5: xserver-1.12.patch | |
71 | Patch6: gcc48.patch | |
72 | Patch7: lightdm-greeter-glib-includes.patch | |
73 | Patch8: lightdm-greeter-g++-link.patch | |
74 | # ubuntu patches | |
75 | Patch10: 16-no-update.patch | |
76 | Patch11: 18-system-xorg.patch | |
77 | # /ubuntu patches | |
78 | URL: http://www.virtualbox.org/ | |
79 | %if %{with userspace} | |
80 | %ifarch %{x8664} | |
81 | BuildRequires: gcc-multilib | |
82 | BuildRequires: glibc-devel(i686) | |
83 | BuildRequires: libstdc++-multilib-devel | |
84 | BuildRequires: libstdc++-multilib-static | |
85 | %endif | |
86 | %if "%{pld_release}" == "ac" | |
87 | BuildRequires: XFree86-devel | |
88 | %else | |
89 | BuildRequires: xorg-lib-libXcomposite-devel | |
90 | BuildRequires: xorg-lib-libXcursor-devel | |
91 | BuildRequires: xorg-lib-libXmu-devel | |
92 | BuildRequires: xorg-proto-glproto-devel | |
93 | BuildRequires: xorg-xserver-server-devel | |
94 | %endif | |
95 | BuildRequires: OpenGL-GLU-devel | |
96 | BuildRequires: OpenGL-devel | |
97 | BuildRequires: QtGui-devel | |
98 | BuildRequires: QtNetwork-devel | |
99 | BuildRequires: QtOpenGL-devel | |
100 | BuildRequires: SDL-devel >= 1.2.7 | |
101 | BuildRequires: acpica | |
102 | BuildRequires: alsa-lib-devel >= 1.0.6 | |
103 | BuildRequires: bash | |
104 | BuildRequires: bcc | |
105 | BuildRequires: bin86 | |
106 | BuildRequires: curl-devel | |
107 | BuildRequires: device-mapper-devel | |
108 | %{?with_doc:BuildRequires: docbook-dtd44-xml} | |
109 | BuildRequires: gcc >= 5:3.2.3 | |
110 | %{?with_webservice:BuildRequires: gsoap-devel} | |
111 | BuildRequires: kBuild >= 0.1.9998-2 | |
112 | BuildRequires: libIDL-devel | |
113 | BuildRequires: libcap-static | |
114 | BuildRequires: libdrm-devel | |
115 | BuildRequires: libpng-devel >= 1.2.5 | |
116 | BuildRequires: libstdc++-devel >= 5:3.2.3 | |
117 | BuildRequires: libstdc++-static >= 5:3.2.3 | |
118 | BuildRequires: libuuid-devel | |
119 | BuildRequires: libvncserver-devel >= 0.9.9 | |
120 | BuildRequires: libxml2-devel >= 2.6.26 | |
121 | BuildRequires: libxslt-devel >= 1.1.17 | |
122 | BuildRequires: libxslt-progs >= 1.1.17 | |
123 | %{?with_lightdm:BuildRequires: lightdm-devel} | |
124 | BuildRequires: makeself | |
125 | BuildRequires: mkisofs | |
126 | BuildRequires: pam-devel | |
127 | BuildRequires: pixman-devel | |
128 | BuildRequires: pkgconfig | |
129 | BuildRequires: pulseaudio-devel >= 0.9.0 | |
130 | BuildRequires: python-devel | |
131 | BuildRequires: python-modules | |
132 | BuildRequires: qt4-build >= 4.2.0 | |
133 | BuildRequires: qt4-linguist | |
134 | BuildRequires: rpmbuild(macros) >= 1.664 | |
135 | BuildRequires: sed >= 4.0 | |
136 | %if %{with doc} | |
137 | BuildRequires: texlive-fonts-bitstream | |
138 | BuildRequires: texlive-fonts-other | |
139 | BuildRequires: texlive-fonts-type1-bitstream | |
140 | BuildRequires: texlive-format-pdflatex | |
141 | BuildRequires: texlive-latex-ucs | |
142 | BuildRequires: texlive-xetex | |
143 | %endif | |
144 | BuildRequires: which | |
145 | BuildRequires: xalan-c-devel >= 1.10.0 | |
146 | BuildRequires: xerces-c-devel >= 2.6.0 | |
147 | BuildRequires: yasm | |
148 | BuildRequires: zlib-devel >= 1.2.1 | |
149 | %endif | |
150 | %if %{with dist_kernel} | |
151 | BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20 | |
152 | %endif | |
153 | Requires(post,preun): /sbin/chkconfig | |
154 | Requires(postun): /usr/sbin/groupdel | |
155 | Requires(pre): /usr/bin/getgid | |
156 | Requires(pre): /usr/sbin/groupadd | |
157 | Requires: QtCore >= 4.7.0 | |
158 | Requires: desktop-file-utils | |
159 | Requires: fontconfig | |
160 | Requires: fonts-Type1-urw | |
161 | Requires: libvncserver >= 0.9.9 | |
162 | Requires: udev-core | |
163 | Suggests: gxmessage | |
164 | Provides: group(vbox) | |
165 | Obsoletes: VirtualBox-udev < 4.2.10-5 | |
166 | ExclusiveArch: %{ix86} %{x8664} | |
167 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
168 | ||
169 | %ifarch %{x8664} | |
170 | %define vbox_arch amd64 | |
171 | %else | |
172 | %define vbox_arch x86 | |
173 | %endif | |
174 | %define vbox_platform linux.%{vbox_arch} | |
175 | %define outdir out/%{vbox_platform}/release/bin | |
176 | %define objdir out/%{vbox_platform}/release/obj | |
177 | ||
178 | # workaround buggy 'file' results: | |
179 | # | |
180 | # EfiThunk: \0 | |
181 | # qt_ro.qm: \0 "<\270d\030\312\357\234\225\315!\034\277`\241\275\335B" | |
182 | # VBoxEFI32.fd: \0 | |
183 | # VBoxEFI64.fd: \0 | |
184 | # | |
185 | # which lead to 'Stripping ... ELF shared libraries... (...)/nls/qt_ro.qm: File format not recognized' | |
186 | %define _noautostrip .*%{_libdir}/%{name}/.* | |
187 | ||
188 | %define vbox_kernel_post(d:) \ | |
189 | if [ -x /etc/rc.d/init.d/%{-d*} ]; then \ | |
190 | %{expand:%service %%{-d*} restart %%*} \ | |
191 | else \ | |
192 | /sbin/rmmod %{-d*} || : \ | |
193 | /sbin/modprobe -s %{-d*} || : \ | |
194 | fi \ | |
195 | %{nil} | |
196 | ||
197 | %description | |
198 | Oracle VirtualBox is a general-purpose full virtualizer for x86 | |
199 | hardware. Targeted at server, desktop and embedded use, it is now the | |
200 | only professional-quality virtualization solution that is also Open | |
201 | Source Software. | |
202 | ||
203 | Some of the features of VirtualBox are: | |
204 | ||
205 | Modularity: VirtualBox has an extremely modular design with | |
206 | well-defined internal programming interfaces and a client/server | |
207 | design. This makes it easy to control it from several interfaces at | |
208 | once: for example, you can start a virtual machine in a typical | |
209 | virtual machine GUI and then control that machine from the command | |
210 | line. VirtualBox also comes with a full Software Development Kit: even | |
211 | though it is Open Source Software, you don't have to hack the source | |
212 | to write a new interface for VirtualBox. | |
213 | ||
214 | Virtual machine descriptions in XML: the configuration settings of | |
215 | virtual machines are stored entirely in XML and are independent of the | |
216 | local machines. Virtual machine definitions can therefore easily be | |
217 | ported to other computers. | |
218 | ||
219 | You should install this package in your Host OS. | |
220 | ||
221 | %description -l pl.UTF-8 | |
222 | Oracle VirtualBox jest emulatorem sprzętu x86. Kierowany do zastosowań | |
223 | serwerowych, desktopowych oraz wbudowanych jest obecnie jedynym | |
224 | wysokiej jakości rozwiązaniem wirtualizacyjnym dostępnym również jako | |
225 | Otwarte Oprogramowanie. | |
226 | ||
227 | Przykładowe cechy VirtualBoksa: | |
228 | ||
229 | Modularność: VirtualBox jest wysoce zmodularyzowanym produktem z | |
230 | dobrze zaprojektowanym wewnętrznym interfejsem programowym typu | |
231 | klient/serwer. Dzięki temu można łatwo kontrolować go za pomocą | |
232 | różnych interfejsów. Można na przykład uruchomić maszynę wirtualną z | |
233 | poziomu interfejsu graficznego, a później kontrolować ją z linii | |
234 | poleceń. VirtualBox dostarcza również pełny pakiet deweloperski, co | |
235 | pozwala stworzyć dowolny inny interfejs zarządzania maszyną wirtualną. | |
236 | ||
237 | Opisy maszyn wirtualnych w XML-u: konfiguracje poszczególnych maszyn | |
238 | wirtualnych są w całości przechowywane w XML-u i są niezależne od | |
239 | lokalnej maszyny. Dzięki temu można szybko i łatwo przenieść | |
240 | konfigurację maszyny wirtualnej na inny komputer. | |
241 | ||
242 | %package doc | |
243 | Summary: VirtualBox documentation | |
244 | Group: Documentation | |
245 | ||
246 | %description doc | |
247 | This package contains VirtualBox User Manual. | |
248 | ||
249 | %package additions | |
250 | Summary: VirtualBox Guest Additions | |
251 | Group: Base | |
252 | Requires: %{name} = %{version}-%{release} | |
253 | ||
254 | %description additions | |
255 | VirtualBox Guest Additions. | |
256 | ||
257 | This package contains ISO9660 image with drivers for Guest OS. | |
258 | ||
259 | You should install this package in your Host OS. | |
260 | ||
261 | %package guest | |
262 | Summary: VirtualBox Guest tools | |
263 | Group: Base | |
264 | Requires(post,preun): /sbin/chkconfig | |
265 | Requires: rc-scripts | |
266 | Suggests: kernel(vboxguest) | |
267 | Suggests: kernel(vboxsf) | |
268 | Suggests: pam-pam_vbox | |
269 | ||
270 | %description guest | |
271 | Tools that utilize kernel modules for supporting integration with the | |
272 | Host, including file sharing. | |
273 | ||
274 | You should install this package in your Guest OS for base VirtualBox | |
275 | communication | |
276 | ||
277 | %package guest-x11 | |
278 | Summary: VirtualBox Guest Additions | |
279 | Group: Base | |
280 | Requires: %{name}-guest = %{version}-%{release} | |
281 | Requires: xorg-driver-video-vboxvideo = %{version}-%{release} | |
282 | Suggests: kernel(vboxvideo) | |
283 | Obsoletes: xorg-driver-input-vboxmouse < %{version}-%{release} | |
284 | ||
285 | %description guest-x11 | |
286 | Tools for X11 session that utilize kernel modules for supporting | |
287 | integration with the Host, like tracking of mouse pointer movement and | |
288 | X.org X11 video and mouse drivers | |
289 | ||
290 | You should install this package in your Guest OS for X11 session. | |
291 | ||
292 | %package -n lightdm-greeter-vbox | |
293 | Summary: VirtualBox greeter for lightdm | |
294 | Group: Themes | |
295 | # NOTE: '#' in url is lost because rpm treats it as comment, even hacking with | |
296 | # macros doesn't help as rpmbuild takes final result to parse | |
297 | URL: http://www.virtualbox.org/manual/ch09.html#autologon_unix_lightdm | |
298 | Requires: kernel%{_alt_kernel}-misc-vboxguest | |
299 | Requires: lightdm >= 1.0.1 | |
300 | Provides: lightdm-greeter | |
301 | ||
302 | %description -n lightdm-greeter-vbox | |
303 | VirtualBox greeter for LightDM. | |
304 | ||
305 | %package -n pam-pam_vbox | |
306 | Summary: PAM module to perform automated guest logons | |
307 | Group: Base | |
308 | ||
309 | %description -n pam-pam_vbox | |
310 | PAM module (Pluggable Authentication Module) which can be used to | |
311 | perform automated guest logons. | |
312 | ||
313 | %package -n xorg-driver-video-vboxvideo | |
314 | Summary: X.org video driver for VirtualBox guest OS | |
315 | Summary(pl.UTF-8): Sterownik grafiki dla systemu gościa w VirtualBoksie | |
316 | Group: X11/Applications | |
317 | Requires: Mesa-dri-driver-swrast | |
318 | Requires: xorg-xserver-libdri >= 1.7.4 | |
319 | Requires: xorg-xserver-server >= 1.0.99.901 | |
320 | Requires: xorg-xserver-server(videodrv-abi) <= 14.1 | |
321 | Requires: xorg-xserver-server(videodrv-abi) >= 2.0 | |
322 | ||
323 | %description -n xorg-driver-video-vboxvideo | |
324 | X.org video driver for VirtualBox guest OS. | |
325 | ||
326 | %description -n xorg-driver-video-vboxvideo -l pl.UTF-8 | |
327 | Sterownik grafiki dla systemu gościa w VirtualBoksie. | |
328 | ||
329 | %package kernel-init-host | |
330 | Summary: SysV initscripts for host kernel modules | |
331 | Group: Base/Kernel | |
332 | ||
333 | %description kernel-init-host | |
334 | SysV initscripts for host kernel modules. | |
335 | ||
336 | %package kernel-init-guest | |
337 | Summary: SysV initscripts for guest kernel modules | |
338 | Group: Base/Kernel | |
339 | ||
340 | %description kernel-init-guest | |
341 | SysV initscripts for guest kernel modules. | |
342 | ||
343 | # KERNEL PACKAGES | |
344 | ||
345 | # KEEP ALL REGULAR SUBPACKAGES BEFORE KERNEL PACKAGES. | |
346 | ||
347 | %package -n kernel%{_alt_kernel}-misc-vboxguest | |
348 | Summary: VirtualBox Guest Additions for Linux Module | |
349 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
350 | Release: %{rel}@%{_kernel_ver_str} | |
351 | Group: Base/Kernel | |
352 | Requires(post,postun): /sbin/depmod | |
353 | Requires(post): systemd-units >= 38 | |
354 | Requires: dev >= 2.9.0-7 | |
355 | %if %{with dist_kernel} | |
356 | %requires_releq_kernel | |
357 | Requires(postun): %releq_kernel | |
358 | %endif | |
359 | Requires: systemd-units >= 38 | |
360 | Suggests: %{name}-kernel-init-guest >= %{version}-%{rel} | |
361 | Provides: kernel(vboxguest) = %{version}-%{rel} | |
362 | Obsoletes: kernel%{_alt_kernel}-misc-vboxadd | |
363 | Conflicts: kernel%{_alt_kernel}-misc-vboxdrv | |
364 | ||
365 | %description -n kernel%{_alt_kernel}-misc-vboxguest | |
366 | VirtualBox Guest Additions for Linux Module. | |
367 | ||
368 | You should install this package in your Guest OS. | |
369 | ||
370 | %description -n kernel%{_alt_kernel}-misc-vboxguest -l pl.UTF-8 | |
371 | Moduł jądra Linuksa vboxguest dla VirtualBoksa - dodatki dla systemu | |
372 | gościa. | |
373 | ||
374 | %package -n kernel%{_alt_kernel}-misc-vboxdrv | |
375 | Summary: VirtualBox Support Driver | |
376 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
377 | Release: %{rel}@%{_kernel_ver_str} | |
378 | Group: Base/Kernel | |
379 | Requires(post,postun): /sbin/depmod | |
380 | Requires(post): systemd-units >= 38 | |
381 | Requires: dev >= 2.9.0-7 | |
382 | %if %{with dist_kernel} | |
383 | %requires_releq_kernel | |
384 | Requires(postun): %releq_kernel | |
385 | %endif | |
386 | Requires: systemd-units >= 38 | |
387 | Suggests: %{name}-kernel-init-host >= %{version}-%{rel} | |
388 | Provides: kernel(vboxdrv) = %{version}-%{rel} | |
389 | ||
390 | %description -n kernel%{_alt_kernel}-misc-vboxdrv | |
391 | VirtualBox Support Driver. | |
392 | ||
393 | You should install this package in your Host OS. | |
394 | ||
395 | %description -n kernel%{_alt_kernel}-misc-vboxdrv -l pl.UTF-8 | |
396 | Moduł jądra Linuksa dla VirtualBoksa - sterownik wsparcia dla systemu | |
397 | głównego. | |
398 | ||
399 | %package -n kernel%{_alt_kernel}-misc-vboxnetadp | |
400 | Summary: VirtualBox Network Adapter Driver | |
401 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
402 | Release: %{rel}@%{_kernel_ver_str} | |
403 | Group: Base/Kernel | |
404 | Requires(post,postun): /sbin/depmod | |
405 | Requires(post): systemd-units >= 38 | |
406 | Requires: dev >= 2.9.0-7 | |
407 | Requires: kernel%{_alt_kernel}-misc-vboxdrv | |
408 | %if %{with dist_kernel} | |
409 | %requires_releq_kernel | |
410 | Requires(postun): %releq_kernel | |
411 | %endif | |
412 | Requires: systemd-units >= 38 | |
413 | Suggests: %{name}-kernel-init-host >= %{version}-%{rel} | |
414 | Provides: kernel(vboxnetflt) = %{version}-%{rel} | |
415 | ||
416 | %description -n kernel%{_alt_kernel}-misc-vboxnetadp | |
417 | VirtualBox Network Adapter Driver. | |
418 | ||
419 | You should install this package in your Host OS. | |
420 | ||
421 | %description -n kernel%{_alt_kernel}-misc-vboxnetadp -l pl.UTF-8 | |
422 | Moduł jądra Linuksa dla VirtualBoksa - sterownik witrualnej karty | |
423 | sieciowej. | |
424 | ||
425 | %package -n kernel%{_alt_kernel}-misc-vboxnetflt | |
426 | Summary: VirtualBox Network Filter Driver | |
427 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
428 | Release: %{rel}@%{_kernel_ver_str} | |
429 | Group: Base/Kernel | |
430 | Requires(post,postun): /sbin/depmod | |
431 | Requires(post): systemd-units >= 38 | |
432 | Requires: dev >= 2.9.0-7 | |
433 | Requires: kernel%{_alt_kernel}-misc-vboxdrv | |
434 | %if %{with dist_kernel} | |
435 | %requires_releq_kernel | |
436 | Requires(postun): %releq_kernel | |
437 | %endif | |
438 | Requires: systemd-units >= 38 | |
439 | Suggests: %{name}-kernel-init-host >= %{version}-%{rel} | |
440 | Provides: kernel(vboxnetflt) = %{version}-%{rel} | |
441 | ||
442 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt | |
443 | VirtualBox Network Filter Driver. | |
444 | ||
445 | You should install this package in your Host OS. | |
446 | ||
447 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt -l pl.UTF-8 | |
448 | Moduł jądra Linuksa dla VirtualBoksa - sterownik filtrowania sieci dla | |
449 | systemu głównego. | |
450 | ||
451 | %package -n kernel%{_alt_kernel}-misc-vboxpci | |
452 | Summary: VirtualBox PCI card passthrough Driver | |
453 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
454 | Release: %{rel}@%{_kernel_ver_str} | |
455 | Group: Base/Kernel | |
456 | Requires(post,postun): /sbin/depmod | |
457 | Requires(post): systemd-units >= 38 | |
458 | Requires: dev >= 2.9.0-7 | |
459 | Requires: kernel%{_alt_kernel}-misc-vboxdrv | |
460 | %if %{with dist_kernel} | |
461 | %requires_releq_kernel | |
462 | Requires(postun): %releq_kernel | |
463 | %endif | |
464 | Requires: systemd-units >= 38 | |
465 | Suggests: %{name}-kernel-init-host >= %{version}-%{rel} | |
466 | Provides: kernel(vboxpci) = %{version}-%{rel} | |
467 | ||
468 | %description -n kernel%{_alt_kernel}-misc-vboxpci | |
469 | VirtualBox PCI card passthrough driver that works as host proxy | |
470 | between guest and PCI hardware. | |
471 | ||
472 | You should install this package in your Host OS. | |
473 | ||
474 | %description -n kernel%{_alt_kernel}-misc-vboxnetflt -l pl.UTF-8 | |
475 | Moduł jądra Linuksa dla VirtualBoksa - sterownik, ktory działa jako | |
476 | proxy między gościem i gospodarzem sprzętu PCI. | |
477 | ||
478 | %package -n kernel%{_alt_kernel}-misc-vboxsf | |
479 | Summary: Host file system access (Shared Folders) for VirtualBox | |
480 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
481 | Release: %{rel}@%{_kernel_ver_str} | |
482 | Group: Base/Kernel | |
483 | Requires(post,postun): /sbin/depmod | |
484 | Requires(post): systemd-units >= 38 | |
485 | Requires: dev >= 2.9.0-7 | |
486 | Requires: kernel%{_alt_kernel}-misc-vboxguest | |
487 | %if %{with dist_kernel} | |
488 | %requires_releq_kernel | |
489 | Requires(postun): %releq_kernel | |
490 | %endif | |
491 | Requires: systemd-units >= 38 | |
492 | Suggests: %{name}-kernel-init-guest >= %{version}-%{rel} | |
493 | Provides: kernel(vboxsf) = %{version}-%{rel} | |
494 | Obsoletes: kernel%{_alt_kernel}-misc-vboxvfs | |
495 | ||
496 | %description -n kernel%{_alt_kernel}-misc-vboxsf | |
497 | Host file system access (Shared Folders) for VirtualBox. | |
498 | ||
499 | You should install this package in your Guest OS. | |
500 | ||
501 | %description -n kernel%{_alt_kernel}-misc-vboxsf -l pl.UTF-8 | |
502 | Moduł jądra Linuksa dla VirtualBoksa - dostęp do plików systemu | |
503 | głównego z poziomu systemu gościa. | |
504 | ||
505 | %package -n kernel%{_alt_kernel}-video-vboxvideo | |
506 | Summary: DRM support for VirtualBox | |
507 | Summary(pl.UTF-8): Moduł jądra Linuksa dla VirtualBoksa | |
508 | Release: %{rel}@%{_kernel_ver_str} | |
509 | Group: Base/Kernel | |
510 | Requires(post,postun): /sbin/depmod | |
511 | Requires: dev >= 2.9.0-7 | |
512 | %if %{with dist_kernel} | |
513 | %requires_releq_kernel | |
514 | %requires_releq_kernel -n drm | |
515 | Requires(postun): %releq_kernel | |
516 | %endif | |
517 | Provides: kernel(vboxvideo) = %{version}-%{rel} | |
518 | ||
519 | %description -n kernel%{_alt_kernel}-video-vboxvideo | |
520 | DRM support for VirtualBox. | |
521 | ||
522 | You should install this package in your Guest OS. | |
523 | ||
524 | %description -n kernel%{_alt_kernel}-video-vboxvideo -l pl.UTF-8 | |
525 | Moduł jądra Linuksa dla VirtualBoksa - sterownik obsługi DRM. | |
526 | ||
527 | %prep | |
528 | %setup -q -n %{pname}-%{version} | |
529 | %patch0 -p1 | |
530 | %patch1 -p1 | |
531 | %patch2 -p1 | |
532 | %patch3 -p1 | |
533 | %patch4 -p1 | |
534 | %patch5 -p1 | |
535 | %patch6 -p1 | |
536 | %patch7 -p1 | |
537 | %patch8 -p1 | |
538 | ||
539 | %{__sed} -i -e 's,@VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \ | |
540 | -e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in | |
541 | ||
542 | # Respect LDFLAGS | |
543 | %{__sed} -i -e "s@_LDFLAGS\.%{vbox_arch}*.*=@& %{rpmldflags}@g" \ | |
544 | -i Config.kmk src/libs/xpcom18a4/Config.kmk | |
545 | ||
546 | %{__sed} 's#@LIBDIR@#%{_libdir}#' < %{SOURCE9} > VirtualBox-wrapper.sh | |
547 | ||
548 | install -d PLD-MODULE-BUILD/{GuestDrivers,HostDrivers} | |
549 | cd PLD-MODULE-BUILD | |
550 | ../src/VBox/Additions/linux/export_modules guest-modules.tar.gz | |
551 | tar -zxf guest-modules.tar.gz -C GuestDrivers | |
552 | ||
553 | ../src/VBox/HostDrivers/linux/export_modules host-modules.tar.gz --without-hardening | |
554 | tar -zxf host-modules.tar.gz -C HostDrivers | |
555 | cd - | |
556 | %patch10 -p1 | |
557 | %patch11 -p1 | |
558 | ||
559 | # using system kBuild package | |
560 | %{__rm} -r kBuild | |
561 | ||
562 | %build | |
563 | %if %{with userspace} | |
564 | echo "VBOX_WITH_TESTCASES := " > LocalConfig.kmk | |
565 | ./configure \ | |
566 | --with-gcc="%{__cc}" \ | |
567 | --with-g++="%{__cxx}" \ | |
568 | %{!?with_doc:--disable-docs} \ | |
569 | --disable-java \ | |
570 | --disable-hardening \ | |
571 | --disable-kmods \ | |
572 | --enable-vnc \ | |
573 | %{__enable webservice} \ | |
574 | %{nil} | |
575 | ||
576 | XSERVER_VERSION=$(rpm -q --queryformat '%{VERSION}\n' xorg-xserver-server-devel | awk -F. ' { print $1 $2 } ' 2> /dev/null || echo ERROR) | |
577 | kmk %{?_smp_mflags} \ | |
578 | %{?with_verbose:KBUILD_VERBOSE=3} \ | |
579 | USER=%(id -un) \ | |
580 | VBOX_VERSION_STRING='$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)'_PLD \ | |
581 | XSERVER_VERSION="$XSERVER_VERSION" \ | |
582 | VBOX_USE_SYSTEM_XORG_HEADERS=1 \ | |
583 | %if %{with lightdm} | |
584 | VBOX_WITH_LIGHTDM_GREETER=1 \ | |
585 | VBOX_WITH_LIGHTDM_GREETER_PACKING=1 \ | |
586 | %endif | |
587 | TOOL_GCC3_CFLAGS="%{rpmcflags}" \ | |
588 | TOOL_GCC3_CXXFLAGS="%{rpmcxxflags}" \ | |
589 | VBOX_GCC_OPT="%{rpmcxxflags}" \ | |
590 | %{nil} | |
591 | %endif | |
592 | ||
593 | %if %{with kernel} | |
594 | export KERN_DIR=%{_kernelsrcdir} | |
595 | cd PLD-MODULE-BUILD/HostDrivers | |
596 | %build_kernel_modules -m vboxdrv -C vboxdrv | |
597 | %build_kernel_modules -m vboxnetadp -C vboxnetadp | |
598 | %build_kernel_modules -m vboxnetflt -C vboxnetflt | |
599 | %build_kernel_modules -m vboxpci -C vboxpci | |
600 | ||
601 | cd ../GuestDrivers | |
602 | %build_kernel_modules -m vboxguest -C vboxguest | |
603 | cp -a vboxguest/Module.symvers vboxsf | |
604 | %build_kernel_modules -m vboxsf -C vboxsf -c | |
605 | %build_kernel_modules -m vboxvideo -C vboxvideo | |
606 | cd ../.. | |
607 | %{__cc} %{rpmcflags} %{rpmldflags} -Wall -Werror src/VBox/Additions/linux/sharedfolders/{mount.vboxsf.c,vbsfmount.c} -o mount.vboxsf | |
608 | %endif | |
609 | ||
610 | %install | |
611 | rm -rf $RPM_BUILD_ROOT | |
612 | ||
613 | %if %{with userspace} | |
614 | install -d $RPM_BUILD_ROOT{%{_bindir},/sbin,%{_sbindir},%{_libdir}/%{pname}/ExtensionPacks} \ | |
615 | $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \ | |
616 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,dri,input} \ | |
617 | $RPM_BUILD_ROOT{/lib/udev,/etc/udev/rules.d} | |
618 | ||
619 | # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition | |
620 | if cp -al VBox.png $RPM_BUILD_ROOT/Vbox.png 2>/dev/null; then | |
621 | l=l | |
622 | %{__rm} -f $RPM_BUILD_ROOT/VBox.png | |
623 | fi | |
624 | ||
625 | cp -a$l %{outdir}/* $RPM_BUILD_ROOT%{_libdir}/%{pname} | |
626 | ||
627 | %if %{with doc} | |
628 | ln -sf %{_docdir}/%{pname}-doc-%{version}/UserManual.pdf $RPM_BUILD_ROOT%{_libdir}/%{pname}/UserManual.pdf | |
629 | ln -sf %{_docdir}/%{pname}-doc-%{version}/UserManual_fr_FR.pdf $RPM_BUILD_ROOT%{_libdir}/%{pname}/UserManual_fr_FR.pdf | |
630 | %endif | |
631 | ||
632 | install -d $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions | |
633 | cp -a$l %{SOURCE1} $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions/VBoxGuestAdditions.iso | |
634 | install -p %{SOURCE10} $RPM_BUILD_ROOT/sbin/mount.vdi | |
635 | install -p VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_libdir}/%{pname} | |
636 | for f in {VBox{BFE,Headless,Manage,SDL,SVC,Tunctl,XPCOMIPCD},VirtualBox}; do | |
637 | ln -s %{_libdir}/%{pname}/VirtualBox-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/$f | |
638 | done | |
639 | ||
640 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/VBox.png,%{_pixmapsdir}/virtualbox.png} | |
641 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname},%{_desktopdir}}/virtualbox.desktop | |
642 | ||
643 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions/vboxvideo_drv_system.so,%{_libdir}/xorg/modules/drivers/vboxvideo_drv.so} | |
644 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions/VBoxOGL.so,%{_libdir}/xorg/modules/dri/vboxvideo_dri.so} | |
645 | ||
646 | # XXX: where else to install them that vboxvideo_dri.so finds them? patch with rpath? | |
647 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLarrayspu.so | |
648 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLcrutil.so | |
649 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLerrorspu.so | |
650 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLfeedbackspu.so | |
651 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLpackspu.so | |
652 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_libdir}}/VBoxOGLpassthroughspu.so | |
653 | ||
654 | cp -a %{SOURCE11} $RPM_BUILD_ROOT/etc/udev/rules.d/virtualbox.rules | |
655 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname},/lib/udev}/VBoxCreateUSBNode.sh | |
656 | ||
657 | install -d $RPM_BUILD_ROOT/%{_lib}/security | |
658 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,/%{_lib}/security}/pam_vbox.so | |
659 | ||
660 | # cleanup unpackaged | |
661 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{pname}/{src,sdk,testcase} | |
662 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions/src | |
663 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/vboxkeyboard.tar.bz2 | |
664 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/tst* | |
665 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/ExtensionPacks/VNC/ExtPack-license.* | |
666 | ||
667 | # Guest Only Tools | |
668 | install -d $RPM_BUILD_ROOT/etc/{X11/xinit/xinitrc.d,xdg/autostart} | |
669 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxService | |
670 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxClient | |
671 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_bindir}}/VBoxControl | |
672 | install -p -D src/VBox/Additions/x11/Installer/98vboxadd-xclient \ | |
673 | $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/98vboxadd-xclient.sh | |
674 | cp -p src/VBox/Additions/x11/Installer/vboxclient.desktop \ | |
675 | $RPM_BUILD_ROOT/etc/xdg/autostart/vboxclient.desktop | |
676 | ||
677 | %if %{with lightdm} | |
678 | install -d $RPM_BUILD_ROOT%{_datadir}/xgreeters | |
679 | %{__mv} $RPM_BUILD_ROOT{%{_libdir}/%{pname}/additions,%{_sbindir}}/vbox-greeter | |
680 | cp -p %{objdir}/Additions/Installer/linux/share/VBoxGuestAdditions/vbox-greeter.desktop $RPM_BUILD_ROOT%{_datadir}/xgreeters | |
681 | %endif | |
682 | ||
683 | # unknown - checkme | |
684 | %if 1 | |
685 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/SUPInstall | |
686 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/SUPLoggerCtl | |
687 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/SUPUninstall | |
688 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/VBox.sh | |
689 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/vboxshell.py | |
690 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/xpidl | |
691 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions/runasroot.sh | |
692 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/load.sh | |
693 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/loadall.sh | |
694 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/dtrace/lib/%{vbox_arch}/CPUMInternal.d | |
695 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/dtrace/lib/%{vbox_arch}/cpumctx.d | |
696 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/dtrace/lib/%{vbox_arch}/vbox-arch-types.d | |
697 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/dtrace/lib/%{vbox_arch}/vbox-types.d | |
698 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/dtrace/lib/%{vbox_arch}/vm.d | |
699 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/dtrace/lib/%{vbox_arch}/x86.d | |
700 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/dtrace/testcase/%{vbox_arch}/vbox-vm-struct-test.d | |
701 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/helpers/generate_service_file | |
702 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/scripts/VBoxHeadlessXOrg.sh | |
703 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/scripts/generated.sh | |
704 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/scripts/init_template.sh | |
705 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/scripts/install_service | |
706 | %endif | |
707 | ||
708 | # packaged by kernel part | |
709 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{pname}/additions/mount.vboxsf | |
710 | %endif | |
711 | ||
712 | %if %{with kernel} | |
713 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,modules-load.d},/sbin,%{systemdunitdir}} | |
714 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxservice | |
715 | install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxdrv | |
716 | install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxguest | |
717 | install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetflt | |
718 | install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxsf | |
719 | install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxnetadp | |
720 | install -p %{SOURCE8} $RPM_BUILD_ROOT/etc/rc.d/init.d/vboxpci | |
721 | %install_kernel_modules -m PLD-MODULE-BUILD/HostDrivers/vboxdrv/vboxdrv -d misc | |
722 | %install_kernel_modules -m PLD-MODULE-BUILD/HostDrivers/vboxnetadp/vboxnetadp -d misc | |
723 | %install_kernel_modules -m PLD-MODULE-BUILD/HostDrivers/vboxnetflt/vboxnetflt -d misc | |
724 | %install_kernel_modules -m PLD-MODULE-BUILD/HostDrivers/vboxpci/vboxpci -d misc | |
725 | %install_kernel_modules -m PLD-MODULE-BUILD/GuestDrivers/vboxguest/vboxguest -d misc | |
726 | %install_kernel_modules -m PLD-MODULE-BUILD/GuestDrivers/vboxsf/vboxsf -d misc | |
727 | %install_kernel_modules -m PLD-MODULE-BUILD/GuestDrivers/vboxvideo/vboxvideo -d misc | |
728 | ||
729 | install -p mount.vboxsf $RPM_BUILD_ROOT/sbin/mount.vboxsf | |
730 | ||
731 | # Tell systemd to load modules | |
732 | cp -p %{SOURCE12} $RPM_BUILD_ROOT/etc/modules-load.d/vboxdrv.conf | |
733 | cp -p %{SOURCE13} $RPM_BUILD_ROOT/etc/modules-load.d/vboxguest.conf | |
734 | cp -p %{SOURCE14} $RPM_BUILD_ROOT/etc/modules-load.d/vboxnetflt.conf | |
735 | cp -p %{SOURCE15} $RPM_BUILD_ROOT/etc/modules-load.d/vboxsf.conf | |
736 | cp -p %{SOURCE16} $RPM_BUILD_ROOT/etc/modules-load.d/vboxnetadp.conf | |
737 | cp -p %{SOURCE17} $RPM_BUILD_ROOT/etc/modules-load.d/vboxpci.conf | |
738 | ||
739 | # And mask module-loading services | |
740 | ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/vboxdrv.service | |
741 | ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/vboxguest.service | |
742 | ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/vboxnetflt.service | |
743 | ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/vboxsf.service | |
744 | ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/vboxnetadp.service | |
745 | ln -sf /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/vboxpci.service | |
746 | %endif | |
747 | ||
748 | %clean | |
749 | rm -rf $RPM_BUILD_ROOT | |
750 | ||
751 | %pre | |
752 | %groupadd -g 221 -r -f vbox | |
753 | ||
754 | %post | |
755 | %update_desktop_database | |
756 | for i in /sys/bus/usb/devices/*; do | |
757 | if [ -r "$i/dev" ]; then | |
758 | dev="`cat "$i/dev" 2>/dev/null || true`" | |
759 | major="`expr "$dev" : '\(.*\):' 2> /dev/null || true`" | |
760 | minor="`expr "$dev" : '.*:\(.*\)' 2> /dev/null || true`" | |
761 | class="`cat $i/bDeviceClass 2> /dev/null || true`" | |
762 | /lib/udev/VBoxCreateUSBNode.sh "$major" "$minor" "$class" vbox 2>/dev/null | |
763 | fi | |
764 | done | |
765 | ||
766 | cat << 'EOF' | |
767 | You must install vboxdrv kernel module for this software to work: | |
768 | kernel-misc-vboxdrv-%{version}-%{rel}@%{_kernel_ver_str} | |
769 | ||
770 | Additionally you might want to install: | |
771 | kernel-misc-vboxnetadp-%{version}-%{rel}@%{_kernel_ver_str} | |
772 | kernel-misc-vboxnetflt-%{version}-%{rel}@%{_kernel_ver_str} | |
773 | kernel-misc-vboxpci-%{version}-%{rel}@%{_kernel_ver_str} | |
774 | ||
775 | On Guest Linux system you might want to install: | |
776 | kernel-misc-vboxguest-%{version}-%{rel}@%{_kernel_ver_str} | |
777 | kernel-misc-vboxsf-%{version}-%{rel}@%{_kernel_ver_str} | |
778 | kernel-video-vboxvideo-%{version}-%{rel}@%{_kernel_ver_str} | |
779 | ||
780 | EOF | |
781 | ||
782 | %postun | |
783 | if [ "$1" = "0" ]; then | |
784 | %groupremove vbox | |
785 | fi | |
786 | ||
787 | %post guest | |
788 | /sbin/chkconfig --add vboxservice | |
789 | %service vboxservice restart | |
790 | ||
791 | %postun guest | |
792 | if [ "$1" = "0" ]; then | |
793 | /sbin/chkconfig --del vboxservice | |
794 | %service vboxservice -q stop | |
795 | fi | |
796 | ||
797 | %pre -n lightdm-greeter-vbox | |
798 | %addusertogroup xdm vbox | |
799 | ||
800 | %post -n kernel%{_alt_kernel}-misc-vboxdrv | |
801 | %depmod %{_kernel_ver} | |
802 | %vbox_kernel_post -d vboxdrv VirtualBox Support Driver | |
803 | ||
804 | %preun -n kernel%{_alt_kernel}-misc-vboxdrv | |
805 | if [ "$1" = "0" ]; then | |
806 | %service vboxdrv stop | |
807 | fi | |
808 | ||
809 | %postun -n kernel%{_alt_kernel}-misc-vboxdrv | |
810 | %depmod %{_kernel_ver} | |
811 | ||
812 | %post -n kernel%{_alt_kernel}-misc-vboxnetadp | |
813 | %depmod %{_kernel_ver} | |
814 | %vbox_kernel_post -d vboxnetadp VirtualBox Network HostOnly driver | |
815 | ||
816 | %preun -n kernel%{_alt_kernel}-misc-vboxnetadp | |
817 | if [ "$1" = "0" ]; then | |
818 | %service vboxnetadp stop | |
819 | fi | |
820 | ||
821 | %postun -n kernel%{_alt_kernel}-misc-vboxnetadp | |
822 | %depmod %{_kernel_ver} | |
823 | ||
824 | %post -n kernel%{_alt_kernel}-misc-vboxnetflt | |
825 | %depmod %{_kernel_ver} | |
826 | %vbox_kernel_post -d vboxnetflt VirtualBox Network Filter driver | |
827 | ||
828 | %preun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
829 | if [ "$1" = "0" ]; then | |
830 | %service vboxnetflt stop | |
831 | fi | |
832 | ||
833 | %postun -n kernel%{_alt_kernel}-misc-vboxnetflt | |
834 | %depmod %{_kernel_ver} | |
835 | ||
836 | %post -n kernel%{_alt_kernel}-misc-vboxpci | |
837 | %depmod %{_kernel_ver} | |
838 | %vbox_kernel_post -d vboxpci VirtualBox PCI passthrough driver | |
839 | ||
840 | %preun -n kernel%{_alt_kernel}-misc-vboxpci | |
841 | if [ "$1" = "0" ]; then | |
842 | %service vboxpci stop | |
843 | fi | |
844 | ||
845 | %postun -n kernel%{_alt_kernel}-misc-vboxpci | |
846 | %depmod %{_kernel_ver} | |
847 | ||
848 | %post -n kernel%{_alt_kernel}-misc-vboxguest | |
849 | %depmod %{_kernel_ver} | |
850 | %vbox_kernel_post -d vboxguest VirtualBox Guest additions driver | |
851 | ||
852 | %preun -n kernel%{_alt_kernel}-misc-vboxguest | |
853 | if [ "$1" = "0" ]; then | |
854 | %service vboxguest stop | |
855 | fi | |
856 | ||
857 | %postun -n kernel%{_alt_kernel}-misc-vboxguest | |
858 | %depmod %{_kernel_ver} | |
859 | ||
860 | %post -n kernel%{_alt_kernel}-misc-vboxsf | |
861 | %depmod %{_kernel_ver} | |
862 | %vbox_kernel_post -d vboxsf VirtualBox Host file system access (Shared Folders) | |
863 | ||
864 | %preun -n kernel%{_alt_kernel}-misc-vboxsf | |
865 | if [ "$1" = "0" ]; then | |
866 | %service vboxsf stop | |
867 | fi | |
868 | ||
869 | %postun -n kernel%{_alt_kernel}-misc-vboxsf | |
870 | %depmod %{_kernel_ver} | |
871 | ||
872 | %post -n kernel%{_alt_kernel}-video-vboxvideo | |
873 | %depmod %{_kernel_ver} | |
874 | ||
875 | %postun -n kernel%{_alt_kernel}-video-vboxvideo | |
876 | %depmod %{_kernel_ver} | |
877 | ||
878 | %post kernel-init-host | |
879 | /sbin/chkconfig --add vboxdrv | |
880 | /sbin/chkconfig --add vboxnetadp | |
881 | /sbin/chkconfig --add vboxnetflt | |
882 | /sbin/chkconfig --add vboxpci | |
883 | %systemd_reload | |
884 | ||
885 | %preun kernel-init-host | |
886 | if [ "$1" = "0" ]; then | |
887 | /sbin/chkconfig --del vboxdrv | |
888 | /sbin/chkconfig --del vboxnetadp | |
889 | /sbin/chkconfig --del vboxnetflt | |
890 | /sbin/chkconfig --del vboxpci | |
891 | fi | |
892 | ||
893 | %postun kernel-init-host | |
894 | %systemd_reload | |
895 | ||
896 | %post kernel-init-guest | |
897 | /sbin/chkconfig --add vboxguest | |
898 | /sbin/chkconfig --add vboxsf | |
899 | %systemd_reload | |
900 | ||
901 | %preun kernel-init-guest | |
902 | if [ "$1" = "0" ]; then | |
903 | /sbin/chkconfig --del vboxguest | |
904 | /sbin/chkconfig --del vboxsf | |
905 | fi | |
906 | ||
907 | %postun kernel-init-guest | |
908 | %systemd_reload | |
909 | ||
910 | %if %{with userspace} | |
911 | %files | |
912 | %defattr(644,root,root,755) | |
913 | %dir %{_libdir}/%{pname} | |
914 | %dir %{_libdir}/%{pname}/ExtensionPacks | |
915 | %dir %{_libdir}/%{pname}/ExtensionPacks/VNC | |
916 | %dir %{_libdir}/%{pname}/ExtensionPacks/VNC/linux* | |
917 | %dir %{_libdir}/%{pname}/additions | |
918 | %dir %{_libdir}/%{pname}/components | |
919 | %dir %{_libdir}/%{pname}/nls | |
920 | %attr(755,root,root) %{_bindir}/VBoxBFE | |
921 | %attr(755,root,root) %{_bindir}/VBoxHeadless | |
922 | %attr(755,root,root) %{_bindir}/VBoxManage | |
923 | %attr(755,root,root) %{_bindir}/VBoxSDL | |
924 | %attr(755,root,root) %{_bindir}/VBoxSVC | |
925 | %attr(755,root,root) %{_bindir}/VBoxTunctl | |
926 | %attr(755,root,root) %{_bindir}/VBoxXPCOMIPCD | |
927 | %attr(755,root,root) %{_bindir}/VirtualBox | |
928 | %attr(755,root,root) /sbin/mount.vdi | |
929 | %attr(755,root,root) %{_libdir}/%{pname}/DBGCPlugInDiggers.so | |
930 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxAuth.so | |
931 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxAuthSimple.so | |
932 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxAutostart | |
933 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxBFE | |
934 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxBalloonCtrl | |
935 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDbg.so | |
936 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDD2.so | |
937 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDD.so | |
938 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDDU.so | |
939 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxDragAndDropSvc.so | |
940 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxExtPackHelperApp | |
941 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxGuestControlSvc.so | |
942 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxGuestPropSvc.so | |
943 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxHeadless | |
944 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxHostChannel.so | |
945 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxKeyboard.so | |
946 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxManage | |
947 | %if %{with doc} | |
948 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxManageHelp | |
949 | %endif | |
950 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxNetAdpCtl | |
951 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxNetDHCP | |
952 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxOGLhostcrutil.so | |
953 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxOGLhosterrorspu.so | |
954 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxOGLrenderspu.so | |
955 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxPython*.so | |
956 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxREM.so | |
957 | %ifarch %{ix86} | |
958 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxREM32.so | |
959 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxREM64.so | |
960 | %endif | |
961 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxRT.so | |
962 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSDL | |
963 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSharedClipboard.so | |
964 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSharedCrOpenGL.so | |
965 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSharedFolders.so | |
966 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSVC | |
967 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxSysInfo.sh | |
968 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxTestOGL | |
969 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxTunctl | |
970 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxVMM.so | |
971 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxVMMPreload | |
972 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxXPCOMC.so | |
973 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxXPCOMIPCD | |
974 | %attr(755,root,root) %{_libdir}/%{pname}/VBoxXPCOM.so | |
975 | %attr(755,root,root) %{_libdir}/%{pname}/VirtualBox | |
976 | %attr(755,root,root) %{_libdir}/%{pname}/VirtualBox-wrapper.sh | |
977 | %attr(755,root,root) %{_libdir}/%{pname}/ExtensionPacks/VNC/linux*/VBoxVNC*.so | |
978 | %{_libdir}/%{pname}/VBoxDD2GC.gc | |
979 | %{_libdir}/%{pname}/VBoxDDGC.gc | |
980 | %{_libdir}/%{pname}/VMMGC.gc | |
981 | %{_libdir}/%{pname}/VBoxDD2R0.r0 | |
982 | %{_libdir}/%{pname}/VBoxDDR0.r0 | |
983 | %{_libdir}/%{pname}/VMMR0.r0 | |
984 | #%{_libdir}/%{pname}/EfiThunk | |
985 | %{_libdir}/%{pname}/VBoxEFI32.fd | |
986 | %{_libdir}/%{pname}/VBoxEFI64.fd | |
987 | %{_libdir}/%{pname}/components/VBoxXPCOMBase.xpt | |
988 | %{_libdir}/%{pname}/ExtensionPacks/VNC/ExtPack.xml | |
989 | %{_libdir}/%{pname}/components/VirtualBox_XPCOM.xpt | |
990 | %attr(755,root,root) %{_libdir}/%{pname}/components/VBoxC.so | |
991 | %attr(755,root,root) %{_libdir}/%{pname}/components/VBoxSVCM.so | |
992 | %attr(755,root,root) %{_libdir}/%{pname}/components/VBoxXPCOMIPCC.so | |
993 | %lang(bg) %{_libdir}/%{pname}/nls/*_bg.qm | |
994 | %lang(ca) %{_libdir}/%{pname}/nls/*_ca.qm | |
995 | %lang(ca_VA) %{_libdir}/%{pname}/nls/*_ca_VA.qm | |
996 | %lang(cs) %{_libdir}/%{pname}/nls/*_cs.qm | |
997 | %lang(da) %{_libdir}/%{pname}/nls/*_da.qm | |
998 | %lang(de) %{_libdir}/%{pname}/nls/*_de.qm | |
999 | %lang(en) %{_libdir}/%{pname}/nls/*_en.qm | |
1000 | %lang(es) %{_libdir}/%{pname}/nls/*_es.qm | |
1001 | %lang(eu) %{_libdir}/%{pname}/nls/*_eu.qm | |
1002 | %lang(fi) %{_libdir}/%{pname}/nls/*_fa_IR.qm | |
1003 | %lang(fi) %{_libdir}/%{pname}/nls/*_fi.qm | |
1004 | %lang(fr) %{_libdir}/%{pname}/nls/*_fr.qm | |
1005 | %lang(gl_ES) %{_libdir}/%{pname}/nls/*_gl_ES.qm | |
1006 | %lang(hu) %{_libdir}/%{pname}/nls/*_hu.qm | |
1007 | %lang(id) %{_libdir}/%{pname}/nls/*_id.qm | |
1008 | %lang(it) %{_libdir}/%{pname}/nls/*_it.qm | |
1009 | %lang(ja) %{_libdir}/%{pname}/nls/*_ja.qm | |
1010 | %lang(km_KH) %{_libdir}/%{pname}/nls/*_km_KH.qm | |
1011 | %lang(ko) %{_libdir}/%{pname}/nls/*_ko.qm | |
1012 | %lang(lt) %{_libdir}/%{pname}/nls/*_lt.qm | |
1013 | %lang(nl) %{_libdir}/%{pname}/nls/*_nl.qm | |
1014 | %lang(pl) %{_libdir}/%{pname}/nls/*_pl.qm | |
1015 | %lang(pt) %{_libdir}/%{pname}/nls/*_pt.qm | |
1016 | %lang(pt_BR) %{_libdir}/%{pname}/nls/*_pt_BR.qm | |
1017 | %lang(ro) %{_libdir}/%{pname}/nls/*_ro.qm | |
1018 | %lang(ru) %{_libdir}/%{pname}/nls/*_ru.qm | |
1019 | %lang(sk) %{_libdir}/%{pname}/nls/*_sk.qm | |
1020 | %lang(sr) %{_libdir}/%{pname}/nls/*_sr.qm | |
1021 | %lang(sv) %{_libdir}/%{pname}/nls/*_sv.qm | |
1022 | %lang(tr) %{_libdir}/%{pname}/nls/*_tr.qm | |
1023 | %lang(uk) %{_libdir}/%{pname}/nls/*_uk.qm | |
1024 | %lang(zh_CN) %{_libdir}/%{pname}/nls/*_zh_CN.qm | |
1025 | %lang(zh_TW) %{_libdir}/%{pname}/nls/*_zh_TW.qm | |
1026 | %{_pixmapsdir}/virtualbox.png | |
1027 | %{_desktopdir}/*.desktop | |
1028 | %{_libdir}/%{pname}/icons | |
1029 | %{_libdir}/%{pname}/virtualbox.xml | |
1030 | ||
1031 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/virtualbox.rules | |
1032 | %attr(755,root,root) /lib/udev/VBoxCreateUSBNode.sh | |
1033 | ||
1034 | %files additions | |
1035 | %defattr(644,root,root,755) | |
1036 | %{_libdir}/%{pname}/additions/VBoxGuestAdditions.iso | |
1037 | ||
1038 | %files guest | |
1039 | %defattr(644,root,root,755) | |
1040 | %attr(755,root,root) /sbin/mount.vboxsf | |
1041 | %attr(754,root,root) /etc/rc.d/init.d/vboxservice | |
1042 | %attr(755,root,root) %{_bindir}/VBoxControl | |
1043 | %attr(755,root,root) %{_bindir}/VBoxService | |
1044 | ||
1045 | %files guest-x11 | |
1046 | %defattr(644,root,root,755) | |
1047 | # NOTE: unfinished, should contain .desktop files for starting up mouse | |
1048 | # integration and other desktop services | |
1049 | # NOTE: the filelist is incomplete too | |
1050 | %attr(755,root,root) %{_bindir}/VBoxClient | |
1051 | /etc/X11/xinit/xinitrc.d/98vboxadd-xclient.sh | |
1052 | /etc/xdg/autostart/vboxclient.desktop | |
1053 | ||
1054 | %attr(755,root,root) %{_libdir}/%{pname}/additions/autorun.sh | |
1055 | %attr(755,root,root) %{_libdir}/%{pname}/additions/vboxadd | |
1056 | %attr(755,root,root) %{_libdir}/%{pname}/additions/vboxadd-service | |
1057 | %attr(755,root,root) %{_libdir}/%{pname}/additions/vboxadd-x11 | |
1058 | ||
1059 | %if %{with lightdm} | |
1060 | %files -n lightdm-greeter-vbox | |
1061 | %defattr(644,root,root,755) | |
1062 | %attr(755,root,root) %{_sbindir}/vbox-greeter | |
1063 | %{_datadir}/xgreeters/vbox-greeter.desktop | |
1064 | %endif | |
1065 | ||
1066 | %files -n pam-pam_vbox | |
1067 | %defattr(644,root,root,755) | |
1068 | %attr(755,root,root) /%{_lib}/security/pam_vbox.so | |
1069 | ||
1070 | %if %{with doc} | |
1071 | %files doc | |
1072 | %defattr(644,root,root,755) | |
1073 | # this is a symlink... | |
1074 | %doc %{_libdir}/%{pname}/UserManual.pdf | |
1075 | %lang(fr) %doc %{_libdir}/%{pname}/UserManual_fr_FR.pdf | |
1076 | # ..to this file | |
1077 | %doc %{outdir}/UserManual.pdf | |
1078 | %lang(fr) %doc %{outdir}/UserManual_fr_FR.pdf | |
1079 | %endif | |
1080 | ||
1081 | %files -n xorg-driver-video-vboxvideo | |
1082 | %defattr(644,root,root,755) | |
1083 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/vboxvideo_drv.so | |
1084 | %attr(755,root,root) %{_libdir}/xorg/modules/dri/vboxvideo_dri.so | |
1085 | # vboxvideo_dri.so deps | |
1086 | %attr(755,root,root) %{_libdir}/VBoxOGLarrayspu.so | |
1087 | %attr(755,root,root) %{_libdir}/VBoxOGLcrutil.so | |
1088 | %attr(755,root,root) %{_libdir}/VBoxOGLerrorspu.so | |
1089 | %attr(755,root,root) %{_libdir}/VBoxOGLfeedbackspu.so | |
1090 | %attr(755,root,root) %{_libdir}/VBoxOGLpackspu.so | |
1091 | %attr(755,root,root) %{_libdir}/VBoxOGLpassthroughspu.so | |
1092 | %endif | |
1093 | ||
1094 | %if %{with kernel} | |
1095 | %files kernel-init-host | |
1096 | %defattr(644,root,root,755) | |
1097 | %attr(754,root,root) /etc/rc.d/init.d/vboxdrv | |
1098 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetadp | |
1099 | %attr(754,root,root) /etc/rc.d/init.d/vboxnetflt | |
1100 | %attr(754,root,root) /etc/rc.d/init.d/vboxpci | |
1101 | %{systemdunitdir}/vboxdrv.service | |
1102 | %{systemdunitdir}/vboxnetadp.service | |
1103 | %{systemdunitdir}/vboxnetflt.service | |
1104 | %{systemdunitdir}/vboxpci.service | |
1105 | ||
1106 | %files kernel-init-guest | |
1107 | %defattr(644,root,root,755) | |
1108 | %attr(754,root,root) /etc/rc.d/init.d/vboxguest | |
1109 | %attr(754,root,root) /etc/rc.d/init.d/vboxsf | |
1110 | %{systemdunitdir}/vboxguest.service | |
1111 | %{systemdunitdir}/vboxsf.service | |
1112 | ||
1113 | %files -n kernel%{_alt_kernel}-misc-vboxguest | |
1114 | %defattr(644,root,root,755) | |
1115 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/vboxguest.conf | |
1116 | /lib/modules/%{_kernel_ver}/misc/vboxguest.ko* | |
1117 | ||
1118 | %files -n kernel%{_alt_kernel}-misc-vboxdrv | |
1119 | %defattr(644,root,root,755) | |
1120 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/vboxdrv.conf | |
1121 | /lib/modules/%{_kernel_ver}/misc/vboxdrv.ko* | |
1122 | ||
1123 | %files -n kernel%{_alt_kernel}-misc-vboxnetadp | |
1124 | %defattr(644,root,root,755) | |
1125 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/vboxnetadp.conf | |
1126 | /lib/modules/%{_kernel_ver}/misc/vboxnetadp.ko* | |
1127 | ||
1128 | %files -n kernel%{_alt_kernel}-misc-vboxnetflt | |
1129 | %defattr(644,root,root,755) | |
1130 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/vboxnetflt.conf | |
1131 | /lib/modules/%{_kernel_ver}/misc/vboxnetflt.ko* | |
1132 | ||
1133 | %files -n kernel%{_alt_kernel}-misc-vboxpci | |
1134 | %defattr(644,root,root,755) | |
1135 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/vboxpci.conf | |
1136 | /lib/modules/%{_kernel_ver}/misc/vboxpci.ko* | |
1137 | ||
1138 | %files -n kernel%{_alt_kernel}-misc-vboxsf | |
1139 | %defattr(644,root,root,755) | |
1140 | %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/vboxsf.conf | |
1141 | /lib/modules/%{_kernel_ver}/misc/vboxsf.ko* | |
1142 | ||
1143 | %files -n kernel%{_alt_kernel}-video-vboxvideo | |
1144 | %defattr(644,root,root,755) | |
1145 | /lib/modules/%{_kernel_ver}/misc/vboxvideo.ko* | |
1146 | %endif |