Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ansible/postgres_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
postgres_release:
postgresorioledb-17: "17.11.0.011-orioledb"
postgres17: "17.11.0.011"
postgres15: "15.19.0.011"
postgresorioledb-17: "17.11.0.012-orioledb"
postgres17: "17.11.0.012"
postgres15: "15.19.0.012"
29 changes: 0 additions & 29 deletions nix/ext/patches/supautils-strtol-glibc-compat.patch
Original file line number Diff line number Diff line change
@@ -1,32 +1,3 @@
diff --git a/src/constrained_extensions.c b/src/constrained_extensions.c
index 18e5aee..cdfb63f 100644
--- a/src/constrained_extensions.c
+++ b/src/constrained_extensions.c
@@ -9,6 +9,24 @@
#include "constrained_extensions.h"
#include "utils.h"

+#if defined(__linux__) && defined(__GLIBC__) && (defined(__x86_64__) || defined(__aarch64__))
+# if defined(__x86_64__)
+# define SUPAUTILS_GLIBC_COMPAT_VER "GLIBC_2.2.5"
+# else
+# define SUPAUTILS_GLIBC_COMPAT_VER "GLIBC_2.17"
+# endif
+extern void *dlvsym(void *handle, const char *symbol, const char *version);
+__asm__(".symver dlvsym,dlvsym@" SUPAUTILS_GLIBC_COMPAT_VER);
+static int
+_supautils_compat_atoi(const char *nptr)
+{
+ long (*fn)(const char *, char **, int) =
+ (long (*)(const char *, char **, int)) dlvsym((void *) 0, "strtol", SUPAUTILS_GLIBC_COMPAT_VER);
+ return fn ? (int) fn(nptr, NULL, 10) : 0;
+}
+#define atoi(a) _supautils_compat_atoi(a)
+#endif
+
static JSON_ACTION_RETURN_TYPE json_array_start(void *state) {
json_constrained_extension_parse_state *parse = state;

diff --git a/src/extension_custom_scripts.c b/src/extension_custom_scripts.c
index 337bd69..3f285cc 100644
--- a/src/extension_custom_scripts.c
Expand Down
4 changes: 2 additions & 2 deletions nix/ext/supautils.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
stdenv.mkDerivation rec {
pname = "supautils";
name = pname;
version = "3.4.4";
version = "4.0.0";

buildInputs = [ postgresql ];

Expand All @@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
owner = "supabase";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Wsou5U7/Tuwj2E6aPEmlHg7uz7kGyBOGrb7UkjfEo9U=";
hash = "sha256-2tH34+JdgNqaR5ihtdJJQSIdT7zI4NTRHlYuEEO6/f8=";
};

# remove once all Ubuntu 20.04 (glibc 2.31) hosts are decommissioned
Expand Down
12 changes: 11 additions & 1 deletion nix/ext/vault.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ let
-e "s|^module_pathname = .*|module_pathname = '\$libdir/${pname}'|" \
${pname}.control > $out/share/postgresql/extension/${pname}--${version}.control

# Install this version's base install script from its own source.
# Newer sources drop deprecated base scripts (e.g. 0.3.2 removed
# supabase_vault--0.2.8.sql), so the latest version's sql/ alone
# can't install every packaged version.
if [ -f sql/${pname}--${version}.sql ]; then
install -D -t $out/share/postgresql/extension sql/${pname}--${version}.sql
fi

''
# for versions <= 0.2.8, we don't have a library to install
+ lib.optionalString (builtins.compareVersions "0.2.8" version < 0) ''
Expand All @@ -73,7 +81,6 @@ let
cat $out/share/postgresql/extension/${pname}--${latestVersion}.control
} > $out/share/postgresql/extension/${pname}.control
fi
ln -sfn ${pname}-${latestVersion}${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix}
'';

meta = with lib; {
Expand All @@ -94,6 +101,9 @@ pkgs.buildEnv {
];

postBuild = ''
# Point the generic library name at the latest version
ln -sfn ${pname}-${latestVersion}${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix}

makeWrapper ${lib.getExe switch-ext-version} $out/bin/switch_${pname}_version \
--prefix EXT_WRAPPER : "$out" --prefix EXT_NAME : "${pname}"
'';
Expand Down
7 changes: 7 additions & 0 deletions nix/ext/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,13 @@
"17"
],
"hash": "sha256-MC87bqgtynnDhmNZAu96jvfCpsGDCPB0g5TZfRQHd30="
},
"0.3.2": {
"postgresql": [
"15",
"17"
],
"hash": "sha256-TH5caaDajqZosEuv50o0ec5vxQI1TkIIprKDCFF4z1k="
}
},
"timescaledb": {
Expand Down
Loading