This reduces the filtering and renaming of airgap images archives to make the update script and builder more resilient to upstream changes. Additionally, it reduces the code of the k3s builder.
···59596060- `ansible-later` has been removed because it was discontinued by the author.
61616262+- `k3s` airgap images passthru attributes have changed:
6363+ - `imagesList` was removed
6464+ - `airgapImages` was renamed to `airgap-images`
6565+ - `airgapImagesAmd64` was renamed to `airgap-images-amd64-tar-zst`
6666+ - `airgapImagesArm64` was renamed to `airgap-images-arm64-tar-zst`
6767+ - `airgapImagesArm` was renamed to `airgap-images-arm-tar-zst`
6868+6269- `stalwart-mail` since `0.13.0` "introduces a significant redesign of the MTA’s delivery and queueing subsystem". See [the upgrading announcement for the `0.13.0` release](https://github.com/stalwartlabs/stalwart/blob/89b561b5ca1c5a11f2a768b4a2cfef0f473b7a01/UPGRADING.md#upgrading-from-v012x-and-v011x-to-v013x).
63706471- Greetd and its original greeters (`tuigreet`, `gtkgreet`, `qtgreet`, `regreet`, `wlgreet`) were moved from `greetd` namespace to top level (`greetd.tuigreet` -> `tuigreet`, `greetd.greetd` -> `greetd`, etc). The original attrs are available for compatibility as passthrus of `greetd`, but will emit a warning. They will be removed in future releases.
+1-9
nixos/tests/k3s/airgap-images.nix
···2222 "--disable servicelb"
2323 "--disable traefik"
2424 ];
2525- images = [ k3s.airgapImages ];
2525+ images = [ k3s.airgap-images ];
2626 };
2727 };
28282929 testScript = ''
3030- import json
3131-3232- start_all()
3330 machine.wait_for_unit("k3s")
3431 machine.wait_until_succeeds("journalctl -r --no-pager -u k3s | grep \"Imported images from /var/lib/rancher/k3s/agent/images/\"")
3535- images = json.loads(machine.succeed("crictl img -o json"))
3636- image_names = [i["repoTags"][0] for i in images["images"]]
3737- with open("${k3s.imagesList}") as expected_images:
3838- for line in expected_images:
3939- assert line.rstrip() in image_names, f"The image {line.rstrip()} is not present in the airgap images archive"
4032 '';
4133 }
4234)
···8383SHA256_HASHES="\
8484$($CURL "https://github.com/k3s-io/k3s/releases/download/v${K3S_VERSION}/sha256sum-amd64.txt")
8585$($CURL "https://github.com/k3s-io/k3s/releases/download/v${K3S_VERSION}/sha256sum-arm64.txt")
8686-$($CURL "https://github.com/k3s-io/k3s/releases/download/v${K3S_VERSION}/sha256sum-arm.txt")
8787-$($CURL "https://github.com/k3s-io/k3s/releases/download/v${K3S_VERSION}/k3s-images.txt" | sha256sum | cut -d' ' -f1) k3s-images.txt"
8686+$($CURL "https://github.com/k3s-io/k3s/releases/download/v${K3S_VERSION}/sha256sum-arm.txt")"
88878988# Get all airgap images files associated with this release
9089IMAGES_ARCHIVES=$($CURL "https://api.github.com/repos/k3s-io/k3s/releases/tags/v${K3S_VERSION}" | \
9191- # Filter the assets so that only zstd archives and text files that have "images" in their name remain
9292- jq -r '.assets[] | select(.name | (contains("images") and (endswith(".tar.zst") or endswith("k3s-images.txt")))) |
9393- "\(.name) \(.browser_download_url)"')
9090+ # Filter the assets for airgap images archives
9191+ jq -r '.assets[] | select(.name | test("^k3s-airgap-images-.*\\.tar\\.")) | "\(.name) \(.browser_download_url)"')
94929593# Create a JSON object for each airgap images file and prefetch all download URLs in the process
9694# Combine all JSON objects and write the result to images-versions.json
9795while read -r name url; do
9896 # Pick the right hash based on the name
9997 sha256=$(grep "$name" <<< "$SHA256_HASHES" | cut -d ' ' -f 1)
100100- # Remove the k3s- prefix and file endings
101101- clean_name=$(sed -e 's/^k3s-//' -e 's/\.tar\.zst//' -e 's/\.txt/-list/' <<< "$name")
9898+ # Remove the k3s prefix and replace all dots with hyphens
9999+ clean_name=$(sed -e "s/^k3s-//" -e "s/\./-/g" <<< "$name")
102100 jq --null-input --arg name "$clean_name" \
103101 --arg url "$url" \
104102 --arg sha256 "$sha256" \