aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorohair <none@none>2008-09-10 10:19:02 -0700
committerohair <none@none>2008-09-10 10:19:02 -0700
commit4a235a6b08bae1130d2aa7d129883b628d75bfcf (patch)
treeb9d3ba03f93afdc0e32e55fbe4fd5a4ae29f79a2
parent2526edd5196a624fd0c6527e47d8e9f0e81a249b (diff)
6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
Reviewed-by: tbell
-rw-r--r--make/common/Defs.gmk15
1 files changed, 14 insertions, 1 deletions
diff --git a/make/common/Defs.gmk b/make/common/Defs.gmk
index a0cb9481c..1bdbe97e7 100644
--- a/make/common/Defs.gmk
+++ b/make/common/Defs.gmk
@@ -704,7 +704,20 @@ endif
# Install of imported file (JDK_IMPORT_PATH, or some other external location)
define install-import-file
@$(ECHO) "ASSEMBLY_IMPORT: $@"
-$(install-file)
+$(prep-target)
+$(CP) $< $@
+@if [ "$(PLATFORM)" = "linux" -a "$(@F)" = "libjvm.so" ] ; then \
+ if [ -x /usr/sbin/selinuxenabled ] ; then \
+ /usr/sbin/selinuxenabled; \
+ if [ $$? = 0 ] ; then \
+ $(ECHO) "/usr/bin/chcon -t textrel_shlib_t $@"; \
+ /usr/bin/chcon -t textrel_shlib_t $@; \
+ if [ $$? != 0 ]; then \
+ echo "ERROR: Cannot chcon $@"; \
+ fi; \
+ fi; \
+ fi; \
+fi
endef
.PHONY: all build clean clobber