Skip to content

Fix Rocky 9 CI (PGDG repo pin and path); document validation trust boundaries - #6

Merged
proddata merged 3 commits into
mainfrom
ci-pgdg-pin-and-source-comments
Oct 1, 2026
Merged

proddata merged 3 commits into
mainfrom
ci-pgdg-pin-and-source-comments

Conversation

@proddata

@proddata proddata commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Summary

Unblocks the Rocky Linux 9 compatibility job, which fails on main today independent of any source change, and adds trust-boundary comments to the validation sources. Three commits, separable:

  1. Pin PGDG repo RPM 42.0-70. postgresql.org no longer serves 42.0-66 (404). The new RPM was verified in the pinned Rocky 9 image before pinning: header and payload digests and the RSA/SHA256 signature check against the PGDG RPM key (fingerprint D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20).
  2. Select the unversioned PGDG tree. Repo RPM 42.0-70 builds the URL from the OS minor (rhel-9.3-x86_64 on our pinned image), and PGDG now publishes only 9.6-9.8 plus the unversioned rhel-9-x86_64. The script rewrites the repo definition to the unversioned path and fails if the expected pattern is absent, so a future layout change is noticed.
  3. Comments only (88 added lines, 0 deleted): a header on validator.c, jwt_envelope.c, jwks.c, signature.c, policy.c stating what each stage trusts and must never do, plus inline notes where an ordering or rejection is deliberate (claims only after signature; libjwt time checks disabled in favor of the injectable-clock claims stage; exact-case algorithm allowlist; two-sided delegation check).

No behavior, policy, or release change. Independent of #5.

Trust boundary and risk

CI-only change (a pinned bootstrap RPM and repo path). The pin is still hash-checked before install, and repo and package GPG checks remain enforced. The base image stays pinned. The unversioned PGDG tree tracks the newest 9.x builds, which is how earlier repo RPMs behaved. This is a compatibility signal, not a release builder.

The pin will break again when PGDG next rotates the file. Mirroring the reviewed RPM, and moving off the 9.3 base image, are the durable fixes and are left for a deliberate follow-up.

Verification

In the pinned PostgreSQL 18 container: dev-verify-pg18 pass, scripts/format-c.sh --check pass (comments reflowed to pgindent's layout).

Locally on Rocky 9 (amd64 emulated on an Apple-silicon Mac): dependency install now succeeds, the image builds, and the strict build plus verify-dev pass. packagecheck then hit a segmentation fault inside make install (pgxs.mk:256). I believe this is an emulation artifact, because the same step passed natively on GitHub runners when main last ran (2026-09-22), but I could not confirm it locally. This PR's Rocky 9 check on native runners is the real verification; if it fails at install, the cause is something else.

Not run locally: Fedora 44 job, PostgreSQL 19, static analysis, sanitizers.

🤖 Generated with Claude Code

Georg Traar and others added 3 commits October 1, 2026 22:04
postgresql.org no longer serves pgdg-redhat-repo-42.0-66, so the Rocky Linux
9 compatibility job fails with a 404 while installing dependencies,
independent of any source change. Pin 42.0-70 and its SHA-256.

Verified before pinning, in the pinned Rocky 9 image: the RPM's header and
payload digests and its RSA/SHA256 signature check out against the PGDG RPM
key (fingerprint D4BF 08AE 67A0 B4C7 A1DB CCD2 40BC A2B4 08B4 0D20). The
upstream file rotates, so this pin will need refreshing again; mirroring the
reviewed RPM is the durable fix.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add a header to the validator, envelope, JWKS, signature, and policy sources
saying what each stage trusts and must never do, plus inline notes where an
ordering or rejection is deliberate (claims only after signature, libjwt time
checks disabled in favor of the injectable-clock claims stage, exact-case
algorithm allowlist, two-sided delegation check). Comments only; no code
change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PGDG repo RPM 42.0-70 builds the repository URL from the OS minor release
(rhel-$releasever_major.$releasever_minor). The Rocky 9 image used here is
9.3, and PGDG now publishes only the recent minors (9.6-9.8) plus the
unversioned rhel-9-x86_64 tree that earlier repo RPMs used, so the pgdg18
repository returned 404 after the pin bump.

Rewrite the installed repo definition to the unversioned path and fail the
script if the expected pattern is not present, so a future repo RPM layout
change is noticed instead of silently ignored.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@proddata
proddata merged commit e9a7985 into main Oct 1, 2026
10 checks passed
@proddata
proddata deleted the ci-pgdg-pin-and-source-comments branch October 15, 2026 06:23
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.

1 participant