Merge pull request #6316 from nymtech/am/update-nix-v0.30.1

Update nix to v0.30.1
This commit is contained in:
Andrej Mihajlov
2026-01-13 09:13:45 +01:00
committed by GitHub
3 changed files with 28 additions and 28 deletions
Generated
+19 -18
View File
@@ -1259,7 +1259,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys 0.48.0",
"windows-sys 0.59.0",
]
[[package]]
@@ -3970,7 +3970,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
@@ -4657,17 +4657,6 @@ dependencies = [
"unicode-segmentation",
]
[[package]]
name = "nix"
version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
dependencies = [
"bitflags 2.9.1",
"cfg-if",
"libc",
]
[[package]]
name = "nix"
version = "0.29.0"
@@ -4681,6 +4670,18 @@ dependencies = [
"memoffset",
]
[[package]]
name = "nix"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
dependencies = [
"bitflags 2.9.1",
"cfg-if",
"cfg_aliases",
"libc",
]
[[package]]
name = "no-std-compat"
version = "0.4.1"
@@ -7734,7 +7735,7 @@ dependencies = [
"hex",
"humantime",
"humantime-serde",
"nix 0.27.1",
"nix 0.30.1",
"nym-async-file-watcher",
"nym-bin-common",
"nym-config",
@@ -8726,7 +8727,7 @@ dependencies = [
"once_cell",
"socket2 0.5.10",
"tracing",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
@@ -9175,7 +9176,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.4.15",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
@@ -10502,7 +10503,7 @@ dependencies = [
"getrandom 0.3.3",
"once_cell",
"rustix 1.0.8",
"windows-sys 0.52.0",
"windows-sys 0.59.0",
]
[[package]]
@@ -12356,7 +12357,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.48.0",
"windows-sys 0.59.0",
]
[[package]]
+1 -1
View File
@@ -294,7 +294,7 @@ ledger-transport-hid = "0.10.0"
log = "0.4"
mime = "0.3.17"
moka = { version = "0.12", features = ["future"] }
nix = "0.27.1"
nix = "0.30.1"
notify = "5.1.0"
once_cell = "1.21.3"
opentelemetry = "0.19.0"
+8 -9
View File
@@ -6,10 +6,9 @@ use crate::daemon::Daemon;
use crate::error::NymvisorError;
use crate::upgrades::download::download_upgrade_binary;
use crate::upgrades::types::{CurrentVersionInfo, UpgradeHistory, UpgradePlan};
use nix::fcntl::{FlockArg, flock};
use nix::fcntl::{Flock, FlockArg};
use std::fs;
use std::fs::File;
use std::os::fd::AsRawFd;
use std::path::PathBuf;
use time::OffsetDateTime;
use tracing::{debug, info};
@@ -58,15 +57,15 @@ pub(crate) async fn perform_upgrade(config: &Config) -> Result<UpgradeResult, Ny
path: lock_path.clone(),
source,
})?;
let lock_fd = lock_file.as_raw_fd();
debug!("attempting to acquire the lock");
if let Err(err) = flock(lock_fd, FlockArg::LockExclusiveNonblock) {
return Err(NymvisorError::UnableToAcquireUpgradePlanLock {
lock_path,
libc_code: err,
});
}
let _locked_file =
Flock::lock(lock_file, FlockArg::LockExclusiveNonblock).map_err(|(_lock_file, err)| {
NymvisorError::UnableToAcquireUpgradePlanLock {
lock_path: lock_path.clone(),
libc_code: err,
}
})?;
let upgrade_binary_path = config.upgrade_binary(&upgrade_name);