diff --git a/q/qemu/manifest.x86_64.bin b/q/qemu/manifest.x86_64.bin index db3c6b57..7870f621 100644 Binary files a/q/qemu/manifest.x86_64.bin and b/q/qemu/manifest.x86_64.bin differ diff --git a/q/qemu/manifest.x86_64.jsonc b/q/qemu/manifest.x86_64.jsonc index 16bad47b..c5d16e7e 100644 --- a/q/qemu/manifest.x86_64.jsonc +++ b/q/qemu/manifest.x86_64.jsonc @@ -88,7 +88,6 @@ "files": [ "/usr/bin/elf2dmp", "/usr/bin/qemu-edid", - "/usr/bin/qemu-ga", "/usr/bin/qemu-i386", "/usr/bin/qemu-img", "/usr/bin/qemu-io", @@ -225,7 +224,6 @@ "provides": [ "binary(elf2dmp)", "binary(qemu-edid)", - "binary(qemu-ga)", "binary(qemu-i386)", "binary(qemu-img)", "binary(qemu-io)", @@ -288,9 +286,70 @@ "/usr/include/qemu-plugin.h" ], "name": "qemu-devel" + }, + "qemu-guest-agent": { + "build-depends": [ + "binary(bzip2)", + "binary(meson)", + "binary(ninja)", + "binary(nm)", + "binary(python3)", + "pkgconfig(SDL2_image)", + "pkgconfig(alsa)", + "pkgconfig(epoxy)", + "pkgconfig(fuse3)", + "pkgconfig(gbm)", + "pkgconfig(gio-2.0)", + "pkgconfig(glib-2.0)", + "pkgconfig(gmp)", + "pkgconfig(gtk+-3.0)", + "pkgconfig(gtk+-x11-3.0)", + "pkgconfig(libcurl)", + "pkgconfig(libdw)", + "pkgconfig(libfdt)", + "pkgconfig(libgcrypt)", + "pkgconfig(libjpeg)", + "pkgconfig(libpipewire-0.3)", + "pkgconfig(libpng)", + "pkgconfig(libpulse)", + "pkgconfig(libseccomp)", + "pkgconfig(libssh)", + "pkgconfig(libtasn1)", + "pkgconfig(libudev)", + "pkgconfig(libusb-1.0)", + "pkgconfig(libzstd)", + "pkgconfig(pixman-1)", + "pkgconfig(sdl2)", + "pkgconfig(slirp)", + "pkgconfig(spice-protocol)", + "pkgconfig(spice-server)", + "pkgconfig(virglrenderer)", + "pkgconfig(x11)", + "pkgconfig(xkbcommon)", + "pkgconfig(zlib)", + "xkeyboard-config" + ], + "depends": [ + "interpreter(/usr/lib/ld-linux-x86-64.so.2(x86_64))", + "soname(libc.so.6(x86_64))", + "soname(libglib-2.0.so.0(x86_64))", + "soname(libm.so.6(x86_64))", + "soname(libudev.so.1(x86_64))" + ], + "files": [ + "/usr/bin/qemu-ga", + "/usr/lib/systemd/system-preset/99-qemu-guest-agent.preset", + "/usr/lib/systemd/system/qemu-guest-agent.service", + "/usr/lib/tmpfiles.d/qemu-guest-agent.conf", + "/usr/lib/udev/rules.d/99-qemu-guest-agent.rules" + ], + "name": "qemu-guest-agent", + "provides": [ + "binary(qemu-ga)" + ] } }, "source-name": "qemu", - "source-release": "8", + "source-release": "9", "source-version": "9.1.0" } diff --git a/q/qemu/pkg/99-qemu-guest-agent.rules b/q/qemu/pkg/99-qemu-guest-agent.rules new file mode 100644 index 00000000..47097057 --- /dev/null +++ b/q/qemu/pkg/99-qemu-guest-agent.rules @@ -0,0 +1,2 @@ +SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \ + TAG+="systemd", ENV{SYSTEMD_WANTS}="qemu-guest-agent.service" diff --git a/q/qemu/pkg/qemu-guest-agent.preset b/q/qemu/pkg/qemu-guest-agent.preset new file mode 100644 index 00000000..86431cd4 --- /dev/null +++ b/q/qemu/pkg/qemu-guest-agent.preset @@ -0,0 +1 @@ +enable qemu-guest-agent.service diff --git a/q/qemu/pkg/qemu-guest-agent.service b/q/qemu/pkg/qemu-guest-agent.service new file mode 100644 index 00000000..25fcfcb0 --- /dev/null +++ b/q/qemu/pkg/qemu-guest-agent.service @@ -0,0 +1,16 @@ +[Unit] +Description=QEMU Guest Agent +BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device +After=dev-virtio\x2dports-org.qemu.guest_agent.0.device +IgnoreOnIsolate=True + +[Service] +UMask=0077 +ExecStart=/usr/bin/qemu-ga \ + --method=virtio-serial \ + --path=/dev/virtio-ports/org.qemu.guest_agent.0 +Restart=always +RestartSec=0 + +[Install] +WantedBy=dev-virtio\x2dports-org.qemu.guest_agent.0.device diff --git a/q/qemu/stone.yaml b/q/qemu/stone.yaml index 29bf5913..77d761a2 100644 --- a/q/qemu/stone.yaml +++ b/q/qemu/stone.yaml @@ -5,7 +5,7 @@ # name : qemu version : 9.1.0 -release : 8 +release : 9 homepage : http://www.qemu-project.org/ upstreams : - https://download.qemu.org/qemu-9.1.0.tar.xz : 816b7022a8ba7c2ac30e2e0cf973e826f6bcc8505339603212c5ede8e94d7834 @@ -62,6 +62,22 @@ build : | install : | %make_install + %install_file %(pkgdir)/qemu-guest-agent.service -t %(installroot)/%(libdir)/systemd/system/ + %install_file %(pkgdir)/qemu-guest-agent.preset %(installroot)/%(libdir)/systemd/system-preset/99-qemu-guest-agent.preset + %install_file %(pkgdir)/99-qemu-guest-agent.rules -t %(installroot)/%(libdir)/udev/rules.d/ + + # TODO: Enable name override in %%tmpfiles macro + mkdir -p %(installroot)%(tmpfilesdir) + echo "d /var/log/qemu-ga 0755 root root -" >> %(installroot)%(tmpfilesdir)/qemu-guest-agent.conf + # TODO: Stop boulder emitting dependencies for these guys rm -v %(installroot)%(datadir)/qemu/s390* rm -v %(installroot)%(datadir)/qemu/hppa* +packages : + - "qemu-guest-agent": + paths: + - /usr/bin/qemu-ga + - /usr/lib/systemd/system/qemu-guest-agent.service + - /usr/lib/systemd/system-preset/99-qemu-guest-agent.preset + - /usr/lib/udev/rules.d/99-qemu-guest-agent.rules + - /usr/lib/tmpfiles.d/qemu-guest-agent.conf