diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 230 |
1 files changed, 175 insertions, 55 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index a6dc941624..4501f84c2b 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -4,12 +4,16 @@ machine's processor through dynamic binary translation and provides a set \ | |||
4 | of different hardware and device models for the machine, enabling it to run \ | 4 | of different hardware and device models for the machine, enabling it to run \ |
5 | a variety of guest operating systems" | 5 | a variety of guest operating systems" |
6 | HOMEPAGE = "http://qemu.org" | 6 | HOMEPAGE = "http://qemu.org" |
7 | LICENSE = "GPLv2 & LGPLv2.1" | 7 | LICENSE = "GPL-2.0-only & LGPL-2.1-only" |
8 | 8 | ||
9 | RDEPENDS_${PN}-ptest = "bash" | 9 | DEPENDS += "bison-native meson-native ninja-native" |
10 | |||
11 | RDEPENDS:${PN}-ptest = "bash" | ||
10 | 12 | ||
11 | require qemu-targets.inc | 13 | require qemu-targets.inc |
12 | inherit pkgconfig ptest | 14 | # https://gitlab.com/qemu-project/qemu/-/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36 means |
15 | # we need a full python3-native setup | ||
16 | inherit pkgconfig ptest update-rc.d systemd python3native | ||
13 | 17 | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | 18 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ |
15 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" | 19 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" |
@@ -17,35 +21,72 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | |||
17 | SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | 21 | SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ |
18 | file://powerpc_rom.bin \ | 22 | file://powerpc_rom.bin \ |
19 | file://run-ptest \ | 23 | file://run-ptest \ |
20 | file://0001-qemu-Add-missing-wacom-HID-descriptor.patch \ | 24 | file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ |
21 | file://0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ | 25 | file://0003-apic-fixup-fallthrough-to-PIC.patch \ |
22 | file://0004-qemu-disable-Valgrind.patch \ | 26 | file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \ |
23 | file://0006-chardev-connect-socket-to-a-spawned-command.patch \ | 27 | file://0005-qemu-Do-not-include-file-if-not-exists.patch \ |
24 | file://0007-apic-fixup-fallthrough-to-PIC.patch \ | 28 | file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \ |
25 | file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \ | 29 | file://0007-qemu-Determinism-fixes.patch \ |
26 | file://0001-Add-enable-disable-udev.patch \ | 30 | file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \ |
27 | file://0001-qemu-Do-not-include-file-if-not-exists.patch \ | 31 | file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ |
28 | file://mingwfix.patch \ | 32 | file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ |
29 | file://mmap.patch \ | 33 | file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \ |
30 | file://mmap2.patch \ | 34 | file://fixedmeson.patch \ |
31 | file://determinism.patch \ | 35 | file://no-pip.patch \ |
32 | file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \ | 36 | file://4a8579ad8629b57a43daa62e46cc7af6e1078116.patch \ |
37 | file://0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch \ | ||
38 | file://0002-linux-user-loongarch64-Remove-TARGET_FORCE_SHMLBA.patch \ | ||
39 | file://0003-linux-user-Add-strace-for-shmat.patch \ | ||
40 | file://0004-linux-user-Rewrite-target_shmat.patch \ | ||
41 | file://0005-tests-tcg-Check-that-shmat-does-not-break-proc-self-.patch \ | ||
42 | file://CVE-2023-6683.patch \ | ||
43 | file://qemu-guest-agent.init \ | ||
44 | file://qemu-guest-agent.udev \ | ||
33 | " | 45 | " |
34 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 46 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
35 | 47 | ||
36 | SRC_URI[sha256sum] = "cb18d889b628fbe637672b0326789d9b0e3b8027e0445b936537c78549df17bc" | 48 | # SDK_OLDEST_KERNEL is set below 4.17, which is the minimum version required by QEMU >= 8.1 |
49 | # This is due to two MMAP flags being used at certain points | ||
50 | SRC_URI:append:class-nativesdk = " \ | ||
51 | file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch \ | ||
52 | file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch \ | ||
53 | " | ||
54 | |||
55 | # Support building and using native version on pre 4.17 kernels | ||
56 | SRC_URI:append:class-native = " \ | ||
57 | file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch \ | ||
58 | file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch \ | ||
59 | " | ||
60 | |||
61 | SRC_URI[sha256sum] = "8562751158175f9d187c5f22b57555abe3c870f0325c8ced12c34c6d987729be" | ||
62 | |||
63 | CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default." | ||
64 | |||
65 | # https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11 | ||
66 | CVE_STATUS[CVE-2018-18438] = "disputed: The issues identified by this CVE were determined to not constitute a vulnerability." | ||
67 | |||
68 | # As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664 | ||
69 | # https://bugzilla.redhat.com/show_bug.cgi?id=2167423 | ||
70 | CVE_STATUS[CVE-2023-0664] = "not-applicable-platform: Issue only applies on Windows" | ||
71 | |||
72 | # As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387 | ||
73 | CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue." | ||
74 | |||
75 | CVE_STATUS[CVE-2023-3019] = "cpe-incorrect: Applies only against versions before 8.2.0" | ||
37 | 76 | ||
38 | SRC_URI_append_class-target = " file://cross.patch" | 77 | CVE_STATUS[CVE-2023-5088] = "cpe-incorrect: Applies only against version 8.2.0 and earlier" |
39 | SRC_URI_append_class-nativesdk = " file://cross.patch" | ||
40 | 78 | ||
41 | COMPATIBLE_HOST_mipsarchn32 = "null" | 79 | CVE_STATUS[CVE-2023-6693] = "cpe-incorrect: Applies only against version 8.2.0 and earlier" |
42 | COMPATIBLE_HOST_mipsarchn64 = "null" | 80 | |
81 | COMPATIBLE_HOST:mipsarchn32 = "null" | ||
82 | COMPATIBLE_HOST:mipsarchn64 = "null" | ||
83 | COMPATIBLE_HOST:riscv32 = "null" | ||
43 | 84 | ||
44 | # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html | 85 | # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html |
45 | # upstream states qemu doesn't work without optimization | 86 | # upstream states qemu doesn't work without optimization |
46 | DEBUG_BUILD = "0" | 87 | DEBUG_BUILD = "0" |
47 | 88 | ||
48 | do_install_append() { | 89 | do_install:append() { |
49 | # Prevent QA warnings about installed ${localstatedir}/run | 90 | # Prevent QA warnings about installed ${localstatedir}/run |
50 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi | 91 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi |
51 | } | 92 | } |
@@ -55,16 +96,26 @@ do_install_ptest() { | |||
55 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} | 96 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} |
56 | 97 | ||
57 | # Don't check the file genreated by configure | 98 | # Don't check the file genreated by configure |
58 | sed -i -e 's,${HOSTTOOLS_DIR}/python3,${bindir}/python3,' \ | ||
59 | ${D}/${PTEST_PATH}/tests/qemu-iotests/common.env | ||
60 | sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh | 99 | sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh |
61 | 100 | ||
62 | # Strip the paths from the QEMU variable, we can use PATH | 101 | # Strip the paths from the QEMU variable, we can use PATH |
63 | sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" ${D}${PTEST_PATH}/tests/tcg/*.mak | 102 | makfiles=$(find ${D}${PTEST_PATH} -name "*.mak") |
103 | sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" $makfiles | ||
104 | |||
105 | # Strip compiler flags as they break reproducibility | ||
106 | sed -i -e "s,^CC=.*,CC=gcc," \ | ||
107 | -e "s,^CCAS=.*,CCAS=gcc," \ | ||
108 | -e "s,^LD=.*,LD=ld," $makfiles | ||
109 | |||
110 | # Update SRC_PATH variable to the right place on target | ||
111 | sed -i -e "s#^SRC_PATH=.*#SRC_PATH=${PTEST_PATH}#g" $makfiles | ||
112 | |||
113 | # https://gitlab.com/qemu-project/qemu/-/issues/1403 | ||
114 | rm ${D}${PTEST_PATH}/tests/unit/test-io-channel-command | ||
64 | } | 115 | } |
65 | 116 | ||
66 | # QEMU_TARGETS is overridable variable | 117 | # QEMU_TARGETS is overridable variable |
67 | QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64" | 118 | QEMU_TARGETS ?= "arm aarch64 i386 loongarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64" |
68 | 119 | ||
69 | EXTRA_OECONF = " \ | 120 | EXTRA_OECONF = " \ |
70 | --prefix=${prefix} \ | 121 | --prefix=${prefix} \ |
@@ -82,19 +133,21 @@ EXTRA_OECONF = " \ | |||
82 | --disable-werror \ | 133 | --disable-werror \ |
83 | --extra-cflags='${CFLAGS}' \ | 134 | --extra-cflags='${CFLAGS}' \ |
84 | --extra-ldflags='${LDFLAGS}' \ | 135 | --extra-ldflags='${LDFLAGS}' \ |
85 | --with-git=/bin/false \ | 136 | --disable-download \ |
86 | --disable-git-update \ | 137 | --disable-docs \ |
87 | --meson=meson \ | 138 | --host-cc='${BUILD_CC}' \ |
139 | --disable-af-xdp \ | ||
88 | ${PACKAGECONFIG_CONFARGS} \ | 140 | ${PACKAGECONFIG_CONFARGS} \ |
89 | " | 141 | " |
90 | 142 | ||
91 | export LIBTOOL="${HOST_SYS}-libtool" | 143 | EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}" |
144 | EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}" | ||
92 | 145 | ||
93 | B = "${WORKDIR}/build" | 146 | B = "${WORKDIR}/build" |
94 | 147 | ||
95 | #EXTRA_OECONF_append = " --python=${HOSTTOOLS_DIR}/python3" | 148 | #EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3" |
96 | 149 | ||
97 | do_configure_prepend_class-native() { | 150 | do_configure:prepend:class-native() { |
98 | # Append build host pkg-config paths for native target since the host may provide sdl | 151 | # Append build host pkg-config paths for native target since the host may provide sdl |
99 | BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "") | 152 | BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "") |
100 | if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then | 153 | if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then |
@@ -103,6 +156,7 @@ do_configure_prepend_class-native() { | |||
103 | } | 156 | } |
104 | 157 | ||
105 | do_configure() { | 158 | do_configure() { |
159 | export PKG_CONFIG=pkg-config | ||
106 | ${S}/configure ${EXTRA_OECONF} | 160 | ${S}/configure ${EXTRA_OECONF} |
107 | } | 161 | } |
108 | do_configure[cleandirs] += "${B}" | 162 | do_configure[cleandirs] += "${B}" |
@@ -110,6 +164,24 @@ do_configure[cleandirs] += "${B}" | |||
110 | do_install () { | 164 | do_install () { |
111 | export STRIP="" | 165 | export STRIP="" |
112 | oe_runmake 'DESTDIR=${D}' install | 166 | oe_runmake 'DESTDIR=${D}' install |
167 | |||
168 | # If we built the guest agent, also install startup/udev rules | ||
169 | if [ -e "${D}${bindir}/qemu-ga" ]; then | ||
170 | install -d ${D}${sysconfdir}/init.d/ | ||
171 | install -m 0755 ${WORKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent | ||
172 | sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent | ||
173 | |||
174 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
175 | install -m 0644 ${WORKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules | ||
176 | |||
177 | install -d ${D}${systemd_unitdir}/system/ | ||
178 | install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system | ||
179 | sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service | ||
180 | fi | ||
181 | # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text | ||
182 | rm ${D}${datadir}/qemu/s390-netboot.img -f | ||
183 | # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel] | ||
184 | rm ${D}${datadir}/qemu/s390-ccw.img -f | ||
113 | } | 185 | } |
114 | 186 | ||
115 | # The following fragment will create a wrapper for qemu-mips user emulation | 187 | # The following fragment will create a wrapper for qemu-mips user emulation |
@@ -118,7 +190,7 @@ do_install () { | |||
118 | # This will trigger a MMU access fault in the virtual CPU. With this change, | 190 | # This will trigger a MMU access fault in the virtual CPU. With this change, |
119 | # the qemu-mips works fine. | 191 | # the qemu-mips works fine. |
120 | # IMPORTANT: This piece needs to be removed once the root cause is fixed! | 192 | # IMPORTANT: This piece needs to be removed once the root cause is fixed! |
121 | do_install_append() { | 193 | do_install:append() { |
122 | if [ -e "${D}/${bindir}/qemu-mips" ]; then | 194 | if [ -e "${D}/${bindir}/qemu-mips" ]; then |
123 | create_wrapper ${D}/${bindir}/qemu-mips \ | 195 | create_wrapper ${D}/${bindir}/qemu-mips \ |
124 | QEMU_RESERVED_VA=0x0 | 196 | QEMU_RESERVED_VA=0x0 |
@@ -126,29 +198,18 @@ do_install_append() { | |||
126 | } | 198 | } |
127 | # END of qemu-mips workaround | 199 | # END of qemu-mips workaround |
128 | 200 | ||
129 | make_qemu_wrapper() { | ||
130 | gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0` | ||
131 | |||
132 | for tool in `ls ${D}${bindir}/qemu-system-*`; do | ||
133 | create_wrapper $tool \ | ||
134 | GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \ | ||
135 | FONTCONFIG_PATH=/etc/fonts \ | ||
136 | GTK_THEME=Adwaita | ||
137 | done | ||
138 | } | ||
139 | |||
140 | # Disable kvm/virgl/mesa on targets that do not support it | 201 | # Disable kvm/virgl/mesa on targets that do not support it |
141 | PACKAGECONFIG_remove_darwin = "kvm virglrenderer glx gtk+" | 202 | PACKAGECONFIG:remove:darwin = "kvm virglrenderer epoxy gtk+" |
142 | PACKAGECONFIG_remove_mingw32 = "kvm virglrenderer glx gtk+" | 203 | PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer epoxy gtk+ pie" |
143 | 204 | ||
144 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" | 205 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" |
206 | PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" | ||
145 | PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," | 207 | PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," |
146 | PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio," | 208 | PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio," |
147 | PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs," | 209 | PACKAGECONFIG[uring] = "--enable-linux-io-uring,--disable-linux-io-uring,liburing" |
148 | PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen-tools,xen-tools-libxenstore xen-tools-libxenctrl xen-tools-libxenguest" | 210 | PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen-tools,xen-tools-libxenstore xen-tools-libxenctrl xen-tools-libxenguest" |
149 | PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl," | 211 | PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl," |
150 | PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg," | 212 | PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg," |
151 | PACKAGECONFIG[vnc-png] = "--enable-vnc --enable-vnc-png,--disable-vnc-png,libpng," | ||
152 | PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl," | 213 | PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl," |
153 | PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss," | 214 | PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss," |
154 | PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses," | 215 | PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses," |
@@ -160,9 +221,10 @@ PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt," | |||
160 | PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle" | 221 | PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle" |
161 | PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1" | 222 | PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1" |
162 | PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc" | 223 | PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc" |
163 | PACKAGECONFIG[alsa] = "--audio-drv-list='oss alsa',,alsa-lib" | 224 | PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib" |
164 | PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,virtual/libgl" | 225 | PACKAGECONFIG[epoxy] = "--enable-opengl,--disable-opengl,libepoxy" |
165 | PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo" | 226 | PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo" |
227 | PACKAGECONFIG[dax] = "--enable-libdaxctl,--disable-libdaxctl,ndctl" | ||
166 | PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl" | 228 | PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl" |
167 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls" | 229 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls" |
168 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" | 230 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" |
@@ -172,19 +234,77 @@ PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,v | |||
172 | # spice will be in meta-networking layer | 234 | # spice will be in meta-networking layer |
173 | PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice" | 235 | PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice" |
174 | # usbredir will be in meta-networking layer | 236 | # usbredir will be in meta-networking layer |
237 | PACKAGECONFIG[dbus-display] = "--enable-dbus-display,--disable-dbus-display,glib-2.0-native,dbus" | ||
175 | PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir" | 238 | PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir" |
176 | PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy" | 239 | PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy" |
177 | PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs" | 240 | PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs" |
178 | PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" | 241 | PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" |
179 | PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,eudev" | 242 | PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,udev" |
180 | PACKAGECONFIG[libxml2] = "--enable-libxml2,--disable-libxml2,libxml2" | ||
181 | PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr," | 243 | PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr," |
182 | PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" | 244 | PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" |
183 | PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," | 245 | PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," |
184 | PACKAGECONFIG[ust] = "--enable-trace-backend=ust,--enable-trace-backend=nop,lttng-ust," | 246 | PACKAGECONFIG[ust] = "--enable-trace-backends=ust,,lttng-ust," |
185 | PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," | 247 | PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," |
186 | PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" | 248 | PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" |
249 | # libnfs is currently provided by meta-kodi | ||
250 | PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" | ||
251 | PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk" | ||
252 | PACKAGECONFIG[pulseaudio] = "--enable-pa,--disable-pa,pulseaudio" | ||
253 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" | ||
254 | PACKAGECONFIG[bpf] = "--enable-bpf,--disable-bpf,libbpf" | ||
255 | PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone" | ||
256 | PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma" | ||
257 | PACKAGECONFIG[vde] = "--enable-vde,--disable-vde" | ||
258 | PACKAGECONFIG[fuse] = "--enable-fuse --enable-fuse-lseek,--disable-fuse --disable-fuse-lseek,fuse3" | ||
259 | PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp" | ||
260 | PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" | ||
261 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack," | ||
262 | PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils" | ||
263 | PACKAGECONFIG[pipewire] = "--enable-pipewire,--disable-pipewire,pipewire" | ||
264 | PACKAGECONFIG[sndio] = "--enable-sndio,--disable-sndio,sndio" | ||
265 | |||
266 | INSANE_SKIP:${PN}-common = "arch" | ||
267 | |||
268 | FILES:${PN} += "${datadir}/icons" | ||
269 | |||
270 | # For user who want to install all arch packages | ||
271 | PACKAGES =+ "${PN}-common" | ||
272 | RDEPENDS:${PN} += "${PN}-common" | ||
273 | |||
274 | ALLOW_EMPTY:${PN} = "1" | ||
275 | FILES:${PN} = "" | ||
276 | |||
277 | FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* ${localstatedir}" | ||
278 | |||
279 | PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*" | ||
280 | |||
281 | PACKAGESPLITFUNCS =+ "split_qemu_packages" | ||
282 | |||
283 | python split_qemu_packages () { | ||
284 | archdir = d.expand('${bindir}/') | ||
285 | subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common') | ||
286 | |||
287 | subpackages += do_split_packages(d, archdir, r'^qemu-((?!system|edid|ga|img|io|nbd|pr-helper|storage-daemon).*)$', '${PN}-user-%s', 'QEMU full user emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common') | ||
288 | if subpackages: | ||
289 | d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages)) | ||
290 | mipspackage = d.getVar('PN') + "-user-mips" | ||
291 | if mipspackage in ' '.join(subpackages): | ||
292 | d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash') | ||
293 | } | ||
294 | |||
295 | # Put the guest agent in a separate package | ||
296 | PACKAGES =+ "${PN}-guest-agent" | ||
297 | SUMMARY:${PN}-guest-agent = "QEMU guest agent" | ||
298 | FILES:${PN}-guest-agent += " \ | ||
299 | ${bindir}/qemu-ga \ | ||
300 | ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \ | ||
301 | ${sysconfdir}/init.d/qemu-guest-agent \ | ||
302 | ${systemd_unitdir}/system/qemu-guest-agent.service \ | ||
303 | " | ||
187 | 304 | ||
188 | INSANE_SKIP_${PN} = "arch" | 305 | INITSCRIPT_PACKAGES = "${PN}-guest-agent" |
306 | INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent" | ||
307 | INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults" | ||
189 | 308 | ||
190 | FILES_${PN} += "${datadir}/icons" | 309 | SYSTEMD_PACKAGES = "${PN}-guest-agent" |
310 | SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service" | ||