mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-02 07:15:18 +00:00
utils/tests: add libaparmor swig library path
Similar to the profiles/ check using the python utilities, the tests for the python utilities were not including the path for the swig libapparmor library in the LD_LIBRARY_PATH variable, only in PYTHONPATH. This commit fixes that, renaming the variable used for the built libapparmor check. v2: - actually use the LIBAPPARMOR_PATH variable when defining LD_LIBRARY_PATH Bug: https://gitlab.com/apparmor/apparmor/-/issues/98 Signed-off-by: Steve Beattie <steve.beattie@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com> MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/586
This commit is contained in:
committed by
John Johansen
parent
a65078494e
commit
c63cc73672
@@ -29,7 +29,8 @@ ifdef USE_SYSTEM
|
|||||||
else
|
else
|
||||||
# PYTHON_DIST_BUILD_PATH based on libapparmor/swig/python/test/Makefile.am
|
# PYTHON_DIST_BUILD_PATH based on libapparmor/swig/python/test/Makefile.am
|
||||||
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]))")
|
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]))")
|
||||||
LD_LIBRARY_PATH=../../libraries/libapparmor/src/.libs/
|
LIBAPPARMOR_PATH=../../libraries/libapparmor/src/.libs/
|
||||||
|
LD_LIBRARY_PATH=$(LIBAPPARMOR_PATH):$(PYTHON_DIST_BUILD_PATH)
|
||||||
PYTHONPATH=..:$(PYTHON_DIST_BUILD_PATH)
|
PYTHONPATH=..:$(PYTHON_DIST_BUILD_PATH)
|
||||||
CONFDIR=$(CURDIR)
|
CONFDIR=$(CURDIR)
|
||||||
BASEDIR=../../profiles/apparmor.d
|
BASEDIR=../../profiles/apparmor.d
|
||||||
@@ -39,8 +40,8 @@ endif
|
|||||||
.PHONY: __libapparmor __parser
|
.PHONY: __libapparmor __parser
|
||||||
__libapparmor:
|
__libapparmor:
|
||||||
ifndef USE_SYSTEM
|
ifndef USE_SYSTEM
|
||||||
@if [ ! -f $(LD_LIBRARY_PATH)libapparmor.so ]; then \
|
@if [ ! -f $(LIBAPPARMOR_PATH)libapparmor.so ]; then \
|
||||||
echo "error: $(LD_LIBRARY_PATH)libapparmor.so is missing. Pick one of these possible solutions:" 1>&2; \
|
echo "error: $(LIBAPPARMOR_PATH)libapparmor.so is missing. Pick one of these possible solutions:" 1>&2; \
|
||||||
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; \
|
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; \
|
||||||
echo " 2) Build against the system libapparmor by adding USE_SYSTEM=1 to your make command." 1>&2; \
|
echo " 2) Build against the system libapparmor by adding USE_SYSTEM=1 to your make command." 1>&2; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
|
Reference in New Issue
Block a user