Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,8 @@ jobs:
export RUST_BACKTRACE=1
export CARGO_TERM_COLOR=always
if (test -z "\$FAULT"); then cargo nextest run --hide-progress-bar --profile ci --features '${{ matrix.job.features }}' || FAULT=1 ; fi
# There is no systemd-logind on FreeBSD, so test all features except feat_systemd_logind ( https://github.com/rust-lang/cargo/issues/3126#issuecomment-2523441905 )
if (test -z "\$FAULT"); then
UUCORE_FEATURES=\$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "uucore") | .features | keys | .[]' | grep -v "feat_systemd_logind" | paste -s -d "," -)
UUCORE_FEATURES=\$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "uucore") | .features | keys | .[]' | paste -s -d "," -)
cargo nextest run --hide-progress-bar --profile ci --features "\$UUCORE_FEATURES" -p uucore || FAULT=1
fi
# Test building with make
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/openbsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,9 @@ jobs:
cargo test --features '${{ matrix.job.features }}' || FAULT=1
echo "::endgroup::"
fi
# There is no systemd-logind on OpenBSD, so test all features except feat_systemd_logind
if (test -z "\$FAULT"); then
echo "::group::cargo test (uucore)"
UUCORE_FEATURES=\$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "uucore") | .features | keys | .[]' | grep -v "feat_systemd_logind" | paste -s -d "," -)
UUCORE_FEATURES=\$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "uucore") | .features | keys | .[]' | paste -s -d "," -)
cargo test --features "\$UUCORE_FEATURES" -p uucore || FAULT=1
echo "::endgroup::"
fi
Expand Down
3 changes: 3 additions & 0 deletions .vscode/cspell.dictionaries/workspace.wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# * cargo
cdylib
doctest
libloading

# * uutils project
uutils
Expand Down Expand Up @@ -186,6 +187,7 @@ execvp
fdatasync
freeaddrinfo
getaddrinfo
dlopen
getegid
geteuid
getgid
Expand All @@ -201,6 +203,7 @@ inode
inodes
isatty
lchown
libsystemd
pathlen
setgid
setgroups
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jiff = "0.2.18"
jiff-icu = "0.2.2"
jiff-tzdb = "0.1"
libc = "0.2.186"
libloading = "0.8.9"
lscolors = { version = "0.21.0", default-features = false, features = [
"gnu_legacy",
] }
Expand Down Expand Up @@ -454,14 +455,6 @@ feat_diagnostics = ["uucore/diagnostics"]
## Optional feature for stdbuf
# "feat_external_libstdbuf" == use an external libstdbuf.so for stdbuf instead of embedding it
feat_external_libstdbuf = ["stdbuf/feat_external_libstdbuf"]
# "feat_systemd_logind" == enable feat_systemd_logind support for utmpx replacement
feat_systemd_logind = [
"pinky/feat_systemd_logind",
"uptime/feat_systemd_logind",
"users/feat_systemd_logind",
"uucore/feat_systemd_logind",
"who/feat_systemd_logind",
]
# "feat_selinux" == enable support for SELinux Security Context (by using `--features feat_selinux`)
# NOTE:
# * The selinux(-sys) crate requires `libselinux` headers and shared library to be accessible in the C toolchain at compile time.
Expand Down
3 changes: 0 additions & 3 deletions src/uu/pinky/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ clap = { workspace = true }
fluent = { workspace = true }
uucore = { workspace = true, features = ["utmpx", "entries"] }

[features]
feat_systemd_logind = ["uucore/feat_systemd_logind"]

[lints]
workspace = true

Expand Down
3 changes: 0 additions & 3 deletions src/uu/uptime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jiff = { workspace = true }
thiserror = { workspace = true }
uucore = { workspace = true, features = ["libc", "utmpx", "uptime"] }

[features]
feat_systemd_logind = ["uucore/feat_systemd_logind"]

[lints]
workspace = true

Expand Down
3 changes: 0 additions & 3 deletions src/uu/users/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ uucore = { workspace = true, features = [] }
[target.'cfg(target_os = "openbsd")'.dependencies]
utmp-classic = { workspace = true }

[features]
feat_systemd_logind = ["uucore/feat_systemd_logind"]

[lints]
workspace = true

Expand Down
3 changes: 0 additions & 3 deletions src/uu/who/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ fluent = { workspace = true }
rustix = { workspace = true, features = ["fs", "termios"] }
uucore = { workspace = true, features = ["utmpx"] }

[features]
feat_systemd_logind = ["uucore/feat_systemd_logind"]

[lints]
workspace = true

Expand Down
4 changes: 2 additions & 2 deletions src/uucore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ time = { workspace = true, optional = true, features = [
walkdir = { workspace = true, optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
libloading = { workspace = true, optional = true }
procfs = { workspace = true, optional = true }

[target.'cfg(windows)'.dependencies]
Expand Down Expand Up @@ -164,7 +165,6 @@ fsext = ["libc", "windows-sys", "bstr", "wide"]
fsxattr = ["xattr", "itertools", "libc"]
hardware = []
lines = []
feat_systemd_logind = ["utmpx", "libc"]
format = [
"bigdecimal",
"extendedbigdecimal",
Expand Down Expand Up @@ -225,7 +225,7 @@ sum = [
openssl = ["dep:openssl"]
update-control = ["parser"]
utf8 = []
utmpx = ["time", "time/macros", "libc", "dns-lookup"]
utmpx = ["time", "time/macros", "libc", "dns-lookup", "dep:libloading"]
version-cmp = []
wide = []
tty = []
Expand Down
2 changes: 1 addition & 1 deletion src/uucore/src/lib/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub mod selinux;
pub mod signals;
#[cfg(all(feature = "smack", target_os = "linux"))]
pub mod smack;
#[cfg(feature = "feat_systemd_logind")]
#[cfg(all(target_os = "linux", feature = "utmpx"))]
pub mod systemd_logind;
#[cfg(all(
feature = "utmpx",
Expand Down
Loading
Loading