Skip to content
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

Add Trusty OS support #3942

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

randomPoison
Copy link

This PR adds support for the Trusty secure operating system. This upstreams the patch that we have been using internally, cleaned up to meet the project's coding conventions.

This is a revival of #2987.

@rustbot
Copy link
Collaborator

rustbot commented Sep 24, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@randomPoison
Copy link
Author

Addressing a comment from the original PR, @JohnTitor asked:

I wonder if we could move the module under linux_like or somewhere else similar to that. I'm not familiar with Trusty but is it completely different from Linux-like OS (i.e. exposing linux-like items on Trusty is harmful)?

Yeah, Trusty is not linux-like, nor is it a Unix. It has some overlap with those platforms, but isn't part of the same family of systems. I think the right thing to do is have Trusty be its own module.

@randomPoison
Copy link
Author

I think this would also be a good candidate for merging over to the 0.2 branch. The diff should apply cleanly, I've tested it against both branches.

@rustbot label stable-nominated

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Sep 24, 2024
@randomPoison
Copy link
Author

What should I do about the unknown target_os = "trusty" cfg in CI? The targets aren't yet in the stable compiler. I've got this Cargo.toml snippet I've been using locally

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = [
    'cfg(target_os, values("trusty"))',
]

Is that appropriate to add in the PR as a temporary way to suppress the lint? Or is there a better way to handle this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants