Repository navigation
Release the Linux binaries as .deb packages, built on Ubuntu 24.04 - #289
Merged
abashev merged 5 commits intoNov 28, 2026
Merged
Conversation
A release now carries open-java-format_<version>_amd64.deb and open-java-format_<version>_arm64.deb next to the plain Linux binaries, signed and in checksums_sha256.txt like every other file. They install /usr/bin/open-java-format and are what the apt repository, openjavaformat/apt, serves (#153); `sudo apt install ./<file>.deb` works without it. open-java-format-native/deb/build-deb.sh packages a binary. It reads the architecture and the libc6 dependency off the binary itself: the newest GLIBC_ symbol version it asks for, 2.34 today, so that a build on a newer image cannot reach an older system and fail to start there; apt refuses the package instead. The files take the time of the tag's commit, so a re-run makes the same bytes. The release builds each package on the runner its binary came from and installs it with apt on Ubuntu 22.04 and Debian 12 before the draft release collects it. CI does the same on every pull request, under the version the binary prints.
This was referenced Nov 28, 2026
The Linux binaries came from ubuntu-latest and ubuntu-26.04-arm, the newest images. A binary linked against a newer glibc can need that glibc to start, so the newest image is the one most likely to leave older systems behind. CI and the release now build Linux on the previous LTS, ubuntu-24.04 and ubuntu-24.04-arm; the other platforms stay on the newest images. The packaging moves from two shell scripts into a composite action, .github/actions/deb-package, which both workflows call: it builds the package and installs it on Ubuntu 22.04 and Debian 12. The package is the same bytes as before.
The packages, the apt repository and the docs say the binaries run on glibc 2.34 or later, Ubuntu 22.04 and newer. Building on 22.04, glibc 2.35, keeps that true by construction rather than by luck of which symbols a newer glibc versioned.
GitHub retires ubuntu-22.04 and ubuntu-22.04-arm on April 17, 2027, with failing brownouts from March 23 (actions/runner-images#14254), and Ubuntu 22.04's standard support ends then too. The previous LTS, 24.04, is the image that stays. The packages' libc6 dependency is still read off each binary, so a higher glibc need shows in the package instead of in a binary that does not start.
Outside a tag the binary prints a bare commit hash as its version, such as 244d57b, and a Debian version must start with a digit: about six hashes in sixteen would have failed the native job. Such a version now gets 0~ in front, which sorts below every release; a release version is unchanged.
abashev
deleted the
abashev/install-on-ubuntu-with-apt-from-a-repository-of
branch
November 28, 2026 18:59
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.
Before this PR
A release has the Linux binaries only as plain files. The apt repository for #153, openjavaformat/apt, built its own
.debpackages from them, outside the release, without the release's signatures and checksums. The binaries came from the newest images,ubuntu-latestandubuntu-26.04-arm: a binary linked against a newer glibc can need that glibc to start, so the newest image is the one most likely to leave older systems behind.After this PR
open-java-format_<version>_amd64.debandopen-java-format_<version>_arm64.deb, signed and inchecksums_sha256.txtlike every other file. They install/usr/bin/open-java-formatand are what openjavaformat/apt serves (Serve the release's own .deb packages apt#1);sudo apt install ./<file>.debworks without it..github/actions/deb-package. It reads the architecture and the libc6 dependency off the binary: the newestGLIBC_symbol version it asks for, 2.34 today, so that apt refuses the package on an older system instead of installing a binary that does not start there. It then installs the package with apt on Ubuntu 22.04 and Debian 12, runs--versionand formats a file. In a release the files take the time of the tag's commit, so a re-run makes the same bytes.release.ymlpackages each Linux binary on the runner that built it, and the draft release waits for both packages.ci.ymlruns the same action on every pull request, under the version the binary prints.ubuntu-24.04andubuntu-24.04-arm, rather than the newest images; the other platforms stay on the newest. 22.04 would match the oldest system better, but GitHub retires it on April 17, 2027, with failing brownouts from March 23 ([Ubuntu] The Ubuntu 22 based runner images will begin deprecation on September 17th and will be fully unsupported by April 17th for GitHub Actions and Azure DevOps actions/runner-images#14254). If a 24.04 build needs a newer glibc than 2.34, the package says so in its libc6 dependency. Onlybuildis a required check, so the renamednative (…)jobs block nothing.Checked locally: the action's build step, run in Docker on 21.1.1's binaries, gives the same bytes as before; its install step passes on Ubuntu 22.04 and Debian 12 and fails on a wrong version. Earlier, the same packages installed and ran on Ubuntu 22.04, 24.04 and 26.04 and on Debian 12 and 13. A JReleaser
jreleaserChecksum --dryrunin a clone lists both packages inchecksums_sha256.txt, and the release configuration fails when one is missing. The release jobs themselves run only on a tag.Possible downsides?
The draft release now also waits for the two package jobs, so a failure there holds it back; "Re-run failed jobs" builds them again. When
ubuntu-24.04is retired from GitHub's runners, the Linux jobs have to move to the next image by hand.