[app-emulation/qemu-guest-agent] this is in tree now
This commit is contained in:
parent
021c020045
commit
91044e10ca
@ -1 +0,0 @@
|
|||||||
DIST qemu-4.2.0.tar.xz 62222068 BLAKE2B 27c9fbcd5093af425764674817ab9299224bd03f37b5983786f6f437fff1fab3b7da247c55c4ca8b8c42726b9867005944a2f7f04f2d0d94d753961615f901ef SHA512 2a79973c2b07c53e8c57a808ea8add7b6b2cbca96488ed5d4b669ead8c9318907dec2b6109f180fc8ca8f04c0f73a56e82b3a527b5626b799d7e849f2474ec56
|
|
@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=QEMU Guest Agent
|
|
||||||
BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
|
|
||||||
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=-/usr/bin/qemu-ga
|
|
||||||
Restart=always
|
|
||||||
RestartSec=0
|
|
||||||
|
|
||||||
[Install]
|
|
@ -1,2 +0,0 @@
|
|||||||
SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
|
|
||||||
TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"
|
|
@ -1,11 +0,0 @@
|
|||||||
# Specifies the transport method used to communicate to QEMU on the host side
|
|
||||||
# Default: virtio-serial
|
|
||||||
#GA_METHOD="virtio-serial"
|
|
||||||
|
|
||||||
# Specifies the device path for the communications back to QEMU on the host
|
|
||||||
# Default: /dev/virtio-ports/org.qemu.guest_agent.0
|
|
||||||
#GA_PATH="/dev/virtio-ports/org.qemu.guest_agent.0"
|
|
||||||
|
|
||||||
# Additional options to qemu-guest-agent such as --fsfreeze-hook
|
|
||||||
# See qemu-ga --help for more info
|
|
||||||
#GA_OPTIONS="-F/etc/qemu/fsfreeze-hook"
|
|
@ -1,24 +0,0 @@
|
|||||||
#!/sbin/openrc-run
|
|
||||||
# Copyright 1999-2013 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
start() {
|
|
||||||
GA_METHOD=${GA_METHOD:-virtio-serial}
|
|
||||||
GA_PATH=${GA_PATH:-/dev/virtio-ports/org.qemu.guest_agent.0}
|
|
||||||
|
|
||||||
ebegin "Starting QEMU Guest Agent"
|
|
||||||
|
|
||||||
start-stop-daemon --start --pidfile /run/qemu-ga.pid \
|
|
||||||
--exec /usr/bin/qemu-ga -- -m ${GA_METHOD} -p ${GA_PATH} \
|
|
||||||
-l /var/log/qemu-ga.log -d -f /run/qemu-ga.pid -t /run ${GA_OPTIONS}
|
|
||||||
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping QEMU Guest Agent"
|
|
||||||
|
|
||||||
start-stop-daemon --stop --pidfile /run/qemu-ga.pid
|
|
||||||
|
|
||||||
eend $?
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
/var/log/qemu-ga.log {
|
|
||||||
weekly
|
|
||||||
missingok
|
|
||||||
rotate 4
|
|
||||||
compress
|
|
||||||
delaycompress
|
|
||||||
copytruncate
|
|
||||||
minsize 100k
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
--- 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) {
|
|
@ -1,17 +0,0 @@
|
|||||||
https://bugs.gentoo.org/580924
|
|
||||||
|
|
||||||
Linux C libs are moving away from implicit header pollution with sys/types.h
|
|
||||||
|
|
||||||
--- a/include/qemu/osdep.h
|
|
||||||
+++ b/include/qemu/osdep.h
|
|
||||||
@@ -118,6 +118,10 @@ extern int daemon(int, int);
|
|
||||||
#include <setjmp.h>
|
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
+#ifdef __linux__
|
|
||||||
+#include <sys/sysmacros.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#ifdef __OpenBSD__
|
|
||||||
#include <sys/signal.h>
|
|
||||||
#endif
|
|
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
|
||||||
<pkgmetadata>
|
|
||||||
<maintainer type="person">
|
|
||||||
<email>tamiko@gentoo.org</email>
|
|
||||||
<name>Matthias Maier</name>
|
|
||||||
</maintainer>
|
|
||||||
<maintainer type="project">
|
|
||||||
<email>virtualization@gentoo.org</email>
|
|
||||||
<name>Gentoo Virtualization Project</name>
|
|
||||||
</maintainer>
|
|
||||||
</pkgmetadata>
|
|
@ -1,83 +0,0 @@
|
|||||||
# Copyright 1999-2020 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="7"
|
|
||||||
|
|
||||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
|
||||||
|
|
||||||
inherit eutils systemd toolchain-funcs udev python-any-r1
|
|
||||||
|
|
||||||
MY_PN="qemu"
|
|
||||||
MY_P="${MY_PN}-${PV}"
|
|
||||||
|
|
||||||
SRC_URI="http://wiki.qemu.org/download/${MY_P}.tar.xz"
|
|
||||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
|
|
||||||
|
|
||||||
DESCRIPTION="QEMU Guest Agent (qemu-ga) for use when running inside a VM"
|
|
||||||
HOMEPAGE="https://wiki.qemu.org/Features/GuestAgent"
|
|
||||||
|
|
||||||
LICENSE="GPL-2 BSD-2"
|
|
||||||
SLOT="0"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
RDEPEND="dev-libs/glib"
|
|
||||||
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
${PYTHON_DEPS}"
|
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}"
|
|
||||||
|
|
||||||
PATCHES=(
|
|
||||||
"${FILESDIR}"/${PN}-4.2.0-sysmacros.patch #580924
|
|
||||||
"${FILESDIR}"/${PN}-4.2.0-fix-shutdown.patch #681874
|
|
||||||
)
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
tc-export AR LD OBJCOPY RANLIB
|
|
||||||
|
|
||||||
local myconf=(
|
|
||||||
--prefix=/usr
|
|
||||||
--sysconfdir=/etc
|
|
||||||
--libdir="/usr/$(get_libdir)"
|
|
||||||
--localstatedir=/
|
|
||||||
--disable-bsd-user
|
|
||||||
--disable-linux-user
|
|
||||||
--disable-system
|
|
||||||
--disable-strip
|
|
||||||
--disable-tools
|
|
||||||
--disable-werror
|
|
||||||
--enable-guest-agent
|
|
||||||
--python="${PYTHON}"
|
|
||||||
--cc="$(tc-getCC)"
|
|
||||||
--cxx="$(tc-getCXX)"
|
|
||||||
--host-cc="$(tc-getBUILD_CC)"
|
|
||||||
)
|
|
||||||
echo "./configure ${myconf[*]}"
|
|
||||||
./configure "${myconf[@]}" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake V=1 qemu-ga
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
dobin qemu-ga
|
|
||||||
|
|
||||||
# Normal init stuff
|
|
||||||
newinitd "${FILESDIR}/qemu-ga.init-r1" qemu-guest-agent
|
|
||||||
newconfd "${FILESDIR}/qemu-ga.conf-r1" qemu-guest-agent
|
|
||||||
|
|
||||||
insinto /etc/logrotate.d
|
|
||||||
newins "${FILESDIR}/qemu-ga.logrotate" qemu-guest-agent
|
|
||||||
|
|
||||||
# systemd stuff
|
|
||||||
udev_newrules "${FILESDIR}/qemu-ga-systemd.udev" 99-qemu-guest-agent.rules
|
|
||||||
|
|
||||||
systemd_newunit "${FILESDIR}/qemu-ga-systemd.service" \
|
|
||||||
qemu-guest-agent.service
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
elog "You should add 'qemu-guest-agent' to the default runlevel."
|
|
||||||
elog "e.g. rc-update add qemu-guest-agent default"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user