diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 214 |
1 files changed, 148 insertions, 66 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index a6dc941624..7893df0df2 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,47 @@ 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://fix-strerrorname_np.patch \ |
21 | file://0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ | 25 | file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ |
22 | file://0004-qemu-disable-Valgrind.patch \ | 26 | file://0002-apic-fixup-fallthrough-to-PIC.patch \ |
23 | file://0006-chardev-connect-socket-to-a-spawned-command.patch \ | 27 | file://0004-qemu-Do-not-include-file-if-not-exists.patch \ |
24 | file://0007-apic-fixup-fallthrough-to-PIC.patch \ | 28 | file://0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \ |
25 | file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \ | 29 | file://0006-qemu-Determinism-fixes.patch \ |
26 | file://0001-Add-enable-disable-udev.patch \ | 30 | file://0007-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://0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ |
28 | file://mingwfix.patch \ | 32 | file://0010-configure-lookup-meson-exutable-from-PATH.patch \ |
29 | file://mmap.patch \ | 33 | file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \ |
30 | file://mmap2.patch \ | 34 | file://qemu-guest-agent.init \ |
31 | file://determinism.patch \ | 35 | file://qemu-guest-agent.udev \ |
32 | file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \ | ||
33 | " | 36 | " |
37 | # file index at download.qemu.org isn't reliable: https://gitlab.com/qemu-project/qemu-web/-/issues/9 | ||
38 | UPSTREAM_CHECK_URI = "https://www.qemu.org" | ||
34 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 39 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
35 | 40 | ||
36 | SRC_URI[sha256sum] = "cb18d889b628fbe637672b0326789d9b0e3b8027e0445b936537c78549df17bc" | 41 | SRC_URI[sha256sum] = "ef786f2398cb5184600f69aef4d5d691efd44576a3cff4126d38d4c6fec87759" |
42 | |||
43 | 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." | ||
44 | |||
45 | # https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11 | ||
46 | CVE_STATUS[CVE-2018-18438] = "disputed: The issues identified by this CVE were determined to not constitute a vulnerability." | ||
37 | 47 | ||
38 | SRC_URI_append_class-target = " file://cross.patch" | 48 | # As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387 |
39 | SRC_URI_append_class-nativesdk = " file://cross.patch" | 49 | CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue." |
40 | 50 | ||
41 | COMPATIBLE_HOST_mipsarchn32 = "null" | 51 | # NVD DB has this CVE as version-less (with "-") |
42 | COMPATIBLE_HOST_mipsarchn64 = "null" | 52 | CVE_STATUS[CVE-2024-6505] = "fixed-version: this CVE is fixed since 9.1.0" |
53 | |||
54 | CVE_STATUS[CVE-2023-1386] = "disputed: not an issue as per https://bugzilla.redhat.com/show_bug.cgi?id=2223985" | ||
55 | |||
56 | COMPATIBLE_HOST:mipsarchn32 = "null" | ||
57 | COMPATIBLE_HOST:mipsarchn64 = "null" | ||
58 | COMPATIBLE_HOST:riscv32 = "null" | ||
43 | 59 | ||
44 | # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html | 60 | # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html |
45 | # upstream states qemu doesn't work without optimization | 61 | # upstream states qemu doesn't work without optimization |
46 | DEBUG_BUILD = "0" | 62 | DEBUG_BUILD = "0" |
47 | 63 | ||
48 | do_install_append() { | 64 | do_install:append() { |
49 | # Prevent QA warnings about installed ${localstatedir}/run | 65 | # Prevent QA warnings about installed ${localstatedir}/run |
50 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi | 66 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi |
51 | } | 67 | } |
@@ -55,16 +71,26 @@ do_install_ptest() { | |||
55 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} | 71 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} |
56 | 72 | ||
57 | # Don't check the file genreated by configure | 73 | # 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 | 74 | sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh |
61 | 75 | ||
62 | # Strip the paths from the QEMU variable, we can use PATH | 76 | # 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 | 77 | makfiles=$(find ${D}${PTEST_PATH} -name "*.mak") |
78 | sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" $makfiles | ||
79 | |||
80 | # Strip compiler flags as they break reproducibility | ||
81 | sed -i -e "s,^CC=.*,CC=gcc," \ | ||
82 | -e "s,^CCAS=.*,CCAS=gcc," \ | ||
83 | -e "s,^LD=.*,LD=ld," $makfiles | ||
84 | |||
85 | # Update SRC_PATH variable to the right place on target | ||
86 | sed -i -e "s#^SRC_PATH=.*#SRC_PATH=${PTEST_PATH}#g" $makfiles | ||
87 | |||
88 | # https://gitlab.com/qemu-project/qemu/-/issues/1403 | ||
89 | rm ${D}${PTEST_PATH}/tests/unit/test-io-channel-command | ||
64 | } | 90 | } |
65 | 91 | ||
66 | # QEMU_TARGETS is overridable variable | 92 | # QEMU_TARGETS is overridable variable |
67 | QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64" | 93 | QEMU_TARGETS ?= "arm aarch64 i386 loongarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64" |
68 | 94 | ||
69 | EXTRA_OECONF = " \ | 95 | EXTRA_OECONF = " \ |
70 | --prefix=${prefix} \ | 96 | --prefix=${prefix} \ |
@@ -82,19 +108,21 @@ EXTRA_OECONF = " \ | |||
82 | --disable-werror \ | 108 | --disable-werror \ |
83 | --extra-cflags='${CFLAGS}' \ | 109 | --extra-cflags='${CFLAGS}' \ |
84 | --extra-ldflags='${LDFLAGS}' \ | 110 | --extra-ldflags='${LDFLAGS}' \ |
85 | --with-git=/bin/false \ | 111 | --disable-download \ |
86 | --disable-git-update \ | 112 | --disable-docs \ |
87 | --meson=meson \ | 113 | --host-cc='${BUILD_CC}' \ |
114 | --disable-af-xdp \ | ||
88 | ${PACKAGECONFIG_CONFARGS} \ | 115 | ${PACKAGECONFIG_CONFARGS} \ |
89 | " | 116 | " |
90 | 117 | ||
91 | export LIBTOOL="${HOST_SYS}-libtool" | 118 | EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}" |
119 | EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}" | ||
92 | 120 | ||
93 | B = "${WORKDIR}/build" | 121 | B = "${WORKDIR}/build" |
94 | 122 | ||
95 | #EXTRA_OECONF_append = " --python=${HOSTTOOLS_DIR}/python3" | 123 | #EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3" |
96 | 124 | ||
97 | do_configure_prepend_class-native() { | 125 | do_configure:prepend:class-native() { |
98 | # Append build host pkg-config paths for native target since the host may provide sdl | 126 | # 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 "") | 127 | BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "") |
100 | if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then | 128 | if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then |
@@ -103,6 +131,7 @@ do_configure_prepend_class-native() { | |||
103 | } | 131 | } |
104 | 132 | ||
105 | do_configure() { | 133 | do_configure() { |
134 | export PKG_CONFIG=pkg-config | ||
106 | ${S}/configure ${EXTRA_OECONF} | 135 | ${S}/configure ${EXTRA_OECONF} |
107 | } | 136 | } |
108 | do_configure[cleandirs] += "${B}" | 137 | do_configure[cleandirs] += "${B}" |
@@ -110,48 +139,45 @@ do_configure[cleandirs] += "${B}" | |||
110 | do_install () { | 139 | do_install () { |
111 | export STRIP="" | 140 | export STRIP="" |
112 | oe_runmake 'DESTDIR=${D}' install | 141 | oe_runmake 'DESTDIR=${D}' install |
113 | } | ||
114 | 142 | ||
115 | # The following fragment will create a wrapper for qemu-mips user emulation | 143 | # If we built the guest agent, also install startup/udev rules |
116 | # binary in order to work around a segmentation fault issue. Basically, by | 144 | if [ -e "${D}${bindir}/qemu-ga" ]; then |
117 | # default, the reserved virtual address space for 32-on-64 bit is set to 4GB. | 145 | install -d ${D}${sysconfdir}/init.d/ |
118 | # This will trigger a MMU access fault in the virtual CPU. With this change, | 146 | install -m 0755 ${UNPACKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent |
119 | # the qemu-mips works fine. | 147 | sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent |
120 | # IMPORTANT: This piece needs to be removed once the root cause is fixed! | ||
121 | do_install_append() { | ||
122 | if [ -e "${D}/${bindir}/qemu-mips" ]; then | ||
123 | create_wrapper ${D}/${bindir}/qemu-mips \ | ||
124 | QEMU_RESERVED_VA=0x0 | ||
125 | fi | ||
126 | } | ||
127 | # END of qemu-mips workaround | ||
128 | 148 | ||
129 | make_qemu_wrapper() { | 149 | install -d ${D}${sysconfdir}/udev/rules.d/ |
130 | gdk_pixbuf_module_file=`pkg-config --variable=gdk_pixbuf_cache_file gdk-pixbuf-2.0` | 150 | install -m 0644 ${UNPACKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules |
131 | 151 | ||
132 | for tool in `ls ${D}${bindir}/qemu-system-*`; do | 152 | install -d ${D}${systemd_unitdir}/system/ |
133 | create_wrapper $tool \ | 153 | install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system |
134 | GDK_PIXBUF_MODULE_FILE=$gdk_pixbuf_module_file \ | 154 | sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service |
135 | FONTCONFIG_PATH=/etc/fonts \ | 155 | fi |
136 | GTK_THEME=Adwaita | 156 | # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text |
137 | done | 157 | rm ${D}${datadir}/qemu/s390-netboot.img -f |
158 | # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel] | ||
159 | rm ${D}${datadir}/qemu/s390-ccw.img -f | ||
160 | # We don't support PARISC and these cause strip and SDK relocation errors | ||
161 | rm ${D}${datadir}/qemu/hppa* -f | ||
138 | } | 162 | } |
139 | 163 | ||
140 | # Disable kvm/virgl/mesa on targets that do not support it | 164 | # Disable kvm/virgl/mesa on targets that do not support it |
141 | PACKAGECONFIG_remove_darwin = "kvm virglrenderer glx gtk+" | 165 | PACKAGECONFIG:remove:darwin = "kvm virglrenderer epoxy gtk+" |
142 | PACKAGECONFIG_remove_mingw32 = "kvm virglrenderer glx gtk+" | 166 | PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer epoxy gtk+ pie" |
143 | 167 | ||
144 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" | 168 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl2" |
169 | PACKAGECONFIG[sdl-image] = "--enable-sdl-image,--disable-sdl-image,libsdl2-image" | ||
170 | PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" | ||
145 | PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," | 171 | PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," |
146 | PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio," | 172 | PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio," |
147 | PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs," | 173 | 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" | 174 | 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," | 175 | 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," | 176 | 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," | 177 | PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl," |
153 | PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss," | 178 | PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss," |
154 | PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses," | 179 | PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses," |
180 | PACKAGECONFIG[pixman] = "--enable-pixman,--disable-pixman,pixman" | ||
155 | PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native" | 181 | PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native" |
156 | PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native" | 182 | PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native" |
157 | PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng," | 183 | PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng," |
@@ -160,9 +186,10 @@ PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt," | |||
160 | PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle" | 186 | PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle" |
161 | PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1" | 187 | PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1" |
162 | PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc" | 188 | PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc" |
163 | PACKAGECONFIG[alsa] = "--audio-drv-list='oss alsa',,alsa-lib" | 189 | PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib" |
164 | PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,virtual/libgl" | 190 | PACKAGECONFIG[epoxy] = "--enable-opengl,--disable-opengl,libepoxy" |
165 | PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo" | 191 | PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo" |
192 | PACKAGECONFIG[dax] = "--enable-libdaxctl,--disable-libdaxctl,ndctl" | ||
166 | PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl" | 193 | PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl" |
167 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls" | 194 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls" |
168 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" | 195 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" |
@@ -172,19 +199,74 @@ PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,v | |||
172 | # spice will be in meta-networking layer | 199 | # spice will be in meta-networking layer |
173 | PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice" | 200 | PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice" |
174 | # usbredir will be in meta-networking layer | 201 | # usbredir will be in meta-networking layer |
202 | 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" | 203 | PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir" |
176 | PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy" | 204 | PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy" |
177 | PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs" | 205 | PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs" |
178 | PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" | 206 | PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" |
179 | PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,eudev" | 207 | PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,udev" |
180 | PACKAGECONFIG[libxml2] = "--enable-libxml2,--disable-libxml2,libxml2" | ||
181 | PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr," | 208 | PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr," |
182 | PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" | 209 | PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" |
183 | PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," | 210 | PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," |
184 | PACKAGECONFIG[ust] = "--enable-trace-backend=ust,--enable-trace-backend=nop,lttng-ust," | 211 | PACKAGECONFIG[ust] = "--enable-trace-backends=ust,,lttng-ust," |
185 | PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," | 212 | PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," |
186 | PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" | 213 | PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" |
214 | # libnfs is currently provided by meta-kodi | ||
215 | PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" | ||
216 | PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk" | ||
217 | PACKAGECONFIG[pulseaudio] = "--enable-pa,--disable-pa,pulseaudio" | ||
218 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" | ||
219 | PACKAGECONFIG[bpf] = "--enable-bpf,--disable-bpf,libbpf" | ||
220 | PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone" | ||
221 | PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma" | ||
222 | PACKAGECONFIG[vde] = "--enable-vde,--disable-vde" | ||
223 | PACKAGECONFIG[fuse] = "--enable-fuse --enable-fuse-lseek,--disable-fuse --disable-fuse-lseek,fuse3" | ||
224 | PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp" | ||
225 | PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" | ||
226 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack," | ||
227 | PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils" | ||
228 | PACKAGECONFIG[pipewire] = "--enable-pipewire,--disable-pipewire,pipewire" | ||
229 | PACKAGECONFIG[sndio] = "--enable-sndio,--disable-sndio,sndio" | ||
230 | |||
231 | INSANE_SKIP:${PN}-common = "arch" | ||
232 | |||
233 | FILES:${PN} += "${datadir}/icons" | ||
234 | |||
235 | # For user who want to install all arch packages | ||
236 | PACKAGES =+ "${PN}-common" | ||
237 | RDEPENDS:${PN} += "${PN}-common" | ||
238 | |||
239 | ALLOW_EMPTY:${PN} = "1" | ||
240 | FILES:${PN} = "" | ||
241 | |||
242 | FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* ${localstatedir}" | ||
243 | |||
244 | PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*" | ||
245 | |||
246 | PACKAGESPLITFUNCS =+ "split_qemu_packages" | ||
247 | |||
248 | python split_qemu_packages () { | ||
249 | archdir = d.expand('${bindir}/') | ||
250 | subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common') | ||
251 | |||
252 | 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') | ||
253 | if subpackages: | ||
254 | d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages)) | ||
255 | } | ||
256 | |||
257 | # Put the guest agent in a separate package | ||
258 | PACKAGES =+ "${PN}-guest-agent" | ||
259 | SUMMARY:${PN}-guest-agent = "QEMU guest agent" | ||
260 | FILES:${PN}-guest-agent += " \ | ||
261 | ${bindir}/qemu-ga \ | ||
262 | ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \ | ||
263 | ${sysconfdir}/init.d/qemu-guest-agent \ | ||
264 | ${systemd_unitdir}/system/qemu-guest-agent.service \ | ||
265 | " | ||
187 | 266 | ||
188 | INSANE_SKIP_${PN} = "arch" | 267 | INITSCRIPT_PACKAGES = "${PN}-guest-agent" |
268 | INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent" | ||
269 | INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults" | ||
189 | 270 | ||
190 | FILES_${PN} += "${datadir}/icons" | 271 | SYSTEMD_PACKAGES = "${PN}-guest-agent" |
272 | SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service" | ||