deps: build pwru from source with the repo Go builder - #2675
Merged
Conversation
The shell image downloaded the pwru release binary. Upstream builds releases with a pinned Go image, and v1.0.12 carries Go 1.26.5, which 8 stdlib advisories affect. Upstream publishes binaries only on tags, so the fix waits on their release cadence. Build pwru from a pinned source commit with this repo golang base image instead. The standard library in the binary now tracks the same image bumps as every other shipped binary, and the commit pin keeps the build reproducible. The pinned commit is the v1.0.12 tag. The build follows the upstream Makefile: vendored static libpcap (gcc, gawk, flex, bison), bpf2go generation (clang, llvm), and a statically linked CGO binary (glibc-static). GOEXPERIMENT=none disables the Microsoft Go OpenSSL crypto backend, which dlopens libcrypto at startup and crashes inside a statically linked binary. pwru does not need FIPS crypto. Both stages run pwru --version, so a binary that cannot start fails the image build instead of shipping. Signed-off-by: Quang Nguyen <28567936+nddq@users.noreply.github.com>
Quang Nguyen (nddq)
requested review from
Simone Rodigari (SRodi) and
carlotaarvela
August 21, 2026 14:33
Retina Code Coverage ReportTotal coverage no changeDecreased diff
|
Quang Nguyen (nddq)
enabled auto-merge
August 21, 2026 15:24
ibezrukavyi
approved these changes
Aug 21, 2026
7 tasks
pull Bot
pushed a commit
to TheTechOddBug/retina
that referenced
this pull request
Aug 25, 2026
…oft#2676) # Description The ADO pipeline builds the arm64 shell image on amd64 agents under QEMU. The pwru source build (microsoft#2675) runs real compilers inside that stage, and modern aarch64 binaries crash under the old QEMU: gcc `cc1` died with an internal compiler error, and gawk segfaulted inside the libpcap configure. Every merge-queue `CI (Build Images)` run failed at `Build Retina Shell Images arm64`. Two changes: - **Current QEMU**: the `qemu-user-static` make target registered `multiarch/qemu-user-static`, which ships a QEMU from 2022. It now registers `tonistiigi/binfmt`, which ships a current QEMU. `docker/setup-qemu-action` uses the same image, so the GitHub Actions builds never saw these crashes. - **clang**: the pwru build compiles with clang. clang builds the same static binary under QEMU, and one compiler serves both architectures. The org's hosted ADO pool offers no arm64 images, and the OneBranch arm64 pool rejects pipelines that do not extend the OneBranch governed template. Native ADO arm64 therefore needs a OneBranch migration, which stays out of scope. ## Related Issue N/A. ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/Contributing/overview). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [ ] I have updated the documentation, if necessary. - [ ] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed - Local QEMU emulation with current QEMU (`tonistiigi/binfmt`): the arm64 stage builds, and the startup check prints `pwru v1.0.12` from the emulated binary. The extracted binary is a static ELF with `go1.26.7`. - ADO run 124172 isolated the old QEMU as the cause: with clang alone, gawk still segfaulted under the old QEMU. - The ADO PR run on this branch passes `Build Retina Shell Images arm64` with both changes. ## Additional Notes N/A. --------- Signed-off-by: Quang Nguyen <28567936+nddq@users.noreply.github.com>
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.
Description
The shell image downloads the pwru release binary. Upstream builds each release with a pinned Go image.
v1.0.12carries Go 1.26.5, which 8 stdlib advisories affect. Upstream publishes binaries only on tags, andmainalready builds with Go 1.27.0, so the fix waits on their release cadence.This PR builds pwru from source with this repo's golang base image:
PWRU_COMMITbuild-arg pins the source to thev1.0.12commit (f1d6cf88). Same pwru version as today, current toolchain.gcc,gawk,flex,bison), bpf2go generation (clang,llvm), and a statically linked CGO binary (glibc-static).GOEXPERIMENT=none: the Microsoft Go toolchain enables its OpenSSL crypto backend by default. The backend dlopens libcrypto at startup, which crashes a statically linked binary withSIGFPE. pwru does not need FIPS crypto, so the build disables the backend.pwru --version. If the binary cannot start, the image build fails.The build stage runs at the target platform. The arm64 image jobs run on native arm64 runners.
Related Issue
N/A — clears the 8 Trivy stdlib findings on
retina-shell, the last third-party item from the code-scanning cleanup.Checklist
git commit -S -s ...). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Built the shell image locally for
linux/amd64. The build log showspwru v1.0.12from both startup checks. The binary in the image:CI builds both architectures on this PR.
Additional Notes
N/A.