You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cache-common-inc.sh: Prevent `download_to_cache` from rechecking URLs within 10 minutes
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: add `ubuntu_` prefix to some symbols
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: change some parameters order in some function
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: avoid reusing parameters for flags
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: add `ubuntu_{flavor,version}_from_location`
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: add `ubuntu_location_url_spec`
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: temporarily remove URL caching for refactoring
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: add `ubuntu_{arch,path_suffix}_from_location`
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: change some functions to return json
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: refactor checking `url_spec` condition
Signed-off-by: Norio Nomura <[email protected]>
hack/cache-common-inc.sh: change `download_to_cache` to use JSON instead of tsv
Since `unpacked/SHA256SUMS` has no `Content-Type`, the output of `curl -w` formatted as TSV causes `IFS=$'\t' read -r` to fail during parsing.
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: change downloading `unpacked/SHA256SUMS` to use cache
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: add `ubuntu_image_entry_for_image_kernel_flavor_version`
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: change to `ubuntu_image_entry_with_kernel_info`
that returns the image entry with the kernel info instead of returning the kernel info.
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: change to use `json_vars` for creating JSON
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: support version aliases: latest, lts
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: change to fully utilize `set -e`
Functions in this script assume error handling with 'set -e'.
To ensure 'set -e' works correctly:
- Use 'set +e' before assignments and '$(set -e; <function>)' to capture output without exiting on errors.
- Avoid calling functions directly in conditions to prevent disabling 'set -e'.
- Use 'shopt -s inherit_errexit' (Bash 4.4+) to avoid repeated 'set -e' in all '$(...)'.
Changes:
- Add `error_exit` and more error messages
- Remove `|| return` after `$(...)`
- Use `jq -e`
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: simplify script for `limactl edit --set`
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: add `image_entry` caching
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: check for `.kernel` in `image_entry` before adding `.kernel.cmdline`
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: add error message for when `com.ubuntu.cloud:released:download.json` does not contain a matching image
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: include `_with_kernel` to cache key if kernel location is not null
Signed-off-by: Norio Nomura <[email protected]>
cache-common-inc.sh: move `error_exit` from `update-template-ubuntu.sh`
Signed-off-by: Norio Nomura <[email protected]>
update-template.sh: add `update-template.sh` script to update all distributions
- Move functions common to all distributions here.
- Scripts for specific distributions accept distribution-specific options and perform additional actions.
Signed-off-by: Norio Nomura <[email protected]>
hack/(cache-common-inc|update-template*).sh: fix some comments
- change `return` to `print` in comments
- remove stale comment
Signed-off-by: Norio Nomura <[email protected]>
update-template-ubuntu.sh: rename the functions to indicate they are using location basename
Signed-off-by: Norio Nomura <[email protected]>
update-template-debian.sh: support updating Debian image information in template files
```console
$ hack/update-template-debian.sh
update-template-debian.sh: Update the Debian image location in the specified templates
Usage:
update-template-debian.sh [--backports[=<bool>]] [--daily[=<bool>]] [--timestamped[=<bool>]] [--version <version>] <template.yaml>...
Description:
This script updates the Debian 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.
If no flags are specified, the script uses the version from the image location basename in the template.
Image location basename format: debian-<version>[-backports]-genericcloud-<arch>[-daily][-<timestamp>].qcow2
Published Debian image information is fetched from the following URLs:
https://cloud.debian.org/images/cloud/<codename>[-backports]/[daily/](latest|<timestamp>)/debian-<version>[-backports]-genericcloud-<arch>[-daily][-<timestamp>].json
The downloaded JSON file will be cached in the Lima cache directory.
Examples:
Update the Debian image location in templates/**.yaml:
$ update-template-debian.sh templates/**.yaml
Update the Debian image location in ~/.lima/debian/lima.yaml:
$ update-template-debian.sh ~/.lima/debian/lima.yaml
Update the Debian image location to debian-13-genericcloud-<arch>.qcow2 in ~/.lima/debian/lima.yaml:
$ update-template-debian.sh --version trixie ~/.lima/debian/lima.yaml
Flags:
--backports[=<bool>] Use the backports image
The boolean value can be true, false, 1, or 0
--daily[=<bool>] Use the daily image
--timestamped[=<bool>] Use the timestamped image
--version <version> Use the specified version
The version can be a codename, version number, or alias (testing, stable, oldstable)
-h, --help Print this help message
```
Signed-off-by: Norio Nomura <[email protected]>
update-template{,-debian}.sh: fix update-template.sh did not sourced `update-template-debian.sh`
Signed-off-by: Norio Nomura <[email protected]>
update-template{,-debian,-ubuntu}.sh: add `limactl factory-reset` to examples in help
Signed-off-by: Norio Nomura <[email protected]>
0 commit comments