Add PostgreSQL 16 core package build for Ubuntu focal#1182
Add PostgreSQL 16 core package build for Ubuntu focal#1182kemalbuyukkaya wants to merge 7 commits into
Conversation
|
@kemalbuyukkaya please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
we need to build all PG versions we can build not just 16. try to make it parameterized if possible. |
|
also, we might want to keep this in its own branch and not merge it into develop, please check with Ibrahim |
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.
ebda318 to
4a773db
Compare
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: