Bug 13259 - Switch SDK to be a self extracting python script instead of a self extracting shell script
Summary: Switch SDK to be a self extracting python script instead of a self extracting...
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 0.0.0
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Colin McAllister
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-04-02 15:16 UTC by Joshua Watt
Modified: 2025-05-13 12:02 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)