[PATCH 3/5] xfree86: Set a saner search path for xorg.conf.d

Dan Nicholson dbn.lists at gmail.com
Sat Apr 3 09:33:49 PDT 2010


There's no reason to carry all the oddities from xorg.conf like appended
hostname to the search path for xorg.conf.d. This changes it to something
very simple:

	/etc/X11/<cmdline>
	$sysconfdir/X11/<cmdline>
	/etc/X11/xorg.conf.d
	$sysconfdir/X11/xorg.conf.d

Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
---
 cpprules.in                          |    1 +
 hw/xfree86/common/xf86Config.c       |   16 ++++------------
 hw/xfree86/doc/man/xorg.conf.man.pre |   22 ++++------------------
 3 files changed, 9 insertions(+), 30 deletions(-)

diff --git a/cpprules.in b/cpprules.in
index 301305e..6e43578 100644
--- a/cpprules.in
+++ b/cpprules.in
@@ -34,6 +34,7 @@ MANDEFS = \
 	-D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \
 	-D__mandir__=$(mandir) \
 	-D__projectroot__=$(prefix) \
+	-D__sysconfdir__=$(sysconfdir) \
 	-D__datadir__=$(datadir) \
 	-D__xconfigfile__=$(__XCONFIGFILE__) \
 	-D__xconfigdir__=$(__XCONFIGDIR__) \
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 718a078..d02c22a 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -97,20 +97,12 @@ extern DeviceAssocRec mouse_assoc;
 #endif
 #ifndef ROOT_CONFIGDIRPATH
 #define ROOT_CONFIGDIRPATH	"%A," "%R," \
-				"/etc/X11/%R," "%P/etc/X11/%R," \
-				"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
-				"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
-				"%P/etc/X11/%X," \
-				"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
-				"%P/lib/X11/%X"
+				"/etc/X11/%R," "%C/X11/%R," \
+				"/etc/X11/%X," "%C/X11/%X"
 #endif
 #ifndef USER_CONFIGDIRPATH
-#define USER_CONFIGDIRPATH	"/etc/X11/%S," "%P/etc/X11/%S," \
-				"/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \
-				"%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \
-				"%P/etc/X11/%X," \
-				"%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \
-				"%P/lib/X11/%X"
+#define USER_CONFIGDIRPATH	"/etc/X11/%R," "%C/X11/%R," \
+				"/etc/X11/%X," "%C/X11/%X"
 #endif
 #ifndef PROJECTROOT
 #define PROJECTROOT	"/usr/X11R6"
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 9a40ce3..acfa1ca 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -107,16 +107,9 @@ directories when the server is started as a normal user:
 .RS 4
 .nf
 .IR /etc/X11/ <cmdline>
-.IR __projectroot__/etc/X11/ <cmdline>
-.I /etc/X11/__xconfigdir__\-4
+.IR __sysconfdir__/X11/ <cmdline>
 .I /etc/X11/__xconfigdir__
-.I /etc/__xconfigdir__
-.IR __projectroot__/etc/X11/__xconfigdir__. <hostname>
-.I __projectroot__/etc/X11/__xconfigdir__\-4
-.I __projectroot__/etc/X11/__xconfigdir__
-.IR __projectroot__/lib/X11/__xconfigdir__. <hostname>
-.I __projectroot__/lib/X11/__xconfigdir__\-4
-.I __projectroot__/lib/X11/__xconfigdir__
+.I __sysconfdir__/X11/__xconfigdir__
 .fi
 .RE
 .PP
@@ -133,16 +126,9 @@ config directory search locations are as follows:
 .nf
 <cmdline>
 .IR /etc/X11/ <cmdline>
-.IR __projectroot__/etc/X11/ <cmdline>
-.I /etc/X11/__xconfigdir__\-4
+.IR __sysconfdir__/X11/ <cmdline>
 .I /etc/X11/__xconfigdir__
-.I /etc/__xconfigdir__
-.IR __projectroot__/etc/X11/__xconfigdir__. <hostname>
-.I __projectroot__/etc/X11/__xconfigdir__\-4
-.I __projectroot__/etc/X11/__xconfigdir__
-.IR __projectroot__/lib/X11/__xconfigdir__. <hostname>
-.I __projectroot__/lib/X11/__xconfigdir__\-4
-.I __projectroot__/lib/X11/__xconfigdir__
+.I __sysconfdir__/X11/__xconfigdir__
 .fi
 .RE
 .PP
-- 
1.6.6.1



More information about the xorg-devel mailing list