Skip to content

selinux: start the support of install #7908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025

Conversation

sylvestre
Copy link
Contributor

No description provided.

@sylvestre sylvestre force-pushed the selinux-installa branch 4 times, most recently from 4237d36 to 71e3c19 Compare May 10, 2025 08:07
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/install/install-C-selinux is no longer failing!

@sylvestre
Copy link
Contributor Author

Congrats! The gnu test tests/install/install-C-selinux is no longer failing!

Oh, this is unexpected :)

@sylvestre sylvestre requested a review from Copilot May 10, 2025 17:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces initial support for SELinux in the install utility by implementing features to preserve and set security contexts during file installation. The key changes include:

  • Adding tests for SELinux functionality and updating spell-check hints in the test suite.
  • Implementing new SELinux-related functions (contexts_differ and preserve_security_context) in the uucore library.
  • Updating the install command to support new flags (-P for preserving context and -Z for setting context) and integrating SELinux functionality into the file copy process.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/by-util/test_install.rs Updated spell-check hints, removed unimplemented test, added new SELinux tests.
src/uucore/src/lib/features/selinux.rs Added functions for comparing and preserving SELinux contexts.
src/uu/install/src/install.rs Integrated SELinux support into install behavior and file operations.
src/uu/install/Cargo.toml Added selinux feature dependency for install.
Cargo.toml Added selinux feature activation for install.
Comments suppressed due to low confidence (1)

tests/by-util/test_install.rs:2017

  • Verify if the substring 'ailed to set default file creation' is intentional or if it should be corrected to 'failed to set default file creation' to improve clarity.
.stderr_contains("ailed to set default file creation");

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/install/install-C-selinux is no longer failing!

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/install/install-C-selinux is no longer failing!

@sylvestre sylvestre force-pushed the selinux-installa branch 2 times, most recently from e25df00 to 2127de5 Compare May 18, 2025 19:19
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/install/install-C-selinux is no longer failing!

@sylvestre sylvestre requested a review from cakebaker May 18, 2025 20:16
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/install/install-C-selinux is no longer failing!

@cakebaker cakebaker merged commit 3a05fa9 into uutils:main May 22, 2025
73 checks passed
@cakebaker
Copy link
Contributor

Congrats! The gnu test tests/install/install-C-selinux is no longer failing!

Great, good work :)

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