Discussion:
[PATCH xserver] meson: Set XCONFIGFILE to 'xorg.conf' instead of '/etc/xorg.conf'
Aaron Plattner
2018-05-04 17:48:17 UTC
Permalink
The autoconf build hard-codes XCONFIGFILE to just 'xorg.conf':

XF86CONFIGFILE="xorg.conf"
AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file])

Later, the X server passes that into DoSubstitution() which expands the path:

DoSubstitution(template="/etc/X11/%X", ..., XConfigFile="xorg.conf")

This returns "/etc/X11/xorg.conf".

The Meson build, on the other hand, sets XCONFIGFILE to
join_paths(get_option('sysconfdir'), 'xorg.conf'). If sysconfdir is /etc, this
results in '/etc/xorg.conf', resulting in DoSubstitution returning
'/etc/X11/etc/xorg.conf'.

Fix this by just hard-coding XCONFIGFILE to 'xorg.conf'.

Signed-off-by: Aaron Plattner <***@nvidia.com>
---
include/meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/meson.build b/include/meson.build
index 691e9f0743af..01625d7b544d 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -261,7 +261,7 @@ endif
conf_data.set('SVR4', cc.compiles(defines_svr4))
conf_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules'))
conf_data.set('XORGSERVER', build_xorg)
-conf_data.set_quoted('XCONFIGFILE', join_paths(get_option('sysconfdir'), 'xorg.conf'))
+conf_data.set_quoted('XCONFIGFILE', 'xorg.conf')
conf_data.set_quoted('__XSERVERNAME__', 'Xorg')
conf_data.set('WITH_VGAHW', build_vgahw)
conf_data.set('CSRG_BASED', csrg_based)
@@ -308,7 +308,7 @@ xorg_data = configuration_data()
xorg_data.set_quoted('XORG_BIN_DIRECTORY', get_option('bindir'))
xorg_data.set('XORG_VERSION_CURRENT', release)
xorg_data.set_quoted('XF86CONFIGFILE', 'xorg.conf')
-xorg_data.set_quoted('XCONFIGFILE', join_paths(get_option('sysconfdir'), 'xorg.conf'))
+xorg_data.set_quoted('XCONFIGFILE', 'xorg.conf')
xorg_data.set_quoted('XCONFIGDIR', 'xorg.conf.d')
xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME', '.local/share')
xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME_LOGDIR', 'xorg')
--
2.17.0

_______________________________________________
xorg-***@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listin
Thierry Reding
2018-05-04 22:48:43 UTC
Permalink
Post by Aaron Plattner
XF86CONFIGFILE="xorg.conf"
AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file])
DoSubstitution(template="/etc/X11/%X", ..., XConfigFile="xorg.conf")
This returns "/etc/X11/xorg.conf".
The Meson build, on the other hand, sets XCONFIGFILE to
join_paths(get_option('sysconfdir'), 'xorg.conf'). If sysconfdir is /etc, this
results in '/etc/xorg.conf', resulting in DoSubstitution returning
'/etc/X11/etc/xorg.conf'.
Fix this by just hard-coding XCONFIGFILE to 'xorg.conf'.
---
include/meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Thierry Reding <***@nvidia.com>
Adam Jackson
2018-05-07 16:27:53 UTC
Permalink
Post by Aaron Plattner
XF86CONFIGFILE="xorg.conf"
AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file])
DoSubstitution(template="/etc/X11/%X", ..., XConfigFile="xorg.conf")
This returns "/etc/X11/xorg.conf".
The Meson build, on the other hand, sets XCONFIGFILE to
join_paths(get_option('sysconfdir'), 'xorg.conf'). If sysconfdir is /etc, this
results in '/etc/xorg.conf', resulting in DoSubstitution returning
'/etc/X11/etc/xorg.conf'.
Fix this by just hard-coding XCONFIGFILE to 'xorg.conf'.
---
include/meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Merged, thanks:

remote: I: patch #220676 updated using rev f5ded22e14e2e15390eff8e01ce32de496ae0e86.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
1a3e4a2f67..f5ded22e14 master -> master

- ajax
_______________________________________________
xorg-***@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-dev

Loading...