diff options
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r-- | pkgs/servers/sql/mariadb/default.nix | 12 | ||||
-rw-r--r-- | pkgs/servers/sql/mysql/5.7.x.nix | 4 | ||||
-rw-r--r-- | pkgs/servers/sql/mysql/mysql-5.7-add-protobuf-3.8+-support.patch | 66 | ||||
-rw-r--r-- | pkgs/servers/sql/pgpool/default.nix | 2 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/default.nix | 20 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/pgvector.nix | 14 |
6 files changed, 85 insertions, 33 deletions
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 7190f1209e08d..f75fada0d8a02 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -44,7 +44,7 @@ commonOptions = packageSettings: rec { # attributes common to both builds ++ lib.optionals stdenv.hostPlatform.isLinux ([ libkrb5 systemd ] ++ (if (lib.versionOlder version "10.6") then [ libaio ] else [ liburing ])) ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices cctools perl libedit ] - ++ lib.optional (!stdenv.hostPlatform.isDarwin) [ jemalloc ] + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ jemalloc ] ++ (if (lib.versionOlder version "10.5") then [ pcre ] else [ pcre2 ]) ++ (if (lib.versionOlder version "10.6") then [ openssl_1_1 (curl.override { openssl = openssl_1_1; }) ] @@ -203,15 +203,15 @@ in stdenv.mkDerivation (common // { "-DWITHOUT_EXAMPLE=1" "-DWITHOUT_FEDERATED=1" "-DWITHOUT_TOKUDB=1" - ] ++ lib.optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [ + ] ++ lib.optionals (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [ "-DWITH_NUMA=ON" - ] ++ lib.optional (!withStorageMroonga) [ + ] ++ lib.optionals (!withStorageMroonga) [ "-DWITHOUT_MROONGA=1" - ] ++ lib.optional (!withStorageRocks) [ + ] ++ lib.optionals (!withStorageRocks) [ "-DWITHOUT_ROCKSDB=1" - ] ++ lib.optional (!stdenv.hostPlatform.isDarwin && withStorageRocks) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && withStorageRocks) [ "-DWITH_ROCKSDB_JEMALLOC=ON" - ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) [ + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "-DWITH_JEMALLOC=yes" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "-DPLUGIN_AUTH_PAM=NO" diff --git a/pkgs/servers/sql/mysql/5.7.x.nix b/pkgs/servers/sql/mysql/5.7.x.nix index 41fd1466fd35a..ea8842c5695f6 100644 --- a/pkgs/servers/sql/mysql/5.7.x.nix +++ b/pkgs/servers/sql/mysql/5.7.x.nix @@ -16,6 +16,10 @@ self = stdenv.mkDerivation rec { sha256 = "sha256-ERw6ypGJfkUwOds5GkdSZeAg/ZIcuXMHwACEqI5NYQQ="; }; + patches = [ + ./mysql-5.7-add-protobuf-3.8+-support.patch + ]; + preConfigure = lib.optionalString stdenv.isDarwin '' ln -s /bin/ps $TMPDIR/ps export PATH=$PATH:$TMPDIR diff --git a/pkgs/servers/sql/mysql/mysql-5.7-add-protobuf-3.8+-support.patch b/pkgs/servers/sql/mysql/mysql-5.7-add-protobuf-3.8+-support.patch new file mode 100644 index 0000000000000..99c90ebd33bcc --- /dev/null +++ b/pkgs/servers/sql/mysql/mysql-5.7-add-protobuf-3.8+-support.patch @@ -0,0 +1,66 @@ +diff --git a/cmake/build_configurations/compiler_options.cmake b/cmake/build_configurations/compiler_options.cmake +index a935227e523..b4ebd61c5c1 100644 +--- a/cmake/build_configurations/compiler_options.cmake ++++ b/cmake/build_configurations/compiler_options.cmake +@@ -43,7 +43,7 @@ IF(UNIX) + + # Default GCC flags + IF(CMAKE_COMPILER_IS_GNUCC) +- SET(COMMON_C_FLAGS "-fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing") ++ SET(COMMON_C_FLAGS "-fno-omit-frame-pointer -fno-strict-aliasing") + # Disable inline optimizations for valgrind testing to avoid false positives + IF(WITH_VALGRIND) + STRING_PREPEND(COMMON_C_FLAGS "-fno-inline ") +@@ -68,7 +68,7 @@ IF(UNIX) + ENDIF() + ENDIF() + IF(CMAKE_COMPILER_IS_GNUCXX) +- SET(COMMON_CXX_FLAGS "-fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing") ++ SET(COMMON_CXX_FLAGS "-fno-omit-frame-pointer -fno-strict-aliasing") + # GCC 6 has C++14 as default, set it explicitly to the old default. + EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion + OUTPUT_VARIABLE GXX_VERSION) +diff --git a/rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc b/rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc +index 5dc91ba269c..3a45284859f 100644 +--- a/rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc ++++ b/rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc +@@ -629,12 +629,12 @@ class ErrorDumper : public ::google::protobuf::io::ErrorCollector + std::stringstream m_out; + + public: +- virtual void AddError(int line, int column, const string & message) ++ virtual void AddError(int line, int column, const std::string & message) + { + m_out << "ERROR in message: line " << line+1 << ": column " << column << ": " << message<<"\n"; + } + +- virtual void AddWarning(int line, int column, const string & message) ++ virtual void AddWarning(int line, int column, const std::string & message) + { + m_out << "WARNING in message: line " << line+1 << ": column " << column << ": " << message<<"\n"; + } +diff --git a/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h b/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h +index 90f7cc77a39..cf6c607a818 100644 +--- a/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h ++++ b/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h +@@ -36,7 +36,6 @@ + #include <google/protobuf/io/tokenizer.h> + #include <google/protobuf/io/zero_copy_stream.h> + #include <google/protobuf/wire_format_lite.h> +-#include <google/protobuf/wire_format_lite_inl.h> + #include <google/protobuf/dynamic_message.h> + + #include "mysqlx_connection.pb.h" +diff --git a/rapid/plugin/x/ngs/src/protocol_decoder.cc b/rapid/plugin/x/ngs/src/protocol_decoder.cc +index 298b6a6884c..fae21d18f78 100644 +--- a/rapid/plugin/x/ngs/src/protocol_decoder.cc ++++ b/rapid/plugin/x/ngs/src/protocol_decoder.cc +@@ -123,7 +123,7 @@ Error_code Message_decoder::parse(Request &request) + google::protobuf::io::CodedInputStream stream(reinterpret_cast<const uint8_t*>(request.buffer()), + static_cast<int>(request.buffer_size())); + // variable 'mysqlx_max_allowed_packet' has been checked when buffer was filling by data +- stream.SetTotalBytesLimit(static_cast<int>(request.buffer_size()), -1 /*no warnings*/); ++ stream.SetTotalBytesLimit(static_cast<int>(request.buffer_size())); + // Protobuf limits the number of nested objects when decoding messages + // lets set the value in explicit way (to ensure that is set accordingly with + // out stack size) \ No newline at end of file diff --git a/pkgs/servers/sql/pgpool/default.nix b/pkgs/servers/sql/pgpool/default.nix index 436217f2e63e5..10b8871c57861 100644 --- a/pkgs/servers/sql/pgpool/default.nix +++ b/pkgs/servers/sql/pgpool/default.nix @@ -3,6 +3,7 @@ , fetchurl , postgresql , openssl +, libxcrypt , withPam ? stdenv.isLinux , pam }: @@ -20,6 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ postgresql openssl + libxcrypt ] ++ lib.optional withPam pam; configureFlags = [ diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index a5bdbc97838bb..975f486629ad0 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -21,7 +21,6 @@ let }: let atLeast = lib.versionAtLeast version; - icuEnabled = atLeast "10"; lz4Enabled = atLeast "14"; in stdenv.mkDerivation rec { @@ -39,14 +38,13 @@ let setOutputFlags = false; # $out retains configureFlags :-/ buildInputs = - [ zlib readline openssl libxml2 ] - ++ lib.optionals icuEnabled [ icu ] + [ zlib readline openssl libxml2 icu ] ++ lib.optionals lz4Enabled [ lz4 ] ++ lib.optionals enableSystemd [ systemd ] ++ lib.optionals gssSupport [ libkrb5 ] ++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ]; - nativeBuildInputs = [ makeWrapper ] ++ lib.optionals icuEnabled [ pkg-config ]; + nativeBuildInputs = [ makeWrapper pkg-config ]; enableParallelBuilding = !stdenv.isDarwin; @@ -62,14 +60,14 @@ let configureFlags = [ "--with-openssl" "--with-libxml" + "--with-icu" "--sysconfdir=/etc" "--libdir=$(lib)/lib" "--with-system-tzdata=${tzdata}/share/zoneinfo" "--enable-debug" (lib.optionalString enableSystemd "--with-systemd") (if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") - ] ++ lib.optionals icuEnabled [ "--with-icu" ] - ++ lib.optionals lz4Enabled [ "--with-lz4" ] + ] ++ lib.optionals lz4Enabled [ "--with-lz4" ] ++ lib.optionals gssSupport [ "--with-gssapi" ] ++ lib.optionals stdenv.hostPlatform.isRiscV [ "--disable-spinlocks" ]; @@ -200,16 +198,6 @@ let in self: { - postgresql_10 = self.callPackage generic { - version = "10.22"; - psqlSchema = "10.0"; # should be 10, but changing it is invasive - hash = "sha256-lVl3VVxp3xpk9EuB1KGYfrdKu9GHBXn1rZ2UYTPdjk0="; - this = self.postgresql_10; - thisAttr = "postgresql_10"; - inherit self; - icu = self.icu67; - }; - postgresql_11 = self.callPackage generic { version = "11.17"; psqlSchema = "11.1"; # should be 11, but changing it is invasive diff --git a/pkgs/servers/sql/postgresql/ext/pgvector.nix b/pkgs/servers/sql/postgresql/ext/pgvector.nix index c04cb0c3b159d..832b27ec743d3 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvector.nix +++ b/pkgs/servers/sql/postgresql/ext/pgvector.nix @@ -1,24 +1,16 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, postgresql }: +{ lib, stdenv, fetchFromGitHub, postgresql }: stdenv.mkDerivation rec { pname = "pgvector"; - version = "0.2.7"; + version = "0.3.0"; src = fetchFromGitHub { owner = "pgvector"; repo = "pgvector"; rev = "v${version}"; - sha256 = "sha256-kIgdr3+KC11Qxk1uBTmcN4dDaLIhfo/Fs898boESsBc="; + sha256 = "sha256-oKEh0Pmhue9GyBbxHrc/xWSLmUfAzCoQU6jYdJCEgm4="; }; - patches = [ - # Added support for Postgres 15. Remove with the next release. - (fetchpatch { - url = "https://github.com/pgvector/pgvector/commit/c9c6b96eede7d78758ca7ca5db98bf8b24021d0f.patch"; - sha256 = "sha256-hgCpGtuYmqo4Ttlpn4FBskbNdZmM1wJeMQBJZ7H923g="; - }) - ]; - buildInputs = [ postgresql ]; installPhase = '' |