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

[master] Allow Homebrew package manager in all systems but Windows #66609

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cdalvaro
Copy link
Contributor

@cdalvaro cdalvaro commented Jun 1, 2024

What does this PR do?

This PR removes the restriction for using mac_brew_pkg module only on macOS systems, since Homebrew can be run in Linux too: https://docs.brew.sh/Homebrew-on-Linux

I think that the module could be renamed to brew_pkg instead of mac_brew_pkg. But I need some help here to understand what changes are needed for this to be made.

Merge requirements satisfied?

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@cdalvaro cdalvaro requested a review from a team as a code owner June 1, 2024 17:37
@cdalvaro cdalvaro requested a review from dwoz June 1, 2024 17:37
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title feat(mac_brew_pkg): Allow homebrew in all systems [master] feat(mac_brew_pkg): Allow homebrew in all systems Jun 1, 2024
@cdalvaro cdalvaro force-pushed the feature/allow_homebrew_in_all_systems branch 2 times, most recently from 4c49cdc to 389dd3c Compare June 2, 2024 08:49
@cdalvaro
Copy link
Contributor Author

cdalvaro commented Jul 8, 2024

ping @dwoz, @s0undt3ch and @krionbsd

twangboy
twangboy previously approved these changes Sep 18, 2024
@twangboy
Copy link
Contributor

twangboy commented Sep 18, 2024

I'm not sure how many people are using homebrew on Linux, but if you want to support Linux, you need to make sure all the homebrew tests run on Linux.

The name of the file doesn't matter that much since the salt loader uses the Virtual Name (__VIRTUAL__). The only place it might be an issue is in tests where the full path to the module is passed as an import.

@cdalvaro
Copy link
Contributor Author

I'm not sure how many people are using homebrew on Linux, but if you want to support Linux, you need to make sure all the homebrew tests run on Linux.

The name of the file doesn't matter that much since the salt loader uses the Virtual Name (__VIRTUAL__). The only place it might be an issue is in tests where the full path to the module is passed as an import.

OK!

So, since historically Homebrew has been related to macOS, I think it can be OK to leave the package name as mac_brew_pkg.py

@cdalvaro
Copy link
Contributor Author

cdalvaro commented Sep 20, 2024

I've edited the test tests/pytests/functional/modules/test_mac_brew_pkg.py (ac6aae4) to be run in all platforms except Windows.

However, I'm not sure how to make brew available in those platforms so tests can be run.

@twangboy
Copy link
Contributor

Brew would probably need to be added to the golden images for Linux
That would happen here: https://github.com/saltstack/salt-ci-images
If that's too much work, I'm fine just supporting macOS for now

@cdalvaro
Copy link
Contributor Author

OK, so I would need to modify at least one Linux base image to install Brew on it.

Should I install Brew in all Linux images, or should I just pick one?

@twangboy
Copy link
Contributor

Just pick one

@cdalvaro
Copy link
Contributor Author

I have opened saltstack/salt-ci-images#1853 to install brew in Ubuntu x86_64 machines

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