diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2025-08-21 07:33:03 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2025-08-21 08:05:48 +0900 |
| commit | a308eead37fa0931b8a9a4b3e31b34acabe44eee (patch) | |
| tree | 70bc9c77a891b8be3c6a37d84f13d7e0bec368f4 /gnu | |
| parent | 40311644a25ff598c785a7ce10250f106045d75f (diff) | |
gnu: spice-vdagent: Apply a patch fixing the monitor size calculation.
This fixes errors like:
spice-vdagentd[870]: invalid message size for VDAgentMonitorsConfig
See: <https://github.com/utmapp/UTM/issues/5832#issuecomment-3194879161>
* gnu/packages/patches/spice-vdagent-monitor-size-calculation.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/spice.scm (spice-vdagent) [source] <patches>: New field.
Change-Id: I4bc0f8e207bef65c8f2fcd64928315825d520ad1
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/patches/spice-vdagent-monitor-size-calculation.patch | 29 | ||||
| -rw-r--r-- | gnu/packages/spice.scm | 5 |
3 files changed, 34 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 8530f3311a2..2986521b4b0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2331,6 +2331,7 @@ dist_patch_DATA = \ %D%/packages/patches/softhsm-fix-openssl3-tests.patch \ %D%/packages/patches/spectre-meltdown-checker-externalize-fwdb.patch \ %D%/packages/patches/sphinxbase-fix-doxygen.patch \ + %D%/packages/patches/spice-vdagent-monitor-size-calculation.patch \ %D%/packages/patches/guile-srfi-125-fix-r7rs-rename-clause.patch \ %D%/packages/patches/sssd-system-directories.patch \ %D%/packages/patches/steghide-fixes.patch \ diff --git a/gnu/packages/patches/spice-vdagent-monitor-size-calculation.patch b/gnu/packages/patches/spice-vdagent-monitor-size-calculation.patch new file mode 100644 index 00000000000..370932c7eda --- /dev/null +++ b/gnu/packages/patches/spice-vdagent-monitor-size-calculation.patch @@ -0,0 +1,29 @@ +From 3660acfcbaaca9c66dca5ef09205bd7c1d70b98c Mon Sep 17 00:00:00 2001 +From: Lukas Joeressen <lukas@joeressen.net> +Date: Sat, 12 Apr 2025 10:42:02 +0200 +Subject: [PATCH] Fix VDAGentMonitorConfig size calculation + +The VDAgentMonitorsConfig struct has the VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE flag that +indicates if physical monitor sizes are included in the data. If this flag is set there is one +instance of VDAgentMonitorMM for each monitor following the other data. +--- + src/vdagentd/vdagentd.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c +index 3e59331..27a6f15 100644 +--- a/src/vdagentd/vdagentd.c ++++ b/src/vdagentd/vdagentd.c +@@ -208,6 +208,9 @@ static void do_client_monitors(VirtioPort *vport, int port_nr, + /* Store monitor config to send to agents when they connect */ + size = sizeof(VDAgentMonitorsConfig) + + new_monitors->num_of_monitors * sizeof(VDAgentMonConfig); ++ if (new_monitors->flags & VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE) { ++ size += new_monitors->num_of_monitors * sizeof(VDAgentMonitorMM); ++ } + if (message_header->size != size) { + syslog(LOG_ERR, "invalid message size for VDAgentMonitorsConfig"); + return; +-- +GitLab + diff --git a/gnu/packages/spice.scm b/gnu/packages/spice.scm index 5957ac66632..cb0827bf29b 100644 --- a/gnu/packages/spice.scm +++ b/gnu/packages/spice.scm @@ -293,7 +293,10 @@ Internet and from a wide variety of machine architectures.") "spice-vdagent-" version ".tar.bz2")) (sha256 (base32 - "18472sqr0gibzgzi48dpcbnvm78l05qrl5wv6xywqqj7r9dd3c4k")))) + "18472sqr0gibzgzi48dpcbnvm78l05qrl5wv6xywqqj7r9dd3c4k")) + (patches + (search-patches + "spice-vdagent-monitor-size-calculation.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags |
