Skip to content

Allow formula permission steps (8/24) - #23185

Merged
MikeMcQuaid merged 1 commit into
mainfrom
install-step-08-formula-permissions
Jul 26, 2026
Merged

Allow formula permission steps (8/24)#23185
MikeMcQuaid merged 1 commit into
mainfrom
install-step-08-formula-permissions

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member

Three core formulae adjust modes on persistent paths after installation
but do not need ownership changes or arbitrary Ruby.

  • admit the existing set_permissions step in formula blocks
  • keep set_ownership limited to cask blocks
  • document and audit the formula capability explicitly

AI disclosure: using OpenAI Codex 5.6 Sol max with local review and
testing.

@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-07-cask-generated-scripts branch 2 times, most recently from a56f984 to 43c589b Compare July 20, 2026 07:22
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-08-formula-permissions branch from 3aa531a to 6d02e59 Compare July 20, 2026 07:22
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-07-cask-generated-scripts branch from 43c589b to 704d977 Compare July 21, 2026 07:13
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-08-formula-permissions branch from 6d02e59 to a689849 Compare July 21, 2026 07:14
@MikeMcQuaid
MikeMcQuaid requested a review from Copilot July 21, 2026 11:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 expands the formula-side declarative install steps DSL to permit set_permissions in post_install_steps, aligning it with existing permission-step capabilities already available in cask steps, and documents the formula usage in the Formula Cookbook.

Changes:

  • Allow set_permissions as an accepted DSL call inside formula *_steps blocks in the InstallSteps RuboCop helper.
  • Extend the RuboCop spec coverage to treat set_permissions as valid in formula step blocks and to include it in the allowed-methods error message.
  • Document set_permissions as an available formula file-preparation step in the Formula Cookbook.

Reviewed changes

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

File Description
Library/Homebrew/test/rubocops/install_steps_spec.rb Updates RuboCop cop specs to include set_permissions in the allowed step DSL list and adds a no-offense example using it.
Library/Homebrew/rubocops/shared/install_steps_helper.rb Adds :set_permissions to the formula ALLOWED_STEP_METHODS list used by the RuboCop cop.
docs/Formula-Cookbook.md Documents set_permissions as an available declarative step for formulae.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-07-cask-generated-scripts branch from 704d977 to 2c35459 Compare July 21, 2026 12:02
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-08-formula-permissions branch from a689849 to 9ad0321 Compare July 21, 2026 12:02
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-07-cask-generated-scripts branch from 2c35459 to eeaae4a Compare July 21, 2026 13:03
Base automatically changed from install-step-07-cask-generated-scripts to main July 22, 2026 01:15
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-08-formula-permissions branch from 9ad0321 to d049aac Compare July 25, 2026 06:38
@MikeMcQuaid
MikeMcQuaid marked this pull request as ready for review July 25, 2026 18:25
@MikeMcQuaid
MikeMcQuaid enabled auto-merge July 25, 2026 18:27
Three core formulae adjust modes on persistent paths after installation
but do not need ownership changes or arbitrary Ruby.

- admit the existing `set_permissions` step in formula blocks
- keep `set_ownership` limited to cask blocks
- document and audit the formula capability explicitly
@MikeMcQuaid
MikeMcQuaid force-pushed the install-step-08-formula-permissions branch from d049aac to 677dad2 Compare July 25, 2026 19:07
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Jul 26, 2026
Merged via the queue into main with commit 40801e7 Jul 26, 2026
42 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the install-step-08-formula-permissions branch July 26, 2026 15:47
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