Files
linux-image-manager/lim/catalog.py
Kevin Veen-Birkenbach ca66b7ef78 feat(image): flash full disk images into LUKS; add Raspberry Pi OS
Support distributions that ship a full .img (Raspberry Pi OS, moode, RetroPie,
Manjaro ARM) rather than a rootfs tarball, by loop-mounting the image and
copying its boot + root partitions into a fresh LUKS container.

- distributions.yml/catalog.py/choosers.py: raspios catalog (lite64/desktop64/
  lite32 via the stable _latest redirects) + choose_raspios.
- plan.py: source_url override so a _latest redirect downloads under an .img.xz
  name that decompress_command recognises.
- transfer.py: transfer_disk_image (loop-mount -> repartition -> LUKS -> rsync
  copy with progress, cp fallback -> fix boot fstab); transfer_image gains
  interactive= and routes encrypted non-arch images here; download_image gains
  force_prompt.
- loopimg.py: losetup attach/detach/partition helper.
- fsutil.drop_fstab_mount + register_encrypted_root: replace a stock image's
  existing / fstab line instead of colliding with it.
- encryption.configure_encryption returns the onion address.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 17:57:29 +02:00

36 lines
771 B
Python

"""Read-only access to the image catalog (distributions.yml in the package)."""
from functools import cache
import yaml
from lim import config
CATALOG_PATH = config.CATALOG_PATH
@cache
def _load() -> dict:
with CATALOG_PATH.open() as handle:
return yaml.safe_load(handle)
def arch_rpi_images() -> dict[str, dict[str, str]]:
return _load()["arch_rpi_images"]
def manjaro_gnome_releases() -> dict[str, dict[str, str]]:
return _load()["manjaro_gnome_releases"]
def retropie_images() -> dict[str, dict[str, str]]:
return _load()["retropie_images"]
def raspios_images() -> dict[str, dict[str, str]]:
return _load()["raspios_images"]
def mkinitcpio_modules_by_rpi() -> dict[str, str]:
return _load()["mkinitcpio_modules_by_rpi"]