diff mbox series

[v2,meta-selinux,wrynose,2/2] libselinux-python: remove all RECORD files

Message ID 20260509045601.212844-2-zhixiong.chi@windriver.com
State New
Headers show
Series [v2,meta-selinux,wrynose,1/2] selinux-python: remove all RECORD files | expand

Commit Message

Zhixiong Chi May 9, 2026, 4:56 a.m. UTC
In order to support reproducible builds[1], we delete the RECORD
file for selinux-python recipe, please refer the details in the
patch comments for the selinux-python recipes.
Here we do the same behavior to keep the solution consistency.

[1] https://reproducible-builds.org/

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
---
 recipes-security/selinux/libselinux-python_3.10.bb | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/recipes-security/selinux/libselinux-python_3.10.bb b/recipes-security/selinux/libselinux-python_3.10.bb
index 98296e1..139e6df 100644
--- a/recipes-security/selinux/libselinux-python_3.10.bb
+++ b/recipes-security/selinux/libselinux-python_3.10.bb
@@ -53,18 +53,11 @@  do_install() {
         PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}'
 
     direct_url_json="${D}${PYTHON_SITEPACKAGES_DIR}/selinux-${PV}.dist-info/direct_url.json"
-    oldhash=$(nativepython3 -c "from pip._internal.operations.install.wheel import rehash; hash,len = rehash('$direct_url_json'); print(f'{hash},{len}')")
-
     # Fix buildpaths issue
-    sed -i -e 's,${WORKDIR},,g' \
-        $direct_url_json
-
-    newhash=$(nativepython3 -c "from pip._internal.operations.install.wheel import rehash; hash,len = rehash('$direct_url_json'); print(f'{hash},{len}')")
-
-    # Update hash of direct_url.json in RECORD after build path was removed
-    sed -i -e "s/$oldhash/$newhash/g" \
-        ${D}${PYTHON_SITEPACKAGES_DIR}/selinux-${PV}.dist-info/RECORD
+    sed -i -e 's,${WORKDIR},,g' $direct_url_json
 
+    # Remove RECORD file
+    find ${D} -path *.dist-info/RECORD -delete
 }
 
 BBCLASSEXTEND += "native"