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 <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2018-02-23 16:05:59 +01:00
parent d30663558f
commit 7f82f9bbe8
No known key found for this signature in database
GPG Key ID: B2BEAD150DE936B9
1 changed files with 1 additions and 1 deletions

View File

@ -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)