From 9f55ebbed7acd53cce7d612330ecc45f0dcd822f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 17:19:38 +0000 Subject: [PATCH 1/2] build(deps): bump sd-notify from 0.4.5 to 0.5.0 Bumps [sd-notify](https://github.com/lnicola/sd-notify) from 0.4.5 to 0.5.0. - [Changelog](https://github.com/lnicola/sd-notify/blob/master/CHANGELOG.md) - [Commits](https://github.com/lnicola/sd-notify/compare/v0.4.5...v0.5.0) --- updated-dependencies: - dependency-name: sd-notify dependency-version: 0.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1a2abb5c1..ed1dc00b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5410,9 +5410,9 @@ dependencies = [ [[package]] name = "sd-notify" -version = "0.4.5" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b943eadf71d8b69e661330cb0e2656e31040acf21ee7708e2c238a0ec6af2bf4" +checksum = "3e4ef7359e694bfaf1dd27a30f9d760b54c00dfae9f19bd0c05a39bc9128fe76" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 5384b7a7a..85a98d891 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -540,7 +540,7 @@ version = "1.13.0" # systemd service status notification [workspace.dependencies.sd-notify] -version = "0.4.5" +version = "0.5.0" # JSON Schema generation [workspace.dependencies.schemars] From 13d10dfe7e4efd56c06abb24301296ebd57526b1 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Thu, 2 Jul 2026 22:18:27 +0200 Subject: [PATCH 2/2] Adapt to the sd-notify 0.5 API changes `notify()` lost its `unset_env` argument, and `watchdog_enabled()` now returns an `Option` directly. --- crates/cli/src/lifecycle.rs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/crates/cli/src/lifecycle.rs b/crates/cli/src/lifecycle.rs index 774c890c1..3da49f9d1 100644 --- a/crates/cli/src/lifecycle.rs +++ b/crates/cli/src/lifecycle.rs @@ -64,7 +64,7 @@ impl Reloadable for Templates { /// A wrapper around [`sd_notify::notify`] that logs any errors fn notify(states: &[sd_notify::NotifyState]) { - if let Err(e) = sd_notify::notify(false, states) { + if let Err(e) = sd_notify::notify(states) { tracing::error!( error = &e as &dyn std::error::Error, "Failed to notify service manager" @@ -133,16 +133,8 @@ impl LifecycleManager { notify(&[sd_notify::NotifyState::Ready]); // This will be `Some` if we have the watchdog enabled, and `None` if not - let mut watchdog_interval = { - let mut watchdog_usec = 0; - if sd_notify::watchdog_enabled(false, &mut watchdog_usec) { - Some(tokio::time::interval(Duration::from_micros( - watchdog_usec / 2, - ))) - } else { - None - } - }; + let mut watchdog_interval = + sd_notify::watchdog_enabled().map(|timeout| tokio::time::interval(timeout / 2)); // Wait for a first shutdown signal and trigger the soft shutdown let likely_crashed = loop {