app-emulation/qemu-guest-agent: fix shutdown command
authorMatthias Maier <tamiko@gentoo.org>
Sat, 18 Apr 2020 19:28:23 +0000 (14:28 -0500)
committerMatthias Maier <tamiko@gentoo.org>
Sat, 18 Apr 2020 19:28:23 +0000 (14:28 -0500)
Closes: https://bugs.gentoo.org/681874
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
app-emulation/qemu-guest-agent/files/qemu-guest-agent-4.2.0-fix-shutdown.patch [new file with mode: 0644]
app-emulation/qemu-guest-agent/qemu-guest-agent-4.2.0-r1.ebuild [moved from app-emulation/qemu-guest-agent/qemu-guest-agent-4.2.0.ebuild with 96% similarity]

diff --git a/app-emulation/qemu-guest-agent/files/qemu-guest-agent-4.2.0-fix-shutdown.patch b/app-emulation/qemu-guest-agent/files/qemu-guest-agent-4.2.0-fix-shutdown.patch
new file mode 100644 (file)
index 0000000..f697816
--- /dev/null
@@ -0,0 +1,11 @@
+--- qemu-4.2.0/qga/commands-posix.c.orig       2020-03-23 11:15:05.972610989 +0300
++++ qemu-4.2.0/qga/commands-posix.c    2020-03-23 11:15:39.676015087 +0300
+@@ -108,7 +108,7 @@
+         reopen_fd_to_null(1);
+         reopen_fd_to_null(2);
+-        execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
++        execle("/sbin/shutdown", "shutdown", "-h", "now", shutdown_flag, "+0",
+                "hypervisor initiated shutdown", (char*)NULL, environ);
+         _exit(EXIT_FAILURE);
+     } else if (pid < 0) {
similarity index 96%
rename from app-emulation/qemu-guest-agent/qemu-guest-agent-4.2.0.ebuild
rename to app-emulation/qemu-guest-agent/qemu-guest-agent-4.2.0-r1.ebuild
index 27782cf6ca5a70d716705c469c86597127a1cbf5..c290b1251ca0cb6f0eb69455130873fe594e84a6 100644 (file)
@@ -29,6 +29,7 @@ S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-4.2.0-sysmacros.patch #580924
+       "${FILESDIR}"/${PN}-4.2.0-fix-shutdown.patch #681874
 )
 
 src_configure() {