Skip to content

Fix: Correct GPG keyring path in Dockerfile.ci (fixes #99)#101

Merged
wkoszek merged 1 commit into
mainfrom
issue/99-fix-gpg
Nov 16, 2025
Merged

Fix: Correct GPG keyring path in Dockerfile.ci (fixes #99)#101
wkoszek merged 1 commit into
mainfrom
issue/99-fix-gpg

Conversation

@wkoszek

@wkoszek wkoszek commented Nov 16, 2025

Copy link
Copy Markdown
Contributor

Summary

Fix GPG keyring path inconsistency in Dockerfile.ci that caused Docker build failures.

Problem

The first gpg --recv-keys command was writing to /usr/share/keyrings/mono-official-archive-keyring.gpg but the second command was trying to export from /tmp/mono-keyring.gpg, causing the export to fail.

Solution

Use /tmp/mono-keyring.gpg consistently in both GPG commands:

  1. Receive keys into /tmp/mono-keyring.gpg
  2. Export from /tmp/mono-keyring.gpg to final destination

Test plan

  • Fix applied to Dockerfile.ci
  • Docker build workflow completes successfully
  • Mono and .NET packages installed correctly

Fixes #99

First gpg command must use /tmp/mono-keyring.gpg not the
final destination path. This ensures the keyring file is
created properly before exporting to final location.

Fixes #99
@wkoszek
wkoszek merged commit 0572558 into main Nov 16, 2025
2 of 3 checks passed
@wkoszek
wkoszek deleted the issue/99-fix-gpg branch November 16, 2025 06:38
@claude

claude Bot commented Nov 16, 2025

Copy link
Copy Markdown

Review

Path fix correct but incomplete solution

Line 14: Path consistency fixed - both commands now use /tmp/mono-keyring.gpg. However, issue #99 mentions GPG format incompatibility with Debian trixie's apt tools.

Missing:
gpg --export outputs ASCII-armored format by default. Debian trixie's sqv expects binary keyring format.

Suggestion:

gpg --homedir /tmp --no-default-keyring \
    --keyring /tmp/mono-keyring.gpg \
    --export 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | gpg --dearmor \
    > /usr/share/keyrings/mono-official-archive-keyring.gpg

Or pipe directly:

gpg --homedir /tmp --no-default-keyring \
    --keyring /tmp/mono-keyring.gpg \
    --armor --export 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | gpg --dearmor \
    > /usr/share/keyrings/mono-official-archive-keyring.gpg

Test with actual Docker build before merging.

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.

Fix: Dockerfile.ci GPG keyring format incompatibility

1 participant