Skip to content

Commit f0222eb

Browse files
committed
fix(deps): refactor nix package configuration
1 parent 063264a commit f0222eb

12 files changed

Lines changed: 16 additions & 37 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -757,13 +757,7 @@ selinux = { workspace = true, optional = true }
757757
#pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`)
758758

759759
[target.'cfg(unix)'.dev-dependencies]
760-
nix = { workspace = true, features = [
761-
"process",
762-
"signal",
763-
"socket",
764-
"term",
765-
"user",
766-
] }
760+
nix = { workspace = true, features = ["fs", "signal"] }
767761
rlimit = { workspace = true }
768762
rustix = { workspace = true, features = ["net"] }
769763

src/uu/cp/src/cp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// For the full copyright and license information, please view the LICENSE
44
// file that was distributed with this source code.
5-
// spell-checker:ignore (ToDO) copydir fiemap ftruncate linkgs lstat nlink nlinks pathbuf pwrite reflink strs xattrs symlinked deduplicated advcpmv nushell IRWXG IRWXO IRWXU IRWXUGO IRWXU IRWXG IRWXO IRWXUGO sflag
5+
// spell-checker:ignore (ToDO) copydir fiemap linkgs lstat nlink nlinks pathbuf reflink strs xattrs symlinked deduplicated advcpmv nushell IRWXG IRWXO IRWXU IRWXUGO IRWXU IRWXG IRWXO IRWXUGO sflag
66
// spell-checker:ignore RDONLY futimens utimensat
77

88
use std::cmp::Ordering;

src/uu/cp/src/platform/linux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// For the full copyright and license information, please view the LICENSE
44
// file that was distributed with this source code.
5-
// spell-checker:ignore reflink ftruncate pwrite fiemap lseek nofollow
5+
// spell-checker:ignore reflink ftruncate fiemap lseek nofollow
66

77
use rustix::fs::{SeekFrom, ftruncate, ioctl_ficlone, seek};
88
use std::fs::File;

src/uu/env/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ uucore = { workspace = true, features = ["signals"] }
2323
fluent = { workspace = true }
2424

2525
[target.'cfg(unix)'.dependencies]
26-
nix = { workspace = true, features = ["signal"] }
26+
nix = { workspace = true, features = ["process", "signal"] }
2727

2828
[features]
2929
diagnostics = ["uucore/diagnostics"]

src/uu/install/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ thiserror = { workspace = true }
2020
uucore = { workspace = true, default-features = true, features = [
2121
"backup-control",
2222
"buf-copy",
23+
"entries",
2324
"fs",
2425
"mode",
2526
"perms",
26-
"entries",
2727
"process",
28+
"safe-traversal",
2829
] }
2930
fluent = { workspace = true }
3031

src/uu/mknod/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ doctest = false
2121
clap = { workspace = true }
2222
uucore = { workspace = true, features = ["fs", "mode"] }
2323
fluent = { workspace = true }
24-
nix = { workspace = true }
24+
nix = { workspace = true, features = ["fs"] }
2525

2626
[features]
2727
diagnostics = ["uucore/diagnostics"]

src/uu/mv/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ clap = { workspace = true }
2020
fs_extra = { workspace = true }
2121
indicatif = { workspace = true }
2222
libc = { workspace = true }
23-
nix = { workspace = true }
23+
nix = { workspace = true, features = ["fs"] }
2424
rustc-hash = { workspace = true }
2525
thiserror = { workspace = true }
2626
uucore = { workspace = true, features = [

src/uucore/Cargo.toml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,7 @@ time = { workspace = true, optional = true, features = [
103103
"local-offset",
104104
"macros",
105105
] }
106-
nix = { workspace = true, features = [
107-
"dir",
108-
"fs",
109-
"poll",
110-
"signal",
111-
"uio",
112-
"user",
113-
"zerocopy",
114-
] }
106+
nix = { workspace = true, optional = true }
115107
walkdir = { workspace = true, optional = true }
116108
xattr = { workspace = true, optional = true }
117109

@@ -177,23 +169,23 @@ i18n-datetime = [
177169
"jiff",
178170
]
179171
mode = ["libc", "rustix/process"]
180-
perms = ["entries", "libc", "walkdir"]
172+
perms = ["entries", "libc", "safe-traversal", "walkdir"]
181173
buf-copy = ["pipes"]
182174
parser-num = ["extendedbigdecimal", "num-traits"]
183175
parser-size = ["parser-num", "procfs"]
184176
parser-glob = ["glob"]
185177
parser = ["parser-num", "parser-size", "parser-glob"]
186178
pipes = ["fs", "rustix/pipe"]
187-
process = ["libc", "rustix/process", "windows-sys"]
179+
process = ["libc", "nix/user", "rustix/process", "windows-sys"]
188180
proc-info = ["tty", "walkdir"]
189181
quoting-style = ["i18n-common"]
190182
ranges = []
191183
ringbuffer = []
192184
safe-copy = []
193-
safe-traversal = ["libc"]
185+
safe-traversal = ["libc", "nix/fs", "nix/dir", "nix/user"]
194186
selinux = ["dep:selinux"]
195187
smack = ["xattr"]
196-
signals = []
188+
signals = ["nix/fs", "nix/signal", "nix/poll"]
197189
sum = [
198190
"digest",
199191
"hex",

src/uucore/src/lib/features.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ pub mod process;
8686
#[cfg(all(unix, feature = "safe-copy"))]
8787
pub mod safe_copy;
8888
#[cfg(all(
89+
feature = "safe-traversal",
8990
unix,
9091
not(any(target_os = "aix", target_os = "hurd", target_os = "redox"))
9192
))]

0 commit comments

Comments
 (0)