Add bt-aplinfo: write the Proxmox appliance index for assembled templates #3

Merged
marcos-mendez merged 4 commits from feat/bt-aplinfo into 19.x 2026-09-26 13:30:28 -03:00
marcos-mendez commented 2026-09-26 13:28:33 -03:00 (Migrated from github.com)

Adds bt-aplinfo, the generator of the Proxmox appliance index (aplinfo.dat, aplinfo.dat.gz, aplinfo.dat.asc), with its logic in bin/aplinfo-lib and tests in tests/aplinfo, following the bt-layer layout.

  • One record per template keel assemble writes (debian-13-keel-<app>_<version>-<revision>_<arch>.tar.zst): Package, Version, OS and Architecture from the file name, Location from the base URL, sha512sum from the file (checked against the .sha512 sidecar), Description from the product's pve-description or README title, TurnKey field order.
  • Every record is validated the way PVE::APLInfo::read_aplinfo_from_fh reads it before the index is assembled.
  • gzip -n -9 for a reproducible .gz; gpg --detach-sign --armor over aplinfo.dat when BT_GPGKEY is set. Without a key nothing is signed, a stale .asc is removed and the run says that pveam refuses an unsigned index. Signing stays off until the replacement signing subkey (Keel decision 0005) reaches the build host.
  • .tar.zst is accepted by pveam: pve-storage PVE/Storage.pm defines VZTMPL_EXT_RE_1 as .tar, .tar.gz, .tar.xz, .tar.zst, .tar.bz2, and PVE::APLInfo derives the template name from Location with that regex. Details and sources in docs/aplinfo.md.
  • tests/coverage.sh runs both suites under kcov. Measured locally with kcov 43: layer-lib 100 (183 lines), bt-layer 99, aplinfo-lib 100 (186 lines), bt-aplinfo 100 (47 lines). The gate stays at 99.
Adds `bt-aplinfo`, the generator of the Proxmox appliance index (`aplinfo.dat`, `aplinfo.dat.gz`, `aplinfo.dat.asc`), with its logic in `bin/aplinfo-lib` and tests in `tests/aplinfo`, following the bt-layer layout. - One record per template `keel assemble` writes (`debian-13-keel-<app>_<version>-<revision>_<arch>.tar.zst`): Package, Version, OS and Architecture from the file name, Location from the base URL, sha512sum from the file (checked against the `.sha512` sidecar), Description from the product's `pve-description` or README title, TurnKey field order. - Every record is validated the way `PVE::APLInfo::read_aplinfo_from_fh` reads it before the index is assembled. - `gzip -n -9` for a reproducible `.gz`; `gpg --detach-sign --armor` over `aplinfo.dat` when `BT_GPGKEY` is set. Without a key nothing is signed, a stale `.asc` is removed and the run says that pveam refuses an unsigned index. Signing stays off until the replacement signing subkey (Keel decision 0005) reaches the build host. - `.tar.zst` is accepted by pveam: pve-storage `PVE/Storage.pm` defines `VZTMPL_EXT_RE_1` as `.tar`, `.tar.gz`, `.tar.xz`, `.tar.zst`, `.tar.bz2`, and `PVE::APLInfo` derives the template name from Location with that regex. Details and sources in `docs/aplinfo.md`. - `tests/coverage.sh` runs both suites under kcov. Measured locally with kcov 43: layer-lib 100 (183 lines), bt-layer 99, aplinfo-lib 100 (186 lines), bt-aplinfo 100 (47 lines). The gate stays at 99.
Sign in to join this conversation.
No description provided.