mirror of
https://github.com/containers/youki
synced 2024-05-10 09:36:13 +02:00
bump up to nix-0.22.0
This commit is contained in:
parent
8601c0bc2e
commit
622fc1e5d1
|
@ -403,9 +403,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.95"
|
||||
version = "0.2.98"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "789da6d93f1b866ffe175afc5322a4d76c038605a1c3319bb57b06967ca98a36"
|
||||
checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790"
|
||||
|
||||
[[package]]
|
||||
name = "libdbus-sys"
|
||||
|
@ -472,9 +472,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.7.11"
|
||||
version = "0.7.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956"
|
||||
checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
|
@ -494,21 +494,22 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.19.1"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2ccba0cfe4fdf15982d1674c69b1fd80bad427d293849982668dfe454bd61f2"
|
||||
checksum = "5c3728fec49d363a50a8828a190b379a446cc5cf085c06259bbbeb34447e4ec7"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
"cfg-if 1.0.0",
|
||||
"libc",
|
||||
"memoffset",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c3728fec49d363a50a8828a190b379a446cc5cf085c06259bbbeb34447e4ec7"
|
||||
checksum = "cf1e25ee6b412c2a1e3fcb6a4499a5c1bfe7f43e014bdce9a6b6666e5aa2d187"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
|
@ -561,7 +562,7 @@ version = "0.1.0"
|
|||
dependencies = [
|
||||
"anyhow",
|
||||
"caps",
|
||||
"nix 0.19.1",
|
||||
"nix 0.22.0",
|
||||
"quickcheck",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
@ -1043,7 +1044,7 @@ dependencies = [
|
|||
"libc",
|
||||
"log",
|
||||
"mio",
|
||||
"nix 0.19.1",
|
||||
"nix 0.22.0",
|
||||
"oci_spec",
|
||||
"once_cell",
|
||||
"prctl",
|
||||
|
|
|
@ -15,7 +15,7 @@ default-features = false
|
|||
features = ["std", "suggestions", "derive"]
|
||||
|
||||
[dependencies]
|
||||
nix = "0.19.1"
|
||||
nix = "0.22.0"
|
||||
procfs = "0.9.1"
|
||||
# Waiting for new caps release, replace git with version on release
|
||||
caps = { git = "https://github.com/lucab/caps-rs", rev = "cb54844", features = ["serde_support"] }
|
||||
|
@ -25,7 +25,7 @@ prctl = "1.0.0"
|
|||
libc = "0.2.84"
|
||||
log = "0.4"
|
||||
anyhow = "1.0"
|
||||
mio = { version = "0.7", features = ["os-ext", "os-poll"] }
|
||||
mio = { version = "0.7.13", features = ["os-ext", "os-poll"] }
|
||||
chrono = { version="0.4", features = ["serde"] }
|
||||
once_cell = "1.6.0"
|
||||
futures = { version = "0.3", features = ["thread-pool"] }
|
||||
|
@ -41,4 +41,4 @@ quickcheck = "1"
|
|||
serial_test = "0.5.1"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
lto = true
|
|
@ -9,7 +9,7 @@ proptests = ["quickcheck"]
|
|||
|
||||
[dependencies]
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
nix = "0.19.1"
|
||||
nix = "0.22.0"
|
||||
anyhow = "1.0"
|
||||
serde_json = "1.0"
|
||||
# Waiting for new caps release, replace git with version on release
|
||||
|
|
|
@ -6,7 +6,7 @@ pub fn clone(cb: sched::CloneCb, clone_flags: sched::CloneFlags) -> Result<Pid>
|
|||
// unlike fork, clone requires the caller to allocate the stack. here, we use the default
|
||||
// 4KB for stack size, consistant with the runc implementation.
|
||||
const STACK_SIZE: usize = 4096;
|
||||
let ref mut stack: [u8; STACK_SIZE] = [0; STACK_SIZE];
|
||||
let stack: &mut [u8; STACK_SIZE] = &mut [0; STACK_SIZE];
|
||||
// pass in the SIGCHID flag to mimic the effect of forking a process
|
||||
let signal = nix::sys::signal::Signal::SIGCHLD;
|
||||
let pid = sched::clone(cb, stack, clone_flags, Some(signal as i32))?;
|
||||
|
@ -35,7 +35,7 @@ mod tests {
|
|||
let flags = sched::CloneFlags::CLONE_NEWPID | sched::CloneFlags::CLONE_NEWUSER;
|
||||
let pid = super::clone(
|
||||
Box::new(|| {
|
||||
if let Err(_) = cb() {
|
||||
if cb().is_err() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -261,10 +261,8 @@ fn mount_to_container(
|
|||
PathBuf::from(&m.source)
|
||||
};
|
||||
|
||||
if let Err(::nix::Error::Sys(errno)) =
|
||||
nix_mount(Some(&*src), dest, Some(&*m.typ), flags, Some(&*d))
|
||||
{
|
||||
if errno != Errno::EINVAL {
|
||||
if let Err(errno) = nix_mount(Some(&*src), dest, Some(&*m.typ), flags, Some(&*d)) {
|
||||
if !matches!(errno, Errno::EINVAL) {
|
||||
bail!("mount of {} failed", m.destination.display());
|
||||
}
|
||||
nix_mount(Some(&*src), dest, Some(&*m.typ), flags, Some(data))?;
|
||||
|
|
|
@ -34,8 +34,8 @@ pub fn setup_console_socket(
|
|||
csocketfd,
|
||||
&socket::SockAddr::Unix(socket::UnixAddr::new(&*socket_name)?),
|
||||
) {
|
||||
Err(e) => {
|
||||
if e != ::nix::Error::Sys(Errno::ENOENT) {
|
||||
Err(errno) => {
|
||||
if !matches!(errno, Errno::ENOENT) {
|
||||
bail!("failed to open {}", socket_name);
|
||||
}
|
||||
-1
|
||||
|
|
Loading…
Reference in New Issue