From 522799caebdc2f1f65c33f90b0961d6a6c4edc26 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 23 Jan 2024 14:16:21 -0500 Subject: [PATCH] Bump to cap-std-ext 4 (and cap-std 3) Just keeping up with the churn. --- lib/Cargo.toml | 2 +- lib/src/commit.rs | 2 +- lib/src/container/ocidir.rs | 3 +-- lib/src/container/store.rs | 3 +-- lib/src/repair.rs | 3 +-- lib/tests/it/main.rs | 3 +-- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 4c80c5a7..bb2c8e81 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -18,7 +18,7 @@ chrono = "0.4.19" olpc-cjson = "0.1.1" clap = { version= "4.2", features = ["derive"] } clap_mangen = { version = "0.2", optional = true } -cap-std-ext = "3.0" +cap-std-ext = "4.0" flate2 = { features = ["zlib"], default_features = false, version = "1.0.20" } fn-error-context = "0.2.0" futures-util = "0.3.13" diff --git a/lib/src/commit.rs b/lib/src/commit.rs index 246d8360..babe9017 100644 --- a/lib/src/commit.rs +++ b/lib/src/commit.rs @@ -7,9 +7,9 @@ use crate::mountutil::is_mountpoint; use anyhow::Context; use anyhow::Result; use cap_std::fs::Dir; +use cap_std::fs::MetadataExt; use cap_std_ext::cap_std; use cap_std_ext::dirext::CapStdExtDirExt; -use rustix::fs::MetadataExt; use std::path::Path; use std::path::PathBuf; use tokio::task; diff --git a/lib/src/container/ocidir.rs b/lib/src/container/ocidir.rs index e144ce07..96cb4166 100644 --- a/lib/src/container/ocidir.rs +++ b/lib/src/container/ocidir.rs @@ -6,7 +6,7 @@ use anyhow::{anyhow, Context, Result}; use camino::Utf8Path; -use cap_std::fs::Dir; +use cap_std::fs::{Dir, DirBuilderExt}; use cap_std_ext::dirext::CapStdExtDirExt; use cap_std_ext::{cap_std, cap_tempfile}; use containers_image_proxy::oci_spec; @@ -21,7 +21,6 @@ use std::collections::HashMap; use std::fmt::Debug; use std::fs::File; use std::io::{prelude::*, BufReader}; -use std::os::unix::fs::DirBuilderExt; use std::path::{Path, PathBuf}; /// Path inside an OCI directory to the blobs diff --git a/lib/src/container/store.rs b/lib/src/container/store.rs index d2ba2d59..a2d35972 100644 --- a/lib/src/container/store.rs +++ b/lib/src/container/store.rs @@ -12,14 +12,13 @@ use crate::sysroot::SysrootLock; use crate::utils::ResultExt; use anyhow::{anyhow, Context}; use camino::{Utf8Path, Utf8PathBuf}; -use cap_std_ext::cap_std::fs::Dir; +use cap_std_ext::cap_std::fs::{Dir, MetadataExt}; use containers_image_proxy::{ImageProxy, OpenedImage}; use fn_error_context::context; use futures_util::TryFutureExt; use oci_spec::image::{self as oci_image, Descriptor, History, ImageConfiguration, ImageManifest}; use ostree::prelude::{Cast, FileEnumeratorExt, FileExt, ToVariant}; use ostree::{gio, glib}; -use rustix::fs::MetadataExt; use std::collections::{BTreeSet, HashMap}; use std::iter::FromIterator; use tokio::sync::mpsc::{Receiver, Sender}; diff --git a/lib/src/repair.rs b/lib/src/repair.rs index 0b040bc6..d15bdcef 100644 --- a/lib/src/repair.rs +++ b/lib/src/repair.rs @@ -4,11 +4,10 @@ use std::collections::{BTreeMap, BTreeSet}; use std::fmt::Display; use anyhow::{anyhow, Context, Result}; -use cap_std::fs::Dir; +use cap_std::fs::{Dir, MetadataExt}; use cap_std_ext::cap_std; use fn_error_context::context; use serde::{Deserialize, Serialize}; -use std::os::unix::fs::MetadataExt; use crate::sysroot::SysrootLock; diff --git a/lib/tests/it/main.rs b/lib/tests/it/main.rs index 6c3934bc..a17dbef0 100644 --- a/lib/tests/it/main.rs +++ b/lib/tests/it/main.rs @@ -1,6 +1,6 @@ use anyhow::{Context, Result}; use camino::Utf8Path; -use cap_std::fs::{Dir, DirBuilder}; +use cap_std::fs::{Dir, DirBuilder, DirBuilderExt}; use cap_std_ext::cap_std; use containers_image_proxy::oci_spec; use containers_image_proxy::oci_spec::image::ImageManifest; @@ -17,7 +17,6 @@ use ostree_ext::{gio, glib}; use std::borrow::Cow; use std::collections::{HashMap, HashSet}; use std::io::{BufReader, BufWriter}; -use std::os::unix::fs::DirBuilderExt; use std::process::Command; use std::time::SystemTime; use xshell::cmd;