build: standardize release asset naming#1729
Merged
Merged
Conversation
Rework build.sh so released assets have stable, predictable names that
are easy to automate against:
- drop the generated timestamp from tarball names
- drop the "-binary" infix from tarball names
- name macOS tarballs with "darwin" (matches GOOS) instead of "osx"
- drop the version from .rpm/.deb filenames; the release download URL
already carries it. Package metadata still records version + epoch
- build arm64 .rpm and .deb in addition to amd64, using each ecosystem's
arch convention (x86_64/aarch64 for rpm, amd64/arm64 for deb)
- stop publishing the bare "gh-ost" binary; it was just the last build
(darwin/arm64) and was ambiguous. Tarballs and packages cover every
OS/arch
- emit a SHA256SUMS manifest so downloads can be verified with
`sha256sum -c SHA256SUMS`
Resulting assets:
gh-ost-{linux,darwin}-{amd64,arm64}.tar.gz
gh-ost.{x86_64,aarch64}.rpm
gh-ost.{amd64,arm64}.deb
SHA256SUMS
Also refactor build() to take GOOS/GOARCH directly, share common fpm
flags via an array, and update the README build.sh description.
Slim down the release packaging tooling: - Dockerfile.packaging: collapse the per-package RUN layers into one, drop packages already provided by the golang:bookworm base (git, tar, curl, gcc, g++, bash) and the unused rsync, and drop the legacy GOPATH src layout (the build is module-mode). Only ruby/ruby-dev/build-essential (for fpm) and rpm (for rpmbuild) are installed now. - Use a multi-stage build with a `scratch` artifacts stage so `docker build --output type=local` exports the assets straight to the host. This drops the intermediate container, bind mount, -it TTY and find|xargs cp dance from `script/dock pkg`. - build.sh: stage the fpm package tree in the system temp dir instead of under $buildpath, so it never lands among the exported release artifacts.
754943b to
22875f4
Compare
meiji163
approved these changes
Jun 25, 2026
Contributor
Author
|
Thanks a lot! Any ETA for the release? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Pull Request should be associated with an Issue.
Related issue: #1728
Description
This PR reworks the release packaging so the published assets have stable,
predictable names that are easy to automate against (e.g. installing a fixed
version from a
Dockerfilewithout first listing a release's assets), andslims down the packaging tooling along the way.
Asset naming (
build.sh)since it forced consumers to list a release's assets before they could pick a
download.
-binaryinfix from tarball names.darwin(matchesGOOS) instead ofosx..rpm/.debfilenames — the release download URLalready carries it (
.../download/v1.1.10/gh-ost.x86_64.rpm). Packagemetadata still records the version and epoch.
.rpmand.debin addition to amd64, using eachecosystem's arch convention (
x86_64/aarch64for rpm,amd64/arm64for deb).
gh-ostbinary — it was just the last build(darwin/arm64) left over in the build dir, and its name made the OS/arch
non-obvious. Tarballs and packages already cover every OS/arch.
SHA256SUMSmanifest so a download can be verified withsha256sum -c SHA256SUMS(or--ignore-missingfor a single file).Resulting assets:
Packaging tooling (
Dockerfile.packaging,script/dock)RUN apt-get installlayers into one, drop packagesalready provided by the
golang:bookwormbase (git, tar, curl, gcc, g++,bash) and the unused
rsync, and drop the legacy GOPATHsrc/layout (thebuild is module-mode). Only
ruby/ruby-dev/build-essential(for fpm) andrpm(for rpmbuild) are installed now.scratchartifacts stage sodocker build --output type=localexports the assets straight to the host.This drops the intermediate container, bind mount,
-itTTY andfind | xargs cpstep fromscript/dock pkg.script/dock.Verification
Built all assets via
script/dock pkgand verified: every tarball/packagecontains a binary of the expected arch, the rpm/deb arch metadata is correct,
the deb version is
1:1.1.10(epoch preserved),sha256sum -c SHA256SUMSround-trips green, and the exported directory contains only the release assets.
script/cibuildreturns with no formatting errors, build errors or unit test errors.