Description
I'm investigating a new wrapper around the toolchain bootstrap scripts, I'd like some input on the various modes the toolchain can operate in.
The "build" mode can be one of Auto
, Fast
, Force
, Never
. Generally auto will try and get a toolchain as fast as possible and ideally should be the default going forward.
The archive is a path to a toolchain.tar.gz
, and will take precedence over locally built/downloaded packages.
A new feature will allow automatic updating of the manifest files. This is future looking and likely won't be in V1.
There is also a global cache flag. It doesn't affect the overall behavior of the tools, just short-circuits certain build steps using pre-built parts available locally in the dev environment.
Background:
The prototype of the wrapper tool currently lives inside a new toolchainV2.mk
which can fully replace the existing toolchain.mk
. It calls a go tool which in turns calls the existing toolchain scripts.
Currently my intent is to leave the toolchain scripts unmodified. Future iterations of the tool can move logic out of the shell scripts into the go tool to simplify the process. The tool will examine the local environment and decide the optimal set of operations needed to generate a toolchain: downloading, building the raw bootstrap, and building he official rpms.
The go tool as it currently exists is not suitable for direct calling, since its a wrapper for the scripts it still needs to pass the dozens of parameters through to them, meaning it has a lot of parameters currently. Instead it provides a make
recipe for producing the toolchain .rpms the same way the existing toolchain.mk
does.
Does the table make sense? Any suggestions for changing the behavior?
Old table version
| Mode:Auto | Mode:Fast | Mode:Force | Mode:Never | Archive | Update Manifest | | Behavior | |----------- |----------- |------------ |------------ |--------- |----------------- |--- |---------------------------------------------------------------------------------------------------------------------------------- | | ✅ | ⛔ | ⛔ | ⛔ | ✅ | ✅ | | Manifest: Update from ArchiveDownload: NO
Rebuild: NO | | ✅ | ⛔ | ⛔ | ⛔ | ✅ | ⛔ | | Manifest: Toolkit
Download: NO
Rebuild: NO | | ✅ | ⛔ | ⛔ | ⛔ | ⛔ | ✅ | | Manifest: If './SPECS' available, use local, otherwise latest on PMC
Download: Any without a './SPEC'
Rebuild: Any missing | | ✅ | ⛔ | ⛔ | ⛔ | ⛔ | ⛔ | | Manifest: Toolkit
Download: All matching
Rebuild: Any missing | | ⛔ | ✅ | ⛔ | ⛔ | ✅ | ✅ | | INVALID (can't build & use archive) | | ⛔ | ✅ | ⛔ | ⛔ | ✅ | ⛔ | | INVALID (can't build & use archive) | | ⛔ | ✅ | ⛔ | ⛔ | ⛔ | ✅ | | Manifest: Update from './SPECS', never PMC
Download: Any available from PMC
Rebuild: Any missing after download | | ⛔ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ | | Manifest: Toolkit
Download: All matching
Rebuild: Any missing | | Mode:Auto | Mode:Fast | Mode:Force | Mode:Never | Archive | Update Manifest | | Behavior | | ⛔ | ⛔ | ✅ | ⛔ | ✅ | ✅ | | INVALID (can't build & use archive) | | ⛔ | ⛔ | ✅ | ⛔ | ✅ | ⛔ | | INVALID (can't build & use archive) | | ⛔ | ⛔ | ✅ | ⛔ | ⛔ | ✅ | | Manifest: Update from './SPECS', never PMC
Download: NO
Rebuild: Everything | | ⛔ | ⛔ | ✅ | ⛔ | ⛔ | ⛔ | | Manifest: Toolkit
Download: NO
Rebuild: Everything | | ⛔ | ⛔ | ⛔ | ✅ | ✅ | ✅ | | Manifest: Update from Archive
Download: NO
Rebuild: NO | | ⛔ | ⛔ | ⛔ | ✅ | ✅ | ⛔ | | Manifest: Toolkit
Download: NO
Rebuild: NO | | ⛔ | ⛔ | ⛔ | ✅ | ⛔ | ✅ | | Manifest: Latest on PMC
Download: YES
Rebuild: NO | | ⛔ | ⛔ | ⛔ | ✅ | ⛔ | ⛔ | | Manifest: Toolkit
Download: YES
Rebuild: NO | | ⛔ | ⛔ | ⛔ | ⛔ | 🎲 | 🎲 | | INVALID |
Mode | Archive | Update Manifest | Manifest | Download | Rebuild | |
---|---|---|---|---|---|---|
Auto | ✅ | ✅ | 🟢 aka never 1 |
🔴 aka never 1 |
🔴 aka never 1 |
|
Auto | ✅ | ⛔ | 🟢 aka never 2 |
🔴 aka never 2 |
🔴 aka never 2 |
|
Auto | ⛔ | ✅ | 🟢 aka fast 3 |
🟡 aka fast 3 |
🟡 aka fast 3 |
|
Auto | ⛔ | ⛔ | 🔴 aka fast 4 |
🟢 aka fast 4 |
🟡 aka fast 4 |
|
Fast | ✅ | ✅ | 🚫 Invalid, can't build and use archive | 🚫 | 🚫 | |
Fast | ✅ | ⛔ | 🚫 Invalid, can't build and use archive | 🚫 | 🚫 | |
Fast | ⛔ | ✅ | 🟢 Use files in ./SPECS, otherwise PMC ** | 🟡 Yes (missing *.spec version only) * | 🟡 Yes (local *.spec only) * | |
Fast | ⛔ | ⛔ | 🔴 Use manifest from toolkit | 🟢 Yes | 🟢 Yes, "delta build" | |
Force | ✅ | ✅ | 🚫 Invalid, can't build and use archive | 🚫 | 🚫 | |
Force | ✅ | ⛔ | 🚫 Invalid, can't build and use archive | 🚫 | 🚫 | |
Force | ⛔ | ✅ | 🟢 Use files in ./SPECS, | 🔴 NO | 🟢 Yes, "full build" | |
Force | ⛔ | ⛔ | 🔴 Use manifest from toolkit | 🔴 NO | 🟢 Yes, "full build" | |
Never | ✅ | ✅ | 🟢 Use contents of archive | 🔴 NO | 🔴 NO | |
Never | ✅ | ⛔ | 🔴 Use manifest from toolkit | 🔴 NO | 🔴 NO | |
Never | ⛔ | ✅ | 🟢 Use latest on PMC | 🟢 Yes | 🔴 NO | |
Never | ⛔ | ⛔ | 🔴 Use manifest from toolkit | 🟢 Yes | 🔴 NO |
*
Download from PMC anything that is either missing locally, or has a version missmatch. However, update manifest is on so local .spec versions should match... Is this desired behavior? Or should we force rebuilding local copies somehow?
**
Manifest will prioritize versions found in ./SPECS
over PMC, but will fill in any gaps on PMC. This feels like it could break?