Repository navigation
Expand file tree
/
Copy path001-add-pve-port-version.patch
More file actions
185 lines (179 loc) · 5.6 KB
/
Copy path001-add-pve-port-version.patch
File metadata and controls
185 lines (179 loc) · 5.6 KB
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
diff --git a/Makefile b/Makefile
index f23b041..f79ce78 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,6 @@ PC_BIOS_FW_PURGE_LIST_IN = \
.*[a-zA-Z0-9]\.dts \
qemu_vga.ndrv \
slof.bin \
- opensbi-riscv.*-generic-fw_dynamic.bin \
BLOB_PURGE_SED_CMDS = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "/$(FILE)/d")
BLOB_PURGE_FILTER = $(foreach FILE,$(PC_BIOS_FW_PURGE_LIST_IN),-e "$(FILE)")
diff --git a/debian/control b/debian/control
index b228c00..4a6b057 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Build-Depends: debhelper-compat (= 13),
libfdt-dev,
libgbm-dev,
libglusterfs-dev (>= 5.2-2),
+ libgtk-3-dev,
libgnutls28-dev,
libiscsi-dev (>= 1.12.0),
libjpeg-dev,
@@ -45,7 +46,7 @@ Standards-Version: 3.7.2
Package: pve-qemu-kvm
Architecture: any
-Depends: ceph-common (>= 0.48),
+Depends: ceph-common [amd64 arm64],
iproute2,
libgfapi0 | glusterfs-common (>= 5.6),
libgfchangelog0 | glusterfs-common (>= 5.6),
@@ -54,7 +55,7 @@ Depends: ceph-common (>= 0.48),
libgfxdr0 | glusterfs-common (>= 5.6),
libglusterfs-dev | glusterfs-common (>= 5.6),
libglusterfs0 | glusterfs-common (>= 5.6),
- libiscsi4 (>= 1.12.0) | libiscsi7,
+ libiscsi7 | libiscsi10,
libjpeg62-turbo,
libspice-server1 (>= 0.14.0~),
libusb-1.0-0 (>= 1.0.17-1),
diff --git a/debian/parse-machines-aarch64.pl b/debian/parse-machines-aarch64.pl
new file mode 100755
index 0000000..e179f9b
--- /dev/null
+++ b/debian/parse-machines-aarch64.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use JSON;
+
+my $machines = [];
+
+while (<STDIN>) {
+ if (/^\s*Supported machines are:/) {
+ next;
+ }
+
+ s/^\s+//;
+ my @machine = split(/\s+/);
+ next if $machine[0] !~ m/^virt-(.+)$/;
+ push @$machines, {
+ 'id' => $machine[0],
+ 'type' => 'virt',
+ 'version' => $1,
+ };
+}
+
+die "no QEMU machine types detected from STDIN input" if scalar (@$machines) <= 0;
+
+print to_json($machines, { utf8 => 1, canonical => 1 })
+ or die "failed to encode detected machines as JSON - $!\n";
diff --git a/debian/parse-machines-loongarch64.pl b/debian/parse-machines-loongarch64.pl
new file mode 100755
index 0000000..e19fa71
--- /dev/null
+++ b/debian/parse-machines-loongarch64.pl
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use JSON;
+
+my $machines = [];
+
+print to_json($machines, { utf8 => 1, canonical => 1 })
+ or die "failed to encode detected machines as JSON - $!\n";
diff --git a/debian/parse-machines-x86_64.pl b/debian/parse-machines-x86_64.pl
new file mode 100755
index 0000000..e179f9b
--- /dev/null
+++ b/debian/parse-machines-x86_64.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use JSON;
+
+my $machines = [];
+
+while (<STDIN>) {
+ if (/^\s*Supported machines are:/) {
+ next;
+ }
+
+ s/^\s+//;
+ my @machine = split(/\s+/);
+ next if $machine[0] !~ m/^virt-(.+)$/;
+ push @$machines, {
+ 'id' => $machine[0],
+ 'type' => 'virt',
+ 'version' => $1,
+ };
+}
+
+die "no QEMU machine types detected from STDIN input" if scalar (@$machines) <= 0;
+
+print to_json($machines, { utf8 => 1, canonical => 1 })
+ or die "failed to encode detected machines as JSON - $!\n";
diff --git a/debian/pve-qemu-kvm.links b/debian/pve-qemu-kvm.links
index 7314aa4..2c4b8e1 100644
--- a/debian/pve-qemu-kvm.links
+++ b/debian/pve-qemu-kvm.links
@@ -1,6 +1,5 @@
# also use aarch64 for 32 bit arm
usr/bin/qemu-system-aarch64 usr/bin/qemu-system-arm
-usr/bin/qemu-system-x86_64 usr/bin/kvm
# qemu-system-i386 and qemu-system-x86_64 provides the same hardware emulation
usr/bin/qemu-system-x86_64 usr/bin/qemu-system-i386
# upstream provides a qemu man page,
diff --git a/debian/rules b/debian/rules
index 51f56c5..024e5ba 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ PACKAGE=pve-qemu-kvm
destdir := $(CURDIR)/debian/$(PACKAGE)
flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
-machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
+machinefile := $(destdir)/usr/share/kvm/machine-versions-${HOST_CPU}.json
# default QEMU out-of-tree build directory is ./build
BUILDDIR=build
@@ -35,7 +35,7 @@ endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
-
+ echo "usr/bin/qemu-system-${HOST_CPU} usr/bin/kvm" >> debian/pve-qemu-kvm.links
# guest-agent is only required for guest systems
./configure \
--disable-download \
@@ -43,14 +43,13 @@ endif
--localstatedir=/var \
--prefix=/usr \
--sysconfdir=/etc \
- --target-list=$(HOST_CPU)-softmmu,aarch64-softmmu \
--with-suffix="kvm" \
--with-pkgversion="${DEB_SOURCE}_${DEB_VERSION_UPSTREAM_REVISION}" \
--audio-drv-list="alsa" \
--datadir=/usr/share \
--libexecdir=/usr/lib/kvm \
--disable-capstone \
- --disable-gtk \
+ --enable-gtk \
--disable-guest-agent \
--disable-guest-agent-msi \
--disable-libnfs \
@@ -121,7 +120,7 @@ install: build
# CPU flags are static for QEMU version, allows avoiding more costly checks
$(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
- $(destdir)/usr/bin/qemu-system-x86_64 -machine help | ./debian/parse-machines.pl > $(machinefile)
+ $(destdir)/usr/bin/qemu-system-${HOST_CPU} -machine help | ./debian/parse-machines-${HOST_CPU}.pl > $(machinefile)
# Build architecture-independent files here.
binary-indep: build install