From 7f82f9bbe81833d8dbc80fda8c892fbd67502152 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Fri, 23 Feb 2018 16:05:59 +0100 Subject: [PATCH] Makefile: fix SELINUXOPT generation This patch fixes selinuxopt generation as found in: ``` install /usr/sbin/selinuxenabled -D -m 644 crio.conf /etc/crio/crio.conf ``` The above is clearly wrong when installing the configuration because `commmand -v` outputs the path of selinuxenabled as well, resulting in /usr/bin/selinuxenabled -Z This patch fixes that by just echoing the -Z as needed. Issue introduced in https://github.com/kubernetes-incubator/cri-o/pull/1363 Signed-off-by: Antonio Murdaca --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0290a202..a185fe34 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ CRICTL_CONFIG_DIR=${DESTDIR}/etc BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions OCIUMOUNTINSTALLDIR=$(PREFIX)/share/oci-umount/oci-umount.d -SELINUXOPT ?= $(shell command -v selinuxenabled && selinuxenabled && echo -Z) +SELINUXOPT ?= $(shell command -v selinuxenabled >/dev/null 2>&1 && selinuxenabled && echo -Z) PACKAGES ?= $(shell go list -tags "${BUILDTAGS}" ./... | grep -v github.com/kubernetes-incubator/cri-o/vendor) COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true)