Hi,
I’ve been testing Obarun in a VM under virt-manager/SPICE and ran into a problem installing spice-vdagent.
The Arch package currently depends on systemd-libs, so on Obarun:
warning: ignoring package systemd-libs-262-1
warning: cannot resolve "systemd-libs", a dependency of "spice-vdagent"
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'systemd-libs' required by spice-vdagent
I could not find an Obarun version of spice-vdagent in obcore, obextra, or obcommunity, so I tried building it without systemd support.
This turned out to work.
I built spice-vdagent 0.23.0 with:
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--with-session-info=none \
--with-init-script=none
On the current compiler, the 0.23.0 source has a couple of warnings that are treated as errors, so I also used:
CFLAGS="-O2 -pipe -Wno-error"
The warnings were:
warning: initialization discards ‘const’ qualifier from pointer target type
warning: variable ‘n’ set but not used
With -Wno-error, both binaries built successfully.
I checked that neither binary was linked against systemd:
ldd src/spice-vdagentd | grep systemd
ldd src/spice-vdagent | grep systemd
Both returned no output.
I also ran the upstream test suite:
Testsuite summary for spice-vdagent 0.23.0
# TOTAL: 3
# PASS: 3
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
I packaged the result locally as spice-vdagent-nosystemd.
One packaging detail I ran into is that upstream tries to install spice-vdagentd into /usr/sbin, which conflicts with Arch/Obarun’s merged /usr layout. Using:
--sbindir=/usr/bin
fixed that.
I also created a simple 66 frontend for the daemon:
[Main]
Type = classic
Description = "SPICE guest agent daemon"
[Start]
Execute = (
foreground { mkdir -p -m 0755 /run/spice-vdagentd }
/usr/bin/spice-vdagentd -x
)
After:
sudo 66 enable --start spice-vdagentd
the daemon starts automatically at boot and is supervised by 66.
After reboot I confirmed:
66-supervise spice-vdagentd
/usr/bin/spice-vdagentd -x
were running.
I then started the per-user agent manually from the graphical session:
/usr/bin/spice-vdagent -x
and SPICE clipboard sharing between the Obarun guest and the host worked successfully.
Apparently, spice-vdagent itself does not require systemd for the basic guest-agent functionality. The problem is primarily that the Arch binary package is built with and depends on systemd-libs. I did test, but only for my problem which was copying and pasting into and out of the VM. May not matter but I am currently running Garuda, and I was trying out Obarun in a VM to see if it would work and what it is like.
Would there be interest in adding a systemd-free build of spice-vdagent to obcommunity, possibly together with a spice-vdagentd-66serv package?
I’m happy to share the PKGBUILD and service frontend that I used. I’m new to Obarun and making linux pacakages, but I am a Software Engineer and I got assistance from AI. I am not looking to commit to being a long-term package maintainer, but since this is working here, I wanted to pass it along so the next person using Obarun as a SPICE guest does not have to rediscover all of this.
Thanks.