Conversation
Extend buildRootfs with a cloudImgFormat parameter to support extracting from qcow2 images using libguestfs-with-appliance. Add a debian-13 distro entry fetching the genericcloud qcow2 from cloud.debian.org. Unfortunately we have to restrict to x86_64-linux because libguestfs-appliance is not available on aarch64 in nixpkgs.
Generalize forEachUbuntuImage to forEachImage and iterates over both ubuntu and debian distros from nix-vm-test.
Extract the URL + sha256 pairs from lib/container-test-driver/distros.nix into lib/container-test-driver/images.json. This should make it easier to update cloud image versions in the future.
Add a new cloudImgFormat = "disk-tarball" path to buildRootfs that unpacks Debian's *-genericcloud-*.tar.xz, extracts the largest GPT partition with sfdisk + dd, and dumps its ext4 contents. All required tools are cross-architecture in nixpkgs, unlike the previous qcow2 path that depended on libguestfs-with-appliance (which is x86_64 only). Switch debian-13 over to the new format and add aarch64-linux to its images.json entry. The qcow2 branch stays in place for future distros that only publish qcow2.
The update script is modeled on numtide/nix-vm-test's scripts/update-images.py but adapted to our needs: Ubuntu *-root.tar.xz rootfs tarballs instead of qcow2 disk images, Debian genericcloud instead of generic.
Run tools/update-images.py on a Monday-morning cron and open a PR with any URL/hash diffs, mirroring update-nix-version.yml.
aea2801 to
17df131
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add container and VM tests for Fedora 43.
Unfortunately we have to restrict to x86_64-linux because libguestfs-appliance is not available on aarch64 in nixpkgs.
Requires numtide/nix-vm-test#169