diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2025-11-20 20:53:34 +0800 |
|---|---|---|
| committer | Yi Zhao <yi.zhao@windriver.com> | 2025-11-21 11:21:20 +0800 |
| commit | 612f8bcbcc63e0682500660ff5af2c6c337134a6 (patch) | |
| tree | 9fee5bd9ac9e1736e4246be0c3198939039d5a7c | |
| parent | c6398215c07c88f873dd388a7290726ad00ca46a (diff) | |
| download | meta-selinux-612f8bcbcc63e0682500660ff5af2c6c337134a6.tar.gz | |
Originally, direct_url.json contains build path and it was removed
to fix buildpaths issue, but the hash of direct_url.json in RECORD
was not updated. In order to support reproducible builds [1], this
commit manually updates hash of direct_url.json in RECORD after
build path was removed
[1] https://reproducible-builds.org/
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
| -rw-r--r-- | recipes-security/selinux/libselinux-python_3.9.bb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/recipes-security/selinux/libselinux-python_3.9.bb b/recipes-security/selinux/libselinux-python_3.9.bb index a4de036..97e0043 100644 --- a/recipes-security/selinux/libselinux-python_3.9.bb +++ b/recipes-security/selinux/libselinux-python_3.9.bb | |||
| @@ -51,9 +51,19 @@ do_install() { | |||
| 51 | PYLIBVER='python${PYTHON_BASEVERSION}' \ | 51 | PYLIBVER='python${PYTHON_BASEVERSION}' \ |
| 52 | PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' | 52 | PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' |
| 53 | 53 | ||
| 54 | dicect_url_json="${D}${PYTHON_SITEPACKAGES_DIR}/selinux-${PV}.dist-info/direct_url.json" | ||
| 55 | oldhash=$(nativepython3 -c "from pip._internal.operations.install.wheel import rehash; hash,len = rehash('$dicect_url_json'); print(f'{hash},{len}')") | ||
| 56 | |||
| 54 | # Fix buildpaths issue | 57 | # Fix buildpaths issue |
| 55 | sed -i -e 's,${WORKDIR},,g' \ | 58 | sed -i -e 's,${WORKDIR},,g' \ |
| 56 | ${D}${PYTHON_SITEPACKAGES_DIR}/selinux-${PV}.dist-info/direct_url.json | 59 | $dicect_url_json |
| 60 | |||
| 61 | newhash=$(nativepython3 -c "from pip._internal.operations.install.wheel import rehash; hash,len = rehash('$dicect_url_json'); print(f'{hash},{len}')") | ||
| 62 | |||
| 63 | # Update hash of direct_url.json in RECORD after build path was removed | ||
| 64 | sed -i -e "s/$oldhash/$newhash/g" \ | ||
| 65 | ${D}${PYTHON_SITEPACKAGES_DIR}/selinux-${PV}.dist-info/RECORD | ||
| 66 | |||
| 57 | } | 67 | } |
| 58 | 68 | ||
| 59 | BBCLASSEXTEND += "native" | 69 | BBCLASSEXTEND += "native" |
