From a98b8f618bd6fb8385c968cf64af814043bc8790 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Mon, 28 Oct 2024 14:09:31 +0100 Subject: [PATCH 1/2] druid: 30.0.0 -> 31.0.0 Fixes CVE-2024-45384 and CVE-2024-45537. Release notes: https://github.com/apache/druid/releases/tag/druid-31.0.0 https://github.com/apache/druid/releases/tag/druid-30.0.1 --- nixos/tests/druid/default.nix | 2 +- pkgs/by-name/dr/druid/package.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/tests/druid/default.nix b/nixos/tests/druid/default.nix index d4b7c9bffa77..300c0cdc3183 100644 --- a/nixos/tests/druid/default.nix +++ b/nixos/tests/druid/default.nix @@ -38,7 +38,7 @@ let tests = { default = testsForPackage { druidPackage = pkgs.druid; - hadoopPackage = pkgs.hadoop_3_2; + hadoopPackage = pkgs.hadoop_3_3; }; }; testsForPackage = diff --git a/pkgs/by-name/dr/druid/package.nix b/pkgs/by-name/dr/druid/package.nix index 312b589bfba3..3877d7d23a43 100644 --- a/pkgs/by-name/dr/druid/package.nix +++ b/pkgs/by-name/dr/druid/package.nix @@ -19,11 +19,11 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "apache-druid"; - version = "30.0.0"; + version = "31.0.0"; src = fetchurl { url = "mirror://apache/druid/${finalAttrs.version}/apache-druid-${finalAttrs.version}-bin.tar.gz"; - hash = "sha256-mRYorVkNzM94LP53G78eW20N5UsvMP7Lv4rAysmPwXw="; + hash = "sha256-xppAoKNS/qB8WVMwBPxxHbOy5uDGl3IxrCWV1T+YQkE="; }; mysqlConnector = fetchurl { From 7876de730fab6765086b8bc5cc6ad3f956f8ffed Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Mon, 28 Oct 2024 14:14:07 +0100 Subject: [PATCH 2/2] druid: use mysql_jdbc directly --- pkgs/by-name/dr/druid/package.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/dr/druid/package.nix b/pkgs/by-name/dr/druid/package.nix index 3877d7d23a43..76101c55a26b 100644 --- a/pkgs/by-name/dr/druid/package.nix +++ b/pkgs/by-name/dr/druid/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + mysql_jdbc, extensions ? { }, libJars ? [ ], nixosTests, @@ -26,11 +27,6 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-xppAoKNS/qB8WVMwBPxxHbOy5uDGl3IxrCWV1T+YQkE="; }; - mysqlConnector = fetchurl { - url = "mirror://maven/mysql/mysql-connector-java/5.1.48/mysql-connector-java-5.1.48.jar"; - hash = "sha256-VuJsqqOCH1rkr0T5x09mz4uE6gFRatOAPLsOkEm27Kg="; - }; - dontBuild = true; loadExtensions = ( @@ -61,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: { runHook preInstall mkdir $out mv * $out - ${optionalString mysqlSupport "cp ${finalAttrs.mysqlConnector} $out/extensions/mysql-metadata-storage"} + ${optionalString mysqlSupport "ln -s ${mysql_jdbc}/share/java/mysql-connector-java.jar $out/extensions/mysql-metadata-storage"} ${finalAttrs.loadExtensions} ${finalAttrs.loadJars} runHook postInstall