Package: release.debian.org Severity: normal Tags: trixie X-Debbugs-Cc: [email protected] Control: affects -1 + src:postgresql-common User: [email protected] Usertags: pu
Please accept postgresql-common/278+deb13u1 into trixie. [ Reason ] It makes pg_buildext, the tool to compile PostgreSQL server extensions, emit dependencies making sure that an extension compiled against a PG server with the fix for CVE-2026-6460 also depends on the version with that fix. Older server versions were using a macro that now got converted into a function, so packages compiled against the new version will get linker errors when trying to run with older servers. The ">> $version" dependency added prevents that. [ Impact ] Things will still work but without proper dependencies. The user can still upgrade the PG server and extension packages in lockstep. [ Tests ] Manual tests confirmed that the dependency gets added, and t/190_pg_buildext.t is also testing it. [ Risks ] The risk is that the generated dependency is bad, but tests have shown it isn't. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Other ] This needs to be accepted before any extension rebuilds are triggered. (And buildds have to use trixie-proposed-updates.) Christoph
commit be5983885ccd673288f357bcfef368b2bf1d985b Author: Christoph Berg <[email protected]> Date: Mon Nov 9 15:11:45 2026 +0100 pg_buildext, /etc/postgresql-common/minor_versions: Set minimum server versions ... to depend on when extensions are built. Start with the current minor versions just being released. This makes sure packages built with the fix for CVE-2026-6460 depend on a server with that fix. diff --git a/debian/changelog b/debian/changelog index 317ab769..72a366cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +postgresql-common (278+deb13u1) trixie; urgency=medium + + * pg_buildext, /etc/postgresql-common/minor_versions: Set minimum server + versions to depend on when extensions are built. Start with the current + minor versions just being released. This makes sure packages built with + the fix for CVE-2026-6460 depend on a server with that fix. + + -- Christoph Berg <[email protected]> Fri, 13 Nov 2026 17:09:50 +0100 + postgresql-common (278) unstable; urgency=medium * pg_upgradecluster: Do two vacuumdb runs in analyze hook for PG18+. diff --git a/debian/minor_versions b/debian/minor_versions new file mode 100644 index 00000000..eed22d60 --- /dev/null +++ b/debian/minor_versions @@ -0,0 +1,11 @@ +# This file is used by pg_buildext to map PostgreSQL major versions to the +# minimum minor versions that extension packages built against the server +# should depend on. + +20 20~~devel +19 19~rc2 +18 18.7 +17 17.12 +16 16.16 +15 15.20 +14 14.25 diff --git a/debian/postgresql-common-dev.install b/debian/postgresql-common-dev.install index 80e03f59..8ab5e238 100644 --- a/debian/postgresql-common-dev.install +++ b/debian/postgresql-common-dev.install @@ -1,5 +1,6 @@ debhelper/Debian /usr/share/perl5 debhelper/dh_pgxs_test /usr/bin +debian/minor_versions etc/postgresql-common debian/supported-versions usr/share/postgresql-common dh_make_pgxs/debian /usr/share/postgresql-common/dh_make_pgxs dh_make_pgxs/dh_make_pgxs /usr/bin diff --git a/pg_buildext b/pg_buildext index 47b95b3a..4d810a14 100755 --- a/pg_buildext +++ b/pg_buildext @@ -4,7 +4,7 @@ # versions # # (C) 2010 Dimitri Fontaine <[email protected]> -# (C) 2011-2025 Christoph Berg <[email protected]> +# (C) 2011-2026 Christoph Berg <[email protected]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -91,7 +91,14 @@ substvars() { version="$1" package="$2" - depends="postgresql-$version" + # for major version $version, look up the minimum minor version to depend on + for file in debian/minor_versions /etc/postgresql-common/minor_versions; do + if test -f $file; then + minor_version=$(awk "/^$version/ { print \$2 }" $file) + break + fi + done + depends="postgresql-$version${minor_version:+ (>> $minor_version)}" if [ -d "debian/$package/usr/lib/postgresql/$version/lib/bitcode" ]; then pg_provides=$(dpkg-query --show --showformat='${Provides}' postgresql-$version | grep -o 'postgresql-[0-9]*-jit-llvm (= [0-9.]*') llvm_version=${pg_provides#*= } diff --git a/t/190_pg_buildext.t b/t/190_pg_buildext.t index 05f33692..200e3f74 100644 --- a/t/190_pg_buildext.t +++ b/t/190_pg_buildext.t @@ -51,6 +51,14 @@ program_ok 'nobody', 'cd foo-123 && DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage foreach my $ver (@versions) { my $deb = "postgresql-$ver-foo_123-1_$arch.deb"; ok (-f $deb, "$deb was built"); + my $info = `dpkg-deb --info $deb control`; + like $info, qr/^Depends: postgresql-$ver/m, "correct postgresql dependency"; + like $info, qr/^Depends: postgresql-$ver \(>> $ver/m, "correct versioned postgresql dependency" if ($ver >= 14); + my $dbgsym = "postgresql-$ver-foo-dbgsym_123-1_$arch.deb"; # Debian + my $ddbgsym = "postgresql-$ver-foo-dbgsym_123-1_$arch.ddeb"; # Ubuntu + ok (-f $dbgsym or -f $ddbgsym, "$dbgsym was built"); + + # test in-tree installcheck SKIP: { my $have_extension_destdir = `grep extension_destdir /usr/share/postgresql/$ver/postgresql.conf.sample`; skip "No in-tree installcheck on PG $ver (missing extension_destdir)", 2 unless ($have_extension_destdir);

