xorg-x11-server/u_Support-configuration-files-under-run-X11-xorg.conf..patch
Stefan Dirsch edcd3cf183 Accepting request 935494 from home:tdz:branches:X11:XOrg
[boo1193250] Add support for various platform devices

 * Fix SEGFAULT when parsing busid
 * Support configuration files under /run
 * Add udev rules for configuration of platform (e.g., simple-framebuffer)
   and HyperV devices
 * Remove current simpledrm hack from X server

OBS-URL: https://build.opensuse.org/request/show/935494
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=808
2021-12-03 16:28:10 +00:00

87 lines
2.7 KiB
Diff

From cc166e8ba0d282399b3f00f34b89d6c3f8aa7394 Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <tzimmermann@suse.de>
Date: Tue, 2 Nov 2021 14:29:08 +0100
Subject: Support configuration files under /run/X11/xorg.conf.d
Make the X server look for runtime-generated configuration files
under /run/X11/xorg.conf.d. This is useful for dynamically setting
up platform devices during boot (e.g., via udev).
By the rules for /run, all configuration files are cleared on
reboots. So even hard resets won't populate the system with old,
obsolete configuration files.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
hw/xfree86/common/xf86Config.c | 8 ++++----
hw/xfree86/man/xorg.conf.man | 6 ++++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 5d814c148..939db755e 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -95,12 +95,12 @@
#endif
#ifndef ALL_CONFIGDIRPATH
#define ALL_CONFIGDIRPATH "%A," "%R," \
- "/etc/X11/%R," "%C/X11/%R," \
- "/etc/X11/%X," "%C/X11/%X"
+ "/run/X11/%R," "/etc/X11/%R," "%C/X11/%R," \
+ "/run/X11/%X," "/etc/X11/%X," "%C/X11/%X"
#endif
#ifndef RESTRICTED_CONFIGDIRPATH
-#define RESTRICTED_CONFIGDIRPATH "/etc/X11/%R," "%C/X11/%R," \
- "/etc/X11/%X," "%C/X11/%X"
+#define RESTRICTED_CONFIGDIRPATH "/run/X11/%R," "/etc/X11/%R," "%C/X11/%R," \
+ "/run/X11/%X," "/etc/X11/%X," "%C/X11/%X"
#endif
#ifndef SYS_CONFIGDIRPATH
#define SYS_CONFIGDIRPATH "%D/X11/%X"
diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
index ac88d7e7a..31ff1f0fd 100644
--- a/hw/xfree86/man/xorg.conf.man
+++ b/hw/xfree86/man/xorg.conf.man
@@ -35,8 +35,10 @@ server is started as a normal user:
.PP
.RS 4
.nf
+.IR /run/X11/ <cmdline>
.IR /etc/X11/ <cmdline>
.IR @projectroot@/etc/X11/ <cmdline>
+.IB /run/X11/ $XORGCONFIG
.IB /etc/X11/ $XORGCONFIG
.IB @projectroot@/etc/X11/ $XORGCONFIG
.I /etc/X11/xorg.conf
@@ -66,9 +68,11 @@ search locations are as follows:
.RS 4
.nf
<cmdline>
+.IR /run/X11/ <cmdline>
.IR /etc/X11/ <cmdline>
.IR @projectroot@/etc/X11/ <cmdline>
.B $XORGCONFIG
+.IB /run/X11/ $XORGCONFIG
.IB /etc/X11/ $XORGCONFIG
.IB @projectroot@/etc/X11/ $XORGCONFIG
.I /etc/X11/xorg.conf
@@ -102,6 +106,7 @@ directories when the server is started as a normal user:
.nf
.IR /etc/X11/ <cmdline>
.IR @sysconfdir@/X11/ <cmdline>
+.I /run/X11/@xconfigdir@
.I /etc/X11/@xconfigdir@
.I @sysconfdir@/X11/@xconfigdir@
.fi
@@ -121,6 +126,7 @@ config directory search locations are as follows:
<cmdline>
.IR /etc/X11/ <cmdline>
.IR @sysconfdir@/X11/ <cmdline>
+.I /run/X11/@xconfigdir@
.I /etc/X11/@xconfigdir@
.I @sysconfdir@/X11/@xconfigdir@
.fi
--
2.34.0