]> git.pld-linux.org Git - packages/qemu-kvm.git/blob - qemu-kvm.spec
- pl for -guest-agent
[packages/qemu-kvm.git] / qemu-kvm.spec
1 #
2 # Conditional build:
3 %bcond_without  spice                   # SPICE support
4 #
5 Summary:        QEMU CPU Emulator
6 Summary(pl.UTF-8):      QEMU - emulator procesora
7 Name:           qemu-kvm
8 Version:        1.0
9 Release:        8
10 License:        GPL
11 Group:          Applications/Emulators
12 Source0:        http://downloads.sourceforge.net/kvm/%{name}-%{version}.tar.gz
13 # Source0-md5:  00a825db46a70ba8ef9fc95da9cc7c1e
14 Source1:        http://www.linuxtogo.org/~kevin/SeaBIOS/bios.bin-1.6.3
15 # Source1-md5:  9d3b8a7fbd65e5250b9d005a79ffaf34
16 Source2:        qemu.binfmt
17 # Loads kvm kernel modules at boot
18 Source3:        kvm-modules-load.conf
19 # Creates /dev/kvm
20 Source4:        80-kvm.rules
21 # KSM control scripts
22 Source5:        ksm.service
23 Source6:        ksm.sysconfig
24 Source7:        ksmctl.c
25 Source8:        ksmtuned.service
26 Source9:        ksmtuned
27 Source10:       ksmtuned.conf
28 Source11:       qemu-guest-agent.service
29 Source12:       99-qemu-guest-agent.rules
30 Patch0:         %{name}-whitelist.patch
31 Patch1:         Fix_save-restore_of_in-kernel_i8259.patch
32 # Feature patches, should be in 1.1 before release
33 Patch2:         enable_architectural_PMU_cpuid_leaf.patch
34 Patch3:         qemu_virtio-scsi_support.patch
35 Patch4:         qemu-kvm-cflags.patch
36 # Update to qemu 1.0.1
37 Patch100:       qemu-1.0.1.patch
38 URL:            http://www.linux-kvm.org/
39 BuildRequires:  SDL-devel >= 1.2.1
40 BuildRequires:  alsa-lib-devel
41 BuildRequires:  bluez-libs-devel
42 BuildRequires:  brlapi-devel
43 BuildRequires:  ceph-devel
44 BuildRequires:  check-devel
45 BuildRequires:  gnutls-devel
46 BuildRequires:  libaio-devel
47 BuildRequires:  libevent-devel
48 BuildRequires:  libfdt-devel
49 BuildRequires:  libiscsi-devel
50 BuildRequires:  ncurses-devel
51 BuildRequires:  pciutils-devel
52 BuildRequires:  perl-Encode
53 BuildRequires:  perl-tools-pod
54 BuildRequires:  pkgconfig
55 BuildRequires:  pulseaudio-devel
56 BuildRequires:  rpmbuild(macros) >= 1.644
57 BuildRequires:  sed >= 4.0
58 %if %{with spice}
59 BuildRequires:  spice-protocol
60 BuildRequires:  spice-server-devel
61 %endif
62 BuildRequires:  texi2html
63 BuildRequires:  usbredir-devel
64 BuildRequires:  which
65 BuildRequires:  xorg-lib-libX11-devel
66 Requires:       %{name}-img = %{version}-%{release}
67 Requires:       %{name}-system-alpha = %{version}-%{release}
68 Requires:       %{name}-system-arm = %{version}-%{release}
69 Requires:       %{name}-system-cris = %{version}-%{release}
70 Requires:       %{name}-system-lm32 = %{version}-%{release}
71 Requires:       %{name}-system-m68k = %{version}-%{release}
72 Requires:       %{name}-system-microblaze = %{version}-%{release}
73 Requires:       %{name}-system-mips = %{version}-%{release}
74 Requires:       %{name}-system-ppc = %{version}-%{release}
75 Requires:       %{name}-system-s390x = %{version}-%{release}
76 Requires:       %{name}-system-sh4 = %{version}-%{release}
77 Requires:       %{name}-system-sparc = %{version}-%{release}
78 Requires:       %{name}-system-x86 = %{version}-%{release}
79 Requires:       %{name}-system-xtensa = %{version}-%{release}
80 Requires:       %{name}-user = %{version}-%{release}
81 Provides:       qemu = %{version}-%{release}
82 Obsoletes:      qemu
83 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
84
85 # some PPC/SPARC boot image in ELF format
86 %define         _noautostrip    .*%{_datadir}/qemu/.*
87
88 %description
89 QEMU is a FAST! processor emulator. By using dynamic translation it
90 achieves a reasonnable speed while being easy to port on new host
91 CPUs. QEMU has two operating modes:
92
93 - User mode emulation. In this mode, QEMU can launch Linux processes
94   compiled for one CPU on another CPU. Linux system calls are converted
95   because of endianness and 32/64 bit mismatches. Wine (Windows
96   emulation) and DOSEMU (DOS emulation) are the main targets for QEMU.
97
98 - Full system emulation. In this mode, QEMU emulates a full system,
99   including a processor and various peripherials. It can also be used to
100   provide virtual hosting of several virtual PC on a single server.
101
102 %description -l pl.UTF-8
103 QEMU to szybki(!) emulator procesora. Poprzez użycie dynamicznego
104 tłumaczenia osiąga rozsądną szybkość i jest łatwy do przeportowania,
105 aby działał na kolejnych procesorach. QEMU ma dwa tryby pracy:
106
107 - Emulacja trybu użytkownika. W tym trybie QEMU może uruchamiać
108   procesy linuksowe skompilowane dla jednego procesora na innym
109   procesorze. Linuksowe wywołania systemowe są tłumaczone ze względu na
110   niezgodność kolejności bajtów w słowie i 32/64-bitowego rozmiaru
111   słowa. Wine (emulacja Windows) i DOSEMU (emulacja DOS-a) to główne
112   cele QEMU.
113
114 - Pełna emulacja systemu. W tym trybie QEMU emuluje cały system,
115   włączając w to procesor i różne urządzenia peryferyjne. Może być także
116   używane do wirtualnego hostowania kilku wirtualnych pecetów na
117   pojedynczym serwerze.
118
119 %package common
120 Summary:        QEMU common files needed by all QEMU targets
121 Summary(pl.UTF-8):      Wspólne pliki QEMU wymagane przez wszystkie środowiska QEMU
122 Group:          Development/Tools
123 Requires(postun):       /usr/sbin/groupdel
124 Requires(postun):       /usr/sbin/userdel
125 Requires(pre):  /bin/id
126 Requires(pre):  /usr/bin/getgid
127 Requires(pre):  /usr/sbin/groupadd
128 Requires(pre):  /usr/sbin/useradd
129 Requires(post,preun,postun):    systemd-units >= 38
130 Requires:       SDL >= 1.2.1
131 Provides:       group(kvm)
132 Provides:       qemu-common
133 Requires:       systemd-units >= 38
134 Conflicts:      qemu-kvm < 1.0-3
135
136 %description common
137 QEMU is a generic and open source processor emulator which achieves a
138 good emulation speed by using dynamic translation.
139
140 This package provides the common files needed by all QEMU targets.
141
142 %description common -l pl.UTF-8
143 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
144 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
145
146 Ten pakiet udostępnia wspólne pliki wymagane przez wszystkie
147 środowiska QEMU.
148
149 %package img
150 Summary:        QEMU command line tool for manipulating disk images
151 Summary(pl.UTF-8):      Narzędzie QEMU do operacji na obrazach dysków
152 Group:          Development/Tools
153 Conflicts:      qemu-kvm < 1.0-3
154
155 %description img
156 This package provides a command line tool for manipulating disk
157 images.
158
159 %description img -l pl.UTF-8
160 Ten pakiet udostępnia działające z linii poleceń narzędzia do operacji
161 na obrazach dysków.
162
163 %package user
164 Summary:        QEMU user mode emulation of qemu targets
165 Summary(pl.UTF-8):      QEMU - emulacja trybu użytkownika środowisk qemu
166 Group:          Development/Tools
167 Requires:       %{name}-common = %{version}-%{release}
168 Requires(post,postun):  systemd-units >= 38
169 Requires:       systemd-units >= 38
170
171 %description user
172 QEMU is a generic and open source processor emulator which achieves a
173 good emulation speed by using dynamic translation.
174
175 This package provides the user mode emulation of QEMU targets.
176
177 %description user -l pl.UTF-8
178 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
179 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
180
181 Ten pakiet udostępnia emulację trybu użytkownika środowisk QEMU.
182
183 %package system-alpha
184 Summary:        QEMU system emulator for Alpha
185 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem Alpha
186 Group:          Development/Tools
187 Requires:       %{name}-common = %{version}-%{release}
188
189 %description system-alpha
190 QEMU is a generic and open source processor emulator which achieves a
191 good emulation speed by using dynamic translation.
192
193 This package provides the system emulator with Alpha CPU.
194
195 %description system-alpha -l pl.UTF-8
196 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
197 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
198
199 Ten pakiet zawiera emulator systemu z procesorem Alpha.
200
201 %package system-arm
202 Summary:        QEMU system emulator for ARM
203 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem ARM
204 Group:          Development/Tools
205 Requires:       %{name}-common = %{version}-%{release}
206
207 %description system-arm
208 QEMU is a generic and open source processor emulator which achieves a
209 good emulation speed by using dynamic translation.
210
211 This package provides the system emulator for ARM.
212
213 %description system-arm -l pl.UTF-8
214 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
215 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
216
217 Ten pakiet zawiera emulator systemu z procesorem ARM.
218
219 %package system-cris
220 Summary:        QEMU system emulator for CRIS
221 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem CRIS
222 Group:          Development/Tools
223 Requires:       %{name}-common = %{version}-%{release}
224
225 %description system-cris
226 QEMU is a generic and open source processor emulator which achieves a
227 good emulation speed by using dynamic translation.
228
229 This package provides the system emulator with CRIS CPU.
230
231 %description system-cris -l pl.UTF-8
232 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
233 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
234
235 Ten pakiet zawiera emulator systemu z procesorem CRIS.
236
237 %package system-lm32
238 Summary:        QEMU system emulator for LM32
239 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem LM32
240 Group:          Development/Tools
241 Requires:       %{name}-common = %{version}-%{release}
242
243 %description system-lm32
244 QEMU is a generic and open source processor emulator which achieves a
245 good emulation speed by using dynamic translation.
246
247 This package provides the system emulator with LM32 CPU.
248
249 %description system-lm32 -l pl.UTF-8
250 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
251 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
252
253 Ten pakiet zawiera emulator systemu z procesorem LM32.
254
255 %package system-m68k
256 Summary:        QEMU system emulator for m68k
257 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem m68k
258 Group:          Development/Tools
259 Requires:       %{name}-common = %{version}-%{release}
260
261 %description system-m68k
262 QEMU is a generic and open source processor emulator which achieves a
263 good emulation speed by using dynamic translation.
264
265 This package provides the system emulator with m68k CPU.
266
267 %description system-m68k -l pl.UTF-8
268 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
269 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
270
271 Ten pakiet zawiera emulator systemu z procesorem m68k.
272
273 %package system-microblaze
274 Summary:        QEMU system emulator for MicroBlaze
275 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem MicroBlaze
276 Group:          Development/Tools
277 Requires:       %{name}-common = %{version}-%{release}
278
279 %description system-microblaze
280 QEMU is a generic and open source processor emulator which achieves a
281 good emulation speed by using dynamic translation.
282
283 This package provides the system emulator with MicroBlaze CPU.
284
285 %description system-microblaze -l pl.UTF-8
286 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
287 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
288
289 Ten pakiet zawiera emulator systemu z procesorem MicroBlaze.
290
291 %package system-mips
292 Summary:        QEMU system emulator for MIPS
293 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem MIPS
294 Group:          Development/Tools
295 Requires:       %{name}-common = %{version}-%{release}
296
297 %description system-mips
298 QEMU is a generic and open source processor emulator which achieves a
299 good emulation speed by using dynamic translation.
300
301 This package provides the system emulator with MIPS CPU.
302
303 %description system-mips -l pl.UTF-8
304 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
305 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
306
307 Ten pakiet zawiera emulator systemu z procesorem MIPS.
308
309
310 %package system-ppc
311 Summary:        QEMU system emulator for PowerPC
312 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem PowerPC
313 Group:          Development/Tools
314 Requires:       %{name}-common = %{version}-%{release}
315
316 %description system-ppc
317 QEMU is a generic and open source processor emulator which achieves a
318 good emulation speed by using dynamic translation.
319
320 This package provides the system emulator with PowerPC CPU.
321
322 %description system-ppc -l pl.UTF-8
323 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
324 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
325
326 Ten pakiet zawiera emulator systemu z procesorem PowerPC.
327
328 %package system-s390x
329 Summary:        QEMU system emulator for S390
330 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem S390
331 Group:          Development/Tools
332 Requires:       %{name}-common = %{version}-%{release}
333
334 %description system-s390x
335 QEMU is a generic and open source processor emulator which achieves a
336 good emulation speed by using dynamic translation.
337
338 This package provides the system emulator with S390 CPU.
339
340 %description system-s390x -l pl.UTF-8
341 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
342 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
343
344 Ten pakiet zawiera emulator systemu z procesorem S390.
345
346 %package system-sh4
347 Summary:        QEMU system emulator for SH4
348 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem SH4
349 Group:          Development/Tools
350 Requires:       %{name}-common = %{version}-%{release}
351
352 %description system-sh4
353 QEMU is a generic and open source processor emulator which achieves a
354 good emulation speed by using dynamic translation.
355
356 This package provides the system emulator with SH4 CPU.
357
358 %description system-sh4 -l pl.UTF-8
359 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
360 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
361
362 Ten pakiet zawiera emulator systemu z procesorem SH4.
363
364 %package system-sparc
365 Summary:        QEMU system emulator for SPARC
366 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem SPARC
367 Group:          Development/Tools
368 Requires:       %{name}-common = %{version}-%{release}
369
370 %description system-sparc
371 QEMU is a generic and open source processor emulator which achieves a
372 good emulation speed by using dynamic translation.
373
374 This package provides the system emulator with SPARC/SPARC64 CPU.
375
376 %description system-sparc -l pl.UTF-8
377 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
378 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
379
380 Ten pakiet zawiera emulator systemu z procesorem SPARC/SPARC64.
381
382 %package system-x86
383 Summary:        QEMU system emulator for x86
384 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem x86
385 Group:          Development/Tools
386 Requires:       %{name}-common = %{version}-%{release}
387 Obsoletes:      kvm
388
389 %description system-x86
390 QEMU is a generic and open source processor emulator which achieves a
391 good emulation speed by using dynamic translation.
392
393 This package provides the system emulator with x86 CPU. When being run
394 in a x86 machine that supports it, this package also provides the KVM
395 virtualization platform.
396
397 %description system-x86 -l pl.UTF-8
398 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
399 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
400
401 Ten pakiet zawiera emulator systemu z procesorem x86. W przypadku
402 uruchomienia na maszynie x86 pozwalającej na to, ten pakiet udostępnia
403 także platformę wirtualizacji KVM.
404
405 %package system-xtensa
406 Summary:        QEMU system emulator for Xtensa
407 Summary(pl.UTF-8):      QEMU - emulator systemu z procesorem Xtensa
408 Group:          Development/Tools
409 Requires:       %{name}-common = %{version}-%{release}
410
411 %description system-xtensa
412 QEMU is a generic and open source processor emulator which achieves a
413 good emulation speed by using dynamic translation.
414
415 This package provides the system emulator with Xtensa CPU.
416
417 %description system-xtensa -l pl.UTF-8
418 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
419 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
420
421 Ten pakiet zawiera emulator systemu z procesorem Xtensa.
422
423 %package guest-agent
424 Summary:        QEMU guest agent
425 Summary(pl.UTF-8):      Agent gościa QEMU
426 Group:          Daemons
427 Requires(post,preun,postun):    systemd-units >= 38
428 Requires:       systemd-units >= 38
429
430 %description guest-agent
431 QEMU is a generic and open source processor emulator which achieves
432 a good emulation speed by using dynamic translation.
433
434 This package provides an agent to run inside guests, which
435 communicates with the host over a virtio-serial channel named
436 "org.qemu.guest_agent.0".
437
438 This package does not need to be installed on the host OS.
439
440 %description guest-agent -l pl.UTF-8
441 QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
442 dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
443
444 Ten pakiet udostępnia agenta przeznaczonego do uruchomienia w
445 systemach-gościach, komunikującego się kanałem virtio-serial o nazwie
446 "org.qemu.guest_agent.0".
447
448 Ten pakiet nie musi być zainstalowany w systemie hosta.
449
450 %prep
451 %setup -q
452 %patch0 -p1
453
454 %patch1 -p1
455 %patch2 -p1
456 %patch3 -p1
457 %patch4 -p1
458
459 %patch100 -p1
460
461 cp -a %{SOURCE1} pc-bios/bios.bin
462
463 # workaround for conflict with alsa/error.h
464 ln -s ../error.h qapi/error.h
465
466 %build
467 %ifarch %{ix86} %{x8664}
468 ./configure \
469         --target-list="x86_64-softmmu" \
470         --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
471         --extra-ldflags="%{rpmldflags}" \
472         --prefix=%{_prefix} \
473         --sysconfdir=%{_sysconfdir} \
474         --cc="%{__cc}" \
475         --host-cc="%{__cc}" \
476         --enable-vnc \
477         --enable-vnc-tls \
478         --enable-vnc-sasl \
479         --enable-vnc-jpeg \
480         --enable-vnc-png \
481         --enable-vnc-thread \
482         --enable-curses \
483         --enable-bluez \
484         --enable-kvm-device-assignment \
485         --enable-kvm-pit \
486         --enable-system \
487         --enable-user \
488         --enable-mixemu \
489         --enable-uuid \
490         --enable-attr \
491         --enable-vhost-net \
492         --enable-smartcard \
493         --enable-guest-agent \
494         --enable-docs \
495         --audio-drv-list="alsa,pa,sdl,oss" \
496         --audio-card-list="ac97,es1370,sb16,cs4231a,adlib,gus,hda" \
497         --interp-prefix=%{_prefix}/qemu-%%M \
498         %{__enable_disable spice} \
499         --disable-strip
500
501 %{__make} V=99
502 cp -a x86_64-softmmu/qemu-system-x86_64 qemu-kvm
503 %{__make} clean V=99
504 %endif
505
506 ./configure \
507         --target-list="" \
508         --extra-cflags="%{rpmcflags} -I/usr/include/ncurses" \
509         --extra-ldflags="%{rpmldflags}" \
510         --prefix=%{_prefix} \
511         --sysconfdir=%{_sysconfdir} \
512         --cc="%{__cc}" \
513         --host-cc="%{__cc}" \
514         --enable-vnc \
515         --enable-vnc-tls \
516         --enable-vnc-sasl \
517         --enable-vnc-jpeg \
518         --enable-vnc-png \
519         --enable-vnc-thread \
520         --enable-curses \
521         --enable-bluez \
522         --disable-kvm \
523         --enable-system \
524         --enable-user \
525         --enable-mixemu \
526         --enable-uuid \
527         --enable-attr \
528         --enable-vhost-net \
529         --enable-smartcard \
530         --enable-guest-agent \
531         --enable-docs \
532         --audio-drv-list="alsa,pa,sdl,oss" \
533         --audio-card-list="ac97,es1370,sb16,cs4231a,adlib,gus,hda" \
534         --interp-prefix=%{_prefix}/qemu-%%M \
535 %ifarch %{ix86} %{x8664}
536         %{__enable_disable spice} \
537 %endif
538         --disable-strip
539
540 %{__make} V=99
541
542 %{__cc} %{SOURCE7} %{rpmcflags} -o ksmctl
543
544 %install
545 rm -rf $RPM_BUILD_ROOT
546 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/usr/lib/binfmt.d} \
547         $RPM_BUILD_ROOT/etc/{sysconfig,udev/rules.d,modules-load.d} \
548         $RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}}
549
550 %{__make} install \
551         V=99 \
552         DESTDIR=$RPM_BUILD_ROOT
553
554 install -d $RPM_BUILD_ROOT%{_sysconfdir}
555 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup
556 #!/bin/sh
557
558 EOF
559
560 install -p qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl/qemu.conf
561
562 install -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/ksm.service
563 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/ksm
564 install -p ksmctl $RPM_BUILD_ROOT%{_sbindir}
565
566 install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/ksmtuned.service
567 install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned
568 install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
569
570 %ifarch %{ix86} %{x8664}
571 install qemu-kvm $RPM_BUILD_ROOT%{_bindir}/qemu-system-x86_64
572 ln -s qemu-system-x86_64 $RPM_BUILD_ROOT%{_bindir}/qemu-kvm
573 install kvm/kvm_stat $RPM_BUILD_ROOT%{_bindir}
574 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/modules-load.d/kvm.conf
575 install -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
576 %endif
577
578 # For the qemu-guest-agent subpackage install the systemd
579 # service and udev rules.
580 install -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
581 install -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
582
583 for i in dummy \
584 %ifnarch %{ix86} %{x8664}
585     qemu-i386 \
586 %endif
587 %ifnarch arm
588     qemu-arm \
589 %endif
590 %ifnarch ppc ppc64
591     qemu-ppc \
592 %endif
593 %ifnarch sparc sparc64
594     qemu-sparc \
595 %endif
596 %ifnarch sh4
597     qemu-sh4 \
598 %endif
599 ; do
600         test $i = dummy && continue
601         grep /$i:\$ %{SOURCE2} > $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i.conf
602 done < %{SOURCE2}
603
604 # already packaged
605 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html
606
607 %clean
608 rm -rf $RPM_BUILD_ROOT
609
610 %pre common
611 %groupadd -g 160 kvm
612 %groupadd -g 276 qemu
613 %useradd -u 276 -g qemu -G kvm -c "QEMU User" qemu
614
615 %post common
616 %systemd_post ksm.service
617 %systemd_post ksmtuned.service
618
619 %preun common
620 %systemd_preun ksm.service
621 %systemd_preun ksmtuned.service
622
623 %postun common
624 if [ "$1" = "0" ]; then
625         %userremove qemu
626         %groupremove qemu
627         %groupremove kvm
628 fi
629 %systemd_reload
630
631 %triggerpostun common -- %{name} < 1.0-3
632 %systemd_trigger ksm.service
633 %systemd_trigger ksmtuned.service
634
635 %post user
636 %systemd_service_restart systemd-binfmt.service
637
638 %postun user
639 %systemd_service_restart systemd-binfmt.service
640
641 %post guest-agent
642 %systemd_reload
643
644 %preun guest-agent
645 %systemd_preun qemu-guest-agent.service
646
647 %postun guest-agent
648 %systemd_reload
649
650 %files
651 %defattr(644,root,root,755)
652
653 %files common
654 %defattr(644,root,root,755)
655 %doc README qemu-doc.html qemu-tech.html
656 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
657 %dir %{_sysconfdir}/qemu
658 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu/target-*.conf
659 %config(noreplace) %verify(not md5 mtime size) /etc/ksmtuned.conf
660 %config(noreplace) %verify(not md5 mtime size) /etc/sasl/qemu.conf
661 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ksm
662 %{systemdunitdir}/ksm.service
663 %{systemdunitdir}/ksmtuned.service
664 %attr(755,root,root) %{_bindir}/qemu-nbd
665 %attr(755,root,root) %{_sbindir}/ksmctl
666 %attr(755,root,root) %{_sbindir}/ksmtuned
667 %{_mandir}/man1/qemu.1*
668 %{_mandir}/man8/qemu-nbd.8*
669
670 %dir %{_datadir}/qemu
671 %{_datadir}/qemu/keymaps
672 # various bios images
673 %{_datadir}/qemu/*.bin
674 %{_datadir}/qemu/*.rom
675 %{_datadir}/qemu/*.dtb
676 %{_datadir}/qemu/openbios-ppc
677 %{_datadir}/qemu/openbios-sparc*
678 %{_datadir}/qemu/palcode-clipper
679
680 %files img
681 %defattr(644,root,root,755)
682 %attr(755,root,root) %{_bindir}/qemu-img
683 %{_mandir}/man1/qemu-img.1*
684
685 %files user
686 %defattr(644,root,root,755)
687 /usr/lib/binfmt.d/qemu-*.conf
688 %attr(755,root,root) %{_bindir}/qemu-alpha
689 %attr(755,root,root) %{_bindir}/qemu-arm
690 %attr(755,root,root) %{_bindir}/qemu-armeb
691 %attr(755,root,root) %{_bindir}/qemu-cris
692 %attr(755,root,root) %{_bindir}/qemu-i386
693 %attr(755,root,root) %{_bindir}/qemu-io
694 %attr(755,root,root) %{_bindir}/qemu-m68k
695 %attr(755,root,root) %{_bindir}/qemu-microblaze
696 %attr(755,root,root) %{_bindir}/qemu-microblazeel
697 %attr(755,root,root) %{_bindir}/qemu-mips
698 %attr(755,root,root) %{_bindir}/qemu-mipsel
699 %attr(755,root,root) %{_bindir}/qemu-ppc
700 %attr(755,root,root) %{_bindir}/qemu-ppc64
701 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32
702 %attr(755,root,root) %{_bindir}/qemu-s390x
703 %attr(755,root,root) %{_bindir}/qemu-sh4
704 %attr(755,root,root) %{_bindir}/qemu-sh4eb
705 %attr(755,root,root) %{_bindir}/qemu-sparc
706 %attr(755,root,root) %{_bindir}/qemu-sparc32plus
707 %attr(755,root,root) %{_bindir}/qemu-sparc64
708 %attr(755,root,root) %{_bindir}/qemu-unicore32
709 %attr(755,root,root) %{_bindir}/qemu-x86_64
710
711 %files system-alpha
712 %defattr(644,root,root,755)
713 %attr(755,root,root) %{_bindir}/qemu-system-alpha
714
715 %files system-arm
716 %defattr(644,root,root,755)
717 %attr(755,root,root) %{_bindir}/qemu-system-arm
718
719 %files system-cris
720 %defattr(644,root,root,755)
721 %attr(755,root,root) %{_bindir}/qemu-system-cris
722
723 %files system-lm32
724 %defattr(644,root,root,755)
725 %attr(755,root,root) %{_bindir}/qemu-system-lm32
726
727 %files system-m68k
728 %defattr(644,root,root,755)
729 %attr(755,root,root) %{_bindir}/qemu-system-m68k
730
731 %files system-microblaze
732 %defattr(644,root,root,755)
733 %attr(755,root,root) %{_bindir}/qemu-system-microblaze
734 %attr(755,root,root) %{_bindir}/qemu-system-microblazeel
735
736 %files system-mips
737 %defattr(644,root,root,755)
738 %attr(755,root,root) %{_bindir}/qemu-system-mips
739 %attr(755,root,root) %{_bindir}/qemu-system-mipsel
740 %attr(755,root,root) %{_bindir}/qemu-system-mips64
741 %attr(755,root,root) %{_bindir}/qemu-system-mips64el
742
743 %files system-ppc
744 %defattr(644,root,root,755)
745 %attr(755,root,root) %{_bindir}/qemu-system-ppc
746 %attr(755,root,root) %{_bindir}/qemu-system-ppc64
747 %attr(755,root,root) %{_bindir}/qemu-system-ppcemb
748
749 %files system-s390x
750 %defattr(644,root,root,755)
751 %attr(755,root,root) %{_bindir}/qemu-system-s390x
752
753 %files system-sh4
754 %defattr(644,root,root,755)
755 %attr(755,root,root) %{_bindir}/qemu-system-sh4
756 %attr(755,root,root) %{_bindir}/qemu-system-sh4eb
757
758 %files system-sparc
759 %defattr(644,root,root,755)
760 %attr(755,root,root) %{_bindir}/qemu-system-sparc
761 %attr(755,root,root) %{_bindir}/qemu-system-sparc64
762
763 %files system-x86
764 %defattr(644,root,root,755)
765 %ifarch %{ix86} %{x8664}
766 %config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/kvm.conf
767 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/80-kvm.rules
768 %endif
769 %attr(755,root,root) %{_bindir}/kvm_stat
770 %attr(755,root,root) %{_bindir}/qemu-kvm
771 %attr(755,root,root) %{_bindir}/qemu-system-i386
772 %attr(755,root,root) %{_bindir}/qemu-system-x86_64
773
774 %files system-xtensa
775 %defattr(644,root,root,755)
776 %attr(755,root,root) %{_bindir}/qemu-system-xtensa
777 %attr(755,root,root) %{_bindir}/qemu-system-xtensaeb
778
779 %files guest-agent
780 %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/99-qemu-guest-agent.rules
781 %{systemdunitdir}/qemu-guest-agent.service
782 %attr(755,root,root) %{_bindir}/qemu-ga
This page took 0.172331 seconds and 3 git commands to generate.