qemu-guest-agent: initial import, version 7.0.0

This commit is contained in:
Matt Housh 2022-08-18 00:39:02 -05:00
parent 1ee75a97e3
commit a806869444
5 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,9 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/qemu/
-rw-r--r-- root/root etc/qemu/fsfreeze-hook
-rwxr-xr-x root/root etc/qemu/qemu-ga.conf
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/qemu-guest-agent
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/qemu-ga

View File

@ -0,0 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF33jOJ7gc4dvcMYU0mmzDXJhGhnuzzJj08VTs70cvyZrzo/qaJXB7iLunIsu2YeBDbOnjAuS1wIdwbOlO4rNJAwM=
SHA256 (Pkgfile) = 4a6fe581481aed631f5f43aa8efe6da3980d07164dd37320e1161ba9a476a933
SHA256 (.footprint) = 6af2a048123edf1179865aa9159a067abc2c4b22d20679608184e3c5aab128a7
SHA256 (qemu-7.0.0.tar.xz) = f6b375c7951f728402798b0baabb2d86478ca53d44cedbefabbe1c46bf46f839
SHA256 (qemu-ga.conf) = 9151d9df9d3ddbc624e1e006d481214b1cdde88cbe83e9939e43d0f33d98379b
SHA256 (qemu-guest-agent.rc) = 3e4ae44746b1dff0348f4ddd75ba39b3e500e8f6b648bb8046821f15650466b6

27
qemu-guest-agent/Pkgfile Normal file
View File

@ -0,0 +1,27 @@
# Description: QEMU guest agent
# URL: https://www.qemu.org/
# Maintainer: Matt Housh, jaeger at crux dot ninja
# Depends on: glib xorg-libpixman
name=qemu-guest-agent
version=7.0.0
release=1
source=(https://download.qemu.org/qemu-$version.tar.xz qemu-ga.conf $name.rc)
build() {
cd qemu-$version
./configure --prefix=/usr \
--sysconfdir=/etc \
--enable-guest-agent \
--disable-docs
make qemu-ga
install -D -o root -g root -m 0755 build/qga/qemu-ga \
$PKG/usr/bin/qemu-ga
install -dm 0755 $PKG/etc/qemu
install -m 0644 scripts/$name/fsfreeze-hook \
$PKG/etc/qemu/
install -m 0755 $SRC/qemu-ga.conf \
$PKG/etc/qemu/
install -Dm 0755 $SRC/$name.rc \
$PKG/etc/rc.d/$name
}

View File

@ -0,0 +1,8 @@
[general]
daemonize = 0
fsfreeze-hook = /etc/qemu/fsfreeze-hook
method = virtio-serial
path = /dev/virtio-ports/org.qemu.guest_agent.0
pidfile = /run/qemu-ga.pid
statedir = /run
verbose = 0

View File

@ -0,0 +1,36 @@
#!/bin/sh
#
# /etc/rc.d/qemu-guest-agent: start/stop qemu-guest-agent daemon
#
SSD=/sbin/start-stop-daemon
PROG=/usr/bin/qemu-ga
PID=/run/qemu-ga.pid
OPTS="-d"
case $1 in
start)
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
;;
stop)
$SSD --stop --retry 10 --pidfile $PID
;;
restart)
$0 stop
$0 start
;;
status)
$SSD --status --pidfile $PID
case $? in
0) echo "$PROG is running with pid $(cat $PID)" ;;
1) echo "$PROG is not running but the pid file $PID exists" ;;
3) echo "$PROG is not running" ;;
4) echo "Unable to determine the program status" ;;
esac
;;
*)
echo "usage: $0 [start|stop|restart|status]"
;;
esac
# End of file