Skip to content

v0.7.0 — Split archives and build deletion

Choose a tag to compare

@r0lfi r0lfi released this 16 Oct 09:44
· 13 commits to main since this release

Split image archives

Some environments refuse any single file of 1 GB or more. Under Image archive on a build page there is now Download split archive: the same podman save / docker save archive in parts of at most 900 MB, plus a script that puts it back together.

  • No compression, no conversion: the parts concatenated in order are byte for byte the original, with the same sha256, and podman load -i gives the same layers, metadata and tags.
  • The parts are byte ranges of the existing export, streamed on download — nothing is copied on disk and there are no temporary files. Download TAR is unchanged.
  • The server computes a checksum per part in one background read, with progress on the page, and re-verifies the archive against the checksum recorded at export time.
  • Each part, assemble-image.sh, <name>.tar.sha256 and <name>.parts.sha256 has its own download button.

On the receiving host only bash and coreutils are needed:

chmod +x assemble-image.sh
./assemble-image.sh          # check, reassemble, verify
./assemble-image.sh --load   # ... then podman load -i

The script checks every part's presence, size and sha256, checks free space, reassembles to a temporary file, verifies size and sha256 against the original and only then renames it. Missing or corrupt parts are named and nothing is written; an interrupted run cleans up after itself. Options: --load, --remove-parts, --force, --dir. See docs/split-archive.md.

Verified with a real Podman build (2 GB image → 3 parts → reassembled → loaded with the same image ID and run), on bash 5.2 and bash 4.2 (CentOS 7), and with shellcheck.

Delete builds

The Builds list has a Delete button per build. It removes the record, its export and air-gap archives, log, scan results and the image in the local runtime store. A file or image another build still uses is kept — a project deleted and created again builds the same reference and archive name. Running builds (and builds with a running scan) cannot be deleted. API: DELETE /api/builds/{id} (?remove_image=false keeps the image).

Fixes

  • Creating a project with the name of a deleted project failed with 500 Internal Server Error (UNIQUE constraint failed: projects.name). The deleted project now gives up its name; its builds stay listed under the name it had, marked (deleted project).
  • Builds left running by a stop, restart or upgrade showed as running forever. They are now marked failed at startup ("Interrupted: … Start the build again").
  • The web UI read the server's UTC timestamps as local time, so a fresh build showed as "2 h ago" at UTC+2.

Upgrade notes

  • A build that is running while you upgrade is marked failed when the new version starts — let running builds finish first.
  • New optional setting LAYERSMITH_SPLIT_PART_BYTES (default and maximum 900000000).
  • /api/health adds split-archive and delete-build to api_features. No database migration is needed: the new column is added automatically.
ghcr.io/r0lfi/layersmith:0.7.0