Skip to content

Comments

add selinux/smack cfg alias#11016

Open
xtqqczze wants to merge 11 commits intouutils:mainfrom
xtqqczze:cfg_aliases/selinux
Open

add selinux/smack cfg alias#11016
xtqqczze wants to merge 11 commits intouutils:mainfrom
xtqqczze:cfg_aliases/selinux

Conversation

@xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Feb 18, 2026

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

Contributes to #11019

Closes #10995

@xtqqczze xtqqczze mentioned this pull request Feb 18, 2026
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/date/resolution. tests/date/resolution is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/rm/isatty. tests/rm/isatty is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail/retry. tests/tail/retry is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Note: The gnu test tests/cp/link-heap is now being skipped but was previously passing.
Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.

@xtqqczze xtqqczze force-pushed the cfg_aliases/selinux branch from b98f746 to bf4239f Compare February 18, 2026 19:02
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/date/date-locale-hour is no longer failing!
Note: The gnu test tests/cp/link-heap is now being skipped but was previously passing.
Note: The gnu test tests/dd/no-allocate is now being skipped but was previously passing.
Note: The gnu test tests/seq/seq-epipe is now being skipped but was previously passing.
Note: The gnu test tests/tail/pipe-f is now being skipped but was previously passing.

@xtqqczze xtqqczze force-pushed the cfg_aliases/selinux branch from bf4239f to 0fcde2d Compare February 18, 2026 19:13
@github-actions
Copy link

GNU testsuite comparison:

Note: The gnu test tests/cut/cut-huge-range is now being skipped but was previously passing.

@xtqqczze xtqqczze marked this pull request as ready for review February 18, 2026 19:54
Copy link
Contributor

@sylvestre sylvestre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry
i really don't like the duplication of src/uu/*/build.rs

@xtqqczze
Copy link
Contributor Author

I don’t like the duplication either, but I’m not sure how to avoid it. Do you have suggestions on how we could factor this out?

@sylvestre
Copy link
Contributor

i prefer the current state than this duplication, sorry

@xtqqczze
Copy link
Contributor Author

I guess we could include!("../../../common/common_cfg.rs") in each build.rs?

@sylvestre
Copy link
Contributor

if it works, it would be better

@xtqqczze
Copy link
Contributor Author

I've tried specifying the cfg in .cargo/config.toml but it doesn't support expressions like all(...) or any(...).

The only alternative I can think of is introducing a small common_cfg helper crate to centralize the cfg_aliases logic, but that feels a bit heavy-handed.

@xtqqczze
Copy link
Contributor Author

I guess we could include!("../../../common/common_cfg.rs") in each build.rs?

@sylvestre If this works, would you approve the changes?

@oech3
Copy link
Contributor

oech3 commented Feb 20, 2026

Cannot we use workespace's toplevel build.rs?

@sylvestre
Copy link
Contributor

Cannot we use workespace's toplevel build.rs?

i don't think it works. i tried too and failed

@sylvestre
Copy link
Contributor

I guess we could include!("../../../common/common_cfg.rs") in each build.rs?

@sylvestre If this works, would you approve the changes?

yes
thanks

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.

3 participants