-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
unixPB: removes become for brew installs in macos - > common
task
#3757
base: master
Are you sure you want to change the base?
Conversation
In macos when installing using brew and using a root/powered user, an error will show by brew: `Running Homebrew as root is extremely dangerous and no longer supported.`. In general we do not need `become` when installing with brew. This will remove become in common > macos brew installations. Signed-off-by: [email protected]
8602287
to
6b77d38
Compare
The Mac OS X GH Action failed with: TASK [Common : Add AdoptOpenJDK Java Repo] ************************************* |
I am not sure how did you set up your environment but I think it is because you are running ansible with root/privileged user. In your case you need become to switch to less privileged user. But most of the time, the user we run on mac is not root and either is not privileged and need sudo to do something. |
That's a separate fix that may need to be applied to how we set up the GH action in that case. Is that something you can fix as part of this PR? |
I guess the fix is you run MAC pb with a lower privileged users and then this change will work for you either. Nothing to do with ansible code itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A block has been put on this Pull Request as this repository is temporarily under a code freeze due to an ongoing release cycle.
If this pull request needs to be merged during the release cycle then please comment /merge
and a PMC member will be able to remove the block.
If the code freeze is over you can remove this block by commenting /thaw
.
@karianna are you saying that the operations in mac actions is running as an administrator user by default? FYI @mahdipub the code that runs the action is in https://github.com/adoptium/infrastructure/blob/master/.github/workflows/build_mac.yml if you want to look at it. From other invocations in GitHub actions it looks like the playbooks are running with |
@sxa, from the
That could be the cause. Why do we need sudo there? I believe this sudo turns the user
to not run brew as root. So before that playbook line user is not privileged. |
Yes :-) |
That would be a question for @gdams |
In macos when installing using brew and using a root/powered user, an error will show by brew:
Running Homebrew as root is extremely dangerous and no longer supported.
. In general we do not needbecome
when installing with brew. This will remove become in common > macos brew installations.Signed-off-by: [email protected]
Checklist