policycoreutils: Patch Makefile to get load_policy symlink right.

Setting DESTDIR in the policycoreutils do_install creates a bad
symlink for load_policy. This patch fixes up the Makefile to
create the symlink relative to DESTDIR.

Signed-off-by: Philip Tricca <flihp@twobit.us>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
This commit is contained in:
Philip Tricca 2014-01-09 23:26:54 +00:00 committed by Mark Hatle
parent 2209cb5fc2
commit f5e042c80a
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,19 @@
policycoreutils: Patch Makefile to get load_policy symlink right
Setting DESTDIR in the policycoreutils do_install creates a bad
symlink for load_policy. This patch fixes up the Makefile to
create the symlink relative to DESTDIR.
Signed-off-by: Philip Tricca <flihp@twobit.us>
--- a/load_policy/Makefile
+++ b/load_policy/Makefile
@@ -19,7 +19,7 @@ install: all
test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8
install -m 644 load_policy.8 $(MANDIR)/man8/
-mkdir -p $(USRSBINDIR)
- -ln -sf $(SBINDIR)/load_policy $(USRSBINDIR)/load_policy
+ -ln -sf $(subst $(DESTDIR),,$(SBINDIR))/load_policy $(USRSBINDIR)/load_policy
clean:
-rm -f $(TARGETS) *.o

View File

@ -13,4 +13,5 @@ SRC_URI += "\
file://policycoreutils-revert-run_init-open_init_pty.patch \
file://policycoreutils-fix-sepolicy-install-path.patch \
file://policycoreutils-make-O_CLOEXEC-optional.patch \
file://policycoreutils-loadpolicy-symlink.patch \
"