Allow deps auditing to run on Linux via HOMEBREW_SIMULATE_MACOS_ON_LINUX#10767
Allow deps auditing to run on Linux via HOMEBREW_SIMULATE_MACOS_ON_LINUX#10767Bo98 merged 5 commits intoHomebrew:masterfrom
Conversation
|
Review period will end on 2021-03-04 at 00:47:12 UTC. |
b7bb4dc to
156de0c
Compare
|
If I'm not here: |
To be exact: the tap-wide auditing is done only on macOS but individual Can you remove this auditing from the |
Yes, indeed - I made that statement too broad.
It is reliable, but the behaviour on Linux should now match macOS so I suppose I can remove it as unneeded. |
Actually, Cask auditing is not included in Linux CI so maybe shouldn't remove this yet. |
Gotcha 👍🏻
Could it be limited to just do cask tap auditing in this case? |
|
I think We should probably separate this and introduce a |
Works for me.
The original intent was pretty much just to use homebrew-core on Linuxbrew. |
c2229f0 to
aafd3aa
Compare
aafd3aa to
03a56e5
Compare
|
Review period ended. |
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Looks good. I wonder if any other HOMEBREW_FORCE_HOMEBREW_ON_LINUX uses warrant replacing with the new variable?
03a56e5 to
4091fdb
Compare
|
I think the other references are fine as far as I can tell. |
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Looking good! One question, non-blocking, feel free to merge without if desired.
Library/Homebrew/env_config.rb
Outdated
There was a problem hiding this comment.
Is there any situation where you'd want just HOMEBREW_SIMULATE_MACOS_ON_LINUX and not HOMEBREW_FORCE_HOMEBREW_ON_LINUX? If not, could we make HOMEBREW_SIMULATE_MACOS_ON_LINUX automatically set/imply HOMEBREW_FORCE_HOMEBREW_ON_LINUX?
There was a problem hiding this comment.
Is there any situation where you'd want just
HOMEBREW_SIMULATE_MACOS_ON_LINUXand notHOMEBREW_FORCE_HOMEBREW_ON_LINUX?
Probably not - or at least not for any of our use cases. In theory, HOMEBREW_SIMULATE_MACOS_ON_LINUX should work on linuxbrew-core and pass brew audit without issue - but that's not something we particularly care about.
make
HOMEBREW_SIMULATE_MACOS_ON_LINUXautomatically set/implyHOMEBREW_FORCE_HOMEBREW_ON_LINUX?
Yeah that makes sense.
There was a problem hiding this comment.
Yeah that makes sense.
👍🏻 cool, let's do/document that then.
c197986 to
5660a1b
Compare
brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?brew auditcurrently fails on macOS becauseaudit_depsis not run on Linux and all auditing on homebrew-core is done on Linux.This attempts to prevent that happening again by allowing the audit to run under
HOMEBREW_FORCE_HOMEBREW_ON_LINUX.This PR reverts 9336254 which removed the conditional. This PR also restores a867e78 for
uses_for_macoshandling, with a fix for it not working due to the:sincehandling. In addition, I've added handling ofon_osblocks.To ensure this works, I've added a step to the Linux CI.
See: Homebrew/homebrew-core#70826 (comment)