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

[rpm] Opensnitch-ui packages should install the binary into /usr/bin instead of /usr/local/bin #880

Closed
Bennyhill500 opened this issue Mar 12, 2023 · 5 comments
Milestone

Comments

@Bennyhill500
Copy link

The /usr/local/bin folder is supposed to be used by admins manually compiling/installing binary files and should not be touched by the package manager of the operating system, and for that reason Fedora Silverblue does not support .rpm files which install files there.

@gustavo-iniguez-goya gustavo-iniguez-goya changed the title Opensnitch-ui packages should install the binary into /usr/bin instead of /usr/local/bin [rpm] Opensnitch-ui packages should install the binary into /usr/bin instead of /usr/local/bin Mar 12, 2023
@Gyromancer
Copy link

Gyromancer commented Jul 7, 2023

Jumping in here to say that, as commented above, due to the install location being /usr/local/bin/, I'm unable to install OpenSnitch 1.6.0 UI on Fedora Kinoite, which, like Silverblue, uses rpm-ostree.

@gustavo-iniguez-goya
Copy link
Collaborator

oops, sorry folks, I totally forgot about this problem.

Actually, I'm not sure how to handle this problem properly. I was tempted for v1.6.0 to remove /usr/local/bin/opensnitch-ui on post-installation, only if it was installed properly under /usr/bin. It seems safe but.., or maybe instead of deleting it, rename it to opensnitch-ui.rpm_old

v1.6.1 is inminent, so I'll add it for that version.

@Gyromancer
Copy link

If you need help testing this fix to make sure installation doesn't still error out with rpm-ostree, I'm happy to help.

@comminutus
Copy link

I was able to get the UI to run via distrobox. You can probably do something similar in toolbox - but I prefer distrobox. Here's what I did:

  1. Install distrobox if you don't have it: rpm-ostree install -Ay distrobox
  2. Setup a distrobox for opensnitch-ui
distrobox create -Yn opensnitch-ui -i fedora &&
distrobox enter opensnitch-ui
  1. Download opensnitch-ui
  2. Install opensnitch-ui in the newly created distrobox (my rpm is in ~/Downloads)
sudo dnf update -y
sudo dnf install -y ~/Downloads/opensnitch-ui-1.6.0.1-1.noarch.rpm
# The following fixes missing dependencies:
pip3 install grpcio grpcio-tools
# For themes:
pip3 install qt-material
# Fixes protobuf problems
pip3 uninstall -y protobuf
# Export the app so it's available in your desktop
distrobox-export --app opensnitch-ui
exit

The protobuf issues I believe are related to #647
5. Setup this distrobox to run as a service:

podman generate systemd -f --name opensnitch-ui
mv container-opensnitch-ui.service ~/.config/systemd/user
systemctl --user daemon-reload
distrobox stop -Y opensnitch-ui
systemctl --user enable container-opensnitch-ui
systemctl --user start container-opensnitch-ui
systemctl --user status container-opensnitch-ui
  1. Add OpenSnitch UI to run as startup applications (in Gnome Tweaks for example)

@gustavo-iniguez-goya
Copy link
Collaborator

This issue should be finally fixed. It now installs on Silverblue, and upgrading from previous versions replaces correctly the binary from /usr/local to /usr/bin automagically.

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

No branches or pull requests

4 participants