Merge pull request #281023 from Kranzes/kanidm-fix-build

kanidm: fix build for rust v1.75
This commit is contained in:
Ilan Joselevich 2024-01-16 14:09:27 +02:00 committed by GitHub
commit 81f4bac593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 118 additions and 31 deletions

View File

@ -0,0 +1,80 @@
From de330efaf02ed66d6641ab3bb55eed4bcfad430b Mon Sep 17 00:00:00 2001
From: Ilan Joselevich <personal@ilanjoselevich.com>
Date: Sun, 14 Jan 2024 23:53:12 +0200
Subject: [PATCH] fix warnings for rust v1.75
---
server/lib/src/idm/authsession.rs | 4 ++--
server/testkit/tests/integration.rs | 5 ++---
server/web_ui/login_flows/src/oauth2.rs | 3 +--
unix_integration/nss_kanidm/src/lib.rs | 3 +--
4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/server/lib/src/idm/authsession.rs b/server/lib/src/idm/authsession.rs
index 734864f0d..c65b88494 100644
--- a/server/lib/src/idm/authsession.rs
+++ b/server/lib/src/idm/authsession.rs
@@ -3,7 +3,7 @@
//! factor to assert that the user is legitimate. This also contains some
//! support code for asynchronous task execution.
use std::collections::BTreeMap;
-pub use std::collections::BTreeSet as Set;
+
use std::convert::TryFrom;
use std::fmt;
use std::time::Duration;
@@ -1237,7 +1237,7 @@ impl AuthSession {
#[cfg(test)]
mod tests {
- pub use std::collections::BTreeSet as Set;
+
use std::str::FromStr;
use std::time::Duration;
diff --git a/server/testkit/tests/integration.rs b/server/testkit/tests/integration.rs
index e6879b44b..472022892 100644
--- a/server/testkit/tests/integration.rs
+++ b/server/testkit/tests/integration.rs
@@ -2,12 +2,11 @@
use std::process::Output;
-use tempfile::tempdir;
+
use kanidm_client::KanidmClient;
use kanidmd_testkit::{
- login_put_admin_idm_admins, ADMIN_TEST_PASSWORD, IDM_ADMIN_TEST_PASSWORD, IDM_ADMIN_TEST_USER,
- NOT_ADMIN_TEST_USERNAME,
+ login_put_admin_idm_admins, ADMIN_TEST_PASSWORD, IDM_ADMIN_TEST_PASSWORD,
};
use testkit_macros::cli_kanidm;
diff --git a/server/web_ui/login_flows/src/oauth2.rs b/server/web_ui/login_flows/src/oauth2.rs
index a41e3083f..d735a7b4d 100644
--- a/server/web_ui/login_flows/src/oauth2.rs
+++ b/server/web_ui/login_flows/src/oauth2.rs
@@ -2,8 +2,7 @@ use gloo::console;
use kanidm_proto::constants::uri::{OAUTH2_AUTHORISE, OAUTH2_AUTHORISE_PERMIT};
use kanidm_proto::constants::{APPLICATION_JSON, KOPID};
pub use kanidm_proto::oauth2::{
- AccessTokenRequest, AccessTokenResponse, AuthorisationRequest, AuthorisationResponse,
- CodeChallengeMethod, ErrorResponse,
+ AuthorisationRequest, AuthorisationResponse,
};
use kanidmd_web_ui_shared::constants::{CONTENT_TYPE, CSS_ALERT_DANGER, URL_OAUTH2};
use kanidmd_web_ui_shared::utils::{do_alert_error, do_footer, window};
diff --git a/unix_integration/nss_kanidm/src/lib.rs b/unix_integration/nss_kanidm/src/lib.rs
index ef13192b9..27e3321a8 100644
--- a/unix_integration/nss_kanidm/src/lib.rs
+++ b/unix_integration/nss_kanidm/src/lib.rs
@@ -20,5 +20,4 @@ extern crate lazy_static;
#[cfg(target_family = "unix")]
mod implementation;
-#[cfg(target_family = "unix")]
-pub use implementation::*;
+
--
2.42.0

View File

@ -452,7 +452,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
[[package]]
name = "base64urlsafedata"
version = "0.1.3"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=2218d2055c0c900ef57b398423eee5e8d5521f4c#2218d2055c0c900ef57b398423eee5e8d5521f4c"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3#ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3"
dependencies = [
"base64 0.21.5",
"paste 1.0.14",
@ -1106,7 +1106,7 @@ dependencies = [
[[package]]
name = "daemon"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"clap",
"clap_complete",
@ -2889,7 +2889,7 @@ dependencies = [
[[package]]
name = "kanidm-ipa-sync"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"base64urlsafedata",
"chrono",
@ -2914,7 +2914,7 @@ dependencies = [
[[package]]
name = "kanidm-ldap-sync"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"base64urlsafedata",
"chrono",
@ -2940,7 +2940,7 @@ dependencies = [
[[package]]
name = "kanidm_build_profiles"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"base64 0.21.5",
"gix",
@ -2950,7 +2950,7 @@ dependencies = [
[[package]]
name = "kanidm_client"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"hyper",
"kanidm_lib_file_permissions",
@ -2988,7 +2988,7 @@ dependencies = [
[[package]]
name = "kanidm_lib_file_permissions"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"kanidm_utils_users",
"whoami",
@ -2996,7 +2996,7 @@ dependencies = [
[[package]]
name = "kanidm_proto"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"base32",
"base64urlsafedata",
@ -3016,7 +3016,7 @@ dependencies = [
[[package]]
name = "kanidm_tools"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"async-recursion",
"clap",
@ -3049,7 +3049,7 @@ dependencies = [
[[package]]
name = "kanidm_unix_int"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"async-trait",
"base64urlsafedata",
@ -3088,14 +3088,14 @@ dependencies = [
[[package]]
name = "kanidm_utils_users"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"libc",
]
[[package]]
name = "kanidmd_core"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"async-trait",
"axum",
@ -3148,7 +3148,7 @@ dependencies = [
[[package]]
name = "kanidmd_lib"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"base64 0.21.5",
"base64urlsafedata",
@ -3215,7 +3215,7 @@ dependencies = [
[[package]]
name = "kanidmd_testkit"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"assert_cmd",
"compact_jwt",
@ -3252,7 +3252,7 @@ dependencies = [
[[package]]
name = "kanidmd_web_ui_admin"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"gloo",
"gloo-utils 0.2.0",
@ -3275,7 +3275,7 @@ dependencies = [
[[package]]
name = "kanidmd_web_ui_login_flows"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"gloo",
"gloo-utils 0.2.0",
@ -3298,7 +3298,7 @@ dependencies = [
[[package]]
name = "kanidmd_web_ui_shared"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"gloo",
"js-sys",
@ -3318,7 +3318,7 @@ dependencies = [
[[package]]
name = "kanidmd_web_ui_user"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"gloo",
"gloo-timers 0.3.0",
@ -3739,7 +3739,7 @@ dependencies = [
[[package]]
name = "nss_kanidm"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"kanidm_unix_int",
"lazy_static",
@ -4015,7 +4015,7 @@ dependencies = [
[[package]]
name = "orca"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"clap",
"crossbeam",
@ -4059,7 +4059,7 @@ dependencies = [
[[package]]
name = "pam_kanidm"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"kanidm_unix_int",
"libc",
@ -5191,7 +5191,7 @@ dependencies = [
[[package]]
name = "sketching"
version = "1.1.0-rc.15-dev"
version = "1.1.0-rc.15"
dependencies = [
"num_enum",
"tracing",
@ -5273,7 +5273,7 @@ checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a"
[[package]]
name = "sshkey-attest"
version = "0.5.0-dev"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=2218d2055c0c900ef57b398423eee5e8d5521f4c#2218d2055c0c900ef57b398423eee5e8d5521f4c"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3#ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3"
dependencies = [
"base64urlsafedata",
"nom",
@ -6128,7 +6128,7 @@ dependencies = [
[[package]]
name = "webauthn-attestation-ca"
version = "0.1.0"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=2218d2055c0c900ef57b398423eee5e8d5521f4c#2218d2055c0c900ef57b398423eee5e8d5521f4c"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3#ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3"
dependencies = [
"base64urlsafedata",
"openssl",
@ -6140,7 +6140,7 @@ dependencies = [
[[package]]
name = "webauthn-authenticator-rs"
version = "0.5.0-dev"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=2218d2055c0c900ef57b398423eee5e8d5521f4c#2218d2055c0c900ef57b398423eee5e8d5521f4c"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3#ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3"
dependencies = [
"async-stream",
"async-trait",
@ -6172,7 +6172,7 @@ dependencies = [
[[package]]
name = "webauthn-rs"
version = "0.5.0-dev"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=2218d2055c0c900ef57b398423eee5e8d5521f4c#2218d2055c0c900ef57b398423eee5e8d5521f4c"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3#ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3"
dependencies = [
"base64urlsafedata",
"serde",
@ -6185,7 +6185,7 @@ dependencies = [
[[package]]
name = "webauthn-rs-core"
version = "0.5.0-dev"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=2218d2055c0c900ef57b398423eee5e8d5521f4c#2218d2055c0c900ef57b398423eee5e8d5521f4c"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3#ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3"
dependencies = [
"base64 0.21.5",
"base64urlsafedata",
@ -6209,7 +6209,7 @@ dependencies = [
[[package]]
name = "webauthn-rs-proto"
version = "0.5.0-dev"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=2218d2055c0c900ef57b398423eee5e8d5521f4c#2218d2055c0c900ef57b398423eee5e8d5521f4c"
source = "git+https://github.com/kanidm/webauthn-rs.git?rev=ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3#ebd6ff03532fdc72c553bcd8d10b5dad334dcfc3"
dependencies = [
"base64urlsafedata",
"js-sys",

View File

@ -25,14 +25,21 @@ rustPlatform.buildRustPackage rec {
owner = pname;
repo = pname;
# Latest 1.1.0-rc.15 tip
rev = "a5ca8018e3a636dbb0a79b3fd869db059d92979d";
hash = "sha256-PFGoeGn7a/lVR6rOmOKA3ydAoo3/+9RlkwBAKS22Psg=";
rev = "4d250f817dbd24d77f72427bb93ef3a367a553c6";
hash = "sha256-cXPqTIDHMWcsRFi1/u8lIpwk2m6rh4C70IwVky7B2qs=";
};
patches = [
# TODO: Remove in the next update
# or when https://github.com/kanidm/kanidm/commit/dbf476fe5ea2c120dff9a85e552be9f898c69ce7 is backported
./0001-fix-warnings-for-rust-v1.75.patch
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"base64urlsafedata-0.1.3" = "sha256-D+u4CIhx8BNyx+EH1efS4mrinjeSJopWCteSaMY1kh8=";
"base64urlsafedata-0.1.3" = "sha256-JLUxLQCwZgxCmXt636baZYo8nQW/ZfHZOqnOIrIks2s=";
"sshkeys-0.3.2" = "sha256-CNG9HW8kSwezAdIYW+CR5rqFfmuso4R0+m4OpIyXbSM=";
};
};