packaging/release/README.md
Candidate builds and release provenance
A candidate records the exact source used for validation; a release records an
approved annotated Git tag. A version number alone does not turn a candidate
into a release. v1.0.0 is the historical first-version baseline; v1.0.1 is
the first binary release. These tools never commit, create or move tags, push,
upload or approve publication.
The build formats share one canonical application export but retain their own binding pins and runtime stacks. Using the same input makes their source identities comparable; it does not make their binaries or desktop behavior identical.
One-command local preparation
prepare.py orchestrates one fresh frozen input, the Jammy AppImage, Noble deb
and native Arch builds, actual-package source verification/private mirror
import, a complete download listing and a local public-only snapshot. It does
not run an open-ended release audit or replace desktop acceptance testing.
Its presentation comes from tracked website/presentation.py, used by the
frozen website manager, not hand-written download JSON.
Prerequisites are Python 3.10+, Git and rootless Podman on the host, plus an
existing authorized Arch Distrobox equipped for the Arch recipe and bsdtar.
Mirror/website operations also need Python 3.10+, Git, unsquashfs and dpkg-deb
(and curl with --fetch), either on the host or in an already present tools
image. Extraction executables are preflighted before freezing/building, not
discovered missing after the long builds. No tools image is pulled/built, no
development environment is provisioned and no host packages are installed.
Builds use their normal recipes/networking;
private-mirror retrieval is independently offline unless --fetch is explicit.
See each AppImage, deb and
Arch recipe for prerequisites and compatibility limits.
Track all intended new files before freezing; untracked files are not inputs.
Choose a new candidate ID and a new run directory under packaging/build/:
| 1 | BOX=your-existing-arch-development-box |
| 2 | python3 packaging/release/prepare.py --mode candidate \ |
| 3 | --id candidate-example --output "$PWD/packaging/build/release-prep/candidate-example" \ |
| 4 | --arch-box "$BOX" --notes 'Initial release' --fetch |
If the host lacks the mirror/website tools, add --tools-image IMAGE naming an
already present, equipped Podman image. For example:
| 1 | : "${BOX:?Set BOX to an existing authorized Arch development box}" |
| 2 | : "${TOOLS_IMAGE:?Set TOOLS_IMAGE to an already present equipped image}" |
| 3 | python3 packaging/release/prepare.py --mode candidate \ |
| 4 | --id candidate-example --output "$PWD/packaging/build/release-prep/candidate-example" \ |
| 5 | --arch-box "$BOX" --tools-image "$TOOLS_IMAGE" --notes 'Initial release' --fetch |
This inspects/pins the local image ID and preflights its tools with
--pull=never; it never falls back to pulling or building an image. Catalog
preflight and every mirror/manager command use that image, while freezing,
source-input verification and package builds remain on the host/normal builders.
The same absolute checkout path is mounted read-write with --userns=keep-id.
Container HOME/XDG state and temporary files live in its disposable /tmp
tmpfs; host Podman HOME/XDG/storage settings are unchanged. SELinux container
label separation is disabled for this explicit bind mount instead of relabeling
the checkout. The image is trusted tool code with write access to that checkout.
All tools-image commands use --network=none, except actual mirror imports
with explicit --fetch, which use Podman's default networking. Preflight,
verification and website snapshotting stay offline even when --fetch is set.
Extra --*-archive / --*-source-dir inputs must be real directories beneath
the checkout (no external paths or symlink aliases); place selected offline
inputs there before running. No unrelated host directories are mounted. Git
metadata must also live within the checkout; externally linked worktree gitdirs
are not supported by this optional runner. The same option is available in
final tagged mode.
Initial release is the exact default notes text; --notes replaces it verbatim.
Use --retrieval-base COMMIT when candidate reconstruction needs a public
ancestor. Mirror import automatically uses each builder's sources/ directory,
including the frozen application archive; it need not refetch that export.
Omit --fetch for offline import: any other required sources must already be
in the mirror or supplied locally. Use --appimage-archive DIR / --deb-archive DIR
(verified collector directories), or --appimage-source-dir DIR /
--deb-source-dir DIR to override the builder sources with original source
filenames. These inputs are checked
against embedded records; none is authority in place of the actual package.
The mirror revalidates deduplicated bytes/records before reuse. Missing offline
sources fail, never trigger a hidden fetch.
For final preparation, first obtain approval and separately commit/tag the intended source. The tool requires the already-existing version-matched annotated tag at clean HEAD; it never creates or moves it:
| 1 | : "${TAG:?Set TAG to the approved annotated release tag at clean HEAD}" |
| 2 | : "${BOX:?Set BOX to an existing authorized Arch development box}" |
| 3 | python3 packaging/release/prepare.py --mode release --tag "$TAG" \ |
| 4 | --output "$PWD/packaging/build/release-prep/${TAG#v}-final" \ |
| 5 | --arch-box "$BOX" --notes 'Initial release' --fetch |
Final mode freezes the tag, not candidate bytes. It cannot reuse candidate
records as tagged provenance. All package builders, package collectors/mirror
tools, presentation and rendering run from source/tree/ in the new run. The
website manager receives explicit --root and --checkout-root pointing to the
actual checkout: storage/Git comparisons must not default to the exported tree.
Source is verified before and after builds and snapshotting; each AppImage/deb
record must equal the frozen source record. The Arch binary's embedded source
record and package identity are read using bsdtar in the selected box. Arch
is still not a bundled-stack corresponding-source mirror format.
The new run contains source/, packages/, ordered logs/ and status.json.
Failure exits nonzero and retains the failed step/logs. There is deliberately
no automatic resume: existing run paths and listing IDs are refused. Inspect
partial work before retrying with a new run/ID; do not delete retained state just
to bypass a guard. If a failure happened after add, use the documented manager
enrich/check/snapshot commands for explicit recovery after verifying exact
inputs. --use-existing-targets explicitly permits validated complete catalogs
to be preserved and extended with a new listing, never reinitialized or replaced.
Existing public outputs remain subject to manager ownership/rollback guards.
Mirror imports and listing steps are durable operations, not an all-store
transaction; a later failure does not erase earlier verified state.
Successful preparation retains AppImage/deb packages and corresponding sources
in dist/mirror/, and all selected downloads/metadata (including Arch) in
dist/.state/{test,release}/. The generated
listing has AppImage, matching installer, deb, Arch binary, versioned Arch source
kit and canonical application source, with explicit roles, compatibility limits,
fenced sh verification/install/removal/build commands, exact sizes/hashes and
notes. The source kit extracts into splotch-blot-VERSION-arch-kit/.
Candidate snapshots explicitly select candidate provenance even if the checkout
is at a clean tag. Final snapshots contain tagged history only.
Inspect the resulting verified listing and public-only snapshot locally:
| 1 | python3 -m http.server 8000 --bind 127.0.0.1 \ |
| 2 | --directory packaging/build/website/current/site |
Never serve dist/ or the run directory: both contain private source state.
Snapshotting is not approval, signing, upload or deployment. Perform the exact
package's desktop acceptance checks separately and review the download listing
before any separately authorized publication. No commit, tag, push, upload or
native module-pin change is performed.
Cheap, durable boundary tests require no package builds or network:
| 1 | PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s packaging/release -v |
| 2 | PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s website -p test_manage.py |
Freeze a candidate
Review and track every intended new file before freezing. Untracked files are excluded. Choose a new output name for each candidate:
| 1 | python3 packaging/source/export.py freeze --mode candidate \ |
| 2 | --output packaging/build/inputs/candidate-example |
| 3 | F="$PWD/packaging/build/inputs/candidate-example/tree" |
| 4 | python3 "$F/packaging/source/export.py" verify-input "$F" |
| 5 | sha256sum packaging/build/inputs/candidate-example/source.tar.gz \ |
| 6 | packaging/build/inputs/candidate-example/source.json |
If HEAD is not publicly retrievable, supply --retrieval-base COMMIT naming an
available ancestor. The exporter records the local base and reconstruction
commit separately and includes the candidate patch. See the
source contract.
Retain the export hashes with validation evidence. Source changes, including documentation, require a new export and affected validation; never overwrite an old export, artifact or archive. Working-checkout tests are preflight, not validation of the frozen package input.
Validate and build the frozen input
Run native tests, race tests, vet and build from the export, in a compatible and authorized development environment. Verify the input before and after; keep outputs outside the exported tree. For an existing Distrobox:
| 1 | BOX=your-existing-development-box |
| 2 | OUT="$PWD/packaging/build/candidates/candidate-example" |
| 3 | mkdir -p "$OUT" |
| 4 | distrobox enter "$BOX" -- sh -lc 'cd "$1" && export CGO_CFLAGS="${CGO_CFLAGS:--O2 -g} -std=gnu17" && CGO_ENABLED=1 go test -count=1 -tags gtk ./... && CGO_ENABLED=1 go test -count=1 -race -tags gtk ./... && CGO_ENABLED=1 go vet -tags gtk ./... && CGO_ENABLED=1 go build -tags gtk -trimpath -o "$2" ./cmd/native' sh "$F" "$OUT/native-splotch-blot" |
| 5 | python3 "$F/packaging/source/export.py" verify-input "$F" |
Use private HOME/XDG/TMP locations inside the test environment and retain command
logs. Do not change host XDG_DATA_HOME when invoking Podman itself: that selects
different rootless container storage. Desktop test opt-ins need a dedicated
display as described in DEVELOPMENT.md.
Build all three packages from the same export, without .git. Set VERSION
to the exact appVersion in the frozen source; package qualifiers are appended
without changing that application version:
| 1 | : "${VERSION:?Set VERSION to the frozen source's appVersion}" |
| 2 | export SPLOTCH_SOURCE_INPUT="$F" SPLOTCH_DIST_ROOT="$OUT" |
| 3 | "$F/packaging/appimage/build.sh" "$VERSION-candidate-jammy1" |
| 4 | "$F/packaging/deb/build.sh" "$VERSION-0candidate~noble1" |
| 5 | ARCH_BUILD_BOX="$BOX" "$F/packaging/arch/build.sh" 1 |
Follow each format's prerequisites and compatibility limits. The source-contract fixture gate checks the tooling cheaply; it does not replace extraction, retrieval, offline archive verification and bundling of the actual packages. Run those commands with the collector from the frozen export, not a later modified checkout.
Keep validation evidence separate from current guides: input/archive hashes, command logs, binary/package hashes, embedded source records, verified private archives and bundle checksums. Test the exact packaged binaries on the intended desktop: launcher/icon, built-in artwork, open/save/export, chooser, clipboard and install/remove behavior. Record tested scope and failures honestly. Build success alone does not establish GPU, accessibility, desktop integration, source availability or filesystem durability.
Approved final source
Only after approval, committing the intended source and creating its annotated
tag, export and build the final input. Set TAG to that approved annotated tag;
VERSION is its application version without the leading v:
| 1 | : "${TAG:?Set TAG to the approved annotated release tag}" |
| 2 | VERSION=${TAG#v} |
| 3 | unset SPLOTCH_DIST_ROOT |
| 4 | ./packaging/release/source.sh "$TAG" |
| 5 | F="$PWD/packaging/build/release/$VERSION/source/tree" |
| 6 | python3 "$F/packaging/source/export.py" verify-input "$F" |
| 7 | export SPLOTCH_SOURCE_INPUT="$F" SPLOTCH_DIST_ROOT="$PWD/packaging/build/release/$VERSION/packages" |
| 8 | "$F/packaging/appimage/build.sh" "$VERSION-jammy1" |
| 9 | "$F/packaging/deb/build.sh" "$VERSION-1~noble1" |
| 10 | ARCH_BUILD_BOX="$BOX" "$F/packaging/arch/build.sh" 1 |
source.sh requires the annotated tag and matching committed appVersion. It
exports that commit regardless of unrelated working-tree changes, using the
same source.tar.gz, source.json and tree/ format as candidates, with tag
object/commit identity and no candidate patch. Keep the external source record
with a standalone tree; builders cannot infer provenance from an arbitrary
source directory.
Default package builds and automatic candidate freezes use packaging/build/
relative to the builder's checkout or exported root. source.sh defaults to
packaging/build/release/<version>/source in the checkout; an explicit second
argument takes precedence. SPLOTCH_DIST_ROOT remains a compatible output-root
override for both helpers. Clear it before relying on a default path.
All of these build/export outputs are disposable scratch, not retained releases.
Keep selected packages and catalog metadata in persistent dist/archive/ and
verified deduplicated offline sources in private dist/mirror/ using the
website workflow. Retain needed validation evidence
before cleaning build scratch.
The cleaner does not manage override destinations or either persistent store.
Validate final artifacts with --mode release and archive labels beginning
release-. Candidate records cannot be reused. For example:
| 1 | A="$SPLOTCH_DIST_ROOT/appimage/$VERSION-jammy1/SplotchBlot-$VERSION-jammy1-x86_64.AppImage" |
| 2 | python3 "$F/packaging/source/contract.py" verify "$A" --mode release |
| 3 | python3 "$F/packaging/source/contract.py" fetch "$A" --mode release --label "release-$VERSION-appimage" --archive-root archive |
The approved commit/tag must be available at GitCafe for recipient retrieval before publication. Retain verified private fallback sources; no public third-party mirror or source tarballs inside binaries are required. Checksums identify bytes, not publisher signatures. Export the installer from the same approved source. AUR recipe URL/checksum substitution is a separate explicit packaging step.
For website asset selection and upload planning, follow
DEPLOYMENT.md. Root archive/ is private source
retention, never the website's public archive. Staging a plan or passing checks
is not publication authorization.