Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,13 @@ jobs:
# - { os , target , cargo-options , features , use-cross , toolchain, skip-tests, workspace-tests }
- { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , features: feat_os_unix_gnueabihf , use-cross: use-cross , skip-tests: true }
- { os: ubuntu-24.04-arm , target: aarch64-unknown-linux-gnu , features: feat_os_unix_gnueabihf }
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross , skip-tests: true }
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , features: feat_os_unix , use-cross: use-cross , skip-tests: true }
# - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: feat_selinux , use-cross: use-cross }
- { os: ubuntu-latest , target: i686-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross }
- { os: ubuntu-latest , target: i686-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
- { os: ubuntu-latest , target: i686-unknown-linux-musl , features: feat_os_unix , use-cross: use-cross }
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross }
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,uudoc" , use-cross: no, workspace-tests: true }
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix , use-cross: use-cross }
- { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true }
- { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos, workspace-tests: true } # M1 CPU
- { os: macos-13 , target: x86_64-apple-darwin , features: feat_os_macos, workspace-tests: true }
Expand Down
13 changes: 3 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ feat_os_macos = [
#
"feat_require_unix_hostid",
]
# "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms
# "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms.
# Also used for targets binding to the "musl" library (ref: <https://musl.libc.org/about.html>)
feat_os_unix = [
"feat_Tier1",
#
Expand All @@ -171,14 +172,6 @@ feat_os_unix_gnueabihf = [
"feat_require_unix_hostid",
"feat_require_unix_utmpx",
]
# "feat_os_unix_musl" == set of utilities which can be built/run on targets binding to the "musl" library (ref: <https://musl.libc.org/about.html>)
feat_os_unix_musl = [
"feat_Tier1",
#
"feat_require_crate_cpp",
"feat_require_unix",
"feat_require_unix_hostid",
]
feat_os_unix_android = [
"feat_Tier1",
#
Expand Down Expand Up @@ -308,7 +301,7 @@ hostname = "0.4"
iana-time-zone = "0.1.57"
indicatif = "0.17.8"
itertools = "0.14.0"
libc = "0.2.153"
libc = "0.2.172"
linux-raw-sys = "0.9"
lscolors = { version = "0.20.0", default-features = false, features = [
"gnu_legacy",
Expand Down
11 changes: 11 additions & 0 deletions src/uu/pinky/src/pinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@ use uucore::{format_usage, help_about, help_usage};

mod platform;

#[cfg(target_env = "musl")]
const ABOUT: &str = concat!(
help_about!("pinky.md"),
"\n\nWarning: When built with musl libc, the `pinky` utility may show incomplete \n",
"or missing user information due to musl's stub implementation of `utmpx` \n",
"functions. This limitation affects the ability to retrieve accurate details \n",
"about logged-in users."
);

#[cfg(not(target_env = "musl"))]
const ABOUT: &str = help_about!("pinky.md");

const USAGE: &str = help_usage!("pinky.md");

mod options {
Expand Down
10 changes: 10 additions & 0 deletions src/uu/uptime/src/uptime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@ use uucore::{format_usage, help_about, help_usage};
#[cfg(not(target_os = "openbsd"))]
use uucore::utmpx::*;

#[cfg(target_env = "musl")]
const ABOUT: &str = concat!(
help_about!("uptime.md"),
"\n\nWarning: When built with musl libc, the `uptime` utility may show '0 users' \n",
"due to musl's stub implementation of utmpx functions. Boot time and load averages \n",
"are still calculated using alternative mechanisms."
);

#[cfg(not(target_env = "musl"))]
const ABOUT: &str = help_about!("uptime.md");

const USAGE: &str = help_usage!("uptime.md");
pub mod options {
pub static SINCE: &str = "since";
Expand Down
9 changes: 9 additions & 0 deletions src/uu/users/src/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ use utmp_classic::{UtmpEntry, parse_from_path};
#[cfg(not(target_os = "openbsd"))]
use uucore::utmpx::{self, Utmpx};

#[cfg(target_env = "musl")]
const ABOUT: &str = concat!(
help_about!("users.md"),
"\n\nWarning: When built with musl libc, the `users` utility may show '0 users' \n",
"due to musl's stub implementation of utmpx functions."
);

#[cfg(not(target_env = "musl"))]
const ABOUT: &str = help_about!("users.md");

const USAGE: &str = help_usage!("users.md");

#[cfg(target_os = "openbsd")]
Expand Down
10 changes: 10 additions & 0 deletions src/uu/who/src/who.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,17 @@ mod options {
pub const FILE: &str = "FILE"; // if length=1: FILE, if length=2: ARG1 ARG2
}

#[cfg(target_env = "musl")]
const ABOUT: &str = concat!(
help_about!("who.md"),
"\n\nNote: When built with musl libc, the `who` utility will not display any \n",
"information about logged-in users. This is due to musl's stub implementation \n",
"of `utmpx` functions, which prevents access to the necessary data."
);

#[cfg(not(target_env = "musl"))]
const ABOUT: &str = help_about!("who.md");

const USAGE: &str = help_usage!("who.md");

#[cfg(target_os = "linux")]
Expand Down
1 change: 0 additions & 1 deletion src/uucore/src/lib/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ pub mod signals;
not(target_os = "fuchsia"),
not(target_os = "openbsd"),
not(target_os = "redox"),
not(target_env = "musl"),
feature = "utmpx"
))]
pub mod utmpx;
Expand Down
1 change: 0 additions & 1 deletion src/uucore/src/lib/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ pub use crate::features::signals;
not(target_os = "fuchsia"),
not(target_os = "openbsd"),
not(target_os = "redox"),
not(target_env = "musl"),
feature = "utmpx"
))]
pub use crate::features::utmpx;
Expand Down
1 change: 1 addition & 0 deletions tests/by-util/test_uptime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ fn test_uptime_with_non_existent_file() {
// This will pass
#[test]
#[cfg(not(any(target_os = "openbsd", target_os = "macos")))]
#[cfg(not(target_env = "musl"))]
#[cfg_attr(
all(target_arch = "aarch64", target_os = "linux"),
ignore = "Issue #7159 - Test not supported on ARM64 Linux"
Expand Down
Loading