Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clr-installer fails to run on non-clearlinux distro's due to hardcoded VERSION_ID check #812

Open
ThaDaVos opened this issue Aug 17, 2024 · 0 comments
Labels
bug_triage Newly report and needs review

Comments

@ThaDaVos
Copy link

Describe the bug
A clear and concise description of what the bug is.

I tried to use the clr-installer on my Ubuntu 22.04 distro to create a custom installation iso of ClearLinux but at

if err := utils.ParseOSClearVersion(); err != nil {
it's querying for the ClearLinux version, but I am not running ClearLinux so it fails as regex at
versionExp := regexp.MustCompile(`VERSION_ID=([0-9][0-9]*)`)
does not support Ubuntu's format of the /usr/lib/os-release, which is:

PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

The difference is in the VERSION_ID as it's quoted on Ubuntu, at least on mine, and it's just numeric on ClearLinux's version.

To Reproduce
Steps to reproduce the behavior:

  1. Build the clr-installer from source on Ubuntu
  2. Get copy of https://download.clearlinux.org/current/config/image/ according to https://community.clearlinux.org/t/how-to-build-the-official-style-iso-image/8419/7
  3. call clr-installer --config live-server.yaml
  4. See it fail

Expected behavior
A clear and concise description of what you expected to happen.
Or the installer should throw an error telling the OS is not supported (or that ClearLinux is only supported) or it should run just fine and create me the requested iso I want.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Clear Linux OS Version: [swupd info] N/A
  • Installer Version [clr-installer -v] 2.7.11
  • Platform: [hardware infomation] WSL2 with Ubuntu

Additional context
Add any other context about the problem here.

@ThaDaVos ThaDaVos added the bug_triage Newly report and needs review label Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug_triage Newly report and needs review
Projects
None yet
Development

No branches or pull requests

1 participant