intercept: Allow disabling (build-time) the udev redirection

Arch Linux uses a funky udev shim package which is incompatible with
our udev workaround, so allow them to disable it and use their shim
instead (as some packages are apparently **built** against the shim.)

For all other distros which are binary-built in ABI lockstep with udev
proper, keep it enabled.

This fixes #46.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
Ikey Doherty
2017-12-23 19:52:37 +00:00
parent b80f79c8d0
commit c640f2f215
3 changed files with 13 additions and 0 deletions
+7
View File
@@ -90,6 +90,13 @@ if with_snap_support == true
message('Enabling snapd support. Do NOT do this for distribution builds!')
endif
with_udev_redirect = get_option('with-udev-redirect')
if with_udev_redirect == true
cdata.set('HAVE_UDEV_REDIRECT', '1')
message('Enabling udev soname redirection. DO NOT DO THIS FOR ARCH LINUX!')
message('The udev redirect should only be used when not using udev shim')
endif
config_h = configure_file(
configuration: cdata,
output: 'config.h',
+2
View File
@@ -14,3 +14,5 @@ option('with-libressl-suffix', type: 'string', value: '-libressl',
description: 'Suffix for shim LibreSSL library when using --with-libressl-mode=shim')
option('with-snap-support', type: 'boolean', description: 'Build LSI with explicit support for snapd', value: false)
option('with-udev-redirect', type: 'boolean', description: 'Enable libudev soname redirection. DO NOT USE WITH UDEV SHIM.')
+4
View File
@@ -273,7 +273,9 @@ static const char *vendor_transmute_source[] = {
"libbz2.so.1.0",
#ifdef HAVE_UDEV_REDIRECT
"libudev.so.0",
#endif
};
/**
@@ -311,7 +313,9 @@ static const char *vendor_transmute_target[] = {
"libbz2.so.1.0.6",
#ifdef HAVE_UDEV_REDIRECT
"libudev.so.1",
#endif
};
/**