-
Notifications
You must be signed in to change notification settings - Fork 8
/
xen.spec
2322 lines (1855 loc) · 84.5 KB
/
xen.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define with_ocaml 0
%define build_ocaml 0
%define with_xsm 0
%define build_xsm 0
# cross compile 64-bit hypervisor on ix86 unless rpmbuild was run
# with --without crosshyp
%define build_crosshyp %{?_without_crosshyp: 0} %{?!_without_crosshyp: 1}
%ifnarch %{ix86}
%define build_crosshyp 0
%define build_hyp 1
%else
%if %build_crosshyp
%define build_hyp 1
%else
%define build_hyp 0
# no point in trying to build xsm on ix86 without a hypervisor
%define build_xsm 0
%endif
%endif
# build an efi boot image (where supported) unless rpmbuild was run with
# --without efi
%define build_efi %{?_without_efi: 0} %{?!_without_efi: 1}
# xen only supports efi boot images on x86_64
%ifnarch x86_64
%define build_efi 0
%endif
# Hypervisor ABI
%define hv_abi 4.6
%{!?version: %define version %(cat version)}
%{!?rel: %define rel %(cat rel)}
%define _sourcedir %(pwd)
Summary: Xen is a virtual machine monitor
Name: xen
Version: %{version}
Release: %{rel}%{?dist}
Epoch: 2001
Group: Development/Libraries
License: GPLv2+ and LGPLv2+ and BSD
URL: http://xen.org/
Source0: xen-%{version}.tar.gz
Source2: %{name}.logrotate
# used by stubdoms
Source10: lwip-1.3.0.tar.gz
Source11: newlib-1.16.0.tar.gz
Source12: zlib-1.2.3.tar.gz
Source13: pciutils-2.2.9.tar.bz2
Source14: grub-0.97.tar.gz
Source15: gmp-4.3.2.tar.bz2
Source16: polarssl-1.1.4-gpl.tgz
Source18: tpm_emulator-0.7.4.tar.gz
Source32: xen.modules-load.conf
# Qubes components for stubdom
Source33: gui-agent-xen-hvm-stubdom
Source34: core-vchan-xen
Source35: stubdom-dhcp
Source36: gui-common
Source98: apply-patches
Source99: series.conf
Source100: patches.fedora
Source101: patches.libxl
Source102: patches.misc
Source103: patches.qubes
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: transfig libidn-devel zlib-devel texi2html SDL-devel curl-devel
BuildRequires: libX11-devel python-devel ghostscript texlive-latex
%if 0%fedora >= 18
BuildRequires: texlive-times texlive-courier texlive-helvetic texlive-ntgclass
%endif
BuildRequires: ncurses-devel gtk2-devel libaio-devel
# for the docs
BuildRequires: perl perl(Pod::Man) perl(Pod::Text) texinfo graphviz
# so that the makefile knows to install udev rules
BuildRequires: udev
%ifarch %{ix86} x86_64
# so that x86_64 builds pick up glibc32 correctly
BuildRequires: /usr/include/gnu/stubs-32.h
# for the VMX "bios"
BuildRequires: dev86
%endif
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext
BuildRequires: gnutls-devel
BuildRequires: openssl-devel
# For ioemu PCI passthrough
BuildRequires: pciutils-devel
# Several tools now use uuid
BuildRequires: libuuid-devel
# iasl needed to build hvmloader
BuildRequires: iasl
# build using Fedora seabios and ipxe packages for roms
BuildRequires: seabios-bin ipxe-roms-qemu
# modern compressed kernels
BuildRequires: bzip2-devel xz-devel
# libfsimage
BuildRequires: e2fsprogs-devel
# tools now require yajl
BuildRequires: yajl-devel
# stubdom build requires cmake
BuildRequires: cmake
%if %with_xsm
# xsm policy file needs needs checkpolicy and m4
BuildRequires: checkpolicy m4
%endif
%if %build_crosshyp
# cross compiler for building 64-bit hypervisor on ix86
BuildRequires: gcc-x86_64-linux-gnu
%endif
Requires: bridge-utils
Requires: python-lxml
Requires: udev >= 059
Requires: xen-runtime = %{version}-%{release}
# Not strictly a dependency, but kpartx is by far the most useful tool right
# now for accessing domU data from within a dom0 so bring it in when the user
# installs xen.
Requires: kpartx
Requires: chkconfig
ExclusiveArch: %{ix86} x86_64
#ExclusiveArch: %%{ix86} x86_64 ia64 noarch
%if %with_ocaml
BuildRequires: ocaml, ocaml-findlib
%endif
# efi image needs an ld that has -mi386pep option
%if %build_efi
BuildRequires: mingw64-binutils
%endif
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: systemd
BuildRequires: systemd-devel
%description
This package contains the XenD daemon and xm command line
tools, needed to manage virtual machines running under the
Xen hypervisor
%package libs
Summary: Libraries for Xen tools
Group: Development/Libraries
Requires(pre): /sbin/ldconfig
Requires(post): /sbin/ldconfig
Requires: xen-licenses
Provides: xen-libs = %{version}-%{release}
Obsoletes: xen-qubes-vm-libs < %{epoch}:%{version}-%{release}
%description libs
This package contains the libraries needed to run applications
which manage Xen virtual machines.
%package runtime
Summary: Core Xen runtime environment
Group: Development/Libraries
Requires: xen-libs = %{version}-%{release}
# Ensure we at least have a suitable kernel installed, though we can't
# force user to actually boot it.
Requires: xen-hypervisor-abi = %{hv_abi}
Requires: perl
Provides: xen-runtime = %{version}-%{release}
%description runtime
This package contains the runtime programs and daemons which
form the core Xen userspace environment.
%package hypervisor
Summary: Libraries for Xen tools
Group: Development/Libraries
Provides: xen-hypervisor-abi = %{hv_abi}
Requires: xen-licenses
%description hypervisor
This package contains the Xen hypervisor
%package doc
Summary: Xen documentation
Group: Documentation
#BuildArch: noarch
Requires: xen-licenses
%description doc
This package contains the Xen documentation.
%package devel
Summary: Development libraries for Xen tools
Group: Development/Libraries
Requires: xen-libs = %{version}-%{release}
Requires: libuuid-devel
Provides: xen-devel = %{version}-%{release}
Obsoletes: xen-qubes-vm-devel
%description devel
This package contains what's needed to develop applications
which manage Xen virtual machines.
%package licenses
Summary: License files from Xen source
Group: Documentation
%description licenses
This package contains the license files from the source used
to build the xen packages.
%if %build_ocaml
%package ocaml
Summary: Ocaml libraries for Xen tools
Group: Development/Libraries
Requires: ocaml-runtime, xen-libs = %{version}-%{release}
%description ocaml
This package contains libraries for ocaml tools to manage Xen
virtual machines.
%package ocaml-devel
Summary: Ocaml development libraries for Xen tools
Group: Development/Libraries
Requires: xen-ocaml = %{version}-%{release}
%description ocaml-devel
This package contains libraries for developing ocaml tools to
manage Xen virtual machines.
%endif
%package hvm
Summary: Loader and device-model for HVM
Requires: xen-libs = %{version}-%{release}
Requires: xen-runtime = %{version}-%{release}
%description hvm
This package contains files for HVM domains, especially stubdomain with device model.
%package qemu-tools
Summary: Qemu disk tools bundled with Xen
Requires: xen-hvm = %{version}-%{release}
Provides: qemu-img
Conflicts: qemu-img
%description qemu-tools
This package contains symlinks to qemu tools (qemu-img, qemu-nbd, qemu-io)
budled with Xen, making them available for general use.
%package qubes-vm
Summary: Xen files required in Qubes VM
Requires: xen-libs = %{epoch}:%{version}-%{release}
Requires: perl
Conflicts: xen
Provides: xen-qubes-vm-essentials = %{epoch}:%{version}-%{release}
%description qubes-vm
Just a few xenstore-* tools and Xen hotplug scripts needed by Qubes VMs
%prep
%setup -q
# Apply patches
%{SOURCE98} %{SOURCE99} %{_sourcedir}
# Fix for glibc 2.7
#FIXME sed 's:LIBS+=-lutil:LIBS+=-lutil -lrt:' -i tools/ioemu-qemu-xen/Makefile.target
# stubdom sources
cp -v %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
cp -v %{SOURCE15} %{SOURCE16} %{SOURCE18} stubdom
# qubes specific parts of stubdom
mkdir tools/qubes-gui/
cp -a %{SOURCE33}/* tools/qubes-gui/
cp -a %{SOURCE36}/include/qubes-gui*.h tools/qubes-gui/include/
make -C tools/qubes-gui clean
cp -a %{SOURCE34}/vchan tools/
make -C tools/vchan -f Makefile.stubdom clean
sed -e 's/ioemu-qemu-xen/qemu-xen-traditional/g' tools/qubes-gui/gui-agent-qemu/qemu-glue.patch | patch -p1
cp -a %{SOURCE35}/* tools/qemu-xen-traditional/
patch -d tools/qemu-xen-traditional -p4 < %{SOURCE35}/lwip-dhcp-qemu-glue.patch
%build
%if !%build_ocaml
%define ocaml_flags OCAML_TOOLS=n
%endif
%if %build_efi
%define efi_flags LD_EFI=/usr/x86_64-w64-mingw32/bin/ld EFI_VENDOR=qubes
mkdir -p dist/install/boot/efi/efi/qubes
%endif
%if %(test -f /usr/share/seabios/bios-256k.bin && echo 1|| echo 0)
%define seabiosloc /usr/share/seabios/bios-256k.bin
%else
%define seabiosloc /usr/share/seabios/bios.bin
%endif
export XEN_VENDORVERSION="-%{release}"
export CFLAGS="$RPM_OPT_FLAGS"
export PATH="/usr/bin:$PATH"
autoreconf
make %{?_smp_mflags} %{?efi_flags} prefix=/usr dist-xen
# setting libexecdir to real libexec is broken in the configure script (it is
# overrided by /usr/lib)
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--libexecdir=/usr/lib \
--with-system-seabios=%{seabiosloc} \
--enable-vtpm-stubdom \
--enable-vtpmmgr-stubdom \
--with-extra-qemuu-configure-args="--disable-smartcard-nss --disable-spice"
make %{?_smp_mflags} %{?ocaml_flags} prefix=/usr dist-tools
make prefix=/usr dist-docs
unset CFLAGS
make %{?ocaml_flags} dist-stubdom
%install
rm -rf %{buildroot}
%if %build_ocaml
mkdir -p %{buildroot}%{_libdir}/ocaml/stublibs
%endif
%if %build_efi
mkdir -p %{buildroot}/boot/efi/efi/qubes
%endif
make DESTDIR=%{buildroot} %{?efi_flags} prefix=/usr install-xen
make DESTDIR=%{buildroot} %{?ocaml_flags} prefix=/usr install-tools
make DESTDIR=%{buildroot} prefix=/usr install-docs
make DESTDIR=%{buildroot} %{?ocaml_flags} prefix=/usr install-stubdom
%if %build_efi
mv %{buildroot}/boot/efi/efi %{buildroot}/boot/efi/EFI
%endif
%if %build_xsm
# policy file should be in /boot/flask
mkdir %{buildroot}/boot/flask
mv %{buildroot}/boot/xenpolicy* %{buildroot}/boot/flask
%else
rm -f %{buildroot}/boot/xenpolicy*
%endif
# qemu symlinks
mkdir -p %{buildroot}/usr/bin
ln -s ../lib/%{name}/bin/qemu-img %{buildroot}/usr/bin/
ln -s ../lib/%{name}/bin/qemu-io %{buildroot}/usr/bin/
ln -s ../lib/%{name}/bin/qemu-nbd %{buildroot}/usr/bin/
############ debug packaging: list files ############
find %{buildroot} -print | xargs ls -ld | sed -e 's|.*%{buildroot}||' > f1.list
############ kill unwanted stuff ############
# stubdom: newlib
rm -rf %{buildroot}/usr/*-xen-elf
# hypervisor symlinks
rm -rf %{buildroot}/boot/xen-4.6.gz
rm -rf %{buildroot}/boot/xen-4.gz
rm -rf %{buildroot}/boot/xen.gz
%if !%build_hyp
rm -rf %{buildroot}/boot
%endif
# silly doc dir fun
rm -rf %{buildroot}%{_datadir}/doc/xen
rm -rf %{buildroot}%{_datadir}/doc/qemu
# Pointless helper
rm -f %{buildroot}%{_sbindir}/xen-python-path
# qemu stuff (unused or available from upstream)
rm -rf %{buildroot}/usr/share/xen/man
for file in bios.bin openbios-sparc32 openbios-sparc64 ppc_rom.bin \
pxe-e1000.bin pxe-ne2k_pci.bin pxe-pcnet.bin pxe-rtl8139.bin \
vgabios.bin vgabios-cirrus.bin video.x openbios-ppc bamboo.dtb
do
rm -f %{buildroot}/%{_datadir}/xen/qemu/$file
done
rm -f %{buildroot}/usr/libexec/qemu-bridge-helper
# README's not intended for end users
rm -f %{buildroot}/%{_sysconfdir}/xen/README*
# standard gnu info files
rm -rf %{buildroot}/usr/info
# adhere to Static Library Packaging Guidelines
rm -rf %{buildroot}/%{_libdir}/*.a
%if %build_efi
# clean up extra efi files
rm -rf %{buildroot}/%{_libdir}/efi
%endif
############ fixup files in /etc ############
# logrotate
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
# init scripts
rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xen-watchdog
rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xencommons
rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xendomains
rm %{buildroot}%{_sysconfdir}/rc.d/init.d/xendriverdomain
rm %{buildroot}%{_sysconfdir}/sysconfig/xendomains
cp %{SOURCE32} %{buildroot}/usr/lib/modules-load.d/xen.conf
# Qubes specific - get rid of standard domain starting scripts
rm %{buildroot}%{_unitdir}/xen-qemu-dom0-disk-backend.service
rm %{buildroot}%{_unitdir}/xendomains.service
############ create dirs in /var ############
mkdir -p %{buildroot}%{_localstatedir}/lib/xen/images
mkdir -p %{buildroot}%{_localstatedir}/log/xen/console
ln -s ../sbin/xl %{buildroot}/%{_bindir}/xl
############ debug packaging: list files ############
find %{buildroot} -print | xargs ls -ld | sed -e 's|.*%{buildroot}||' > f2.list
diff -u f1.list f2.list || true
############ assemble license files ############
mkdir licensedir
# avoid licensedir to avoid recursion, also stubdom/ioemu and dist
# which are copies of files elsewhere
find . -path licensedir -prune -o -path stubdom/ioemu -prune -o \
-path dist -prune -o -name COPYING -o -name LICENSE | while read file; do
mkdir -p licensedir/`dirname $file`
install -m 644 $file licensedir/$file
done
############ all done now ############
%post runtime
%systemd_post xenstored.service xenconsoled.service
%preun runtime
%systemd_preun xenstored.service xenconsoled.service
%postun runtime
%systemd_postun
%post qubes-vm
# Unconditionally enable this service in Qubes VM
systemctl enable xendriverdomain.service >/dev/null 2>&1 || :
%preun qubes-vm
%systemd_preun xendriverdomain.service
%postun qubes-vm
%systemd_postun
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%if %build_hyp
%post hypervisor
%if %build_efi
EFI_DIR=$(efibootmgr -v 2>/dev/null | awk '
/^BootCurrent:/ { current=$2; }
/^Boot....\* / {
if ("Boot" current "*" == $1) {
sub(".*File\\(", "");
sub("\\\\xen.efi\\).*", "");
gsub("\\\\", "/");
print;
}
}')
# FAT (on ESP) does not support symlinks
# override the file on purpose
if [ -d "/boot/efi${EFI_DIR}" ]; then
cp -pf /boot/efi/EFI/qubes/xen-%{version}.efi /boot/efi${EFI_DIR}/xen.efi
else
cp -pf /boot/efi/EFI/qubes/xen-%{version}.efi /boot/efi/EFI/qubes/xen.efi
fi
%endif
if [ $1 == 1 -a -f /sbin/grub2-mkconfig ]; then
if [ -f /boot/grub2/grub.cfg ]; then
/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
fi
if [ -f /boot/efi/EFI/qubes/grub.cfg ]; then
/sbin/grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
fi
fi
%postun hypervisor
if [ -f /sbin/grub2-mkconfig ]; then
if [ -f /boot/grub2/grub.cfg ]; then
/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
fi
if [ -f /boot/efi/EFI/qubes/grub.cfg ]; then
/sbin/grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg
fi
fi
%endif
%if %build_ocaml
%post ocaml
%systemd_post oxenstored.service
%preun ocaml
%systemd_preun oxenstored.service
%postun ocaml
%systemd_postun
%endif
%clean
rm -rf %{buildroot}
# Base package only contains XenD/xm python stuff
#files -f xen-xm.lang
%files
%defattr(-,root,root)
%doc COPYING README
%{_bindir}/xencons
%{python_sitearch}/%{name}
%{python_sitearch}/xen-*.egg-info
%files libs
%defattr(-,root,root)
%{_libdir}/*.so.*
%{_libdir}/fs
# All runtime stuff except for XenD/xm python stuff
%files runtime
%defattr(-,root,root)
%dir %attr(0700,root,root) %{_sysconfdir}/%{name}
%dir %attr(0700,root,root) %{_sysconfdir}/%{name}/scripts/
%config %attr(0700,root,root) %{_sysconfdir}/%{name}/scripts/*
%{_sysconfdir}/bash_completion.d/xl.sh
%exclude %{_unitdir}/xendriverdomain.service
%{_unitdir}/proc-xen.mount
%{_unitdir}/var-lib-xenstored.mount
%{_unitdir}/xen-init-dom0.service
%{_unitdir}/xenstored.service
%{_unitdir}/xenconsoled.service
%{_unitdir}/xen-watchdog.service
%{_unitdir}/xenstored.socket
%{_unitdir}/xenstored_ro.socket
/usr/lib/modules-load.d/xen.conf
%config(noreplace) %{_sysconfdir}/sysconfig/xencommons
%config(noreplace) %{_sysconfdir}/xen/xl.conf
%config(noreplace) %{_sysconfdir}/xen/cpupool
%config(noreplace) %{_sysconfdir}/xen/xlexample*
# Rotate console log files
%config(noreplace) %{_sysconfdir}/logrotate.d/xen
# Programs run by other programs
%dir /usr/lib/%{name}
%dir /usr/lib/%{name}/bin
# List them explicitly to exclude files owned by xen-hvm package
%attr(0700,root,root) /usr/lib/%{name}/bin/convert-legacy-stream
%attr(0700,root,root) /usr/lib/%{name}/bin/libxl-save-helper
%attr(0700,root,root) /usr/lib/%{name}/bin/lsevtchn
%attr(0700,root,root) /usr/lib/%{name}/bin/pygrub
%attr(0700,root,root) /usr/lib/%{name}/bin/readnotes
%attr(0700,root,root) /usr/lib/%{name}/bin/verify-stream-v2
%attr(0700,root,root) /usr/lib/%{name}/bin/xen-init-dom0
%attr(0700,root,root) /usr/lib/%{name}/bin/xenconsole
%attr(0700,root,root) /usr/lib/%{name}/bin/xenctx
%attr(0700,root,root) /usr/lib/%{name}/bin/xendomains
%attr(0700,root,root) /usr/lib/%{name}/bin/xenpvnetboot
# QEMU runtime files
%dir %{_datadir}/%{name}/qemu
%dir %{_datadir}/%{name}/qemu/keymaps
%{_datadir}/%{name}/qemu/keymaps/*
%dir %{_datadir}/qemu-xen
%dir %{_datadir}/qemu-xen/qemu
%{_datadir}/qemu-xen/qemu/*
# man pages
%{_mandir}/man1/xentop.1*
%{_mandir}/man1/xentrace_format.1*
%{_mandir}/man8/xentrace.8*
%{_mandir}/man1/xl.1*
%{_mandir}/man5/xl.cfg.5*
%{_mandir}/man5/xl.conf.5*
%{_mandir}/man5/xlcpupool.cfg.5*
%{_mandir}/man1/xenstore*
%{python_sitearch}/fsimage.so
%{python_sitearch}/grub
%{python_sitearch}/pygrub-*.egg-info
# The firmware
%ifarch %{ix86} x86_64
%dir /usr/lib/%{name}/boot
/usr/lib/xen/boot/xenstore-stubdom.gz
/usr/lib/xen/boot/pv-grub*.gz
/usr/lib/xen/boot/vtpm-stubdom.gz
/usr/lib/xen/boot/vtpmmgr-stubdom.gz
%endif
# General Xen state
%dir %{_localstatedir}/lib/%{name}
%dir %{_localstatedir}/lib/%{name}/dump
%dir %{_localstatedir}/lib/%{name}/images
# Xenstore persistent state
%dir %{_localstatedir}/lib/xenstored
# Xenstore runtime state
%ghost %{_localstatedir}/run/xenstored
# All xenstore CLI tools
%{_bindir}/qemu-*-xen
%{_bindir}/xenstore
%{_bindir}/xenstore-*
%{_bindir}/pygrub
%{_bindir}/xentrace*
#%%{_bindir}/remus
# blktap daemon
%{_sbindir}/tapdisk*
# XSM
%if %build_xsm
%{_sbindir}/flask-*
%endif
# Disk utils
%{_sbindir}/qcow-create
%{_sbindir}/qcow2raw
%{_sbindir}/img2qcow
# Misc stuff
%{_bindir}/xen-detect
%{_bindir}/xencov_split
%{_sbindir}/gdbsx
%{_sbindir}/gtrace*
%{_sbindir}/kdd
%{_sbindir}/lock-util
%{_sbindir}/tap-ctl
%{_sbindir}/td-util
%{_sbindir}/vhd-*
%{_sbindir}/xen-bugtool
%{_sbindir}/xen-hptool
%{_sbindir}/xen-hvmcrash
%{_sbindir}/xen-hvmctx
%{_sbindir}/xen-tmem-list-parse
%{_sbindir}/xenconsoled
%{_sbindir}/xenlockprof
%{_sbindir}/xenmon.py*
%{_sbindir}/xentop
%{_sbindir}/xentrace_setmask
%{_sbindir}/xenbaked
%{_sbindir}/xenstored
%{_sbindir}/xenpm
%{_sbindir}/xenpmd
%{_sbindir}/xenperf
%{_sbindir}/xenwatchdogd
%{_sbindir}/xl
%{_sbindir}/xen-lowmemd
%{_sbindir}/xen-ringwatch
%{_sbindir}/xencov
%{_sbindir}/xen-mfndump
/usr/share/pkgconfig/*
%{_bindir}/xenalyze
%{_sbindir}/xentrace
%{_sbindir}/xentrace_setsize
%{_bindir}/xl
# Xen logfiles
%dir %attr(0700,root,root) %{_localstatedir}/log/xen
# Guest/HV console logs
%dir %attr(0700,root,root) %{_localstatedir}/log/xen/console
%files hypervisor
%if %build_hyp
%defattr(-,root,root)
/boot/xen-*.gz
%if %build_xsm
%dir %attr(0755,root,root) /boot/flask
/boot/flask/xenpolicy*
%endif
%if %build_efi
/boot/efi/EFI/qubes/*.efi
%endif
%endif
%files doc
%defattr(-,root,root)
%doc docs/misc/
%doc dist/install/usr/share/doc/xen/html
%files devel
%defattr(-,root,root)
%{_includedir}/*.h
%dir %{_includedir}/xen
%{_includedir}/xen/*
%dir %{_includedir}/xenstore-compat
%{_includedir}/xenstore-compat/*
%{_libdir}/*.so
%files licenses
%defattr(-,root,root)
%doc licensedir/*
%if %build_ocaml
%files ocaml
%defattr(-,root,root)
%{_libdir}/ocaml/xen*
%exclude %{_libdir}/ocaml/xen*/*.a
%exclude %{_libdir}/ocaml/xen*/*.cmxa
%exclude %{_libdir}/ocaml/xen*/*.cmx
%{_libdir}/ocaml/stublibs/*.so
%{_libdir}/ocaml/stublibs/*.so.owner
%{_sbindir}/oxenstored
%config(noreplace) %{_sysconfdir}/xen/oxenstored.conf
%{_unitdir}/oxenstored.service
%files ocaml-devel
%defattr(-,root,root)
%{_libdir}/ocaml/xen*/*.a
%{_libdir}/ocaml/xen*/*.cmxa
%{_libdir}/ocaml/xen*/*.cmx
%endif
%files hvm
# The firmware
%ifnarch ia64
/usr/lib/%{name}/bin/stubdom-dm
/usr/lib/%{name}/bin/qemu-dm
/usr/lib/%{name}/bin/qemu-img
/usr/lib/%{name}/bin/qemu-io
/usr/lib/%{name}/bin/qemu-nbd
/usr/lib/%{name}/bin/qemu-system-i386
/usr/lib/%{name}/bin/stubdompath.sh
/usr/lib/%{name}/bin/xenpaging
# HVM loader is always in /usr/lib regardless of multilib
/usr/lib/xen/boot/hvmloader
/usr/lib/xen/boot/ioemu-stubdom.gz
%endif
%files qemu-tools
/usr/bin/qemu-img
/usr/bin/qemu-io
/usr/bin/qemu-nbd
/usr/share/locale/*/LC_MESSAGES/qemu.mo
/usr/etc/qemu/target-x86_64.conf
%files qubes-vm
%{_bindir}/xenstore
%{_bindir}/xenstore-*
%{_sbindir}/xl
%{_unitdir}/xendriverdomain.service
%config(noreplace) %{_sysconfdir}/xen/xl.conf
%dir %attr(0700,root,root) %{_sysconfdir}/xen
%dir %attr(0700,root,root) %{_sysconfdir}/xen/scripts/
%config %attr(0700,root,root) %{_sysconfdir}/xen/scripts/*
# General Xen state
%dir %{_localstatedir}/lib/xen
%dir %{_localstatedir}/lib/xen/dump
# Xen logfiles
%dir %attr(0700,root,root) %{_localstatedir}/log/xen
# Python modules
%dir %{python_sitearch}/xen
%{python_sitearch}/xen/__init__.*
%{python_sitearch}/xen/lowlevel
%{python_sitearch}/xen-*.egg-info
%changelog
* Sun Oct 11 2015 Michael Young <m.a.young@durham.ac.uk> - 4.6.0-1
- update to xen-4.6.0
xen-dumpdir.patch no longer needed
adjust xen.use.fedora.ipxe.patch and xen.fedora.systemd.patch
remove upstream patches
add build fix for blktap2 to gcc5 fixes
udev rules have now gone as have xen-syms in /boot
package extra files
/etc/rc.d/init.d/xendriverdomain
/usr/bin/xenalyze
/usr/sbin/xentrace
/usr/sbin/xentrace_setsize
/usr/share/pkgconfig/*.pc
- renumber patches
- add build-requires for pandoc and discount to improve docs
* Sat Oct 10 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-13
- patch CVE-2015-7295 for qemu-xen-traditional as well
* Thu Oct 08 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-12
- Qemu: net: virtio-net possible remote DoS [CVE-2015-7295] (#1264392)
* Tue Oct 06 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-11
- create a symbolic link so libvirt VMs from xen 4.0 to 4.4 can still
find qemu-dm (#1268176), (#1248843)
* Sun Sep 27 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-10
- ide: fix ATAPI command permissions [CVE-2015-6855] (#1261792)
* Sat Sep 26 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-9
- ui/vnc: limit client_cut_text msg payload size [CVE-2015-5239] (#1259504)
- e1000: Avoid infinite loop in processing transmit descriptor
[CVE-2015-6815] (#1260224)
- net: add checks to validate ring buffer pointers [CVE-2015-5279] (#1263278)
- net: avoid infinite loop when receiving packets [CVE-2015-5278] (#1263281)
- qemu buffer overflow in virtio-serial [CVE-2015-5745] (#1251354)
* Tue Sep 15 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-8
- libxl fails to honour readonly flag on disks with qemu-xen
[XSA-142, CVE-2015-7311] (#1257893) (final patch version)
* Tue Sep 01 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-7
- printk is not rate-limited in xenmem_add_to_physmap_one (ARM)
[XSA-141, CVE-2015-6654]
* Mon Aug 03 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-6
- Use after free in QEMU/Xen block unplug protocol [XSA-139, CVE-2015-5166]
(#1249757)
- QEMU leak of uninitialized heap memory in rtl8139 device model
[XSA-140, CVE-2015-5165] (#1249756)
* Sun Aug 02 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-5
- QEMU heap overflow flaw while processing certain ATAPI commands.
[XSA-138, CVE-2015-5154] (#1247142)
- try again to fix xen-qemu-dom0-disk-backend.service (#1242246)
* Thu Jul 30 2015 Richard W.M. Jones <rjones@redhat.com> - 4.5.1-4
- OCaml 4.02.3 rebuild.
* Thu Jul 23 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-3
- correct qemu location in xen-qemu-dom0-disk-backend.service (#1242246)
- rebuild efi grub.cfg if it is present (#1239309)
- re-enable remus by building with libnl3
- modify gnutls use in line with Fedora's crypto policies (#1179352)
* Tue Jul 07 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-2
- xl command line config handling stack overflow [XSA-137, CVE-2015-3259]
* Mon Jun 22 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.1-1
- update to 4.5.1
adjust xen.use.fedora.ipxe.patch and xen.fedora.systemd.patch
remove patches for issues now fixed upstream
renumber patches
* Fri Jun 19 2015 Richard W.M. Jones <rjones@redhat.com> - 4.5.0-13
- Rebuild for ocaml-4.02.2.
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Jun 16 2015 Michael Young <m.a.young@durham.ac.uk>
- gcc 5 bug is fixed so remove workaround
* Wed Jun 10 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-11
- stubs-32.h is back, so revert to previous behaviour
- Heap overflow in QEMU PCNET controller, allowing guest->host escape
[XSA-135, CVE-2015-3209] (#1230537)
- GNTTABOP_swap_grant_ref operation misbehavior [XSA-134, CVE-2015-4163]
- vulnerability in the iret hypercall handler [XSA-136, CVE-2015-4164]
* Wed Jun 03 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-10.1
- stubs-32.h has gone from rawhide, put it back manually
* Tue Jun 02 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-10
- replace deprecated gnutls use in qemu-xen-traditional based on
qemu-xen patches
- work around a gcc 5 bug
- Potential unintended writes to host MSI message data field via qemu
[XSA-128, CVE-2015-4103] (#1227627)
- PCI MSI mask bits inadvertently exposed to guests [XSA-129, CVE-2015-4104]
(#1227628)
- Guest triggerable qemu MSI-X pass-through error messages [XSA-130,
CVE-2015-4105] (#1227629)
- Unmediated PCI register access in qemu [XSA-131, CVE-2015-4106] (#1227631)
* Wed May 13 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-9
- Privilege escalation via emulated floppy disk drive [XSA-133,
CVE-2015-3456] (#1221153)
* Mon Apr 20 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-8
- Information leak through XEN_DOMCTL_gettscinfo [XSA-132,
CVE-2015-3340] (#1214037)
* Tue Mar 31 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-7
- Long latency MMIO mapping operations are not preemptible [XSA-125,
CVE-2015-2752] (#1207741)
- Unmediated PCI command register access in qemu [XSA-126,
CVE-2015-2756] (#1307738)
- Certain domctl operations may be abused to lock up the host [XSA-127,
CVE-2015-2751] (#1207739)
* Fri Mar 13 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-6
- Additional patch for XSA-98 on arm64
* Thu Mar 12 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-5
- HVM qemu unexpectedly enabling emulated VGA graphics backends [XSA-119,
CVE-2015-2152] (#1201365)
* Tue Mar 10 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-4
- Hypervisor memory corruption due to x86 emulator flaw [XSA-123,
CVE-2015-2151] (#1200398)
* Thu Mar 05 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-3
- Information leak via internal x86 system device emulation [XSA-121,
CVE-2015-2044]
- Information leak through version information hypercall [XSA-122,
CVE-2015-2045]
- fix a typo in xen.fedora.systemd.patch
* Sat Feb 14 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-2
- arm: vgic-v2: GICD_SGIR is not properly emulated [XSA-117, CVE-2015-0268]
- allow certain warnings with gcc5 that would otherwise be treated as errors
* Thu Jan 29 2015 Michael Young <m.a.young@durham.ac.uk> - 4.5.0-1
- update to 4.5.0
xend has gone, so remove references to xend in spec file, sources and patches
remove patches for issues now fixed upstream
adjust some patches due to other code changes
adjust spec file for renamed xenpolicy files
set prefix back to /usr (default is now /usr/local)
use upstream systemd files with patches for Fedora and selinux
sysconfig for systemd is now in xencommons file
for x86_64, files in /usr/lib64/xen/bin have moved to /usr/lib/xen/bin
remus isn't built
upstream systemd support needs systemd-devel to build
replace new uint32 with uint32_t in ocaml file for ocaml-4.02.0
stop oxenstored failing when selinux is enforcing
re-number patches
- enable building pngs from fig files which is working again
- fix oxenstored.service preset preuninstall script
- arm: vgic: incorrect rate limiting of guest triggered logging [XSA-118,
CVE-2015-1563] (#1187153)
* Tue Jan 06 2015 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-12
- xen crash due to use after free on hvm guest teardown [XSA-116,
CVE-2015-0361] (#1179221)
* Tue Dec 16 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-11
- fix xendomains issue introduced by xl migrate --debug patch
* Mon Dec 08 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-10
- p2m lock starvation [XSA-114, CVE-2014-9065]
- fix build with --without xsm
* Thu Nov 27 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-9
- Excessive checking in compatibility mode hypercall argument translation
[XSA-111, CVE-2014-8866]
- Insufficient bounding of "REP MOVS" to MMIO emulated inside the hypervisor
[XSA-112, CVE-2014-8867]
- fix segfaults and failures in xl migrate --debug (#1166461)
* Thu Nov 20 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-8
- Guest effectable page reference leak in MMU_MACHPHYS_UPDATE handling
[XSA-113, CVE-2014-9030] (#1166914)
* Tue Nov 18 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-7
- Insufficient restrictions on certain MMU update hypercalls [XSA-109,
CVE-2014-8594] (#1165205)
- Missing privilege level checks in x86 emulation of far branches [XSA-110,
CVE-2014-8595] (#1165204)
- Add fix for CVE-2014-0150 to qemu-dm, though it probably isn't
exploitable from xen (#1086776)
* Wed Oct 01 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-6
- Improper MSR range used for x2APIC emulation [XSA-108, CVE-2014-7188]
(#1148465)
* Tue Sep 30 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-5
- xen support is in 256k seabios binary when it exists (#1146260)
* Tue Sep 23 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-4
- Race condition in HVMOP_track_dirty_vram [XSA-104, CVE-2014-7154] (#1145736)
- Missing privilege level checks in x86 HLT, LGDT, LIDT, and LMSW emulation
[XSA-105, CVE-2014-7155] (#1145737)
- Missing privilege level checks in x86 emulation of software interrupts
[XSA-106, CVE-2014-7156] (#1145738)
* Sun Sep 14 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-3
- disable building pngs from fig files which is currently broken in rawhide
* Tue Sep 09 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-2
- Mishandling of uninitialised FIFO-based event channel control blocks
[XSA-107, CVE-2014-6268] (#1140287)
- delete a patch file that was dropped in the last update
* Tue Sep 02 2014 Michael Young <m.a.young@durham.ac.uk> - 4.4.1-1
- update to xen-4.4.1
remove patches for fixes that are now included
- replace uint32 with uint32_t in ocaml file for ocaml-4.02.0