Add PostgreSQL 16 core package build for Ubuntu focal - #1182
Closed
kemalbuyukkaya wants to merge 7 commits into
Closed
Add PostgreSQL 16 core package build for Ubuntu focal#1182kemalbuyukkaya wants to merge 7 commits into
kemalbuyukkaya wants to merge 7 commits into
Conversation
Member
|
we need to build all PG versions we can build not just 16. try to make it parameterized if possible. |
Member
|
also, we might want to keep this in its own branch and not merge it into develop, please check with Ibrahim |
kemalbuyukkaya
force-pushed
the
pg16-focal
branch
from
June 18, 2026 14:09
9ee6d1c to
9ba0f97
Compare
PGDG dropped PostgreSQL 16 binaries for Ubuntu 20.04 (focal) after focal reached EOL standard support (last official focal build: 16.9-1.pgdg20.04+1). This adds a standalone, signed pipeline that rebuilds newer 16.x core packages for focal. Approach (validated locally; produces the full 13-package set that installs and runs on stock focal with working JIT): - Combine the newer upstream orig.tar.bz2 with the focal-era debian/ packaging (16.9-1.pgdg20.04+1), whose default toolchain (clang/llvm-dev = LLVM 10) yields focal-native dependencies (libicu66, libssl1.1, libldap-2.4-2, libllvm10) instead of the clang-19/llvm-19 required by newer packaging. - Restore the removed focal-pgdg build tooling (debhelper 13, dh-exec, postgresql-common-dev) from apt-archive.postgresql.org. - Drop the obsolete hurd-iovec patch (merged upstream as of 16.14) and gate on the full quilt series applying cleanly so future drift fails loudly. - Sign with the existing debsigner image (debsigs --sign=maint), using the pg-azure-storage signing secrets (PGAZ_PACKAGE_SECRET_KEY / PGAZ_PACKAGE_PASSPHRASE), matching build-pgazure-nightlies.yml. The minor version is parameterized: set PG_UPSTREAM_VERSION (workflow input pg_upstream_version) to build e.g. 16.15; the orig/debian checksums are auto-resolved from the official .dsc unless pinned. Files: - dockerfiles/pg16-focal-builder/Dockerfile: focal builder image - scripts/build_pg16_focal: fetch/verify/assemble/build entrypoint - .github/workflows/build-pg16-focal.yml: build -> sign -> verify -> upload
The packaging signing secrets in this repo (incl. PGAZ_PACKAGE_SECRET_KEY) are
stored as raw ASCII-armored keys, not base64. import_and_sign assumed base64 and
ran `base64 -d` first, which fails on armored input ("base64: invalid input" ->
"no valid OpenPGP data found" -> "secret key not available").
Detect the format: import ASCII-armored keys directly, otherwise base64-decode
as before (backward compatible). Also verify a PRIVATE key was actually imported
and exit non-zero with an actionable message if only a public key is present, so
debsigs never silently emits unsigned packages.
Validated in the xenial debsigner image: armored private key -> signs
(_gpgmaint added); base64 key -> signs; armored public-only key -> exits 78.
build-package.yml and build-package-test.yml trigger on every branch (branches: "**") and run the Citus extension build plus test_build_packages, which is unrelated to the PostgreSQL-core focal pipeline and fails here on a pre-existing PACKAGING_PASSPHRASE mismatch. Exclude pg16-focal via branches-ignore so it no longer blocks this work; workflow_dispatch stays.
Roll back the earlier workarounds now that signing uses the prebuilt citusdata/packaging:debsigner image: - dockerfiles/debsigner/scripts/import_and_sign: back to upstream (we no longer build our own signer, so the armored-key handling is unnecessary). - build-package.yml / build-package-test.yml: restore branches: "**" (drop the pg16-focal branches-ignore guard) to avoid touching shared extension CI. These three files now match develop; only the PostgreSQL-core focal pipeline remains in this branch.
The signer images are maintained out-of-band (not built by this repo's image pipeline), so the deployed citusdata/packaging:debsigner has drifted from dockerfiles/debsigner. Building our own signer from that source could not import the same signing key that signs every other Citus package, while the deployed image does (pg-azure-storage nightlies are green with PGAZ_PACKAGE_SECRET_KEY). Use the prebuilt citusdata/packaging:debsigner with a Docker Hub login and pipe the passphrase via stdin + env, mirroring citus_package.sign_packages. Pin the job to ubuntu-20.04 to match the green pg-azure-storage signing pipeline.
Revert the ubuntu-20.04 pin to ubuntu-latest to stay future-proof as GitHub retires the hosted ubuntu-20.04 image. Signing uses the prebuilt citusdata/packaging:debsigner image (same as all-citus, which signs fine on ubuntu-latest), so the runner version is not the relevant factor.
PGAZ_PACKAGE_SECRET_KEY is only referenced on the pg-azure-storage branches and did not import in our run. Switch to the common signing secrets used across the other pipelines (PACKAGING_SECRET_KEY / PACKAGING_PASSPHRASE) to match the standard convention.
kemalbuyukkaya
force-pushed
the
pg16-focal
branch
from
June 19, 2026 12:23
ebda318 to
4a773db
Compare
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.
PGDG dropped PostgreSQL 16 binaries for Ubuntu 20.04 (focal) after focal reached EOL standard support; the last official focal build was 16.9-1.pgdg20.04+1. This adds a standalone, signed build pipeline that rebuilds newer 16.x core packages for focal.
Approach (validated locally, produces the full 13-package set that installs and runs on stock focal with working JIT):
The minor version is parameterized: set PG_UPSTREAM_VERSION (workflow input pg_upstream_version) to build e.g. 16.15; the orig/debian checksums are auto-resolved from the official .dsc unless pinned.
Files: