mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Use command -v rather than which
Which is technically not POSIX and command -v works everywhere. This fixes building and running the test suite on openSUSE Tumbleweed. Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
This commit is contained in:
parent
f58fe9cd52
commit
4b0adc63f5
3 changed files with 5 additions and 5 deletions
|
@ -35,7 +35,7 @@ VERSION=$(shell cat $(COMMONDIR)/Version)
|
|||
pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
|
||||
map = $(foreach a,$(2),$(call $(1),$(a)))
|
||||
|
||||
AWK:=$(shell which awk)
|
||||
AWK:=$(shell command -v awk)
|
||||
ifndef AWK
|
||||
$(error awk utility required for build but not available)
|
||||
endif
|
||||
|
|
|
@ -27,7 +27,7 @@ manually, or build against in-tree libapparmor.${nl}\
|
|||
endif # LIBAPPARMOR not set
|
||||
LDLIBS += $(LIBAPPARMOR)
|
||||
|
||||
AA_EXEC = $(shell which aa-exec)
|
||||
AA_EXEC = $(shell command -v aa-exec)
|
||||
ifeq ($(AA_EXEC),)
|
||||
AA_EXEC_ERROR_MESSAGE = $(error ${nl}\
|
||||
************************************************************************${nl}\
|
||||
|
@ -166,7 +166,7 @@ SRC+=syscall_sysctl.c
|
|||
endif
|
||||
|
||||
# Only do xattrs_profile test if we have the required setfattr binary
|
||||
ifneq (,$(shell which -s setfattr && echo TRUE))
|
||||
ifneq (,$(shell command -v setfattr))
|
||||
SRC+=xattrs_profile.c
|
||||
else
|
||||
$(warning ${nl}\
|
||||
|
@ -295,7 +295,7 @@ TESTS=aa_exec \
|
|||
nfs
|
||||
|
||||
# Only do xattrs_profile test if we have the required setfattr binary
|
||||
ifneq (,$(shell which -s setfattr && echo TRUE))
|
||||
ifneq (,$(shell command -v setfattr))
|
||||
TESTS+=xattrs_profile
|
||||
endif
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ runchecktest "Complain mode profile (file exec no permission entry)" pass exec e
|
|||
|
||||
# This test will fail on a kernel that doesn't have
|
||||
# https://lists.ubuntu.com/archives/apparmor/2024-August/013338.html applied
|
||||
genprofile -C $(which echo):cx
|
||||
genprofile -C $(command -v echo):cx
|
||||
runchecktest "Complain mode profile (file exec cx permission entry)" pass exec echo PASS
|
||||
|
|
Loading…
Add table
Reference in a new issue