You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eng/common/cross/install-debs.py verifies the APT Release signature by invoking gpg --keyring <keyring> --verify. On hosts running GnuPG 2.4+ with keyboxd (e.g. Azure Linux 4.0), this pattern is fragile: gpg --keyring routes through the agent/keyboxd machinery rather than doing a simple, self-contained verification against the supplied keyring. Consumers building cross rootfs images on these distros have to patch the cloned arcade script to make it work.
The purpose-built tool for this job is gpgv, which verifies a detached signature against a fixed keyring with no agent, no keyboxd, and no mutation of any user keyring.
This is brittle: the sed expressions are tightly coupled to the exact source text and will silently no-op (falling back to the broken gpg path) the moment these lines are reformatted or refactored in arcade.
Ask
Support this verification pattern natively in install-debs.py so downstream consumers don't have to patch the cloned script. gpgv's invocation is essentially the same minus the --verify flag:
gpgv [--keyring <keyring>] <sigfile> <datafile>
Options to consider:
Switch the verification to gpgv outright (it is available wherever gpg is and is the canonical tool for verify-against-keyring).
Or auto-detect / add an opt-in flag (e.g. --use-gpgv) so newer-GnuPG hosts get correct behavior without a script patch.
Either approach removes the need for the sed workaround and makes rootfs builds robust on GnuPG 2.4+/keyboxd distros like Azure Linux 4.0.
Note
This issue was drafted with the assistance of GitHub Copilot.
Summary
eng/common/cross/install-debs.pyverifies the APTReleasesignature by invokinggpg --keyring <keyring> --verify. On hosts running GnuPG 2.4+ withkeyboxd(e.g. Azure Linux 4.0), this pattern is fragile:gpg --keyringroutes through the agent/keyboxd machinery rather than doing a simple, self-contained verification against the supplied keyring. Consumers building cross rootfs images on these distros have to patch the cloned arcade script to make it work.The purpose-built tool for this job is
gpgv, which verifies a detached signature against a fixed keyring with no agent, nokeyboxd, and no mutation of any user keyring.Where it lives today
https://github.com/dotnet/arcade/blob/main/eng/common/cross/install-debs.py
Real-world workaround
dotnet/dotnet-buildtools-prereqs-docker PR #1674 (Azure Linux 4.0 .NET 11 image graph) clones arcade and
sed-patches this script after the fact:This is brittle: the
sedexpressions are tightly coupled to the exact source text and will silently no-op (falling back to the brokengpgpath) the moment these lines are reformatted or refactored in arcade.Ask
Support this verification pattern natively in
install-debs.pyso downstream consumers don't have to patch the cloned script.gpgv's invocation is essentially the same minus the--verifyflag:Options to consider:
gpgvoutright (it is available wherevergpgis and is the canonical tool for verify-against-keyring).--use-gpgv) so newer-GnuPG hosts get correct behavior without a script patch.Either approach removes the need for the
sedworkaround and makes rootfs builds robust on GnuPG 2.4+/keyboxddistros like Azure Linux 4.0.Note
This issue was drafted with the assistance of GitHub Copilot.