[PATCH xserver 06/10] meson: Add an option to build XSELINUX.

Adam Jackson ajax at nwnk.net
Thu Aug 9 17:47:30 UTC 2018


On Tue, 2018-08-07 at 16:23 -0700, Eric Anholt wrote:
> Dependencies are ported from the automake build.  The only part I
> skipped was making sure we can find libaudit.h.

Fair enough, but then:

> +build_xselinux = get_option('xselinux')
> +if build_xselinux
> +    if not build_xace
> +        error('cannot build XSELINUX extension without X-ACE')
> +    endif
> +    common_dep += dependency('libselinux', version: '>= 2.0.86')
> +    common_dep += cc.find_library('audit')
> +endif

This can be dependency('audit'), there's a pkgconfig file. I think this
might want to be automatic based on linux && dependency() though,
because...

> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -78,6 +78,8 @@ option('xres', type: 'boolean', value: true,
>         description: 'XRes extension')
>  option('xace', type: 'boolean', value: true,
>         description: 'X-ACE extension')
> +option('xselinux', type: 'boolean', value: true,
> +       description: 'XSELINUX extension')

(... until/unless we require a newer meson with better 'auto' support,)
non-Linux (and non-SELinux-using Linux) systems will have to explicitly
disable something they can't possibly use just to build. This happened
to me, even:

https://ci.appveyor.com/project/nwnk/xserver/build/job/hf8rxt84upie2wpq

- ajax


More information about the xorg-devel mailing list