recipetool: pypi: do not clobber SRC_URI checksums
PATCH 1/1 recipetool: pypi: do not clobber SRC_URI checksums
The pypi change:
"85a2a6f68af recipetool: create_buildsys_python: add pypi support" deleted all the SRC_URI variables, including the SRC_URI checksums. These are not generated by the pypi.bbclass (how could they be trusted?)
Without the checksum(s), we are vulnerable to a man-in-the-middle attack and zero checks on the validity of the downloaded tarball from pypi.org.
Fix by only setting S and SRC_URI to None.
--- scripts/lib/recipetool/create_buildsys_python.py | 5 ----- 1 file changed, 5 deletions(-)
scripts/lib/recipetool/create_buildsys_python.py +0 -5
@@ -172,11 +172,6 @@ class PythonRecipeHandler(RecipeHandler): # extravalues['SRC_URI(?:\[.*?\])?'] = None extravalues['S'] = None extravalues['SRC_URI'] = None - extravalues['SRC_URI[md5sum]'] = None - extravalues['SRC_URI[sha1sum]'] = None - extravalues['SRC_URI[sha256sum]'] = None - extravalues['SRC_URI[sha384sum]'] = None - extravalues['SRC_URI[sha512sum]'] = None classes.append('pypi')
Signature · 1 line
2.34.1
Quoted 27 lines
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Tim Orling
Sent: den 9 december 2023 02:37
To: [email protected]
Cc: Tim Orling <[email protected]>
Subject: [OE-core] [PATCH] recipetool: pypi: do not clobberSRC_URIchecksumsThe pypi change:
"85a2a6f68afrecipetool:create_buildsys_python: add pypi support" deleted all theSRC_URIvariables, including theSRC_URIchecksums. These are not generated by the pypi.bbclass (how could they be trusted?)Without the checksum(s), we are vulnerable to a man-in-the-middle attack and zero checks on the validity of the downloaded tarball from pypi.org.
Fix by only setting S and
SRC_URIto None.Signed-off-by Tim Orling <[email protected]>--- scripts/lib/recipetool/create_buildsys_python.py | 5 ----- 1 file changed, 5 deletions(-)scripts/lib/recipetool/create_buildsys_python.py +0
-0
scripts/lib/recipetool/create_buildsys_python.py class PythonRecipeHandler(RecipeHandler): · line 172
Quoted 1 line
scripts/lib/recipetool/create_buildsys_python.py +0
-0@@ -172,11 +172,6 @@ class PythonRecipeHandler(RecipeHandler): # extravalues['SRC_URI(?:\[.*?\])?'] = None
The TODO comment above should also be removed as it should not be done.
Quoted 11 lines
scripts/lib/recipetool/create_buildsys_python.py +0
-6extravalues['S'] = None extravalues['SRC_URI'] = None - extravalues['SRC_URI[md5sum]'] = None - extravalues['SRC_URI[sha1sum]'] = None - extravalues['SRC_URI[sha256sum]'] = None - extravalues['SRC_URI[sha384sum]'] = None - extravalues['SRC_URI[sha512sum]'] = None classes.append('pypi') --
Quoted 1 line
2.34.1
//Peter