[PATCH libinput 1/2] meson: Fix absolute libdir case in install script

Peter Hutterer peter.hutterer at who-t.net
Fri Feb 16 07:09:19 UTC 2018


On Thu, Nov 30, 2017 at 09:23:38AM +0100, Quentin Glidic wrote:
> From: Quentin Glidic <sardemff7+git at sardemff7.net>
> 
> If libdir is an absolute path (which means it’s outside of prefix) we
> would wrongly add the prefix to it in the install script. Just pass the
> correct libdir from Meson directly thanks to join_paths() magic.
> 
> Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
> ---
> Just found this one while doing patch 2, I didn’t actually test it.

sorry for the delay, I missed this one and only noticed it now when the
other one showed up in bug https://bugs.freedesktop.org/show_bug.cgi?id=105080

Both applied now, expect them to be pushed as once the test runs finish.

Cheers,
   Peter
 
>  meson.build                             | 2 +-
>  src/libinput-restore-selinux-context.sh | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 9b0fa246..6c5b9a84 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -225,7 +225,7 @@ pkgconfig.generate(
>  # Restore the SELinux context for the libinput.so.a.b.c on install
>  # meson bug https://github.com/mesonbuild/meson/issues/1967
>  meson.add_install_script('src/libinput-restore-selinux-context.sh',
> -			 get_option('libdir'),
> +			 join_paths(get_option('prefix'), get_option('libdir')),
>  			 lib_libinput.full_path())
>  
>  ############ documentation ############
> diff --git a/src/libinput-restore-selinux-context.sh b/src/libinput-restore-selinux-context.sh
> index 3b1c555b..606b5b08 100644
> --- a/src/libinput-restore-selinux-context.sh
> +++ b/src/libinput-restore-selinux-context.sh
> @@ -7,6 +7,6 @@ libdir="$1"
>  sofile=$(basename "$2")
>  
>  if command -v restorecon >/dev/null; then
> -	echo "Restoring SELinux context on $MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
> -	restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
> +	echo "Restoring SELinux context on ${DESTDIR}${libdir}/${sofile}"
> +	restorecon "${DESTDIR}${libdir}/${sofile}"
>  fi
> -- 
> 2.15.0
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> 


More information about the wayland-devel mailing list