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-rocky.sh #2806

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

norio-nomura
Copy link
Contributor

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

Usage:
  update-template-rocky.sh [--version-major <major version>] <template.yaml>...

Description:
  This script updates the Rocky Linux image location in the specified templates.
  If the image location in the template contains a minor version, release date, and job id in the URL,
  the script replaces it with the latest available minor version, release date, and job id.

  Image location basename format:

    Rocky-<major version>-GenericCloud[.latest|-<type>.latest|-<major version>.<minor version>-<date>.<job id?>].<arch>.qcow2

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

    https://dl.rockylinux.org/pub/rocky/<major version>/images/<arch>/

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

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

  Update the Rocky Linux image location in ~/.lima/rocky/lima.yaml:
  $ update-template-rocky.sh ~/.lima/rocky/lima.yaml
  $ limactl factory-reset rocky

  Update the Rocky Linux image location to major version 9 in ~/.lima/rocky/lima.yaml:
  $ update-template-rocky.sh --version-major 9 ~/.lima/rocky/lima.yaml
  $ limactl factory-reset rocky

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

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

```console
$ hack/update-template-rocky.sh
update-template-rocky.sh: Update the Rocky Linux image location in the specified templates

Usage:
  update-template-rocky.sh [--version-major <major version>] <template.yaml>...

Description:
  This script updates the Rocky Linux image location in the specified templates.
  If the image location in the template contains a minor version, release date, and job id in the URL,
  the script replaces it with the latest available minor version, release date, and job id.

  Image location basename format:

    Rocky-<major version>-GenericCloud[.latest|-<type>.latest|-<major version>.<minor version>-<date>.<job id?>].<arch>.qcow2

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

    https://dl.rockylinux.org/pub/rocky/<major version>/images/<arch>/

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

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

  Update the Rocky Linux image location in ~/.lima/rocky/lima.yaml:
  $ update-template-rocky.sh ~/.lima/rocky/lima.yaml
  $ limactl factory-reset rocky

  Update the Rocky Linux image location to major version 9 in ~/.lima/rocky/lima.yaml:
  $ update-template-rocky.sh --version-major 9 ~/.lima/rocky/lima.yaml
  $ limactl factory-reset rocky

Flags:
  --version-major <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 force-pushed the update-template-rocky.sh branch from e2212ad to 81f037f Compare October 25, 2024 22:13
@AkihiroSuda AkihiroSuda added this to the v1.0 milestone Oct 26, 2024
@AkihiroSuda AkihiroSuda added guest/el8 Guest: CentOS 8 / Rocky Linux 8 / Alma Linux 8 guest/el9 labels Oct 26, 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 54125da into lima-vm:master Oct 26, 2024
28 checks passed
@norio-nomura norio-nomura deleted the update-template-rocky.sh branch October 26, 2024 10:01
@norio-nomura
Copy link
Contributor Author

Thanks! 🙏🏻

@AkihiroSuda AkihiroSuda mentioned this pull request Oct 29, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guest/el8 Guest: CentOS 8 / Rocky Linux 8 / Alma Linux 8 guest/el9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants