Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b255cd7f7f98
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e89b1063fb58
Choose a head ref
  • 8 commits
  • 4 files changed
  • 2 contributors

Commits on Apr 3, 2020

  1. mariadb: build server with NUMA

    (cherry picked from commit c6d159d)
    Izorkin authored and flokli committed Apr 3, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    988bb1f View commit details
  2. mariadb: add needed packages

    (cherry picked from commit 982a23d)
    Izorkin authored and flokli committed Apr 3, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    95c2e02 View commit details
  3. 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.
    
    (cherry picked from commit 4b8d66a)
    flokli committed Apr 3, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    a9d0d05 View commit details
  4. mariadb: add option to build server without tokudb storage

    (cherry picked from commit 0296e67)
    Izorkin authored and flokli committed Apr 3, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    a05099d View commit details
  5. mariadb: add option to build server without rocksdb storage

    (cherry picked from commit eafdfc8)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    bf94267 View commit details
  6. mariadb: add zstd compression

    (cherry picked from commit 2435743)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    6254058 View commit details
  7. mariadb: fix deps build

    (cherry picked from commit 5abc729)
    Izorkin authored and flokli committed Apr 3, 2020
    Copy the full SHA
    c0c04ea View commit details
  8. Merge pull request #84164 from Izorkin/mariadb-tokudb-20.03

    [20.03] mariadb: backport updates
    flokli authored Apr 3, 2020
    Copy the full SHA
    e89b106 View commit details
Showing with 38 additions and 41 deletions.
  1. +6 −0 nixos/doc/manual/release-notes/rl-2003.xml
  2. +0 −15 pkgs/servers/sql/mariadb/cmake-without-client.patch
  3. +31 −25 pkgs/servers/sql/mariadb/default.nix
  4. +1 −1 pkgs/top-level/all-packages.nix
6 changes: 6 additions & 0 deletions nixos/doc/manual/release-notes/rl-2003.xml
Original file line number Diff line number Diff line change
@@ -1007,6 +1007,12 @@ auth required pam_succeed_if.so uid >= 1000 quiet
</warning>
</para>
</listitem>
<listitem>
<para>
The TokuDB storage engine will be disabled in <package>mariadb</package> 10.5. It is recommended to switch
to RocksDB. See also <link xlink:href="https://mariadb.com/kb/en/tokudb/">TokuDB</link>.
</para>
</listitem>
</itemizedlist>
</section>

15 changes: 0 additions & 15 deletions pkgs/servers/sql/mariadb/cmake-without-client.patch

This file was deleted.

56 changes: 31 additions & 25 deletions pkgs/servers/sql/mariadb/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses, zlib, xz, lzo, lz4, bzip2, snappy
{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses
, libiconv, openssl, pcre, boost, judy, bison, libxml2, libkrb5, linux-pam, curl
, libaio, libevent, jemalloc, cracklib, systemd, numactl, perl
, libaio, libevent, jemalloc450, jemalloc, cracklib, systemd, perl
, bzip2, lz4, lzo, snappy, xz, zlib, zstd
, fixDarwinDylibNames, cctools, CoreServices, less
, withoutClient ? false
, numactl # NUMA Support
, withStorageMroonga ? true, kytea, msgpack, zeromq
, withStorageRocks ? true
, withStorageToku ? true
}:

with stdenv.lib;
@@ -33,9 +37,11 @@ common = rec { # attributes common to both builds
nativeBuildInputs = [ cmake pkgconfig ];

buildInputs = [
ncurses openssl zlib pcre jemalloc libiconv curl
ncurses openssl zlib pcre libiconv curl
] ++ optionals stdenv.hostPlatform.isLinux [ libaio systemd libkrb5 ]
++ optionals stdenv.hostPlatform.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
++ optionals stdenv.hostPlatform.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ]
++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ jemalloc450 ]
++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ];

prePatch = ''
sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -79,8 +85,6 @@ common = rec { # attributes common to both builds
# to pass in java explicitly.
"-DCONNECT_WITH_JDBC=OFF"
"-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
] ++ optionals stdenv.hostPlatform.isMusl [
"-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl
];

postInstall = ''
@@ -98,6 +102,7 @@ common = rec { # attributes common to both builds
passthru.mysqlVersion = "5.7";

meta = {

description = "An enhanced, drop-in replacement for MySQL";
homepage = https://mariadb.org/;
license = licenses.gpl2;
@@ -137,18 +142,17 @@ server = stdenv.mkDerivation (common // {

outputs = [ "out" "man" ];

nativeBuildInputs = common.nativeBuildInputs ++ [ bison ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper;
nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper;

buildInputs = common.buildInputs ++ [
xz lzo lz4 bzip2 snappy
libxml2 boost judy libevent cracklib
bzip2 lz4 lzo snappy xz zstd
libxml2 judy libevent cracklib
] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl
++ optionals withStorageMroonga [ kytea msgpack zeromq ]
++ 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
];

@@ -163,11 +167,20 @@ server = stdenv.mkDerivation (common // {
"-DWITH_INNODB_DISALLOW_WRITES=ON"
"-DWITHOUT_EXAMPLE=1"
"-DWITHOUT_FEDERATED=1"
] ++ optionals withoutClient [
"-DWITHOUT_CLIENT=ON"
] ++ optionals stdenv.hostPlatform.isDarwin [
"-DWITHOUT_OQGRAPH=1"
] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [
"-DWITH_NUMA=ON"
] ++ optional (!withStorageMroonga) [
"-DWITHOUT_MROONGA=1"
] ++ optional (!withStorageRocks) [
"-DWITHOUT_ROCKSDB=1"
] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageRocks) [
"-DWITH_ROCKSDB_JEMALLOC=ON"
] ++ optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isMusl || !withStorageToku) [
"-DWITHOUT_TOKUDB=1"
] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [
"-DWITH_JEMALLOC=static"
] ++ optional stdenv.hostPlatform.isDarwin [
"-DWITHOUT_OQGRAPH=1"
];

preConfigure = optionalString (!stdenv.hostPlatform.isDarwin) ''
@@ -178,15 +191,8 @@ 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 withStorageMroonga ''
mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
'' + 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 (!stdenv.hostPlatform.isDarwin) ''
sed -i 's/-mariadb/-mysql/' "$out"/bin/galera_new_cluster
'';
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -15547,7 +15547,7 @@ in
mariadb = callPackage ../servers/sql/mariadb {
# As per mariadb's cmake, "static jemalloc_pic.a can only be used up to jemalloc 4".
# https://jira.mariadb.org/browse/MDEV-15034
jemalloc = jemalloc450.override ({ disableInitExecTls = true; });
jemalloc450 = jemalloc450.override ({ disableInitExecTls = true; });
inherit (darwin) cctools;
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
};