diff options
author | Clément Péron <peron.clem@gmail.com> | 2023-03-10 19:54:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-14 17:10:00 +0000 |
commit | 1c01cbaed575a6bfc97b32af1b55c3707fdaf473 (patch) | |
tree | 73fd64a8a38069525d545144959f5b0e52c6673f /meta/recipes-devtools/qemu/qemu.inc | |
parent | 7c2b42695d95e5916a13bbdeb26cb396e91a5b89 (diff) | |
download | poky-1c01cbaed575a6bfc97b32af1b55c3707fdaf473.tar.gz |
qemu: split out qemu-guest-agent, add startup scripts
Split out the QEMU guest agent into a separate package. The agent is
intended to be installed within a QEMU VM guest where a user is likely
to not want to have the rest of the QEMU installation within it.
Additionally, an initscript, udev rules file, and systemd unit file are
added to the package so that the guest agent can start automatically;
the former two come from Debian's packaging for qemu-guest-agent.
(From OE-Core rev: d62fd31c70a9161596594f43c58c73898bfcf52c)
Signed-off-by: Brenda Streiff <brenda.streiff@ni.com>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu.inc')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 1e768b560d..b41055fe5d 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -9,7 +9,7 @@ LICENSE = "GPL-2.0-only & LGPL-2.1-only" | |||
9 | RDEPENDS:${PN}-ptest = "bash" | 9 | RDEPENDS:${PN}-ptest = "bash" |
10 | 10 | ||
11 | require qemu-targets.inc | 11 | require qemu-targets.inc |
12 | inherit pkgconfig ptest | 12 | inherit pkgconfig ptest update-rc.d systemd |
13 | 13 | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ |
15 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" | 15 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" |
@@ -32,6 +32,8 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
32 | file://0001-configure-Fix-check-tcg-not-executing-any-tests.patch \ | 32 | file://0001-configure-Fix-check-tcg-not-executing-any-tests.patch \ |
33 | file://0001-Revert-linux-user-add-more-compat-ioctl-definitions.patch \ | 33 | file://0001-Revert-linux-user-add-more-compat-ioctl-definitions.patch \ |
34 | file://0002-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch \ | 34 | file://0002-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch \ |
35 | file://qemu-guest-agent.init \ | ||
36 | file://qemu-guest-agent.udev \ | ||
35 | " | 37 | " |
36 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 38 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
37 | 39 | ||
@@ -132,6 +134,20 @@ do_configure[cleandirs] += "${B}" | |||
132 | do_install () { | 134 | do_install () { |
133 | export STRIP="" | 135 | export STRIP="" |
134 | oe_runmake 'DESTDIR=${D}' install | 136 | oe_runmake 'DESTDIR=${D}' install |
137 | |||
138 | # If we built the guest agent, also install startup/udev rules | ||
139 | if [ -e "${D}${bindir}/qemu-ga" ]; then | ||
140 | install -d ${D}${sysconfdir}/init.d/ | ||
141 | install -m 0755 ${WORKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent | ||
142 | sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent | ||
143 | |||
144 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
145 | install -m 0644 ${WORKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules | ||
146 | |||
147 | install -d ${D}${systemd_unitdir}/system/ | ||
148 | install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system | ||
149 | sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service | ||
150 | fi | ||
135 | } | 151 | } |
136 | 152 | ||
137 | # The following fragment will create a wrapper for qemu-mips user emulation | 153 | # The following fragment will create a wrapper for qemu-mips user emulation |
@@ -210,3 +226,20 @@ PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack," | |||
210 | INSANE_SKIP:${PN} = "arch" | 226 | INSANE_SKIP:${PN} = "arch" |
211 | 227 | ||
212 | FILES:${PN} += "${datadir}/icons" | 228 | FILES:${PN} += "${datadir}/icons" |
229 | |||
230 | # Put the guest agent in a separate package | ||
231 | PACKAGES =+ "${PN}-guest-agent" | ||
232 | SUMMARY:${PN}-guest-agent = "QEMU guest agent" | ||
233 | FILES:${PN}-guest-agent += " \ | ||
234 | ${bindir}/qemu-ga \ | ||
235 | ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \ | ||
236 | ${sysconfdir}/init.d/qemu-guest-agent \ | ||
237 | ${systemd_unitdir}/system/qemu-guest-agent.service \ | ||
238 | " | ||
239 | |||
240 | INITSCRIPT_PACKAGES = "${PN}-guest-agent" | ||
241 | INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent" | ||
242 | INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults" | ||
243 | |||
244 | SYSTEMD_PACKAGES = "${PN}-guest-agent" | ||
245 | SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service" | ||