Bug 13259

Summary: Switch SDK to be a self extracting python script instead of a self extracting shell script
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Watt <JPEWhacker>
Component: Scripts and ToolsAssignee: Colin McAllister <colinmca242>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium CC: colinmca242, kergoth, randy.macleod, ross.burton
Version: 0.0.0   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Joshua Watt 2019-04-02 15:16:23 UTC
The current SDKs generated by Yocto are self extracting shell scripts, but they invoke a number of python scripts as part of the extraction process. Reworking the entire process in Python should aid in maintenance. In addition to this, a python script would be more portable to other platforms (e.g. Windows) than a shell script.
Comment 1 Christopher Larson 2022-08-25 15:38:54 UTC
This is a good idea. We could use PyOxidizer or similar to make it truly self-contained, too.
Comment 2 Joshua Watt 2022-08-25 15:45:26 UTC
My actual thought on how to do this is a bit simpler: There is a little know but very useful behavior of python that if you pass it a zip file that contians a file name __main__.py, it will extract the archive and execute the __main__.py program. These files are commonly given a .pyz extension in Windows, and for Unix, you can prefix the zip file with a "#! /usr/bin/env python3" because of how zip files are constructed (the TOC is actually at the end of the file).

The idea would be to include the normal SDK tar file in the zip archive, then rewrite the relocation portions into python and put the extraction + relocation in __main__.py.
Comment 3 Randy MacLeod 2023-04-21 18:45:45 UTC
Moved en masse from 4.2 to 4.3 by Randy.
Comment 4 Randy MacLeod 2024-10-31 15:09:20 UTC
Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy)