circagraph
Sign inSign up

openchronology/timeline-app on GitHub

The OpenChronology repository on GitHub, mirrored by och-import-github: issues and pull requests as durations (ongoing while open), what happened to them as moments, plus releases, milestones, commits and branches. The Branches view shows the most recently active branches each in a track of its own.

Source: https://github.com/openchronology/timeline-app

3,131 moments · 2026-10-05 CE 20:21:49 UTC – 2026-11-16 CE 12:10:45 UTC · by @athan · @athan

#606 Server packages build from prebuilt tools images (#605)

–

  • github
  • github/openchronology/timeline-app
  • github/openchronology/timeline-app#606
  • pull request
  • state:merged

Part of #605: the first of its three images. The .deb and .rpm server package builds start from prebuilt images of their tools, so they no longer install from the distributions' mirrors. Mirror failures broke v0.26.0's release build twice. ## How it works - **Tools stages:** each .deb and .rpm Dockerfile now installs its tools in two stages of its own. - `native-tools`: the compilers, PostgreSQL's development files, GMP, SQLite and the pinned Rust. - `package-tools`: curl and xz, plus rpm-build for the .rpm. - `native` and `package` start from `${NATIVE_TOOLS}` and `${PACKAGE_TOOLS}`, which default to those stages. - **Publishing:** `scripts/build-images.mjs` builds those stages and pushes them to `ghcr.io/openchronology/server-build`. - **Tag:** a hash of the stage, the `base` stage, the target's base image and its PostgreSQL version, for example `ubuntu24.04-native-tools-0b33f9a34390ed8b`. Changing any other stage keeps the tag; changing the tools does not. - **Building:** `scripts/server-package.mjs` looks up each image's digest and passes `ref@digest` as the build argument. - **Fallback:** without a matching image, if the registry can't be reached, or with `OCH_TOOL_IMAGES=off`, the build installs the tools itself, as before. A missing image never fails a build. - **Workflow:** the new `build-images.yml` builds, pushes and attests the 8 images: when their Dockerfiles or targets change on main, weekly for security updates, and by hand. - **Permissions:** `server-packages.yml` signs in to the registry before building, and `ci.yml` and `release.yml` give that workflow `packages: read`. If signing in fails, the build falls back as above. ## Tested locally I published the Ubuntu 24.04 images to a local registry, then built the package from them. - **The build:** no Ubuntu package was installed in the native or package stages. It took 132 s. - **The install test:** `test/server-deb.mjs` passes on the package (install, database with pgmp, server, upgrade, purge). - **Compared with a fallback build:** I also built the package with `OCH_TOOL_IMAGES=off`. Every file in the two packages is byte-for-byte identical, including `och-convert` and `pgmp.so`. The only difference is a 4 KB difference in the control file's Installed-Size, which comes from `du` counting directory blocks. ## Tests - **`test/build-images.test.mjs`:** - how tags change; - the 8 image names; - that each Dockerfile defaults its tools arguments to its stages, and that `native` and `package` install nothing. - **`test/ci-workflows.test.mjs`:** a stage whose parent is an argument defaulting to a stage is treated as starting from that stage, so the mirror-retry and pinned-image checks still cover the tools stages. ## After merging - **First publish:** `build-images.yml` runs on main and publishes the images. Until then, and in this PR's CI, builds fall back as before. - **Visibility:** packages pushed from Actions may start out private. CI signs in, so that works either way, but making `server-build` public lets local builds use the images too. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/circagraph/timeline-app/pull/606

Related

Open #606 Server packages build from prebuilt tools images (#605) in the timeline

#606 Server packages build from prebuilt tools images (#605)