From cb79eee7fe6f5e8e5e31474dba47dc054fabfa02 Mon Sep 17 00:00:00 2001 From: Joseph Kogut Date: Tue, 30 Dec 2025 10:54:27 -0800 Subject: [PATCH] package/x11r7/xlib_libxshmfence: set shared-memory-dir libxshmfence has multiple paths available for the shared memory directory, as some distros [0] opt to mount their tmpfs in a non-standard location such as /run/shm rather than /dev/shm. The default value of 'auto' will set this path to whatever the host is using, leaking host configuration into the target. See [1]. With X configurations that depend on shared memory files for futexes, (muvm [2] is a notable example), this results in applications silently breaking during presentation with a blank window, as the configured path doesn't have the required tmpfs mount. Set this path explicitly to avoid situations where the host context leaks into the package build, causing feature breakage. [0] https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes?action=show&redirect=OneiricOcelot%2FTechnicalOverview#Upgrades [1] https://gitlab.freedesktop.org/xorg/lib/libxshmfence/-/blob/libxshmfence-1.3.3/configure.ac#L144 [2] https://github.com/AsahiLinux/muvm Signed-off-by: Joseph Kogut [Julien: - add link to shared memory dir detection code in commit log - replace "+=" by "=" in _CONF_OPTS ] Signed-off-by: Julien Olivain --- package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk index b8c9ebfe97..fff79c5145 100644 --- a/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk +++ b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk @@ -12,4 +12,7 @@ XLIB_LIBXSHMFENCE_LICENSE_FILES = COPYING XLIB_LIBXSHMFENCE_INSTALL_STAGING = YES XLIB_LIBXSHMFENCE_DEPENDENCIES = host-pkgconf xorgproto +# default 'auto' leaks context from host +XLIB_LIBXSHMFENCE_CONF_OPTS = --with-shared-memory-dir=/dev/shm + $(eval $(autotools-package))