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-oraclelinux.sh #2820

Merged

Conversation

norio-nomura
Copy link
Contributor

@norio-nomura norio-nomura commented Oct 29, 2024

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

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

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

        OL<major version>U<minor version>_<arch>-kvm[-cloud]-b<build number>.qcow2

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

    OL8:
          x86_64: https://yum.oracle.com/templates/OracleLinux/ol8-template.json
          aarch64: https://yum.oracle.com/templates/OracleLinux/ol8_aarch64-cloud-template.json
          
        OL9:
          x86_64: https://yum.oracle.com/templates/OracleLinux/ol9-template.json
          aarch64: https://yum.oracle.com/templates/OracleLinux/ol9_aarch64-cloud-template.json

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

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

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

Flags:
  --version-major <major version>  Use the specified Oracle Linux <major version>.
                                   The major version must be 7+ for x86_64 or 8+ for aarch64.
  -h, --help                       Print this help message

This PR aims to add Oracle Linux support as per #1347.
This change will likely conflict with #2811. After one is merged, the other will need to be rebased.

@norio-nomura norio-nomura marked this pull request as ready for review October 29, 2024 02:13
@AkihiroSuda AkihiroSuda added this to the v1.0 milestone Oct 29, 2024
@AkihiroSuda AkihiroSuda added guest/el8 Guest: CentOS 8 / Rocky Linux 8 / Alma Linux 8 guest/el9 labels Oct 29, 2024
@AkihiroSuda AkihiroSuda mentioned this pull request Oct 29, 2024
10 tasks
@norio-nomura norio-nomura force-pushed the update-template-oraclelinux.sh branch from 79e269e to cf682fd Compare October 30, 2024 00:12
```console
$ hack/update-template-oraclelinux.sh
update-template-oraclelinux.sh: Update the Oracle Linux image location in the specified templates

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

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

        OL<major version>U<minor version>_<arch>-kvm[-cloud]-b<build number>.qcow2

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

    OL8:
          x86_64: https://yum.oracle.com/templates/OracleLinux/ol8-template.json
          aarch64: https://yum.oracle.com/templates/OracleLinux/ol8_aarch64-cloud-template.json

        OL9:
          x86_64: https://yum.oracle.com/templates/OracleLinux/ol9-template.json
          aarch64: https://yum.oracle.com/templates/OracleLinux/ol9_aarch64-cloud-template.json

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

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

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

Flags:
  --version-major <major version>  Use the specified Oracle Linux <major version>.
                                   The major version must be 7+ for x86_64 or 8+ for aarch64.
  -h, --help                       Print this help message
```

Signed-off-by: Norio Nomura <[email protected]>
…_key_for_image_kernel` functions

The cache should operate on the original location in template.

Signed-off-by: Norio Nomura <[email protected]>
…`release` to `minor version`

Signed-off-by: Norio Nomura <[email protected]>
@norio-nomura norio-nomura force-pushed the update-template-oraclelinux.sh branch from cf682fd to 2cba996 Compare October 30, 2024 00:15
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

@@ -1,5 +1,5 @@
# This template requires Lima v0.9.0 or later.
# Oracle image licence: https://www.oracle.com/downloads/licenses/oracle-linux-license.html
# Oracle image license: https://www.oracle.com/downloads/licenses/oracle-linux-license.html
Copy link
Member

Choose a reason for hiding this comment

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

This is not a "typo" in British English though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't know. Thanks.

@AkihiroSuda AkihiroSuda merged commit f93c601 into lima-vm:master Oct 30, 2024
28 checks passed
@norio-nomura norio-nomura deleted the update-template-oraclelinux.sh branch October 30, 2024 13:57
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