Skip to content

modules/gpg2: add --build for deterministic configure output - #2172

Open
tlaurion wants to merge 1 commit into
linuxboot:masterfrom
tlaurion:gpg2-add-build-flag
Open

modules/gpg2: add --build for deterministic configure output#2172
tlaurion wants to merge 1 commit into
linuxboot:masterfrom
tlaurion:gpg2-add-build-flag

Conversation

@tlaurion

Copy link
Copy Markdown
Collaborator

Without --build, config.guess probes the Docker host kernel and produces
different build triplets on different CI runners, causing gpg-agent output to
differ between CI and local builds at the same commit.

Add --build x86_64-elf-linux following the proven pattern from modules/gpg
(v1.4.21). Convert single patch to multi-patch directory:

  • 0001-force-cross-compile.patch: set cross_compiling=yes
  • 0002-redirect-tty-to-stderr.patch: redirect tty for initrd
  • 0003-fix-ac-unique-file.patch: fix source check for --build + --disable-gpgsm

Verified: CI pipeline on tlaurion/heads shows gpg-agent hash matches clean
local build at the same commit.

Copilot AI review requested due to automatic review settings July 29, 2026 17:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Without --build, autoconf runs config.guess to determine the build system
triplet.  Docker containers share the host kernel, so config.guess probes
the host via uname -r and /proc -- not a container-virtualized kernel.
Different CircleCI runners have different host kernels, producing different
build triplets and non-reproducible gpg-agent output.

Add --build x86_64-elf-linux following the pattern already proven in
modules/gpg (v1.4.21, present since its introduction).  This prevents
config.guess from running entirely, making the configure output
independent of which CircleCI runner executes the build.

The --disable-asm flag (already present) only disables gpg2's own
assembly optimizations -- it does not prevent config.guess from probing
the host kernel.  --build is the fix for that.

Convert single patch to multi-patch directory:
  0001-force-cross-compile.patch: set cross_compiling=yes
  0002-redirect-tty-to-stderr.patch: redirect tty for initrd
  0003-fix-ac-unique-file.patch: fix source file check for --build
                                  when --disable-gpgsm is used

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
@tlaurion
tlaurion force-pushed the gpg2-add-build-flag branch from 933fe5b to 2517e8d Compare July 29, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mismatch between hashes of local build and Circle public build of bin/gpg-agent

2 participants