From 6db7ec170400f2ea1ff5c5df9ed7c3902e29192c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 13 Aug 2024 02:08:58 +0000 Subject: [PATCH 1/2] ceph: Add patch to fix Python `packaging` import (runtime semi-crash). See https://github.com/NixOS/nixpkgs/pull/330226#issuecomment-2268421031 --- pkgs/tools/filesystems/ceph/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index ab96126b1013..4b1e140867f8 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -4,6 +4,7 @@ , fetchurl , fetchFromGitHub , fetchPypi +, fetchpatch # Build time , cmake @@ -318,6 +319,17 @@ in rec { pname = "ceph"; inherit src version; + patches = [ + # Fixes mgr not being able to import `packaging` due to autotools >= 70. + # Remove once https://github.com/ceph/ceph/pull/58624 is merged, see + # https://github.com/NixOS/nixpkgs/pull/330226#issuecomment-2268421031 + (fetchpatch { + url = "https://github.com/ceph/ceph/commit/8da2d857fa8fdfedd7aad0ca90e1780a3ed085c9.patch"; + name = "ceph-mgr-python-fix-packaging-import.patch"; + hash = "sha256-3Yl1X6UfTf0XCXJxgRnM/Js9sz8tS+hsqViY6gDExoI="; + }) + ]; + postPatch = '' substituteInPlace cmake/modules/Finduring.cmake \ --replace-fail "liburing.a liburing" "uring" From e0751fa3ba2f4c1d255fce1456b7579d75be7a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 13 Aug 2024 02:18:21 +0000 Subject: [PATCH 2/2] ceph: Add patch to fix broken cryptsetup version parsing. Fixes #334227 --- pkgs/tools/filesystems/ceph/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 4b1e140867f8..29f5cdbe31de 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -328,6 +328,18 @@ in rec { name = "ceph-mgr-python-fix-packaging-import.patch"; hash = "sha256-3Yl1X6UfTf0XCXJxgRnM/Js9sz8tS+hsqViY6gDExoI="; }) + + # Fixes cryptesetup version parsing regex, see + # * https://github.com/NixOS/nixpkgs/issues/334227 + # * https://www.mail-archive.com/ceph-users@ceph.io/msg26309.html + # * https://github.com/ceph/ceph/pull/58997 + # Remove once we're on the next version of Ceph 18, when this should be in: + # https://github.com/ceph/ceph/pull/58997 + (fetchpatch { + url = "https://github.com/ceph/ceph/commit/6ae874902b63652fa199563b6e7950cd75151304.patch"; + name = "ceph-reef-ceph-volume-fix-set_dmcrypt_no_workqueue.patch"; + hash = "sha256-r+7hcCz2WF/rJfgKwTatKY9unJlE8Uw3fmOyaY5jVH0="; + }) ]; postPatch = ''