Skip to content

THRIFT-2208: Package the Windows Thrift compiler for Chocolatey - #3898

Merged
Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-2208
Sep 20, 2026
Merged

Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-2208

Conversation

@Jens-G

@Jens-G Jens-G commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Based directly on master. Everything this depended on (#3901, #3893, #3895) is merged, so this no longer sits on another PR.

THRIFT-2208 has been open since 2013.

choco install thrift

The package downloads, it does not carry

The package fetches the Windows installer published with the release and runs it silently for all users. It does not embed the compiler. So:

  • what a user installs is the file that was voted on and signed;
  • no binary is redistributed through a third-party CDN;
  • the package stays a few KB.

The URL is archive.apache.org, for the same reason as the WinGet manifest: downloads.apache.org only carries the current release, so a package naming it stops installing at the next one — and Chocolatey keeps old versions installable. The checksum is computed from the file at that exact URL, so the package cannot record a checksum the published file does not have.

That makes it a post-release step: it cannot be built until the archive has the release. The workflow runs when the release is published and can be re-run from the Actions tab.

Nothing is pushed yet — on purpose

The thrift id is taken. It belongs to a third-party package, not an ASF one:

latest version 0.12.0, published February 2019 — thirteen releases behind
maintainers chaliy, Lite
source https://github.com/Litee/chocolatey-packages

(Its "last updated" field on chocolatey.org moves with Chocolatey's automated re-verification, not with any maintainer action — it looks recent and is not.)

Per our discussion the plan is to request a maintainer takeover under Chocolatey's process for abandoned packages, so that choco install thrift keeps meaning what people expect. So this PR builds and tests the package but pushes nothing: the push step needs a CHOCO_API_KEY secret that does not exist, and when it is absent the workflow attaches the package to the run and says in its summary that it did not push. doc/ReleaseManagement.md documents the takeover steps.

If the takeover is refused, apache-thrift and thrift-compiler are both free — I verified there is exactly one package matching "thrift" on the whole community feed. Switching is an id change in thrift.nuspec.in plus the package file name.

The Visual C++ redistributable

The package depends on vcredist140. The compiler links the shared runtime and the ASF cannot ship the redistributable, so Chocolatey installs it first — a choco install thrift does not end in a compiler that will not start.

Testing

chocolatey/test-chocolatey-package.ps1, 19 checks: the URL, checksum and silent-install arguments reach the install script; no placeholder survives into a file that would be published verbatim; the nuspec parses and carries the right id, version and licence; LICENSE and NOTICE are staged and non-empty; a malformed version or checksum is refused.

Given -Package, it also looks inside the packed .nupkg — including asserting it carries no executable, since a package that did would be shipping an unsigned copy of the compiler.

It runs anywhere PowerShell does (-StageOnly skips the choco pack step), so I developed and ran it on Linux; CI runs it on Windows both before and after packing. It already earned its keep — it caught an over-broad assertion of mine that matched an explanatory comment rather than the URL value.

Notes

  • /ALLUSERS and /TASKS="modifypath" are what make Chocolatey's machine-wide install put thrift.exe on the system PATH; both are asserted.
  • zizmor is clean on the new workflow.

JIRA: THRIFT-2208


Merge note. #3897 (WinGet) and #3898 (Chocolatey) are siblings off #3895 and both append a subsection to doc/ReleaseManagement.md at the same anchor. Whichever merges second will conflict there; the resolution is to keep both subsections. Nothing else overlaps.

🤖 Generated with Claude Code

@mergeable mergeable Bot added build and general CI cmake, automake and build system changes github_actions Pull requests that update GitHub Actions code labels Sep 20, 2026
@Jens-G
Jens-G force-pushed the THRIFT-2208 branch 3 times, most recently from d79d5a6 to 4d157e5 Compare September 20, 2026 12:00
@Jens-G
Jens-G force-pushed the THRIFT-2208 branch 4 times, most recently from 8b967d8 to 4e09de1 Compare September 20, 2026 17:21
Client: build

Open since 2013. Windows developers who use Chocolatey have no supported
way to get the Thrift compiler through it.

The package downloads the Windows installer published with the release
and runs it silently for all users, rather than carrying a copy of the
compiler. So what gets installed is what was voted on and signed, the
package stays small, and no binary is redistributed through a third
party CDN. The URL is archive.apache.org, which keeps every release;
downloads.apache.org only carries the current one, so a package naming
it would stop installing at the next release. The checksum is computed
from the file at that very URL, so the package cannot record a checksum
the published file does not have.

The package depends on vcredist140. The compiler links the shared
runtime and needs the Visual C++ redistributable, which the ASF cannot
ship; Chocolatey installs it first, so a "choco install thrift" does not
end in a compiler that will not start.

That makes this a post release step, like the WinGet submission: it
cannot run until the archive has the release. The workflow runs when the
release is published and can be run again from the Actions tab.

Nothing is pushed yet, and that is deliberate. The thrift id on the
Chocolatey community repository belongs to a third party package that
last shipped 0.12.0 in February 2019 - thirteen releases behind -
maintained by chaliy and Lite. Publishing under it needs a maintainer
takeover request under Chocolatey's process for abandoned packages.
Until the id has been handed over and a CHOCO_API_KEY secret exists, the
workflow builds and checks the package, attaches it to the run, and says
in its summary that it did not push. ReleaseManagement.md describes the
takeover, and names the free fallback ids should it be refused.

test-chocolatey-package.ps1 checks that the URL, the checksum and the
silent install arguments reach the install script, that no placeholder
survives into a file that would be published verbatim, that LICENSE and
NOTICE are staged and are not empty, and that a malformed version or
checksum is refused. Given a packed .nupkg it also looks inside it, and
checks it carries no executable - the compiler is downloaded at install
time, and a package that had one would be shipping an unsigned copy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Jens-G
Jens-G merged commit 4b400d8 into apache:master Sep 20, 2026
21 of 22 checks passed
@Jens-G
Jens-G deleted the THRIFT-2208 branch September 20, 2026 21:11
@chaliy

chaliy commented Sep 23, 2026

Copy link
Copy Markdown

@Jens-G is this correct that you would like to take over of thift chocolatey package?

@Jens-G

Jens-G commented Sep 23, 2026 •

Copy link
Copy Markdown
Member Author

@Jens-G is this correct that you would like to take over of thift chocolatey package?

@chaliy Yes, correct, that was the idea of my request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build and general CI cmake, automake and build system changes github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants