From d3d6062f0a64bbbeb9efa3c318ca5dcda1b0567e Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Wed, 29 Jul 2026 15:15:32 +0900 Subject: [PATCH] cp: remove feat_acl & exacl (dupe of copy_acls) --- Cargo.lock | 23 ----------------------- Cargo.toml | 5 ----- src/uu/cp/Cargo.toml | 2 -- src/uu/cp/src/cp.rs | 7 +------ 4 files changed, 1 insertion(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7dbf489d71..db6f7ecb7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1018,18 +1018,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "exacl" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de9e551ced9d700a31dacb8b168129640240fcd7a279a3fa4d59608b84ebcae" -dependencies = [ - "bitflags 2.11.1", - "log", - "scopeguard", - "uuid", -] - [[package]] name = "fastrand" version = "2.4.1" @@ -3430,7 +3418,6 @@ version = "0.10.0" dependencies = [ "clap", "codspeed-divan-compat", - "exacl", "filetime", "fluent", "indicatif", @@ -4615,16 +4602,6 @@ dependencies = [ "quote", ] -[[package]] -name = "uuid" -version = "1.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "uutests" version = "0.10.0" diff --git a/Cargo.toml b/Cargo.toml index 4f70383e38..7e885cc4fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,11 +74,6 @@ feat_systemd_logind = [ "uucore/feat_systemd_logind", "who/feat_systemd_logind", ] -# "feat_acl" == enable support for ACLs (access control lists; by using`--features feat_acl`) -# NOTE: -# * On linux, the posix-acl/acl-sys crate requires `libacl` headers and shared library to be accessible in the C toolchain at compile time. -# * On FreeBSD and macOS this is not required. -feat_acl = ["cp/feat_acl"] # "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. diff --git a/src/uu/cp/Cargo.toml b/src/uu/cp/Cargo.toml index 43e6918cb6..0f2a818119 100644 --- a/src/uu/cp/Cargo.toml +++ b/src/uu/cp/Cargo.toml @@ -41,7 +41,6 @@ rustix = { workspace = true } selinux = { workspace = true, optional = true } [target.'cfg(unix)'.dependencies] -exacl = { workspace = true, optional = true } nix = { workspace = true, features = ["fs"] } [target.'cfg(target_os = "windows")'.dependencies] @@ -65,7 +64,6 @@ harness = false [features] feat_selinux = ["selinux", "uucore/selinux"] -feat_acl = ["exacl"] [lints] workspace = true diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index 780c0ce2a6..b8062b8daf 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -1875,18 +1875,13 @@ pub(crate) fn copy_attributes( fs::set_permissions(dest, source_perms) .map_err(|e| CpError::IoErrContext(e, context.to_owned()))?; - // FIXME: Implement this for windows as well - #[cfg(feature = "feat_acl")] - exacl::getfacl(source, None) - .and_then(|acl| exacl::setfacl(&[dest], &acl, None)) - .map_err(|err| CpError::Error(err.to_string()))?; // GNU `cp -p` preserves POSIX ACLs as part of mode. On Linux the // ACLs are stored as `system.posix_acl_*` xattrs; copy just those // so we keep ACL parity with GNU without preserving user xattrs // (which are intentionally excluded from the default -p set per // issue #9704). Best-effort: ignore failures on filesystems that // do not support ACL xattrs. - #[cfg(all(unix, not(target_os = "android")))] + #[cfg(all(unix, not(target_os = "android")))] // todo: support acl for other targets copy_acls(source, dest); }