mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
illumos support (#2838)
* disable mimalloc on illumos, in part because it immediately segfaults, but also because we prefer libumem and link it into all Rust binaries * switch from fs2 (unmaintained crate) to fs4 which provides the same interface and has wider platform support
This commit is contained in:
parent
9c4e8bb90a
commit
e591b5f2cc
12
Cargo.lock
generated
12
Cargo.lock
generated
|
@ -1169,7 +1169,7 @@ dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"clap_complete",
|
"clap_complete",
|
||||||
"dhat",
|
"dhat",
|
||||||
"fs2",
|
"fs4",
|
||||||
"futures",
|
"futures",
|
||||||
"kanidm_build_profiles",
|
"kanidm_build_profiles",
|
||||||
"kanidm_lib_file_permissions",
|
"kanidm_lib_file_permissions",
|
||||||
|
@ -1715,13 +1715,13 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fs2"
|
name = "fs4"
|
||||||
version = "0.4.3"
|
version = "0.8.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
|
checksum = "f7e180ac76c23b45e767bd7ae9579bc0bb458618c4bc71835926e098e61d15f8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"rustix",
|
||||||
"winapi",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -173,7 +173,7 @@ dhat = "0.3.3"
|
||||||
dyn-clone = "^1.0.17"
|
dyn-clone = "^1.0.17"
|
||||||
fernet = "^0.2.1"
|
fernet = "^0.2.1"
|
||||||
filetime = "^0.2.23"
|
filetime = "^0.2.23"
|
||||||
fs2 = "^0.4.3"
|
fs4 = "^0.8.3"
|
||||||
futures = "^0.3.30"
|
futures = "^0.3.30"
|
||||||
futures-concurrency = "^3.1.0"
|
futures-concurrency = "^3.1.0"
|
||||||
futures-util = { version = "^0.3.30", features = ["sink"] }
|
futures-util = { version = "^0.3.30", features = ["sink"] }
|
||||||
|
|
|
@ -6,6 +6,9 @@ use std::os::linux::fs::MetadataExt;
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
use std::os::macos::fs::MetadataExt;
|
use std::os::macos::fs::MetadataExt;
|
||||||
|
|
||||||
|
#[cfg(target_os = "illumos")]
|
||||||
|
use std::os::illumos::fs::MetadataExt;
|
||||||
|
|
||||||
use kanidm_utils_users::{get_current_gid, get_current_uid};
|
use kanidm_utils_users::{get_current_gid, get_current_uid};
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
|
@ -28,12 +28,11 @@ kanidm_proto = { workspace = true }
|
||||||
kanidmd_core = { workspace = true }
|
kanidmd_core = { workspace = true }
|
||||||
kanidm_lib_file_permissions = { workspace = true }
|
kanidm_lib_file_permissions = { workspace = true }
|
||||||
sketching = { workspace = true }
|
sketching = { workspace = true }
|
||||||
fs2 = { workspace = true }
|
fs4 = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
|
|
||||||
dhat = { workspace = true, optional = true }
|
dhat = { workspace = true, optional = true }
|
||||||
clap = { workspace = true, features = ["env"] }
|
clap = { workspace = true, features = ["env"] }
|
||||||
mimalloc = { workspace = true }
|
|
||||||
reqwest = { workspace = true }
|
reqwest = { workspace = true }
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "signal"] }
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "signal"] }
|
||||||
|
@ -56,6 +55,9 @@ whoami = { workspace = true }
|
||||||
[target.'cfg(not(target_family = "windows"))'.dependencies]
|
[target.'cfg(not(target_family = "windows"))'.dependencies]
|
||||||
kanidm_utils_users = { workspace = true }
|
kanidm_utils_users = { workspace = true }
|
||||||
|
|
||||||
|
[target.'cfg(not(target_os = "illumos"))'.dependencies]
|
||||||
|
mimalloc = { workspace = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
clap = { workspace = true, features = ["derive"] }
|
clap = { workspace = true, features = ["derive"] }
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#![deny(clippy::needless_pass_by_value)]
|
#![deny(clippy::needless_pass_by_value)]
|
||||||
#![deny(clippy::trivially_copy_pass_by_ref)]
|
#![deny(clippy::trivially_copy_pass_by_ref)]
|
||||||
|
|
||||||
#[cfg(not(feature = "dhat-heap"))]
|
#[cfg(not(any(feature = "dhat-heap", target_os = "illumos")))]
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ static ALLOC: dhat::Alloc = dhat::Alloc;
|
||||||
|
|
||||||
use std::fs::{metadata, File};
|
use std::fs::{metadata, File};
|
||||||
// This works on both unix and windows.
|
// This works on both unix and windows.
|
||||||
use fs2::FileExt;
|
use fs4::FileExt;
|
||||||
use kanidm_proto::messages::ConsoleOutputMode;
|
use kanidm_proto::messages::ConsoleOutputMode;
|
||||||
use sketching::otel::TracingPipelineGuard;
|
use sketching::otel::TracingPipelineGuard;
|
||||||
use sketching::LogLevel;
|
use sketching::LogLevel;
|
||||||
|
|
|
@ -109,9 +109,11 @@ compact_jwt = { workspace = true, features = ["openssl", "hsm-crypto", "unsafe_r
|
||||||
criterion = { workspace = true, features = ["html_reports"] }
|
criterion = { workspace = true, features = ["html_reports"] }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
kanidmd_lib_macros = { workspace = true }
|
kanidmd_lib_macros = { workspace = true }
|
||||||
mimalloc = { workspace = true }
|
|
||||||
webauthn-authenticator-rs = { workspace = true }
|
webauthn-authenticator-rs = { workspace = true }
|
||||||
|
|
||||||
|
[target.'cfg(not(target_os = "illumos"))'.dev-dependencies]
|
||||||
|
mimalloc = { workspace = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
hashbrown = { workspace = true }
|
hashbrown = { workspace = true }
|
||||||
kanidm_build_profiles = { workspace = true }
|
kanidm_build_profiles = { workspace = true }
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#![deny(clippy::manual_let_else)]
|
#![deny(clippy::manual_let_else)]
|
||||||
#![allow(clippy::unreachable)]
|
#![allow(clippy::unreachable)]
|
||||||
|
|
||||||
#[cfg(all(test, not(feature = "dhat-heap")))]
|
#[cfg(all(test, not(any(feature = "dhat-heap", target_os = "illumos"))))]
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ hashbrown = { workspace = true }
|
||||||
kanidm_client = { workspace = true }
|
kanidm_client = { workspace = true }
|
||||||
kanidm_proto = { workspace = true }
|
kanidm_proto = { workspace = true }
|
||||||
mathru = { workspace = true }
|
mathru = { workspace = true }
|
||||||
mimalloc = { workspace = true }
|
|
||||||
rand = { workspace = true }
|
rand = { workspace = true }
|
||||||
rand_chacha = { workspace = true }
|
rand_chacha = { workspace = true }
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
|
@ -39,6 +38,9 @@ tracing = { workspace = true }
|
||||||
tracing-subscriber = { workspace = true }
|
tracing-subscriber = { workspace = true }
|
||||||
uuid = { workspace = true, features = ["serde", "v4" ] }
|
uuid = { workspace = true, features = ["serde", "v4" ] }
|
||||||
|
|
||||||
|
[target.'cfg(not(any(target_family = "windows", target_os = "illumos")))'.dependencies]
|
||||||
|
mimalloc = { workspace = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
kanidm_build_profiles = { workspace = true }
|
kanidm_build_profiles = { workspace = true }
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#![deny(clippy::needless_pass_by_value)]
|
#![deny(clippy::needless_pass_by_value)]
|
||||||
#![deny(clippy::trivially_copy_pass_by_ref)]
|
#![deny(clippy::trivially_copy_pass_by_ref)]
|
||||||
|
|
||||||
#[cfg(not(target_family = "windows"))]
|
#[cfg(not(any(target_family = "windows", target_os = "illumos")))]
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@ kanidm_proto = { workspace = true }
|
||||||
kanidm-hsm-crypto = { workspace = true }
|
kanidm-hsm-crypto = { workspace = true }
|
||||||
kanidm_lib_crypto = { workspace = true }
|
kanidm_lib_crypto = { workspace = true }
|
||||||
kanidm_lib_file_permissions = { workspace = true }
|
kanidm_lib_file_permissions = { workspace = true }
|
||||||
mimalloc = { workspace = true }
|
|
||||||
notify-debouncer-full = { workspace = true }
|
notify-debouncer-full = { workspace = true }
|
||||||
rpassword = { workspace = true }
|
rpassword = { workspace = true }
|
||||||
rusqlite = { workspace = true }
|
rusqlite = { workspace = true }
|
||||||
|
@ -98,6 +97,9 @@ prctl.workspace = true
|
||||||
[target.'cfg(not(target_family = "windows"))'.dependencies]
|
[target.'cfg(not(target_family = "windows"))'.dependencies]
|
||||||
kanidm_utils_users = { workspace = true }
|
kanidm_utils_users = { workspace = true }
|
||||||
|
|
||||||
|
[target.'cfg(not(target_os = "illumos"))'.dependencies]
|
||||||
|
mimalloc = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
kanidmd_core = { workspace = true }
|
kanidmd_core = { workspace = true }
|
||||||
kanidmd_testkit = { workspace = true }
|
kanidmd_testkit = { workspace = true }
|
||||||
|
|
|
@ -53,6 +53,7 @@ use kanidm_hsm_crypto::{soft::SoftTpm, AuthValue, BoxedDynTpm, Tpm};
|
||||||
|
|
||||||
use notify_debouncer_full::{new_debouncer, notify::RecursiveMode, notify::Watcher};
|
use notify_debouncer_full::{new_debouncer, notify::RecursiveMode, notify::Watcher};
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "illumos"))]
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue