lol

stratisd: 3.2.2 -> 3.3.0

Nick Cao 1ef31a55 b5934423

+8 -53
+8 -11
pkgs/tools/filesystems/stratisd/default.nix
··· 4 4 , rustPlatform 5 5 , pkg-config 6 6 , asciidoc 7 + , ncurses 7 8 , dbus 8 9 , cryptsetup 9 10 , util-linux ··· 23 24 24 25 stdenv.mkDerivation rec { 25 26 pname = "stratisd"; 26 - version = "3.2.2"; 27 + version = "3.3.0"; 27 28 28 29 src = fetchFromGitHub { 29 30 owner = "stratis-storage"; 30 31 repo = pname; 31 32 rev = "v${version}"; 32 - hash = "sha256-dNbbKGRLSYVnPdKfxlLIwXNEf7P6EvGbOp8sfpaw38g="; 33 + hash = "sha256-6CCSs359gPwUMQ2SFpxaWHXCjqqgIbvCaPL2zLuYRKg="; 33 34 }; 34 35 35 36 cargoDeps = rustPlatform.fetchCargoTarball { 36 37 inherit src; 37 - hash = "sha256-tJT0GKLpZtiQ/AZACkNeC3zgso54k/L03dFI0m1Jbls="; 38 + hash = "sha256-9nE/SFGv1tYyGDdemCahxHlRnLms3eK0r4XQMhQBjSQ="; 38 39 }; 39 40 40 - patches = [ 41 - # Allow overriding BINARIES_PATHS with environment variable at compile time 42 - ./paths.patch 43 - ]; 44 - 45 41 postPatch = '' 46 42 substituteInPlace udev/61-stratisd.rules \ 47 43 --replace stratis-base32-decode "$out/lib/udev/stratis-base32-decode" \ ··· 61 57 rust.rustc 62 58 pkg-config 63 59 asciidoc 60 + ncurses # tput 64 61 ]; 65 62 66 63 buildInputs = [ ··· 70 67 udev 71 68 ]; 72 69 73 - BINARIES_PATHS = lib.makeBinPath ([ 70 + EXECUTABLES_PATHS = lib.makeBinPath ([ 74 71 xfsprogs 75 72 thin-provisioning-tools 76 73 udev ··· 84 81 coreutils 85 82 ]); 86 83 87 - makeFlags = [ "PREFIX=${placeholder "out"}" ]; 88 - buildFlags = [ "release" "release-min" "docs/stratisd.8" ]; 84 + makeFlags = [ "PREFIX=${placeholder "out"}" "INSTALL=install" ]; 85 + buildFlags = [ "build" "build-min" "docs/stratisd.8" ]; 89 86 90 87 doCheck = true; 91 88 checkTarget = "test";
-42
pkgs/tools/filesystems/stratisd/paths.patch
··· 1 - diff --git a/src/engine/strat_engine/cmd.rs b/src/engine/strat_engine/cmd.rs 2 - index daaff70f..ed528f7f 100644 3 - --- a/src/engine/strat_engine/cmd.rs 4 - +++ b/src/engine/strat_engine/cmd.rs 5 - @@ -39,8 +39,6 @@ use crate::{ 6 - // The maximum allowable size of the thinpool metadata device 7 - const MAX_META_SIZE: MetaBlocks = MetaBlocks(255 * ((1 << 14) - 64)); 8 - 9 - -const BINARIES_PATHS: [&str; 4] = ["/usr/sbin", "/sbin", "/usr/bin", "/bin"]; 10 - - 11 - /// Find the binary with the given name by looking in likely locations. 12 - /// Return None if no binary was found. 13 - /// Search an explicit list of directories rather than the user's PATH 14 - @@ -49,7 +47,7 @@ const BINARIES_PATHS: [&str; 4] = ["/usr/sbin", "/sbin", "/usr/bin", "/bin"]; 15 - fn find_binary(name: &str) -> Option<PathBuf> { 16 - BINARIES_PATHS 17 - .iter() 18 - - .map(|pre| [pre, name].iter().collect::<PathBuf>()) 19 - + .map(|pre| [pre, &name.into()].iter().collect::<PathBuf>()) 20 - .find(|path| path.exists()) 21 - } 22 - 23 - @@ -147,6 +145,10 @@ lazy_static! { 24 - .and_then(|mut hm| hm 25 - .remove(CLEVIS) 26 - .and_then(|c| hm.remove(JOSE).map(|j| (c, j)))); 27 - + static ref BINARIES_PATHS: Vec<PathBuf> = match std::option_env!("BINARIES_PATHS") { 28 - + Some(paths) => std::env::split_paths(paths).collect(), 29 - + None => ["/usr/sbin", "/sbin", "/usr/bin", "/bin"].iter().map(|p| p.into()).collect(), 30 - + }; 31 - } 32 - 33 - /// Verify that all binaries that the engine might invoke are available at some 34 - @@ -160,7 +162,7 @@ pub fn verify_binaries() -> StratisResult<()> { 35 - name, 36 - BINARIES_PATHS 37 - .iter() 38 - - .map(|p| format!("\"{}\"", p)) 39 - + .map(|p| format!("\"{}\"", p.display())) 40 - .collect::<Vec<_>>() 41 - .join(", "), 42 - ))),