lanzatool: sync for every sign operation
This commit is contained in:
parent
a3ec2cfc15
commit
f6930955a3
|
@ -19,6 +19,12 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
|
@ -125,6 +131,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"clap",
|
||||
"goblin",
|
||||
"nix",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tempfile",
|
||||
|
@ -145,6 +152,18 @@ dependencies = [
|
|||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.25.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.16.0"
|
||||
|
|
|
@ -9,6 +9,7 @@ edition = "2021"
|
|||
anyhow = "1.0.66"
|
||||
clap = { version = "4.0.26", features = ["derive"] }
|
||||
goblin = "0.6.0"
|
||||
nix = { version = "0.25.0", default-features = false, features = [ "fs" ] }
|
||||
serde = { version = "1.0.147", features = ["derive"] }
|
||||
serde_json = "1.0.89"
|
||||
tempfile = "3.3.0"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use std::fs;
|
||||
use std::os::unix::prelude::PermissionsExt;
|
||||
use std::path::{Path, PathBuf};
|
||||
use nix::unistd::sync;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
|
@ -81,10 +82,11 @@ pub fn install(
|
|||
signer
|
||||
.sign_file(&file)
|
||||
.with_context(|| format!("Failed to sign file {}", &file.display()))?;
|
||||
sync();
|
||||
}
|
||||
|
||||
println!(
|
||||
"Succesfully installed lanzaboote to '{}'",
|
||||
"Successfully installed lanzaboote to '{}'",
|
||||
esp_paths.esp.display()
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue