flatcar / Flatcar

Flatcar project repository for issue tracking, project documentation, etc.

Home Page:https://www.flatcar.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[RFE] Use adequate file extensions of downloadable resources

gdonval opened this issue · comments

Current situation

I've just wasted 2 hours thinking your ARM64 qemu image flatcar_production_qemu_uefi_image.img was completely borked.

The reason why is that .img has been traditionally associated with raw image files, with raw partitioning, which is further confirmed by different parts of documentation (for instance Customizing a Flatcar image even says how to mount such an image using losetup).

It is true that said part of documentation is followed by how to customize a qcow2 image or vmdk but unless you look at what the command actually does, it is very easy to dismiss it as "that doesn't apply to me, I have an .img file after all".

Impact

It's confusing and time-wasting. I only figured what was going on by doing less flatcar_production_qemu_uefi_image.img which started with QFI and figured what was going on (sc. QFI is the magic number identifying a .qcow2 image).

Ideal future situation

We should be able to figure out the format used at a glimpse (.img, .qcow2, .vmdk, .raw, etc.).

Implementation options

Please just rename flatcar_production_qemu_uefi_image.qcow2, flatcar_production_qemu_uefi_image.vmdk, etc. to match the actual file type.

Keep .img for raw partitions/images (using .bin is probably fine too) and use .raw for sysexts (as you've been doing).

That way everything is clearly identified at no cost I am aware of.

Additional information

I see no downside, especially as the scripts you provide are already copy-pasted (or templated) for each case. I.e. there is already a script to handle each file name separately, changing the extension there is trivial.