From 0aff79f29fee274441c22e1eecb199636c3b11ff Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Tue, 19 Jan 2021 21:20:55 -0300 Subject: [PATCH] setools: Avoid using host libraries This adds $STAGING_DIR to library search paths in setup.py, to avoid picking up host libraries when linking. Signed-off-by: Eneas U de Queiroz --- utils/setools/Makefile | 2 +- utils/setools/patches/030-remove-host-paths.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 utils/setools/patches/030-remove-host-paths.patch diff --git a/utils/setools/Makefile b/utils/setools/Makefile index bc7bed8a3..dbfb5d298 100644 --- a/utils/setools/Makefile +++ b/utils/setools/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=setools PKG_VERSION:=4.3.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/SELinuxProject/setools/releases/download/4.3.0 diff --git a/utils/setools/patches/030-remove-host-paths.patch b/utils/setools/patches/030-remove-host-paths.patch new file mode 100644 index 000000000..94553004d --- /dev/null +++ b/utils/setools/patches/030-remove-host-paths.patch @@ -0,0 +1,12 @@ +--- a/setup.py ++++ b/setup.py +@@ -79,7 +79,8 @@ class QtHelpCommand(Command): + + + # Library linkage +-lib_dirs = ['.', '/usr/lib64', '/usr/lib', '/usr/local/lib'] ++owrt_staging_dir = os.environ["STAGING_DIR"] ++lib_dirs = ['.', owrt_staging_dir + '/usr/lib64', owrt_staging_dir + '/usr/lib', owrt_staging_dir + '/usr/local/lib' ] + include_dirs = [] + + with suppress(KeyError):