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

Add hack/update-template-opensuse.sh #2852

Merged

Conversation

norio-nomura
Copy link
Contributor

$ hack/update-template-opensuse.sh
update-template-opensuse.sh: Update the openSUSE Linux image location in the specified templates

Usage:
  update-template-opensuse.sh [--version-major-minor (<major>.<minor>|current|stable|tumbleweed)|--version-major <major> --version-minor <minor>] <template.yaml>...

Description:
  This script updates the openSUSE Linux image location in the specified templates.
  Image location basename format:

    openSUSE-(Leap-<major minor version>|Tumbleweed)-Minimal-VM.<arch>-Cloud.qcow2

  Published openSUSE Linux image information is fetched from the following URLs:

    Leap:
          <major>.<minor>: https://download.opensuse.org/distribution/leap/<major>.<minor>/appliances/?jsontable
          current: https://download.opensuse.org/distribution/openSUSE-current/appliances/?jsontable
          stable: https://download.opensuse.org/distribution/openSUSE-stable/appliances/?jsontable

    Tumbleweed:
      x86_64: https://download.opensuse.org/tumbleweed/appliances/?jsontable
          not x86_64: https://download.opensuse.org/ports/<arch>/tumbleweed/appliances/?jsontable

  The downloaded files will be cached in the Lima cache directory.

Examples:
  Update the openSUSE Linux image location in templates/**.yaml:
  $ update-template-opensuse.sh templates/**.yaml

  Update the openSUSE Linux image location to version 15.6 in ~/.lima/opensuse/lima.yaml:
  $ update-template-opensuse.sh --version-major-minor 15.6 ~/.lima/opensuse/lima.yaml
  $ limactl factory-reset opensuse

  Update the openSUSE Linux image location to tumbleweed in ~/.lima/opensuse/lima.yaml:
  $ update-template-opensuse.sh --version-major-minor tumbleweed ~/.lima/opensuse/lima.yaml
  $ limactl factory-reset opensuse

Flags:
  --version-major-minor (<major>.<minor>|current|stable|tumbleweed) Use the specified <major>.<minor> version or
                                                                    aliases "current", "stable", or "tumbleweed".
                                                                    The <major>.<minor> version must be 15.0 or later.
  --version-major <major> --version-minor <minor>                   Use the specified <major> and <minor> version.
  -h, --help                                                        Print this help message

This PR aims to add openSUSE Linux support as per #1347.

…json}`

Avoid error if `Content-Type` header contains double quote.

Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
```console
$ hack/update-template-opensuse.sh
update-template-opensuse.sh: Update the openSUSE Linux image location in the specified templates

Usage:
  update-template-opensuse.sh [--version-major-minor (<major>.<minor>|current|stable|tumbleweed)|--version-major <major> --version-minor <minor>] <template.yaml>...

Description:
  This script updates the openSUSE Linux image location in the specified templates.
  Image location basename format:

    openSUSE-(Leap-<major minor version>|Tumbleweed)-Minimal-VM.<arch>-Cloud.qcow2

  Published openSUSE Linux image information is fetched from the following URLs:

    Leap:
          <major>.<minor>: https://download.opensuse.org/distribution/leap/<major>.<minor>/appliances/?jsontable
          current: https://download.opensuse.org/distribution/openSUSE-current/appliances/?jsontable
          stable: https://download.opensuse.org/distribution/openSUSE-stable/appliances/?jsontable

    Tumbleweed:
      x86_64: https://download.opensuse.org/tumbleweed/appliances/?jsontable
          not x86_64: https://download.opensuse.org/ports/<arch>/tumbleweed/appliances/?jsontable

  The downloaded files will be cached in the Lima cache directory.

Examples:
  Update the openSUSE Linux image location in templates/**.yaml:
  $ update-template-opensuse.sh templates/**.yaml

  Update the openSUSE Linux image location to version 15.6 in ~/.lima/opensuse/lima.yaml:
  $ update-template-opensuse.sh --version-major-minor 15.6 ~/.lima/opensuse/lima.yaml
  $ limactl factory-reset opensuse

  Update the openSUSE Linux image location to tumbleweed in ~/.lima/opensuse/lima.yaml:
  $ update-template-opensuse.sh --version-major-minor tumbleweed ~/.lima/opensuse/lima.yaml
  $ limactl factory-reset opensuse

Flags:
  --version-major-minor (<major>.<minor>|current|stable|tumbleweed) Use the specified <major>.<minor> version or
                                                                    aliases "current", "stable", or "tumbleweed".
                                                                    The <major>.<minor> version must be 15.0 or later.
  --version-major <major> --version-minor <minor>                   Use the specified <major> and <minor> version.
  -h, --help                                                        Print this help message
```

Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
@AkihiroSuda AkihiroSuda added this to the v1.0.1 milestone Nov 6, 2024
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit a194c50 into lima-vm:master Nov 7, 2024
28 of 29 checks passed
@AkihiroSuda AkihiroSuda mentioned this pull request Nov 7, 2024
10 tasks
@norio-nomura norio-nomura deleted the update-template-opensuse.sh branch November 7, 2024 02:48
@norio-nomura
Copy link
Contributor Author

Thanks! 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants