Skip to content

id: fix selinux/smack platform guards for non-Linux platforms#10995

Closed
naoNao89 wants to merge 1 commit intouutils:mainfrom
naoNao89:fix-id-selinux-platform-guards
Closed

id: fix selinux/smack platform guards for non-Linux platforms#10995
naoNao89 wants to merge 1 commit intouutils:mainfrom
naoNao89:fix-id-selinux-platform-guards

Conversation

@naoNao89
Copy link
Contributor

Fixes pre-commit hook failures on non-Linux platforms by adding proper #[cfg(target_os = "linux")] guards to selinux/smack feature gates.

The uucore crate only exposes these modules on Linux/Android, so the caller must match those platform restrictions.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/date/date-locale-hour. tests/date/date-locale-hour is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/resolution. tests/date/resolution is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tail/symlink (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/basenc/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/dd/no-allocate is now passing!
Congrats! The gnu test tests/seq/seq-epipe is now passing!

@xtqqczze
Copy link
Contributor

Note: I have a draft PR that would apply this more generally by defining a cfg alias:

selinux: { all(feature = "feat_selinux", any(target_os = "android", target_os = "linux"))

see #10444

@naoNao89
Copy link
Contributor Author

tkss

@naoNao89 naoNao89 closed this Feb 17, 2026
@xtqqczze
Copy link
Contributor

xtqqczze commented Feb 17, 2026

That's not to say this isn't worth considering on its own. Anyway, since you've closed this I will try get #10444 ready for review.

@naoNao89
Copy link
Contributor Author

heh, I thought your PR covered this, so I closed my PR :v

@xtqqczze
Copy link
Contributor

xtqqczze commented Feb 17, 2026

Ok, can you open an issue for the failures so I can fix it with my PR?

Actually, my PR doesn't cover this...

@xtqqczze
Copy link
Contributor

I've added fixes for selinux/smack feature gates to #10444

@naoNao89
Copy link
Contributor Author

tkss

@naoNao89 naoNao89 deleted the fix-id-selinux-platform-guards branch February 17, 2026 16:13
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

Comments