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

Unlink core system binaries from Brew #269

Open
ledif opened this issue Mar 9, 2025 · 3 comments · May be fixed by #296
Open

Unlink core system binaries from Brew #269

ledif opened this issue Mar 9, 2025 · 3 comments · May be fixed by #296
Labels
brew homebrew related issues bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@ledif
Copy link
Member

ledif commented Mar 9, 2025

It's relatively easy to accidentally pull in a separate systemd or dbus using brew when installing an application. I have done this before with brew install age-plugin-yubikey. In such cases, the first systemctl available in users' $PATH is from brew, which can cause some issues due to the mismatch in Brew's systemd vs the system's systemd.

Because of this, it would make sense to add a brew unlink systemd and brew unlink dbus to one of the startup services.

@ledif ledif added enhancement New feature or request help wanted Extra attention is needed labels Mar 9, 2025
@dosubot dosubot bot added the bug Something isn't working label Mar 9, 2025
@ledif ledif transferred this issue from ublue-os/aurora Mar 9, 2025
@ledif
Copy link
Member Author

ledif commented Mar 9, 2025

From @tulilirockz on Discord:

we probably just want to add brew to the PATH with lower priority
instead of putting it so early on the path

@castrojo castrojo added the brew homebrew related issues label Mar 14, 2025
@castrojo
Copy link
Member

What about just unlinking them right after an upgrade? Like add it to the upgrade service?

@renner0e
Copy link

What about just unlinking them right after an upgrade? Like add it to the upgrade service?

/etc/systemd/system/brew-upgrade.service.d/override.conf

[Service]
# Prevent Brew from overriding important system binaries like:
# systemctl, loginctl, dbus-*
ExecStartPost=/usr/bin/bash -c "/home/linuxbrew/.linuxbrew/bin/brew unlink systemd dbus"

This works for me on Bazzite and Aurora.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brew homebrew related issues bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants