Skip to contentSkip to conversation

libselinux: Fix host installation issue.

PATCH New Adam Duskett 1 participant 1 message Jan 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libselinux: Fix host installation issue.

libselinux currently installs the python module in the host directory starting with the full path to the buildroot directory.

IE: If buildroot was in /home/foo/buildroot, the python module will be installed to:
/home/foo/buildroot/output/host/home/foo/buildroot/output/host/usr/lib/

This patch fixes this by not passing the DESTDIR=$(HOST_DIR) when running the install commands, as passing DESTDIR during the build command will set the proper directory to install to. This only effects the pywrap module.

---
 package/libselinux/libselinux.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/libselinux/libselinux.mk +3 -2
index 44120c4..bd3f984 100644
@@ -80,9 +80,10 @@ define HOST_LIBSELINUX_INSTALL_CMDS
 		$(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
 		SHLIBDIR=$(HOST_DIR)/usr/lib SBINDIR=$(HOST_DIR)/usr/sbin install
 	(cd $(HOST_DIR)/usr/lib; $(HOSTLN) -sf libselinux.so.1 libselinux.so)
-	# Install python interface wrapper
+	# Install python interface wrapper. Do not pass destdir as this will
+	# case the python module to install in the incorrect location.
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
-		$(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) install-pywrap
+		$(HOST_LIBSELINUX_MAKE_OPTS) install-pywrap
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.9.3