diff options
author | Matt Housh <jaeger@crux.ninja> | 2022-08-18 00:39:02 -0500 |
---|---|---|
committer | Matt Housh <jaeger@crux.ninja> | 2022-08-18 00:39:02 -0500 |
commit | a806869444edc62e66b251026fcfa7c8e241bdc0 (patch) | |
tree | 9902b2f6aceb81dc29c67dc1b52d92ab267ab1f0 /qemu-guest-agent | |
parent | 1ee75a97e3065ce40c8c75d065e4cfe88461fdf0 (diff) | |
download | contrib-a806869444edc62e66b251026fcfa7c8e241bdc0.tar.gz contrib-a806869444edc62e66b251026fcfa7c8e241bdc0.tar.xz |
qemu-guest-agent: initial import, version 7.0.0
Diffstat (limited to 'qemu-guest-agent')
-rw-r--r-- | qemu-guest-agent/.footprint | 9 | ||||
-rw-r--r-- | qemu-guest-agent/.signature | 7 | ||||
-rw-r--r-- | qemu-guest-agent/Pkgfile | 27 | ||||
-rw-r--r-- | qemu-guest-agent/qemu-ga.conf | 8 | ||||
-rwxr-xr-x | qemu-guest-agent/qemu-guest-agent.rc | 36 |
5 files changed, 87 insertions, 0 deletions
diff --git a/qemu-guest-agent/.footprint b/qemu-guest-agent/.footprint new file mode 100644 index 000000000..dc0666fc0 --- /dev/null +++ b/qemu-guest-agent/.footprint @@ -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 diff --git a/qemu-guest-agent/.signature b/qemu-guest-agent/.signature new file mode 100644 index 000000000..bd6c82476 --- /dev/null +++ b/qemu-guest-agent/.signature @@ -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 diff --git a/qemu-guest-agent/Pkgfile b/qemu-guest-agent/Pkgfile new file mode 100644 index 000000000..d9c5e460d --- /dev/null +++ b/qemu-guest-agent/Pkgfile @@ -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 +} diff --git a/qemu-guest-agent/qemu-ga.conf b/qemu-guest-agent/qemu-ga.conf new file mode 100644 index 000000000..74291e8d3 --- /dev/null +++ b/qemu-guest-agent/qemu-ga.conf @@ -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 diff --git a/qemu-guest-agent/qemu-guest-agent.rc b/qemu-guest-agent/qemu-guest-agent.rc new file mode 100755 index 000000000..1e0f1f561 --- /dev/null +++ b/qemu-guest-agent/qemu-guest-agent.rc @@ -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 |