summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-01-24 14:17:44 -0500
committerChris Evich <cevich@redhat.com>2019-01-30 08:26:49 -0500
commit10d749b9a8c36ce5d3e2dc904222863528c349f6 (patch)
tree9d5f2f5d7a3c10255e7a8d68683fde32081efc56
parent8ca6706be0fff7136ba118914f6dbe3459c8f831 (diff)
downloadpodman-10d749b9a8c36ce5d3e2dc904222863528c349f6.tar.gz
podman-10d749b9a8c36ce5d3e2dc904222863528c349f6.tar.bz2
podman-10d749b9a8c36ce5d3e2dc904222863528c349f6.zip
Set SELinux type on bin/podman after install
Different components of testing reference the podman binary differently. While they are identical in content, their SELinux types are not the same, depending on build location. Avoid confusion and test failures by always matching the bin/podman SELinux type to that of $BINDIR/podman **after** install. This ensures even if the code or default contexts change, a subsequent `make install` will re-match the SELinux type. Signed-off-by: Chris Evich <cevich@redhat.com>
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f0f6a1fab..b68b8adbe 100644
--- a/Makefile
+++ b/Makefile
@@ -224,6 +224,7 @@ install: .gopathok install.bin install.man install.cni install.systemd
install.bin:
install ${SELINUXOPT} -d -m 755 $(BINDIR)
install ${SELINUXOPT} -m 755 bin/podman $(BINDIR)/podman
+ test -z "${SELINUXOPT}" || chcon --verbose --reference=$(BINDIR)/podman bin/podman
install.man: docs
install ${SELINUXOPT} -d -m 755 $(MANDIR)/man1