meson: Build Xorg suid wrapper

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Adam Jackson 2018-03-26 18:42:55 -04:00
parent ab063cf967
commit 1e0df64738
3 changed files with 28 additions and 1 deletions

View File

@ -92,6 +92,12 @@ xorg_deps = [
libdrm_dep,
]
if get_option('suid_wrapper')
xorg_install_dir = get_option('libexecdir')
else
xorg_install_dir = get_option('bindir')
endif
e = executable(
'Xorg',
srcs_xorg,
@ -101,6 +107,7 @@ e = executable(
link_args: linker_export_flags,
c_args: xorg_c_args,
install: true,
install_dir: xorg_install_dir,
implib: true,
)
@ -128,6 +135,24 @@ if build_modesetting
subdir('drivers/modesetting')
endif
if get_option('suid_wrapper')
executable('Xorg.wrap',
'xorg-wrapper.c',
include_directories: [inc, xorg_inc],
dependencies: xorg_deps,
c_args: xorg_c_args,
install: true,
install_dir: get_option('libexecdir'),
# install_mode: ['r-sr-xr-x', 0, 0],
)
configure_file(
input: 'Xorg.sh.in',
output: 'Xorg',
configuration: conf_data,
install_dir: join_paths(get_option('prefix'), get_option('bindir')),
)
endif
# For symbol presence testing only
xorgserver_lib = shared_library(
'xorgserver',

View File

@ -86,6 +86,7 @@ conf_data.set('GBM_BO_WITH_MODIFIERS',
conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir)
conf_data.set_quoted('PROJECTROOT', get_option('prefix'))
conf_data.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir')))
conf_data.set_quoted('SUID_WRAPPER_DIR', join_paths(get_option('prefix'), get_option('libexecdir')))
# XXX: Stopped enumerating at COMPILEDEFAULTFONTPATH
conf_data.set('XORG_VERSION_CURRENT', release)

View File

@ -45,7 +45,8 @@ option('os_vendor', type: 'string', value: '')
option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'false'],
value: 'auto',
description: 'Xorg int10 backend (default: usually x86emu)')
option('suid_wrapper', type: 'boolean', value: 'false',
description: 'SUID wrapper for legacy driver support')
option('pciaccess', type: 'boolean', value: 'true',
description: 'Xorg pciaccess support')
option('udev', type: 'boolean', value: 'true')