build-pg-focal: refresh the quilt series against the upstream being built - #1208
Merged
Conversation
…uilt PG14/15/16 could not build 14.24/15.19/16.15: those minors add output_plugin_libraries to postgresql.conf.sample directly below the extension_destdir hunk's trailing context, so the frozen focal-era patch no longer matches verbatim. The pipeline's own gate could not see it. Step [4/6] ran "quilt push -a", and quilt applies with up to two lines of fuzz: Hunk #1 succeeded at 726 with fuzz 2 (offset 1 line) Step [6/6] then let dpkg-source --before-build replay the same series with "patch -t -F 0", which allows no fuzz at all: Hunk #1 FAILED at 725 dpkg-source: info: the patch has fuzz which is not allowed, or is malformed dpkg-buildpackage: error: dpkg-source --before-build . subprocess returned exit status 2 So the gate passed and the build died 25 seconds later, one apt-install of Build-Depends in. PG13 was unaffected only because 13.23 does not touch postgresql.conf.sample. Pairing a moving orig tarball with frozen debian/ packaging makes this recur on every minor, so [4/6] now applies the series with fuzz allowed and refreshes each patch as it goes ("quilt push -a --refresh"), which rewrites patch context for the upstream at hand without changing a single +/- line, then re-applies at --fuzz=0 to assert exactly what dpkg-source is about to check. Patches that needed fuzz are named in the log: such a hunk was placed on less context than its author wrote and is worth an eyeball. Refreshing uses PGDG's own patch style (a/ b/ prefixes, no timestamps, no Index:, @@ function context) so a refreshed patch still diffs minimally against the shipped one. PG_DROP_PATCHES keeps its narrower job: patches that cannot be applied at all, such as hurd-iovec, merged upstream as of 16.14. Verified locally with podman for 14.24, 15.19 and 16.15. The refreshed series produces a source tree byte-identical to the one the original series produces with fuzz, dpkg-source accepts it, and each major builds its full 23-package set against focal's libllvm10. The combined 47-package set installs into a stock ubuntu:20.04 with all three clusters online and JIT available, and every shipped postgresql.conf.sample carries both extension_destdir and upstream's new output_plugin_libraries.
Kemal Büyükkaya (kemalbuyukkaya)
requested review from
ibrahim halatci (ihalatci) and
Selcuk Bozcan (sbozcan)
August 14, 2026 13:55
ibrahim halatci (ihalatci)
approved these changes
Aug 15, 2026
ibrahim halatci (ihalatci)
left a comment
Contributor
There was a problem hiding this comment.
approved with minor comment, could be follow up
…ng us Review feedback on #1208: --refresh turns the fuzz case from a build failure into a log line, and the --fuzz=0 gate structurally cannot catch a mis-placed hunk because refresh has already rewritten the context to match. Low probability with PGDG's small patches, but it was the one signal this change made quieter. Fuzz now raises a CI annotation naming the patch and the file: ::warning::PG14: extension_destdir needed fuzz against 14.24 in src/backend/utils/misc/postgresql.conf.sample -- Hunk #1 succeeded at 726 with fuzz 2 (offset 1 line). One per hunk rather than a grouped summary, so the run page names what drifted without anyone opening a 9000-line log. The runner parses these from the container's stdout, as scripts/smoke_test_focal_debs already relies on. Expect one per fuzzing major on every run: the focal packaging is frozen, so that drift is permanent until the pin moves. A patch that does not apply at all -- the hurd-iovec class, and the likelier future failure -- died via set -e with nothing but quilt's "does not apply (enforce with -f)". It now points at PG_DROP_PATCHES, which is the fix and is not discoverable from quilt's message. Also QUILTRC=/dev/null. patchfns sources /etc/quilt.quiltrc *after* the environment (quilt/scripts/patchfns:31) using plain assignments, so focal's rc silently won: QUILT_REFRESH_ARGS became "--no-timestamps --backup", dropping "-p ab --no-index". Refreshed patches came out in Index:/src.orig style rather than PGDG's a/ b/, plus a debian/patches/*~ backup for every patch. Harmless to the build -- dpkg-source strips -p1 either way, which is why the green run hid it -- but it made the comment on those very lines false. My earlier verification could not see it: the host harness ran quilt unpacked into a prefix, with no /etc/quilt.quiltrc to source. Verified in the focal image, which is the environment that has the rc file: patches refresh in a/ b/ style with no backup litter, dpkg-source accepts at zero fuzz, the injected non-applying patch prints the hint and exits 1, and a full PG14 rebuild yields the same 23 packages at the same versions as before.
Kemal Büyükkaya (kemalbuyukkaya)
merged commit Aug 17, 2026
18c5e89
into
develop
105 of 106 checks passed
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.
Problem
14.24/15.19/16.15 add
output_plugin_librariestopostgresql.conf.sampleright below the trailing context of the Debianextension_destdirhunk. We pair a new orig tarball with the frozen focal-eradebian/, so the patch stopped matching verbatim and PG14/15/16 failed (run 31801139919).The
[4/6]gate missed it because it was weaker than the real check:quilt push -atolerates fuzz <= 2, whiledpkg-source --before-buildreplays the same series in[6/6]withpatch -F 0and refuses it. PG13 was unaffected -- 13.23 doesn't touch that file.Fix
[4/6]now refreshes the series against the upstream at hand, then gates on zero fuzz:Context and line numbers only, no
+/-changes, in PGDG's patch style. A hunk that needed fuzz raises a CI annotation naming the patch and the file, since--refreshbakes that placement in and the gate can no longer catch it. A patch that doesn't apply at all points atPG_DROP_PATCHES. Frozen packaging plus moving upstream guarantees recurrence, hence a standing fix rather than a per-minor edit.Verification
podman locally, plus CI (run 31805259613, all green): refreshed series yields a source tree byte-identical to the fuzzy one; 23 debs per major still linking
libllvm10, signed; combined 59-deb set installs in stockubuntu:20.04with PG13/14/15/16 online and JIT available.