mariadb: remove withoutClient

When used as a global override, it breaks most of the options in the
mysql module, such as ensureDatabases, ensureUsers, initialDatabases,
initialScript.

We could use `.client` there, but if the reasoning behind this was
closure size reduction, we now end up with the same (or a bigger)
runtime closure and more complexity.

Apart from the options exposed by the mysql module, the client is also
likely to be required for local backups or DBA tasks anyways.

Instead of dealing with all the increased complexity of this for no
arguable benefit, let's just remove the `withoutClient` argument.
Storage space on mysql servers shouldn't be that much of an issue.

Closes #82428.
wip/yesman
Florian Klink 4 years ago
parent fb9b0e7d46
commit 4b8d66aa72
  1. 15
      pkgs/servers/sql/mariadb/cmake-without-client.patch
  2. 15
      pkgs/servers/sql/mariadb/default.nix

@ -1,15 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ea7c1df..b0face0d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,6 +176,10 @@ ELSE()
SET (SKIP_COMPONENTS "N-O-N-E")
ENDIF()
+IF (WITHOUT_CLIENT)
+ SET (SKIP_COMPONENTS "Client|ClientPlugins|ManPagesClient")
+ENDIF()
+
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
INCLUDE(check_compiler_flag)

@ -4,7 +4,6 @@
, fixDarwinDylibNames, cctools, CoreServices, less
, numactl # NUMA Support
, withStorageMroonga ? true, kytea, msgpack, zeromq
, withoutClient ? false
}:
with stdenv.lib;
@ -149,9 +148,7 @@ server = stdenv.mkDerivation (common // {
++ optional stdenv.hostPlatform.isLinux linux-pam
++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv;
patches = common.patches ++ [
./cmake-without-client.patch
] ++ optionals stdenv.hostPlatform.isDarwin [
patches = common.patches ++ optionals stdenv.hostPlatform.isDarwin [
./cmake-without-plugin-auth-pam.patch
];
@ -170,8 +167,6 @@ server = stdenv.mkDerivation (common // {
"-DWITH_NUMA=ON"
] ++ optional (!withStorageMroonga) [
"-DWITHOUT_MROONGA=ON"
] ++ optionals withoutClient [
"-DWITHOUT_CLIENT=ON"
] ++ optionals stdenv.hostPlatform.isDarwin [
"-DWITHOUT_OQGRAPH=1"
"-DWITHOUT_TOKUDB=1"
@ -185,14 +180,6 @@ server = stdenv.mkDerivation (common // {
chmod +x "$out"/bin/wsrep_sst_common
rm "$out"/bin/{mysql_client_test,mysqltest}
rm -r "$out"/data # Don't need testing data
'' + optionalString withoutClient ''
${ # We don't build with GSSAPI on Darwin
optionalString (!stdenv.hostPlatform.isDarwin) ''
rm "$out"/lib/mysql/plugin/auth_gssapi_client.so
''
}
rm "$out"/lib/mysql/plugin/client_ed25519.so
rm "$out"/lib/{libmysqlclient${libExt},libmysqlclient_r${libExt}}
'' + optionalString withStorageMroonga ''
mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
'' + optionalString (!stdenv.hostPlatform.isDarwin) ''

Loading…
Cancel
Save