diff mbox series

[meta-oe,PATCHv2] libpwquality: respect PYTHONSITEDIR

Message ID 20240111101802.34013-1-martin.jansa@gmail.com
State Accepted
Headers show
Series [meta-oe,PATCHv2] libpwquality: respect PYTHONSITEDIR | expand

Commit Message

Martin Jansa Jan. 11, 2024, 10:18 a.m. UTC
* fixes installed-vs-shipped e.g. in multilib builds with libdir set to /usr/lib32:

ERROR: QA Issue: lib32-libpwquality: Files/directories were installed but not shipped in any package:
  /usr/lib/python3.11/site-packages/pwquality.cpython-311-arm-linux-gnueabi.so
  /usr/lib/python3.11/site-packages/pwquality-1.4.5-py3.11.egg-info
  /usr/lib/python3.11/site-packages/pwquality-1.4.5-py3.11.egg-info/SOURCES.txt
  /usr/lib/python3.11/site-packages/pwquality-1.4.5-py3.11.egg-info/PKG-INFO
  /usr/lib/python3.11/site-packages/pwquality-1.4.5-py3.11.egg-info/dependency_links.txt
  /usr/lib/python3.11/site-packages/pwquality-1.4.5-py3.11.egg-info/top_level.txt
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
lib32-libpwquality: 6 installed and not shipped files. [installed-vs-shipped]

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
v2: Update Upstream-Status to Backport and use slightly updated
    version already merged upstream

 ...02-Makefile.am-respect-PYTHONSITEDIR.patch | 26 +++++++++++++++++++
 .../libpwquality/libpwquality_1.4.5.bb        |  5 ++--
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-extended/libpwquality/files/0002-Makefile.am-respect-PYTHONSITEDIR.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/libpwquality/files/0002-Makefile.am-respect-PYTHONSITEDIR.patch b/meta-oe/recipes-extended/libpwquality/files/0002-Makefile.am-respect-PYTHONSITEDIR.patch
new file mode 100644
index 0000000000..cd59a6d887
--- /dev/null
+++ b/meta-oe/recipes-extended/libpwquality/files/0002-Makefile.am-respect-PYTHONSITEDIR.patch
@@ -0,0 +1,26 @@ 
+From edc51ba1b446913232cdf2945f485392bca72dc7 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 3 Aug 2015 13:43:14 +0800
+Subject: [PATCH] Makefile.am: respect ${PYTHONSITEDIR}
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+---
+Upstream-Status: Backport [https://github.com/libpwquality/libpwquality/commit/5192eab011ada47b0157f8d0524bf5b18bba3bd0]
+
+ python/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 6e51744..0a3bad5 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -14,7 +14,7 @@ all-local:
+ 	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
+ 
+ install-exec-local:
+-	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root ${DESTDIR} --prefix=${prefix}
++	CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --root ${DESTDIR} --prefix=${prefix} --install-lib=$(pythonsitedir)
+ 
+ clean-local:
+ 	rm -rf py$(PYTHONREV)
diff --git a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
index 91afedcb67..4454496f6c 100644
--- a/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
+++ b/meta-oe/recipes-extended/libpwquality/libpwquality_1.4.5.bb
@@ -8,8 +8,9 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=6bd2f1386df813a459a0c34fde676fc2"
 DEPENDS = "cracklib python3-setuptools-native"
 
 SRC_URI = "git://github.com/libpwquality/libpwquality;branch=master;protocol=https \
-           file://0001-Use-setuptools-instead-of-distutils.patch \
-           "
+    file://0001-Use-setuptools-instead-of-distutils.patch \
+    file://0002-Makefile.am-respect-PYTHONSITEDIR.patch \
+"
 SRCREV = "5490e96a3dd6ed7371435ca5b3ccef98bdb48b5a"
 
 S = "${WORKDIR}/git"