Skip to contentSkip to conversation

python2-dev: improve reproducibility

PATCH In review Dengke Du 2 participants 3 messages Jan 18, 2018

lore
Share & tools
lore

Dengke Du

author
#0 lore raw

cover python2-dev: improve reproducibility

The following changes since commit b9dcab772fd37ed8376a87d3194195e13ff52d10:

qemu: CVE-2017-17381 (2018-01-14 09:11:58 +0000)

are available in the git repository at:

https://github.com/DengkeDu/openembedded-core.git dengke/python2-dev
https://github.com//tree/dengke/python2-dev

Dengke Du (1):
python2-dev: improve reproducibility

 meta/recipes-devtools/python/python_2.7.13.bb | 4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
2.8.1
author
#1 lore raw

PATCH 1/1 python2-dev: improve reproducibility

oe-core has fixed it for python3, we can apply it to python2, the origin commit id:

    e21723bb9b6035714268eeab5f43e2d1cb798a0d

We can check it here:

http://git.openembedded.org/openembedded-core/commit/?id=e21723bb9b6035714268eeab5f43e2d1cb798a0d

---
 meta/recipes-devtools/python/python_2.7.13.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-devtools/python/python_2.7.13.bb +4 -0
index 754c029..8075204 100644
@@ -140,6 +140,10 @@ py_package_preprocess () {
 
 	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
 	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+		-e 's|${DEBUG_PREFIX_MAP}||g' \
+		-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+		-e 's:${RECIPE_SYSROOT}::g' \
+		-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
 		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
 		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
     python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
Signature · 1 line
2.8.1
#2 lore raw
Quoted 19 lines · Dengke Du

oe-core has fixed it for python3, we can apply it to python2, the origin commit id:

     e21723bb9b6035714268eeab5f43e2d1cb798a0d

We can check it here:

    http://git.openembedded.org/openembedded-core/commit/?id=e21723bb9b6035714268eeab5f43e2d1cb798a0d
---
  meta/recipes-devtools/python/python_2.7.13.bb | 4 ++++
  1 file changed, 4 insertions(+)
meta/recipes-devtools/python/python_2.7.13.bb +0 -0
index 754c029..8075204 100644

meta/recipes-devtools/python/python_2.7.13.bb py_package_preprocess () { · line 149

Quoted 10 lines
meta/recipes-devtools/python/python_2.7.13.bb +4 -0
@@ -140,6 +140,10 @@ py_package_preprocess () {
 
  	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
  	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+		-e 's|${DEBUG_PREFIX_MAP}||g' \
+		-e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+		-e 's:${RECIPE_SYSROOT}::g' \
+		-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
  		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
  		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
      python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py

There still build path issue,  use relative path to recompile _sysconfigdata.py

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=hongxu/reproduce&id=8c1fe6eb54d88b7dd3081b57e98f8cf3b5298045

//Hongxu