Skip to contentSkip to conversation

apparmor: fix Python install paths when target libdir != native libdir

PATCH Superseded Ross Burton 1 participant 1 message Jan 18, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 apparmor: fix Python install paths when target libdir != native libdir

---
 recipes-security/AppArmor/apparmor_2.12.bb      |  4 ++--
 recipes-security/AppArmor/files/py-libdir.patch | 13 +++++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)
recipes-security/AppArmor/apparmor_2.12.bb +2 -2
index 1e3a223..073b62d 100644
@@ -80,9 +80,9 @@ do_install () {
 	install -d ${D}/${INIT_D_DIR}
 	install -d ${D}/lib/apparmor
 		
-	oe_runmake -C ${B}/libraries/libapparmor DESTDIR="${D}" install
+	oe_runmake -C ${B}/libraries/libapparmor DESTDIR="${D}" PYLIBDIR=${PYTHON_SITEPACKAGES_DIR} install
 	oe_runmake -C ${B}/binutils DESTDIR="${D}" install
-	oe_runmake -C ${B}/utils DESTDIR="${D}" PYLIBDIR=${libdir} install
+	oe_runmake -C ${B}/utils DESTDIR="${D}" PYLIBDIR=${PYTHON_SITEPACKAGES_DIR} install
 	oe_runmake -C ${B}/parser DESTDIR="${D}" install
 	oe_runmake -C ${B}/profiles DESTDIR="${D}" install
 
recipes-security/AppArmor/files/py-libdir.patch +13 -0
index fc617fb..2b88e54 100644
@@ -4,6 +4,19 @@ python3-native's idea of $libdir may not match the target's $libdir.
 Upstream-Status: Pending
 Signed-off-by: Ross Burton <[email protected]>
 
+diff --git a/libraries/libapparmor/swig/python/Makefile.am b/libraries/libapparmor/swig/python/Makefile.am
+index 421acba9..d2b842a6 100644
+--- a/libraries/libapparmor/swig/python/Makefile.am
++++ b/libraries/libapparmor/swig/python/Makefile.am
+@@ -14,7 +14,7 @@ all-local: libapparmor_wrap.c setup.py
+ 	$(PYTHON) setup.py build
+ 
+ install-exec-local:
+-	$(PYTHON) setup.py install --root="/$(DESTDIR)" --prefix="$(prefix)"
++	$(PYTHON) setup.py install --root="/$(DESTDIR)" --prefix="$(prefix)" --install-lib="$(PYLIBDIR)"
+ 
+ clean-local:
+ 	if test -x "$(PYTHON)"; then $(PYTHON) setup.py clean; fi
 diff --git a/utils/Makefile b/utils/Makefile
 index 68f8c376..025f9da5 100644
 --- a/utils/Makefile
Signature · 1 line
2.11.0