blob: e7abd602c90c22b2898c645e823c487d9e9c9772 [file] [log] [blame]
Andrew Geisslerd1d22e62020-10-16 10:14:32 -05001From 5ed21abbef4d4c2983e70bd2868fb817150e883e Mon Sep 17 00:00:00 2001
2From: Armin Kuster <akuster808@gmail.com>
3Date: Sat, 3 Oct 2020 11:26:46 -0700
4Subject: [PATCH] Revert "profiles: Update 'make check' to select tools based
5 on USE_SYSTEM"
6
7This reverts commit 6016f931ebf7b61e1358f19453ef262d9d184a4e.
8
Andrew Geissler59125e02021-07-23 12:56:22 -04009Upstream-Status: Inappropriate [OE specific]
Andrew Geisslerd1d22e62020-10-16 10:14:32 -050010These changes cause during packaging with perms changing.
11
12Signed-off-by: Armin Kuster <akuster808@gmail.com>
13
14---
15 profiles/Makefile | 50 ++++++++++-------------------------------------
16 1 file changed, 10 insertions(+), 40 deletions(-)
17
18diff --git a/profiles/Makefile b/profiles/Makefile
19index ba47fc16..5384cb05 100644
20--- a/profiles/Makefile
21+++ b/profiles/Makefile
22@@ -35,49 +35,9 @@ EXTRAS_SOURCE=./apparmor/profiles/extras/
23 SUBDIRS=$(shell find ${PROFILES_SOURCE} -type d -print)
24 TOPLEVEL_PROFILES=$(filter-out ${SUBDIRS}, $(wildcard ${PROFILES_SOURCE}/*))
25
26-ifdef USE_SYSTEM
27- PYTHONPATH=
28- PARSER?=apparmor_parser
29- LOGPROF?=aa-logprof
30-else
31- # PYTHON_DIST_BUILD_PATH based on libapparmor/swig/python/test/Makefile.am
32- PYTHON_DIST_BUILD_PATH = ../libraries/libapparmor/swig/python/build/$$($(PYTHON) -c "import distutils.util; import platform; print(\"lib.%s-%s\" %(distutils.util.get_platform(), platform.python_version()[:3]))")
33- LIBAPPARMOR_PATH=../libraries/libapparmor/src/.libs/
34- LD_LIBRARY_PATH=$(LIBAPPARMOR_PATH):$(PYTHON_DIST_BUILD_PATH)
35- PYTHONPATH=../utils/:$(PYTHON_DIST_BUILD_PATH)
36- PARSER?=../parser/apparmor_parser
37- # use ../utils logprof
38- LOGPROF?=LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) PYTHONPATH=$(PYTHONPATH) $(PYTHON) ../utils/aa-logprof
39-endif
40-
41 # $(PWD) is wrong when using "make -C profiles" - explicitely set it here to get the right value
42 PWD=$(shell pwd)
43
44-.PHONY: test-dependencies
45-test-dependencies: __parser __libapparmor
46-
47-
48-.PHONY: __parser __libapparmor
49-__parser:
50-ifndef USE_SYSTEM
51- @if [ ! -f $(PARSER) ]; then \
52- echo "error: $(PARSER) is missing. Pick one of these possible solutions:" 1>&2; \
53- echo " 1) Test using the in-tree parser by building it first and then trying again. See the top-level README for help." 1>&2; \
54- echo " 2) Test using the system parser by adding USE_SYSTEM=1 to your make command." 1>&2; \
55- exit 1; \
56- fi
57-endif
58-
59-__libapparmor:
60-ifndef USE_SYSTEM
61- @if [ ! -f $(LIBAPPARMOR_PATH)libapparmor.so ]; then \
62- echo "error: $(LIBAPPARMOR_PATH)libapparmor.so is missing. Pick one of these possible solutions:" 1>&2; \
63- echo " 1) Build against the in-tree libapparmor by building it first and then trying again. See the top-level README for help." 1>&2; \
64- echo " 2) Build against the system libapparmor by adding USE_SYSTEM=1 to your make command." 1>&2; \
65- exit 1; \
66- fi
67-endif
68-
69 local:
70 for profile in ${TOPLEVEL_PROFILES}; do \
71 fn=$$(basename $$profile); \
72@@ -109,6 +69,16 @@ else
73 Q=
74 endif
75
76+ifndef PARSER
77+# use system parser
78+PARSER=../parser/apparmor_parser
79+endif
80+
81+ifndef LOGPROF
82+# use ../utils logprof
83+LOGPROF=PYTHONPATH=../utils $(PYTHON) ../utils/aa-logprof
84+endif
85+
86 .PHONY: docs
87 # docs: should we have some here?
88 docs:
89--
902.17.1
91