Skip to content

fix(mv): correct selinux cfg gating for non-Linux platforms#10989

Merged
sylvestre merged 1 commit intouutils:mainfrom
naoNao89:fix-mv-selinux-cfg
Feb 17, 2026
Merged

fix(mv): correct selinux cfg gating for non-Linux platforms#10989
sylvestre merged 1 commit intouutils:mainfrom
naoNao89:fix-mv-selinux-cfg

Conversation

@naoNao89
Copy link
Copy Markdown
Contributor

Fix mv build failure on macOS when selinux feature enabled. The cfg attribute was missing target_os check, causing pre-commit hook failures on non-Linux platforms.

The mv command was using #[cfg(feature = "selinux")] but the uucore
selinux module requires both the feature AND Linux/Android target OS.
This caused build failures on macOS when the selinux feature was enabled.

Changed both the import and usage to use:
#[cfg(all(feature = "selinux", any(target_os = "linux", target_os = "android")))]

This aligns mv with other utilities (cp, install, stat, ls) that correctly
gate selinux functionality.
@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/follow-name (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/io-errors is no longer failing!
Congrats! The gnu test tests/tail/retry is no longer failing!
Note: The gnu test tests/cut/bounded-memory is now being skipped but was previously passing.

@sylvestre sylvestre merged commit ed06c14 into uutils:main Feb 17, 2026
157 checks passed
abendrothj pushed a commit to abendrothj/coreutils that referenced this pull request Feb 17, 2026
…0989)

The mv command was using #[cfg(feature = "selinux")] but the uucore
selinux module requires both the feature AND Linux/Android target OS.
This caused build failures on macOS when the selinux feature was enabled.

Changed both the import and usage to use:
#[cfg(all(feature = "selinux", any(target_os = "linux", target_os = "android")))]

This aligns mv with other utilities (cp, install, stat, ls) that correctly
gate selinux functionality.
abendrothj pushed a commit to abendrothj/coreutils that referenced this pull request Feb 17, 2026
…0989)

The mv command was using #[cfg(feature = "selinux")] but the uucore
selinux module requires both the feature AND Linux/Android target OS.
This caused build failures on macOS when the selinux feature was enabled.

Changed both the import and usage to use:
#[cfg(all(feature = "selinux", any(target_os = "linux", target_os = "android")))]

This aligns mv with other utilities (cp, install, stat, ls) that correctly
gate selinux functionality.
@naoNao89 naoNao89 deleted the fix-mv-selinux-cfg branch February 17, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants