Skip to content

Add hack/update-template-alpine.sh #2811

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

Merged
merged 4 commits into from
Oct 30, 2024

Conversation

norio-nomura
Copy link
Contributor

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

This change does not include support for https://github.com/lima-vm/alpine-lima.

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

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

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

    <target vendor>_alpine-<version>-<arch>-<firmware>-<bootstrap>[-<machine>]-<image revision>.qcow2

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

    latest-stable: https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/cloud
    <major>.<minor>: https://dl-cdn.alpinelinux.org/alpine/v<major>.<minor>/releases/cloud

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

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

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

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

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

@AkihiroSuda AkihiroSuda added this to the v1.0 milestone Oct 28, 2024
@AkihiroSuda AkihiroSuda added the guest/alpine Guest: Alpine label Oct 28, 2024
_This change does not include support for `https://github.com/lima-vm/alpine-lima`._

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

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

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

    <target vendor>_alpine-<version>-<arch>-<firmware>-<bootstrap>[-<machine>]-<image revision>.qcow2

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

    latest-stable: https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/cloud
    <major>.<minor>: https://dl-cdn.alpinelinux.org/alpine/v<major>.<minor>/releases/cloud

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

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

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

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

Signed-off-by: Norio Nomura <[email protected]>

# Conflicts:
#	hack/update-template.sh
…cache_key_for_image_kernel` functions

The cache should operate on the original location in template.

Signed-off-by: Norio Nomura <[email protected]>
…validation

also add mention about `latest-stable` on `--version-major-minor`

Signed-off-by: Norio Nomura <[email protected]>
@norio-nomura norio-nomura force-pushed the update-template-alpine.sh branch from 2eb0885 to b56686c Compare October 30, 2024 14:00
@norio-nomura
Copy link
Contributor Author

rebased

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 21bbd82 into lima-vm:master Oct 30, 2024
28 checks passed
@norio-nomura norio-nomura deleted the update-template-alpine.sh branch October 30, 2024 15:59
@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
Labels
guest/alpine Guest: Alpine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants