From c04efb0ce11a51f847c5d6f3bed461d2797165d2 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:33:39 +0200 Subject: [PATCH 01/17] postgresqlPackages.tds_fdw: 2.0.3-unstable-2024-02-10 -> 2.0.4 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/tds-fdw/tds_fdw/releases/tag/v2.0.4 --- pkgs/servers/sql/postgresql/ext/tds_fdw.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/tds_fdw.nix b/pkgs/servers/sql/postgresql/ext/tds_fdw.nix index 4a192cda9aa33..2dbf344fc6249 100644 --- a/pkgs/servers/sql/postgresql/ext/tds_fdw.nix +++ b/pkgs/servers/sql/postgresql/ext/tds_fdw.nix @@ -2,16 +2,15 @@ stdenv.mkDerivation rec { pname = "tds_fdw"; - # Move to stable version when it's released. - version = "2.0.3-unstable-2024-02-10"; + version = "2.0.4"; buildInputs = [ postgresql freetds ]; src = fetchFromGitHub { owner = "tds-fdw"; repo = "tds_fdw"; - rev = "f78bd38955d01d3ca357b90717588ec2f90b4991"; - hash = "sha256-3J8wzk0YIxRPhALd5PgVW000hzQw3r4rTrnqg9uB/Bo="; + rev = "v${version}"; + hash = "sha256-ruelOHueaHx1royLPvDM8Abd1rQD62R4KXgtHY9qqTw="; }; installPhase = '' @@ -21,13 +20,10 @@ stdenv.mkDerivation rec { install -D tds_fdw.control -t $out/share/postgresql/extension ''; - passthru.updateScript = unstableGitUpdater { - tagPrefix = "v"; - }; - meta = with lib; { description = "PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)"; homepage = "https://github.com/tds-fdw/tds_fdw"; + changelog = "https://github.com/tds-fdw/tds_fdw/releases/tag/v${version}"; maintainers = [ maintainers.steve-chavez ]; platforms = postgresql.meta.platforms; license = licenses.postgresql; From b6d191bbc2c0522568a2ce7a7865c37106148430 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:34:46 +0200 Subject: [PATCH 02/17] postgresqlPackages.plr: 8.4.6 -> 8.4.7 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/postgres-plr/plr/blob/master/changelog.md#846---2023-08-01 --- pkgs/servers/sql/postgresql/ext/plr.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/plr.nix b/pkgs/servers/sql/postgresql/ext/plr.nix index 05d22c19a8b0c..b30b59b86d2a1 100644 --- a/pkgs/servers/sql/postgresql/ext/plr.nix +++ b/pkgs/servers/sql/postgresql/ext/plr.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "plr"; - version = "8.4.6"; + version = "8.4.7"; src = fetchFromGitHub { owner = "postgres-plr"; repo = "plr"; rev = "REL${builtins.replaceStrings ["."] ["_"] version}"; - sha256 = "sha256-c+wKWL66pulihVQnhdbzivrZOMD1/FfOpb+vFoHgqVg="; + sha256 = "sha256-PdvFEmtKfLT/xfaf6obomPR5hKC9F+wqpfi1heBphRk="; }; nativeBuildInputs = [ pkg-config ]; @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "PL/R - R Procedural Language for PostgreSQL"; homepage = "https://github.com/postgres-plr/plr"; + changelog = "https://github.com/postgres-plr/plr/blob/${src.rev}/changelog.md"; maintainers = with maintainers; [ qoelet ]; platforms = postgresql.meta.platforms; license = licenses.gpl2Only; From d37563232d38851f090a81db0b170f7c4858c4f1 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:36:35 +0200 Subject: [PATCH 03/17] postgresqlPackages.pgroonga: 3.1.8 -> 3.2.3 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/pgroonga/pgroonga/releases --- pkgs/servers/sql/postgresql/ext/pgroonga.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pgroonga.nix b/pkgs/servers/sql/postgresql/ext/pgroonga.nix index 0ba7fa093820c..3a7c9e237f98f 100644 --- a/pkgs/servers/sql/postgresql/ext/pgroonga.nix +++ b/pkgs/servers/sql/postgresql/ext/pgroonga.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "pgroonga"; - version = "3.1.8"; + version = "3.2.3"; src = fetchurl { url = "https://packages.groonga.org/source/${pname}/${pname}-${version}.tar.gz"; - hash = "sha256-Wjh0NJK6IfcI30R7HKCsB87/lxXZYEqiMD9t2nldCW4="; + hash = "sha256-k9+DgiLzU2cA3jvw3pMF7/FmDGxsCYtAOaUtf2LMTnw="; }; nativeBuildInputs = [ pkg-config ]; From 10d228bc7fa94e848c987a68c2bbc36ce633af0b Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:39:32 +0200 Subject: [PATCH 04/17] postgresqlPackages.pg_squeeze: 1.6.2 -> 1.7.0 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/cybertec-postgresql/pg_squeeze/releases The changelog is only available for beta 2, but 1.7.0 was released properly after that without changelog. --- pkgs/servers/sql/postgresql/ext/pg_squeeze.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix b/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix index d91b0fb1c1a5c..a5bd1ed1c31fa 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_squeeze.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "pg_squeeze"; - version = "1.6.2"; + version = "1.7.0"; src = fetchFromGitHub { owner = "cybertec-postgresql"; repo = "pg_squeeze"; rev = "REL${builtins.replaceStrings ["."] ["_"] finalAttrs.version}"; - hash = "sha256-YS13iIpQ4NJe0N6bRVa2RDxEMwEzBc2mjNYM5/Vqjn8="; + hash = "sha256-Kh1wSOvV5Rd1CG/na3yzbWzvaR8SJ6wmTZOnM+lbgik="; }; buildInputs = [ From 6d1cbda7248beb00cf5a30b46ec375153371d0f5 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:41:04 +0200 Subject: [PATCH 05/17] postgresqlPackages.pg_similarity: 1.0 -> 1.0-unstable-2021-01-12 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/eulerto/pg_similarity/compare/pg_similarity_1_0...master --- pkgs/servers/sql/postgresql/ext/pg_similarity.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_similarity.nix b/pkgs/servers/sql/postgresql/ext/pg_similarity.nix index a0669331055b0..5f05d7925af0a 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_similarity.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_similarity.nix @@ -1,14 +1,14 @@ -{ stdenv, lib, fetchFromGitHub, gcc, postgresql }: +{ stdenv, lib, fetchFromGitHub, gcc, postgresql, unstableGitUpdater }: stdenv.mkDerivation { - pname = "pg_similarity"; - version = "1.0"; + version = "1.0-unstable-2021-01-12"; + src = fetchFromGitHub { owner = "eulerto"; repo = "pg_similarity"; - rev = "be1a8b08c8716e59b89982557da9ea68cdf868c5"; - sha256 = "1z4v4r2yccdr8kz3935fnk1bc5vj0qj0apscldyap4wxlyi89xim"; + rev = "b9cb0a2d501b91e33cd1ef550b05483ca3563f71"; + sha256 = "sha256-L04ANvyfzHgW7fINeJEY6T77Vojq3SI8P1TWiCRSPs0="; }; buildInputs = [ postgresql gcc ]; @@ -20,6 +20,8 @@ stdenv.mkDerivation { install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/postgresql/extension ''; + passthru.updateScript = unstableGitUpdater {}; + meta = { description = "Extension to support similarity queries on PostgreSQL"; longDescription = '' From 31d68c9d30f682211693e96daa4385acae8fb824 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 21:37:24 +0200 Subject: [PATCH 06/17] postgresql16Packages.pg_similarity: fix build on darwin Also fixes the build on linux with clang (JIT). --- pkgs/servers/sql/postgresql/ext/pg_similarity.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_similarity.nix b/pkgs/servers/sql/postgresql/ext/pg_similarity.nix index 5f05d7925af0a..8bcb8777c57bc 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_similarity.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_similarity.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, gcc, postgresql, unstableGitUpdater }: +{ stdenv, lib, fetchFromGitHub, fetchpatch, postgresql, unstableGitUpdater }: stdenv.mkDerivation { pname = "pg_similarity"; @@ -11,7 +11,17 @@ stdenv.mkDerivation { sha256 = "sha256-L04ANvyfzHgW7fINeJEY6T77Vojq3SI8P1TWiCRSPs0="; }; - buildInputs = [ postgresql gcc ]; + patches = [ + (fetchpatch { + # https://github.com/eulerto/pg_similarity/pull/43 + # Also applied in debian as https://sources.debian.org/data/main/p/pg-similarity/1.0-8/debian/patches/pg16 + name = "pg16.patch"; + url = "https://github.com/eulerto/pg_similarity/commit/f7781ea5ace80f697a8249e03e3ce47d4b0f6b2f.patch"; + hash = "sha256-MPDvWfNzSg28lXL5u5/Un9pOCJjqJ4Fz9b8XCfalgts="; + }) + ]; + + buildInputs = [ postgresql ]; makeFlags = [ "USE_PGXS=1" ]; From f36c4e6bbff8c490bcc9db247e1d1ca4f33df6da Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:41:45 +0200 Subject: [PATCH 07/17] postgresqlPackages.pg_ivm: 1.8 -> 1.9 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/sraoss/pg_ivm/releases/tag/v1.9 --- pkgs/servers/sql/postgresql/ext/pg_ivm.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_ivm.nix b/pkgs/servers/sql/postgresql/ext/pg_ivm.nix index 46c01251d503e..fcae540d1356d 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_ivm.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_ivm.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "pg_ivm"; - version = "1.8"; + version = "1.9"; src = fetchFromGitHub { owner = "sraoss"; repo = pname; rev = "v${version}"; - hash = "sha256-HncWX3jx9sEvxGGMMZ9QT4tDQ4JYbkNrFw2aZHgCVE8="; + hash = "sha256-Qcie7sbXcMbQkMoFIYBfttmvlYooESdSk2DyebHKPlk="; }; buildInputs = [ postgresql ]; From 9fc6c9536f2eee558acbd6d1055f3e6b2e6b69fe Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:42:45 +0200 Subject: [PATCH 08/17] postgresqlPackages.pg_cron: 1.6.2 -> 1.6.4 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/citusdata/pg_cron/releases/tag/v1.6.3 https://github.com/citusdata/pg_cron/releases/tag/v1.6.4 --- pkgs/servers/sql/postgresql/ext/pg_cron.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_cron.nix b/pkgs/servers/sql/postgresql/ext/pg_cron.nix index 02c6e6435ae75..3dea36f7e7404 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_cron.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_cron.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "pg_cron"; - version = "1.6.2"; + version = "1.6.4"; buildInputs = [ postgresql ]; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { owner = "citusdata"; repo = pname; rev = "v${version}"; - hash = "sha256-/dD1gX0+RRsBFIjSV9TVk+ppPw0Jrzssl+rRZ2qAp4w="; + hash = "sha256-t1DpFkPiSfdoGG2NgNT7g1lkvSooZoRoUrix6cBID40="; }; installPhase = '' @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Run Cron jobs through PostgreSQL"; homepage = "https://github.com/citusdata/pg_cron"; - changelog = "https://github.com/citusdata/pg_cron/raw/v${version}/CHANGELOG.md"; + changelog = "https://github.com/citusdata/pg_cron/releases/tag/v${version}"; maintainers = with maintainers; [ thoughtpolice ]; platforms = postgresql.meta.platforms; license = licenses.postgresql; From 8b831f9b151877908fe15a7281d815bb87e63100 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:43:32 +0200 Subject: [PATCH 09/17] postgresqlPackages.lantern: 0.2.4 -> 0.3.3 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/lanterndata/lantern/releases --- pkgs/servers/sql/postgresql/ext/lantern.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/lantern.nix index 9a3e01d535375..118c19699292a 100644 --- a/pkgs/servers/sql/postgresql/ext/lantern.nix +++ b/pkgs/servers/sql/postgresql/ext/lantern.nix @@ -2,19 +2,20 @@ , stdenv , cmake , fetchFromGitHub +, openssl , postgresql , postgresqlTestHook }: stdenv.mkDerivation (finalAttrs: { pname = "postgresql-lantern"; - version = "0.2.4"; + version = "0.3.3"; src = fetchFromGitHub { owner = "lanterndata"; repo = "lantern"; rev = "v${finalAttrs.version}"; - hash = "sha256-d5CdS11Z0u8+oPvjH6gVx6k8y05SS6wU3PnafcEgQeY="; + hash = "sha256-aw003Y2T9/yNJ5dkCD+qQsUO2V7Q63I/E2IFaZAPd90="; fetchSubmodules = true; }; @@ -23,6 +24,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ + openssl postgresql ]; From 97b965aedbdded70e5e26b6db5b9f0870767d981 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 11:44:09 +0200 Subject: [PATCH 10/17] postgresqlPackages.plv8: 3.2.2 -> 3.2.3 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/plv8/plv8/blob/r3.2/Changes --- pkgs/servers/sql/postgresql/ext/plv8/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/plv8/default.nix b/pkgs/servers/sql/postgresql/ext/plv8/default.nix index e0dbc19e353fa..2c375babd4647 100644 --- a/pkgs/servers/sql/postgresql/ext/plv8/default.nix +++ b/pkgs/servers/sql/postgresql/ext/plv8/default.nix @@ -15,13 +15,13 @@ let libv8 = nodejs_20.libv8; in stdenv.mkDerivation (finalAttrs: { pname = "plv8"; - version = "3.2.2"; + version = "3.2.3"; src = fetchFromGitHub { owner = "plv8"; repo = "plv8"; rev = "v${finalAttrs.version}"; - hash = "sha256-azO33v22EF+/sTNmwswxyDR0PhrvWfTENuLu6JgSGJ0="; + hash = "sha256-ivQZJSNn5giWF351fqZ7mBZoJkGtby5T7beK45g3Zqs="; }; patches = [ @@ -135,6 +135,7 @@ in stdenv.mkDerivation (finalAttrs: { meta = with lib; { description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL"; homepage = "https://plv8.github.io/"; + changelog = "https://github.com/plv8/plv8/blob/r${finalAttrs.version}/Changes"; maintainers = [ ]; platforms = [ "x86_64-linux" "aarch64-linux" ]; license = licenses.postgresql; From d055dc25db736d1dd055766752c28ed3a732469f Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 25 Oct 2024 20:03:37 +0200 Subject: [PATCH 11/17] postgresqlPackages.pg_topn: 2.6.0 -> 2.7.0 Makes building with PostgreSQL 17 succeed. Changelog: https://github.com/citusdata/postgresql-topn/blob/master/CHANGELOG.md#topn-v270-october-18-2024 --- pkgs/servers/sql/postgresql/ext/pg_topn.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_topn.nix b/pkgs/servers/sql/postgresql/ext/pg_topn.nix index 2a11417c90831..b210db9104112 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_topn.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_topn.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "pg_topn"; - version = "2.6.0"; + version = "2.7.0"; buildInputs = [ postgresql ]; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { owner = "citusdata"; repo = "postgresql-topn"; rev = "refs/tags/v${version}"; - sha256 = "sha256-kq3P+a9NWLKN/CsISGHfInbeL4ex4KIeDhTKyyN7FVE="; + sha256 = "sha256-lP6Iil/BUv4ga+co+oBpKv1FBqFuBGfNjueEolM6png="; }; installPhase = '' From 1b19f8df556d9fd84b46218d0afed59c36844510 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 21:46:28 +0200 Subject: [PATCH 12/17] postgresql16Packages.pg_ed25519: mark as broken on darwin Broken on linux (JIT) as well. --- pkgs/servers/sql/postgresql/ext/pg_ed25519.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix b/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix index 010f8f819da94..57bf1b62e15f8 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_ed25519.nix @@ -27,6 +27,8 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.renzo ]; platforms = postgresql.meta.platforms; license = licenses.mit; + # Broken on darwin and linux (JIT) with no upstream fix available. + broken = lib.versionAtLeast postgresql.version "16" && stdenv.cc.isClang; }; } From 9789c756bff1b923a5c1e420c4fd251896bb8e26 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 29 Sep 2024 21:46:54 +0200 Subject: [PATCH 13/17] postgresql16Packages.smlar: mark as broken on darwin Broken on linux (JIT) as well. --- pkgs/servers/sql/postgresql/ext/smlar.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/servers/sql/postgresql/ext/smlar.nix b/pkgs/servers/sql/postgresql/ext/smlar.nix index 12fdd79cc8f42..4188c3b9c99a1 100644 --- a/pkgs/servers/sql/postgresql/ext/smlar.nix +++ b/pkgs/servers/sql/postgresql/ext/smlar.nix @@ -26,5 +26,7 @@ stdenv.mkDerivation rec { platforms = postgresql.meta.platforms; license = licenses.bsd2; maintainers = [ ]; + # Broken on darwin and linux (JIT) with no upstream fix available. + broken = lib.versionAtLeast postgresql.version "16" && stdenv.cc.isClang; }; } From 4cc4534295812864ed8dab03537288fd3a3f3e5d Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 28 Sep 2024 21:36:28 +0200 Subject: [PATCH 14/17] postgresql_17: init at 17.0 --- pkgs/servers/sql/postgresql/17.nix | 6 ++++++ pkgs/servers/sql/postgresql/default.nix | 1 + pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix | 4 ++++ pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix | 4 ++++ pkgs/servers/sql/postgresql/ext/pgaudit.nix | 4 ++++ pkgs/servers/sql/postgresql/generic.nix | 12 +++++++----- pkgs/top-level/all-packages.nix | 6 +++++- 7 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 pkgs/servers/sql/postgresql/17.nix diff --git a/pkgs/servers/sql/postgresql/17.nix b/pkgs/servers/sql/postgresql/17.nix new file mode 100644 index 0000000000000..5d8d8cd693c29 --- /dev/null +++ b/pkgs/servers/sql/postgresql/17.nix @@ -0,0 +1,6 @@ +import ./generic.nix { + version = "17.0"; + hash = "sha256-fidhMcD91rYliNutmzuyS4w0mNUAkyjbpZrxboGRCd4="; + # TODO: Add dont-use-locale-a-on-musl.patch once Alpine Linux has PostgreSQL 17. + # MR in: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/72853 +} diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 3040e8074b32c..8eb20188651f7 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -14,6 +14,7 @@ let postgresql_14 = ./14.nix; postgresql_15 = ./15.nix; postgresql_16 = ./16.nix; + postgresql_17 = ./17.nix; }; mkAttributes = jitSupport: diff --git a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix index afc5b9fe65065..8983acb3152a3 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix @@ -2,6 +2,10 @@ let source = { + "17" = { + version = "1.7.0"; + hash = "sha256-MNQMePDmGxC8OFIJuVJrhfgU566vkng00+tjeGpGKvs="; + }; "16" = { version = "1.6.0"; hash = "sha256-lg7N0QblluTgtNo1tGZjirNJSyQXtcAEs9Jqd3zx0Sg="; diff --git a/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix b/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix index 6637c98c95654..4aeec3e31f090 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix @@ -21,6 +21,10 @@ with { version = "1.5"; sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs="; }; + "17" = { + version = "1.5"; + sha256 = "sha256-RRSpkWLFuif+6RCncnsb1NnjKnIIRY9KgebKkjCN5cs="; + }; }."${lib.versions.major postgresql.version}" or (throw "pg_safeupdate: version specification for pg ${postgresql.version} missing."); stdenv.mkDerivation rec { diff --git a/pkgs/servers/sql/postgresql/ext/pgaudit.nix b/pkgs/servers/sql/postgresql/ext/pgaudit.nix index f4c03d611f503..1079a13b2dfc0 100644 --- a/pkgs/servers/sql/postgresql/ext/pgaudit.nix +++ b/pkgs/servers/sql/postgresql/ext/pgaudit.nix @@ -2,6 +2,10 @@ let source = { + "17" = { + version = "17.0"; + hash = "sha256-3ksq09wiudQPuBQI3dhEQi8IkXKLVIsPFgBnwLiicro="; + }; "16" = { version = "16.0"; hash = "sha256-8+tGOl1U5y9Zgu+9O5UDDE4bec4B0JC/BQ6GLhHzQzc="; diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 07cff1a1adae0..4054d8adde1d4 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -5,7 +5,7 @@ let { stdenv, lib, fetchurl, fetchpatch, makeWrapper , glibc, zlib, readline, openssl, icu, lz4, zstd, systemdLibs, libossp_uuid , pkg-config, libxml2, tzdata, libkrb5, substituteAll, darwin - , linux-pam + , linux-pam, bison, flex, perl, docbook_xml_dtd_45, docbook-xsl-nons, libxslt , removeReferencesTo, writeShellApplication @@ -117,7 +117,8 @@ let pkg-config removeReferencesTo ] - ++ lib.optionals jitSupport [ llvmPackages.llvm.dev nukeReferences ]; + ++ lib.optionals jitSupport [ llvmPackages.llvm.dev nukeReferences ] + ++ lib.optionals (atLeast "17") [ bison flex perl docbook_xml_dtd_45 docbook-xsl-nons libxslt ]; enableParallelBuilding = true; @@ -153,7 +154,8 @@ let ++ lib.optionals stdenv'.hostPlatform.isLinux [ "--with-pam" ] # This could be removed once the upstream issue is resolved: # https://postgr.es/m/flat/427c7c25-e8e1-4fc5-a1fb-01ceff185e5b%40technowledgy.de - ++ lib.optionals (stdenv'.hostPlatform.isDarwin && atLeast "16") [ "LDFLAGS_EX_BE=-Wl,-export_dynamic" ]; + ++ lib.optionals (stdenv'.hostPlatform.isDarwin && atLeast "16") [ "LDFLAGS_EX_BE=-Wl,-export_dynamic" ] + ++ lib.optionals (atLeast "17") [ "--without-perl" ]; patches = [ (if atLeast "16" then ./patches/relative-to-symlinks-16+.patch else ./patches/relative-to-symlinks.patch) @@ -166,7 +168,7 @@ let src = ./patches/locale-binary-path.patch; locale = "${if stdenv.hostPlatform.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; }) - + ] ++ lib.optionals (olderThan "17") [ # TODO: Remove this with the next set of minor releases (fetchpatch ( if atLeast "14" then { @@ -182,7 +184,7 @@ let hash = "sha256-L8/ns/fxTh2ayfDQXtBIKaArFhMd+v86UxVFWQdmzUw="; excludes = [ "doc/*" ]; }) - ) + ) ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 map fetchurl (lib.attrValues muslPatches) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b7d3dfb911546..435974b4cf08b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24867,12 +24867,14 @@ with pkgs; postgresql_14 postgresql_15 postgresql_16 + postgresql_17 postgresql_12_jit postgresql_13_jit postgresql_14_jit postgresql_15_jit postgresql_16_jit + postgresql_17_jit ; postgresql = postgresql_16; postgresql_jit = postgresql_16_jit; @@ -24882,12 +24884,14 @@ with pkgs; postgresql13Packages = recurseIntoAttrs postgresql_13.pkgs; postgresql14Packages = recurseIntoAttrs postgresql_14.pkgs; postgresql15Packages = recurseIntoAttrs postgresql_15.pkgs; + postgresql16Packages = recurseIntoAttrs postgresql_16.pkgs; + postgresql17Packages = recurseIntoAttrs postgresql_17.pkgs; postgresql12JitPackages = recurseIntoAttrs postgresql_12_jit.pkgs; postgresql13JitPackages = recurseIntoAttrs postgresql_13_jit.pkgs; postgresql14JitPackages = recurseIntoAttrs postgresql_14_jit.pkgs; postgresql15JitPackages = recurseIntoAttrs postgresql_15_jit.pkgs; postgresql16JitPackages = recurseIntoAttrs postgresql_16_jit.pkgs; - postgresql16Packages = postgresqlPackages; + postgresql17JitPackages = recurseIntoAttrs postgresql_17_jit.pkgs; postgresql_jdbc = callPackage ../development/java-modules/postgresql_jdbc { }; From 203af243af4624cccc171fec49d672bf50d16616 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 27 Oct 2024 08:30:43 +0100 Subject: [PATCH 15/17] postgresql17Packages: mark remaining extensions as broken Those extensions don't support building with PostgreSQL 17, yet. To make sure they will show up as build failures after the next package upgrade, they all have version checks for their own package version included. --- pkgs/servers/sql/postgresql/ext/age.nix | 2 ++ pkgs/servers/sql/postgresql/ext/citus.nix | 5 ++++- pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix | 3 +++ pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix | 5 ++++- pkgs/servers/sql/postgresql/ext/repmgr.nix | 3 +++ pkgs/servers/sql/postgresql/ext/timescaledb.nix | 7 ++++++- pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix | 3 +++ 7 files changed, 25 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/age.nix b/pkgs/servers/sql/postgresql/ext/age.nix index b80d1c203b2c6..695a0093c2254 100644 --- a/pkgs/servers/sql/postgresql/ext/age.nix +++ b/pkgs/servers/sql/postgresql/ext/age.nix @@ -2,6 +2,8 @@ let hashes = { + # Issue tracking PostgreSQL 17 support: https://github.com/apache/age/issues/2111 + # "17" = ""; "16" = "sha256-sXh/vmGyYj00ALfFVdeql2DZ6nCJQDNKyNgzlOZnPAw="; "15" = "sha256-webZWgWZGnSoXwTpk816tjbtHV1UIlXkogpBDAEL4gM="; "14" = "sha256-jZXhcYBubpjIJ8M5JHXKV5f6VK/2BkypH3P7nLxZz3E="; diff --git a/pkgs/servers/sql/postgresql/ext/citus.nix b/pkgs/servers/sql/postgresql/ext/citus.nix index 28d6139f0a50d..b4c08b4ceab1c 100644 --- a/pkgs/servers/sql/postgresql/ext/citus.nix +++ b/pkgs/servers/sql/postgresql/ext/citus.nix @@ -41,7 +41,10 @@ stdenv.mkDerivation rec { # "Our soft policy for Postgres version compatibility is to support Citus' # latest release with Postgres' 3 latest releases." # https://www.citusdata.com/updates/v12-0/#deprecated_features - broken = versionOlder postgresql.version "14"; + broken = versionOlder postgresql.version "14" || + # PostgreSQL 17 support issue upstream: https://github.com/citusdata/citus/issues/7708 + # Check after next package update. + (versionAtLeast postgresql.version "17" && version == "12.1.2"); description = "Distributed PostgreSQL as an extension"; homepage = "https://www.citusdata.com/"; changelog = "https://github.com/citusdata/citus/blob/${src.rev}/CHANGELOG.md"; diff --git a/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix b/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix index 42d055a029aeb..74bf0b8eda643 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix @@ -28,5 +28,8 @@ stdenv.mkDerivation rec { maintainers = [ ]; platforms = postgresql.meta.platforms; license = licenses.postgresql; + # PostgreSQL 17 support issue upstream: https://github.com/hapostgres/pg_auto_failover/issues/1048 + # Check after next package update. + broken = versionAtLeast postgresql.version "17" && version == "2.1"; }; } diff --git a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix index e8b3af416ca7d..117319e606f0f 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix +++ b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix @@ -93,7 +93,10 @@ in meta = with lib; { # Upstream removed support for PostgreSQL 12 and 13 on 0.3.0: https://github.com/tensorchord/pgvecto.rs/issues/343 - broken = stdenv.hostPlatform.isDarwin || (versionOlder postgresql.version "14"); + broken = stdenv.hostPlatform.isDarwin || (versionOlder postgresql.version "14") || + # PostgreSQL 17 support issue upstream: https://github.com/tensorchord/pgvecto.rs/issues/607 + # Check after next package update. + versionAtLeast postgresql.version "17" && version == "0.3.0"; description = "Scalable, Low-latency and Hybrid-enabled Vector Search in Postgres"; homepage = "https://github.com/tensorchord/pgvecto.rs"; license = licenses.asl20; diff --git a/pkgs/servers/sql/postgresql/ext/repmgr.nix b/pkgs/servers/sql/postgresql/ext/repmgr.nix index 565f3fdaf60dc..728f3b348c697 100644 --- a/pkgs/servers/sql/postgresql/ext/repmgr.nix +++ b/pkgs/servers/sql/postgresql/ext/repmgr.nix @@ -37,6 +37,9 @@ stdenv.mkDerivation rec { license = licenses.postgresql; platforms = postgresql.meta.platforms; maintainers = with maintainers; [ zimbatm ]; + # PostgreSQL 17 support issue upstream: https://github.com/EnterpriseDB/repmgr/issues/856 + # Check after next package update. + broken = versionAtLeast postgresql.version "17" && version == "5.4.1"; }; } diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb.nix b/pkgs/servers/sql/postgresql/ext/timescaledb.nix index bd2d2d3b74be6..60e14e922835b 100644 --- a/pkgs/servers/sql/postgresql/ext/timescaledb.nix +++ b/pkgs/servers/sql/postgresql/ext/timescaledb.nix @@ -41,6 +41,11 @@ stdenv.mkDerivation rec { maintainers = [ ]; platforms = postgresql.meta.platforms; license = with licenses; if enableUnfree then tsl else asl20; - broken = versionOlder postgresql.version "13"; + broken = versionOlder postgresql.version "13" || + # timescaledb supports PostgreSQL 17 from 2.17.0 on: + # https://github.com/timescale/timescaledb/releases/tag/2.17.0 + # We can't upgrade to it, yet, because this would imply dropping support for + # PostgreSQL 13, which is a breaking change. + (versionAtLeast postgresql.version "17" && version == "2.14.2"); }; } diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix b/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix index 0776fcb4468a4..ab414a400d294 100644 --- a/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix +++ b/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix @@ -39,5 +39,8 @@ maintainers = with maintainers; [ typetetris ]; platforms = postgresql.meta.platforms; license = licenses.tsl; + # PostgreSQL 17 support issue upstream: https://github.com/timescale/timescaledb-toolkit/issues/813 + # Check after next package update. + broken = versionAtLeast postgresql.version "17" && version == "1.18.0"; }; } From 357b7aabfee33c755a774d6c73006b22cb503cb4 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 27 Oct 2024 09:00:40 +0100 Subject: [PATCH 16/17] postgresqlJitPackages.lantern: fix build The link_llvm_objects.sh script used a hardcoded /bin/bash shebang, which failed during a JIT-enabled build. --- pkgs/servers/sql/postgresql/ext/lantern.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/sql/postgresql/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/lantern.nix index 118c19699292a..9f370c327cab5 100644 --- a/pkgs/servers/sql/postgresql/ext/lantern.nix +++ b/pkgs/servers/sql/postgresql/ext/lantern.nix @@ -19,6 +19,10 @@ stdenv.mkDerivation (finalAttrs: { fetchSubmodules = true; }; + postPatch = '' + patchShebangs --build scripts/link_llvm_objects.sh + ''; + nativeBuildInputs = [ cmake ]; From 29225a3106f80bbb4ba46aff03db73284547840b Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 27 Oct 2024 09:02:44 +0100 Subject: [PATCH 17/17] postgresqlPackages.lantern: 0.3.3 -> 0.4.1 Changelog at: https://github.com/lanterndata/lantern/releases --- pkgs/servers/sql/postgresql/ext/lantern.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/lantern.nix b/pkgs/servers/sql/postgresql/ext/lantern.nix index 9f370c327cab5..f742d56f7077c 100644 --- a/pkgs/servers/sql/postgresql/ext/lantern.nix +++ b/pkgs/servers/sql/postgresql/ext/lantern.nix @@ -9,18 +9,18 @@ stdenv.mkDerivation (finalAttrs: { pname = "postgresql-lantern"; - version = "0.3.3"; + version = "0.4.1"; src = fetchFromGitHub { owner = "lanterndata"; repo = "lantern"; rev = "v${finalAttrs.version}"; - hash = "sha256-aw003Y2T9/yNJ5dkCD+qQsUO2V7Q63I/E2IFaZAPd90="; + hash = "sha256-V8W61hELXeaVvNZgRUcckFlCMWis7NENlRKySxsK/L8="; fetchSubmodules = true; }; postPatch = '' - patchShebangs --build scripts/link_llvm_objects.sh + patchShebangs --build lantern_hnsw/scripts/link_llvm_objects.sh ''; nativeBuildInputs = [ @@ -44,6 +44,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ "-DBUILD_FOR_DISTRIBUTING=ON" + "-S ../lantern_hnsw" ]; passthru.tests.extension = stdenv.mkDerivation {