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-centos-stream.sh #2794

Merged

Conversation

norio-nomura
Copy link
Contributor

$ hack/update-template-centos-stream.sh
update-template-centos-stream.sh: Update the CentOS Stream image location in the specified templates

Usage:
  update-template-centos-stream.sh [--version <version>] <template.yaml>...

Description:
  This script updates the CentOS Stream image location in the specified templates.
  If the image location in the template contains a release date in the URL, the script replaces it with the latest available date.

  Image location basename format: CentOS[Stream-GenericCloud-<version>-[latest|<date>.0].<arch>.qcow2

  Published CentOS Stream image information is fetched from the following URLs:

    https://cloud.centos.org/centos/<major version>-stream/<arch>/images/

  To parsing html, this script requires 'htmlq' or 'pup' command.
  The downloaded files will be cached in the Lima cache directory.

Examples:
  Update the CentOS Stream image location in templates/**.yaml:
  $ update-template-centos-stream.sh templates/**.yaml

  Update the CentOS Stream image location in ~/.lima/centos/lima.yaml:
  $ update-template-centos-stream.sh ~/.lima/centos/lima.yaml
  $ limactl factory-reset centos

  Update the CentOS Stream image location to 9-Stream in ~/.lima/centos/lima.yaml:
  $ update-template-centos-stream.sh --version 9-stream ~/.lima/centos/lima.yaml
  $ limactl factory-reset centos

Flags:
  --version <version>     Use the specified version. The version must be 8 or later.
  -h, --help              Print this help message

This PR aims to add CentOS Stream support as per #1347.

```console
$ hack/update-template-centos-stream.sh
update-template-centos-stream.sh: Update the CentOS Stream image location in the specified templates

Usage:
  update-template-centos-stream.sh [--version <version>] <template.yaml>...

Description:
  This script updates the CentOS Stream image location in the specified templates.
  If the image location in the template contains a release date in the URL, the script replaces it with the latest available date.

  Image location basename format: CentOS[Stream-GenericCloud-<version>-[latest|<date>.0].<arch>.qcow2

  Published CentOS Stream image information is fetched from the following URLs:

    https://cloud.centos.org/centos/<major version>-stream/<arch>/images/

  To parsing html, this script requires 'htmlq' or 'pup' command.
  The downloaded files will be cached in the Lima cache directory.

Examples:
  Update the CentOS Stream image location in templates/**.yaml:
  $ update-template-centos-stream.sh templates/**.yaml

  Update the CentOS Stream image location in ~/.lima/centos/lima.yaml:
  $ update-template-centos-stream.sh ~/.lima/centos/lima.yaml
  $ limactl factory-reset centos

  Update the CentOS Stream image location to 9-Stream in ~/.lima/centos/lima.yaml:
  $ update-template-centos-stream.sh --version 9-stream ~/.lima/centos/lima.yaml
  $ limactl factory-reset centos

Flags:
  --version <version>     Use the specified version. The version must be 8 or later.
  -h, --help              Print this help message
```

Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
@norio-nomura norio-nomura changed the title add update-template-centos-stream.sh add hack/update-template-centos-stream.sh Oct 24, 2024
@norio-nomura norio-nomura changed the title add hack/update-template-centos-stream.sh Add hack/update-template-centos-stream.sh Oct 24, 2024
@AkihiroSuda AkihiroSuda added this to the v1.0 milestone Oct 24, 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 cb0f1d3 into lima-vm:master Oct 24, 2024
28 checks passed
@AkihiroSuda AkihiroSuda mentioned this pull request Oct 24, 2024
10 tasks
@norio-nomura norio-nomura deleted the update-template-centos-stream.sh branch October 24, 2024 06:54
@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