From 81e724509b90d8bffc2a603f909a80a134ed9ac7 Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Wed, 25 Mar 2026 10:23:56 -0400 Subject: [PATCH 1/3] Add package.rust-version to NSS manifest Supporting multiple Ubuntu versions means (possibly) having to support multiple rustc versions. Explicitly defining a MSRV helps us control how far we can bump our dependencies. --- nss/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/nss/Cargo.toml b/nss/Cargo.toml index d86dd2903c..b11230755c 100644 --- a/nss/Cargo.toml +++ b/nss/Cargo.toml @@ -2,6 +2,7 @@ name = "nss" version = "0.1.0" edition = "2021" +rust-version = "1.82.0" [lib] crate-type = ["cdylib"] From 046c93cc149400db833987e96423b3ec2e080274 Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Tue, 31 Mar 2026 09:42:56 -0400 Subject: [PATCH 2/3] Bump Rust MSRV to 1.91 In order to rely on some important resolver updates of Cargo (especially when it comes to respecting the MSRV when bumping updates), we need Rust 2024 edition, which requires Rust >= 1.84. Since Noble has cargo-1.91 available, we can safely bump the Rust version without risking FTBFS due to versioning issues. --- debian/control | 2 +- nss/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 16a917b89b..b2b4af6925 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Build-Depends: debhelper-compat (= 13), dh-exec, dh-golang, dctrl-tools, - cargo (>= 1.82) | cargo-1.82, + cargo (>= 1.91) | cargo-1.91, # FIXME: We need cargo-vendor-filterer starting from plucky, but noble isn't ready yet # so workaround it, making it kind of optional, and requiring it only on versions after # noble (controlled via base-files version that matches the one in noble). diff --git a/nss/Cargo.toml b/nss/Cargo.toml index b11230755c..a892d76c03 100644 --- a/nss/Cargo.toml +++ b/nss/Cargo.toml @@ -2,7 +2,7 @@ name = "nss" version = "0.1.0" edition = "2021" -rust-version = "1.82.0" +rust-version = "1.91.0" [lib] crate-type = ["cdylib"] From 370ea4aad5943f542801fc58e08bc7fec6bda712 Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Wed, 25 Mar 2026 10:25:41 -0400 Subject: [PATCH 3/3] Use resolver '3' for the workspace Some important changes to how MSRV is handled were introduced in Rust 2024. We need to switch to resolver version 3 in order to have access to those changes. More information can be found in: https://rust-lang.github.io/rfcs/3537-msrv-resolver.html Switching resolvers sometimes require some code changes, which are integrated in this commit as a result of running "cargo fix --edition" --- Cargo.toml | 2 +- nss/src/logs/mod.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dca77e898e..a58aece6d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] members = ["nss/"] exclude = ["vendor_rust/", "authd-oidc-brokers/third_party/libhimmelblau/", "parts/libhimmelblau/build"] -resolver = "2" +resolver = "3" [profile.release] lto = "thin" diff --git a/nss/src/logs/mod.rs b/nss/src/logs/mod.rs index 2a228b6b8f..9bf64e6176 100644 --- a/nss/src/logs/mod.rs +++ b/nss/src/logs/mod.rs @@ -52,11 +52,12 @@ fn init_sys_logger(log_level: LevelFilter) { pid: std::process::id(), }; - let logger = if let Ok(l) = syslog::unix(formatter) { - l - } else { - eprintln!("failed to create syslog logger"); - return; + let logger = match syslog::unix(formatter) { + Ok(l) => l, + _ => { + eprintln!("failed to create syslog logger"); + return; + } }; if let Err(err) = log::set_boxed_logger(Box::new(BasicLogger::new(logger))) {