Allow overriding /etc/os-release VERSION_ID #7432
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
This change enables installation on (some) not supported Red Hat-based distributions, without the additional burden of adding explicit support.
The new environment variable should be documented in the installation help.
Types of Changes
Distros in the same OS-family may have widely varying versioning systems, yet be closely related and would work if the version isn't misidentified; for instance installing RKE2 on Fedora works fine when the VERSION_ID is set to 8, while the default fallback value for unknown versions (7) doesn't work.
This change adds a new environment variable (INSTALL_RKE2_OVERRIDE_OS_VERSION_ID) which, if set, will override the value from /etc/os-release; if the variable is not set, installation behaves as normal.
Note: This change does not affect SUSE-like distros.
Verification
Testing
Linked Issues
#7429
User-Facing Change
Further Comments
For end-users the alternatives would either be patching /etc/os-release before installation, then restoring the value in /etc/os-release after installation completes, or manually editing install.sh after download.