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

Only run check SIP enablement once in init step #2441

Merged
merged 5 commits into from
Aug 23, 2024

Conversation

angelapwen
Copy link
Contributor

@angelapwen angelapwen commented Aug 22, 2024

In #2434 we stopped calling the df system binary on MacOS ARM runners where SIP was disabled, but the actual call to csrutil itself was run again and is also a binary 😸

This change makes it so that csrutil is only called once, in the init step before the build tracer environment variables are set, and then its result is saved in an environment variable.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

henrymercer
henrymercer previously approved these changes Aug 23, 2024
src/util.ts Outdated
logger: Logger,
): Promise<boolean | undefined> {
if (process.env[EnvVar.IS_SIP_ENABLED] !== undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We may also want to check that it's not the empty string (or defensively that it's either "true" or "false")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can check if it's "true" or "false" 👍 good suggestion!

henrymercer
henrymercer previously approved these changes Aug 23, 2024
src/util.ts Outdated Show resolved Hide resolved
Co-authored-by: Henry Mercer <[email protected]>
@angelapwen angelapwen added the Rebuild Re-transpile JS & re-generate workflows label Aug 23, 2024
@github-actions github-actions bot removed the Rebuild Re-transpile JS & re-generate workflows label Aug 23, 2024
Copy link
Contributor

Pushed a commit to rebuild the Action. Please mark the PR as ready for review to trigger PR checks.

@github-actions github-actions bot marked this pull request as draft August 23, 2024 15:44
@angelapwen angelapwen marked this pull request as ready for review August 23, 2024 15:47
@angelapwen angelapwen merged commit 7e27807 into main Aug 23, 2024
304 checks passed
@angelapwen angelapwen deleted the angelapwen/fix-csrutil-call branch August 23, 2024 16:17
@github-actions github-actions bot mentioned this pull request Aug 23, 2024
8 tasks
angelapwen added a commit that referenced this pull request Aug 23, 2024
* Update changelog and version after v3.26.4

* Update checked-in dependencies

* Only run check SIP enablement once in `init` step (#2441)

Co-authored-by: Henry Mercer <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update changelog for v3.26.5

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Angela P Wen <[email protected]>
Co-authored-by: Henry Mercer <[email protected]>
@github-actions github-actions bot mentioned this pull request Aug 23, 2024
8 tasks
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