Title: Install on Ubuntu with apt from a repository of our own · Issue #153 · openjavaformat/open-java-format · GitHub
Open Graph Title: Install on Ubuntu with apt from a repository of our own · Issue #153 · openjavaformat/open-java-format
X Title: Install on Ubuntu with apt from a repository of our own · Issue #153 · openjavaformat/open-java-format
Description: Why On Ubuntu the formatter is a download from the release page that goes onto the PATH by hand, and nothing says when a new version is out. Ubuntu users expect apt install and apt upgrade. google-java-format was asked for the same in go...
Open Graph Description: Why On Ubuntu the formatter is a download from the release page that goes onto the PATH by hand, and nothing says when a new version is out. Ubuntu users expect apt install and apt upgrade. google-...
X Description: Why On Ubuntu the formatter is a download from the release page that goes onto the PATH by hand, and nothing says when a new version is out. Ubuntu users expect apt install and apt upgrade. google-...
Opengraph URL: https://github.com/openjavaformat/open-java-format/issues/153
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Install on Ubuntu with apt from a repository of our own","articleBody":"### Why\n\nOn Ubuntu the formatter is a download from the release page that goes onto the `PATH` by hand, and nothing says when a new version is out. Ubuntu users expect `apt install` and `apt upgrade`. google-java-format was asked for the same in google/google-java-format#231; its maintainers did not take it on and offered to link a package made by someone else.\n\n### Proposal\n\n`.deb` packages for amd64 and arm64, made from the release's `open-java-format-linux-glibc_x86-64` and `open-java-format-linux-glibc_aarch64` and installing `/usr/bin/open-java-format`, in a signed apt repository of our own:\n\n```sh\nsudo install -d -m 0755 /etc/apt/keyrings\ncurl -fsSL https://apt.openjavaformat.dev/key.asc | sudo tee /etc/apt/keyrings/open-java-format.asc > /dev/null\necho \"deb [signed-by=/etc/apt/keyrings/open-java-format.asc] https://apt.openjavaformat.dev stable main\" \\\n | sudo tee /etc/apt/sources.list.d/open-java-format.list\nsudo apt update\nsudo apt install open-java-format\n```\n\nFrom then on `apt upgrade` brings every release. The same lines work on Debian.\n\nHow it could work, in the shape of the Homebrew tap in #151:\n\n- A repository, `openjavaformat/apt`, published with GitHub Pages under `apt.openjavaformat.dev`.\n- An hourly workflow follows the latest release. It downloads the two Linux binaries, checks them against `checksums_sha256.txt`, builds the two packages with `dpkg-deb`, writes the indexes with `apt-ftparchive`, signs `InRelease` and `Release.gpg`, and deploys the result as a Pages artifact, so no binary lands in Git history.\n- The repository carries the latest version only. Older versions stay on the release page as plain binaries.\n\n### To decide\n\n- **The oldest supported release.** The Linux binaries are built on `ubuntu-latest`, today Ubuntu 24.04, and on `ubuntu-24.04-arm`, both with glibc 2.39. A program linked against glibc 2.34 or later needs at least 2.34 to run: that is the \"GLIBC_2.34 not found\" of google/google-java-format#1072, which google-java-format fixed by building on an older image. Read the real minimum off our binaries with `objdump -T` and declare it as `Depends: libc6 (>= …)`. Ubuntu 22.04 has glibc 2.35 and Debian 12 has 2.36; Ubuntu 20.04 has 2.31 and is past its standard support. When `ubuntu-latest` moves to the next LTS, the minimum moves with it, so `release.yml` should name the image.\n- **The signing key.** The key that signs the release files, or one of its own for the repository, which keeps the release key out of another repository's secrets.\n- **Hosting.** A GitHub Pages site may be up to 1 GB and has a soft limit of 100 GB of traffic a month. Two packages of one version are far below the first; the second matters only if apt becomes the main way to install.\n\n### Alternatives looked at\n\n- **A PPA on Launchpad.** Launchpad builds every package from a source upload, without network access. GraalVM is not in the Ubuntu archive, so the prebuilt binary would have to travel inside the source package, and a PPA serves Ubuntu only.\n- **Snap.** The Snap Store comes with Ubuntu and updates by itself, but a strictly confined snap sees only non-hidden files in the home directory and gets a `/tmp` of its own, so it could not format a checkout in `/workspace` or in a hidden directory. Classic confinement lifts that only after a manual review by the store.\n- **The Ubuntu and Debian archives.** A package there must build from source inside the distribution, against dependencies packaged there too. GraalVM is not packaged, and the jar would bring the formatter's whole dependency tree along. Out of reach for now.\n- **`.deb` files on the release page alone.** `sudo apt install ./open-java-format_\u003cversion>_amd64.deb` would work, but nothing would bring updates.\n- **Homebrew on Linux.** The formula of #151 covers Ubuntu users who already use Homebrew.\n\n### Done when\n\n- `sudo apt install open-java-format` installs the latest release on amd64 and arm64, on every supported Ubuntu LTS release from the oldest one decided above, and `open-java-format --version` prints it;\n- `apt upgrade` sees a new release within the hour, without a hand edit;\n- the [Command line](https://openjavaformat.dev/get-started/command-line/) page gets an apt section, and [About](https://openjavaformat.dev/about/#where-it-is-published) lists the repository.\n\n### Related\n\n- google/google-java-format#231 and google/google-java-format#1072\n- #151 for Homebrew, #152 for Windows\n","author":{"url":"https://github.com/abashev","@type":"Person","name":"abashev"},"datePublished":"2026-10-25T14:25:43Z","url":"https://github.com/openjavaformat/open-java-format/issues/153"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8b624c1d-9102-8072-32d7-3234c9958e69 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D70A:10F3E3:2D28F0:3B5A2A:6AFBB791 |
| html-safe-nonce | 032bd2936cea33e21c64a81bce71991f8c3d1b9a264b85d877dd6384c6e7ed27 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzBBOjEwRjNFMzoyRDI4RjA6M0I1QTJBOjZBRkJCNzkxIiwidmlzaXRvcl9pZCI6IjI1NTUzNTI3ODM4MTMwNjQ1OTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d75d4d7a772ee2ff14721220142b93ef8b2072da8e5f5394781095a5d70b96de |
| hovercard-subject-tag | issue:6025502799 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openjavaformat/open-java-format/153/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b6d815c13b0747ad53006c6b71838f646b411455cd0e96499e75334f21925d04/openjavaformat/open-java-format/issues/153 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b6d815c13b0747ad53006c6b71838f646b411455cd0e96499e75334f21925d04/openjavaformat/open-java-format/issues/153 |
| og:image:alt | Why On Ubuntu the formatter is a download from the release page that goes onto the PATH by hand, and nothing says when a new version is out. Ubuntu users expect apt install and apt upgrade. google-... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abashev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/openjavaformat/open-java-format git https://github.com/openjavaformat/open-java-format.git |
| octolytics-dimension-user_id | 325177626 |
| octolytics-dimension-user_login | openjavaformat |
| octolytics-dimension-repository_id | 1288055459 |
| octolytics-dimension-repository_nwo | openjavaformat/open-java-format |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 214273098 |
| octolytics-dimension-repository_parent_nwo | palantir/palantir-java-format |
| octolytics-dimension-repository_network_root_id | 214273098 |
| octolytics-dimension-repository_network_root_nwo | palantir/palantir-java-format |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width